import {
  Fragment,
  Teleport,
  Transition,
  computed,
  createBaseVNode,
  createBlock,
  createCommentVNode,
  createElementBlock,
  createSlots,
  createTextVNode,
  createVNode,
  defineComponent,
  getCurrentScope,
  guardReactiveProps,
  isRef,
  mergeProps,
  nextTick,
  normalizeClass,
  normalizeProps,
  normalizeStyle,
  onBeforeUpdate,
  onMounted,
  onScopeDispose,
  onUnmounted,
  openBlock,
  reactive,
  ref,
  renderList,
  renderSlot,
  resolveDynamicComponent,
  toDisplayString,
  toRef,
  unref,
  useSlots,
  vShow,
  watch,
  withCtx,
  withDirectives,
  withKeys,
  withModifiers
} from "./chunk-XCYU7YRO.js";
import "./chunk-DC5AMYBS.js";

// node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(o) {
  "@babel/helpers - typeof";
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
    return typeof o2;
  } : function(o2) {
    return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
  }, _typeof(o);
}

// node_modules/date-fns/esm/_lib/toInteger/index.js
function toInteger(dirtyNumber) {
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
    return NaN;
  }
  var number = Number(dirtyNumber);
  if (isNaN(number)) {
    return number;
  }
  return number < 0 ? Math.ceil(number) : Math.floor(number);
}

// node_modules/date-fns/esm/_lib/requiredArgs/index.js
function requiredArgs(required, args) {
  if (args.length < required) {
    throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
  }
}

// node_modules/date-fns/esm/toDate/index.js
function toDate(argument) {
  requiredArgs(1, arguments);
  var argStr = Object.prototype.toString.call(argument);
  if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") {
    return new Date(argument.getTime());
  } else if (typeof argument === "number" || argStr === "[object Number]") {
    return new Date(argument);
  } else {
    if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
      console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
      console.warn(new Error().stack);
    }
    return /* @__PURE__ */ new Date(NaN);
  }
}

// node_modules/date-fns/esm/addDays/index.js
function addDays(dirtyDate, dirtyAmount) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var amount = toInteger(dirtyAmount);
  if (isNaN(amount)) {
    return /* @__PURE__ */ new Date(NaN);
  }
  if (!amount) {
    return date;
  }
  date.setDate(date.getDate() + amount);
  return date;
}

// node_modules/date-fns/esm/addMonths/index.js
function addMonths(dirtyDate, dirtyAmount) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var amount = toInteger(dirtyAmount);
  if (isNaN(amount)) {
    return /* @__PURE__ */ new Date(NaN);
  }
  if (!amount) {
    return date;
  }
  var dayOfMonth = date.getDate();
  var endOfDesiredMonth = new Date(date.getTime());
  endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);
  var daysInMonth = endOfDesiredMonth.getDate();
  if (dayOfMonth >= daysInMonth) {
    return endOfDesiredMonth;
  } else {
    date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);
    return date;
  }
}

// node_modules/date-fns/esm/add/index.js
function add(dirtyDate, duration) {
  requiredArgs(2, arguments);
  if (!duration || _typeof(duration) !== "object") return /* @__PURE__ */ new Date(NaN);
  var years = duration.years ? toInteger(duration.years) : 0;
  var months = duration.months ? toInteger(duration.months) : 0;
  var weeks = duration.weeks ? toInteger(duration.weeks) : 0;
  var days = duration.days ? toInteger(duration.days) : 0;
  var hours = duration.hours ? toInteger(duration.hours) : 0;
  var minutes = duration.minutes ? toInteger(duration.minutes) : 0;
  var seconds = duration.seconds ? toInteger(duration.seconds) : 0;
  var date = toDate(dirtyDate);
  var dateWithMonths = months || years ? addMonths(date, months + years * 12) : date;
  var dateWithDays = days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths;
  var minutesToAdd = minutes + hours * 60;
  var secondsToAdd = seconds + minutesToAdd * 60;
  var msToAdd = secondsToAdd * 1e3;
  var finalDate = new Date(dateWithDays.getTime() + msToAdd);
  return finalDate;
}

// node_modules/date-fns/esm/addMilliseconds/index.js
function addMilliseconds(dirtyDate, dirtyAmount) {
  requiredArgs(2, arguments);
  var timestamp = toDate(dirtyDate).getTime();
  var amount = toInteger(dirtyAmount);
  return new Date(timestamp + amount);
}

// node_modules/date-fns/esm/_lib/defaultOptions/index.js
var defaultOptions = {};
function getDefaultOptions() {
  return defaultOptions;
}

// node_modules/date-fns/esm/startOfWeek/index.js
function startOfWeek(dirtyDate, options) {
  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
  requiredArgs(1, arguments);
  var defaultOptions2 = getDefaultOptions();
  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
    throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
  }
  var date = toDate(dirtyDate);
  var day = date.getDay();
  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
  date.setDate(date.getDate() - diff);
  date.setHours(0, 0, 0, 0);
  return date;
}

// node_modules/date-fns/esm/startOfISOWeek/index.js
function startOfISOWeek(dirtyDate) {
  requiredArgs(1, arguments);
  return startOfWeek(dirtyDate, {
    weekStartsOn: 1
  });
}

// node_modules/date-fns/esm/getISOWeekYear/index.js
function getISOWeekYear(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var year = date.getFullYear();
  var fourthOfJanuaryOfNextYear = /* @__PURE__ */ new Date(0);
  fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
  fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
  var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
  var fourthOfJanuaryOfThisYear = /* @__PURE__ */ new Date(0);
  fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
  fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
  var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
  if (date.getTime() >= startOfNextYear.getTime()) {
    return year + 1;
  } else if (date.getTime() >= startOfThisYear.getTime()) {
    return year;
  } else {
    return year - 1;
  }
}

// node_modules/date-fns/esm/startOfISOWeekYear/index.js
function startOfISOWeekYear(dirtyDate) {
  requiredArgs(1, arguments);
  var year = getISOWeekYear(dirtyDate);
  var fourthOfJanuary = /* @__PURE__ */ new Date(0);
  fourthOfJanuary.setFullYear(year, 0, 4);
  fourthOfJanuary.setHours(0, 0, 0, 0);
  var date = startOfISOWeek(fourthOfJanuary);
  return date;
}

// node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js
function getTimezoneOffsetInMilliseconds(date) {
  var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
  utcDate.setUTCFullYear(date.getFullYear());
  return date.getTime() - utcDate.getTime();
}

// node_modules/date-fns/esm/startOfDay/index.js
function startOfDay(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  date.setHours(0, 0, 0, 0);
  return date;
}

// node_modules/date-fns/esm/differenceInCalendarDays/index.js
var MILLISECONDS_IN_DAY = 864e5;
function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {
  requiredArgs(2, arguments);
  var startOfDayLeft = startOfDay(dirtyDateLeft);
  var startOfDayRight = startOfDay(dirtyDateRight);
  var timestampLeft = startOfDayLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfDayLeft);
  var timestampRight = startOfDayRight.getTime() - getTimezoneOffsetInMilliseconds(startOfDayRight);
  return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY);
}

// node_modules/date-fns/esm/addYears/index.js
function addYears(dirtyDate, dirtyAmount) {
  requiredArgs(2, arguments);
  var amount = toInteger(dirtyAmount);
  return addMonths(dirtyDate, amount * 12);
}

// node_modules/date-fns/esm/constants/index.js
var daysInYear = 365.2425;
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
var millisecondsInMinute = 6e4;
var millisecondsInHour = 36e5;
var millisecondsInSecond = 1e3;
var minTime = -maxTime;
var secondsInHour = 3600;
var secondsInDay = secondsInHour * 24;
var secondsInWeek = secondsInDay * 7;
var secondsInYear = secondsInDay * daysInYear;
var secondsInMonth = secondsInYear / 12;
var secondsInQuarter = secondsInMonth * 3;

// node_modules/date-fns/esm/isDate/index.js
function isDate(value) {
  requiredArgs(1, arguments);
  return value instanceof Date || _typeof(value) === "object" && Object.prototype.toString.call(value) === "[object Date]";
}

// node_modules/date-fns/esm/isValid/index.js
function isValid(dirtyDate) {
  requiredArgs(1, arguments);
  if (!isDate(dirtyDate) && typeof dirtyDate !== "number") {
    return false;
  }
  var date = toDate(dirtyDate);
  return !isNaN(Number(date));
}

// node_modules/date-fns/esm/eachDayOfInterval/index.js
function eachDayOfInterval(dirtyInterval, options) {
  var _options$step;
  requiredArgs(1, arguments);
  var interval = dirtyInterval || {};
  var startDate = toDate(interval.start);
  var endDate = toDate(interval.end);
  var endTime = endDate.getTime();
  if (!(startDate.getTime() <= endTime)) {
    throw new RangeError("Invalid interval");
  }
  var dates = [];
  var currentDate = startDate;
  currentDate.setHours(0, 0, 0, 0);
  var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1);
  if (step < 1 || isNaN(step)) throw new RangeError("`options.step` must be a number greater than 1");
  while (currentDate.getTime() <= endTime) {
    dates.push(toDate(currentDate));
    currentDate.setDate(currentDate.getDate() + step);
    currentDate.setHours(0, 0, 0, 0);
  }
  return dates;
}

// node_modules/date-fns/esm/endOfWeek/index.js
function endOfWeek(dirtyDate, options) {
  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
  requiredArgs(1, arguments);
  var defaultOptions2 = getDefaultOptions();
  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
    throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
  }
  var date = toDate(dirtyDate);
  var day = date.getDay();
  var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
  date.setDate(date.getDate() + diff);
  date.setHours(23, 59, 59, 999);
  return date;
}

// node_modules/date-fns/esm/subMilliseconds/index.js
function subMilliseconds(dirtyDate, dirtyAmount) {
  requiredArgs(2, arguments);
  var amount = toInteger(dirtyAmount);
  return addMilliseconds(dirtyDate, -amount);
}

// node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js
var MILLISECONDS_IN_DAY2 = 864e5;
function getUTCDayOfYear(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var timestamp = date.getTime();
  date.setUTCMonth(0, 1);
  date.setUTCHours(0, 0, 0, 0);
  var startOfYearTimestamp = date.getTime();
  var difference = timestamp - startOfYearTimestamp;
  return Math.floor(difference / MILLISECONDS_IN_DAY2) + 1;
}

// node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
function startOfUTCISOWeek(dirtyDate) {
  requiredArgs(1, arguments);
  var weekStartsOn = 1;
  var date = toDate(dirtyDate);
  var day = date.getUTCDay();
  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
  date.setUTCDate(date.getUTCDate() - diff);
  date.setUTCHours(0, 0, 0, 0);
  return date;
}

// node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js
function getUTCISOWeekYear(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var year = date.getUTCFullYear();
  var fourthOfJanuaryOfNextYear = /* @__PURE__ */ new Date(0);
  fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
  fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
  var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
  var fourthOfJanuaryOfThisYear = /* @__PURE__ */ new Date(0);
  fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
  fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
  var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
  if (date.getTime() >= startOfNextYear.getTime()) {
    return year + 1;
  } else if (date.getTime() >= startOfThisYear.getTime()) {
    return year;
  } else {
    return year - 1;
  }
}

// node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js
function startOfUTCISOWeekYear(dirtyDate) {
  requiredArgs(1, arguments);
  var year = getUTCISOWeekYear(dirtyDate);
  var fourthOfJanuary = /* @__PURE__ */ new Date(0);
  fourthOfJanuary.setUTCFullYear(year, 0, 4);
  fourthOfJanuary.setUTCHours(0, 0, 0, 0);
  var date = startOfUTCISOWeek(fourthOfJanuary);
  return date;
}

// node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js
var MILLISECONDS_IN_WEEK = 6048e5;
function getUTCISOWeek(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
}

// node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
function startOfUTCWeek(dirtyDate, options) {
  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
  requiredArgs(1, arguments);
  var defaultOptions2 = getDefaultOptions();
  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
    throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
  }
  var date = toDate(dirtyDate);
  var day = date.getUTCDay();
  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
  date.setUTCDate(date.getUTCDate() - diff);
  date.setUTCHours(0, 0, 0, 0);
  return date;
}

// node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js
function getUTCWeekYear(dirtyDate, options) {
  var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var year = date.getUTCFullYear();
  var defaultOptions2 = getDefaultOptions();
  var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
    throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
  }
  var firstWeekOfNextYear = /* @__PURE__ */ new Date(0);
  firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
  firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
  var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);
  var firstWeekOfThisYear = /* @__PURE__ */ new Date(0);
  firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
  firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
  var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
  if (date.getTime() >= startOfNextYear.getTime()) {
    return year + 1;
  } else if (date.getTime() >= startOfThisYear.getTime()) {
    return year;
  } else {
    return year - 1;
  }
}

// node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js
function startOfUTCWeekYear(dirtyDate, options) {
  var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
  requiredArgs(1, arguments);
  var defaultOptions2 = getDefaultOptions();
  var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
  var year = getUTCWeekYear(dirtyDate, options);
  var firstWeek = /* @__PURE__ */ new Date(0);
  firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
  firstWeek.setUTCHours(0, 0, 0, 0);
  var date = startOfUTCWeek(firstWeek, options);
  return date;
}

// node_modules/date-fns/esm/_lib/getUTCWeek/index.js
var MILLISECONDS_IN_WEEK2 = 6048e5;
function getUTCWeek(dirtyDate, options) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
  return Math.round(diff / MILLISECONDS_IN_WEEK2) + 1;
}

// node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
function addLeadingZeros(number, targetLength) {
  var sign = number < 0 ? "-" : "";
  var output = Math.abs(number).toString();
  while (output.length < targetLength) {
    output = "0" + output;
  }
  return sign + output;
}

// node_modules/date-fns/esm/_lib/format/lightFormatters/index.js
var formatters = {
  // Year
  y: function y(date, token) {
    var signedYear = date.getUTCFullYear();
    var year = signedYear > 0 ? signedYear : 1 - signedYear;
    return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
  },
  // Month
  M: function M(date, token) {
    var month = date.getUTCMonth();
    return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
  },
  // Day of the month
  d: function d(date, token) {
    return addLeadingZeros(date.getUTCDate(), token.length);
  },
  // AM or PM
  a: function a(date, token) {
    var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? "pm" : "am";
    switch (token) {
      case "a":
      case "aa":
        return dayPeriodEnumValue.toUpperCase();
      case "aaa":
        return dayPeriodEnumValue;
      case "aaaaa":
        return dayPeriodEnumValue[0];
      case "aaaa":
      default:
        return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
    }
  },
  // Hour [1-12]
  h: function h(date, token) {
    return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
  },
  // Hour [0-23]
  H: function H(date, token) {
    return addLeadingZeros(date.getUTCHours(), token.length);
  },
  // Minute
  m: function m(date, token) {
    return addLeadingZeros(date.getUTCMinutes(), token.length);
  },
  // Second
  s: function s(date, token) {
    return addLeadingZeros(date.getUTCSeconds(), token.length);
  },
  // Fraction of second
  S: function S(date, token) {
    var numberOfDigits = token.length;
    var milliseconds2 = date.getUTCMilliseconds();
    var fractionalSeconds = Math.floor(milliseconds2 * Math.pow(10, numberOfDigits - 3));
    return addLeadingZeros(fractionalSeconds, token.length);
  }
};
var lightFormatters_default = formatters;

// node_modules/date-fns/esm/_lib/format/formatters/index.js
var dayPeriodEnum = {
  am: "am",
  pm: "pm",
  midnight: "midnight",
  noon: "noon",
  morning: "morning",
  afternoon: "afternoon",
  evening: "evening",
  night: "night"
};
var formatters2 = {
  // Era
  G: function G(date, token, localize2) {
    var era = date.getUTCFullYear() > 0 ? 1 : 0;
    switch (token) {
      // AD, BC
      case "G":
      case "GG":
      case "GGG":
        return localize2.era(era, {
          width: "abbreviated"
        });
      // A, B
      case "GGGGG":
        return localize2.era(era, {
          width: "narrow"
        });
      // Anno Domini, Before Christ
      case "GGGG":
      default:
        return localize2.era(era, {
          width: "wide"
        });
    }
  },
  // Year
  y: function y2(date, token, localize2) {
    if (token === "yo") {
      var signedYear = date.getUTCFullYear();
      var year = signedYear > 0 ? signedYear : 1 - signedYear;
      return localize2.ordinalNumber(year, {
        unit: "year"
      });
    }
    return lightFormatters_default.y(date, token);
  },
  // Local week-numbering year
  Y: function Y(date, token, localize2, options) {
    var signedWeekYear = getUTCWeekYear(date, options);
    var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
    if (token === "YY") {
      var twoDigitYear = weekYear % 100;
      return addLeadingZeros(twoDigitYear, 2);
    }
    if (token === "Yo") {
      return localize2.ordinalNumber(weekYear, {
        unit: "year"
      });
    }
    return addLeadingZeros(weekYear, token.length);
  },
  // ISO week-numbering year
  R: function R(date, token) {
    var isoWeekYear = getUTCISOWeekYear(date);
    return addLeadingZeros(isoWeekYear, token.length);
  },
  // Extended year. This is a single number designating the year of this calendar system.
  // The main difference between `y` and `u` localizers are B.C. years:
  // | Year | `y` | `u` |
  // |------|-----|-----|
  // | AC 1 |   1 |   1 |
  // | BC 1 |   1 |   0 |
  // | BC 2 |   2 |  -1 |
  // Also `yy` always returns the last two digits of a year,
  // while `uu` pads single digit years to 2 characters and returns other years unchanged.
  u: function u(date, token) {
    var year = date.getUTCFullYear();
    return addLeadingZeros(year, token.length);
  },
  // Quarter
  Q: function Q(date, token, localize2) {
    var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
    switch (token) {
      // 1, 2, 3, 4
      case "Q":
        return String(quarter);
      // 01, 02, 03, 04
      case "QQ":
        return addLeadingZeros(quarter, 2);
      // 1st, 2nd, 3rd, 4th
      case "Qo":
        return localize2.ordinalNumber(quarter, {
          unit: "quarter"
        });
      // Q1, Q2, Q3, Q4
      case "QQQ":
        return localize2.quarter(quarter, {
          width: "abbreviated",
          context: "formatting"
        });
      // 1, 2, 3, 4 (narrow quarter; could be not numerical)
      case "QQQQQ":
        return localize2.quarter(quarter, {
          width: "narrow",
          context: "formatting"
        });
      // 1st quarter, 2nd quarter, ...
      case "QQQQ":
      default:
        return localize2.quarter(quarter, {
          width: "wide",
          context: "formatting"
        });
    }
  },
  // Stand-alone quarter
  q: function q(date, token, localize2) {
    var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
    switch (token) {
      // 1, 2, 3, 4
      case "q":
        return String(quarter);
      // 01, 02, 03, 04
      case "qq":
        return addLeadingZeros(quarter, 2);
      // 1st, 2nd, 3rd, 4th
      case "qo":
        return localize2.ordinalNumber(quarter, {
          unit: "quarter"
        });
      // Q1, Q2, Q3, Q4
      case "qqq":
        return localize2.quarter(quarter, {
          width: "abbreviated",
          context: "standalone"
        });
      // 1, 2, 3, 4 (narrow quarter; could be not numerical)
      case "qqqqq":
        return localize2.quarter(quarter, {
          width: "narrow",
          context: "standalone"
        });
      // 1st quarter, 2nd quarter, ...
      case "qqqq":
      default:
        return localize2.quarter(quarter, {
          width: "wide",
          context: "standalone"
        });
    }
  },
  // Month
  M: function M2(date, token, localize2) {
    var month = date.getUTCMonth();
    switch (token) {
      case "M":
      case "MM":
        return lightFormatters_default.M(date, token);
      // 1st, 2nd, ..., 12th
      case "Mo":
        return localize2.ordinalNumber(month + 1, {
          unit: "month"
        });
      // Jan, Feb, ..., Dec
      case "MMM":
        return localize2.month(month, {
          width: "abbreviated",
          context: "formatting"
        });
      // J, F, ..., D
      case "MMMMM":
        return localize2.month(month, {
          width: "narrow",
          context: "formatting"
        });
      // January, February, ..., December
      case "MMMM":
      default:
        return localize2.month(month, {
          width: "wide",
          context: "formatting"
        });
    }
  },
  // Stand-alone month
  L: function L(date, token, localize2) {
    var month = date.getUTCMonth();
    switch (token) {
      // 1, 2, ..., 12
      case "L":
        return String(month + 1);
      // 01, 02, ..., 12
      case "LL":
        return addLeadingZeros(month + 1, 2);
      // 1st, 2nd, ..., 12th
      case "Lo":
        return localize2.ordinalNumber(month + 1, {
          unit: "month"
        });
      // Jan, Feb, ..., Dec
      case "LLL":
        return localize2.month(month, {
          width: "abbreviated",
          context: "standalone"
        });
      // J, F, ..., D
      case "LLLLL":
        return localize2.month(month, {
          width: "narrow",
          context: "standalone"
        });
      // January, February, ..., December
      case "LLLL":
      default:
        return localize2.month(month, {
          width: "wide",
          context: "standalone"
        });
    }
  },
  // Local week of year
  w: function w(date, token, localize2, options) {
    var week = getUTCWeek(date, options);
    if (token === "wo") {
      return localize2.ordinalNumber(week, {
        unit: "week"
      });
    }
    return addLeadingZeros(week, token.length);
  },
  // ISO week of year
  I: function I(date, token, localize2) {
    var isoWeek = getUTCISOWeek(date);
    if (token === "Io") {
      return localize2.ordinalNumber(isoWeek, {
        unit: "week"
      });
    }
    return addLeadingZeros(isoWeek, token.length);
  },
  // Day of the month
  d: function d2(date, token, localize2) {
    if (token === "do") {
      return localize2.ordinalNumber(date.getUTCDate(), {
        unit: "date"
      });
    }
    return lightFormatters_default.d(date, token);
  },
  // Day of year
  D: function D(date, token, localize2) {
    var dayOfYear = getUTCDayOfYear(date);
    if (token === "Do") {
      return localize2.ordinalNumber(dayOfYear, {
        unit: "dayOfYear"
      });
    }
    return addLeadingZeros(dayOfYear, token.length);
  },
  // Day of week
  E: function E(date, token, localize2) {
    var dayOfWeek = date.getUTCDay();
    switch (token) {
      // Tue
      case "E":
      case "EE":
      case "EEE":
        return localize2.day(dayOfWeek, {
          width: "abbreviated",
          context: "formatting"
        });
      // T
      case "EEEEE":
        return localize2.day(dayOfWeek, {
          width: "narrow",
          context: "formatting"
        });
      // Tu
      case "EEEEEE":
        return localize2.day(dayOfWeek, {
          width: "short",
          context: "formatting"
        });
      // Tuesday
      case "EEEE":
      default:
        return localize2.day(dayOfWeek, {
          width: "wide",
          context: "formatting"
        });
    }
  },
  // Local day of week
  e: function e(date, token, localize2, options) {
    var dayOfWeek = date.getUTCDay();
    var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
    switch (token) {
      // Numerical value (Nth day of week with current locale or weekStartsOn)
      case "e":
        return String(localDayOfWeek);
      // Padded numerical value
      case "ee":
        return addLeadingZeros(localDayOfWeek, 2);
      // 1st, 2nd, ..., 7th
      case "eo":
        return localize2.ordinalNumber(localDayOfWeek, {
          unit: "day"
        });
      case "eee":
        return localize2.day(dayOfWeek, {
          width: "abbreviated",
          context: "formatting"
        });
      // T
      case "eeeee":
        return localize2.day(dayOfWeek, {
          width: "narrow",
          context: "formatting"
        });
      // Tu
      case "eeeeee":
        return localize2.day(dayOfWeek, {
          width: "short",
          context: "formatting"
        });
      // Tuesday
      case "eeee":
      default:
        return localize2.day(dayOfWeek, {
          width: "wide",
          context: "formatting"
        });
    }
  },
  // Stand-alone local day of week
  c: function c(date, token, localize2, options) {
    var dayOfWeek = date.getUTCDay();
    var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
    switch (token) {
      // Numerical value (same as in `e`)
      case "c":
        return String(localDayOfWeek);
      // Padded numerical value
      case "cc":
        return addLeadingZeros(localDayOfWeek, token.length);
      // 1st, 2nd, ..., 7th
      case "co":
        return localize2.ordinalNumber(localDayOfWeek, {
          unit: "day"
        });
      case "ccc":
        return localize2.day(dayOfWeek, {
          width: "abbreviated",
          context: "standalone"
        });
      // T
      case "ccccc":
        return localize2.day(dayOfWeek, {
          width: "narrow",
          context: "standalone"
        });
      // Tu
      case "cccccc":
        return localize2.day(dayOfWeek, {
          width: "short",
          context: "standalone"
        });
      // Tuesday
      case "cccc":
      default:
        return localize2.day(dayOfWeek, {
          width: "wide",
          context: "standalone"
        });
    }
  },
  // ISO day of week
  i: function i(date, token, localize2) {
    var dayOfWeek = date.getUTCDay();
    var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
    switch (token) {
      // 2
      case "i":
        return String(isoDayOfWeek);
      // 02
      case "ii":
        return addLeadingZeros(isoDayOfWeek, token.length);
      // 2nd
      case "io":
        return localize2.ordinalNumber(isoDayOfWeek, {
          unit: "day"
        });
      // Tue
      case "iii":
        return localize2.day(dayOfWeek, {
          width: "abbreviated",
          context: "formatting"
        });
      // T
      case "iiiii":
        return localize2.day(dayOfWeek, {
          width: "narrow",
          context: "formatting"
        });
      // Tu
      case "iiiiii":
        return localize2.day(dayOfWeek, {
          width: "short",
          context: "formatting"
        });
      // Tuesday
      case "iiii":
      default:
        return localize2.day(dayOfWeek, {
          width: "wide",
          context: "formatting"
        });
    }
  },
  // AM or PM
  a: function a2(date, token, localize2) {
    var hours = date.getUTCHours();
    var dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
    switch (token) {
      case "a":
      case "aa":
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "abbreviated",
          context: "formatting"
        });
      case "aaa":
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "abbreviated",
          context: "formatting"
        }).toLowerCase();
      case "aaaaa":
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "narrow",
          context: "formatting"
        });
      case "aaaa":
      default:
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "wide",
          context: "formatting"
        });
    }
  },
  // AM, PM, midnight, noon
  b: function b(date, token, localize2) {
    var hours = date.getUTCHours();
    var dayPeriodEnumValue;
    if (hours === 12) {
      dayPeriodEnumValue = dayPeriodEnum.noon;
    } else if (hours === 0) {
      dayPeriodEnumValue = dayPeriodEnum.midnight;
    } else {
      dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
    }
    switch (token) {
      case "b":
      case "bb":
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "abbreviated",
          context: "formatting"
        });
      case "bbb":
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "abbreviated",
          context: "formatting"
        }).toLowerCase();
      case "bbbbb":
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "narrow",
          context: "formatting"
        });
      case "bbbb":
      default:
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "wide",
          context: "formatting"
        });
    }
  },
  // in the morning, in the afternoon, in the evening, at night
  B: function B(date, token, localize2) {
    var hours = date.getUTCHours();
    var dayPeriodEnumValue;
    if (hours >= 17) {
      dayPeriodEnumValue = dayPeriodEnum.evening;
    } else if (hours >= 12) {
      dayPeriodEnumValue = dayPeriodEnum.afternoon;
    } else if (hours >= 4) {
      dayPeriodEnumValue = dayPeriodEnum.morning;
    } else {
      dayPeriodEnumValue = dayPeriodEnum.night;
    }
    switch (token) {
      case "B":
      case "BB":
      case "BBB":
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "abbreviated",
          context: "formatting"
        });
      case "BBBBB":
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "narrow",
          context: "formatting"
        });
      case "BBBB":
      default:
        return localize2.dayPeriod(dayPeriodEnumValue, {
          width: "wide",
          context: "formatting"
        });
    }
  },
  // Hour [1-12]
  h: function h2(date, token, localize2) {
    if (token === "ho") {
      var hours = date.getUTCHours() % 12;
      if (hours === 0) hours = 12;
      return localize2.ordinalNumber(hours, {
        unit: "hour"
      });
    }
    return lightFormatters_default.h(date, token);
  },
  // Hour [0-23]
  H: function H2(date, token, localize2) {
    if (token === "Ho") {
      return localize2.ordinalNumber(date.getUTCHours(), {
        unit: "hour"
      });
    }
    return lightFormatters_default.H(date, token);
  },
  // Hour [0-11]
  K: function K(date, token, localize2) {
    var hours = date.getUTCHours() % 12;
    if (token === "Ko") {
      return localize2.ordinalNumber(hours, {
        unit: "hour"
      });
    }
    return addLeadingZeros(hours, token.length);
  },
  // Hour [1-24]
  k: function k(date, token, localize2) {
    var hours = date.getUTCHours();
    if (hours === 0) hours = 24;
    if (token === "ko") {
      return localize2.ordinalNumber(hours, {
        unit: "hour"
      });
    }
    return addLeadingZeros(hours, token.length);
  },
  // Minute
  m: function m2(date, token, localize2) {
    if (token === "mo") {
      return localize2.ordinalNumber(date.getUTCMinutes(), {
        unit: "minute"
      });
    }
    return lightFormatters_default.m(date, token);
  },
  // Second
  s: function s2(date, token, localize2) {
    if (token === "so") {
      return localize2.ordinalNumber(date.getUTCSeconds(), {
        unit: "second"
      });
    }
    return lightFormatters_default.s(date, token);
  },
  // Fraction of second
  S: function S2(date, token) {
    return lightFormatters_default.S(date, token);
  },
  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
  X: function X(date, token, _localize, options) {
    var originalDate = options._originalDate || date;
    var timezoneOffset = originalDate.getTimezoneOffset();
    if (timezoneOffset === 0) {
      return "Z";
    }
    switch (token) {
      // Hours and optional minutes
      case "X":
        return formatTimezoneWithOptionalMinutes(timezoneOffset);
      // Hours, minutes and optional seconds without `:` delimiter
      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
      // so this token always has the same output as `XX`
      case "XXXX":
      case "XX":
        return formatTimezone(timezoneOffset);
      // Hours, minutes and optional seconds with `:` delimiter
      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
      // so this token always has the same output as `XXX`
      case "XXXXX":
      case "XXX":
      // Hours and minutes with `:` delimiter
      default:
        return formatTimezone(timezoneOffset, ":");
    }
  },
  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
  x: function x(date, token, _localize, options) {
    var originalDate = options._originalDate || date;
    var timezoneOffset = originalDate.getTimezoneOffset();
    switch (token) {
      // Hours and optional minutes
      case "x":
        return formatTimezoneWithOptionalMinutes(timezoneOffset);
      // Hours, minutes and optional seconds without `:` delimiter
      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
      // so this token always has the same output as `xx`
      case "xxxx":
      case "xx":
        return formatTimezone(timezoneOffset);
      // Hours, minutes and optional seconds with `:` delimiter
      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
      // so this token always has the same output as `xxx`
      case "xxxxx":
      case "xxx":
      // Hours and minutes with `:` delimiter
      default:
        return formatTimezone(timezoneOffset, ":");
    }
  },
  // Timezone (GMT)
  O: function O(date, token, _localize, options) {
    var originalDate = options._originalDate || date;
    var timezoneOffset = originalDate.getTimezoneOffset();
    switch (token) {
      // Short
      case "O":
      case "OO":
      case "OOO":
        return "GMT" + formatTimezoneShort(timezoneOffset, ":");
      // Long
      case "OOOO":
      default:
        return "GMT" + formatTimezone(timezoneOffset, ":");
    }
  },
  // Timezone (specific non-location)
  z: function z(date, token, _localize, options) {
    var originalDate = options._originalDate || date;
    var timezoneOffset = originalDate.getTimezoneOffset();
    switch (token) {
      // Short
      case "z":
      case "zz":
      case "zzz":
        return "GMT" + formatTimezoneShort(timezoneOffset, ":");
      // Long
      case "zzzz":
      default:
        return "GMT" + formatTimezone(timezoneOffset, ":");
    }
  },
  // Seconds timestamp
  t: function t(date, token, _localize, options) {
    var originalDate = options._originalDate || date;
    var timestamp = Math.floor(originalDate.getTime() / 1e3);
    return addLeadingZeros(timestamp, token.length);
  },
  // Milliseconds timestamp
  T: function T(date, token, _localize, options) {
    var originalDate = options._originalDate || date;
    var timestamp = originalDate.getTime();
    return addLeadingZeros(timestamp, token.length);
  }
};
function formatTimezoneShort(offset, dirtyDelimiter) {
  var sign = offset > 0 ? "-" : "+";
  var absOffset = Math.abs(offset);
  var hours = Math.floor(absOffset / 60);
  var minutes = absOffset % 60;
  if (minutes === 0) {
    return sign + String(hours);
  }
  var delimiter = dirtyDelimiter || "";
  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
}
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
  if (offset % 60 === 0) {
    var sign = offset > 0 ? "-" : "+";
    return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
  }
  return formatTimezone(offset, dirtyDelimiter);
}
function formatTimezone(offset, dirtyDelimiter) {
  var delimiter = dirtyDelimiter || "";
  var sign = offset > 0 ? "-" : "+";
  var absOffset = Math.abs(offset);
  var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
  var minutes = addLeadingZeros(absOffset % 60, 2);
  return sign + hours + delimiter + minutes;
}
var formatters_default = formatters2;

// node_modules/date-fns/esm/_lib/format/longFormatters/index.js
var dateLongFormatter = function dateLongFormatter2(pattern, formatLong2) {
  switch (pattern) {
    case "P":
      return formatLong2.date({
        width: "short"
      });
    case "PP":
      return formatLong2.date({
        width: "medium"
      });
    case "PPP":
      return formatLong2.date({
        width: "long"
      });
    case "PPPP":
    default:
      return formatLong2.date({
        width: "full"
      });
  }
};
var timeLongFormatter = function timeLongFormatter2(pattern, formatLong2) {
  switch (pattern) {
    case "p":
      return formatLong2.time({
        width: "short"
      });
    case "pp":
      return formatLong2.time({
        width: "medium"
      });
    case "ppp":
      return formatLong2.time({
        width: "long"
      });
    case "pppp":
    default:
      return formatLong2.time({
        width: "full"
      });
  }
};
var dateTimeLongFormatter = function dateTimeLongFormatter2(pattern, formatLong2) {
  var matchResult = pattern.match(/(P+)(p+)?/) || [];
  var datePattern = matchResult[1];
  var timePattern = matchResult[2];
  if (!timePattern) {
    return dateLongFormatter(pattern, formatLong2);
  }
  var dateTimeFormat;
  switch (datePattern) {
    case "P":
      dateTimeFormat = formatLong2.dateTime({
        width: "short"
      });
      break;
    case "PP":
      dateTimeFormat = formatLong2.dateTime({
        width: "medium"
      });
      break;
    case "PPP":
      dateTimeFormat = formatLong2.dateTime({
        width: "long"
      });
      break;
    case "PPPP":
    default:
      dateTimeFormat = formatLong2.dateTime({
        width: "full"
      });
      break;
  }
  return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
};
var longFormatters = {
  p: timeLongFormatter,
  P: dateTimeLongFormatter
};
var longFormatters_default = longFormatters;

// node_modules/date-fns/esm/_lib/protectedTokens/index.js
var protectedDayOfYearTokens = ["D", "DD"];
var protectedWeekYearTokens = ["YY", "YYYY"];
function isProtectedDayOfYearToken(token) {
  return protectedDayOfYearTokens.indexOf(token) !== -1;
}
function isProtectedWeekYearToken(token) {
  return protectedWeekYearTokens.indexOf(token) !== -1;
}
function throwProtectedError(token, format2, input) {
  if (token === "YYYY") {
    throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
  } else if (token === "YY") {
    throw new RangeError("Use `yy` instead of `YY` (in `".concat(format2, "`) for formatting years to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
  } else if (token === "D") {
    throw new RangeError("Use `d` instead of `D` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
  } else if (token === "DD") {
    throw new RangeError("Use `dd` instead of `DD` (in `".concat(format2, "`) for formatting days of the month to the input `").concat(input, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
  }
}

// node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js
var formatDistanceLocale = {
  lessThanXSeconds: {
    one: "less than a second",
    other: "less than {{count}} seconds"
  },
  xSeconds: {
    one: "1 second",
    other: "{{count}} seconds"
  },
  halfAMinute: "half a minute",
  lessThanXMinutes: {
    one: "less than a minute",
    other: "less than {{count}} minutes"
  },
  xMinutes: {
    one: "1 minute",
    other: "{{count}} minutes"
  },
  aboutXHours: {
    one: "about 1 hour",
    other: "about {{count}} hours"
  },
  xHours: {
    one: "1 hour",
    other: "{{count}} hours"
  },
  xDays: {
    one: "1 day",
    other: "{{count}} days"
  },
  aboutXWeeks: {
    one: "about 1 week",
    other: "about {{count}} weeks"
  },
  xWeeks: {
    one: "1 week",
    other: "{{count}} weeks"
  },
  aboutXMonths: {
    one: "about 1 month",
    other: "about {{count}} months"
  },
  xMonths: {
    one: "1 month",
    other: "{{count}} months"
  },
  aboutXYears: {
    one: "about 1 year",
    other: "about {{count}} years"
  },
  xYears: {
    one: "1 year",
    other: "{{count}} years"
  },
  overXYears: {
    one: "over 1 year",
    other: "over {{count}} years"
  },
  almostXYears: {
    one: "almost 1 year",
    other: "almost {{count}} years"
  }
};
var formatDistance = function formatDistance2(token, count, options) {
  var result;
  var tokenValue = formatDistanceLocale[token];
  if (typeof tokenValue === "string") {
    result = tokenValue;
  } else if (count === 1) {
    result = tokenValue.one;
  } else {
    result = tokenValue.other.replace("{{count}}", count.toString());
  }
  if (options !== null && options !== void 0 && options.addSuffix) {
    if (options.comparison && options.comparison > 0) {
      return "in " + result;
    } else {
      return result + " ago";
    }
  }
  return result;
};
var formatDistance_default = formatDistance;

// node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js
function buildFormatLongFn(args) {
  return function() {
    var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    var width = options.width ? String(options.width) : args.defaultWidth;
    var format2 = args.formats[width] || args.formats[args.defaultWidth];
    return format2;
  };
}

// node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js
var dateFormats = {
  full: "EEEE, MMMM do, y",
  long: "MMMM do, y",
  medium: "MMM d, y",
  short: "MM/dd/yyyy"
};
var timeFormats = {
  full: "h:mm:ss a zzzz",
  long: "h:mm:ss a z",
  medium: "h:mm:ss a",
  short: "h:mm a"
};
var dateTimeFormats = {
  full: "{{date}} 'at' {{time}}",
  long: "{{date}} 'at' {{time}}",
  medium: "{{date}}, {{time}}",
  short: "{{date}}, {{time}}"
};
var formatLong = {
  date: buildFormatLongFn({
    formats: dateFormats,
    defaultWidth: "full"
  }),
  time: buildFormatLongFn({
    formats: timeFormats,
    defaultWidth: "full"
  }),
  dateTime: buildFormatLongFn({
    formats: dateTimeFormats,
    defaultWidth: "full"
  })
};
var formatLong_default = formatLong;

// node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js
var formatRelativeLocale = {
  lastWeek: "'last' eeee 'at' p",
  yesterday: "'yesterday at' p",
  today: "'today at' p",
  tomorrow: "'tomorrow at' p",
  nextWeek: "eeee 'at' p",
  other: "P"
};
var formatRelative = function formatRelative2(token, _date, _baseDate, _options) {
  return formatRelativeLocale[token];
};
var formatRelative_default = formatRelative;

// node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js
function buildLocalizeFn(args) {
  return function(dirtyIndex, options) {
    var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
    var valuesArray;
    if (context === "formatting" && args.formattingValues) {
      var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
      var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
      valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
    } else {
      var _defaultWidth = args.defaultWidth;
      var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
      valuesArray = args.values[_width] || args.values[_defaultWidth];
    }
    var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex;
    return valuesArray[index];
  };
}

// node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js
var eraValues = {
  narrow: ["B", "A"],
  abbreviated: ["BC", "AD"],
  wide: ["Before Christ", "Anno Domini"]
};
var quarterValues = {
  narrow: ["1", "2", "3", "4"],
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
};
var monthValues = {
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
  abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
};
var dayValues = {
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
};
var dayPeriodValues = {
  narrow: {
    am: "a",
    pm: "p",
    midnight: "mi",
    noon: "n",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  },
  abbreviated: {
    am: "AM",
    pm: "PM",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  },
  wide: {
    am: "a.m.",
    pm: "p.m.",
    midnight: "midnight",
    noon: "noon",
    morning: "morning",
    afternoon: "afternoon",
    evening: "evening",
    night: "night"
  }
};
var formattingDayPeriodValues = {
  narrow: {
    am: "a",
    pm: "p",
    midnight: "mi",
    noon: "n",
    morning: "in the morning",
    afternoon: "in the afternoon",
    evening: "in the evening",
    night: "at night"
  },
  abbreviated: {
    am: "AM",
    pm: "PM",
    midnight: "midnight",
    noon: "noon",
    morning: "in the morning",
    afternoon: "in the afternoon",
    evening: "in the evening",
    night: "at night"
  },
  wide: {
    am: "a.m.",
    pm: "p.m.",
    midnight: "midnight",
    noon: "noon",
    morning: "in the morning",
    afternoon: "in the afternoon",
    evening: "in the evening",
    night: "at night"
  }
};
var ordinalNumber = function ordinalNumber2(dirtyNumber, _options) {
  var number = Number(dirtyNumber);
  var rem100 = number % 100;
  if (rem100 > 20 || rem100 < 10) {
    switch (rem100 % 10) {
      case 1:
        return number + "st";
      case 2:
        return number + "nd";
      case 3:
        return number + "rd";
    }
  }
  return number + "th";
};
var localize = {
  ordinalNumber,
  era: buildLocalizeFn({
    values: eraValues,
    defaultWidth: "wide"
  }),
  quarter: buildLocalizeFn({
    values: quarterValues,
    defaultWidth: "wide",
    argumentCallback: function argumentCallback(quarter) {
      return quarter - 1;
    }
  }),
  month: buildLocalizeFn({
    values: monthValues,
    defaultWidth: "wide"
  }),
  day: buildLocalizeFn({
    values: dayValues,
    defaultWidth: "wide"
  }),
  dayPeriod: buildLocalizeFn({
    values: dayPeriodValues,
    defaultWidth: "wide",
    formattingValues: formattingDayPeriodValues,
    defaultFormattingWidth: "wide"
  })
};
var localize_default = localize;

// node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js
function buildMatchFn(args) {
  return function(string) {
    var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
    var width = options.width;
    var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
    var matchResult = string.match(matchPattern);
    if (!matchResult) {
      return null;
    }
    var matchedString = matchResult[0];
    var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
    var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function(pattern) {
      return pattern.test(matchedString);
    }) : findKey(parsePatterns, function(pattern) {
      return pattern.test(matchedString);
    });
    var value;
    value = args.valueCallback ? args.valueCallback(key) : key;
    value = options.valueCallback ? options.valueCallback(value) : value;
    var rest = string.slice(matchedString.length);
    return {
      value,
      rest
    };
  };
}
function findKey(object, predicate) {
  for (var key in object) {
    if (object.hasOwnProperty(key) && predicate(object[key])) {
      return key;
    }
  }
  return void 0;
}
function findIndex(array, predicate) {
  for (var key = 0; key < array.length; key++) {
    if (predicate(array[key])) {
      return key;
    }
  }
  return void 0;
}

// node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js
function buildMatchPatternFn(args) {
  return function(string) {
    var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
    var matchResult = string.match(args.matchPattern);
    if (!matchResult) return null;
    var matchedString = matchResult[0];
    var parseResult = string.match(args.parsePattern);
    if (!parseResult) return null;
    var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
    value = options.valueCallback ? options.valueCallback(value) : value;
    var rest = string.slice(matchedString.length);
    return {
      value,
      rest
    };
  };
}

// node_modules/date-fns/esm/locale/en-US/_lib/match/index.js
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
  narrow: /^(b|a)/i,
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
  wide: /^(before christ|before common era|anno domini|common era)/i
};
var parseEraPatterns = {
  any: [/^b/i, /^(a|c)/i]
};
var matchQuarterPatterns = {
  narrow: /^[1234]/i,
  abbreviated: /^q[1234]/i,
  wide: /^[1234](th|st|nd|rd)? quarter/i
};
var parseQuarterPatterns = {
  any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
  narrow: /^[jfmasond]/i,
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
};
var parseMonthPatterns = {
  narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
  any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
};
var matchDayPatterns = {
  narrow: /^[smtwf]/i,
  short: /^(su|mo|tu|we|th|fr|sa)/i,
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
};
var parseDayPatterns = {
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
};
var matchDayPeriodPatterns = {
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
};
var parseDayPeriodPatterns = {
  any: {
    am: /^a/i,
    pm: /^p/i,
    midnight: /^mi/i,
    noon: /^no/i,
    morning: /morning/i,
    afternoon: /afternoon/i,
    evening: /evening/i,
    night: /night/i
  }
};
var match = {
  ordinalNumber: buildMatchPatternFn({
    matchPattern: matchOrdinalNumberPattern,
    parsePattern: parseOrdinalNumberPattern,
    valueCallback: function valueCallback(value) {
      return parseInt(value, 10);
    }
  }),
  era: buildMatchFn({
    matchPatterns: matchEraPatterns,
    defaultMatchWidth: "wide",
    parsePatterns: parseEraPatterns,
    defaultParseWidth: "any"
  }),
  quarter: buildMatchFn({
    matchPatterns: matchQuarterPatterns,
    defaultMatchWidth: "wide",
    parsePatterns: parseQuarterPatterns,
    defaultParseWidth: "any",
    valueCallback: function valueCallback2(index) {
      return index + 1;
    }
  }),
  month: buildMatchFn({
    matchPatterns: matchMonthPatterns,
    defaultMatchWidth: "wide",
    parsePatterns: parseMonthPatterns,
    defaultParseWidth: "any"
  }),
  day: buildMatchFn({
    matchPatterns: matchDayPatterns,
    defaultMatchWidth: "wide",
    parsePatterns: parseDayPatterns,
    defaultParseWidth: "any"
  }),
  dayPeriod: buildMatchFn({
    matchPatterns: matchDayPeriodPatterns,
    defaultMatchWidth: "any",
    parsePatterns: parseDayPeriodPatterns,
    defaultParseWidth: "any"
  })
};
var match_default = match;

// node_modules/date-fns/esm/locale/en-US/index.js
var locale = {
  code: "en-US",
  formatDistance: formatDistance_default,
  formatLong: formatLong_default,
  formatRelative: formatRelative_default,
  localize: localize_default,
  match: match_default,
  options: {
    weekStartsOn: 0,
    firstWeekContainsDate: 1
  }
};
var en_US_default = locale;

// node_modules/date-fns/esm/_lib/defaultLocale/index.js
var defaultLocale_default = en_US_default;

// node_modules/date-fns/esm/format/index.js
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
var escapedStringRegExp = /^'([^]*?)'?$/;
var doubleQuoteRegExp = /''/g;
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
function format(dirtyDate, dirtyFormatStr, options) {
  var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
  requiredArgs(2, arguments);
  var formatStr = String(dirtyFormatStr);
  var defaultOptions2 = getDefaultOptions();
  var locale2 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions2.locale) !== null && _ref !== void 0 ? _ref : defaultLocale_default;
  var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions2.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
    throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
  }
  var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions2.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions2.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
    throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
  }
  if (!locale2.localize) {
    throw new RangeError("locale must contain localize property");
  }
  if (!locale2.formatLong) {
    throw new RangeError("locale must contain formatLong property");
  }
  var originalDate = toDate(dirtyDate);
  if (!isValid(originalDate)) {
    throw new RangeError("Invalid time value");
  }
  var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
  var utcDate = subMilliseconds(originalDate, timezoneOffset);
  var formatterOptions = {
    firstWeekContainsDate,
    weekStartsOn,
    locale: locale2,
    _originalDate: originalDate
  };
  var result = formatStr.match(longFormattingTokensRegExp).map(function(substring) {
    var firstCharacter = substring[0];
    if (firstCharacter === "p" || firstCharacter === "P") {
      var longFormatter = longFormatters_default[firstCharacter];
      return longFormatter(substring, locale2.formatLong);
    }
    return substring;
  }).join("").match(formattingTokensRegExp).map(function(substring) {
    if (substring === "''") {
      return "'";
    }
    var firstCharacter = substring[0];
    if (firstCharacter === "'") {
      return cleanEscapedString(substring);
    }
    var formatter = formatters_default[firstCharacter];
    if (formatter) {
      if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
        throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
      }
      if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
        throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
      }
      return formatter(utcDate, substring, locale2.localize, formatterOptions);
    }
    if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
      throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
    }
    return substring;
  }).join("");
  return result;
}
function cleanEscapedString(input) {
  var matched = input.match(escapedStringRegExp);
  if (!matched) {
    return input;
  }
  return matched[1].replace(doubleQuoteRegExp, "'");
}

// node_modules/date-fns/esm/_lib/assign/index.js
function assign(target, object) {
  if (target == null) {
    throw new TypeError("assign requires that input parameter not be null or undefined");
  }
  for (var property in object) {
    if (Object.prototype.hasOwnProperty.call(object, property)) {
      ;
      target[property] = object[property];
    }
  }
  return target;
}

// node_modules/date-fns/esm/formatDistanceStrict/index.js
var MILLISECONDS_IN_MINUTE = 1e3 * 60;
var MINUTES_IN_DAY = 60 * 24;
var MINUTES_IN_MONTH = MINUTES_IN_DAY * 30;
var MINUTES_IN_YEAR = MINUTES_IN_DAY * 365;

// node_modules/date-fns/esm/getDay/index.js
function getDay(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var day = date.getDay();
  return day;
}

// node_modules/date-fns/esm/getDaysInMonth/index.js
function getDaysInMonth(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var year = date.getFullYear();
  var monthIndex = date.getMonth();
  var lastDayOfMonth2 = /* @__PURE__ */ new Date(0);
  lastDayOfMonth2.setFullYear(year, monthIndex + 1, 0);
  lastDayOfMonth2.setHours(0, 0, 0, 0);
  return lastDayOfMonth2.getDate();
}

// node_modules/date-fns/esm/getHours/index.js
function getHours(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var hours = date.getHours();
  return hours;
}

// node_modules/date-fns/esm/getISOWeek/index.js
var MILLISECONDS_IN_WEEK3 = 6048e5;
function getISOWeek(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var diff = startOfISOWeek(date).getTime() - startOfISOWeekYear(date).getTime();
  return Math.round(diff / MILLISECONDS_IN_WEEK3) + 1;
}

// node_modules/date-fns/esm/getMinutes/index.js
function getMinutes(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var minutes = date.getMinutes();
  return minutes;
}

// node_modules/date-fns/esm/getMonth/index.js
function getMonth(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var month = date.getMonth();
  return month;
}

// node_modules/date-fns/esm/getOverlappingDaysInIntervals/index.js
var MILLISECONDS_IN_DAY3 = 24 * 60 * 60 * 1e3;

// node_modules/date-fns/esm/getSeconds/index.js
function getSeconds(dirtyDate) {
  requiredArgs(1, arguments);
  var date = toDate(dirtyDate);
  var seconds = date.getSeconds();
  return seconds;
}

// node_modules/date-fns/esm/getYear/index.js
function getYear(dirtyDate) {
  requiredArgs(1, arguments);
  return toDate(dirtyDate).getFullYear();
}

// node_modules/date-fns/esm/isAfter/index.js
function isAfter(dirtyDate, dirtyDateToCompare) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var dateToCompare = toDate(dirtyDateToCompare);
  return date.getTime() > dateToCompare.getTime();
}

// node_modules/date-fns/esm/isBefore/index.js
function isBefore(dirtyDate, dirtyDateToCompare) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var dateToCompare = toDate(dirtyDateToCompare);
  return date.getTime() < dateToCompare.getTime();
}

// node_modules/date-fns/esm/isEqual/index.js
function isEqual(dirtyLeftDate, dirtyRightDate) {
  requiredArgs(2, arguments);
  var dateLeft = toDate(dirtyLeftDate);
  var dateRight = toDate(dirtyRightDate);
  return dateLeft.getTime() === dateRight.getTime();
}

// node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function _arrayLikeToArray(r, a3) {
  (null == a3 || a3 > r.length) && (a3 = r.length);
  for (var e2 = 0, n = Array(a3); e2 < a3; e2++) n[e2] = r[e2];
  return n;
}

// node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
function _unsupportedIterableToArray(r, a3) {
  if (r) {
    if ("string" == typeof r) return _arrayLikeToArray(r, a3);
    var t2 = {}.toString.call(r).slice(8, -1);
    return "Object" === t2 && r.constructor && (t2 = r.constructor.name), "Map" === t2 || "Set" === t2 ? Array.from(r) : "Arguments" === t2 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t2) ? _arrayLikeToArray(r, a3) : void 0;
  }
}

// node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js
function _createForOfIteratorHelper(r, e2) {
  var t2 = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  if (!t2) {
    if (Array.isArray(r) || (t2 = _unsupportedIterableToArray(r)) || e2 && r && "number" == typeof r.length) {
      t2 && (r = t2);
      var _n2 = 0, F = function F2() {
      };
      return {
        s: F,
        n: function n() {
          return _n2 >= r.length ? {
            done: true
          } : {
            done: false,
            value: r[_n2++]
          };
        },
        e: function e3(r2) {
          throw r2;
        },
        f: F
      };
    }
    throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  }
  var o, a3 = true, u2 = false;
  return {
    s: function s3() {
      t2 = t2.call(r);
    },
    n: function n() {
      var r2 = t2.next();
      return a3 = r2.done, r2;
    },
    e: function e3(r2) {
      u2 = true, o = r2;
    },
    f: function f() {
      try {
        a3 || null == t2["return"] || t2["return"]();
      } finally {
        if (u2) throw o;
      }
    }
  };
}

// node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
function _assertThisInitialized(e2) {
  if (void 0 === e2) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return e2;
}

// node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function _setPrototypeOf(t2, e2) {
  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t3, e3) {
    return t3.__proto__ = e3, t3;
  }, _setPrototypeOf(t2, e2);
}

// node_modules/@babel/runtime/helpers/esm/inherits.js
function _inherits(t2, e2) {
  if ("function" != typeof e2 && null !== e2) throw new TypeError("Super expression must either be null or a function");
  t2.prototype = Object.create(e2 && e2.prototype, {
    constructor: {
      value: t2,
      writable: true,
      configurable: true
    }
  }), Object.defineProperty(t2, "prototype", {
    writable: false
  }), e2 && _setPrototypeOf(t2, e2);
}

// node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
function _getPrototypeOf(t2) {
  return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t3) {
    return t3.__proto__ || Object.getPrototypeOf(t3);
  }, _getPrototypeOf(t2);
}

// node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
function _isNativeReflectConstruct() {
  try {
    var t2 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
    }));
  } catch (t3) {
  }
  return (_isNativeReflectConstruct = function _isNativeReflectConstruct2() {
    return !!t2;
  })();
}

// node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
function _possibleConstructorReturn(t2, e2) {
  if (e2 && ("object" == _typeof(e2) || "function" == typeof e2)) return e2;
  if (void 0 !== e2) throw new TypeError("Derived constructors may only return object or undefined");
  return _assertThisInitialized(t2);
}

// node_modules/@babel/runtime/helpers/esm/createSuper.js
function _createSuper(t2) {
  var r = _isNativeReflectConstruct();
  return function() {
    var e2, o = _getPrototypeOf(t2);
    if (r) {
      var s3 = _getPrototypeOf(this).constructor;
      e2 = Reflect.construct(o, arguments, s3);
    } else e2 = o.apply(this, arguments);
    return _possibleConstructorReturn(this, e2);
  };
}

// node_modules/@babel/runtime/helpers/esm/classCallCheck.js
function _classCallCheck(a3, n) {
  if (!(a3 instanceof n)) throw new TypeError("Cannot call a class as a function");
}

// node_modules/@babel/runtime/helpers/esm/toPrimitive.js
function toPrimitive(t2, r) {
  if ("object" != _typeof(t2) || !t2) return t2;
  var e2 = t2[Symbol.toPrimitive];
  if (void 0 !== e2) {
    var i2 = e2.call(t2, r || "default");
    if ("object" != _typeof(i2)) return i2;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return ("string" === r ? String : Number)(t2);
}

// node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
function toPropertyKey(t2) {
  var i2 = toPrimitive(t2, "string");
  return "symbol" == _typeof(i2) ? i2 : i2 + "";
}

// node_modules/@babel/runtime/helpers/esm/createClass.js
function _defineProperties(e2, r) {
  for (var t2 = 0; t2 < r.length; t2++) {
    var o = r[t2];
    o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e2, toPropertyKey(o.key), o);
  }
}
function _createClass(e2, r, t2) {
  return r && _defineProperties(e2.prototype, r), t2 && _defineProperties(e2, t2), Object.defineProperty(e2, "prototype", {
    writable: false
  }), e2;
}

// node_modules/@babel/runtime/helpers/esm/defineProperty.js
function _defineProperty(e2, r, t2) {
  return (r = toPropertyKey(r)) in e2 ? Object.defineProperty(e2, r, {
    value: t2,
    enumerable: true,
    configurable: true,
    writable: true
  }) : e2[r] = t2, e2;
}

// node_modules/date-fns/esm/parse/_lib/Setter.js
var TIMEZONE_UNIT_PRIORITY = 10;
var Setter = (function() {
  function Setter2() {
    _classCallCheck(this, Setter2);
    _defineProperty(this, "priority", void 0);
    _defineProperty(this, "subPriority", 0);
  }
  _createClass(Setter2, [{
    key: "validate",
    value: function validate(_utcDate, _options) {
      return true;
    }
  }]);
  return Setter2;
})();
var ValueSetter = (function(_Setter) {
  _inherits(ValueSetter2, _Setter);
  var _super = _createSuper(ValueSetter2);
  function ValueSetter2(value, validateValue, setValue, priority, subPriority) {
    var _this;
    _classCallCheck(this, ValueSetter2);
    _this = _super.call(this);
    _this.value = value;
    _this.validateValue = validateValue;
    _this.setValue = setValue;
    _this.priority = priority;
    if (subPriority) {
      _this.subPriority = subPriority;
    }
    return _this;
  }
  _createClass(ValueSetter2, [{
    key: "validate",
    value: function validate(utcDate, options) {
      return this.validateValue(utcDate, this.value, options);
    }
  }, {
    key: "set",
    value: function set2(utcDate, flags, options) {
      return this.setValue(utcDate, flags, this.value, options);
    }
  }]);
  return ValueSetter2;
})(Setter);
var DateToSystemTimezoneSetter = (function(_Setter2) {
  _inherits(DateToSystemTimezoneSetter2, _Setter2);
  var _super2 = _createSuper(DateToSystemTimezoneSetter2);
  function DateToSystemTimezoneSetter2() {
    var _this2;
    _classCallCheck(this, DateToSystemTimezoneSetter2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this2 = _super2.call.apply(_super2, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this2), "priority", TIMEZONE_UNIT_PRIORITY);
    _defineProperty(_assertThisInitialized(_this2), "subPriority", -1);
    return _this2;
  }
  _createClass(DateToSystemTimezoneSetter2, [{
    key: "set",
    value: function set2(date, flags) {
      if (flags.timestampIsSet) {
        return date;
      }
      var convertedDate = /* @__PURE__ */ new Date(0);
      convertedDate.setFullYear(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
      convertedDate.setHours(date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());
      return convertedDate;
    }
  }]);
  return DateToSystemTimezoneSetter2;
})(Setter);

// node_modules/date-fns/esm/parse/_lib/Parser.js
var Parser = (function() {
  function Parser2() {
    _classCallCheck(this, Parser2);
    _defineProperty(this, "incompatibleTokens", void 0);
    _defineProperty(this, "priority", void 0);
    _defineProperty(this, "subPriority", void 0);
  }
  _createClass(Parser2, [{
    key: "run",
    value: function run(dateString, token, match2, options) {
      var result = this.parse(dateString, token, match2, options);
      if (!result) {
        return null;
      }
      return {
        setter: new ValueSetter(result.value, this.validate, this.set, this.priority, this.subPriority),
        rest: result.rest
      };
    }
  }, {
    key: "validate",
    value: function validate(_utcDate, _value, _options) {
      return true;
    }
  }]);
  return Parser2;
})();

// node_modules/date-fns/esm/parse/_lib/parsers/EraParser.js
var EraParser = (function(_Parser) {
  _inherits(EraParser2, _Parser);
  var _super = _createSuper(EraParser2);
  function EraParser2() {
    var _this;
    _classCallCheck(this, EraParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 140);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["R", "u", "t", "T"]);
    return _this;
  }
  _createClass(EraParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        // AD, BC
        case "G":
        case "GG":
        case "GGG":
          return match2.era(dateString, {
            width: "abbreviated"
          }) || match2.era(dateString, {
            width: "narrow"
          });
        // A, B
        case "GGGGG":
          return match2.era(dateString, {
            width: "narrow"
          });
        // Anno Domini, Before Christ
        case "GGGG":
        default:
          return match2.era(dateString, {
            width: "wide"
          }) || match2.era(dateString, {
            width: "abbreviated"
          }) || match2.era(dateString, {
            width: "narrow"
          });
      }
    }
  }, {
    key: "set",
    value: function set2(date, flags, value) {
      flags.era = value;
      date.setUTCFullYear(value, 0, 1);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return EraParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/constants.js
var numericPatterns = {
  month: /^(1[0-2]|0?\d)/,
  // 0 to 12
  date: /^(3[0-1]|[0-2]?\d)/,
  // 0 to 31
  dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
  // 0 to 366
  week: /^(5[0-3]|[0-4]?\d)/,
  // 0 to 53
  hour23h: /^(2[0-3]|[0-1]?\d)/,
  // 0 to 23
  hour24h: /^(2[0-4]|[0-1]?\d)/,
  // 0 to 24
  hour11h: /^(1[0-1]|0?\d)/,
  // 0 to 11
  hour12h: /^(1[0-2]|0?\d)/,
  // 0 to 12
  minute: /^[0-5]?\d/,
  // 0 to 59
  second: /^[0-5]?\d/,
  // 0 to 59
  singleDigit: /^\d/,
  // 0 to 9
  twoDigits: /^\d{1,2}/,
  // 0 to 99
  threeDigits: /^\d{1,3}/,
  // 0 to 999
  fourDigits: /^\d{1,4}/,
  // 0 to 9999
  anyDigitsSigned: /^-?\d+/,
  singleDigitSigned: /^-?\d/,
  // 0 to 9, -0 to -9
  twoDigitsSigned: /^-?\d{1,2}/,
  // 0 to 99, -0 to -99
  threeDigitsSigned: /^-?\d{1,3}/,
  // 0 to 999, -0 to -999
  fourDigitsSigned: /^-?\d{1,4}/
  // 0 to 9999, -0 to -9999
};
var timezonePatterns = {
  basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
  basic: /^([+-])(\d{2})(\d{2})|Z/,
  basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
  extended: /^([+-])(\d{2}):(\d{2})|Z/,
  extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
};

// node_modules/date-fns/esm/parse/_lib/utils.js
function mapValue(parseFnResult, mapFn) {
  if (!parseFnResult) {
    return parseFnResult;
  }
  return {
    value: mapFn(parseFnResult.value),
    rest: parseFnResult.rest
  };
}
function parseNumericPattern(pattern, dateString) {
  var matchResult = dateString.match(pattern);
  if (!matchResult) {
    return null;
  }
  return {
    value: parseInt(matchResult[0], 10),
    rest: dateString.slice(matchResult[0].length)
  };
}
function parseTimezonePattern(pattern, dateString) {
  var matchResult = dateString.match(pattern);
  if (!matchResult) {
    return null;
  }
  if (matchResult[0] === "Z") {
    return {
      value: 0,
      rest: dateString.slice(1)
    };
  }
  var sign = matchResult[1] === "+" ? 1 : -1;
  var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;
  var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;
  var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;
  return {
    value: sign * (hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * millisecondsInSecond),
    rest: dateString.slice(matchResult[0].length)
  };
}
function parseAnyDigitsSigned(dateString) {
  return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);
}
function parseNDigits(n, dateString) {
  switch (n) {
    case 1:
      return parseNumericPattern(numericPatterns.singleDigit, dateString);
    case 2:
      return parseNumericPattern(numericPatterns.twoDigits, dateString);
    case 3:
      return parseNumericPattern(numericPatterns.threeDigits, dateString);
    case 4:
      return parseNumericPattern(numericPatterns.fourDigits, dateString);
    default:
      return parseNumericPattern(new RegExp("^\\d{1," + n + "}"), dateString);
  }
}
function parseNDigitsSigned(n, dateString) {
  switch (n) {
    case 1:
      return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);
    case 2:
      return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);
    case 3:
      return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);
    case 4:
      return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);
    default:
      return parseNumericPattern(new RegExp("^-?\\d{1," + n + "}"), dateString);
  }
}
function dayPeriodEnumToHours(dayPeriod) {
  switch (dayPeriod) {
    case "morning":
      return 4;
    case "evening":
      return 17;
    case "pm":
    case "noon":
    case "afternoon":
      return 12;
    case "am":
    case "midnight":
    case "night":
    default:
      return 0;
  }
}
function normalizeTwoDigitYear(twoDigitYear, currentYear) {
  var isCommonEra = currentYear > 0;
  var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;
  var result;
  if (absCurrentYear <= 50) {
    result = twoDigitYear || 100;
  } else {
    var rangeEnd = absCurrentYear + 50;
    var rangeEndCentury = Math.floor(rangeEnd / 100) * 100;
    var isPreviousCentury = twoDigitYear >= rangeEnd % 100;
    result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);
  }
  return isCommonEra ? result : 1 - result;
}
function isLeapYearIndex(year) {
  return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
}

// node_modules/date-fns/esm/parse/_lib/parsers/YearParser.js
var YearParser = (function(_Parser) {
  _inherits(YearParser2, _Parser);
  var _super = _createSuper(YearParser2);
  function YearParser2() {
    var _this;
    _classCallCheck(this, YearParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 130);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(YearParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      var valueCallback3 = function valueCallback4(year) {
        return {
          year,
          isTwoDigitYear: token === "yy"
        };
      };
      switch (token) {
        case "y":
          return mapValue(parseNDigits(4, dateString), valueCallback3);
        case "yo":
          return mapValue(match2.ordinalNumber(dateString, {
            unit: "year"
          }), valueCallback3);
        default:
          return mapValue(parseNDigits(token.length, dateString), valueCallback3);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value.isTwoDigitYear || value.year > 0;
    }
  }, {
    key: "set",
    value: function set2(date, flags, value) {
      var currentYear = date.getUTCFullYear();
      if (value.isTwoDigitYear) {
        var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);
        date.setUTCFullYear(normalizedTwoDigitYear, 0, 1);
        date.setUTCHours(0, 0, 0, 0);
        return date;
      }
      var year = !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year;
      date.setUTCFullYear(year, 0, 1);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return YearParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekYearParser.js
var LocalWeekYearParser = (function(_Parser) {
  _inherits(LocalWeekYearParser2, _Parser);
  var _super = _createSuper(LocalWeekYearParser2);
  function LocalWeekYearParser2() {
    var _this;
    _classCallCheck(this, LocalWeekYearParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 130);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["y", "R", "u", "Q", "q", "M", "L", "I", "d", "D", "i", "t", "T"]);
    return _this;
  }
  _createClass(LocalWeekYearParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      var valueCallback3 = function valueCallback4(year) {
        return {
          year,
          isTwoDigitYear: token === "YY"
        };
      };
      switch (token) {
        case "Y":
          return mapValue(parseNDigits(4, dateString), valueCallback3);
        case "Yo":
          return mapValue(match2.ordinalNumber(dateString, {
            unit: "year"
          }), valueCallback3);
        default:
          return mapValue(parseNDigits(token.length, dateString), valueCallback3);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value.isTwoDigitYear || value.year > 0;
    }
  }, {
    key: "set",
    value: function set2(date, flags, value, options) {
      var currentYear = getUTCWeekYear(date, options);
      if (value.isTwoDigitYear) {
        var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);
        date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);
        date.setUTCHours(0, 0, 0, 0);
        return startOfUTCWeek(date, options);
      }
      var year = !("era" in flags) || flags.era === 1 ? value.year : 1 - value.year;
      date.setUTCFullYear(year, 0, options.firstWeekContainsDate);
      date.setUTCHours(0, 0, 0, 0);
      return startOfUTCWeek(date, options);
    }
  }]);
  return LocalWeekYearParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekYearParser.js
var ISOWeekYearParser = (function(_Parser) {
  _inherits(ISOWeekYearParser2, _Parser);
  var _super = _createSuper(ISOWeekYearParser2);
  function ISOWeekYearParser2() {
    var _this;
    _classCallCheck(this, ISOWeekYearParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 130);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["G", "y", "Y", "u", "Q", "q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(ISOWeekYearParser2, [{
    key: "parse",
    value: function parse2(dateString, token) {
      if (token === "R") {
        return parseNDigitsSigned(4, dateString);
      }
      return parseNDigitsSigned(token.length, dateString);
    }
  }, {
    key: "set",
    value: function set2(_date, _flags, value) {
      var firstWeekOfYear = /* @__PURE__ */ new Date(0);
      firstWeekOfYear.setUTCFullYear(value, 0, 4);
      firstWeekOfYear.setUTCHours(0, 0, 0, 0);
      return startOfUTCISOWeek(firstWeekOfYear);
    }
  }]);
  return ISOWeekYearParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/ExtendedYearParser.js
var ExtendedYearParser = (function(_Parser) {
  _inherits(ExtendedYearParser2, _Parser);
  var _super = _createSuper(ExtendedYearParser2);
  function ExtendedYearParser2() {
    var _this;
    _classCallCheck(this, ExtendedYearParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 130);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(ExtendedYearParser2, [{
    key: "parse",
    value: function parse2(dateString, token) {
      if (token === "u") {
        return parseNDigitsSigned(4, dateString);
      }
      return parseNDigitsSigned(token.length, dateString);
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCFullYear(value, 0, 1);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return ExtendedYearParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/QuarterParser.js
var QuarterParser = (function(_Parser) {
  _inherits(QuarterParser2, _Parser);
  var _super = _createSuper(QuarterParser2);
  function QuarterParser2() {
    var _this;
    _classCallCheck(this, QuarterParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 120);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["Y", "R", "q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(QuarterParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        // 1, 2, 3, 4
        case "Q":
        case "QQ":
          return parseNDigits(token.length, dateString);
        // 1st, 2nd, 3rd, 4th
        case "Qo":
          return match2.ordinalNumber(dateString, {
            unit: "quarter"
          });
        // Q1, Q2, Q3, Q4
        case "QQQ":
          return match2.quarter(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.quarter(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "QQQQQ":
          return match2.quarter(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // 1st quarter, 2nd quarter, ...
        case "QQQQ":
        default:
          return match2.quarter(dateString, {
            width: "wide",
            context: "formatting"
          }) || match2.quarter(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.quarter(dateString, {
            width: "narrow",
            context: "formatting"
          });
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 1 && value <= 4;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCMonth((value - 1) * 3, 1);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return QuarterParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/StandAloneQuarterParser.js
var StandAloneQuarterParser = (function(_Parser) {
  _inherits(StandAloneQuarterParser2, _Parser);
  var _super = _createSuper(StandAloneQuarterParser2);
  function StandAloneQuarterParser2() {
    var _this;
    _classCallCheck(this, StandAloneQuarterParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 120);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["Y", "R", "Q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(StandAloneQuarterParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        // 1, 2, 3, 4
        case "q":
        case "qq":
          return parseNDigits(token.length, dateString);
        // 1st, 2nd, 3rd, 4th
        case "qo":
          return match2.ordinalNumber(dateString, {
            unit: "quarter"
          });
        // Q1, Q2, Q3, Q4
        case "qqq":
          return match2.quarter(dateString, {
            width: "abbreviated",
            context: "standalone"
          }) || match2.quarter(dateString, {
            width: "narrow",
            context: "standalone"
          });
        // 1, 2, 3, 4 (narrow quarter; could be not numerical)
        case "qqqqq":
          return match2.quarter(dateString, {
            width: "narrow",
            context: "standalone"
          });
        // 1st quarter, 2nd quarter, ...
        case "qqqq":
        default:
          return match2.quarter(dateString, {
            width: "wide",
            context: "standalone"
          }) || match2.quarter(dateString, {
            width: "abbreviated",
            context: "standalone"
          }) || match2.quarter(dateString, {
            width: "narrow",
            context: "standalone"
          });
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 1 && value <= 4;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCMonth((value - 1) * 3, 1);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return StandAloneQuarterParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/MonthParser.js
var MonthParser = (function(_Parser) {
  _inherits(MonthParser2, _Parser);
  var _super = _createSuper(MonthParser2);
  function MonthParser2() {
    var _this;
    _classCallCheck(this, MonthParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["Y", "R", "q", "Q", "L", "w", "I", "D", "i", "e", "c", "t", "T"]);
    _defineProperty(_assertThisInitialized(_this), "priority", 110);
    return _this;
  }
  _createClass(MonthParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      var valueCallback3 = function valueCallback4(value) {
        return value - 1;
      };
      switch (token) {
        // 1, 2, ..., 12
        case "M":
          return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback3);
        // 01, 02, ..., 12
        case "MM":
          return mapValue(parseNDigits(2, dateString), valueCallback3);
        // 1st, 2nd, ..., 12th
        case "Mo":
          return mapValue(match2.ordinalNumber(dateString, {
            unit: "month"
          }), valueCallback3);
        // Jan, Feb, ..., Dec
        case "MMM":
          return match2.month(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.month(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // J, F, ..., D
        case "MMMMM":
          return match2.month(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // January, February, ..., December
        case "MMMM":
        default:
          return match2.month(dateString, {
            width: "wide",
            context: "formatting"
          }) || match2.month(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.month(dateString, {
            width: "narrow",
            context: "formatting"
          });
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 0 && value <= 11;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCMonth(value, 1);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return MonthParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/StandAloneMonthParser.js
var StandAloneMonthParser = (function(_Parser) {
  _inherits(StandAloneMonthParser2, _Parser);
  var _super = _createSuper(StandAloneMonthParser2);
  function StandAloneMonthParser2() {
    var _this;
    _classCallCheck(this, StandAloneMonthParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 110);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "w", "I", "D", "i", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(StandAloneMonthParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      var valueCallback3 = function valueCallback4(value) {
        return value - 1;
      };
      switch (token) {
        // 1, 2, ..., 12
        case "L":
          return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback3);
        // 01, 02, ..., 12
        case "LL":
          return mapValue(parseNDigits(2, dateString), valueCallback3);
        // 1st, 2nd, ..., 12th
        case "Lo":
          return mapValue(match2.ordinalNumber(dateString, {
            unit: "month"
          }), valueCallback3);
        // Jan, Feb, ..., Dec
        case "LLL":
          return match2.month(dateString, {
            width: "abbreviated",
            context: "standalone"
          }) || match2.month(dateString, {
            width: "narrow",
            context: "standalone"
          });
        // J, F, ..., D
        case "LLLLL":
          return match2.month(dateString, {
            width: "narrow",
            context: "standalone"
          });
        // January, February, ..., December
        case "LLLL":
        default:
          return match2.month(dateString, {
            width: "wide",
            context: "standalone"
          }) || match2.month(dateString, {
            width: "abbreviated",
            context: "standalone"
          }) || match2.month(dateString, {
            width: "narrow",
            context: "standalone"
          });
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 0 && value <= 11;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCMonth(value, 1);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return StandAloneMonthParser2;
})(Parser);

// node_modules/date-fns/esm/_lib/setUTCWeek/index.js
function setUTCWeek(dirtyDate, dirtyWeek, options) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var week = toInteger(dirtyWeek);
  var diff = getUTCWeek(date, options) - week;
  date.setUTCDate(date.getUTCDate() - diff * 7);
  return date;
}

// node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekParser.js
var LocalWeekParser = (function(_Parser) {
  _inherits(LocalWeekParser2, _Parser);
  var _super = _createSuper(LocalWeekParser2);
  function LocalWeekParser2() {
    var _this;
    _classCallCheck(this, LocalWeekParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 100);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "i", "t", "T"]);
    return _this;
  }
  _createClass(LocalWeekParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "w":
          return parseNumericPattern(numericPatterns.week, dateString);
        case "wo":
          return match2.ordinalNumber(dateString, {
            unit: "week"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 1 && value <= 53;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value, options) {
      return startOfUTCWeek(setUTCWeek(date, value, options), options);
    }
  }]);
  return LocalWeekParser2;
})(Parser);

// node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js
function setUTCISOWeek(dirtyDate, dirtyISOWeek) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var isoWeek = toInteger(dirtyISOWeek);
  var diff = getUTCISOWeek(date) - isoWeek;
  date.setUTCDate(date.getUTCDate() - diff * 7);
  return date;
}

// node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekParser.js
var ISOWeekParser = (function(_Parser) {
  _inherits(ISOWeekParser2, _Parser);
  var _super = _createSuper(ISOWeekParser2);
  function ISOWeekParser2() {
    var _this;
    _classCallCheck(this, ISOWeekParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 100);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(ISOWeekParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "I":
          return parseNumericPattern(numericPatterns.week, dateString);
        case "Io":
          return match2.ordinalNumber(dateString, {
            unit: "week"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 1 && value <= 53;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      return startOfUTCISOWeek(setUTCISOWeek(date, value));
    }
  }]);
  return ISOWeekParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/DateParser.js
var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var DateParser = (function(_Parser) {
  _inherits(DateParser2, _Parser);
  var _super = _createSuper(DateParser2);
  function DateParser2() {
    var _this;
    _classCallCheck(this, DateParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 90);
    _defineProperty(_assertThisInitialized(_this), "subPriority", 1);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["Y", "R", "q", "Q", "w", "I", "D", "i", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(DateParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "d":
          return parseNumericPattern(numericPatterns.date, dateString);
        case "do":
          return match2.ordinalNumber(dateString, {
            unit: "date"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(date, value) {
      var year = date.getUTCFullYear();
      var isLeapYear2 = isLeapYearIndex(year);
      var month = date.getUTCMonth();
      if (isLeapYear2) {
        return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];
      } else {
        return value >= 1 && value <= DAYS_IN_MONTH[month];
      }
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCDate(value);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return DateParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/DayOfYearParser.js
var DayOfYearParser = (function(_Parser) {
  _inherits(DayOfYearParser2, _Parser);
  var _super = _createSuper(DayOfYearParser2);
  function DayOfYearParser2() {
    var _this;
    _classCallCheck(this, DayOfYearParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 90);
    _defineProperty(_assertThisInitialized(_this), "subpriority", 1);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "L", "w", "I", "d", "E", "i", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(DayOfYearParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "D":
        case "DD":
          return parseNumericPattern(numericPatterns.dayOfYear, dateString);
        case "Do":
          return match2.ordinalNumber(dateString, {
            unit: "date"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(date, value) {
      var year = date.getUTCFullYear();
      var isLeapYear2 = isLeapYearIndex(year);
      if (isLeapYear2) {
        return value >= 1 && value <= 366;
      } else {
        return value >= 1 && value <= 365;
      }
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCMonth(0, value);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return DayOfYearParser2;
})(Parser);

// node_modules/date-fns/esm/_lib/setUTCDay/index.js
function setUTCDay(dirtyDate, dirtyDay, options) {
  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
  requiredArgs(2, arguments);
  var defaultOptions2 = getDefaultOptions();
  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions2.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
    throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
  }
  var date = toDate(dirtyDate);
  var day = toInteger(dirtyDay);
  var currentDay = date.getUTCDay();
  var remainder = day % 7;
  var dayIndex = (remainder + 7) % 7;
  var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;
  date.setUTCDate(date.getUTCDate() + diff);
  return date;
}

// node_modules/date-fns/esm/parse/_lib/parsers/DayParser.js
var DayParser = (function(_Parser) {
  _inherits(DayParser2, _Parser);
  var _super = _createSuper(DayParser2);
  function DayParser2() {
    var _this;
    _classCallCheck(this, DayParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 90);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(DayParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        // Tue
        case "E":
        case "EE":
        case "EEE":
          return match2.day(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "short",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // T
        case "EEEEE":
          return match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "EEEEEE":
          return match2.day(dateString, {
            width: "short",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // Tuesday
        case "EEEE":
        default:
          return match2.day(dateString, {
            width: "wide",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "short",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          });
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 0 && value <= 6;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value, options) {
      date = setUTCDay(date, value, options);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return DayParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/LocalDayParser.js
var LocalDayParser = (function(_Parser) {
  _inherits(LocalDayParser2, _Parser);
  var _super = _createSuper(LocalDayParser2);
  function LocalDayParser2() {
    var _this;
    _classCallCheck(this, LocalDayParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 90);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "c", "t", "T"]);
    return _this;
  }
  _createClass(LocalDayParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2, options) {
      var valueCallback3 = function valueCallback4(value) {
        var wholeWeekDays = Math.floor((value - 1) / 7) * 7;
        return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;
      };
      switch (token) {
        // 3
        case "e":
        case "ee":
          return mapValue(parseNDigits(token.length, dateString), valueCallback3);
        // 3rd
        case "eo":
          return mapValue(match2.ordinalNumber(dateString, {
            unit: "day"
          }), valueCallback3);
        // Tue
        case "eee":
          return match2.day(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "short",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // T
        case "eeeee":
          return match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // Tu
        case "eeeeee":
          return match2.day(dateString, {
            width: "short",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          });
        // Tuesday
        case "eeee":
        default:
          return match2.day(dateString, {
            width: "wide",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "short",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          });
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 0 && value <= 6;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value, options) {
      date = setUTCDay(date, value, options);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return LocalDayParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/StandAloneLocalDayParser.js
var StandAloneLocalDayParser = (function(_Parser) {
  _inherits(StandAloneLocalDayParser2, _Parser);
  var _super = _createSuper(StandAloneLocalDayParser2);
  function StandAloneLocalDayParser2() {
    var _this;
    _classCallCheck(this, StandAloneLocalDayParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 90);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "e", "t", "T"]);
    return _this;
  }
  _createClass(StandAloneLocalDayParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2, options) {
      var valueCallback3 = function valueCallback4(value) {
        var wholeWeekDays = Math.floor((value - 1) / 7) * 7;
        return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;
      };
      switch (token) {
        // 3
        case "c":
        case "cc":
          return mapValue(parseNDigits(token.length, dateString), valueCallback3);
        // 3rd
        case "co":
          return mapValue(match2.ordinalNumber(dateString, {
            unit: "day"
          }), valueCallback3);
        // Tue
        case "ccc":
          return match2.day(dateString, {
            width: "abbreviated",
            context: "standalone"
          }) || match2.day(dateString, {
            width: "short",
            context: "standalone"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "standalone"
          });
        // T
        case "ccccc":
          return match2.day(dateString, {
            width: "narrow",
            context: "standalone"
          });
        // Tu
        case "cccccc":
          return match2.day(dateString, {
            width: "short",
            context: "standalone"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "standalone"
          });
        // Tuesday
        case "cccc":
        default:
          return match2.day(dateString, {
            width: "wide",
            context: "standalone"
          }) || match2.day(dateString, {
            width: "abbreviated",
            context: "standalone"
          }) || match2.day(dateString, {
            width: "short",
            context: "standalone"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "standalone"
          });
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 0 && value <= 6;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value, options) {
      date = setUTCDay(date, value, options);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return StandAloneLocalDayParser2;
})(Parser);

// node_modules/date-fns/esm/_lib/setUTCISODay/index.js
function setUTCISODay(dirtyDate, dirtyDay) {
  requiredArgs(2, arguments);
  var day = toInteger(dirtyDay);
  if (day % 7 === 0) {
    day = day - 7;
  }
  var weekStartsOn = 1;
  var date = toDate(dirtyDate);
  var currentDay = date.getUTCDay();
  var remainder = day % 7;
  var dayIndex = (remainder + 7) % 7;
  var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;
  date.setUTCDate(date.getUTCDate() + diff);
  return date;
}

// node_modules/date-fns/esm/parse/_lib/parsers/ISODayParser.js
var ISODayParser = (function(_Parser) {
  _inherits(ISODayParser2, _Parser);
  var _super = _createSuper(ISODayParser2);
  function ISODayParser2() {
    var _this;
    _classCallCheck(this, ISODayParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 90);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "E", "e", "c", "t", "T"]);
    return _this;
  }
  _createClass(ISODayParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      var valueCallback3 = function valueCallback4(value) {
        if (value === 0) {
          return 7;
        }
        return value;
      };
      switch (token) {
        // 2
        case "i":
        case "ii":
          return parseNDigits(token.length, dateString);
        // 2nd
        case "io":
          return match2.ordinalNumber(dateString, {
            unit: "day"
          });
        // Tue
        case "iii":
          return mapValue(match2.day(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "short",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          }), valueCallback3);
        // T
        case "iiiii":
          return mapValue(match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          }), valueCallback3);
        // Tu
        case "iiiiii":
          return mapValue(match2.day(dateString, {
            width: "short",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          }), valueCallback3);
        // Tuesday
        case "iiii":
        default:
          return mapValue(match2.day(dateString, {
            width: "wide",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "short",
            context: "formatting"
          }) || match2.day(dateString, {
            width: "narrow",
            context: "formatting"
          }), valueCallback3);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 1 && value <= 7;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date = setUTCISODay(date, value);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
  }]);
  return ISODayParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/AMPMParser.js
var AMPMParser = (function(_Parser) {
  _inherits(AMPMParser2, _Parser);
  var _super = _createSuper(AMPMParser2);
  function AMPMParser2() {
    var _this;
    _classCallCheck(this, AMPMParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 80);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
    return _this;
  }
  _createClass(AMPMParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "a":
        case "aa":
        case "aaa":
          return match2.dayPeriod(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.dayPeriod(dateString, {
            width: "narrow",
            context: "formatting"
          });
        case "aaaaa":
          return match2.dayPeriod(dateString, {
            width: "narrow",
            context: "formatting"
          });
        case "aaaa":
        default:
          return match2.dayPeriod(dateString, {
            width: "wide",
            context: "formatting"
          }) || match2.dayPeriod(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.dayPeriod(dateString, {
            width: "narrow",
            context: "formatting"
          });
      }
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);
      return date;
    }
  }]);
  return AMPMParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/AMPMMidnightParser.js
var AMPMMidnightParser = (function(_Parser) {
  _inherits(AMPMMidnightParser2, _Parser);
  var _super = _createSuper(AMPMMidnightParser2);
  function AMPMMidnightParser2() {
    var _this;
    _classCallCheck(this, AMPMMidnightParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 80);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
    return _this;
  }
  _createClass(AMPMMidnightParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "b":
        case "bb":
        case "bbb":
          return match2.dayPeriod(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.dayPeriod(dateString, {
            width: "narrow",
            context: "formatting"
          });
        case "bbbbb":
          return match2.dayPeriod(dateString, {
            width: "narrow",
            context: "formatting"
          });
        case "bbbb":
        default:
          return match2.dayPeriod(dateString, {
            width: "wide",
            context: "formatting"
          }) || match2.dayPeriod(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.dayPeriod(dateString, {
            width: "narrow",
            context: "formatting"
          });
      }
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);
      return date;
    }
  }]);
  return AMPMMidnightParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/DayPeriodParser.js
var DayPeriodParser = (function(_Parser) {
  _inherits(DayPeriodParser2, _Parser);
  var _super = _createSuper(DayPeriodParser2);
  function DayPeriodParser2() {
    var _this;
    _classCallCheck(this, DayPeriodParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 80);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["a", "b", "t", "T"]);
    return _this;
  }
  _createClass(DayPeriodParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "B":
        case "BB":
        case "BBB":
          return match2.dayPeriod(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.dayPeriod(dateString, {
            width: "narrow",
            context: "formatting"
          });
        case "BBBBB":
          return match2.dayPeriod(dateString, {
            width: "narrow",
            context: "formatting"
          });
        case "BBBB":
        default:
          return match2.dayPeriod(dateString, {
            width: "wide",
            context: "formatting"
          }) || match2.dayPeriod(dateString, {
            width: "abbreviated",
            context: "formatting"
          }) || match2.dayPeriod(dateString, {
            width: "narrow",
            context: "formatting"
          });
      }
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);
      return date;
    }
  }]);
  return DayPeriodParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/Hour1to12Parser.js
var Hour1to12Parser = (function(_Parser) {
  _inherits(Hour1to12Parser2, _Parser);
  var _super = _createSuper(Hour1to12Parser2);
  function Hour1to12Parser2() {
    var _this;
    _classCallCheck(this, Hour1to12Parser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 70);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["H", "K", "k", "t", "T"]);
    return _this;
  }
  _createClass(Hour1to12Parser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "h":
          return parseNumericPattern(numericPatterns.hour12h, dateString);
        case "ho":
          return match2.ordinalNumber(dateString, {
            unit: "hour"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 1 && value <= 12;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      var isPM = date.getUTCHours() >= 12;
      if (isPM && value < 12) {
        date.setUTCHours(value + 12, 0, 0, 0);
      } else if (!isPM && value === 12) {
        date.setUTCHours(0, 0, 0, 0);
      } else {
        date.setUTCHours(value, 0, 0, 0);
      }
      return date;
    }
  }]);
  return Hour1to12Parser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/Hour0to23Parser.js
var Hour0to23Parser = (function(_Parser) {
  _inherits(Hour0to23Parser2, _Parser);
  var _super = _createSuper(Hour0to23Parser2);
  function Hour0to23Parser2() {
    var _this;
    _classCallCheck(this, Hour0to23Parser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 70);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
    return _this;
  }
  _createClass(Hour0to23Parser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "H":
          return parseNumericPattern(numericPatterns.hour23h, dateString);
        case "Ho":
          return match2.ordinalNumber(dateString, {
            unit: "hour"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 0 && value <= 23;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCHours(value, 0, 0, 0);
      return date;
    }
  }]);
  return Hour0to23Parser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/Hour0To11Parser.js
var Hour0To11Parser = (function(_Parser) {
  _inherits(Hour0To11Parser2, _Parser);
  var _super = _createSuper(Hour0To11Parser2);
  function Hour0To11Parser2() {
    var _this;
    _classCallCheck(this, Hour0To11Parser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 70);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["h", "H", "k", "t", "T"]);
    return _this;
  }
  _createClass(Hour0To11Parser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "K":
          return parseNumericPattern(numericPatterns.hour11h, dateString);
        case "Ko":
          return match2.ordinalNumber(dateString, {
            unit: "hour"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 0 && value <= 11;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      var isPM = date.getUTCHours() >= 12;
      if (isPM && value < 12) {
        date.setUTCHours(value + 12, 0, 0, 0);
      } else {
        date.setUTCHours(value, 0, 0, 0);
      }
      return date;
    }
  }]);
  return Hour0To11Parser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/Hour1To24Parser.js
var Hour1To24Parser = (function(_Parser) {
  _inherits(Hour1To24Parser2, _Parser);
  var _super = _createSuper(Hour1To24Parser2);
  function Hour1To24Parser2() {
    var _this;
    _classCallCheck(this, Hour1To24Parser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 70);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
    return _this;
  }
  _createClass(Hour1To24Parser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "k":
          return parseNumericPattern(numericPatterns.hour24h, dateString);
        case "ko":
          return match2.ordinalNumber(dateString, {
            unit: "hour"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 1 && value <= 24;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      var hours = value <= 24 ? value % 24 : value;
      date.setUTCHours(hours, 0, 0, 0);
      return date;
    }
  }]);
  return Hour1To24Parser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/MinuteParser.js
var MinuteParser = (function(_Parser) {
  _inherits(MinuteParser2, _Parser);
  var _super = _createSuper(MinuteParser2);
  function MinuteParser2() {
    var _this;
    _classCallCheck(this, MinuteParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 60);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["t", "T"]);
    return _this;
  }
  _createClass(MinuteParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "m":
          return parseNumericPattern(numericPatterns.minute, dateString);
        case "mo":
          return match2.ordinalNumber(dateString, {
            unit: "minute"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 0 && value <= 59;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCMinutes(value, 0, 0);
      return date;
    }
  }]);
  return MinuteParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/SecondParser.js
var SecondParser = (function(_Parser) {
  _inherits(SecondParser2, _Parser);
  var _super = _createSuper(SecondParser2);
  function SecondParser2() {
    var _this;
    _classCallCheck(this, SecondParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 50);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["t", "T"]);
    return _this;
  }
  _createClass(SecondParser2, [{
    key: "parse",
    value: function parse2(dateString, token, match2) {
      switch (token) {
        case "s":
          return parseNumericPattern(numericPatterns.second, dateString);
        case "so":
          return match2.ordinalNumber(dateString, {
            unit: "second"
          });
        default:
          return parseNDigits(token.length, dateString);
      }
    }
  }, {
    key: "validate",
    value: function validate(_date, value) {
      return value >= 0 && value <= 59;
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCSeconds(value, 0);
      return date;
    }
  }]);
  return SecondParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/FractionOfSecondParser.js
var FractionOfSecondParser = (function(_Parser) {
  _inherits(FractionOfSecondParser2, _Parser);
  var _super = _createSuper(FractionOfSecondParser2);
  function FractionOfSecondParser2() {
    var _this;
    _classCallCheck(this, FractionOfSecondParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 30);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["t", "T"]);
    return _this;
  }
  _createClass(FractionOfSecondParser2, [{
    key: "parse",
    value: function parse2(dateString, token) {
      var valueCallback3 = function valueCallback4(value) {
        return Math.floor(value * Math.pow(10, -token.length + 3));
      };
      return mapValue(parseNDigits(token.length, dateString), valueCallback3);
    }
  }, {
    key: "set",
    value: function set2(date, _flags, value) {
      date.setUTCMilliseconds(value);
      return date;
    }
  }]);
  return FractionOfSecondParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneWithZParser.js
var ISOTimezoneWithZParser = (function(_Parser) {
  _inherits(ISOTimezoneWithZParser2, _Parser);
  var _super = _createSuper(ISOTimezoneWithZParser2);
  function ISOTimezoneWithZParser2() {
    var _this;
    _classCallCheck(this, ISOTimezoneWithZParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 10);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["t", "T", "x"]);
    return _this;
  }
  _createClass(ISOTimezoneWithZParser2, [{
    key: "parse",
    value: function parse2(dateString, token) {
      switch (token) {
        case "X":
          return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);
        case "XX":
          return parseTimezonePattern(timezonePatterns.basic, dateString);
        case "XXXX":
          return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);
        case "XXXXX":
          return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);
        case "XXX":
        default:
          return parseTimezonePattern(timezonePatterns.extended, dateString);
      }
    }
  }, {
    key: "set",
    value: function set2(date, flags, value) {
      if (flags.timestampIsSet) {
        return date;
      }
      return new Date(date.getTime() - value);
    }
  }]);
  return ISOTimezoneWithZParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneParser.js
var ISOTimezoneParser = (function(_Parser) {
  _inherits(ISOTimezoneParser2, _Parser);
  var _super = _createSuper(ISOTimezoneParser2);
  function ISOTimezoneParser2() {
    var _this;
    _classCallCheck(this, ISOTimezoneParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 10);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", ["t", "T", "X"]);
    return _this;
  }
  _createClass(ISOTimezoneParser2, [{
    key: "parse",
    value: function parse2(dateString, token) {
      switch (token) {
        case "x":
          return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);
        case "xx":
          return parseTimezonePattern(timezonePatterns.basic, dateString);
        case "xxxx":
          return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);
        case "xxxxx":
          return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);
        case "xxx":
        default:
          return parseTimezonePattern(timezonePatterns.extended, dateString);
      }
    }
  }, {
    key: "set",
    value: function set2(date, flags, value) {
      if (flags.timestampIsSet) {
        return date;
      }
      return new Date(date.getTime() - value);
    }
  }]);
  return ISOTimezoneParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/TimestampSecondsParser.js
var TimestampSecondsParser = (function(_Parser) {
  _inherits(TimestampSecondsParser2, _Parser);
  var _super = _createSuper(TimestampSecondsParser2);
  function TimestampSecondsParser2() {
    var _this;
    _classCallCheck(this, TimestampSecondsParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 40);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", "*");
    return _this;
  }
  _createClass(TimestampSecondsParser2, [{
    key: "parse",
    value: function parse2(dateString) {
      return parseAnyDigitsSigned(dateString);
    }
  }, {
    key: "set",
    value: function set2(_date, _flags, value) {
      return [new Date(value * 1e3), {
        timestampIsSet: true
      }];
    }
  }]);
  return TimestampSecondsParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/TimestampMillisecondsParser.js
var TimestampMillisecondsParser = (function(_Parser) {
  _inherits(TimestampMillisecondsParser2, _Parser);
  var _super = _createSuper(TimestampMillisecondsParser2);
  function TimestampMillisecondsParser2() {
    var _this;
    _classCallCheck(this, TimestampMillisecondsParser2);
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _super.call.apply(_super, [this].concat(args));
    _defineProperty(_assertThisInitialized(_this), "priority", 20);
    _defineProperty(_assertThisInitialized(_this), "incompatibleTokens", "*");
    return _this;
  }
  _createClass(TimestampMillisecondsParser2, [{
    key: "parse",
    value: function parse2(dateString) {
      return parseAnyDigitsSigned(dateString);
    }
  }, {
    key: "set",
    value: function set2(_date, _flags, value) {
      return [new Date(value), {
        timestampIsSet: true
      }];
    }
  }]);
  return TimestampMillisecondsParser2;
})(Parser);

// node_modules/date-fns/esm/parse/_lib/parsers/index.js
var parsers = {
  G: new EraParser(),
  y: new YearParser(),
  Y: new LocalWeekYearParser(),
  R: new ISOWeekYearParser(),
  u: new ExtendedYearParser(),
  Q: new QuarterParser(),
  q: new StandAloneQuarterParser(),
  M: new MonthParser(),
  L: new StandAloneMonthParser(),
  w: new LocalWeekParser(),
  I: new ISOWeekParser(),
  d: new DateParser(),
  D: new DayOfYearParser(),
  E: new DayParser(),
  e: new LocalDayParser(),
  c: new StandAloneLocalDayParser(),
  i: new ISODayParser(),
  a: new AMPMParser(),
  b: new AMPMMidnightParser(),
  B: new DayPeriodParser(),
  h: new Hour1to12Parser(),
  H: new Hour0to23Parser(),
  K: new Hour0To11Parser(),
  k: new Hour1To24Parser(),
  m: new MinuteParser(),
  s: new SecondParser(),
  S: new FractionOfSecondParser(),
  X: new ISOTimezoneWithZParser(),
  x: new ISOTimezoneParser(),
  t: new TimestampSecondsParser(),
  T: new TimestampMillisecondsParser()
};

// node_modules/date-fns/esm/parse/index.js
var formattingTokensRegExp2 = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
var longFormattingTokensRegExp2 = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
var escapedStringRegExp2 = /^'([^]*?)'?$/;
var doubleQuoteRegExp2 = /''/g;
var notWhitespaceRegExp = /\S/;
var unescapedLatinCharacterRegExp2 = /[a-zA-Z]/;
function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, options) {
  var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
  requiredArgs(3, arguments);
  var dateString = String(dirtyDateString);
  var formatString = String(dirtyFormatString);
  var defaultOptions2 = getDefaultOptions();
  var locale2 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions2.locale) !== null && _ref !== void 0 ? _ref : defaultLocale_default;
  if (!locale2.match) {
    throw new RangeError("locale must contain match property");
  }
  var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions2.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions2.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
    throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
  }
  var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions2.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions2.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
    throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
  }
  if (formatString === "") {
    if (dateString === "") {
      return toDate(dirtyReferenceDate);
    } else {
      return /* @__PURE__ */ new Date(NaN);
    }
  }
  var subFnOptions = {
    firstWeekContainsDate,
    weekStartsOn,
    locale: locale2
  };
  var setters = [new DateToSystemTimezoneSetter()];
  var tokens = formatString.match(longFormattingTokensRegExp2).map(function(substring) {
    var firstCharacter = substring[0];
    if (firstCharacter in longFormatters_default) {
      var longFormatter = longFormatters_default[firstCharacter];
      return longFormatter(substring, locale2.formatLong);
    }
    return substring;
  }).join("").match(formattingTokensRegExp2);
  var usedTokens = [];
  var _iterator = _createForOfIteratorHelper(tokens), _step;
  try {
    var _loop = function _loop2() {
      var token = _step.value;
      if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token)) {
        throwProtectedError(token, formatString, dirtyDateString);
      }
      if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {
        throwProtectedError(token, formatString, dirtyDateString);
      }
      var firstCharacter = token[0];
      var parser = parsers[firstCharacter];
      if (parser) {
        var incompatibleTokens = parser.incompatibleTokens;
        if (Array.isArray(incompatibleTokens)) {
          var incompatibleToken = usedTokens.find(function(usedToken) {
            return incompatibleTokens.includes(usedToken.token) || usedToken.token === firstCharacter;
          });
          if (incompatibleToken) {
            throw new RangeError("The format string mustn't contain `".concat(incompatibleToken.fullToken, "` and `").concat(token, "` at the same time"));
          }
        } else if (parser.incompatibleTokens === "*" && usedTokens.length > 0) {
          throw new RangeError("The format string mustn't contain `".concat(token, "` and any other token at the same time"));
        }
        usedTokens.push({
          token: firstCharacter,
          fullToken: token
        });
        var parseResult = parser.run(dateString, token, locale2.match, subFnOptions);
        if (!parseResult) {
          return {
            v: /* @__PURE__ */ new Date(NaN)
          };
        }
        setters.push(parseResult.setter);
        dateString = parseResult.rest;
      } else {
        if (firstCharacter.match(unescapedLatinCharacterRegExp2)) {
          throw new RangeError("Format string contains an unescaped latin alphabet character `" + firstCharacter + "`");
        }
        if (token === "''") {
          token = "'";
        } else if (firstCharacter === "'") {
          token = cleanEscapedString2(token);
        }
        if (dateString.indexOf(token) === 0) {
          dateString = dateString.slice(token.length);
        } else {
          return {
            v: /* @__PURE__ */ new Date(NaN)
          };
        }
      }
    };
    for (_iterator.s(); !(_step = _iterator.n()).done; ) {
      var _ret = _loop();
      if (_typeof(_ret) === "object") return _ret.v;
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }
  if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) {
    return /* @__PURE__ */ new Date(NaN);
  }
  var uniquePrioritySetters = setters.map(function(setter2) {
    return setter2.priority;
  }).sort(function(a3, b2) {
    return b2 - a3;
  }).filter(function(priority, index, array) {
    return array.indexOf(priority) === index;
  }).map(function(priority) {
    return setters.filter(function(setter2) {
      return setter2.priority === priority;
    }).sort(function(a3, b2) {
      return b2.subPriority - a3.subPriority;
    });
  }).map(function(setterArray) {
    return setterArray[0];
  });
  var date = toDate(dirtyReferenceDate);
  if (isNaN(date.getTime())) {
    return /* @__PURE__ */ new Date(NaN);
  }
  var utcDate = subMilliseconds(date, getTimezoneOffsetInMilliseconds(date));
  var flags = {};
  var _iterator2 = _createForOfIteratorHelper(uniquePrioritySetters), _step2;
  try {
    for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) {
      var setter = _step2.value;
      if (!setter.validate(utcDate, subFnOptions)) {
        return /* @__PURE__ */ new Date(NaN);
      }
      var result = setter.set(utcDate, flags, subFnOptions);
      if (Array.isArray(result)) {
        utcDate = result[0];
        assign(flags, result[1]);
      } else {
        utcDate = result;
      }
    }
  } catch (err) {
    _iterator2.e(err);
  } finally {
    _iterator2.f();
  }
  return utcDate;
}
function cleanEscapedString2(input) {
  return input.match(escapedStringRegExp2)[1].replace(doubleQuoteRegExp2, "'");
}

// node_modules/date-fns/esm/subDays/index.js
function subDays(dirtyDate, dirtyAmount) {
  requiredArgs(2, arguments);
  var amount = toInteger(dirtyAmount);
  return addDays(dirtyDate, -amount);
}

// node_modules/date-fns/esm/parseISO/index.js
function parseISO(argument, options) {
  var _options$additionalDi;
  requiredArgs(1, arguments);
  var additionalDigits = toInteger((_options$additionalDi = options === null || options === void 0 ? void 0 : options.additionalDigits) !== null && _options$additionalDi !== void 0 ? _options$additionalDi : 2);
  if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {
    throw new RangeError("additionalDigits must be 0, 1 or 2");
  }
  if (!(typeof argument === "string" || Object.prototype.toString.call(argument) === "[object String]")) {
    return /* @__PURE__ */ new Date(NaN);
  }
  var dateStrings = splitDateString(argument);
  var date;
  if (dateStrings.date) {
    var parseYearResult = parseYear(dateStrings.date, additionalDigits);
    date = parseDate(parseYearResult.restDateString, parseYearResult.year);
  }
  if (!date || isNaN(date.getTime())) {
    return /* @__PURE__ */ new Date(NaN);
  }
  var timestamp = date.getTime();
  var time = 0;
  var offset;
  if (dateStrings.time) {
    time = parseTime(dateStrings.time);
    if (isNaN(time)) {
      return /* @__PURE__ */ new Date(NaN);
    }
  }
  if (dateStrings.timezone) {
    offset = parseTimezone(dateStrings.timezone);
    if (isNaN(offset)) {
      return /* @__PURE__ */ new Date(NaN);
    }
  } else {
    var dirtyDate = new Date(timestamp + time);
    var result = /* @__PURE__ */ new Date(0);
    result.setFullYear(dirtyDate.getUTCFullYear(), dirtyDate.getUTCMonth(), dirtyDate.getUTCDate());
    result.setHours(dirtyDate.getUTCHours(), dirtyDate.getUTCMinutes(), dirtyDate.getUTCSeconds(), dirtyDate.getUTCMilliseconds());
    return result;
  }
  return new Date(timestamp + time + offset);
}
var patterns = {
  dateTimeDelimiter: /[T ]/,
  timeZoneDelimiter: /[Z ]/i,
  timezone: /([Z+-].*)$/
};
var dateRegex = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/;
var timeRegex = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/;
var timezoneRegex = /^([+-])(\d{2})(?::?(\d{2}))?$/;
function splitDateString(dateString) {
  var dateStrings = {};
  var array = dateString.split(patterns.dateTimeDelimiter);
  var timeString;
  if (array.length > 2) {
    return dateStrings;
  }
  if (/:/.test(array[0])) {
    timeString = array[0];
  } else {
    dateStrings.date = array[0];
    timeString = array[1];
    if (patterns.timeZoneDelimiter.test(dateStrings.date)) {
      dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];
      timeString = dateString.substr(dateStrings.date.length, dateString.length);
    }
  }
  if (timeString) {
    var token = patterns.timezone.exec(timeString);
    if (token) {
      dateStrings.time = timeString.replace(token[1], "");
      dateStrings.timezone = token[1];
    } else {
      dateStrings.time = timeString;
    }
  }
  return dateStrings;
}
function parseYear(dateString, additionalDigits) {
  var regex = new RegExp("^(?:(\\d{4}|[+-]\\d{" + (4 + additionalDigits) + "})|(\\d{2}|[+-]\\d{" + (2 + additionalDigits) + "})$)");
  var captures = dateString.match(regex);
  if (!captures) return {
    year: NaN,
    restDateString: ""
  };
  var year = captures[1] ? parseInt(captures[1]) : null;
  var century = captures[2] ? parseInt(captures[2]) : null;
  return {
    year: century === null ? year : century * 100,
    restDateString: dateString.slice((captures[1] || captures[2]).length)
  };
}
function parseDate(dateString, year) {
  if (year === null) return /* @__PURE__ */ new Date(NaN);
  var captures = dateString.match(dateRegex);
  if (!captures) return /* @__PURE__ */ new Date(NaN);
  var isWeekDate = !!captures[4];
  var dayOfYear = parseDateUnit(captures[1]);
  var month = parseDateUnit(captures[2]) - 1;
  var day = parseDateUnit(captures[3]);
  var week = parseDateUnit(captures[4]);
  var dayOfWeek = parseDateUnit(captures[5]) - 1;
  if (isWeekDate) {
    if (!validateWeekDate(year, week, dayOfWeek)) {
      return /* @__PURE__ */ new Date(NaN);
    }
    return dayOfISOWeekYear(year, week, dayOfWeek);
  } else {
    var date = /* @__PURE__ */ new Date(0);
    if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) {
      return /* @__PURE__ */ new Date(NaN);
    }
    date.setUTCFullYear(year, month, Math.max(dayOfYear, day));
    return date;
  }
}
function parseDateUnit(value) {
  return value ? parseInt(value) : 1;
}
function parseTime(timeString) {
  var captures = timeString.match(timeRegex);
  if (!captures) return NaN;
  var hours = parseTimeUnit(captures[1]);
  var minutes = parseTimeUnit(captures[2]);
  var seconds = parseTimeUnit(captures[3]);
  if (!validateTime(hours, minutes, seconds)) {
    return NaN;
  }
  return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1e3;
}
function parseTimeUnit(value) {
  return value && parseFloat(value.replace(",", ".")) || 0;
}
function parseTimezone(timezoneString) {
  if (timezoneString === "Z") return 0;
  var captures = timezoneString.match(timezoneRegex);
  if (!captures) return 0;
  var sign = captures[1] === "+" ? -1 : 1;
  var hours = parseInt(captures[2]);
  var minutes = captures[3] && parseInt(captures[3]) || 0;
  if (!validateTimezone(hours, minutes)) {
    return NaN;
  }
  return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);
}
function dayOfISOWeekYear(isoWeekYear, week, day) {
  var date = /* @__PURE__ */ new Date(0);
  date.setUTCFullYear(isoWeekYear, 0, 4);
  var fourthOfJanuaryDay = date.getUTCDay() || 7;
  var diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;
  date.setUTCDate(date.getUTCDate() + diff);
  return date;
}
var daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function isLeapYearIndex2(year) {
  return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
}
function validateDate(year, month, date) {
  return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex2(year) ? 29 : 28));
}
function validateDayOfYearDate(year, dayOfYear) {
  return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex2(year) ? 366 : 365);
}
function validateWeekDate(_year, week, day) {
  return week >= 1 && week <= 53 && day >= 0 && day <= 6;
}
function validateTime(hours, minutes, seconds) {
  if (hours === 24) {
    return minutes === 0 && seconds === 0;
  }
  return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;
}
function validateTimezone(_hours, minutes) {
  return minutes >= 0 && minutes <= 59;
}

// node_modules/date-fns/esm/setMonth/index.js
function setMonth(dirtyDate, dirtyMonth) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var month = toInteger(dirtyMonth);
  var year = date.getFullYear();
  var day = date.getDate();
  var dateWithDesiredMonth = /* @__PURE__ */ new Date(0);
  dateWithDesiredMonth.setFullYear(year, month, 15);
  dateWithDesiredMonth.setHours(0, 0, 0, 0);
  var daysInMonth = getDaysInMonth(dateWithDesiredMonth);
  date.setMonth(month, Math.min(day, daysInMonth));
  return date;
}

// node_modules/date-fns/esm/set/index.js
function set(dirtyDate, values) {
  requiredArgs(2, arguments);
  if (_typeof(values) !== "object" || values === null) {
    throw new RangeError("values parameter must be an object");
  }
  var date = toDate(dirtyDate);
  if (isNaN(date.getTime())) {
    return /* @__PURE__ */ new Date(NaN);
  }
  if (values.year != null) {
    date.setFullYear(values.year);
  }
  if (values.month != null) {
    date = setMonth(date, values.month);
  }
  if (values.date != null) {
    date.setDate(toInteger(values.date));
  }
  if (values.hours != null) {
    date.setHours(toInteger(values.hours));
  }
  if (values.minutes != null) {
    date.setMinutes(toInteger(values.minutes));
  }
  if (values.seconds != null) {
    date.setSeconds(toInteger(values.seconds));
  }
  if (values.milliseconds != null) {
    date.setMilliseconds(toInteger(values.milliseconds));
  }
  return date;
}

// node_modules/date-fns/esm/setHours/index.js
function setHours(dirtyDate, dirtyHours) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var hours = toInteger(dirtyHours);
  date.setHours(hours);
  return date;
}

// node_modules/date-fns/esm/setMilliseconds/index.js
function setMilliseconds(dirtyDate, dirtyMilliseconds) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var milliseconds2 = toInteger(dirtyMilliseconds);
  date.setMilliseconds(milliseconds2);
  return date;
}

// node_modules/date-fns/esm/setMinutes/index.js
function setMinutes(dirtyDate, dirtyMinutes) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var minutes = toInteger(dirtyMinutes);
  date.setMinutes(minutes);
  return date;
}

// node_modules/date-fns/esm/setSeconds/index.js
function setSeconds(dirtyDate, dirtySeconds) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var seconds = toInteger(dirtySeconds);
  date.setSeconds(seconds);
  return date;
}

// node_modules/date-fns/esm/setYear/index.js
function setYear(dirtyDate, dirtyYear) {
  requiredArgs(2, arguments);
  var date = toDate(dirtyDate);
  var year = toInteger(dirtyYear);
  if (isNaN(date.getTime())) {
    return /* @__PURE__ */ new Date(NaN);
  }
  date.setFullYear(year);
  return date;
}

// node_modules/date-fns/esm/subMonths/index.js
function subMonths(dirtyDate, dirtyAmount) {
  requiredArgs(2, arguments);
  var amount = toInteger(dirtyAmount);
  return addMonths(dirtyDate, -amount);
}

// node_modules/date-fns/esm/sub/index.js
function sub(date, duration) {
  requiredArgs(2, arguments);
  if (!duration || _typeof(duration) !== "object") return /* @__PURE__ */ new Date(NaN);
  var years = duration.years ? toInteger(duration.years) : 0;
  var months = duration.months ? toInteger(duration.months) : 0;
  var weeks = duration.weeks ? toInteger(duration.weeks) : 0;
  var days = duration.days ? toInteger(duration.days) : 0;
  var hours = duration.hours ? toInteger(duration.hours) : 0;
  var minutes = duration.minutes ? toInteger(duration.minutes) : 0;
  var seconds = duration.seconds ? toInteger(duration.seconds) : 0;
  var dateWithoutMonths = subMonths(date, months + years * 12);
  var dateWithoutDays = subDays(dateWithoutMonths, days + weeks * 7);
  var minutestoSub = minutes + hours * 60;
  var secondstoSub = seconds + minutestoSub * 60;
  var mstoSub = secondstoSub * 1e3;
  var finalDate = new Date(dateWithoutDays.getTime() - mstoSub);
  return finalDate;
}

// node_modules/date-fns/esm/subYears/index.js
function subYears(dirtyDate, dirtyAmount) {
  requiredArgs(2, arguments);
  var amount = toInteger(dirtyAmount);
  return addYears(dirtyDate, -amount);
}

// node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js
var it = (e2, n) => {
  const a3 = e2.__vccOpts || e2;
  for (const [t2, o] of n)
    a3[t2] = o;
  return a3;
};
var da = {};
var ca = {
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg",
  width: "32",
  height: "32",
  viewBox: "0 0 32 32",
  class: "dp__icon"
};
var fa = createBaseVNode("path", { d: "M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z" }, null, -1);
var ma = createBaseVNode("path", { d: "M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z" }, null, -1);
var va = createBaseVNode("path", { d: "M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z" }, null, -1);
var ya = createBaseVNode("path", { d: "M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z" }, null, -1);
var ha = [
  fa,
  ma,
  va,
  ya
];
function ga(e2, n) {
  return openBlock(), createElementBlock("svg", ca, ha);
}
var Ft = it(da, [["render", ga]]);
var pa = {};
var ka = {
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg",
  width: "32",
  height: "32",
  viewBox: "0 0 32 32",
  class: "dp__icon"
};
var wa = createBaseVNode("path", { d: "M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z" }, null, -1);
var ba = createBaseVNode("path", { d: "M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z" }, null, -1);
var $a = [
  wa,
  ba
];
function Da(e2, n) {
  return openBlock(), createElementBlock("svg", ka, $a);
}
var Ma = it(pa, [["render", Da]]);
var _a = {};
var Ta = {
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg",
  width: "32",
  height: "32",
  viewBox: "0 0 32 32",
  class: "dp__icon"
};
var Aa = createBaseVNode("path", { d: "M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z" }, null, -1);
var Ca = [
  Aa
];
function Sa(e2, n) {
  return openBlock(), createElementBlock("svg", Ta, Ca);
}
var wn = it(_a, [["render", Sa]]);
var Pa = {};
var Na = {
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg",
  width: "32",
  height: "32",
  viewBox: "0 0 32 32",
  class: "dp__icon"
};
var Ra = createBaseVNode("path", { d: "M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z" }, null, -1);
var Ia = [
  Ra
];
function Oa(e2, n) {
  return openBlock(), createElementBlock("svg", Na, Ia);
}
var bn = it(Pa, [["render", Oa]]);
var Ba = {};
var Ya = {
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg",
  width: "32",
  height: "32",
  viewBox: "0 0 32 32",
  class: "dp__icon"
};
var Va = createBaseVNode("path", { d: "M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z" }, null, -1);
var La = createBaseVNode("path", { d: "M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z" }, null, -1);
var Ea = [
  Va,
  La
];
function Fa(e2, n) {
  return openBlock(), createElementBlock("svg", Ya, Ea);
}
var Un = it(Ba, [["render", Fa]]);
var Ua = {};
var Ha = {
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg",
  width: "32",
  height: "32",
  viewBox: "0 0 32 32",
  class: "dp__icon"
};
var Wa = createBaseVNode("path", { d: "M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z" }, null, -1);
var za = [
  Wa
];
function ja(e2, n) {
  return openBlock(), createElementBlock("svg", Ha, za);
}
var Hn = it(Ua, [["render", ja]]);
var Ka = {};
var xa = {
  version: "1.1",
  xmlns: "http://www.w3.org/2000/svg",
  width: "32",
  height: "32",
  viewBox: "0 0 32 32",
  class: "dp__icon"
};
var Ga = createBaseVNode("path", { d: "M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z" }, null, -1);
var Za = [
  Ga
];
function Xa(e2, n) {
  return openBlock(), createElementBlock("svg", xa, Za);
}
var Wn = it(Ka, [["render", Xa]]);
var $n = (e2, n) => {
  const a3 = parse(e2, n.slice(0, e2.length), /* @__PURE__ */ new Date());
  return isValid(a3) && isDate(a3) ? a3 : null;
};
var qa = (e2, n) => {
  if (typeof n == "string")
    return $n(e2, n);
  if (Array.isArray(n)) {
    let a3 = null;
    for (const t2 of n)
      if (a3 = $n(e2, t2), a3)
        break;
    return a3;
  }
  return typeof n == "function" ? n(e2) : null;
};
var w2 = (e2) => e2 ? new Date(e2) : /* @__PURE__ */ new Date();
var Ja = (e2, n) => {
  if (n) {
    const t2 = (e2.getMonth() + 1).toString().padStart(2, "0"), o = e2.getDate().toString().padStart(2, "0"), c2 = e2.getHours().toString().padStart(2, "0"), p = e2.getMinutes().toString().padStart(2, "0");
    return `${e2.getFullYear()}-${t2}-${o}T${c2}:${p}:00.000Z`;
  }
  const a3 = Date.UTC(
    e2.getUTCFullYear(),
    e2.getUTCMonth(),
    e2.getUTCDate(),
    e2.getUTCHours(),
    e2.getUTCMinutes(),
    e2.getUTCSeconds()
  );
  return new Date(a3).toISOString();
};
var ze = (e2) => {
  let n = w2(JSON.parse(JSON.stringify(e2)));
  return n = setHours(n, 0), n = setMinutes(n, 0), n = setSeconds(n, 0), n = setMilliseconds(n, 0), n;
};
var Le = (e2, n, a3, t2) => {
  let o = e2 ? w2(e2) : w2();
  return (n || n === 0) && (o = setHours(o, +n)), (a3 || a3 === 0) && (o = setMinutes(o, +a3)), (t2 || t2 === 0) && (o = setSeconds(o, +t2)), setMilliseconds(o, 0);
};
var Pe = (e2, n) => !e2 || !n ? false : isBefore(ze(e2), ze(n));
var ke = (e2, n) => !e2 || !n ? false : isEqual(ze(e2), ze(n));
var Oe = (e2, n) => !e2 || !n ? false : isAfter(ze(e2), ze(n));
var zn = (e2, n, a3) => e2 && e2[0] && e2[1] ? Oe(a3, e2[0]) && Pe(a3, e2[1]) : e2 && e2[0] && n ? Oe(a3, e2[0]) && Pe(a3, n) || Pe(a3, e2[0]) && Oe(a3, n) : false;
var kt = reactive({
  menuFocused: false,
  shiftKeyInMenu: false
});
var jn = () => {
  const e2 = (t2) => {
    kt.menuFocused = t2;
  }, n = (t2) => {
    kt.shiftKeyInMenu !== t2 && (kt.shiftKeyInMenu = t2);
  };
  return {
    control: computed(() => ({ shiftKeyInMenu: kt.shiftKeyInMenu, menuFocused: kt.menuFocused })),
    setMenuFocused: e2,
    setShiftKey: n
  };
};
function mn(e2) {
  return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
}
var Bt = {};
var Qa = {
  get exports() {
    return Bt;
  },
  set exports(e2) {
    Bt = e2;
  }
};
(function(e2, n) {
  Object.defineProperty(n, "__esModule", {
    value: true
  }), n.default = a3;
  function a3(t2) {
    if (t2 === null || t2 === true || t2 === false)
      return NaN;
    var o = Number(t2);
    return isNaN(o) ? o : o < 0 ? Math.ceil(o) : Math.floor(o);
  }
  e2.exports = n.default;
})(Qa, Bt);
var el = mn(Bt);
var Yt = {};
var tl = {
  get exports() {
    return Yt;
  },
  set exports(e2) {
    Yt = e2;
  }
};
(function(e2, n) {
  Object.defineProperty(n, "__esModule", {
    value: true
  }), n.default = a3;
  function a3(t2) {
    var o = new Date(Date.UTC(t2.getFullYear(), t2.getMonth(), t2.getDate(), t2.getHours(), t2.getMinutes(), t2.getSeconds(), t2.getMilliseconds()));
    return o.setUTCFullYear(t2.getFullYear()), t2.getTime() - o.getTime();
  }
  e2.exports = n.default;
})(tl, Yt);
var Dn = mn(Yt);
function nl(e2, n) {
  var a3 = ol(n);
  return a3.formatToParts ? ll(a3, e2) : rl(a3, e2);
}
var al = {
  year: 0,
  month: 1,
  day: 2,
  hour: 3,
  minute: 4,
  second: 5
};
function ll(e2, n) {
  try {
    for (var a3 = e2.formatToParts(n), t2 = [], o = 0; o < a3.length; o++) {
      var c2 = al[a3[o].type];
      c2 >= 0 && (t2[c2] = parseInt(a3[o].value, 10));
    }
    return t2;
  } catch (p) {
    if (p instanceof RangeError)
      return [NaN];
    throw p;
  }
}
function rl(e2, n) {
  var a3 = e2.format(n).replace(/\u200E/g, ""), t2 = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(a3);
  return [t2[3], t2[1], t2[2], t2[4], t2[5], t2[6]];
}
var Gt = {};
function ol(e2) {
  if (!Gt[e2]) {
    var n = new Intl.DateTimeFormat("en-US", {
      hour12: false,
      timeZone: "America/New_York",
      year: "numeric",
      month: "numeric",
      day: "2-digit",
      hour: "2-digit",
      minute: "2-digit",
      second: "2-digit"
    }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), a3 = n === "06/25/2014, 00:00:00" || n === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
    Gt[e2] = a3 ? new Intl.DateTimeFormat("en-US", {
      hour12: false,
      timeZone: e2,
      year: "numeric",
      month: "numeric",
      day: "2-digit",
      hour: "2-digit",
      minute: "2-digit",
      second: "2-digit"
    }) : new Intl.DateTimeFormat("en-US", {
      hourCycle: "h23",
      timeZone: e2,
      year: "numeric",
      month: "numeric",
      day: "2-digit",
      hour: "2-digit",
      minute: "2-digit",
      second: "2-digit"
    });
  }
  return Gt[e2];
}
function vn(e2, n, a3, t2, o, c2, p) {
  var $ = /* @__PURE__ */ new Date(0);
  return $.setUTCFullYear(e2, n, a3), $.setUTCHours(t2, o, c2, p), $;
}
var Mn = 36e5;
var sl = 6e4;
var Zt = {
  timezone: /([Z+-].*)$/,
  timezoneZ: /^(Z)$/,
  timezoneHH: /^([+-]\d{2})$/,
  timezoneHHMM: /^([+-]\d{2}):?(\d{2})$/
};
function yn(e2, n, a3) {
  var t2, o;
  if (!e2 || (t2 = Zt.timezoneZ.exec(e2), t2))
    return 0;
  var c2;
  if (t2 = Zt.timezoneHH.exec(e2), t2)
    return c2 = parseInt(t2[1], 10), _n(c2) ? -(c2 * Mn) : NaN;
  if (t2 = Zt.timezoneHHMM.exec(e2), t2) {
    c2 = parseInt(t2[1], 10);
    var p = parseInt(t2[2], 10);
    return _n(c2, p) ? (o = Math.abs(c2) * Mn + p * sl, c2 > 0 ? -o : o) : NaN;
  }
  if (dl(e2)) {
    n = new Date(n || Date.now());
    var $ = a3 ? n : il(n), O2 = rn($, e2), R2 = a3 ? O2 : ul(n, O2, e2);
    return -R2;
  }
  return NaN;
}
function il(e2) {
  return vn(
    e2.getFullYear(),
    e2.getMonth(),
    e2.getDate(),
    e2.getHours(),
    e2.getMinutes(),
    e2.getSeconds(),
    e2.getMilliseconds()
  );
}
function rn(e2, n) {
  var a3 = nl(e2, n), t2 = vn(
    a3[0],
    a3[1] - 1,
    a3[2],
    a3[3] % 24,
    a3[4],
    a3[5],
    0
  ).getTime(), o = e2.getTime(), c2 = o % 1e3;
  return o -= c2 >= 0 ? c2 : 1e3 + c2, t2 - o;
}
function ul(e2, n, a3) {
  var t2 = e2.getTime(), o = t2 - n, c2 = rn(new Date(o), a3);
  if (n === c2)
    return n;
  o -= c2 - n;
  var p = rn(new Date(o), a3);
  return c2 === p ? c2 : Math.max(c2, p);
}
function _n(e2, n) {
  return -23 <= e2 && e2 <= 23 && (n == null || 0 <= n && n <= 59);
}
var Tn = {};
function dl(e2) {
  if (Tn[e2])
    return true;
  try {
    return new Intl.DateTimeFormat(void 0, { timeZone: e2 }), Tn[e2] = true, true;
  } catch {
    return false;
  }
}
var cl = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/;
var Kn = cl;
var Xt = 36e5;
var An = 6e4;
var fl = 2;
var Ie = {
  dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
  datePattern: /^([0-9W+-]+)(.*)/,
  plainTime: /:/,
  // year tokens
  YY: /^(\d{2})$/,
  YYY: [
    /^([+-]\d{2})$/,
    // 0 additional digits
    /^([+-]\d{3})$/,
    // 1 additional digit
    /^([+-]\d{4})$/
    // 2 additional digits
  ],
  YYYY: /^(\d{4})/,
  YYYYY: [
    /^([+-]\d{4})/,
    // 0 additional digits
    /^([+-]\d{5})/,
    // 1 additional digit
    /^([+-]\d{6})/
    // 2 additional digits
  ],
  // date tokens
  MM: /^-(\d{2})$/,
  DDD: /^-?(\d{3})$/,
  MMDD: /^-?(\d{2})-?(\d{2})$/,
  Www: /^-?W(\d{2})$/,
  WwwD: /^-?W(\d{2})-?(\d{1})$/,
  HH: /^(\d{2}([.,]\d*)?)$/,
  HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
  HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
  // time zone tokens (to identify the presence of a tz)
  timeZone: Kn
};
function on(e2, n) {
  if (arguments.length < 1)
    throw new TypeError("1 argument required, but only " + arguments.length + " present");
  if (e2 === null)
    return /* @__PURE__ */ new Date(NaN);
  var a3 = n || {}, t2 = a3.additionalDigits == null ? fl : el(a3.additionalDigits);
  if (t2 !== 2 && t2 !== 1 && t2 !== 0)
    throw new RangeError("additionalDigits must be 0, 1 or 2");
  if (e2 instanceof Date || typeof e2 == "object" && Object.prototype.toString.call(e2) === "[object Date]")
    return new Date(e2.getTime());
  if (typeof e2 == "number" || Object.prototype.toString.call(e2) === "[object Number]")
    return new Date(e2);
  if (!(typeof e2 == "string" || Object.prototype.toString.call(e2) === "[object String]"))
    return /* @__PURE__ */ new Date(NaN);
  var o = ml(e2), c2 = vl(o.date, t2), p = c2.year, $ = c2.restDateString, O2 = yl($, p);
  if (isNaN(O2))
    return /* @__PURE__ */ new Date(NaN);
  if (O2) {
    var R2 = O2.getTime(), E2 = 0, A;
    if (o.time && (E2 = hl(o.time), isNaN(E2)))
      return /* @__PURE__ */ new Date(NaN);
    if (o.timeZone || a3.timeZone) {
      if (A = yn(o.timeZone || a3.timeZone, new Date(R2 + E2)), isNaN(A))
        return /* @__PURE__ */ new Date(NaN);
    } else
      A = Dn(new Date(R2 + E2)), A = Dn(new Date(R2 + E2 + A));
    return new Date(R2 + E2 + A);
  } else
    return /* @__PURE__ */ new Date(NaN);
}
function ml(e2) {
  var n = {}, a3 = Ie.dateTimePattern.exec(e2), t2;
  if (a3 ? (n.date = a3[1], t2 = a3[3]) : (a3 = Ie.datePattern.exec(e2), a3 ? (n.date = a3[1], t2 = a3[2]) : (n.date = null, t2 = e2)), t2) {
    var o = Ie.timeZone.exec(t2);
    o ? (n.time = t2.replace(o[1], ""), n.timeZone = o[1].trim()) : n.time = t2;
  }
  return n;
}
function vl(e2, n) {
  var a3 = Ie.YYY[n], t2 = Ie.YYYYY[n], o;
  if (o = Ie.YYYY.exec(e2) || t2.exec(e2), o) {
    var c2 = o[1];
    return {
      year: parseInt(c2, 10),
      restDateString: e2.slice(c2.length)
    };
  }
  if (o = Ie.YY.exec(e2) || a3.exec(e2), o) {
    var p = o[1];
    return {
      year: parseInt(p, 10) * 100,
      restDateString: e2.slice(p.length)
    };
  }
  return {
    year: null
  };
}
function yl(e2, n) {
  if (n === null)
    return null;
  var a3, t2, o, c2;
  if (e2.length === 0)
    return t2 = /* @__PURE__ */ new Date(0), t2.setUTCFullYear(n), t2;
  if (a3 = Ie.MM.exec(e2), a3)
    return t2 = /* @__PURE__ */ new Date(0), o = parseInt(a3[1], 10) - 1, Sn(n, o) ? (t2.setUTCFullYear(n, o), t2) : /* @__PURE__ */ new Date(NaN);
  if (a3 = Ie.DDD.exec(e2), a3) {
    t2 = /* @__PURE__ */ new Date(0);
    var p = parseInt(a3[1], 10);
    return kl(n, p) ? (t2.setUTCFullYear(n, 0, p), t2) : /* @__PURE__ */ new Date(NaN);
  }
  if (a3 = Ie.MMDD.exec(e2), a3) {
    t2 = /* @__PURE__ */ new Date(0), o = parseInt(a3[1], 10) - 1;
    var $ = parseInt(a3[2], 10);
    return Sn(n, o, $) ? (t2.setUTCFullYear(n, o, $), t2) : /* @__PURE__ */ new Date(NaN);
  }
  if (a3 = Ie.Www.exec(e2), a3)
    return c2 = parseInt(a3[1], 10) - 1, Pn(n, c2) ? Cn(n, c2) : /* @__PURE__ */ new Date(NaN);
  if (a3 = Ie.WwwD.exec(e2), a3) {
    c2 = parseInt(a3[1], 10) - 1;
    var O2 = parseInt(a3[2], 10) - 1;
    return Pn(n, c2, O2) ? Cn(n, c2, O2) : /* @__PURE__ */ new Date(NaN);
  }
  return null;
}
function hl(e2) {
  var n, a3, t2;
  if (n = Ie.HH.exec(e2), n)
    return a3 = parseFloat(n[1].replace(",", ".")), qt(a3) ? a3 % 24 * Xt : NaN;
  if (n = Ie.HHMM.exec(e2), n)
    return a3 = parseInt(n[1], 10), t2 = parseFloat(n[2].replace(",", ".")), qt(a3, t2) ? a3 % 24 * Xt + t2 * An : NaN;
  if (n = Ie.HHMMSS.exec(e2), n) {
    a3 = parseInt(n[1], 10), t2 = parseInt(n[2], 10);
    var o = parseFloat(n[3].replace(",", "."));
    return qt(a3, t2, o) ? a3 % 24 * Xt + t2 * An + o * 1e3 : NaN;
  }
  return null;
}
function Cn(e2, n, a3) {
  n = n || 0, a3 = a3 || 0;
  var t2 = /* @__PURE__ */ new Date(0);
  t2.setUTCFullYear(e2, 0, 4);
  var o = t2.getUTCDay() || 7, c2 = n * 7 + a3 + 1 - o;
  return t2.setUTCDate(t2.getUTCDate() + c2), t2;
}
var gl = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var pl = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function xn(e2) {
  return e2 % 400 === 0 || e2 % 4 === 0 && e2 % 100 !== 0;
}
function Sn(e2, n, a3) {
  if (n < 0 || n > 11)
    return false;
  if (a3 != null) {
    if (a3 < 1)
      return false;
    var t2 = xn(e2);
    if (t2 && a3 > pl[n] || !t2 && a3 > gl[n])
      return false;
  }
  return true;
}
function kl(e2, n) {
  if (n < 1)
    return false;
  var a3 = xn(e2);
  return !(a3 && n > 366 || !a3 && n > 365);
}
function Pn(e2, n, a3) {
  return !(n < 0 || n > 52 || a3 != null && (a3 < 0 || a3 > 6));
}
function qt(e2, n, a3) {
  return !(e2 != null && (e2 < 0 || e2 >= 25) || n != null && (n < 0 || n >= 60) || a3 != null && (a3 < 0 || a3 >= 60));
}
var Vt = {};
var wl = {
  get exports() {
    return Vt;
  },
  set exports(e2) {
    Vt = e2;
  }
};
var Lt = {};
var bl = {
  get exports() {
    return Lt;
  },
  set exports(e2) {
    Lt = e2;
  }
};
(function(e2, n) {
  Object.defineProperty(n, "__esModule", {
    value: true
  }), n.default = a3;
  function a3(t2, o) {
    if (t2 == null)
      throw new TypeError("assign requires that input parameter not be null or undefined");
    for (var c2 in o)
      Object.prototype.hasOwnProperty.call(o, c2) && (t2[c2] = o[c2]);
    return t2;
  }
  e2.exports = n.default;
})(bl, Lt);
(function(e2, n) {
  Object.defineProperty(n, "__esModule", {
    value: true
  }), n.default = o;
  var a3 = t2(Lt);
  function t2(c2) {
    return c2 && c2.__esModule ? c2 : { default: c2 };
  }
  function o(c2) {
    return (0, a3.default)({}, c2);
  }
  e2.exports = n.default;
})(wl, Vt);
var $l = mn(Vt);
function Dl(e2, n, a3) {
  var t2 = on(e2, a3), o = yn(n, t2, true), c2 = new Date(t2.getTime() - o), p = /* @__PURE__ */ new Date(0);
  return p.setFullYear(c2.getUTCFullYear(), c2.getUTCMonth(), c2.getUTCDate()), p.setHours(c2.getUTCHours(), c2.getUTCMinutes(), c2.getUTCSeconds(), c2.getUTCMilliseconds()), p;
}
function Ml(e2, n, a3) {
  if (typeof e2 == "string" && !e2.match(Kn)) {
    var t2 = $l(a3);
    return t2.timeZone = n, on(e2, t2);
  }
  var o = on(e2, a3), c2 = vn(
    o.getFullYear(),
    o.getMonth(),
    o.getDate(),
    o.getHours(),
    o.getMinutes(),
    o.getSeconds(),
    o.getMilliseconds()
  ).getTime(), p = yn(n, new Date(c2));
  return new Date(c2 + p);
}
var _l = (e2, n = 3) => {
  const a3 = [];
  for (let t2 = 0; t2 < e2.length; t2 += n)
    a3.push([e2[t2], e2[t2 + 1], e2[t2 + 2]]);
  return a3;
};
var Tl = (e2, n) => {
  const a3 = [1, 2, 3, 4, 5, 6, 7].map((c2) => new Intl.DateTimeFormat(e2, { weekday: "short", timeZone: "UTC" }).format(/* @__PURE__ */ new Date(`2017-01-0${c2}T00:00:00+00:00`)).slice(0, 2)), t2 = a3.slice(0, n), o = a3.slice(n + 1, a3.length);
  return [a3[n]].concat(...o).concat(...t2);
};
var Al = (e2) => {
  const n = [];
  for (let a3 = +e2[0]; a3 <= +e2[1]; a3++)
    n.push({ value: +a3, text: `${a3}` });
  return n;
};
var Cl = (e2, n) => {
  const a3 = new Intl.DateTimeFormat(e2, { month: n, timeZone: "UTC" });
  return [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((o) => {
    const c2 = o < 10 ? `0${o}` : o;
    return /* @__PURE__ */ new Date(`2017-${c2}-01T00:00:00+00:00`);
  }).map((o, c2) => ({
    text: a3.format(o),
    value: c2
  }));
};
var Sl = (e2) => [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11][e2];
var Me = (e2) => {
  const n = unref(e2);
  return n != null && n.$el ? n == null ? void 0 : n.$el : n;
};
var Pl = (e2) => Object.assign({ type: "dot" }, e2);
var Gn = (e2) => Array.isArray(e2) ? !!e2[0] && !!e2[1] : false;
var Et = {
  prop: (e2) => `"${e2}" prop must be enabled!`,
  dateArr: (e2) => `You need to use array as "model-value" binding in order to support "${e2}"`
};
var _e = (e2) => e2;
var Nn = (e2) => e2 === 0 ? e2 : !e2 || isNaN(+e2) ? null : +e2;
var Rn = (e2) => Object.assign(
  {
    menuAppear: "dp-menu-appear",
    open: "dp-slide-down",
    close: "dp-slide-up",
    next: "calendar-next",
    previous: "calendar-prev",
    vNext: "dp-slide-up",
    vPrevious: "dp-slide-down"
  },
  e2
);
var Nl = (e2) => Object.assign(
  {
    toggleOverlay: "Toggle overlay",
    menu: "Datepicker menu",
    input: "Datepicker input",
    calendarWrap: "Calendar wrapper",
    calendarDays: "Calendar days",
    openTimePicker: "Open time picker",
    closeTimePicker: "Close time Picker",
    incrementValue: (n) => `Increment ${n}`,
    decrementValue: (n) => `Decrement ${n}`,
    openTpOverlay: (n) => `Open ${n} overlay`,
    amPmButton: "Switch AM/PM mode",
    openYearsOverlay: "Open years overlay",
    openMonthsOverlay: "Open months overlay",
    nextMonth: "Next month",
    prevMonth: "Previous month",
    day: () => ""
  },
  e2
);
var Rl = (e2) => e2 === null ? 0 : typeof e2 == "boolean" ? e2 ? 2 : 0 : +e2 >= 2 ? +e2 : 2;
var Il = (e2, n, a3) => e2 || (typeof a3 == "string" ? a3 : n);
var Ol = (e2) => typeof e2 == "boolean" ? e2 ? Rn({}) : false : Rn(e2);
var Bl = () => ({
  enterSubmit: true,
  tabSubmit: true,
  openMenu: true,
  rangeSeparator: " - "
});
var Yl = (e2) => Object.assign({ months: [], years: [], times: { hours: [], minutes: [], seconds: [] } }, e2);
var Ve = (e2) => {
  const n = () => {
    if (e2.partialRange)
      return null;
    throw new Error(Et.prop("partial-range"));
  }, a3 = computed(() => ({
    ariaLabels: Nl(e2.ariaLabels),
    textInputOptions: Object.assign(Bl(), e2.textInputOptions),
    multiCalendars: Rl(e2.multiCalendars),
    previewFormat: Il(e2.previewFormat, e2.format, c2()),
    filters: Yl(e2.filters),
    transitions: Ol(e2.transitions),
    startTime: d3()
  })), t2 = (l) => {
    if (e2.range)
      return l();
    throw new Error(Et.prop("range"));
  }, o = () => {
    const l = e2.enableSeconds ? ":ss" : "";
    return e2.is24 ? `HH:mm${l}` : `hh:mm${l} aa`;
  }, c2 = () => e2.format ? e2.format : e2.monthPicker ? "MM/yyyy" : e2.timePicker ? o() : e2.weekPicker ? "MM/dd/yyyy" : e2.yearPicker ? "yyyy" : e2.enableTimePicker ? `MM/dd/yyyy, ${o()}` : "MM/dd/yyyy", p = (l, v) => {
    if (typeof e2.format == "function")
      return e2.format(l);
    const m3 = v || c2(), k2 = e2.formatLocale ? { locale: e2.formatLocale } : void 0;
    return Array.isArray(l) ? `${format(l[0], m3, k2)} ${e2.modelAuto && !l[1] ? "" : a3.value.textInputOptions.rangeSeparator || "-"} ${l[1] ? format(l[1], m3, k2) : ""}` : format(l, m3, k2);
  }, $ = (l) => e2.timezone ? Dl(l, e2.timezone) : l, O2 = (l) => e2.timezone ? Ml(l, e2.timezone) : l, R2 = computed(() => (l) => {
    var v;
    return (v = e2.hideNavigation) == null ? void 0 : v.includes(l);
  }), E2 = (l) => {
    const v = e2.maxDate ? Oe($(l), $(w2(e2.maxDate))) : false, m3 = e2.minDate ? Pe($(l), $(w2(e2.minDate))) : false, k2 = B2(l, e2.disabledDates), Z = a3.value.filters.months.map((be) => +be).includes(getMonth(l)), se = e2.disabledWeekDays.length ? e2.disabledWeekDays.some((be) => +be === getDay(l)) : false, f = e2.allowedDates.length ? !e2.allowedDates.some((be) => ke($(w2(be)), $(l))) : false, r = getYear(l), J = r < +e2.yearRange[0] || r > +e2.yearRange[1];
    return !(v || m3 || k2 || Z || J || se || f);
  }, A = (l) => {
    const v = {
      hours: getHours(w2()),
      minutes: getMinutes(w2()),
      seconds: getSeconds(w2())
    };
    return Object.assign(v, l);
  }, d3 = () => e2.range ? e2.startTime && Array.isArray(e2.startTime) ? [A(e2.startTime[0]), A(e2.startTime[1])] : null : e2.startTime && !Array.isArray(e2.startTime) ? A(e2.startTime) : null, M3 = (l) => !E2(l), U = (l) => Array.isArray(l) ? isValid(l[0]) && (l[1] ? isValid(l[1]) : true) : l ? isValid(l) : false, V = (l) => l instanceof Date ? l : parseISO(l), ee = (l) => {
    const v = startOfWeek($(l), { weekStartsOn: +e2.weekStart }), m3 = endOfWeek($(l), { weekStartsOn: +e2.weekStart });
    return [v, m3];
  }, B2 = (l, v) => Array.isArray(v) ? v.some((m3) => ke($(w2(m3)), $(l))) : v(l), L2 = (l, v, m3) => {
    let k2 = l ? w2(l) : w2();
    return (v || v === 0) && (k2 = setMonth(k2, v)), m3 && (k2 = setYear(k2, m3)), k2;
  }, C = (l) => set(w2(), { hours: getHours(l), minutes: getMinutes(l), seconds: getSeconds(l) }), x2 = (l) => set(w2(), {
    hours: +l.hours || 0,
    minutes: +l.minutes || 0,
    seconds: +l.seconds || 0
  }), Q2 = (l, v, m3, k2) => {
    if (!l)
      return true;
    if (k2) {
      const G2 = m3 === "max" ? isBefore(l, v) : isAfter(l, v), Z = { seconds: 0, milliseconds: 0 };
      return G2 || isEqual(set(l, Z), set(v, Z));
    }
    return m3 === "max" ? l.getTime() <= v.getTime() : l.getTime() >= v.getTime();
  }, oe = () => !e2.enableTimePicker || e2.monthPicker || e2.yearPicker || e2.ignoreTimeValidation, P = (l) => Array.isArray(l) ? [l[0] ? C(l[0]) : null, l[1] ? C(l[1]) : null] : C(l), y3 = (l) => {
    const v = e2.maxTime ? x2(e2.maxTime) : w2(e2.maxDate);
    return Array.isArray(l) ? Q2(l[0], v, "max", !!e2.maxDate) && Q2(l[1], v, "max", !!e2.maxDate) : Q2(l, v, "max", !!e2.maxDate);
  }, I2 = (l, v) => {
    const m3 = e2.minTime ? x2(e2.minTime) : w2(e2.minDate);
    return Array.isArray(l) ? Q2(l[0], m3, "min", !!e2.minDate) && Q2(l[1], m3, "min", !!e2.minDate) && v : Q2(l, m3, "min", !!e2.minDate) && v;
  }, W = (l) => {
    let v = true;
    if (!l || oe())
      return true;
    const m3 = !e2.minDate && !e2.maxDate ? P(l) : l;
    return (e2.maxTime || e2.maxDate) && (v = y3(_e(m3))), (e2.minTime || e2.minDate) && (v = I2(_e(m3), v)), v;
  }, N = (l, v) => {
    const m3 = w2(JSON.parse(JSON.stringify(l))), k2 = [];
    for (let G2 = 0; G2 < 7; G2++) {
      const Z = addDays(m3, G2), se = getMonth(Z) !== v;
      k2.push({
        text: e2.hideOffsetDates && se ? "" : Z.getDate(),
        value: Z,
        current: !se,
        classData: {}
      });
    }
    return k2;
  }, K2 = (l, v) => {
    const m3 = [], k2 = w2($(new Date(v, l))), G2 = w2($(new Date(v, l + 1, 0))), Z = startOfWeek(k2, { weekStartsOn: e2.weekStart }), se = (f) => {
      const r = N(f, l);
      if (m3.push({ days: r }), !m3[m3.length - 1].days.some(
        (J) => ke(ze(J.value), ze(G2))
      )) {
        const J = addDays(f, 7);
        se(J);
      }
    };
    if (se(Z), e2.sixWeeks && m3.length < 6) {
      const f = 6 - m3.length;
      for (let r = 1; r <= f; r++) {
        const J = m3[m3.length - 1], be = J.days[J.days.length - 1], we = N(addDays(be.value, 1), getMonth(k2));
        m3.push({ days: we });
      }
    }
    return m3;
  }, te = (l, v, m3) => [set(w2(l), { date: 1 }), set(w2(), { month: v, year: m3, date: 1 })], q2 = (l, v) => Pe(...te(e2.minDate, l, v)) || ke(...te(e2.minDate, l, v)), _ = (l, v) => Oe(...te(e2.maxDate, l, v)) || ke(...te(e2.maxDate, l, v)), T2 = (l, v, m3) => {
    let k2 = false;
    return e2.maxDate && m3 && _(l, v) && (k2 = true), e2.minDate && !m3 && q2(l, v) && (k2 = true), k2;
  };
  return {
    checkPartialRangeValue: n,
    checkRangeEnabled: t2,
    getZonedDate: $,
    getZonedToUtc: O2,
    formatDate: p,
    getDefaultPattern: c2,
    validateDate: E2,
    getDefaultStartTime: d3,
    isDisabled: M3,
    isValidDate: U,
    sanitizeDate: V,
    getWeekFromDate: ee,
    matchDate: B2,
    setDateMonthOrYear: L2,
    isValidTime: W,
    getCalendarDays: K2,
    validateMonthYearInRange: (l, v, m3, k2) => {
      let G2 = false;
      return k2 ? e2.minDate && e2.maxDate ? G2 = T2(l, v, m3) : (e2.minDate && q2(l, v) || e2.maxDate && _(l, v)) && (G2 = true) : G2 = true, G2;
    },
    validateMaxDate: _,
    validateMinDate: q2,
    defaults: a3,
    hideNavigationButtons: R2
  };
};
var he = reactive({
  monthYear: [],
  calendar: [],
  time: [],
  actionRow: [],
  selectionGrid: [],
  timePicker: {
    0: [],
    1: []
  },
  monthPicker: []
});
var Jt = ref(null);
var At = ref(false);
var Qt = ref(false);
var en = ref(false);
var tn = ref(false);
var Ne = ref(0);
var Ae = ref(0);
var Je = () => {
  const e2 = computed(() => At.value ? [...he.selectionGrid, he.actionRow].filter((B2) => B2.length) : Qt.value ? [
    ...he.timePicker[0],
    ...he.timePicker[1],
    tn.value ? [] : [Jt.value],
    he.actionRow
  ].filter((B2) => B2.length) : en.value ? [...he.monthPicker, he.actionRow] : [he.monthYear, ...he.calendar, he.time, he.actionRow].filter((B2) => B2.length)), n = (B2) => {
    Ne.value = B2 ? Ne.value + 1 : Ne.value - 1;
    let L2 = null;
    e2.value[Ae.value] && (L2 = e2.value[Ae.value][Ne.value]), L2 || (Ne.value = B2 ? Ne.value - 1 : Ne.value + 1);
  }, a3 = (B2) => {
    if (Ae.value === 0 && !B2 || Ae.value === e2.value.length && B2)
      return;
    Ae.value = B2 ? Ae.value + 1 : Ae.value - 1, e2.value[Ae.value] ? e2.value[Ae.value] && !e2.value[Ae.value][Ne.value] && Ne.value !== 0 && (Ne.value = e2.value[Ae.value].length - 1) : Ae.value = B2 ? Ae.value - 1 : Ae.value + 1;
  }, t2 = (B2) => {
    let L2 = null;
    e2.value[Ae.value] && (L2 = e2.value[Ae.value][Ne.value]), L2 ? L2.focus({ preventScroll: !At.value }) : Ne.value = B2 ? Ne.value - 1 : Ne.value + 1;
  }, o = () => {
    n(true), t2(true);
  }, c2 = () => {
    n(false), t2(false);
  }, p = () => {
    a3(false), t2(true);
  }, $ = () => {
    a3(true), t2(true);
  }, O2 = (B2, L2) => {
    he[L2] = B2;
  }, R2 = (B2, L2) => {
    he[L2] = B2;
  }, E2 = () => {
    Ne.value = 0, Ae.value = 0;
  };
  return {
    buildMatrix: O2,
    buildMultiLevelMatrix: R2,
    setTimePickerBackRef: (B2) => {
      Jt.value = B2;
    },
    setSelectionGrid: (B2) => {
      At.value = B2, E2(), B2 || (he.selectionGrid = []);
    },
    setTimePicker: (B2, L2 = false) => {
      Qt.value = B2, tn.value = L2, E2(), B2 || (he.timePicker[0] = [], he.timePicker[1] = []);
    },
    setTimePickerElements: (B2, L2 = 0) => {
      he.timePicker[L2] = B2;
    },
    arrowRight: o,
    arrowLeft: c2,
    arrowUp: p,
    arrowDown: $,
    clearArrowNav: () => {
      he.monthYear = [], he.calendar = [], he.time = [], he.actionRow = [], he.selectionGrid = [], he.timePicker[0] = [], he.timePicker[1] = [], At.value = false, Qt.value = false, tn.value = false, en.value = false, E2(), Jt.value = null;
    },
    setMonthPicker: (B2) => {
      en.value = B2, E2();
    },
    refSets: he
    // exposed for testing
  };
};
var In = (e2) => Array.isArray(e2);
var tt = (e2) => Array.isArray(e2);
var On = (e2) => Array.isArray(e2) && e2.length === 2;
var Vl = (e2, n, a3, t2, o) => {
  const {
    getDefaultStartTime: c2,
    isDisabled: p,
    sanitizeDate: $,
    getWeekFromDate: O2,
    setDateMonthOrYear: R2,
    validateMonthYearInRange: E2,
    defaults: A
  } = Ve(e2), d3 = computed({
    get: () => e2.internalModelValue,
    set: (s3) => {
      !e2.readonly && !e2.disabled && n("update:internal-model-value", s3);
    }
  }), M3 = ref([]);
  watch(d3, () => {
    e2.multiCalendars || Q2();
  });
  const U = ref([{ month: getMonth(w2()), year: getYear(w2()) }]), V = reactive({
    hours: e2.range ? [getHours(w2()), getHours(w2())] : getHours(w2()),
    minutes: e2.range ? [getMinutes(w2()), getMinutes(w2())] : getMinutes(w2()),
    seconds: e2.range ? [0, 0] : 0
  }), ee = computed(
    () => (s3) => U.value[s3] ? U.value[s3].month : 0
  ), B2 = computed(
    () => (s3) => U.value[s3] ? U.value[s3].year : 0
  ), L2 = computed(() => e2.flow && e2.flow.length ? o.value === e2.flow.length : true), C = (s3, b2, z2) => {
    var ne, h3;
    U.value[s3] || (U.value[s3] = { month: 0, year: 0 }), U.value[s3].month = b2 === null ? (ne = U.value[s3]) == null ? void 0 : ne.month : b2, U.value[s3].year = z2 === null ? (h3 = U.value[s3]) == null ? void 0 : h3.year : z2;
  }, x2 = (s3, b2) => {
    V[s3] = b2;
  };
  onMounted(() => {
    d3.value || (e2.startDate && (C(0, getMonth(w2(e2.startDate)), getYear(w2(e2.startDate))), A.value.multiCalendars && ht(0)), A.value.startTime && _()), Q2(true);
  });
  const Q2 = (s3 = false) => {
    if (d3.value)
      return Array.isArray(d3.value) ? (M3.value = d3.value, W(s3)) : P(d3.value);
    if (e2.timePicker)
      return N();
    if (e2.monthPicker && !e2.range)
      return K2();
    if (e2.yearPicker && !e2.range)
      return te();
    if (A.value.multiCalendars && s3 && !e2.startDate)
      return oe(w2(), s3);
  }, oe = (s3, b2 = false) => {
    if ((!A.value.multiCalendars || !e2.multiStatic || b2) && C(0, getMonth(s3), getYear(s3)), A.value.multiCalendars)
      for (let z2 = 1; z2 < A.value.multiCalendars; z2++) {
        const ne = set(w2(), { month: ee.value(z2 - 1), year: B2.value(z2 - 1) }), h3 = add(ne, { months: 1 });
        U.value[z2] = { month: getMonth(h3), year: getYear(h3) };
      }
  }, P = (s3) => {
    oe(s3), x2("hours", getHours(s3)), x2("minutes", getMinutes(s3)), x2("seconds", getSeconds(s3));
  }, y3 = (s3, b2) => {
    oe(s3[0], b2);
    const z2 = (ne, h3) => [
      ne(s3[0]),
      s3[1] ? ne(s3[1]) : V[h3][1]
    ];
    x2("hours", z2(getHours, "hours")), x2("minutes", z2(getMinutes, "minutes")), x2("seconds", z2(getSeconds, "seconds"));
  }, I2 = (s3, b2) => {
    if ((e2.range || e2.weekPicker) && !e2.multiDates)
      return y3(s3, b2);
    if (e2.multiDates) {
      const z2 = s3[s3.length - 1];
      return P(z2);
    }
  }, W = (s3) => {
    const b2 = d3.value;
    I2(b2, s3), A.value.multiCalendars && e2.multiCalendarsSolo && u2();
  }, N = () => {
    if (_(), !e2.range)
      d3.value = Le(w2(), V.hours, V.minutes, q2());
    else {
      const s3 = V.hours, b2 = V.minutes;
      d3.value = [
        Le(w2(), s3[0], b2[0], q2()),
        Le(w2(), s3[1], b2[1], q2(false))
      ];
    }
  }, K2 = () => {
    d3.value = R2(w2(), ee.value(0), B2.value(0));
  }, te = () => {
    d3.value = w2();
  }, q2 = (s3 = true) => e2.enableSeconds ? Array.isArray(V.seconds) ? s3 ? V.seconds[0] : V.seconds[1] : V.seconds : 0, _ = () => {
    const s3 = c2();
    if (s3) {
      const b2 = Array.isArray(s3), z2 = b2 ? [+s3[0].hours, +s3[1].hours] : +s3.hours, ne = b2 ? [+s3[0].minutes, +s3[1].minutes] : +s3.minutes, h3 = b2 ? [+s3[0].seconds, +s3[1].seconds] : +s3.seconds;
      x2("hours", z2), x2("minutes", ne), e2.enableSeconds && x2("seconds", h3);
    }
  }, T2 = () => Array.isArray(d3.value) && d3.value.length ? d3.value[d3.value.length - 1] : null, u2 = () => {
    if (Array.isArray(d3.value) && d3.value.length === 2) {
      const s3 = w2(
        w2(d3.value[1] ? d3.value[1] : addMonths(d3.value[0], 1))
      ), [b2, z2] = [getMonth(d3.value[0]), getYear(d3.value[0])], [ne, h3] = [getMonth(d3.value[1]), getYear(d3.value[1])];
      (b2 !== ne || b2 === ne && z2 !== h3) && e2.multiCalendarsSolo && C(1, getMonth(s3), getYear(s3));
    }
  }, l = (s3) => {
    const b2 = addMonths(s3, 1);
    return { month: getMonth(b2), year: getYear(b2) };
  }, v = (s3) => {
    const b2 = getMonth(w2(s3)), z2 = getYear(w2(s3));
    if (C(0, b2, z2), A.value.multiCalendars > 0)
      for (let ne = 1; ne < A.value.multiCalendars; ne++) {
        const h3 = l(
          set(w2(s3), { year: ee.value(ne - 1), month: B2.value(ne - 1) })
        );
        C(ne, h3.month, h3.year);
      }
  }, m3 = (s3) => {
    if (d3.value && Array.isArray(d3.value))
      if (d3.value.some((b2) => ke(s3, b2))) {
        const b2 = d3.value.filter((z2) => !ke(z2, s3));
        d3.value = b2.length ? b2 : null;
      } else
        (e2.multiDatesLimit && +e2.multiDatesLimit > d3.value.length || !e2.multiDatesLimit) && d3.value.push(s3);
    else
      d3.value = [s3];
  }, k2 = (s3, b2) => {
    const z2 = Oe(s3, b2) ? b2 : s3, ne = Oe(b2, s3) ? b2 : s3;
    return eachDayOfInterval({ start: z2, end: ne });
  }, G2 = (s3) => {
    if (Array.isArray(d3.value) && d3.value[0]) {
      const b2 = differenceInCalendarDays(s3, d3.value[0]), z2 = k2(d3.value[0], s3), ne = z2.length === 1 ? 0 : z2.filter((j) => p(j)).length, h3 = Math.abs(b2) - ne;
      if (e2.minRange && e2.maxRange)
        return h3 >= +e2.minRange && h3 <= +e2.maxRange;
      if (e2.minRange)
        return h3 >= +e2.minRange;
      if (e2.maxRange)
        return h3 <= +e2.maxRange;
    }
    return true;
  }, Z = (s3) => Array.isArray(d3.value) && d3.value.length === 2 ? e2.fixedStart && (Oe(s3, d3.value[0]) || ke(s3, d3.value[0])) ? [d3.value[0], s3] : e2.fixedEnd && (Pe(s3, d3.value[1]) || ke(s3, d3.value[1])) ? [s3, d3.value[1]] : (n("invalid-fixed-range", s3), d3.value) : [], se = () => {
    e2.autoApply && L2.value && n("auto-apply");
  }, f = () => {
    e2.autoApply && n("select-date");
  }, r = (s3) => !eachDayOfInterval({ start: s3[0], end: s3[1] }).some((z2) => p(z2)), J = (s3) => (d3.value = O2(w2(s3.value)), se()), be = (s3) => {
    const b2 = Le(w2(s3.value), V.hours, V.minutes, q2());
    e2.multiDates ? m3(b2) : d3.value = b2, a3(), se();
  }, we = () => {
    M3.value = d3.value ? d3.value.slice() : [], M3.value.length === 2 && !(e2.fixedStart || e2.fixedEnd) && (M3.value = []);
  }, He = (s3, b2) => {
    const z2 = [w2(s3.value), addDays(w2(s3.value), +e2.autoRange)];
    r(z2) && (b2 && v(s3.value), M3.value = z2);
  }, Xe = (s3) => {
    le(s3.value) || (M3.value = Z(w2(s3.value)));
  }, le = (s3) => e2.noDisabledRange ? k2(M3.value[0], s3).some((z2) => p(z2)) : false, re = (s3, b2) => {
    if (we(), e2.autoRange)
      return He(s3, b2);
    if (e2.fixedStart || e2.fixedEnd)
      return Xe(s3);
    M3.value[0] ? G2(w2(s3.value)) && !le(s3.value) && (Pe(w2(s3.value), w2(M3.value[0])) ? M3.value.unshift(w2(s3.value)) : M3.value[1] = w2(s3.value)) : M3.value[0] = w2(s3.value);
  }, ve = (s3) => {
    M3.value[s3] = Le(
      M3.value[s3],
      V.hours[s3],
      V.minutes[s3],
      q2(s3 !== 1)
    );
  }, ce = () => {
    M3.value.length && (M3.value[0] && !M3.value[1] ? ve(0) : (ve(0), ve(1), a3()), d3.value = M3.value.slice(), M3.value[0] && M3.value[1] && e2.autoApply && n("auto-apply"), M3.value[0] && !M3.value[1] && e2.modelAuto && e2.autoApply && n("auto-apply"));
  }, yt = (s3, b2 = false) => {
    if (!(p(s3.value) || !s3.current && e2.hideOffsetDates)) {
      if (e2.weekPicker)
        return J(s3);
      if (!e2.range)
        return be(s3);
      tt(V.hours) && tt(V.minutes) && !e2.multiDates && (re(s3, b2), ce());
    }
  }, je = (s3) => {
    const b2 = s3.find((z2) => z2.current);
    return b2 ? getISOWeek(b2.value) : "";
  }, ht = (s3) => {
    for (let b2 = s3 - 1; b2 >= 0; b2--) {
      const z2 = subMonths(set(w2(), { month: ee.value(b2 + 1), year: B2.value(b2 + 1) }), 1);
      C(b2, getMonth(z2), getYear(z2));
    }
    for (let b2 = s3 + 1; b2 <= A.value.multiCalendars - 1; b2++) {
      const z2 = addMonths(set(w2(), { month: ee.value(b2 - 1), year: B2.value(b2 - 1) }), 1);
      C(b2, getMonth(z2), getYear(z2));
    }
  }, et = (s3) => R2(w2(), ee.value(s3), B2.value(s3)), gt = (s3) => Le(s3, V.hours, V.minutes, q2()), Ht = (s3, b2) => {
    const z2 = e2.monthPicker ? ee.value(s3) !== b2.month || !b2.fromNav : B2.value(s3) !== b2.year;
    if (C(s3, b2.month, b2.year), A.value.multiCalendars && !e2.multiCalendarsSolo && ht(s3), e2.monthPicker || e2.yearPicker)
      if (e2.range) {
        if (z2) {
          let ne = d3.value ? d3.value.slice() : [];
          ne.length === 2 && ne[1] !== null && (ne = []), ne.length ? Pe(et(s3), ne[0]) ? ne.unshift(et(s3)) : ne[1] = et(s3) : ne = [et(s3)], d3.value = ne;
        }
      } else
        d3.value = et(s3);
    n("update-month-year", { instance: s3, month: b2.month, year: b2.year }), t2(e2.multiCalendarsSolo ? s3 : void 0);
  }, Wt = async (s3 = false) => {
    if (e2.autoApply && (e2.monthPicker || e2.yearPicker)) {
      await nextTick();
      const b2 = e2.monthPicker ? s3 : false;
      e2.range ? n("auto-apply", b2 || !d3.value || d3.value.length === 1) : n("auto-apply", b2);
    }
    a3();
  }, Mt = (s3, b2) => {
    const z2 = set(w2(), { month: ee.value(b2), year: B2.value(b2) }), ne = s3 < 0 ? addMonths(z2, 1) : subMonths(z2, 1);
    E2(getMonth(ne), getYear(ne), s3 < 0, e2.preventMinMaxNavigation) && (C(b2, getMonth(ne), getYear(ne)), A.value.multiCalendars && !e2.multiCalendarsSolo && ht(b2), n("update-month-year", { instance: b2, month: getMonth(ne), year: getYear(ne) }), t2());
  }, pt = (s3) => {
    In(s3) && In(d3.value) && tt(V.hours) && tt(V.minutes) ? (s3[0] && d3.value[0] && (d3.value[0] = Le(s3[0], V.hours[0], V.minutes[0], q2())), s3[1] && d3.value[1] && (d3.value[1] = Le(s3[1], V.hours[1], V.minutes[1], q2(false)))) : e2.multiDates && Array.isArray(d3.value) ? d3.value[d3.value.length - 1] = gt(s3) : !e2.range && !On(s3) && (d3.value = gt(s3)), n("time-update");
  }, zt = (s3, b2 = true, z2 = false) => {
    const ne = b2 ? s3 : V.hours, h3 = !b2 && !z2 ? s3 : V.minutes, j = z2 ? s3 : V.seconds;
    if (e2.range && On(d3.value) && tt(ne) && tt(h3) && tt(j) && !e2.disableTimeRangeValidation) {
      const $e = (Ee) => Le(d3.value[Ee], ne[Ee], h3[Ee], j[Ee]), Te = (Ee) => setMilliseconds(d3.value[Ee], 0);
      if (ke(d3.value[0], d3.value[1]) && (isAfter($e(0), Te(1)) || isBefore($e(1), Te(0))))
        return;
    }
    if (x2("hours", ne), x2("minutes", h3), x2("seconds", j), d3.value)
      if (e2.multiDates) {
        const $e = T2();
        $e && pt($e);
      } else
        pt(d3.value);
    else
      e2.timePicker && pt(e2.range ? [w2(), w2()] : w2());
    a3();
  }, jt = (s3, b2) => {
    e2.monthChangeOnScroll && Mt(e2.monthChangeOnScroll !== "inverse" ? -s3.deltaY : s3.deltaY, b2);
  }, Kt = (s3, b2, z2 = false) => {
    e2.monthChangeOnArrows && e2.vertical === z2 && _t(s3, b2);
  }, _t = (s3, b2) => {
    Mt(s3 === "right" ? -1 : 1, b2);
  };
  return {
    time: V,
    month: ee,
    year: B2,
    modelValue: d3,
    calendars: U,
    monthYearSelect: Wt,
    isDisabled: p,
    updateTime: zt,
    getWeekNum: je,
    selectDate: yt,
    updateMonthYear: Ht,
    handleScroll: jt,
    getMarker: (s3) => e2.markers.find((b2) => ke($(s3.value), $(b2.date))),
    handleArrow: Kt,
    handleSwipe: _t,
    selectCurrentDate: () => {
      e2.range ? d3.value && Array.isArray(d3.value) && d3.value[0] ? d3.value = Pe(w2(), d3.value[0]) ? [w2(), d3.value[0]] : [d3.value[0], w2()] : d3.value = [w2()] : d3.value = w2(), f();
    },
    presetDateRange: (s3, b2) => {
      b2 || s3.length && s3.length <= 2 && e2.range && (d3.value = s3.map((z2) => w2(z2)), f(), e2.multiCalendars && nextTick().then(() => Q2(true)));
    }
  };
};
var Ll = (e2, n, a3) => {
  const t2 = ref(), {
    getZonedToUtc: o,
    getZonedDate: c2,
    formatDate: p,
    getDefaultPattern: $,
    checkRangeEnabled: O2,
    checkPartialRangeValue: R2,
    isValidDate: E2,
    setDateMonthOrYear: A,
    defaults: d3
  } = Ve(n), M3 = ref(""), U = toRef(n, "format");
  watch(t2, () => {
    e2("internal-model-change", t2.value);
  }), watch(U, () => {
    l();
  });
  const V = (r) => {
    const J = r || w2();
    return n.modelType ? m3(J) : {
      hours: getHours(J),
      minutes: getMinutes(J),
      seconds: n.enableSeconds ? getSeconds(J) : 0
    };
  }, ee = (r) => n.modelType ? m3(r) : { month: getMonth(r), year: getYear(r) }, B2 = (r) => Array.isArray(r) ? O2(() => [
    setYear(w2(), r[0]),
    r[1] ? setYear(w2(), r[1]) : R2()
  ]) : setYear(w2(), +r), L2 = (r, J) => (typeof r == "string" || typeof r == "number") && n.modelType ? v(r) : J, C = (r) => Array.isArray(r) ? [
    L2(
      r[0],
      Le(null, +r[0].hours, +r[0].minutes, r[0].seconds)
    ),
    L2(
      r[1],
      Le(null, +r[1].hours, +r[1].minutes, r[1].seconds)
    )
  ] : L2(r, Le(null, r.hours, r.minutes, r.seconds)), x2 = (r) => Array.isArray(r) ? O2(() => [
    L2(r[0], A(null, +r[0].month, +r[0].year)),
    L2(
      r[1],
      r[1] ? A(null, +r[1].month, +r[1].year) : R2()
    )
  ]) : L2(r, A(null, +r.month, +r.year)), Q2 = (r) => {
    if (Array.isArray(r))
      return r.map((J) => v(J));
    throw new Error(Et.dateArr("multi-dates"));
  }, oe = (r) => {
    if (Array.isArray(r))
      return [w2(r[0]), w2(r[1])];
    throw new Error(Et.dateArr("week-picker"));
  }, P = (r) => n.modelAuto ? Array.isArray(r) ? [v(r[0]), v(r[1])] : n.autoApply ? [v(r)] : [v(r), null] : Array.isArray(r) ? O2(() => [
    v(r[0]),
    r[1] ? v(r[1]) : R2()
  ]) : v(r), y3 = () => {
    Array.isArray(t2.value) && n.range && t2.value.length === 1 && t2.value.push(R2());
  }, I2 = () => {
    const r = t2.value;
    return [
      m3(r[0]),
      r[1] ? m3(r[1]) : R2()
    ];
  }, W = () => t2.value[1] ? I2() : m3(_e(t2.value[0])), N = () => (t2.value || []).map((r) => m3(r)), K2 = () => (y3(), n.modelAuto ? W() : n.multiDates ? N() : Array.isArray(t2.value) ? O2(() => I2()) : m3(_e(t2.value))), te = (r) => r ? n.timePicker ? C(_e(r)) : n.monthPicker ? x2(_e(r)) : n.yearPicker ? B2(_e(r)) : n.multiDates ? Q2(_e(r)) : n.weekPicker ? oe(_e(r)) : P(_e(r)) : null, q2 = (r) => {
    const J = te(r);
    E2(_e(J)) ? (t2.value = _e(J), l()) : (t2.value = null, M3.value = "");
  }, _ = () => {
    var J;
    const r = (be) => {
      var we;
      return format(be, (we = d3.value.textInputOptions) == null ? void 0 : we.format);
    };
    return `${r(t2.value[0])} ${(J = d3.value.textInputOptions) == null ? void 0 : J.rangeSeparator} ${t2.value[1] ? r(t2.value[1]) : ""}`;
  }, T2 = () => {
    var r;
    return a3.value && t2.value ? Array.isArray(t2.value) ? _() : format(t2.value, (r = d3.value.textInputOptions) == null ? void 0 : r.format) : p(t2.value);
  }, u2 = () => {
    var r;
    return t2.value ? n.multiDates ? t2.value.map((J) => p(J)).join("; ") : n.textInput && typeof ((r = d3.value.textInputOptions) == null ? void 0 : r.format) == "string" ? T2() : p(t2.value) : "";
  }, l = () => {
    !n.format || typeof n.format == "string" ? M3.value = u2() : M3.value = n.format(t2.value);
  }, v = (r) => {
    if (n.utc) {
      const J = new Date(r);
      return n.utc === "preserve" ? new Date(J.getTime() + J.getTimezoneOffset() * 6e4) : J;
    }
    return n.modelType ? n.modelType === "date" || n.modelType === "timestamp" ? c2(new Date(r)) : n.modelType === "format" && (typeof n.format == "string" || !n.format) ? parse(r, $(), /* @__PURE__ */ new Date()) : c2(parse(r, n.modelType, /* @__PURE__ */ new Date())) : c2(new Date(r));
  }, m3 = (r) => n.utc ? Ja(r, n.utc === "preserve") : n.modelType ? n.modelType === "timestamp" ? +o(r) : n.modelType === "format" && (typeof n.format == "string" || !n.format) ? p(o(r)) : p(o(r), n.modelType) : o(r), k2 = (r) => {
    e2("update:model-value", r);
  }, G2 = (r) => Array.isArray(t2.value) ? [
    r(t2.value[0]),
    t2.value[1] ? r(t2.value[1]) : R2()
  ] : r(_e(t2.value)), Z = (r) => k2(_e(G2(r)));
  return {
    inputValue: M3,
    internalModelValue: t2,
    checkBeforeEmit: () => t2.value ? n.range ? n.partialRange ? t2.value.length >= 1 : t2.value.length === 2 : !!t2.value : false,
    parseExternalModelValue: q2,
    formatInputValue: l,
    emitModelValue: () => (l(), n.monthPicker ? Z(ee) : n.timePicker ? Z(V) : n.yearPicker ? Z(getYear) : n.weekPicker ? k2(t2.value) : k2(K2()))
  };
};
var El = (e2, n) => {
  const { validateMonthYearInRange: a3, validateMaxDate: t2, validateMinDate: o, defaults: c2 } = Ve(e2), p = (A, d3) => {
    let M3 = A;
    return c2.value.filters.months.includes(getMonth(M3)) ? (M3 = d3 ? addMonths(A, 1) : subMonths(A, 1), p(M3, d3)) : M3;
  }, $ = (A, d3) => {
    let M3 = A;
    return c2.value.filters.years.includes(getYear(M3)) ? (M3 = d3 ? addYears(A, 1) : subYears(A, 1), $(M3, d3)) : M3;
  }, O2 = (A) => {
    const d3 = set(/* @__PURE__ */ new Date(), { month: e2.month, year: e2.year });
    let M3 = A ? addMonths(d3, 1) : subMonths(d3, 1), U = getMonth(M3), V = getYear(M3);
    c2.value.filters.months.includes(U) && (M3 = p(M3, A), U = getMonth(M3), V = getYear(M3)), c2.value.filters.years.includes(V) && (M3 = $(M3, A), V = getYear(M3)), a3(U, V, A, e2.preventMinMaxNavigation) && R2(U, V);
  }, R2 = (A, d3) => {
    n("update-month-year", { month: A, year: d3 });
  }, E2 = computed(() => (A) => {
    if (!e2.preventMinMaxNavigation || A && !e2.maxDate || !A && !e2.minDate)
      return false;
    const d3 = set(/* @__PURE__ */ new Date(), { month: e2.month, year: e2.year }), M3 = A ? addMonths(d3, 1) : subMonths(d3, 1), U = [getMonth(M3), getYear(M3)];
    return A ? !t2(...U) : !o(...U);
  });
  return { handleMonthYearChange: O2, isDisabled: E2, updateMonthYear: R2 };
};
var It = ((e2) => (e2.center = "center", e2.left = "left", e2.right = "right", e2))(It || {});
var Fl = (e2, n, a3, t2) => {
  const o = ref({
    top: "0",
    left: "0",
    transform: "none"
  }), c2 = ref(false), p = toRef(t2, "teleportCenter");
  watch(p, () => {
    ee();
  });
  const $ = (P) => {
    const y3 = P.getBoundingClientRect();
    return {
      left: y3.left + window.scrollX,
      top: y3.top + window.scrollY
    };
  }, O2 = (P) => {
    const y3 = P.getBoundingClientRect();
    let I2 = 0, W = 0;
    for (; P && !isNaN(P.offsetLeft) && !isNaN(P.offsetTop); )
      I2 += P.offsetLeft - P.scrollLeft, W = y3.top + P.scrollTop, P = P.offsetParent;
    return { top: W, left: I2 };
  }, R2 = (P, y3) => {
    o.value.left = `${P + y3}px`, o.value.transform = "translateX(-100%)";
  }, E2 = (P) => {
    o.value.left = `${P}px`, o.value.transform = "translateX(0)";
  }, A = (P, y3, I2 = false) => {
    t2.position === It.left && E2(P), t2.position === It.right && R2(P, y3), t2.position === It.center && (o.value.left = `${P + y3 / 2}px`, o.value.transform = I2 ? "translate(-50%, -50%)" : "translateX(-50%)");
  }, d3 = (P) => {
    const { width: y3, height: I2 } = P.getBoundingClientRect(), { top: W, left: N } = t2.altPosition ? O2(P) : $(P);
    return { top: W, left: N, width: y3, height: I2 };
  }, M3 = () => {
    const P = Me(n);
    if (P) {
      const { top: y3, left: I2, width: W, height: N } = d3(P);
      o.value.top = `${y3 + N / 2}px`, o.value.transform = "translateY(-50%)", A(I2, W, true);
    }
  }, U = () => {
    o.value.left = "50%", o.value.top = "50%", o.value.transform = "translate(-50%, -50%)", o.value.position = "fixed";
  }, V = () => {
    const P = Me(n);
    o.value = t2.altPosition(P);
  }, ee = (P = true) => {
    if (!t2.inline)
      return p.value ? U() : t2.altPosition && typeof t2.altPosition != "boolean" ? V() : (P && a3("recalculate-position"), oe());
  }, B2 = ({
    inputEl: P,
    menuEl: y3,
    left: I2,
    width: W
  }) => {
    window.screen.width > 768 && A(I2, W), x2(P, y3);
  }, L2 = (P, y3) => {
    const { top: I2, left: W, height: N, width: K2 } = d3(P);
    o.value.top = `${N + I2 + +t2.offset}px`, B2({ inputEl: P, menuEl: y3, left: W, width: K2 }), c2.value = false;
  }, C = (P, y3) => {
    const { top: I2, left: W, width: N } = d3(P), { height: K2 } = y3.getBoundingClientRect();
    o.value.top = `${I2 - K2 - +t2.offset}px`, B2({ inputEl: P, menuEl: y3, left: W, width: N }), c2.value = true;
  }, x2 = (P, y3) => {
    if (t2.autoPosition) {
      const { left: I2, width: W } = d3(P), { left: N, right: K2 } = y3.getBoundingClientRect();
      if (N < 0)
        return E2(I2);
      if (K2 > document.documentElement.clientWidth)
        return R2(I2, W);
    }
  }, Q2 = (P, y3) => {
    const { height: I2 } = y3.getBoundingClientRect(), { top: W, height: N } = P.getBoundingClientRect(), te = window.innerHeight - W - N, q2 = W;
    return I2 <= te ? L2(P, y3) : I2 > te && I2 <= q2 ? C(P, y3) : te >= q2 ? L2(P, y3) : C(P, y3);
  }, oe = () => {
    const P = Me(n), y3 = Me(e2);
    if (P && y3)
      return t2.autoPosition ? Q2(P, y3) : L2(P, y3);
  };
  return { openOnTop: c2, menuPosition: o, setMenuPosition: ee, setInitialPosition: M3 };
};
var dt = [
  { name: "clock-icon", use: ["time", "calendar"] },
  { name: "arrow-left", use: ["month-year", "calendar"] },
  { name: "arrow-right", use: ["month-year", "calendar"] },
  { name: "arrow-up", use: ["time", "calendar"] },
  { name: "arrow-down", use: ["time", "calendar"] },
  { name: "calendar-icon", use: ["month-year", "time", "calendar"] },
  { name: "day", use: ["calendar"] },
  { name: "month-overlay-value", use: ["calendar", "month-year"] },
  { name: "year-overlay-value", use: ["calendar", "month-year"] },
  { name: "year-overlay", use: ["month-year"] },
  { name: "month-overlay", use: ["month-year"] },
  { name: "month-overlay-header", use: ["month-year"] },
  { name: "year-overlay-header", use: ["month-year"] },
  { name: "hours-overlay-value", use: ["calendar", "time"] },
  { name: "minutes-overlay-value", use: ["calendar", "time"] },
  { name: "seconds-overlay-value", use: ["calendar", "time"] },
  { name: "hours", use: ["calendar", "time"] },
  { name: "minutes", use: ["calendar", "time"] },
  { name: "month", use: ["calendar", "month-year"] },
  { name: "year", use: ["calendar", "month-year"] },
  { name: "action-select", use: ["action"] },
  { name: "action-preview", use: ["action"] },
  { name: "calendar-header", use: ["calendar"] },
  { name: "marker-tooltip", use: ["calendar"] },
  { name: "now-button", use: [] },
  { name: "time-picker-overlay", use: ["calendar", "time"] },
  { name: "am-pm-button", use: ["calendar", "time"] },
  { name: "left-sidebar", use: ["menu"] },
  { name: "right-sidebar", use: ["menu"] },
  { name: "month-year", use: ["month-year"] },
  { name: "time-picker", use: ["menu"] },
  { name: "action-row", use: ["action"] }
];
var Ul = [{ name: "trigger" }, { name: "input-icon" }, { name: "clear-icon" }, { name: "dp-input" }];
var Hl = {
  all: () => dt,
  monthYear: () => dt.filter((e2) => e2.use.includes("month-year")),
  input: () => Ul,
  timePicker: () => dt.filter((e2) => e2.use.includes("time")),
  action: () => dt.filter((e2) => e2.use.includes("action")),
  calendar: () => dt.filter((e2) => e2.use.includes("calendar")),
  menu: () => dt.filter((e2) => e2.use.includes("menu"))
};
var rt = (e2, n, a3) => {
  const t2 = [];
  return Hl[n]().forEach((o) => {
    e2[o.name] && t2.push(o.name);
  }), a3 && a3.length && a3.forEach((o) => {
    o.slot && t2.push(o.slot);
  }), t2;
};
var Ut = (e2) => ({ transitionName: computed(() => (a3) => e2 && typeof e2 != "boolean" ? a3 ? e2.open : e2.close : ""), showTransition: !!e2 });
var Qe = {
  multiCalendars: { type: [Boolean, Number, String], default: null },
  modelValue: { type: [String, Date, Array, Object, Number], default: null },
  modelType: { type: String, default: null },
  position: { type: String, default: "center" },
  dark: { type: Boolean, default: false },
  format: {
    type: [String, Function],
    default: () => null
  },
  closeOnScroll: { type: Boolean, default: false },
  autoPosition: { type: Boolean, default: true },
  closeOnAutoApply: { type: Boolean, default: true },
  teleport: { type: [String, Object], default: "body" },
  altPosition: { type: [Boolean, Function], default: false },
  transitions: { type: [Boolean, Object], default: true },
  formatLocale: { type: Object, default: null },
  utc: { type: [Boolean, String], default: false },
  ariaLabels: { type: Object, default: () => ({}) },
  offset: { type: [Number, String], default: 10 },
  hideNavigation: { type: Array, default: () => [] },
  timezone: { type: String, default: null },
  vertical: { type: Boolean, default: false },
  disableMonthYearSelect: { type: Boolean, default: false },
  menuClassName: { type: String, default: null },
  dayClass: { type: Function, default: null },
  yearRange: { type: Array, default: () => [1900, 2100] },
  multiCalendarsSolo: { type: Boolean, default: false },
  calendarCellClassName: { type: String, default: null },
  enableTimePicker: { type: Boolean, default: true },
  autoApply: { type: Boolean, default: false },
  disabledDates: { type: [Array, Function], default: () => [] },
  monthNameFormat: { type: String, default: "short" },
  startDate: { type: [Date, String], default: null },
  startTime: { type: [Object, Array], default: null },
  monthYearComponent: { type: Object, default: null },
  timePickerComponent: { type: Object, default: null },
  actionRowComponent: { type: Object, default: null },
  hideOffsetDates: { type: Boolean, default: false },
  autoRange: { type: [Number, String], default: null },
  noToday: { type: Boolean, default: false },
  disabledWeekDays: { type: Array, default: () => [] },
  allowedDates: { type: Array, default: () => [] },
  showNowButton: { type: Boolean, default: false },
  nowButtonLabel: { type: String, default: "Now" },
  markers: { type: Array, default: () => [] },
  modeHeight: { type: [Number, String], default: 255 },
  escClose: { type: Boolean, default: true },
  spaceConfirm: { type: Boolean, default: true },
  monthChangeOnArrows: { type: Boolean, default: true },
  presetRanges: { type: Array, default: () => [] },
  flow: { type: Array, default: () => [] },
  preventMinMaxNavigation: { type: Boolean, default: false },
  minRange: { type: [Number, String], default: null },
  maxRange: { type: [Number, String], default: null },
  multiDatesLimit: { type: [Number, String], default: null },
  reverseYears: { type: Boolean, default: false },
  keepActionRow: { type: Boolean, default: false },
  weekPicker: { type: Boolean, default: false },
  filters: { type: Object, default: () => ({}) },
  arrowNavigation: { type: Boolean, default: false },
  multiStatic: { type: Boolean, default: true },
  disableTimeRangeValidation: { type: Boolean, default: false },
  highlight: {
    type: [Array, Function],
    default: null
  },
  highlightWeekDays: {
    type: Array,
    default: null
  },
  highlightDisabledDays: { type: Boolean, default: false },
  teleportCenter: { type: Boolean, default: false },
  locale: { type: String, default: "en-Us" },
  weekNumName: { type: String, default: "W" },
  weekStart: { type: [Number, String], default: 1 },
  weekNumbers: { type: Boolean, default: false },
  calendarClassName: { type: String, default: null },
  noSwipe: { type: Boolean, default: false },
  monthChangeOnScroll: { type: [Boolean, String], default: true },
  dayNames: {
    type: [Function, Array],
    default: null
  },
  monthPicker: { type: Boolean, default: false },
  customProps: { type: Object, default: null },
  yearPicker: { type: Boolean, default: false },
  modelAuto: { type: Boolean, default: false },
  selectText: { type: String, default: "Select" },
  cancelText: { type: String, default: "Cancel" },
  previewFormat: {
    type: [String, Function],
    default: () => ""
  },
  multiDates: { type: Boolean, default: false },
  partialRange: { type: Boolean, default: true },
  ignoreTimeValidation: { type: Boolean, default: false },
  minDate: { type: [Date, String], default: null },
  maxDate: { type: [Date, String], default: null },
  minTime: { type: Object, default: null },
  maxTime: { type: Object, default: null },
  name: { type: String, default: null },
  placeholder: { type: String, default: "" },
  hideInputIcon: { type: Boolean, default: false },
  clearable: { type: Boolean, default: true },
  state: { type: Boolean, default: null },
  required: { type: Boolean, default: false },
  autocomplete: { type: String, default: "off" },
  inputClassName: { type: String, default: null },
  inlineWithInput: { type: Boolean, default: false },
  textInputOptions: { type: Object, default: () => null },
  fixedStart: { type: Boolean, default: false },
  fixedEnd: { type: Boolean, default: false },
  timePicker: { type: Boolean, default: false },
  enableSeconds: { type: Boolean, default: false },
  is24: { type: Boolean, default: true },
  noHoursOverlay: { type: Boolean, default: false },
  noMinutesOverlay: { type: Boolean, default: false },
  noSecondsOverlay: { type: Boolean, default: false },
  hoursGridIncrement: { type: [String, Number], default: 1 },
  minutesGridIncrement: { type: [String, Number], default: 5 },
  secondsGridIncrement: { type: [String, Number], default: 5 },
  hoursIncrement: { type: [Number, String], default: 1 },
  minutesIncrement: { type: [Number, String], default: 1 },
  secondsIncrement: { type: [Number, String], default: 1 },
  range: { type: Boolean, default: false },
  uid: { type: String, default: null },
  disabled: { type: Boolean, default: false },
  readonly: { type: Boolean, default: false },
  inline: { type: Boolean, default: false },
  textInput: { type: Boolean, default: false },
  onClickOutside: { type: Function, default: null },
  noDisabledRange: { type: Boolean, default: false },
  sixWeeks: { type: Boolean, default: false }
};
var Wl = ["aria-label", "aria-disabled", "aria-readonly"];
var zl = {
  key: 1,
  class: "dp__input_wrap"
};
var jl = ["id", "name", "inputmode", "placeholder", "disabled", "readonly", "required", "value", "autocomplete", "onKeydown"];
var Kl = {
  key: 2,
  class: "dp__input_icon"
};
var xl = {
  key: 4,
  class: "dp__clear_icon"
};
var Gl = defineComponent({
  __name: "DatepickerInput",
  props: {
    isMenuOpen: { type: Boolean, default: false },
    inputValue: { type: String, default: "" },
    ...Qe
  },
  emits: [
    "clear",
    "open",
    "update:input-value",
    "set-input-date",
    "close",
    "select-date",
    "set-empty-date",
    "toggle",
    "focus-prev",
    "focus",
    "blur"
  ],
  setup(e2, { expose: n, emit: a3 }) {
    const t2 = e2, { getDefaultPattern: o, isValidDate: c2, defaults: p } = Ve(t2), $ = ref(), O2 = ref(null), R2 = ref(false), E2 = computed(
      () => ({
        dp__pointer: !t2.disabled && !t2.readonly && !t2.textInput,
        dp__disabled: t2.disabled,
        dp__input_readonly: !t2.textInput,
        dp__input: true,
        dp__input_icon_pad: !t2.hideInputIcon,
        dp__input_valid: t2.state,
        dp__input_invalid: t2.state === false,
        dp__input_focus: R2.value || t2.isMenuOpen,
        dp__input_reg: !t2.textInput,
        [t2.inputClassName]: !!t2.inputClassName
      })
    ), A = () => {
      a3("set-input-date", null), t2.autoApply && (a3("set-empty-date"), $.value = null);
    }, d3 = (y3) => {
      var I2;
      return qa(y3, ((I2 = p.value.textInputOptions) == null ? void 0 : I2.format) || o());
    }, M3 = (y3) => {
      const { rangeSeparator: I2 } = p.value.textInputOptions, [W, N] = y3.split(`${I2}`);
      if (W) {
        const K2 = d3(W.trim()), te = N ? d3(N.trim()) : null, q2 = K2 && te ? [K2, te] : [K2];
        $.value = K2 ? q2 : null;
      }
    }, U = (y3) => {
      if (t2.range)
        M3(y3);
      else if (t2.multiDates) {
        const I2 = y3.split(";");
        $.value = I2.map((W) => d3(W.trim())).filter((W) => W);
      } else
        $.value = d3(y3);
    }, V = (y3) => {
      var W;
      const { value: I2 } = y3.target;
      I2 !== "" ? ((W = p.value.textInputOptions) != null && W.openMenu && !t2.isMenuOpen && a3("open"), U(I2), a3("set-input-date", $.value)) : A(), a3("update:input-value", I2);
    }, ee = () => {
      var y3, I2;
      (y3 = p.value.textInputOptions) != null && y3.enterSubmit && c2($.value) && t2.inputValue !== "" ? (a3("set-input-date", $.value, true), $.value = null) : (I2 = p.value.textInputOptions) != null && I2.enterSubmit && t2.inputValue === "" && ($.value = null, a3("clear"));
    }, B2 = () => {
      var y3, I2;
      (y3 = p.value.textInputOptions) != null && y3.tabSubmit && c2($.value) && t2.inputValue !== "" ? (a3("set-input-date", $.value, true), $.value = null) : (I2 = p.value.textInputOptions) != null && I2.tabSubmit && t2.inputValue === "" && ($.value = null, a3("clear"));
    }, L2 = () => {
      R2.value = true, a3("focus");
    }, C = (y3) => {
      var I2;
      y3.preventDefault(), y3.stopImmediatePropagation(), y3.stopPropagation(), t2.textInput && ((I2 = p.value.textInputOptions) != null && I2.openMenu) && !t2.inlineWithInput ? t2.isMenuOpen ? p.value.textInputOptions.enterSubmit && a3("select-date") : a3("open") : t2.textInput || a3("toggle");
    }, x2 = () => {
      R2.value = false, t2.isMenuOpen || a3("blur"), t2.autoApply && t2.textInput && $.value && (a3("set-input-date", $.value), a3("select-date"), $.value = null);
    }, Q2 = () => {
      a3("clear");
    }, oe = (y3) => {
      t2.textInput || y3.preventDefault();
    };
    return n({
      focusInput: () => {
        O2.value && O2.value.focus({ preventScroll: true });
      }
    }), (y3, I2) => {
      var W;
      return openBlock(), createElementBlock("div", {
        onClick: C,
        "aria-label": (W = unref(p).ariaLabels) == null ? void 0 : W.input,
        role: "textbox",
        "aria-multiline": "false",
        "aria-disabled": y3.disabled,
        "aria-readonly": y3.readonly
      }, [
        y3.$slots.trigger && !y3.$slots["dp-input"] && !y3.inline ? renderSlot(y3.$slots, "trigger", { key: 0 }) : createCommentVNode("", true),
        !y3.$slots.trigger && (!y3.inline || y3.inlineWithInput) ? (openBlock(), createElementBlock("div", zl, [
          y3.$slots["dp-input"] && !y3.$slots.trigger && !y3.inline ? renderSlot(y3.$slots, "dp-input", {
            key: 0,
            value: e2.inputValue,
            onInput: V,
            onEnter: ee,
            onTab: B2,
            onClear: Q2
          }) : createCommentVNode("", true),
          y3.$slots["dp-input"] ? createCommentVNode("", true) : (openBlock(), createElementBlock("input", {
            key: 1,
            ref_key: "inputRef",
            ref: O2,
            id: y3.uid ? `dp-input-${y3.uid}` : void 0,
            name: y3.name,
            class: normalizeClass(unref(E2)),
            inputmode: y3.textInput ? "text" : "none",
            placeholder: y3.placeholder,
            disabled: y3.disabled,
            readonly: y3.readonly,
            required: y3.required,
            value: e2.inputValue,
            autocomplete: y3.autocomplete,
            onInput: V,
            onKeydown: [
              withKeys(C, ["enter"]),
              withKeys(B2, ["tab"])
            ],
            onBlur: x2,
            onFocus: L2,
            onKeypress: oe
          }, null, 42, jl)),
          y3.$slots["input-icon"] && !y3.hideInputIcon ? (openBlock(), createElementBlock("span", Kl, [
            renderSlot(y3.$slots, "input-icon")
          ])) : createCommentVNode("", true),
          !y3.$slots["input-icon"] && !y3.hideInputIcon && !y3.$slots["dp-input"] ? (openBlock(), createBlock(unref(Ft), {
            key: 3,
            class: "dp__input_icon dp__input_icons"
          })) : createCommentVNode("", true),
          y3.$slots["clear-icon"] && e2.inputValue && y3.clearable && !y3.disabled && !y3.readonly ? (openBlock(), createElementBlock("span", xl, [
            renderSlot(y3.$slots, "clear-icon", { clear: Q2 })
          ])) : createCommentVNode("", true),
          y3.clearable && !y3.$slots["clear-icon"] && e2.inputValue && !y3.disabled && !y3.readonly ? (openBlock(), createBlock(unref(Ma), {
            key: 5,
            class: "dp__clear_icon dp__input_icons",
            "data-test": "clear-icon",
            onClick: withModifiers(Q2, ["stop", "prevent"])
          }, null, 8, ["onClick"])) : createCommentVNode("", true)
        ])) : createCommentVNode("", true)
      ], 8, Wl);
    };
  }
});
var Zl = { class: "dp__selection_preview" };
var Xl = { class: "dp__action_buttons" };
var ql = ["onKeydown"];
var Jl = defineComponent({
  __name: "ActionRow",
  props: {
    calendarWidth: { type: Number, default: 0 },
    menuMount: { type: Boolean, default: false },
    internalModelValue: { type: [Date, Array], default: null },
    ...Qe
  },
  emits: ["close-picker", "select-date", "invalid-select"],
  setup(e2, { emit: n }) {
    const a3 = e2, { formatDate: t2, isValidTime: o, defaults: c2 } = Ve(a3), { buildMatrix: p } = Je(), $ = ref(null), O2 = ref(null);
    onMounted(() => {
      a3.arrowNavigation && p([Me($), Me(O2)], "actionRow");
    });
    const R2 = computed(() => a3.range && !a3.partialRange && a3.internalModelValue ? a3.internalModelValue.length === 2 : true), E2 = computed(() => !d3.value || !M3.value || !R2.value), A = computed(() => ({
      dp__action: true,
      dp__select: true,
      dp__action_disabled: E2.value
    })), d3 = computed(() => !a3.enableTimePicker || a3.ignoreTimeValidation ? true : o(a3.internalModelValue)), M3 = computed(() => a3.monthPicker ? B2(a3.internalModelValue) : true), U = () => {
      const C = c2.value.previewFormat;
      return a3.timePicker || a3.monthPicker, C(_e(a3.internalModelValue));
    }, V = () => {
      const C = a3.internalModelValue;
      return c2.value.multiCalendars > 0 ? `${t2(C[0])} - ${t2(C[1])}` : [t2(C[0]), t2(C[1])];
    }, ee = computed(() => !a3.internalModelValue || !a3.menuMount ? "" : typeof c2.value.previewFormat == "string" ? Array.isArray(a3.internalModelValue) ? a3.internalModelValue.length === 2 && a3.internalModelValue[1] ? V() : a3.multiDates ? a3.internalModelValue.map((C) => `${t2(C)}`) : a3.modelAuto ? `${t2(a3.internalModelValue[0])}` : `${t2(a3.internalModelValue[0])} -` : t2(a3.internalModelValue) : U()), B2 = (C) => {
      if (!a3.monthPicker)
        return true;
      let x2 = true;
      return a3.minDate && a3.maxDate ? Oe(w2(C), w2(a3.minDate)) && Pe(w2(C), w2(a3.maxDate)) : (a3.minDate && (x2 = Oe(w2(C), w2(a3.minDate))), a3.maxDate && (x2 = Pe(w2(C), w2(a3.maxDate))), x2);
    }, L2 = () => {
      d3.value && M3.value && R2.value ? n("select-date") : n("invalid-select");
    };
    return (C, x2) => (openBlock(), createElementBlock("div", {
      class: "dp__action_row",
      style: normalizeStyle(e2.calendarWidth ? { width: `${e2.calendarWidth}px` } : {})
    }, [
      C.$slots["action-row"] ? renderSlot(C.$slots, "action-row", normalizeProps(mergeProps({ key: 0 }, {
        internalModelValue: e2.internalModelValue,
        disabled: unref(E2),
        selectDate: () => C.$emit("select-date"),
        closePicker: () => C.$emit("close-picker")
      }))) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
        createBaseVNode("div", Zl, [
          C.$slots["action-preview"] ? renderSlot(C.$slots, "action-preview", {
            key: 0,
            value: e2.internalModelValue
          }) : createCommentVNode("", true),
          C.$slots["action-preview"] ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
            Array.isArray(unref(ee)) ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 0 }, [
              createTextVNode(toDisplayString(unref(ee)), 1)
            ], 64)),
            Array.isArray(unref(ee)) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(ee), (Q2, oe) => (openBlock(), createElementBlock("div", { key: oe }, toDisplayString(Q2), 1))), 128)) : createCommentVNode("", true)
          ], 64))
        ]),
        createBaseVNode("div", Xl, [
          C.$slots["action-select"] ? renderSlot(C.$slots, "action-select", {
            key: 0,
            value: e2.internalModelValue
          }) : createCommentVNode("", true),
          C.$slots["action-select"] ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
            C.inline ? createCommentVNode("", true) : (openBlock(), createElementBlock("span", {
              key: 0,
              class: "dp__action dp__cancel",
              ref_key: "cancelButtonRef",
              ref: $,
              tabindex: "0",
              onClick: x2[0] || (x2[0] = (Q2) => C.$emit("close-picker")),
              onKeydown: [
                x2[1] || (x2[1] = withKeys((Q2) => C.$emit("close-picker"), ["enter"])),
                x2[2] || (x2[2] = withKeys((Q2) => C.$emit("close-picker"), ["space"]))
              ]
            }, toDisplayString(C.cancelText), 545)),
            createBaseVNode("span", {
              class: normalizeClass(unref(A)),
              tabindex: "0",
              onKeydown: [
                withKeys(L2, ["enter"]),
                withKeys(L2, ["space"])
              ],
              onClick: L2,
              "data-test": "select-button",
              ref_key: "selectButtonRef",
              ref: O2
            }, toDisplayString(C.selectText), 43, ql)
          ], 64))
        ])
      ], 64))
    ], 4));
  }
});
var Ql = ["aria-label"];
var er = {
  class: "dp__calendar_header",
  role: "row"
};
var tr = {
  key: 0,
  class: "dp__calendar_header_item",
  role: "gridcell"
};
var nr = createBaseVNode("div", { class: "dp__calendar_header_separator" }, null, -1);
var ar = ["aria-label"];
var lr = {
  key: 0,
  role: "gridcell",
  class: "dp__calendar_item dp__week_num"
};
var rr = { class: "dp__cell_inner" };
var or = ["aria-selected", "aria-disabled", "aria-label", "data-test", "onClick", "onKeydown", "onMouseenter", "onMouseleave"];
var sr = createBaseVNode("div", { class: "dp__arrow_bottom_tp" }, null, -1);
var ir = defineComponent({
  __name: "Calendar",
  props: {
    mappedDates: { type: Array, default: () => [] },
    getWeekNum: {
      type: Function,
      default: () => ""
    },
    specificMode: { type: Boolean, default: false },
    instance: { type: Number, default: 0 },
    month: { type: Number, default: 0 },
    year: { type: Number, default: 0 },
    ...Qe
  },
  emits: [
    "select-date",
    "set-hover-date",
    "handle-scroll",
    "mount",
    "handle-swipe",
    "handle-space",
    "tooltip-open",
    "tooltip-close"
  ],
  setup(e2, { expose: n, emit: a3 }) {
    const t2 = e2, { buildMultiLevelMatrix: o } = Je(), { setDateMonthOrYear: c2, defaults: p } = Ve(t2), $ = ref(null), O2 = ref({ bottom: "", left: "", transform: "" }), R2 = ref([]), E2 = ref(null), A = ref(true), d3 = ref(""), M3 = ref({ startX: 0, endX: 0, startY: 0, endY: 0 }), U = computed(() => t2.dayNames ? Array.isArray(t2.dayNames) ? t2.dayNames : t2.dayNames(t2.locale, +t2.weekStart) : Tl(t2.locale, +t2.weekStart));
    onMounted(() => {
      a3("mount", { cmp: "calendar", refs: R2 }), t2.noSwipe || E2.value && (E2.value.addEventListener("touchstart", I2, { passive: false }), E2.value.addEventListener("touchend", W, { passive: false }), E2.value.addEventListener("touchmove", N, { passive: false })), t2.monthChangeOnScroll && E2.value && E2.value.addEventListener("wheel", q2, { passive: false });
    });
    const V = (_) => _ ? t2.vertical ? "vNext" : "next" : t2.vertical ? "vPrevious" : "previous", ee = (_, T2) => {
      if (t2.transitions) {
        const u2 = ze(c2(w2(), t2.month, t2.year));
        d3.value = Oe(ze(c2(w2(), _, T2)), u2) ? p.value.transitions[V(true)] : p.value.transitions[V(false)], A.value = false, nextTick(() => {
          A.value = true;
        });
      }
    }, B2 = computed(
      () => ({
        dp__calendar_wrap: true,
        [t2.calendarClassName]: !!t2.calendarClassName
      })
    ), L2 = computed(() => (_) => {
      const T2 = Pl(_);
      return {
        dp__marker_dot: T2.type === "dot",
        dp__marker_line: T2.type === "line"
      };
    }), C = computed(() => (_) => ke(_, $.value)), x2 = computed(() => ({
      dp__calendar: true,
      dp__calendar_next: p.value.multiCalendars > 0 && t2.instance !== 0
    })), Q2 = computed(() => (_) => t2.hideOffsetDates ? _.current : true), oe = computed(() => t2.specificMode ? { height: `${t2.modeHeight}px` } : void 0), P = (_, T2, u2) => {
      var l, v;
      if (a3("set-hover-date", _), (v = (l = _.marker) == null ? void 0 : l.tooltip) != null && v.length) {
        const m3 = Me(R2.value[T2][u2]);
        if (m3) {
          const { width: k2, height: G2 } = m3.getBoundingClientRect();
          O2.value = {
            bottom: `${G2}px`,
            left: `${k2 / 2}px`,
            transform: "translateX(-50%)"
          }, $.value = _.value, a3("tooltip-open", _.value);
        }
      }
    }, y3 = (_) => {
      $.value && ($.value = null, a3("tooltip-close", _.value));
    }, I2 = (_) => {
      M3.value.startX = _.changedTouches[0].screenX, M3.value.startY = _.changedTouches[0].screenY;
    }, W = (_) => {
      M3.value.endX = _.changedTouches[0].screenX, M3.value.endY = _.changedTouches[0].screenY, K2();
    }, N = (_) => {
      t2.vertical && !t2.inline && _.preventDefault();
    }, K2 = () => {
      const _ = t2.vertical ? "Y" : "X";
      Math.abs(M3.value[`start${_}`] - M3.value[`end${_}`]) > 10 && a3("handle-swipe", M3.value[`start${_}`] > M3.value[`end${_}`] ? "right" : "left");
    }, te = (_, T2, u2) => {
      _ && (Array.isArray(R2.value[T2]) ? R2.value[T2][u2] = _ : R2.value[T2] = [_]), t2.arrowNavigation && o(R2.value, "calendar");
    }, q2 = (_) => {
      t2.monthChangeOnScroll && (_.preventDefault(), a3("handle-scroll", _));
    };
    return n({ triggerTransition: ee }), (_, T2) => {
      var u2;
      return openBlock(), createElementBlock("div", {
        class: normalizeClass(unref(x2))
      }, [
        createBaseVNode("div", {
          style: normalizeStyle(unref(oe))
        }, [
          e2.specificMode ? createCommentVNode("", true) : (openBlock(), createElementBlock("div", {
            key: 0,
            ref_key: "calendarWrapRef",
            ref: E2,
            class: normalizeClass(unref(B2)),
            role: "grid",
            "aria-label": (u2 = unref(p).ariaLabels) == null ? void 0 : u2.calendarWrap
          }, [
            createBaseVNode("div", er, [
              _.weekNumbers ? (openBlock(), createElementBlock("div", tr, toDisplayString(_.weekNumName), 1)) : createCommentVNode("", true),
              (openBlock(true), createElementBlock(Fragment, null, renderList(unref(U), (l, v) => (openBlock(), createElementBlock("div", {
                class: "dp__calendar_header_item",
                role: "gridcell",
                key: v,
                "data-test": "calendar-header"
              }, [
                _.$slots["calendar-header"] ? renderSlot(_.$slots, "calendar-header", {
                  key: 0,
                  day: l,
                  index: v
                }) : createCommentVNode("", true),
                _.$slots["calendar-header"] ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                  createTextVNode(toDisplayString(l), 1)
                ], 64))
              ]))), 128))
            ]),
            nr,
            createVNode(Transition, {
              name: d3.value,
              css: !!_.transitions
            }, {
              default: withCtx(() => {
                var l;
                return [
                  A.value ? (openBlock(), createElementBlock("div", {
                    key: 0,
                    class: "dp__calendar",
                    role: "grid",
                    "aria-label": (l = unref(p).ariaLabels) == null ? void 0 : l.calendarDays
                  }, [
                    (openBlock(true), createElementBlock(Fragment, null, renderList(e2.mappedDates, (v, m3) => (openBlock(), createElementBlock("div", {
                      class: "dp__calendar_row",
                      role: "row",
                      key: m3
                    }, [
                      _.weekNumbers ? (openBlock(), createElementBlock("div", lr, [
                        createBaseVNode("div", rr, toDisplayString(e2.getWeekNum(v.days)), 1)
                      ])) : createCommentVNode("", true),
                      (openBlock(true), createElementBlock(Fragment, null, renderList(v.days, (k2, G2) => {
                        var Z, se, f;
                        return openBlock(), createElementBlock("div", {
                          role: "gridcell",
                          class: "dp__calendar_item",
                          ref_for: true,
                          ref: (r) => te(r, m3, G2),
                          key: G2 + m3,
                          "aria-selected": k2.classData.dp__active_date || k2.classData.dp__range_start || k2.classData.dp__range_start,
                          "aria-disabled": k2.classData.dp__cell_disabled,
                          "aria-label": (se = (Z = unref(p).ariaLabels) == null ? void 0 : Z.day) == null ? void 0 : se.call(Z, k2),
                          tabindex: "0",
                          "data-test": k2.value,
                          onClick: withModifiers((r) => _.$emit("select-date", k2), ["stop", "prevent"]),
                          onKeydown: [
                            withKeys((r) => _.$emit("select-date", k2), ["enter"]),
                            withKeys((r) => _.$emit("handle-space", k2), ["space"])
                          ],
                          onMouseenter: (r) => P(k2, m3, G2),
                          onMouseleave: (r) => y3(k2)
                        }, [
                          createBaseVNode("div", {
                            class: normalizeClass(["dp__cell_inner", k2.classData])
                          }, [
                            _.$slots.day && unref(Q2)(k2) ? renderSlot(_.$slots, "day", {
                              key: 0,
                              day: +k2.text,
                              date: k2.value
                            }) : createCommentVNode("", true),
                            _.$slots.day ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                              createTextVNode(toDisplayString(k2.text), 1)
                            ], 64)),
                            k2.marker && unref(Q2)(k2) ? (openBlock(), createElementBlock("div", {
                              key: 2,
                              class: normalizeClass(unref(L2)(k2.marker)),
                              style: normalizeStyle(k2.marker.color ? { backgroundColor: k2.marker.color } : {})
                            }, null, 6)) : createCommentVNode("", true),
                            unref(C)(k2.value) ? (openBlock(), createElementBlock("div", {
                              key: 3,
                              class: "dp__marker_tooltip",
                              style: normalizeStyle(O2.value)
                            }, [
                              (f = k2.marker) != null && f.tooltip ? (openBlock(), createElementBlock("div", {
                                key: 0,
                                class: "dp__tooltip_content",
                                onClick: T2[0] || (T2[0] = withModifiers(() => {
                                }, ["stop"]))
                              }, [
                                (openBlock(true), createElementBlock(Fragment, null, renderList(k2.marker.tooltip, (r, J) => (openBlock(), createElementBlock("div", {
                                  key: J,
                                  class: "dp__tooltip_text"
                                }, [
                                  _.$slots["marker-tooltip"] ? renderSlot(_.$slots, "marker-tooltip", {
                                    key: 0,
                                    tooltip: r,
                                    day: k2.value
                                  }) : createCommentVNode("", true),
                                  _.$slots["marker-tooltip"] ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                                    createBaseVNode("div", {
                                      class: "dp__tooltip_mark",
                                      style: normalizeStyle(r.color ? { backgroundColor: r.color } : {})
                                    }, null, 4),
                                    createBaseVNode("div", null, toDisplayString(r.text), 1)
                                  ], 64))
                                ]))), 128)),
                                sr
                              ])) : createCommentVNode("", true)
                            ], 4)) : createCommentVNode("", true)
                          ], 2)
                        ], 40, or);
                      }), 128))
                    ]))), 128))
                  ], 8, ar)) : createCommentVNode("", true)
                ];
              }),
              _: 3
            }, 8, ["name", "css"])
          ], 10, Ql))
        ], 4)
      ], 2);
    };
  }
});
var ur = ["aria-label", "aria-disabled"];
var nn = defineComponent({
  __name: "ActionIcon",
  props: {
    ariaLabel: { type: String, default: "" },
    disabled: { type: Boolean, default: false }
  },
  emits: ["activate", "set-ref"],
  setup(e2, { emit: n }) {
    const a3 = ref(null);
    return onMounted(() => n("set-ref", a3)), (t2, o) => (openBlock(), createElementBlock("div", {
      class: "dp__month_year_col_nav",
      onClick: o[0] || (o[0] = (c2) => t2.$emit("activate")),
      onKeydown: [
        o[1] || (o[1] = withKeys((c2) => t2.$emit("activate"), ["enter"])),
        o[2] || (o[2] = withKeys((c2) => t2.$emit("activate"), ["space"]))
      ],
      tabindex: "0",
      role: "button",
      "aria-label": e2.ariaLabel,
      "aria-disabled": e2.disabled,
      ref_key: "elRef",
      ref: a3
    }, [
      createBaseVNode("div", {
        class: normalizeClass(["dp__inner_nav", { dp__inner_nav_disabled: e2.disabled }])
      }, [
        renderSlot(t2.$slots, "default")
      ], 2)
    ], 40, ur));
  }
});
var dr = ["onKeydown"];
var cr = { class: "dp__selection_grid_header" };
var fr = ["aria-selected", "aria-disabled", "data-test", "onClick", "onKeydown", "onMouseover"];
var mr = ["aria-label", "onKeydown"];
var $t = defineComponent({
  __name: "SelectionGrid",
  props: {
    items: { type: Array, default: () => [] },
    modelValue: { type: [String, Number], default: null },
    multiModelValue: { type: Array, default: () => [] },
    disabledValues: { type: Array, default: () => [] },
    minValue: { type: [Number, String], default: null },
    maxValue: { type: [Number, String], default: null },
    year: { type: Number, default: 0 },
    skipActive: { type: Boolean, default: false },
    headerRefs: { type: Array, default: () => [] },
    skipButtonRef: { type: Boolean, default: false },
    monthPicker: { type: Boolean, default: false },
    yearPicker: { type: Boolean, default: false },
    escClose: { type: Boolean, default: true },
    type: { type: String, default: null },
    arrowNavigation: { type: Boolean, default: false },
    autoApply: { type: Boolean, default: false },
    textInput: { type: Boolean, default: false },
    ariaLabels: { type: Object, default: () => ({}) },
    hideNavigation: { type: Array, default: () => [] }
  },
  emits: ["update:model-value", "selected", "toggle", "reset-flow"],
  setup(e2, { expose: n, emit: a3 }) {
    const t2 = e2, { setSelectionGrid: o, buildMultiLevelMatrix: c2, setMonthPicker: p } = Je(), { hideNavigationButtons: $ } = Ve(t2), O2 = ref(false), R2 = ref(null), E2 = ref(null), A = ref([]), d3 = ref(), M3 = ref(null), U = ref(0), V = ref(null);
    onBeforeUpdate(() => {
      R2.value = null;
    }), onMounted(() => {
      nextTick().then(() => I2()), B2(), ee(true);
    }), onUnmounted(() => ee(false));
    const ee = (T2) => {
      var u2;
      t2.arrowNavigation && ((u2 = t2.headerRefs) != null && u2.length ? p(T2) : o(T2));
    }, B2 = () => {
      const T2 = Me(E2);
      T2 && (t2.textInput || T2.focus({ preventScroll: true }), O2.value = T2.clientHeight < T2.scrollHeight);
    }, L2 = computed(
      () => ({
        dp__overlay: true
      })
    ), C = computed(() => ({
      dp__overlay_col: true
    })), x2 = (T2) => t2.skipActive ? false : T2.value === t2.modelValue, Q2 = computed(() => t2.items.map((T2) => T2.filter((u2) => u2).map((u2) => {
      var m3, k2, G2;
      const l = t2.disabledValues.some((Z) => Z === u2.value) || y3(u2.value), v = (m3 = t2.multiModelValue) != null && m3.length ? (k2 = t2.multiModelValue) == null ? void 0 : k2.some(
        (Z) => ke(
          Z,
          setYear(
            t2.monthPicker ? setMonth(/* @__PURE__ */ new Date(), u2.value) : /* @__PURE__ */ new Date(),
            t2.monthPicker ? t2.year : u2.value
          )
        )
      ) : x2(u2);
      return {
        ...u2,
        className: {
          dp__overlay_cell_active: v,
          dp__overlay_cell: !v,
          dp__overlay_cell_disabled: l,
          dp__overlay_cell_active_disabled: l && v,
          dp__overlay_cell_pad: true,
          dp__cell_in_between: (G2 = t2.multiModelValue) != null && G2.length ? N(u2.value) : false
        }
      };
    }))), oe = computed(
      () => ({
        dp__button: true,
        dp__overlay_action: true,
        dp__over_action_scroll: O2.value,
        dp__button_bottom: t2.autoApply
      })
    ), P = computed(() => {
      var T2, u2;
      return {
        dp__overlay_container: true,
        dp__container_flex: ((T2 = t2.items) == null ? void 0 : T2.length) <= 6,
        dp__container_block: ((u2 = t2.items) == null ? void 0 : u2.length) > 6
      };
    }), y3 = (T2) => {
      const u2 = t2.maxValue || t2.maxValue === 0, l = t2.minValue || t2.minValue === 0;
      return !u2 && !l ? false : u2 && l ? +T2 > +t2.maxValue || +T2 < +t2.minValue : u2 ? +T2 > +t2.maxValue : l ? +T2 < +t2.minValue : false;
    }, I2 = () => {
      const T2 = Me(R2), u2 = Me(E2), l = Me(M3), v = Me(V), m3 = l ? l.getBoundingClientRect().height : 0;
      u2 && (U.value = u2.getBoundingClientRect().height - m3), T2 && v && (v.scrollTop = T2.offsetTop - v.offsetTop - (U.value / 2 - T2.getBoundingClientRect().height) - m3);
    }, W = (T2) => {
      !t2.disabledValues.some((u2) => u2 === T2) && !y3(T2) && (a3("update:model-value", T2), a3("selected"));
    }, N = (T2) => {
      const u2 = t2.monthPicker ? t2.year : T2;
      return zn(
        t2.multiModelValue,
        setYear(
          t2.monthPicker ? setMonth(/* @__PURE__ */ new Date(), d3.value || 0) : /* @__PURE__ */ new Date(),
          t2.monthPicker ? u2 : d3.value || u2
        ),
        setYear(t2.monthPicker ? setMonth(/* @__PURE__ */ new Date(), T2) : /* @__PURE__ */ new Date(), u2)
      );
    }, K2 = () => {
      a3("toggle"), a3("reset-flow");
    }, te = () => {
      t2.escClose && K2();
    }, q2 = (T2, u2, l, v) => {
      T2 && (u2.value === +t2.modelValue && !t2.disabledValues.includes(u2.value) && (R2.value = T2), t2.arrowNavigation && (Array.isArray(A.value[l]) ? A.value[l][v] = T2 : A.value[l] = [T2], _()));
    }, _ = () => {
      var u2, l;
      const T2 = (u2 = t2.headerRefs) != null && u2.length ? [t2.headerRefs].concat(A.value) : A.value.concat([t2.skipButtonRef ? [] : [M3.value]]);
      c2(_e(T2), (l = t2.headerRefs) != null && l.length ? "monthPicker" : "selectionGrid");
    };
    return n({ focusGrid: B2 }), (T2, u2) => {
      var l;
      return openBlock(), createElementBlock("div", {
        ref_key: "gridWrapRef",
        ref: E2,
        class: normalizeClass(unref(L2)),
        role: "dialog",
        tabindex: "0",
        onKeydown: withKeys(te, ["esc"])
      }, [
        createBaseVNode("div", {
          class: normalizeClass(unref(P)),
          ref_key: "containerRef",
          ref: V,
          role: "grid",
          style: normalizeStyle({ height: `${U.value}px` })
        }, [
          createBaseVNode("div", cr, [
            renderSlot(T2.$slots, "header")
          ]),
          T2.$slots.overlay ? renderSlot(T2.$slots, "overlay", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(Q2), (v, m3) => (openBlock(), createElementBlock("div", {
            class: "dp__overlay_row",
            key: m3,
            role: "row"
          }, [
            (openBlock(true), createElementBlock(Fragment, null, renderList(v, (k2, G2) => (openBlock(), createElementBlock("div", {
              role: "gridcell",
              class: normalizeClass(unref(C)),
              key: k2.value,
              "aria-selected": k2.value === e2.modelValue && !e2.disabledValues.includes(k2.value),
              "aria-disabled": k2.className.dp__overlay_cell_disabled,
              ref_for: true,
              ref: (Z) => q2(Z, k2, m3, G2),
              tabindex: "0",
              "data-test": k2.text,
              onClick: (Z) => W(k2.value),
              onKeydown: [
                withKeys((Z) => W(k2.value), ["enter"]),
                withKeys((Z) => W(k2.value), ["space"])
              ],
              onMouseover: (Z) => d3.value = k2.value
            }, [
              createBaseVNode("div", {
                class: normalizeClass(k2.className)
              }, [
                T2.$slots.item ? renderSlot(T2.$slots, "item", {
                  key: 0,
                  item: k2
                }) : createCommentVNode("", true),
                T2.$slots.item ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                  createTextVNode(toDisplayString(k2.text), 1)
                ], 64))
              ], 2)
            ], 42, fr))), 128))
          ]))), 128))
        ], 6),
        T2.$slots["button-icon"] ? withDirectives((openBlock(), createElementBlock("div", {
          key: 0,
          role: "button",
          "aria-label": (l = e2.ariaLabels) == null ? void 0 : l.toggleOverlay,
          class: normalizeClass(unref(oe)),
          tabindex: "0",
          ref_key: "toggleButton",
          ref: M3,
          onClick: K2,
          onKeydown: withKeys(K2, ["enter"])
        }, [
          renderSlot(T2.$slots, "button-icon")
        ], 42, mr)), [
          [vShow, !unref($)(e2.type)]
        ]) : createCommentVNode("", true)
      ], 42, dr);
    };
  }
});
var vr = ["aria-label"];
var Bn = defineComponent({
  __name: "RegularPicker",
  props: {
    ariaLabel: { type: String, default: "" },
    showSelectionGrid: { type: Boolean, default: false },
    modelValue: { type: Number, default: null },
    items: { type: Array, default: () => [] },
    disabledValues: { type: Array, default: () => [] },
    minValue: { type: Number, default: null },
    maxValue: { type: Number, default: null },
    slotName: { type: String, default: "" },
    overlaySlot: { type: String, default: "" },
    headerRefs: { type: Array, default: () => [] },
    escClose: { type: Boolean, default: true },
    type: { type: String, default: null },
    transitions: { type: [Object, Boolean], default: false },
    arrowNavigation: { type: Boolean, default: false },
    autoApply: { type: Boolean, default: false },
    textInput: { type: Boolean, default: false },
    ariaLabels: { type: Object, default: () => ({}) },
    hideNavigation: { type: Array, default: () => [] }
  },
  emits: ["update:model-value", "toggle", "set-ref"],
  setup(e2, { emit: n }) {
    const a3 = e2, { transitionName: t2, showTransition: o } = Ut(a3.transitions), c2 = ref(null);
    return onMounted(() => n("set-ref", c2)), (p, $) => (openBlock(), createElementBlock(Fragment, null, [
      createBaseVNode("div", {
        class: "dp__month_year_select",
        onClick: $[0] || ($[0] = (O2) => p.$emit("toggle")),
        onKeydown: [
          $[1] || ($[1] = withKeys((O2) => p.$emit("toggle"), ["enter"])),
          $[2] || ($[2] = withKeys((O2) => p.$emit("toggle"), ["space"]))
        ],
        role: "button",
        "aria-label": e2.ariaLabel,
        tabindex: "0",
        ref_key: "elRef",
        ref: c2
      }, [
        renderSlot(p.$slots, "default")
      ], 40, vr),
      createVNode(Transition, {
        name: unref(t2)(e2.showSelectionGrid),
        css: unref(o)
      }, {
        default: withCtx(() => [
          e2.showSelectionGrid ? (openBlock(), createBlock($t, mergeProps({ key: 0 }, {
            modelValue: e2.modelValue,
            items: e2.items,
            disabledValues: e2.disabledValues,
            minValue: e2.minValue,
            maxValue: e2.maxValue,
            escClose: e2.escClose,
            type: e2.type,
            arrowNavigation: e2.arrowNavigation,
            textInput: e2.textInput,
            autoApply: e2.autoApply,
            ariaLabels: e2.ariaLabels,
            hideNavigation: e2.hideNavigation
          }, {
            "header-refs": [],
            "onUpdate:modelValue": $[3] || ($[3] = (O2) => p.$emit("update:model-value", O2)),
            onToggle: $[4] || ($[4] = (O2) => p.$emit("toggle"))
          }), createSlots({
            "button-icon": withCtx(() => [
              p.$slots["calendar-icon"] ? renderSlot(p.$slots, "calendar-icon", { key: 0 }) : createCommentVNode("", true),
              p.$slots["calendar-icon"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(Ft), { key: 1 }))
            ]),
            _: 2
          }, [
            p.$slots[e2.slotName] ? {
              name: "item",
              fn: withCtx(({ item: O2 }) => [
                renderSlot(p.$slots, e2.slotName, { item: O2 })
              ]),
              key: "0"
            } : void 0,
            p.$slots[e2.overlaySlot] ? {
              name: "overlay",
              fn: withCtx(() => [
                renderSlot(p.$slots, e2.overlaySlot)
              ]),
              key: "1"
            } : void 0,
            p.$slots[`${e2.overlaySlot}-header`] ? {
              name: "header",
              fn: withCtx(() => [
                renderSlot(p.$slots, `${e2.overlaySlot}-header`)
              ]),
              key: "2"
            } : void 0
          ]), 1040)) : createCommentVNode("", true)
        ]),
        _: 3
      }, 8, ["name", "css"])
    ], 64));
  }
});
var yr = { class: "dp__month_year_row" };
var hr = { class: "dp__month_year_wrap" };
var gr = { class: "dp__month_picker_header" };
var pr = ["aria-label"];
var kr = ["aria-label"];
var wr = ["aria-label"];
var br = defineComponent({
  __name: "MonthYearPicker",
  props: {
    month: { type: Number, default: 0 },
    year: { type: Number, default: 0 },
    instance: { type: Number, default: 0 },
    years: { type: Array, default: () => [] },
    months: { type: Array, default: () => [] },
    internalModelValue: { type: [Date, Array], default: null },
    ...Qe
  },
  emits: ["update-month-year", "month-year-select", "mount", "reset-flow", "overlay-closed"],
  setup(e2, { expose: n, emit: a3 }) {
    const t2 = e2, { defaults: o } = Ve(t2), { transitionName: c2, showTransition: p } = Ut(o.value.transitions), { buildMatrix: $ } = Je(), { handleMonthYearChange: O2, isDisabled: R2, updateMonthYear: E2 } = El(t2, a3), A = ref(false), d3 = ref(false), M3 = ref([null, null, null, null]), U = ref(null), V = ref(null), ee = ref(null);
    onMounted(() => {
      a3("mount");
    });
    const B2 = (f) => ({
      get: () => t2[f],
      set: (r) => {
        const J = f === "month" ? "year" : "month";
        a3("update-month-year", { [f]: r, [J]: t2[J] }), a3("month-year-select", f === "year"), f === "month" ? m3(true) : k2(true);
      }
    }), L2 = computed(B2("month")), C = computed(B2("year")), x2 = (f) => {
      const r = getYear(w2(f));
      return t2.year === r;
    }, Q2 = computed(() => t2.monthPicker ? Array.isArray(t2.disabledDates) ? t2.disabledDates.map((f) => w2(f)).filter((f) => x2(f)).map((f) => getMonth(f)) : [] : []), oe = computed(() => (f) => {
      const r = f === "month";
      return {
        showSelectionGrid: (r ? A : d3).value,
        items: (r ? T2 : u2).value,
        disabledValues: o.value.filters[r ? "months" : "years"].concat(Q2.value),
        minValue: (r ? W : y3).value,
        maxValue: (r ? N : I2).value,
        headerRefs: r && t2.monthPicker ? [U.value, V.value, ee.value] : [],
        escClose: t2.escClose,
        transitions: o.value.transitions,
        ariaLabels: o.value.ariaLabels,
        textInput: t2.textInput,
        autoApply: t2.autoApply,
        arrowNavigation: t2.arrowNavigation,
        hideNavigation: t2.hideNavigation
      };
    }), P = computed(() => (f) => ({
      month: t2.month,
      year: t2.year,
      items: f === "month" ? t2.months : t2.years,
      instance: t2.instance,
      updateMonthYear: E2,
      toggle: f === "month" ? m3 : k2
    })), y3 = computed(() => t2.minDate ? getYear(w2(t2.minDate)) : null), I2 = computed(() => t2.maxDate ? getYear(w2(t2.maxDate)) : null), W = computed(() => {
      if (t2.minDate && y3.value) {
        if (y3.value > t2.year)
          return 12;
        if (y3.value === t2.year)
          return getMonth(w2(t2.minDate));
      }
      return null;
    }), N = computed(() => t2.maxDate && I2.value ? I2.value < t2.year ? -1 : I2.value === t2.year ? getMonth(w2(t2.maxDate)) : null : null), K2 = computed(() => t2.range && t2.internalModelValue && (t2.monthPicker || t2.yearPicker) ? t2.internalModelValue : []), te = (f) => f.reverse(), q2 = (f, r = false) => {
      const J = [], be = (we) => r ? te(we) : we;
      for (let we = 0; we < f.length; we += 3) {
        const He = [f[we], f[we + 1], f[we + 2]];
        J.push(be(He));
      }
      return r ? J.reverse() : J;
    }, _ = computed(() => {
      const f = t2.months.find((r) => r.value === t2.month);
      return f || { text: "", value: 0 };
    }), T2 = computed(() => q2(t2.months)), u2 = computed(() => q2(t2.years, t2.reverseYears)), l = computed(() => o.value.multiCalendars ? t2.multiCalendarsSolo ? true : t2.instance === 0 : true), v = computed(() => o.value.multiCalendars ? t2.multiCalendarsSolo ? true : t2.instance === o.value.multiCalendars - 1 : true), m3 = (f = false) => {
      G2(f), A.value = !A.value, A.value || a3("overlay-closed");
    }, k2 = (f = false) => {
      G2(f), d3.value = !d3.value, d3.value || a3("overlay-closed");
    }, G2 = (f) => {
      f || a3("reset-flow");
    }, Z = (f = false) => {
      R2.value(f) || a3("update-month-year", {
        year: f ? t2.year + 1 : t2.year - 1,
        month: t2.month,
        fromNav: true
      });
    }, se = (f, r) => {
      t2.arrowNavigation && (M3.value[r] = Me(f), $(M3.value, "monthYear"));
    };
    return n({
      toggleMonthPicker: m3,
      toggleYearPicker: k2
    }), (f, r) => {
      var J, be, we, He, Xe;
      return openBlock(), createElementBlock("div", yr, [
        f.$slots["month-year"] ? renderSlot(f.$slots, "month-year", normalizeProps(mergeProps({ key: 0 }, { month: e2.month, year: e2.year, months: e2.months, years: e2.years, updateMonthYear: unref(E2), handleMonthYearChange: unref(O2), instance: e2.instance }))) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
          !f.monthPicker && !f.yearPicker ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
            unref(l) && !f.vertical ? (openBlock(), createBlock(nn, {
              key: 0,
              "aria-label": (J = unref(o).ariaLabels) == null ? void 0 : J.prevMonth,
              disabled: unref(R2)(false),
              onActivate: r[0] || (r[0] = (le) => unref(O2)(false)),
              onSetRef: r[1] || (r[1] = (le) => se(le, 0))
            }, {
              default: withCtx(() => [
                f.$slots["arrow-left"] ? renderSlot(f.$slots, "arrow-left", { key: 0 }) : createCommentVNode("", true),
                f.$slots["arrow-left"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(wn), { key: 1 }))
              ]),
              _: 3
            }, 8, ["aria-label", "disabled"])) : createCommentVNode("", true),
            createBaseVNode("div", hr, [
              createVNode(Bn, mergeProps({
                type: "month",
                "slot-name": "month-overlay-val",
                "overlay-slot": "overlay-month",
                "aria-label": (be = unref(o).ariaLabels) == null ? void 0 : be.openMonthsOverlay,
                modelValue: unref(L2),
                "onUpdate:modelValue": r[2] || (r[2] = (le) => isRef(L2) ? L2.value = le : null)
              }, unref(oe)("month"), {
                onToggle: m3,
                onSetRef: r[3] || (r[3] = (le) => se(le, 1))
              }), createSlots({
                default: withCtx(() => [
                  f.$slots.month ? renderSlot(f.$slots, "month", normalizeProps(mergeProps({ key: 0 }, unref(_)))) : createCommentVNode("", true),
                  f.$slots.month ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                    createTextVNode(toDisplayString(unref(_).text), 1)
                  ], 64))
                ]),
                _: 2
              }, [
                f.$slots["calendar-icon"] ? {
                  name: "calendar-icon",
                  fn: withCtx(() => [
                    renderSlot(f.$slots, "calendar-icon")
                  ]),
                  key: "0"
                } : void 0,
                f.$slots["month-overlay-value"] ? {
                  name: "month-overlay-val",
                  fn: withCtx(({ item: le }) => [
                    renderSlot(f.$slots, "month-overlay-value", {
                      text: le.text,
                      value: le.value
                    })
                  ]),
                  key: "1"
                } : void 0,
                f.$slots["month-overlay"] ? {
                  name: "overlay-month",
                  fn: withCtx(() => [
                    renderSlot(f.$slots, "month-overlay", normalizeProps(guardReactiveProps(unref(P)("month"))))
                  ]),
                  key: "2"
                } : void 0,
                f.$slots["month-overlay-header"] ? {
                  name: "overlay-month-header",
                  fn: withCtx(() => [
                    renderSlot(f.$slots, "month-overlay-header", { toggle: m3 })
                  ]),
                  key: "3"
                } : void 0
              ]), 1040, ["aria-label", "modelValue"]),
              createVNode(Bn, mergeProps({
                type: "year",
                "slot-name": "year-overlay-val",
                "overlay-slot": "overlay-year",
                "aria-label": (we = unref(o).ariaLabels) == null ? void 0 : we.openYearsOverlay,
                modelValue: unref(C),
                "onUpdate:modelValue": r[4] || (r[4] = (le) => isRef(C) ? C.value = le : null)
              }, unref(oe)("year"), {
                onToggle: k2,
                onSetRef: r[5] || (r[5] = (le) => se(le, 2))
              }), createSlots({
                default: withCtx(() => [
                  f.$slots.year ? renderSlot(f.$slots, "year", {
                    key: 0,
                    year: e2.year
                  }) : createCommentVNode("", true),
                  f.$slots.year ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                    createTextVNode(toDisplayString(e2.year), 1)
                  ], 64))
                ]),
                _: 2
              }, [
                f.$slots["calendar-icon"] ? {
                  name: "calendar-icon",
                  fn: withCtx(() => [
                    renderSlot(f.$slots, "calendar-icon")
                  ]),
                  key: "0"
                } : void 0,
                f.$slots["year-overlay-value"] ? {
                  name: "year-overlay-val",
                  fn: withCtx(({ item: le }) => [
                    renderSlot(f.$slots, "year-overlay-value", {
                      text: le.text,
                      value: le.value
                    })
                  ]),
                  key: "1"
                } : void 0,
                f.$slots["year-overlay"] ? {
                  name: "overlay-year",
                  fn: withCtx(() => [
                    renderSlot(f.$slots, "year-overlay", normalizeProps(guardReactiveProps(unref(P)("year"))))
                  ]),
                  key: "2"
                } : void 0,
                f.$slots["year-overlay-header"] ? {
                  name: "overlay-year-header",
                  fn: withCtx(() => [
                    renderSlot(f.$slots, "year-overlay-header", { toggle: k2 })
                  ]),
                  key: "3"
                } : void 0
              ]), 1040, ["aria-label", "modelValue"])
            ]),
            unref(l) && f.vertical ? (openBlock(), createBlock(nn, {
              key: 1,
              "aria-label": (He = unref(o).ariaLabels) == null ? void 0 : He.prevMonth,
              disabled: unref(R2)(false),
              onActivate: r[6] || (r[6] = (le) => unref(O2)(false))
            }, {
              default: withCtx(() => [
                f.$slots["arrow-up"] ? renderSlot(f.$slots, "arrow-up", { key: 0 }) : createCommentVNode("", true),
                f.$slots["arrow-up"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(Hn), { key: 1 }))
              ]),
              _: 3
            }, 8, ["aria-label", "disabled"])) : createCommentVNode("", true),
            unref(v) ? (openBlock(), createBlock(nn, {
              key: 2,
              ref: "rightIcon",
              disabled: unref(R2)(true),
              "aria-label": (Xe = unref(o).ariaLabels) == null ? void 0 : Xe.nextMonth,
              onActivate: r[7] || (r[7] = (le) => unref(O2)(true)),
              onSetRef: r[8] || (r[8] = (le) => se(le, 3))
            }, {
              default: withCtx(() => [
                f.$slots[f.vertical ? "arrow-down" : "arrow-right"] ? renderSlot(f.$slots, f.vertical ? "arrow-down" : "arrow-right", { key: 0 }) : createCommentVNode("", true),
                f.$slots[f.vertical ? "arrow-down" : "arrow-right"] ? createCommentVNode("", true) : (openBlock(), createBlock(resolveDynamicComponent(f.vertical ? unref(Wn) : unref(bn)), { key: 1 }))
              ]),
              _: 3
            }, 8, ["disabled", "aria-label"])) : createCommentVNode("", true)
          ], 64)) : createCommentVNode("", true),
          f.monthPicker ? (openBlock(), createBlock($t, mergeProps({ key: 1 }, unref(oe)("month"), {
            "skip-active": f.range,
            year: e2.year,
            "multi-model-value": unref(K2),
            "month-picker": "",
            modelValue: unref(L2),
            "onUpdate:modelValue": r[17] || (r[17] = (le) => isRef(L2) ? L2.value = le : null),
            onToggle: m3,
            onSelected: r[18] || (r[18] = (le) => f.$emit("overlay-closed"))
          }), createSlots({
            header: withCtx(() => {
              var le, re, ve;
              return [
                createBaseVNode("div", gr, [
                  createBaseVNode("div", {
                    class: "dp__month_year_col_nav",
                    tabindex: "0",
                    ref_key: "mpPrevIconRef",
                    ref: U,
                    onClick: r[9] || (r[9] = (ce) => Z(false)),
                    onKeydown: r[10] || (r[10] = withKeys((ce) => Z(false), ["enter"]))
                  }, [
                    createBaseVNode("div", {
                      class: normalizeClass(["dp__inner_nav", { dp__inner_nav_disabled: unref(R2)(false) }]),
                      role: "button",
                      "aria-label": (le = unref(o).ariaLabels) == null ? void 0 : le.prevMonth
                    }, [
                      f.$slots["arrow-left"] ? renderSlot(f.$slots, "arrow-left", { key: 0 }) : createCommentVNode("", true),
                      f.$slots["arrow-left"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(wn), { key: 1 }))
                    ], 10, pr)
                  ], 544),
                  createBaseVNode("div", {
                    class: "dp__pointer",
                    role: "button",
                    ref_key: "mpYearButtonRef",
                    ref: V,
                    "aria-label": (re = unref(o).ariaLabels) == null ? void 0 : re.openYearsOverlay,
                    tabindex: "0",
                    onClick: r[11] || (r[11] = () => k2(false)),
                    onKeydown: r[12] || (r[12] = withKeys(() => k2(false), ["enter"]))
                  }, [
                    f.$slots.year ? renderSlot(f.$slots, "year", {
                      key: 0,
                      year: e2.year
                    }) : createCommentVNode("", true),
                    f.$slots.year ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                      createTextVNode(toDisplayString(e2.year), 1)
                    ], 64))
                  ], 40, kr),
                  createBaseVNode("div", {
                    class: "dp__month_year_col_nav",
                    tabindex: "0",
                    ref_key: "mpNextIconRef",
                    ref: ee,
                    onClick: r[13] || (r[13] = (ce) => Z(true)),
                    onKeydown: r[14] || (r[14] = withKeys((ce) => Z(true), ["enter"]))
                  }, [
                    createBaseVNode("div", {
                      class: normalizeClass(["dp__inner_nav", { dp__inner_nav_disabled: unref(R2)(true) }]),
                      role: "button",
                      "aria-label": (ve = unref(o).ariaLabels) == null ? void 0 : ve.nextMonth
                    }, [
                      f.$slots["arrow-right"] ? renderSlot(f.$slots, "arrow-right", { key: 0 }) : createCommentVNode("", true),
                      f.$slots["arrow-right"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(bn), { key: 1 }))
                    ], 10, wr)
                  ], 544)
                ]),
                createVNode(Transition, {
                  name: unref(c2)(d3.value),
                  css: unref(p)
                }, {
                  default: withCtx(() => [
                    d3.value ? (openBlock(), createBlock($t, mergeProps({ key: 0 }, unref(oe)("year"), {
                      modelValue: unref(C),
                      "onUpdate:modelValue": r[15] || (r[15] = (ce) => isRef(C) ? C.value = ce : null),
                      onToggle: k2,
                      onSelected: r[16] || (r[16] = (ce) => f.$emit("overlay-closed"))
                    }), createSlots({
                      "button-icon": withCtx(() => [
                        f.$slots["calendar-icon"] ? renderSlot(f.$slots, "calendar-icon", { key: 0 }) : createCommentVNode("", true),
                        f.$slots["calendar-icon"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(Ft), { key: 1 }))
                      ]),
                      _: 2
                    }, [
                      f.$slots["year-overlay-value"] ? {
                        name: "item",
                        fn: withCtx(({ item: ce }) => [
                          renderSlot(f.$slots, "year-overlay-value", {
                            text: ce.text,
                            value: ce.value
                          })
                        ]),
                        key: "0"
                      } : void 0
                    ]), 1040, ["modelValue"])) : createCommentVNode("", true)
                  ]),
                  _: 3
                }, 8, ["name", "css"])
              ];
            }),
            _: 2
          }, [
            f.$slots["month-overlay-value"] ? {
              name: "item",
              fn: withCtx(({ item: le }) => [
                renderSlot(f.$slots, "month-overlay-value", {
                  text: le.text,
                  value: le.value
                })
              ]),
              key: "0"
            } : void 0
          ]), 1040, ["skip-active", "year", "multi-model-value", "modelValue"])) : createCommentVNode("", true),
          f.yearPicker ? (openBlock(), createBlock($t, mergeProps({ key: 2 }, unref(oe)("year"), {
            modelValue: unref(C),
            "onUpdate:modelValue": r[19] || (r[19] = (le) => isRef(C) ? C.value = le : null),
            "multi-model-value": unref(K2),
            "skip-active": f.range,
            "skip-button-ref": "",
            "year-picker": "",
            onToggle: k2,
            onSelected: r[20] || (r[20] = (le) => f.$emit("overlay-closed"))
          }), createSlots({ _: 2 }, [
            f.$slots["year-overlay-value"] ? {
              name: "item",
              fn: withCtx(({ item: le }) => [
                renderSlot(f.$slots, "year-overlay-value", {
                  text: le.text,
                  value: le.value
                })
              ]),
              key: "0"
            } : void 0
          ]), 1040, ["modelValue", "multi-model-value", "skip-active"])) : createCommentVNode("", true)
        ], 64))
      ]);
    };
  }
});
var $r = {
  key: 0,
  class: "dp__time_input"
};
var Dr = ["aria-label", "onKeydown", "onClick"];
var Mr = ["aria-label", "data-test", "onKeydown", "onClick"];
var _r = ["aria-label", "onKeydown", "onClick"];
var Tr = { key: 0 };
var Ar = ["aria-label", "onKeydown"];
var Cr = defineComponent({
  __name: "TimeInput",
  props: {
    hours: { type: Number, default: 0 },
    minutes: { type: Number, default: 0 },
    seconds: { type: Number, default: 0 },
    closeTimePickerBtn: { type: Object, default: null },
    order: { type: Number, default: 0 },
    ...Qe
  },
  emits: [
    "set-hours",
    "set-minutes",
    "update:hours",
    "update:minutes",
    "update:seconds",
    "reset-flow",
    "mounted",
    "overlay-closed"
  ],
  setup(e2, { expose: n, emit: a3 }) {
    const t2 = e2, { setTimePickerElements: o, setTimePickerBackRef: c2 } = Je(), { defaults: p } = Ve(t2), { transitionName: $, showTransition: O2 } = Ut(p.value.transitions), R2 = reactive({
      hours: false,
      minutes: false,
      seconds: false
    }), E2 = ref("AM"), A = ref(null), d3 = ref([]);
    onMounted(() => {
      a3("mounted");
    });
    const M3 = computed(() => (u2) => !!(t2.maxTime && t2.maxTime[u2] && t2.maxTime[u2] < t2[u2] + +t2[`${u2}Increment`])), U = computed(() => (u2) => !!(t2.minTime && t2.minTime[u2] && t2.minTime[u2] > t2[u2] - +t2[`${u2}Increment`])), V = (u2, l) => add(set(w2(), u2), l), ee = (u2, l) => sub(set(w2(), u2), l), B2 = computed(
      () => ({
        dp__time_col: true,
        dp__time_col_reg: !t2.enableSeconds && t2.is24,
        dp__time_col_reg_with_button: !t2.enableSeconds && !t2.is24,
        dp__time_col_sec: t2.enableSeconds && t2.is24,
        dp__time_col_sec_with_button: t2.enableSeconds && !t2.is24
      })
    ), L2 = computed(() => {
      const u2 = [{ type: "hours" }, { type: "", separator: true }, { type: "minutes" }];
      return t2.enableSeconds ? u2.concat([{ type: "", separator: true }, { type: "seconds" }]) : u2;
    }), C = computed(() => L2.value.filter((u2) => !u2.separator)), x2 = computed(() => (u2) => {
      if (u2 === "hours") {
        const l = K2(t2.hours);
        return { text: l < 10 ? `0${l}` : `${l}`, value: l };
      }
      return { text: t2[u2] < 10 ? `0${t2[u2]}` : `${t2[u2]}`, value: t2[u2] };
    }), Q2 = (u2) => {
      const l = t2.is24 ? 24 : 12, v = u2 === "hours" ? l : 60, m3 = +t2[`${u2}GridIncrement`], k2 = u2 === "hours" && !t2.is24 ? m3 : 0, G2 = [];
      for (let Z = k2; Z < v; Z += m3)
        G2.push({ value: Z, text: Z < 10 ? `0${Z}` : `${Z}` });
      return u2 === "hours" && !t2.is24 && G2.push({ value: 0, text: "12" }), _l(G2);
    }, oe = (u2, l) => {
      const v = t2.minTime && t2.minTime[l], m3 = t2.maxTime && t2.maxTime[l];
      return v && m3 ? u2 < v || u2 > m3 : v ? u2 < v : m3 ? u2 > m3 : false;
    }, P = computed(() => (u2) => Q2(u2).flat().map((v) => v.value).filter((v) => oe(v, u2))), y3 = (u2) => t2[`no${u2[0].toUpperCase() + u2.slice(1)}Overlay`], I2 = (u2) => {
      y3(u2) || (R2[u2] = !R2[u2], R2[u2] || a3("overlay-closed"));
    }, W = (u2) => u2 === "hours" ? getHours : u2 === "minutes" ? getMinutes : getSeconds, N = (u2, l = true) => {
      const v = l ? V : ee;
      (l ? M3.value(u2) : U.value(u2)) || a3(
        `update:${u2}`,
        W(u2)(v({ [u2]: +t2[u2] }, { [u2]: +t2[`${u2}Increment`] }))
      );
    }, K2 = (u2) => t2.is24 ? u2 : (u2 >= 12 ? E2.value = "PM" : E2.value = "AM", Sl(u2)), te = () => {
      E2.value === "PM" ? (E2.value = "AM", a3("update:hours", t2.hours - 12)) : (E2.value = "PM", a3("update:hours", t2.hours + 12));
    }, q2 = (u2) => {
      R2[u2] = true;
    }, _ = (u2, l, v) => {
      if (u2 && t2.arrowNavigation) {
        Array.isArray(d3.value[l]) ? d3.value[l][v] = u2 : d3.value[l] = [u2];
        const m3 = d3.value.reduce(
          (k2, G2) => G2.map((Z, se) => [...k2[se] || [], G2[se]]),
          []
        );
        c2(t2.closeTimePickerBtn), A.value && (m3[1] = m3[1].concat(A.value)), o(m3, t2.order);
      }
    }, T2 = (u2, l) => u2 === "hours" && !t2.is24 ? a3(`update:${u2}`, E2.value === "PM" ? l + 12 : l) : a3(`update:${u2}`, l);
    return n({ openChildCmp: q2 }), (u2, l) => {
      var v;
      return u2.disabled ? createCommentVNode("", true) : (openBlock(), createElementBlock("div", $r, [
        (openBlock(true), createElementBlock(Fragment, null, renderList(unref(L2), (m3, k2) => {
          var G2, Z, se;
          return openBlock(), createElementBlock("div", {
            key: k2,
            class: normalizeClass(unref(B2))
          }, [
            m3.separator ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
              createTextVNode(" : ")
            ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
              createBaseVNode("div", {
                class: normalizeClass({
                  dp__inc_dec_button: true,
                  dp__inc_dec_button_disabled: unref(M3)(m3.type)
                }),
                role: "button",
                "data-test": "time-inc-btn",
                "aria-label": (G2 = unref(p).ariaLabels) == null ? void 0 : G2.incrementValue(m3.type),
                tabindex: "0",
                onKeydown: [
                  withKeys((f) => N(m3.type), ["enter"]),
                  withKeys((f) => N(m3.type), ["space"])
                ],
                onClick: (f) => N(m3.type),
                ref_for: true,
                ref: (f) => _(f, k2, 0)
              }, [
                u2.$slots["arrow-up"] ? renderSlot(u2.$slots, "arrow-up", { key: 0 }) : createCommentVNode("", true),
                u2.$slots["arrow-up"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(Hn), { key: 1 }))
              ], 42, Dr),
              createBaseVNode("div", {
                role: "button",
                "aria-label": (Z = unref(p).ariaLabels) == null ? void 0 : Z.openTpOverlay(m3.type),
                class: normalizeClass(y3(m3.type) ? "" : "dp__time_display"),
                tabindex: "0",
                "data-test": `${m3.type}-toggle-overlay-btn`,
                onKeydown: [
                  withKeys((f) => I2(m3.type), ["enter"]),
                  withKeys((f) => I2(m3.type), ["space"])
                ],
                onClick: (f) => I2(m3.type),
                ref_for: true,
                ref: (f) => _(f, k2, 1)
              }, [
                u2.$slots[m3.type] ? renderSlot(u2.$slots, m3.type, {
                  key: 0,
                  text: unref(x2)(m3.type).text,
                  value: unref(x2)(m3.type).value
                }) : createCommentVNode("", true),
                u2.$slots[m3.type] ? createCommentVNode("", true) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                  createTextVNode(toDisplayString(unref(x2)(m3.type).text), 1)
                ], 64))
              ], 42, Mr),
              createBaseVNode("div", {
                class: normalizeClass({
                  dp__inc_dec_button: true,
                  dp__inc_dec_button_disabled: unref(U)(m3.type)
                }),
                role: "button",
                "data-test": "time-dec-btn",
                "aria-label": (se = unref(p).ariaLabels) == null ? void 0 : se.decrementValue(m3.type),
                tabindex: "0",
                onKeydown: [
                  withKeys((f) => N(m3.type, false), ["enter"]),
                  withKeys((f) => N(m3.type, false), ["space"])
                ],
                onClick: (f) => N(m3.type, false),
                ref_for: true,
                ref: (f) => _(f, k2, 2)
              }, [
                u2.$slots["arrow-down"] ? renderSlot(u2.$slots, "arrow-down", { key: 0 }) : createCommentVNode("", true),
                u2.$slots["arrow-down"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(Wn), { key: 1 }))
              ], 42, _r)
            ], 64))
          ], 2);
        }), 128)),
        u2.is24 ? createCommentVNode("", true) : (openBlock(), createElementBlock("div", Tr, [
          u2.$slots["am-pm-button"] ? renderSlot(u2.$slots, "am-pm-button", {
            key: 0,
            toggle: te,
            value: E2.value
          }) : createCommentVNode("", true),
          u2.$slots["am-pm-button"] ? createCommentVNode("", true) : (openBlock(), createElementBlock("button", {
            key: 1,
            ref_key: "amPmButton",
            ref: A,
            type: "button",
            class: "dp__pm_am_button",
            role: "button",
            "aria-label": (v = unref(p).ariaLabels) == null ? void 0 : v.amPmButton,
            tabindex: "0",
            onClick: te,
            onKeydown: [
              withKeys(withModifiers(te, ["prevent"]), ["enter"]),
              withKeys(withModifiers(te, ["prevent"]), ["space"])
            ]
          }, toDisplayString(E2.value), 41, Ar))
        ])),
        (openBlock(true), createElementBlock(Fragment, null, renderList(unref(C), (m3, k2) => (openBlock(), createBlock(Transition, {
          key: k2,
          name: unref($)(R2[m3.type]),
          css: unref(O2)
        }, {
          default: withCtx(() => [
            R2[m3.type] ? (openBlock(), createBlock($t, {
              key: 0,
              items: Q2(m3.type),
              "disabled-values": unref(p).filters.times[m3.type].concat(unref(P)(m3.type)),
              "esc-close": u2.escClose,
              "aria-labels": unref(p).ariaLabels,
              "hide-navigation": u2.hideNavigation,
              "onUpdate:modelValue": (G2) => T2(m3.type, G2),
              onSelected: (G2) => I2(m3.type),
              onToggle: (G2) => I2(m3.type),
              onResetFlow: l[0] || (l[0] = (G2) => u2.$emit("reset-flow")),
              type: m3.type
            }, createSlots({
              "button-icon": withCtx(() => [
                u2.$slots["clock-icon"] ? renderSlot(u2.$slots, "clock-icon", { key: 0 }) : createCommentVNode("", true),
                u2.$slots["clock-icon"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(Un), { key: 1 }))
              ]),
              _: 2
            }, [
              u2.$slots[`${m3.type}-overlay-value`] ? {
                name: "item",
                fn: withCtx(({ item: G2 }) => [
                  renderSlot(u2.$slots, `${m3.type}-overlay-value`, {
                    text: G2.text,
                    value: G2.value
                  })
                ]),
                key: "0"
              } : void 0
            ]), 1032, ["items", "disabled-values", "esc-close", "aria-labels", "hide-navigation", "onUpdate:modelValue", "onSelected", "onToggle", "type"])) : createCommentVNode("", true)
          ]),
          _: 2
        }, 1032, ["name", "css"]))), 128))
      ]));
    };
  }
});
var Sr = ["aria-label"];
var Pr = { class: "dp__overlay_container dp__container_flex dp__time_picker_overlay_container" };
var Nr = {
  key: 1,
  class: "dp__overlay_row"
};
var Rr = ["aria-label"];
var Ir = defineComponent({
  __name: "TimePicker",
  props: {
    hours: { type: [Number, Array], default: 0 },
    minutes: { type: [Number, Array], default: 0 },
    seconds: { type: [Number, Array], default: 0 },
    internalModelValue: { type: [Date, Array], default: null },
    ...Qe
  },
  emits: [
    "update:hours",
    "update:minutes",
    "update:seconds",
    "mount",
    "reset-flow",
    "overlay-closed"
  ],
  setup(e2, { expose: n, emit: a3 }) {
    const t2 = e2, { buildMatrix: o, setTimePicker: c2 } = Je(), p = useSlots(), { hideNavigationButtons: $, defaults: O2 } = Ve(t2), { transitionName: R2, showTransition: E2 } = Ut(O2.value.transitions), A = ref(null), d3 = ref(null), M3 = ref([]), U = ref(null);
    onMounted(() => {
      a3("mount"), !t2.timePicker && t2.arrowNavigation ? o([Me(A.value)], "time") : c2(true, t2.timePicker);
    });
    const V = computed(() => t2.range && t2.modelAuto ? Gn(t2.internalModelValue) : true), ee = ref(false), B2 = (N) => ({
      hours: Array.isArray(t2.hours) ? t2.hours[N] : t2.hours,
      minutes: Array.isArray(t2.minutes) ? t2.minutes[N] : t2.minutes,
      seconds: Array.isArray(t2.seconds) ? t2.seconds[N] : t2.seconds
    }), L2 = computed(() => {
      const N = [];
      if (t2.range)
        for (let K2 = 0; K2 < 2; K2++)
          N.push(B2(K2));
      else
        N.push(B2(0));
      return N;
    }), C = (N, K2 = false, te = "") => {
      K2 || a3("reset-flow"), ee.value = N, t2.arrowNavigation && (c2(N), N || a3("overlay-closed")), nextTick(() => {
        te !== "" && M3.value[0] && M3.value[0].openChildCmp(te);
      });
    }, x2 = computed(() => ({
      dp__button: true,
      dp__button_bottom: t2.autoApply
    })), Q2 = rt(p, "timePicker"), oe = (N, K2, te) => t2.range ? K2 === 0 ? [N, L2.value[1][te]] : [L2.value[0][te], N] : N, P = (N) => {
      a3("update:hours", N);
    }, y3 = (N) => {
      a3("update:minutes", N);
    }, I2 = (N) => {
      a3("update:seconds", N);
    }, W = () => {
      U.value && t2.arrowNavigation && U.value.focus({ preventScroll: true });
    };
    return n({ toggleTimePicker: C }), (N, K2) => {
      var te;
      return openBlock(), createElementBlock("div", null, [
        N.timePicker ? createCommentVNode("", true) : withDirectives((openBlock(), createElementBlock("div", {
          key: 0,
          class: normalizeClass(unref(x2)),
          role: "button",
          "aria-label": (te = unref(O2).ariaLabels) == null ? void 0 : te.openTimePicker,
          tabindex: "0",
          "data-test": "open-time-picker-btn",
          ref_key: "openTimePickerBtn",
          ref: A,
          onKeydown: [
            K2[0] || (K2[0] = withKeys((q2) => C(true), ["enter"])),
            K2[1] || (K2[1] = withKeys((q2) => C(true), ["space"]))
          ],
          onClick: K2[2] || (K2[2] = (q2) => C(true))
        }, [
          N.$slots["clock-icon"] ? renderSlot(N.$slots, "clock-icon", { key: 0 }) : createCommentVNode("", true),
          N.$slots["clock-icon"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(Un), { key: 1 }))
        ], 42, Sr)), [
          [vShow, !unref($)("time")]
        ]),
        createVNode(Transition, {
          name: unref(R2)(ee.value),
          css: unref(E2)
        }, {
          default: withCtx(() => {
            var q2;
            return [
              ee.value || N.timePicker ? (openBlock(), createElementBlock("div", {
                key: 0,
                class: "dp__overlay",
                ref_key: "overlayRef",
                ref: U,
                tabindex: "0"
              }, [
                createBaseVNode("div", Pr, [
                  N.$slots["time-picker-overlay"] ? renderSlot(N.$slots, "time-picker-overlay", {
                    key: 0,
                    hours: e2.hours,
                    minutes: e2.minutes,
                    seconds: e2.seconds,
                    setHours: P,
                    setMinutes: y3,
                    setSeconds: I2
                  }) : createCommentVNode("", true),
                  N.$slots["time-picker-overlay"] ? createCommentVNode("", true) : (openBlock(), createElementBlock("div", Nr, [
                    (openBlock(true), createElementBlock(Fragment, null, renderList(unref(L2), (_, T2) => withDirectives((openBlock(), createBlock(Cr, mergeProps({ key: T2 }, {
                      ...N.$props,
                      order: T2,
                      hours: _.hours,
                      minutes: _.minutes,
                      seconds: _.seconds,
                      closeTimePickerBtn: d3.value,
                      disabled: T2 === 0 ? N.fixedStart : N.fixedEnd
                    }, {
                      ref_for: true,
                      ref_key: "timeInputRefs",
                      ref: M3,
                      "onUpdate:hours": (u2) => P(oe(u2, T2, "hours")),
                      "onUpdate:minutes": (u2) => y3(oe(u2, T2, "minutes")),
                      "onUpdate:seconds": (u2) => I2(oe(u2, T2, "seconds")),
                      onMounted: W,
                      onOverlayClosed: W
                    }), createSlots({ _: 2 }, [
                      renderList(unref(Q2), (u2, l) => ({
                        name: u2,
                        fn: withCtx((v) => [
                          renderSlot(N.$slots, u2, normalizeProps(guardReactiveProps(v)))
                        ])
                      }))
                    ]), 1040, ["onUpdate:hours", "onUpdate:minutes", "onUpdate:seconds"])), [
                      [vShow, T2 === 0 ? true : unref(V)]
                    ])), 128))
                  ])),
                  N.timePicker ? createCommentVNode("", true) : withDirectives((openBlock(), createElementBlock("div", {
                    key: 2,
                    ref_key: "closeTimePickerBtn",
                    ref: d3,
                    class: normalizeClass(unref(x2)),
                    role: "button",
                    "aria-label": (q2 = unref(O2).ariaLabels) == null ? void 0 : q2.closeTimePicker,
                    tabindex: "0",
                    onKeydown: [
                      K2[3] || (K2[3] = withKeys((_) => C(false), ["enter"])),
                      K2[4] || (K2[4] = withKeys((_) => C(false), ["space"]))
                    ],
                    onClick: K2[5] || (K2[5] = (_) => C(false))
                  }, [
                    N.$slots["calendar-icon"] ? renderSlot(N.$slots, "calendar-icon", { key: 0 }) : createCommentVNode("", true),
                    N.$slots["calendar-icon"] ? createCommentVNode("", true) : (openBlock(), createBlock(unref(Ft), { key: 1 }))
                  ], 42, Rr)), [
                    [vShow, !unref($)("time")]
                  ])
                ])
              ], 512)) : createCommentVNode("", true)
            ];
          }),
          _: 3
        }, 8, ["name", "css"])
      ]);
    };
  }
});
var Or = (e2, n) => {
  const { isDisabled: a3, matchDate: t2, getWeekFromDate: o } = Ve(n), c2 = ref(null), p = ref(w2()), $ = (l) => {
    !l.current && n.hideOffsetDates || (c2.value = l.value);
  }, O2 = () => {
    c2.value = null;
  }, R2 = (l) => Array.isArray(e2.value) && n.range && e2.value[0] && c2.value ? l ? Oe(c2.value, e2.value[0]) : Pe(c2.value, e2.value[0]) : true, E2 = (l, v) => {
    const m3 = () => e2.value ? v ? e2.value[0] || null : e2.value[1] : null, k2 = e2.value && Array.isArray(e2.value) ? m3() : null;
    return ke(w2(l.value), k2);
  }, A = (l) => {
    const v = Array.isArray(e2.value) ? e2.value[0] : null;
    return l ? !Pe(c2.value || null, v) : true;
  }, d3 = (l, v = true) => (n.range || n.weekPicker) && Array.isArray(e2.value) ? n.hideOffsetDates && !l.current ? false : ke(w2(l.value), e2.value[v ? 0 : 1]) : n.range ? E2(l, v) && A(v) || ke(l.value, Array.isArray(e2.value) ? e2.value[0] : null) && R2(v) : false, M3 = (l, v, m3) => Array.isArray(e2.value) && e2.value[0] && e2.value.length === 1 ? l ? false : m3 ? Oe(e2.value[0], v.value) : Pe(e2.value[0], v.value) : false, U = (l) => !e2.value || n.hideOffsetDates && !l.current ? false : n.range ? n.modelAuto && Array.isArray(e2.value) ? ke(l.value, e2.value[0] ? e2.value[0] : p.value) : false : n.multiDates && Array.isArray(e2.value) ? e2.value.some((v) => ke(v, l.value)) : ke(l.value, e2.value ? e2.value : p.value), V = (l) => {
    if (n.autoRange || n.weekPicker) {
      if (c2.value) {
        if (n.hideOffsetDates && !l.current)
          return false;
        const v = addDays(c2.value, +n.autoRange), m3 = o(w2(c2.value));
        return n.weekPicker ? ke(m3[1], w2(l.value)) : ke(v, w2(l.value));
      }
      return false;
    }
    return false;
  }, ee = (l) => {
    if (n.autoRange || n.weekPicker) {
      if (c2.value) {
        const v = addDays(c2.value, +n.autoRange);
        if (n.hideOffsetDates && !l.current)
          return false;
        const m3 = o(w2(c2.value));
        return n.weekPicker ? Oe(l.value, m3[0]) && Pe(l.value, m3[1]) : Oe(l.value, c2.value) && Pe(l.value, v);
      }
      return false;
    }
    return false;
  }, B2 = (l) => {
    if (n.autoRange || n.weekPicker) {
      if (c2.value) {
        if (n.hideOffsetDates && !l.current)
          return false;
        const v = o(w2(c2.value));
        return n.weekPicker ? ke(v[0], l.value) : ke(c2.value, l.value);
      }
      return false;
    }
    return false;
  }, L2 = (l) => zn(e2.value, c2.value, l.value), C = () => n.modelAuto && Array.isArray(n.internalModelValue) ? !!n.internalModelValue[0] : false, x2 = () => n.modelAuto ? Gn(n.internalModelValue) : true, Q2 = (l) => {
    if (Array.isArray(e2.value) && e2.value.length || n.weekPicker)
      return false;
    const v = n.range ? !d3(l) && !d3(l, false) : true;
    return !a3(l.value) && !U(l) && !(!l.current && n.hideOffsetDates) && v;
  }, oe = (l) => n.range ? n.modelAuto ? C() && U(l) : false : U(l), P = (l) => n.highlight ? t2(l.value, n.highlight) : false, y3 = (l) => a3(l.value) && n.highlightDisabledDays === false, I2 = (l) => n.highlightWeekDays && n.highlightWeekDays.includes(l.value.getDay()), W = (l) => (n.range || n.weekPicker) && (!(n.multiCalendars > 0) || l.current) && x2() && !(!l.current && n.hideOffsetDates) && !U(l) ? L2(l) : false, N = (l) => ({
    dp__cell_offset: !l.current,
    dp__pointer: !n.disabled && !(!l.current && n.hideOffsetDates) && !a3(l.value),
    dp__cell_disabled: a3(l.value),
    dp__cell_highlight: !y3(l) && (P(l) || I2(l)) && !oe(l),
    dp__cell_highlight_active: !y3(l) && (P(l) || I2(l)) && oe(l),
    dp__today: !n.noToday && ke(l.value, p.value) && l.current
  }), K2 = (l) => ({
    dp__active_date: oe(l),
    dp__date_hover: Q2(l)
  }), te = (l) => ({
    ...q2(l),
    ..._(l),
    dp__range_between_week: W(l) && n.weekPicker
  }), q2 = (l) => ({
    dp__range_start: n.multiCalendars > 0 ? l.current && d3(l) && x2() : d3(l) && x2(),
    dp__range_end: n.multiCalendars > 0 ? l.current && d3(l, false) && x2() : d3(l, false) && x2(),
    dp__range_between: W(l) && !n.weekPicker,
    dp__date_hover_start: M3(Q2(l), l, true),
    dp__date_hover_end: M3(Q2(l), l, false)
  }), _ = (l) => ({
    ...q2(l),
    dp__cell_auto_range: ee(l),
    dp__cell_auto_range_start: B2(l),
    dp__cell_auto_range_end: V(l)
  }), T2 = (l) => n.range ? n.autoRange ? _(l) : n.modelAuto ? { ...K2(l), ...q2(l) } : q2(l) : n.weekPicker ? te(l) : K2(l);
  return {
    setHoverDate: $,
    clearHoverDate: O2,
    getDayClassData: (l) => ({
      ...N(l),
      ...T2(l),
      [n.dayClass ? n.dayClass(l.value) : ""]: true,
      [n.calendarCellClassName]: !!n.calendarCellClassName
    })
  };
};
var Br = ["id", "onKeydown"];
var Yr = {
  key: 0,
  class: "dp__sidebar_left"
};
var Vr = {
  key: 1,
  class: "dp__preset_ranges"
};
var Lr = ["onClick"];
var Er = {
  key: 2,
  class: "dp__sidebar_right"
};
var Fr = {
  key: 3,
  class: "dp__now_wrap"
};
var Ur = defineComponent({
  __name: "DatepickerMenu",
  props: {
    openOnTop: { type: Boolean, default: false },
    internalModelValue: { type: [Date, Array], default: null },
    ...Qe
  },
  emits: [
    "close-picker",
    "select-date",
    "auto-apply",
    "time-update",
    "flow-step",
    "update-month-year",
    "invalid-select",
    "update:internal-model-value",
    "recalculate-position",
    "invalid-fixed-range",
    "tooltip-open",
    "tooltip-close"
  ],
  setup(e2, { expose: n, emit: a3 }) {
    const t2 = e2, { setMenuFocused: o, setShiftKey: c2, control: p } = jn(), { getCalendarDays: $, defaults: O2 } = Ve(t2), R2 = useSlots(), E2 = ref(null), A = reactive({
      timePicker: !!(!t2.enableTimePicker || t2.timePicker || t2.monthPicker),
      monthYearInput: !!t2.timePicker,
      calendar: false
    }), d3 = ref([]), M3 = ref([]), U = ref(null), V = ref(null), ee = ref(0), B2 = ref(false), L2 = ref(0);
    onMounted(() => {
      var j;
      B2.value = true, !((j = t2.presetRanges) != null && j.length) && !R2["left-sidebar"] && !R2["right-sidebar"] && je();
      const h3 = Me(V);
      if (h3 && !t2.textInput && !t2.inline && (o(true), y3()), h3) {
        const $e = (Te) => {
          !t2.monthYearComponent && !t2.timePickerComponent && !Object.keys(R2).length && Te.preventDefault(), Te.stopImmediatePropagation(), Te.stopPropagation();
        };
        h3.addEventListener("pointerdown", $e), h3.addEventListener("mousedown", $e);
      }
      window.addEventListener("resize", je);
    }), onUnmounted(() => {
      window.removeEventListener("resize", je);
    });
    const { arrowRight: C, arrowLeft: x2, arrowDown: Q2, arrowUp: oe } = Je(), P = (h3) => {
      h3 || h3 === 0 ? M3.value[h3].triggerTransition(
        te.value(h3),
        q2.value(h3)
      ) : M3.value.forEach(
        (j, $e) => j.triggerTransition(te.value($e), q2.value($e))
      );
    }, y3 = () => {
      const h3 = Me(V);
      h3 && h3.focus({ preventScroll: true });
    }, I2 = () => {
      var h3;
      (h3 = t2.flow) != null && h3.length && L2.value !== -1 && (L2.value += 1, a3("flow-step", L2.value), b2());
    }, W = () => {
      L2.value = -1;
    }, {
      calendars: N,
      modelValue: K2,
      month: te,
      year: q2,
      time: _,
      updateTime: T2,
      updateMonthYear: u2,
      selectDate: l,
      getWeekNum: v,
      monthYearSelect: m3,
      handleScroll: k2,
      handleArrow: G2,
      handleSwipe: Z,
      getMarker: se,
      selectCurrentDate: f,
      presetDateRange: r
    } = Vl(t2, a3, I2, P, L2), { setHoverDate: J, clearHoverDate: be, getDayClassData: we } = Or(K2, t2);
    watch(
      N,
      () => {
        t2.openOnTop && setTimeout(() => {
          a3("recalculate-position");
        }, 0);
      },
      { deep: true }
    );
    const He = rt(R2, "calendar"), Xe = rt(R2, "action"), le = rt(R2, "timePicker"), re = rt(R2, "monthYear"), ve = computed(() => t2.openOnTop ? "dp__arrow_bottom" : "dp__arrow_top"), ce = computed(() => Al(t2.yearRange)), yt = computed(() => Cl(t2.locale, t2.monthNameFormat)), je = () => {
      const h3 = Me(E2);
      h3 && (ee.value = h3.getBoundingClientRect().width);
    }, ht = computed(() => (h3) => $(te.value(h3), q2.value(h3))), et = computed(
      () => O2.value.multiCalendars > 0 && t2.range ? [...Array(O2.value.multiCalendars).keys()] : [0]
    ), gt = computed(
      () => (h3) => h3 === 1
    ), Ht = computed(() => t2.monthPicker || t2.timePicker || t2.yearPicker), Wt = computed(
      () => ({
        dp__flex_display: O2.value.multiCalendars > 0
      })
    ), Mt = computed(() => ({
      dp__instance_calendar: O2.value.multiCalendars > 0
    })), pt = computed(() => ({
      dp__menu_disabled: t2.disabled,
      dp__menu_readonly: t2.readonly
    })), zt = computed(
      () => (h3) => Kt(ht, h3)
    ), jt = computed(
      () => ({
        dp__menu: true,
        dp__menu_index: !t2.inline,
        dp__relative: t2.inline,
        [t2.menuClassName]: !!t2.menuClassName
      })
    ), Kt = (h3, j) => h3.value(j).map(($e) => ({
      ...$e,
      days: $e.days.map((Te) => (Te.marker = se(Te), Te.classData = we(Te), Te))
    })), _t = (h3) => {
      h3.stopPropagation(), h3.stopImmediatePropagation();
    }, hn = () => {
      t2.escClose && a3("close-picker");
    }, gn = (h3, j = false) => {
      l(h3, j), t2.spaceConfirm && a3("select-date");
    }, Tt = (h3) => {
      var j;
      (j = t2.flow) != null && j.length && (A[h3] = true, Object.keys(A).filter(($e) => !A[$e]).length || b2());
    }, s3 = (h3, j, $e, Te, ...Ee) => {
      if (t2.flow[L2.value] === h3) {
        const X2 = Te ? j.value[0] : j.value;
        X2 && X2[$e](...Ee);
      }
    }, b2 = () => {
      s3("month", d3, "toggleMonthPicker", true, true), s3("year", d3, "toggleYearPicker", true, true), s3("calendar", U, "toggleTimePicker", false, false, true), s3("time", U, "toggleTimePicker", false, true, true);
      const h3 = t2.flow[L2.value];
      (h3 === "hours" || h3 === "minutes" || h3 === "seconds") && s3(h3, U, "toggleTimePicker", false, true, true, h3);
    }, z2 = (h3) => {
      if (t2.arrowNavigation) {
        if (h3 === "up")
          return oe();
        if (h3 === "down")
          return Q2();
        if (h3 === "left")
          return x2();
        if (h3 === "right")
          return C();
      } else
        h3 === "left" || h3 === "up" ? G2("left", 0, h3 === "up") : G2("right", 0, h3 === "down");
    }, ne = (h3) => {
      c2(h3.shiftKey), !t2.disableMonthYearSelect && h3.code === "Tab" && h3.target.classList.contains("dp__menu") && p.value.shiftKeyInMenu && (h3.preventDefault(), h3.stopImmediatePropagation(), a3("close-picker"));
    };
    return n({
      updateMonthYear: u2
    }), (h3, j) => {
      var $e;
      return openBlock(), createBlock(Transition, {
        appear: "",
        name: ($e = unref(O2).transitions) == null ? void 0 : $e.menuAppear,
        mode: "out-in",
        css: !!h3.transitions
      }, {
        default: withCtx(() => {
          var Te, Ee;
          return [
            createBaseVNode("div", {
              id: h3.uid ? `dp-menu-${h3.uid}` : void 0,
              tabindex: "0",
              ref_key: "dpMenuRef",
              ref: V,
              role: "dialog",
              class: normalizeClass(unref(jt)),
              onMouseleave: j[14] || (j[14] = //@ts-ignore
              (...X2) => unref(be) && unref(be)(...X2)),
              onClick: _t,
              onKeydown: [
                withKeys(hn, ["esc"]),
                j[15] || (j[15] = withKeys(withModifiers((X2) => z2("left"), ["prevent"]), ["left"])),
                j[16] || (j[16] = withKeys(withModifiers((X2) => z2("up"), ["prevent"]), ["up"])),
                j[17] || (j[17] = withKeys(withModifiers((X2) => z2("down"), ["prevent"]), ["down"])),
                j[18] || (j[18] = withKeys(withModifiers((X2) => z2("right"), ["prevent"]), ["right"])),
                ne
              ]
            }, [
              (h3.disabled || h3.readonly) && h3.inline ? (openBlock(), createElementBlock("div", {
                key: 0,
                class: normalizeClass(unref(pt))
              }, null, 2)) : createCommentVNode("", true),
              !h3.inline && !h3.teleportCenter ? (openBlock(), createElementBlock("div", {
                key: 1,
                class: normalizeClass(unref(ve))
              }, null, 2)) : createCommentVNode("", true),
              createBaseVNode("div", {
                class: normalizeClass({
                  dp__menu_content_wrapper: ((Te = h3.presetRanges) == null ? void 0 : Te.length) || !!h3.$slots["left-sidebar"] || !!h3.$slots["right-sidebar"]
                })
              }, [
                h3.$slots["left-sidebar"] ? (openBlock(), createElementBlock("div", Yr, [
                  renderSlot(h3.$slots, "left-sidebar")
                ])) : createCommentVNode("", true),
                (Ee = h3.presetRanges) != null && Ee.length ? (openBlock(), createElementBlock("div", Vr, [
                  (openBlock(true), createElementBlock(Fragment, null, renderList(h3.presetRanges, (X2, ut) => (openBlock(), createElementBlock("div", {
                    key: ut,
                    style: normalizeStyle(X2.style || {}),
                    class: "dp__preset_range",
                    onClick: (ue) => unref(r)(X2.range, !!X2.slot)
                  }, [
                    X2.slot ? renderSlot(h3.$slots, X2.slot, {
                      key: 0,
                      presetDateRange: unref(r),
                      label: X2.label,
                      range: X2.range
                    }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                      createTextVNode(toDisplayString(X2.label), 1)
                    ], 64))
                  ], 12, Lr))), 128))
                ])) : createCommentVNode("", true),
                createBaseVNode("div", {
                  class: "dp__instance_calendar",
                  ref_key: "calendarWrapperRef",
                  ref: E2,
                  role: "document"
                }, [
                  createBaseVNode("div", {
                    class: normalizeClass(unref(Wt))
                  }, [
                    (openBlock(true), createElementBlock(Fragment, null, renderList(unref(et), (X2, ut) => (openBlock(), createElementBlock("div", {
                      key: X2,
                      class: normalizeClass(unref(Mt))
                    }, [
                      !h3.disableMonthYearSelect && !h3.timePicker ? (openBlock(), createBlock(resolveDynamicComponent(h3.monthYearComponent ? h3.monthYearComponent : br), mergeProps({
                        key: 0,
                        ref_for: true,
                        ref: (ue) => {
                          ue && (d3.value[ut] = ue);
                        },
                        months: unref(yt),
                        years: unref(ce),
                        month: unref(te)(X2),
                        year: unref(q2)(X2),
                        instance: X2,
                        "internal-model-value": e2.internalModelValue
                      }, h3.$props, {
                        onMount: j[0] || (j[0] = (ue) => Tt("monthYearInput")),
                        onResetFlow: W,
                        onUpdateMonthYear: (ue) => unref(u2)(X2, ue),
                        onMonthYearSelect: unref(m3),
                        onOverlayClosed: y3
                      }), createSlots({ _: 2 }, [
                        renderList(unref(re), (ue, Xn) => ({
                          name: ue,
                          fn: withCtx((xt) => [
                            renderSlot(h3.$slots, ue, normalizeProps(guardReactiveProps(xt)))
                          ])
                        }))
                      ]), 1040, ["months", "years", "month", "year", "instance", "internal-model-value", "onUpdateMonthYear", "onMonthYearSelect"])) : createCommentVNode("", true),
                      createVNode(ir, mergeProps({
                        ref_for: true,
                        ref: (ue) => {
                          ue && (M3.value[ut] = ue);
                        },
                        "specific-mode": unref(Ht),
                        "get-week-num": unref(v),
                        instance: X2,
                        "mapped-dates": unref(zt)(X2),
                        month: unref(te)(X2),
                        year: unref(q2)(X2)
                      }, h3.$props, {
                        "flow-step": L2.value,
                        "onUpdate:flowStep": j[1] || (j[1] = (ue) => L2.value = ue),
                        onSelectDate: (ue) => unref(l)(ue, !unref(gt)(X2)),
                        onHandleSpace: (ue) => gn(ue, !unref(gt)(X2)),
                        onSetHoverDate: j[2] || (j[2] = (ue) => unref(J)(ue)),
                        onHandleScroll: (ue) => unref(k2)(ue, X2),
                        onHandleSwipe: (ue) => unref(Z)(ue, X2),
                        onMount: j[3] || (j[3] = (ue) => Tt("calendar")),
                        onResetFlow: W,
                        onTooltipOpen: j[4] || (j[4] = (ue) => h3.$emit("tooltip-open", ue)),
                        onTooltipClose: j[5] || (j[5] = (ue) => h3.$emit("tooltip-close", ue))
                      }), createSlots({ _: 2 }, [
                        renderList(unref(He), (ue, Xn) => ({
                          name: ue,
                          fn: withCtx((xt) => [
                            renderSlot(h3.$slots, ue, normalizeProps(guardReactiveProps({ ...xt })))
                          ])
                        }))
                      ]), 1040, ["specific-mode", "get-week-num", "instance", "mapped-dates", "month", "year", "flow-step", "onSelectDate", "onHandleSpace", "onHandleScroll", "onHandleSwipe"])
                    ], 2))), 128))
                  ], 2),
                  createBaseVNode("div", null, [
                    h3.$slots["time-picker"] ? renderSlot(h3.$slots, "time-picker", normalizeProps(mergeProps({ key: 0 }, { time: unref(_), updateTime: unref(T2) }))) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
                      h3.enableTimePicker && !h3.monthPicker && !h3.weekPicker ? (openBlock(), createBlock(resolveDynamicComponent(h3.timePickerComponent ? h3.timePickerComponent : Ir), mergeProps({
                        key: 0,
                        ref_key: "timePickerRef",
                        ref: U,
                        hours: unref(_).hours,
                        minutes: unref(_).minutes,
                        seconds: unref(_).seconds,
                        "internal-model-value": e2.internalModelValue
                      }, h3.$props, {
                        onMount: j[6] || (j[6] = (X2) => Tt("timePicker")),
                        "onUpdate:hours": j[7] || (j[7] = (X2) => unref(T2)(X2)),
                        "onUpdate:minutes": j[8] || (j[8] = (X2) => unref(T2)(X2, false)),
                        "onUpdate:seconds": j[9] || (j[9] = (X2) => unref(T2)(X2, false, true)),
                        onResetFlow: W,
                        onOverlayClosed: y3
                      }), createSlots({ _: 2 }, [
                        renderList(unref(le), (X2, ut) => ({
                          name: X2,
                          fn: withCtx((ue) => [
                            renderSlot(h3.$slots, X2, normalizeProps(guardReactiveProps(ue)))
                          ])
                        }))
                      ]), 1040, ["hours", "minutes", "seconds", "internal-model-value"])) : createCommentVNode("", true)
                    ], 64))
                  ])
                ], 512),
                h3.$slots["right-sidebar"] ? (openBlock(), createElementBlock("div", Er, [
                  renderSlot(h3.$slots, "right-sidebar")
                ])) : createCommentVNode("", true),
                h3.showNowButton ? (openBlock(), createElementBlock("div", Fr, [
                  h3.$slots["now-button"] ? renderSlot(h3.$slots, "now-button", {
                    key: 0,
                    selectCurrentDate: unref(f)
                  }) : createCommentVNode("", true),
                  h3.$slots["now-button"] ? createCommentVNode("", true) : (openBlock(), createElementBlock("button", {
                    key: 1,
                    type: "button",
                    role: "button",
                    class: "dp__now_button",
                    onClick: j[10] || (j[10] = //@ts-ignore
                    (...X2) => unref(f) && unref(f)(...X2))
                  }, toDisplayString(h3.nowButtonLabel), 1))
                ])) : createCommentVNode("", true)
              ], 2),
              !h3.autoApply || h3.keepActionRow ? (openBlock(), createBlock(resolveDynamicComponent(h3.actionRowComponent ? h3.actionRowComponent : Jl), mergeProps({
                key: 2,
                "menu-mount": B2.value,
                "calendar-width": ee.value,
                "internal-model-value": e2.internalModelValue
              }, h3.$props, {
                onClosePicker: j[11] || (j[11] = (X2) => h3.$emit("close-picker")),
                onSelectDate: j[12] || (j[12] = (X2) => h3.$emit("select-date")),
                onInvalidSelect: j[13] || (j[13] = (X2) => h3.$emit("invalid-select"))
              }), createSlots({ _: 2 }, [
                renderList(unref(Xe), (X2, ut) => ({
                  name: X2,
                  fn: withCtx((ue) => [
                    renderSlot(h3.$slots, X2, normalizeProps(guardReactiveProps({ ...ue })))
                  ])
                }))
              ]), 1040, ["menu-mount", "calendar-width", "internal-model-value"])) : createCommentVNode("", true)
            ], 42, Br)
          ];
        }),
        _: 3
      }, 8, ["name", "css"]);
    };
  }
});
var Hr = typeof window < "u" ? window : void 0;
var an = () => {
};
var Wr = (e2) => getCurrentScope() ? (onScopeDispose(e2), true) : false;
var zr = (e2, n, a3, t2) => {
  if (!e2)
    return an;
  let o = an;
  const c2 = watch(
    () => unref(e2),
    ($) => {
      o(), $ && ($.addEventListener(n, a3, t2), o = () => {
        $.removeEventListener(n, a3, t2), o = an;
      });
    },
    { immediate: true, flush: "post" }
  ), p = () => {
    c2(), o();
  };
  return Wr(p), p;
};
var jr = (e2, n, a3, t2 = {}) => {
  const { window: o = Hr, event: c2 = "pointerdown" } = t2;
  return o ? zr(o, c2, ($) => {
    const O2 = Me(e2), R2 = Me(n);
    !O2 || !R2 || O2 === $.target || $.composedPath().includes(O2) || $.composedPath().includes(R2) || a3($);
  }, { passive: true }) : void 0;
};
var Kr = defineComponent({
  __name: "VueDatePicker",
  props: {
    ...Qe
  },
  emits: [
    "update:model-value",
    "text-submit",
    "closed",
    "cleared",
    "open",
    "focus",
    "blur",
    "internal-model-change",
    "recalculate-position",
    "flow-step",
    "update-month-year",
    "invalid-select",
    "invalid-fixed-range",
    "tooltip-open",
    "tooltip-close"
  ],
  setup(e2, { expose: n, emit: a3 }) {
    const t2 = e2, o = useSlots(), c2 = ref(false), p = toRef(t2, "modelValue"), $ = toRef(t2, "timezone"), O2 = ref(null), R2 = ref(null), E2 = ref(false), { setMenuFocused: A, setShiftKey: d3 } = jn(), { clearArrowNav: M3 } = Je(), { validateDate: U, isValidTime: V, defaults: ee } = Ve(t2);
    onMounted(() => {
      I2(t2.modelValue), t2.inline || (window.addEventListener("scroll", _), window.addEventListener("resize", T2)), t2.inline && (c2.value = true);
    }), onUnmounted(() => {
      t2.inline || (window.removeEventListener("scroll", _), window.removeEventListener("resize", T2));
    });
    const B2 = rt(o, "all", t2.presetRanges), L2 = rt(o, "input");
    watch(
      [p, $],
      () => {
        I2(p.value);
      },
      { deep: true }
    );
    const { openOnTop: C, menuPosition: x2, setMenuPosition: Q2, setInitialPosition: oe } = Fl(
      O2,
      R2,
      a3,
      t2
    ), {
      inputValue: P,
      internalModelValue: y3,
      parseExternalModelValue: I2,
      emitModelValue: W,
      formatInputValue: N,
      checkBeforeEmit: K2
    } = Ll(a3, t2, E2), te = computed(
      () => ({
        dp__main: true,
        dp__theme_dark: t2.dark,
        dp__theme_light: !t2.dark,
        dp__flex_display: t2.inline,
        dp__flex_display_with_input: t2.inlineWithInput
      })
    ), q2 = computed(() => t2.dark ? "dp__theme_dark" : "dp__theme_light"), _ = () => {
      c2.value && (t2.closeOnScroll ? se() : t2.autoPosition && Q2());
    }, T2 = () => {
      c2.value && Q2();
    }, u2 = () => {
      !t2.disabled && !t2.readonly && (oe(), c2.value = true, nextTick().then(() => {
        Q2(), c2.value && a3("open");
      }), c2.value || Z(), I2(t2.modelValue));
    }, l = () => {
      P.value = "", Z(), a3("update:model-value", null), a3("cleared"), se();
    }, v = () => {
      const re = y3.value;
      return !re || !Array.isArray(re) && U(re) ? true : Array.isArray(re) ? re.length === 2 && U(re[0]) && U(re[1]) ? true : U(re[0]) : false;
    }, m3 = () => {
      K2() && v() ? (W(), se()) : a3("invalid-select", y3.value);
    }, k2 = (re) => {
      W(), t2.closeOnAutoApply && !re && se();
    }, G2 = (re = false) => {
      t2.autoApply && V(y3.value) && v() && (t2.range && Array.isArray(y3.value) ? (t2.partialRange || y3.value.length === 2) && k2(re) : k2(re));
    }, Z = () => {
      t2.textInput || (y3.value = null);
    }, se = () => {
      t2.inline || (c2.value && (c2.value = false, A(false), d3(false), M3(), a3("closed"), oe(), P.value && I2(p.value)), Z(), R2.value && R2.value.focusInput());
    }, f = (re, ve) => {
      if (!re) {
        y3.value = null;
        return;
      }
      y3.value = re, ve && (m3(), a3("text-submit"));
    }, r = () => {
      t2.autoApply && V(y3.value) && W();
    }, J = () => c2.value ? se() : u2(), be = (re) => {
      y3.value = re;
    }, we = computed(() => t2.textInput && ee.value.textInputOptions.format), He = () => {
      we.value && (E2.value = true, N()), a3("focus");
    }, Xe = () => {
      we.value && (E2.value = false, N()), a3("blur");
    }, le = (re) => {
      O2.value && O2.value.updateMonthYear(0, {
        month: Nn(re.month),
        year: Nn(re.year)
      });
    };
    return jr(
      O2,
      R2,
      t2.onClickOutside ? () => t2.onClickOutside(v) : se
    ), n({
      closeMenu: se,
      selectDate: m3,
      clearValue: l,
      openMenu: u2,
      onScroll: _,
      formatInputValue: N,
      // exposed for testing purposes
      updateInternalModelValue: be,
      // modify internal modelValue
      setMonthYear: le
    }), (re, ve) => (openBlock(), createElementBlock("div", {
      class: normalizeClass(unref(te))
    }, [
      createVNode(Gl, mergeProps({
        ref_key: "inputRef",
        ref: R2,
        "is-menu-open": c2.value,
        "input-value": unref(P),
        "onUpdate:inputValue": ve[0] || (ve[0] = (ce) => isRef(P) ? P.value = ce : null)
      }, re.$props, {
        onClear: l,
        onOpen: u2,
        onSetInputDate: f,
        onSetEmptyDate: unref(W),
        onSelectDate: m3,
        onToggle: J,
        onClose: se,
        onFocus: He,
        onBlur: Xe
      }), createSlots({ _: 2 }, [
        renderList(unref(L2), (ce, yt) => ({
          name: ce,
          fn: withCtx((je) => [
            renderSlot(re.$slots, ce, normalizeProps(guardReactiveProps(je)))
          ])
        }))
      ]), 1040, ["is-menu-open", "input-value", "onSetEmptyDate"]),
      c2.value ? (openBlock(), createBlock(Teleport, {
        key: 0,
        to: re.teleport,
        disabled: re.inline
      }, [
        c2.value ? (openBlock(), createBlock(Ur, mergeProps({
          key: 0,
          ref_key: "dpMenuRef",
          ref: O2,
          class: unref(q2),
          style: unref(x2),
          "open-on-top": unref(C)
        }, re.$props, {
          "internal-model-value": unref(y3),
          "onUpdate:internalModelValue": ve[1] || (ve[1] = (ce) => isRef(y3) ? y3.value = ce : null),
          onClosePicker: se,
          onSelectDate: m3,
          onAutoApply: G2,
          onTimeUpdate: r,
          onFlowStep: ve[2] || (ve[2] = (ce) => re.$emit("flow-step", ce)),
          onUpdateMonthYear: ve[3] || (ve[3] = (ce) => re.$emit("update-month-year", ce)),
          onInvalidSelect: ve[4] || (ve[4] = (ce) => re.$emit("invalid-select", unref(y3))),
          onInvalidFixedRange: ve[5] || (ve[5] = (ce) => re.$emit("invalid-fixed-range", ce)),
          onRecalculatePosition: unref(Q2),
          onTooltipOpen: ve[6] || (ve[6] = (ce) => re.$emit("tooltip-open", ce)),
          onTooltipClose: ve[7] || (ve[7] = (ce) => re.$emit("tooltip-close", ce))
        }), createSlots({ _: 2 }, [
          renderList(unref(B2), (ce, yt) => ({
            name: ce,
            fn: withCtx((je) => [
              renderSlot(re.$slots, ce, normalizeProps(guardReactiveProps({ ...je })))
            ])
          }))
        ]), 1040, ["class", "style", "open-on-top", "internal-model-value", "onRecalculatePosition"])) : createCommentVNode("", true)
      ], 8, ["to", "disabled"])) : createCommentVNode("", true)
    ], 2));
  }
});
var Zn = (() => {
  const e2 = Kr;
  return e2.install = (n) => {
    n.component("Vue3DatePicker", e2);
  }, e2;
})();
var xr = Object.freeze(Object.defineProperty({
  __proto__: null,
  default: Zn
}, Symbol.toStringTag, { value: "Module" }));
Object.entries(xr).forEach(([e2, n]) => {
  e2 !== "default" && (Zn[e2] = n);
});
export {
  Zn as default
};
//# sourceMappingURL=@vuepic_vue-datepicker.js.map
