{"version":3,"file":"calendar-card-BmXmnASy.cjs","names":["enUS","defaultLocale","dateFnsEnUS","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","React","components","defaultFormatters","defaultLabels","defaultLabels.labelDayButton","defaultLabels.labelMonthDropdown","defaultLabels.labelNext","defaultLabels.labelPrevious","defaultLabels.labelWeekNumber","defaultLabels.labelYearDropdown","defaultLabels.labelGrid","defaultLabels.labelGridcell","defaultLabels.labelNav","defaultLabels.labelWeekNumberHeader","defaultLabels.labelWeekday","getWeekFn","getISOWeekFn","differenceInCalendarDaysFn","differenceInCalendarMonthsFn","targetMonth","defaultLocale","React"],"sources":["../node_modules/@date-fns/tz/tzName/index.js","../node_modules/@date-fns/tz/tzOffset/index.js","../node_modules/@date-fns/tz/date/mini.js","../node_modules/@date-fns/tz/date/index.js","../node_modules/date-fns/constants.js","../node_modules/date-fns/constructFrom.js","../node_modules/date-fns/toDate.js","../node_modules/date-fns/addDays.js","../node_modules/date-fns/addMonths.js","../node_modules/date-fns/_lib/defaultOptions.js","../node_modules/date-fns/startOfWeek.js","../node_modules/date-fns/startOfISOWeek.js","../node_modules/date-fns/getISOWeekYear.js","../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../node_modules/date-fns/_lib/normalizeDates.js","../node_modules/date-fns/startOfDay.js","../node_modules/date-fns/differenceInCalendarDays.js","../node_modules/date-fns/startOfISOWeekYear.js","../node_modules/date-fns/addWeeks.js","../node_modules/date-fns/addYears.js","../node_modules/date-fns/max.js","../node_modules/date-fns/min.js","../node_modules/date-fns/isSameDay.js","../node_modules/date-fns/isDate.js","../node_modules/date-fns/isValid.js","../node_modules/date-fns/differenceInCalendarMonths.js","../node_modules/date-fns/endOfMonth.js","../node_modules/date-fns/_lib/normalizeInterval.js","../node_modules/date-fns/eachMonthOfInterval.js","../node_modules/date-fns/startOfMonth.js","../node_modules/date-fns/endOfYear.js","../node_modules/date-fns/startOfYear.js","../node_modules/date-fns/eachYearOfInterval.js","../node_modules/date-fns/endOfWeek.js","../node_modules/date-fns/endOfISOWeek.js","../node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../node_modules/date-fns/locale/en-US/_lib/formatLong.js","../node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../node_modules/date-fns/locale/en-US/_lib/localize.js","../node_modules/date-fns/locale/_lib/buildMatchFn.js","../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../node_modules/date-fns/locale/en-US/_lib/match.js","../node_modules/date-fns/locale/en-US.js","../node_modules/date-fns/getDayOfYear.js","../node_modules/date-fns/getISOWeek.js","../node_modules/date-fns/getWeekYear.js","../node_modules/date-fns/startOfWeekYear.js","../node_modules/date-fns/getWeek.js","../node_modules/date-fns/_lib/addLeadingZeros.js","../node_modules/date-fns/_lib/format/lightFormatters.js","../node_modules/date-fns/_lib/format/formatters.js","../node_modules/date-fns/_lib/format/longFormatters.js","../node_modules/date-fns/_lib/protectedTokens.js","../node_modules/date-fns/format.js","../node_modules/date-fns/getDaysInMonth.js","../node_modules/date-fns/getMonth.js","../node_modules/date-fns/getYear.js","../node_modules/date-fns/isAfter.js","../node_modules/date-fns/isBefore.js","../node_modules/date-fns/isSameMonth.js","../node_modules/date-fns/isSameYear.js","../node_modules/date-fns/setMonth.js","../node_modules/date-fns/setYear.js","../node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js","../node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js","../node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js","../node_modules/react-day-picker/dist/esm/locale/en-US.js","../node_modules/react-day-picker/dist/esm/classes/DateLib.js","../node_modules/react-day-picker/dist/esm/classes/CalendarDay.js","../node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js","../node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js","../node_modules/react-day-picker/dist/esm/components/CaptionLabel.js","../node_modules/react-day-picker/dist/esm/components/Chevron.js","../node_modules/react-day-picker/dist/esm/components/Day.js","../node_modules/react-day-picker/dist/esm/components/DayButton.js","../node_modules/react-day-picker/dist/esm/UI.js","../node_modules/react-day-picker/dist/esm/useDayPicker.js","../node_modules/react-day-picker/dist/esm/components/Dropdown.js","../node_modules/react-day-picker/dist/esm/components/DropdownNav.js","../node_modules/react-day-picker/dist/esm/components/Footer.js","../node_modules/react-day-picker/dist/esm/components/Month.js","../node_modules/react-day-picker/dist/esm/components/MonthCaption.js","../node_modules/react-day-picker/dist/esm/components/MonthGrid.js","../node_modules/react-day-picker/dist/esm/components/Months.js","../node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js","../node_modules/react-day-picker/dist/esm/components/Nav.js","../node_modules/react-day-picker/dist/esm/components/NextMonthButton.js","../node_modules/react-day-picker/dist/esm/components/Option.js","../node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js","../node_modules/react-day-picker/dist/esm/components/Root.js","../node_modules/react-day-picker/dist/esm/components/Select.js","../node_modules/react-day-picker/dist/esm/components/Week.js","../node_modules/react-day-picker/dist/esm/components/Weekday.js","../node_modules/react-day-picker/dist/esm/components/Weekdays.js","../node_modules/react-day-picker/dist/esm/components/WeekNumber.js","../node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js","../node_modules/react-day-picker/dist/esm/components/Weeks.js","../node_modules/react-day-picker/dist/esm/components/YearsDropdown.js","../node_modules/react-day-picker/dist/esm/components/custom-components.js","../node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js","../node_modules/react-day-picker/dist/esm/utils/typeguards.js","../node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js","../node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js","../node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js","../node_modules/react-day-picker/dist/esm/helpers/getComponents.js","../node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js","../node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js","../node_modules/react-day-picker/dist/esm/formatters/formatCaption.js","../node_modules/react-day-picker/dist/esm/formatters/formatDay.js","../node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js","../node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js","../node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js","../node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js","../node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js","../node_modules/react-day-picker/dist/esm/formatters/index.js","../node_modules/react-day-picker/dist/esm/helpers/getFormatters.js","../node_modules/react-day-picker/dist/esm/labels/labelDayButton.js","../node_modules/react-day-picker/dist/esm/labels/labelGrid.js","../node_modules/react-day-picker/dist/esm/labels/labelGridcell.js","../node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js","../node_modules/react-day-picker/dist/esm/labels/labelNav.js","../node_modules/react-day-picker/dist/esm/labels/labelNext.js","../node_modules/react-day-picker/dist/esm/labels/labelPrevious.js","../node_modules/react-day-picker/dist/esm/labels/labelWeekday.js","../node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js","../node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js","../node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js","../node_modules/react-day-picker/dist/esm/labels/index.js","../node_modules/react-day-picker/dist/esm/helpers/getLabels.js","../node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js","../node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js","../node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js","../node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js","../node_modules/react-day-picker/dist/esm/noonDateLib.js","../node_modules/react-day-picker/dist/esm/useAnimation.js","../node_modules/react-day-picker/dist/esm/helpers/getDates.js","../node_modules/react-day-picker/dist/esm/helpers/getDays.js","../node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js","../node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js","../node_modules/react-day-picker/dist/esm/helpers/getMonths.js","../node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js","../node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js","../node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js","../node_modules/react-day-picker/dist/esm/helpers/getWeeks.js","../node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js","../node_modules/react-day-picker/dist/esm/useCalendar.js","../node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js","../node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js","../node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js","../node_modules/react-day-picker/dist/esm/useFocus.js","../node_modules/react-day-picker/dist/esm/selection/useMulti.js","../node_modules/react-day-picker/dist/esm/utils/addToRange.js","../node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js","../node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js","../node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js","../node_modules/react-day-picker/dist/esm/selection/useRange.js","../node_modules/react-day-picker/dist/esm/selection/useSingle.js","../node_modules/react-day-picker/dist/esm/useSelection.js","../node_modules/react-day-picker/dist/esm/utils/toTimeZone.js","../node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js","../node_modules/react-day-picker/dist/esm/DayPicker.js","../src/components/ui/calendar-card.tsx"],"sourcesContent":["/**\n * Time zone name format.\n */\n\n/**\n * The function returns the time zone name for the given date in the specified\n * time zone.\n *\n * It uses the `Intl.DateTimeFormat` API and by default outputs the time zone\n * name in a long format, e.g. \"Pacific Standard Time\" or\n * \"Singapore Standard Time\".\n *\n * It is possible to specify the format as the third argument using one of the following options\n *\n * - \"short\": e.g. \"EDT\" or \"GMT+8\".\n * - \"long\": e.g. \"Eastern Daylight Time\".\n * - \"shortGeneric\": e.g. \"ET\" or \"Singapore Time\".\n * - \"longGeneric\": e.g. \"Eastern Time\" or \"Singapore Standard Time\".\n *\n * These options correspond to TR35 tokens `z..zzz`, `zzzz`, `v`, and `vvvv` respectively: https://www.unicode.org/reports/tr35/tr35-dates.html#dfst-zone\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date object to get the time zone name for\n * @param format - Optional format of the time zone name. Defaults to \"long\". Can be \"short\", \"long\", \"shortGeneric\", or \"longGeneric\".\n *\n * @returns Time zone name (e.g. \"Singapore Standard Time\")\n */\nexport function tzName(timeZone, date, format = \"long\") {\n  return new Intl.DateTimeFormat(\"en-US\", {\n    // Enforces engine to render the time. Without the option JavaScriptCore omits it.\n    hour: \"numeric\",\n    timeZone: timeZone,\n    timeZoneName: format\n  }).format(date).split(/\\s/g) // Format.JS uses non-breaking spaces\n  .slice(2) // Skip the hour and AM/PM parts\n  .join(\" \");\n}","const offsetFormatCache = {};\nconst offsetCache = {};\n\n/**\n * The function extracts UTC offset in minutes from the given date in specified\n * time zone.\n *\n * Unlike `Date.prototype.getTimezoneOffset`, this function returns the value\n * mirrored to the sign of the offset in the time zone. For Asia/Singapore\n * (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date to check the offset for\n *\n * @returns UTC offset in minutes\n */\nexport function tzOffset(timeZone, date) {\n  try {\n    const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat(\"en-US\", {\n      timeZone,\n      timeZoneName: \"longOffset\"\n    }).format;\n    const offsetStr = format(date).split(\"GMT\")[1];\n    if (offsetStr in offsetCache) return offsetCache[offsetStr];\n    return calcOffset(offsetStr, offsetStr.split(\":\"));\n  } catch {\n    // Fallback to manual parsing if the runtime doesn't support ±HH:MM/±HHMM/±HH\n    // See: https://github.com/nodejs/node/issues/53419\n    if (timeZone in offsetCache) return offsetCache[timeZone];\n    const captures = timeZone?.match(offsetRe);\n    if (captures) return calcOffset(timeZone, captures.slice(1));\n    return NaN;\n  }\n}\nconst offsetRe = /([+-]\\d\\d):?(\\d\\d)?/;\nfunction calcOffset(cacheStr, values) {\n  const hours = +(values[0] || 0);\n  const minutes = +(values[1] || 0);\n  // Convert seconds to minutes by dividing by 60 to keep the function return in minutes.\n  const seconds = +(values[2] || 0) / 60;\n  return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;\n}","import { tzOffset } from \"../tzOffset/index.js\";\nexport class TZDateMini extends Date {\n  //#region static\n\n  constructor(...args) {\n    super();\n    if (args.length > 1 && typeof args[args.length - 1] === \"string\") {\n      this.timeZone = args.pop();\n    }\n    this.internal = new Date();\n    if (isNaN(tzOffset(this.timeZone, this))) {\n      this.setTime(NaN);\n    } else {\n      if (!args.length) {\n        this.setTime(Date.now());\n      } else if (typeof args[0] === \"number\" && (args.length === 1 || args.length === 2 && typeof args[1] !== \"number\")) {\n        this.setTime(args[0]);\n      } else if (typeof args[0] === \"string\") {\n        this.setTime(+new Date(args[0]));\n      } else if (args[0] instanceof Date) {\n        this.setTime(+args[0]);\n      } else {\n        this.setTime(+new Date(...args));\n        adjustToSystemTZ(this, NaN);\n        syncToInternal(this);\n      }\n    }\n  }\n  static tz(tz, ...args) {\n    return args.length ? new TZDateMini(...args, tz) : new TZDateMini(Date.now(), tz);\n  }\n\n  //#endregion\n\n  //#region time zone\n\n  withTimeZone(timeZone) {\n    return new TZDateMini(+this, timeZone);\n  }\n  getTimezoneOffset() {\n    const offset = -tzOffset(this.timeZone, this);\n    // Remove the seconds offset\n    // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n    return offset > 0 ? Math.floor(offset) : Math.ceil(offset);\n  }\n\n  //#endregion\n\n  //#region time\n\n  setTime(time) {\n    Date.prototype.setTime.apply(this, arguments);\n    syncToInternal(this);\n    return +this;\n  }\n\n  //#endregion\n\n  //#region date-fns integration\n\n  [Symbol.for(\"constructDateFrom\")](date) {\n    return new TZDateMini(+new Date(date), this.timeZone);\n  }\n\n  //#endregion\n}\n\n// Assign getters and setters\nconst re = /^(get|set)(?!UTC)/;\nObject.getOwnPropertyNames(Date.prototype).forEach(method => {\n  if (!re.test(method)) return;\n  const utcMethod = method.replace(re, \"$1UTC\");\n  // Filter out methods without UTC counterparts\n  if (!TZDateMini.prototype[utcMethod]) return;\n  if (method.startsWith(\"get\")) {\n    // Delegate to internal date's UTC method\n    TZDateMini.prototype[method] = function () {\n      return this.internal[utcMethod]();\n    };\n  } else {\n    // Assign regular setter\n    TZDateMini.prototype[method] = function () {\n      Date.prototype[utcMethod].apply(this.internal, arguments);\n      syncFromInternal(this);\n      return +this;\n    };\n\n    // Assign UTC setter\n    TZDateMini.prototype[utcMethod] = function () {\n      Date.prototype[utcMethod].apply(this, arguments);\n      syncToInternal(this);\n      return +this;\n    };\n  }\n});\n\n/**\n * Function syncs time to internal date, applying the time zone offset.\n *\n * @param {Date} date - Date to sync\n */\nfunction syncToInternal(date) {\n  date.internal.setTime(+date);\n  date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));\n}\n\n/**\n * Function syncs the internal date UTC values to the date. It allows to get\n * accurate timestamp value.\n *\n * @param {Date} date - The date to sync\n */\nfunction syncFromInternal(date) {\n  // First we transpose the internal values\n  Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());\n  Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());\n\n  // Now we have to adjust the date to the system time zone\n  adjustToSystemTZ(date);\n}\n\n/**\n * Function adjusts the date to the system time zone. It uses the time zone\n * differences to calculate the offset and adjust the date.\n *\n * @param {Date} date - Date to adjust\n */\nfunction adjustToSystemTZ(date) {\n  // Save the time zone offset before all the adjustments\n  const baseOffset = tzOffset(date.timeZone, date);\n  // Remove the seconds offset\n  // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n  const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);\n  //#region System DST adjustment\n\n  // The biggest problem with using the system time zone is that when we create\n  // a date from internal values stored in UTC, the system time zone might end\n  // up on the DST hour:\n  //\n  //   $ TZ=America/New_York node\n  //   > new Date(2020, 2, 8, 1).toString()\n  //   'Sun Mar 08 2020 01:00:00 GMT-0500 (Eastern Standard Time)'\n  //   > new Date(2020, 2, 8, 2).toString()\n  //   'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n  //   > new Date(2020, 2, 8, 3).toString()\n  //   'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n  //   > new Date(2020, 2, 8, 4).toString()\n  //   'Sun Mar 08 2020 04:00:00 GMT-0400 (Eastern Daylight Time)'\n  //\n  // Here we get the same hour for both 2 and 3, because the system time zone\n  // has DST beginning at 8 March 2020, 2 a.m. and jumps to 3 a.m. So we have\n  // to adjust the internal date to reflect that.\n  //\n  // However we want to adjust only if that's the DST hour the change happenes,\n  // not the hour where DST moves to.\n\n  // We calculate the previous hour to see if the time zone offset has changed\n  // and we have landed on the DST hour.\n  const prevHour = new Date(+date);\n  // We use UTC methods here as we don't want to land on the same hour again\n  // in case of DST.\n  prevHour.setUTCHours(prevHour.getUTCHours() - 1);\n\n  // Calculate if we are on the system DST hour.\n  const systemOffset = -new Date(+date).getTimezoneOffset();\n  const prevHourSystemOffset = -new Date(+prevHour).getTimezoneOffset();\n  const systemDSTChange = systemOffset - prevHourSystemOffset;\n  // Detect the DST shift. System DST change will occur both on\n  const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();\n\n  // Move the internal date when we are on the system DST hour.\n  if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);\n\n  //#endregion\n\n  //#region System diff adjustment\n\n  // Now we need to adjust the date, since we just applied internal values.\n  // We need to calculate the difference between the system and date time zones\n  // and apply it to the date.\n\n  const offsetDiff = systemOffset - offset;\n  if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);\n\n  //#endregion\n\n  //#region Seconds System diff adjustment\n\n  const systemDate = new Date(+date);\n  // Set the UTC seconds to 0 to isolate the timezone offset in seconds.\n  systemDate.setUTCSeconds(0);\n  // For negative systemOffset, invert the seconds.\n  const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;\n\n  // Calculate the seconds offset based on the timezone offset.\n  const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;\n  if (secondsOffset || systemSecondsOffset) {\n    date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);\n    Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);\n  }\n\n  //#endregion\n\n  //#region Post-adjustment DST fix\n\n  const postBaseOffset = tzOffset(date.timeZone, date);\n  // Remove the seconds offset\n  // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n  const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);\n  const postSystemOffset = -new Date(+date).getTimezoneOffset();\n  const postOffsetDiff = postSystemOffset - postOffset;\n  const offsetChanged = postOffset !== offset;\n  const postDiff = postOffsetDiff - offsetDiff;\n  if (offsetChanged && postDiff) {\n    Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);\n\n    // Now we need to check if got offset change during the post-adjustment.\n    // If so, we also need both dates to reflect that.\n\n    const newBaseOffset = tzOffset(date.timeZone, date);\n    // Remove the seconds offset\n    // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n    const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);\n    const offsetChange = postOffset - newOffset;\n    if (offsetChange) {\n      date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);\n      Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);\n    }\n  }\n\n  //#endregion\n}","import { tzName } from \"../tzName/index.js\";\nimport { TZDateMini } from \"./mini.js\";\nexport class TZDate extends TZDateMini {\n  //#region static\n\n  static tz(tz, ...args) {\n    return args.length ? new TZDate(...args, tz) : new TZDate(Date.now(), tz);\n  }\n\n  //#endregion\n\n  //#region representation\n\n  toISOString() {\n    const [sign, hours, minutes] = this.tzComponents();\n    const tz = `${sign}${hours}:${minutes}`;\n    return this.internal.toISOString().slice(0, -1) + tz;\n  }\n  toString() {\n    // \"Tue Aug 13 2024 07:50:19 GMT+0800 (Singapore Standard Time)\";\n    return `${this.toDateString()} ${this.toTimeString()}`;\n  }\n  toDateString() {\n    // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n    const [day, date, month, year] = this.internal.toUTCString().split(\" \");\n    // \"Tue Aug 13 2024\"\n    return `${day?.slice(0, -1) /* Remove \",\" */} ${month} ${date} ${year}`;\n  }\n  toTimeString() {\n    // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n    const time = this.internal.toUTCString().split(\" \")[4];\n    const [sign, hours, minutes] = this.tzComponents();\n    // \"07:42:23 GMT+0800 (Singapore Standard Time)\"\n    return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;\n  }\n  toLocaleString(locales, options) {\n    return Date.prototype.toLocaleString.call(this, locales, {\n      ...options,\n      timeZone: options?.timeZone || this.timeZone\n    });\n  }\n  toLocaleDateString(locales, options) {\n    return Date.prototype.toLocaleDateString.call(this, locales, {\n      ...options,\n      timeZone: options?.timeZone || this.timeZone\n    });\n  }\n  toLocaleTimeString(locales, options) {\n    return Date.prototype.toLocaleTimeString.call(this, locales, {\n      ...options,\n      timeZone: options?.timeZone || this.timeZone\n    });\n  }\n\n  //#endregion\n\n  //#region private\n\n  tzComponents() {\n    const offset = this.getTimezoneOffset();\n    const sign = offset > 0 ? \"-\" : \"+\";\n    const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, \"0\");\n    const minutes = String(Math.abs(offset) % 60).padStart(2, \"0\");\n    return [sign, hours, minutes];\n  }\n\n  //#endregion\n\n  withTimeZone(timeZone) {\n    return new TZDate(+this, timeZone);\n  }\n\n  //#region date-fns integration\n\n  [Symbol.for(\"constructDateFrom\")](date) {\n    return new TZDate(+new Date(date), this.timeZone);\n  }\n\n  //#endregion\n}","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n *   return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n *   return constructFrom(\n *     date, // Use constructor from the given date\n *     date.getTime() // Use the date value to create a new date\n *   );\n * }\n */\nexport function constructFrom(date, value) {\n  if (typeof date === \"function\") return date(value);\n\n  if (date && typeof date === \"object\" && constructFromSymbol in date)\n    return date[constructFromSymbol](value);\n\n  if (date instanceof Date) return new date.constructor(value);\n\n  return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n  // [TODO] Get rid of `toDate` or `constructFrom`?\n  return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addDays} function options.\n */\n\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of days to be added.\n * @param options - An object with options\n *\n * @returns The new date with the days added\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\nexport function addDays(date, amount, options) {\n  const _date = toDate(date, options?.in);\n  if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n\n  // If 0 days, no-op to avoid changing times in the hour before end of DST\n  if (!amount) return _date;\n\n  _date.setDate(_date.getDate() + amount);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default addDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n  const _date = toDate(date, options?.in);\n  if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n  if (!amount) {\n    // If 0 months, no-op to avoid changing times in the hour before end of DST\n    return _date;\n  }\n  const dayOfMonth = _date.getDate();\n\n  // The JS Date object supports date math by accepting out-of-bounds values for\n  // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n  // new Date(2020, 13, 1) returns 1 Feb 2021.  This is *almost* the behavior we\n  // want except that dates will wrap around the end of a month, meaning that\n  // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n  // we'll default to the end of the desired month by adding 1 to the desired\n  // month and using a date of 0 to back up one day to the end of the desired\n  // month.\n  const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n  endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n  const daysInMonth = endOfDesiredMonth.getDate();\n  if (dayOfMonth >= daysInMonth) {\n    // If we're already at the end of the month, then this is the correct date\n    // and we're done.\n    return endOfDesiredMonth;\n  } else {\n    // Otherwise, we now know that setting the original day-of-month value won't\n    // cause an overflow, so set the desired day-of-month. Note that we can't\n    // just set the date of `endOfDesiredMonth` because that object may have had\n    // its time changed in the unusual case where where a DST transition was on\n    // the last day of the month and its local time was in the hour skipped or\n    // repeated next to a DST transition.  So we use `date` instead which is\n    // guaranteed to still have the original time.\n    _date.setFullYear(\n      endOfDesiredMonth.getFullYear(),\n      endOfDesiredMonth.getMonth(),\n      dayOfMonth,\n    );\n    return _date;\n  }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n  return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n  defaultOptions = newOptions;\n}\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const _date = toDate(date, options?.in);\n  const day = _date.getDay();\n  const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n  _date.setDate(_date.getDate() - diff);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n  return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n\n  const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n  fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n  fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n  const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n  const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n  fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n  fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n  const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n  if (_date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (_date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n  const _date = toDate(date);\n  const utcDate = new Date(\n    Date.UTC(\n      _date.getFullYear(),\n      _date.getMonth(),\n      _date.getDate(),\n      _date.getHours(),\n      _date.getMinutes(),\n      _date.getSeconds(),\n      _date.getMilliseconds(),\n    ),\n  );\n  utcDate.setUTCFullYear(_date.getFullYear());\n  return +date - +utcDate;\n}\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n  const normalize = constructFrom.bind(\n    null,\n    context || dates.find((date) => typeof date === \"object\"),\n  );\n  return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n  const _date = toDate(date, options?.in);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n *   new Date(2011, 6, 3, 0, 1),\n *   new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  const laterStartOfDay = startOfDay(laterDate_);\n  const earlierStartOfDay = startOfDay(earlierDate_);\n\n  const laterTimestamp =\n    +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n  const earlierTimestamp =\n    +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n  // Round the number of days to the nearest integer because the number of\n  // milliseconds in a day is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n  const year = getISOWeekYear(date, options);\n  const fourthOfJanuary = constructFrom(options?.in || date, 0);\n  fourthOfJanuary.setFullYear(year, 0, 4);\n  fourthOfJanuary.setHours(0, 0, 0, 0);\n  return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link addWeeks} function options.\n */\n\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of weeks to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be added.\n * @param options - An object with options\n *\n * @returns The new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nexport function addWeeks(date, amount, options) {\n  return addDays(date, amount * 7, options);\n}\n\n// Fallback for modularized imports:\nexport default addWeeks;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n  return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link max} function options.\n */\n\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The latest of the dates\n *\n * @example\n * // Which of these dates is the latest?\n * const result = max([\n *   new Date(1989, 6, 10),\n *   new Date(1987, 1, 11),\n *   new Date(1995, 6, 2),\n *   new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\nexport function max(dates, options) {\n  let result;\n  let context = options?.in;\n\n  dates.forEach((date) => {\n    // Use the first date object as the context function\n    if (!context && typeof date === \"object\")\n      context = constructFrom.bind(null, date);\n\n    const date_ = toDate(date, context);\n    if (!result || result < date_ || isNaN(+date_)) result = date_;\n  });\n\n  return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default max;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link min} function options.\n */\n\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param dates - The dates to compare\n *\n * @returns The earliest of the dates\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n *   new Date(1989, 6, 10),\n *   new Date(1987, 1, 11),\n *   new Date(1995, 6, 2),\n *   new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\nexport function min(dates, options) {\n  let result;\n  let context = options?.in;\n\n  dates.forEach((date) => {\n    // Use the first date object as the context function\n    if (!context && typeof date === \"object\")\n      context = constructFrom.bind(null, date);\n\n    const date_ = toDate(date, context);\n    if (!result || result > date_ || isNaN(+date_)) result = date_;\n  });\n\n  return constructFrom(context, result || NaN);\n}\n\n// Fallback for modularized imports:\nexport default min;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n  const [dateLeft_, dateRight_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n  return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n  return (\n    value instanceof Date ||\n    (typeof value === \"object\" &&\n      Object.prototype.toString.call(value) === \"[object Date]\")\n  );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n  return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link differenceInCalendarMonths} function options.\n */\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - An object with options\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n *   new Date(2014, 8, 1),\n *   new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n\n  const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();\n  const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();\n\n  return yearsDiff * 12 + monthsDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  const month = _date.getMonth();\n  _date.setFullYear(_date.getFullYear(), month + 1, 0);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { normalizeDates } from \"./normalizeDates.js\";\n\nexport function normalizeInterval(context, interval) {\n  const [start, end] = normalizeDates(context, interval.start, interval.end);\n  return { start, end };\n}\n","import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachMonthOfInterval} function options.\n */\n\n/**\n * The {@link eachMonthOfInterval} function result type. It resolves the proper data type.\n */\n\n/**\n * @name eachMonthOfInterval\n * @category Interval Helpers\n * @summary Return the array of months within the specified time interval.\n *\n * @description\n * Return the array of months within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of months from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each month between 6 February 2014 and 10 August 2014:\n * const result = eachMonthOfInterval({\n *   start: new Date(2014, 1, 6),\n *   end: new Date(2014, 7, 10)\n * })\n * //=> [\n * //   Sat Feb 01 2014 00:00:00,\n * //   Sat Mar 01 2014 00:00:00,\n * //   Tue Apr 01 2014 00:00:00,\n * //   Thu May 01 2014 00:00:00,\n * //   Sun Jun 01 2014 00:00:00,\n * //   Tue Jul 01 2014 00:00:00,\n * //   Fri Aug 01 2014 00:00:00\n * // ]\n */\nexport function eachMonthOfInterval(interval, options) {\n  const { start, end } = normalizeInterval(options?.in, interval);\n\n  let reversed = +start > +end;\n  const endTime = reversed ? +start : +end;\n  const date = reversed ? end : start;\n  date.setHours(0, 0, 0, 0);\n  date.setDate(1);\n\n  let step = options?.step ?? 1;\n  if (!step) return [];\n  if (step < 0) {\n    step = -step;\n    reversed = !reversed;\n  }\n\n  const dates = [];\n\n  while (+date <= endTime) {\n    dates.push(constructFrom(start, date));\n    date.setMonth(date.getMonth() + step);\n  }\n\n  return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachMonthOfInterval;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  _date.setDate(1);\n  _date.setHours(0, 0, 0, 0);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfYear} function options.\n */\n\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The end of a year\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\nexport function endOfYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n  _date.setFullYear(year + 1, 0, 0);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYear;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n  const date_ = toDate(date, options?.in);\n  date_.setFullYear(date_.getFullYear(), 0, 1);\n  date_.setHours(0, 0, 0, 0);\n  return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { normalizeInterval } from \"./_lib/normalizeInterval.js\";\nimport { constructFrom } from \"./constructFrom.js\";\n\n/**\n * The {@link eachYearOfInterval} function options.\n */\n\n/**\n * The {@link eachYearOfInterval} function result type. It resolves the proper data type.\n * It uses the first argument date object type, starting from the date argument,\n * then the start interval date, and finally the end interval date. If\n * a context function is passed, it uses the context function return type.\n */\n\n/**\n * @name eachYearOfInterval\n * @category Interval Helpers\n * @summary Return the array of yearly timestamps within the specified time interval.\n *\n * @description\n * Return the array of yearly timestamps within the specified time interval.\n *\n * @typeParam IntervalType - Interval type.\n * @typeParam Options - Options type.\n *\n * @param interval - The interval.\n * @param options - An object with options.\n *\n * @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end\n *\n * @example\n * // Each year between 6 February 2014 and 10 August 2017:\n * const result = eachYearOfInterval({\n *   start: new Date(2014, 1, 6),\n *   end: new Date(2017, 7, 10)\n * })\n * //=> [\n * //   Wed Jan 01 2014 00:00:00,\n * //   Thu Jan 01 2015 00:00:00,\n * //   Fri Jan 01 2016 00:00:00,\n * //   Sun Jan 01 2017 00:00:00\n * // ]\n */\nexport function eachYearOfInterval(interval, options) {\n  const { start, end } = normalizeInterval(options?.in, interval);\n\n  let reversed = +start > +end;\n  const endTime = reversed ? +start : +end;\n  const date = reversed ? end : start;\n  date.setHours(0, 0, 0, 0);\n  date.setMonth(0, 1);\n\n  let step = options?.step ?? 1;\n  if (!step) return [];\n  if (step < 0) {\n    step = -step;\n    reversed = !reversed;\n  }\n\n  const dates = [];\n\n  while (+date <= endTime) {\n    dates.push(constructFrom(start, date));\n    date.setFullYear(date.getFullYear() + step);\n  }\n\n  return reversed ? dates.reverse() : dates;\n}\n\n// Fallback for modularized imports:\nexport default eachYearOfInterval;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const _date = toDate(date, options?.in);\n  const day = _date.getDay();\n  const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n  _date.setDate(_date.getDate() + diff);\n  _date.setHours(23, 59, 59, 999);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","import { endOfWeek } from \"./endOfWeek.js\";\n\n/**\n * The {@link endOfISOWeek} function options.\n */\n\n/**\n * @name endOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of an ISO week\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfISOWeek(date, options) {\n  return endOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default endOfISOWeek;\n","const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"less than a second\",\n    other: \"less than {{count}} seconds\",\n  },\n\n  xSeconds: {\n    one: \"1 second\",\n    other: \"{{count}} seconds\",\n  },\n\n  halfAMinute: \"half a minute\",\n\n  lessThanXMinutes: {\n    one: \"less than a minute\",\n    other: \"less than {{count}} minutes\",\n  },\n\n  xMinutes: {\n    one: \"1 minute\",\n    other: \"{{count}} minutes\",\n  },\n\n  aboutXHours: {\n    one: \"about 1 hour\",\n    other: \"about {{count}} hours\",\n  },\n\n  xHours: {\n    one: \"1 hour\",\n    other: \"{{count}} hours\",\n  },\n\n  xDays: {\n    one: \"1 day\",\n    other: \"{{count}} days\",\n  },\n\n  aboutXWeeks: {\n    one: \"about 1 week\",\n    other: \"about {{count}} weeks\",\n  },\n\n  xWeeks: {\n    one: \"1 week\",\n    other: \"{{count}} weeks\",\n  },\n\n  aboutXMonths: {\n    one: \"about 1 month\",\n    other: \"about {{count}} months\",\n  },\n\n  xMonths: {\n    one: \"1 month\",\n    other: \"{{count}} months\",\n  },\n\n  aboutXYears: {\n    one: \"about 1 year\",\n    other: \"about {{count}} years\",\n  },\n\n  xYears: {\n    one: \"1 year\",\n    other: \"{{count}} years\",\n  },\n\n  overXYears: {\n    one: \"over 1 year\",\n    other: \"over {{count}} years\",\n  },\n\n  almostXYears: {\n    one: \"almost 1 year\",\n    other: \"almost {{count}} years\",\n  },\n};\n\nexport const formatDistance = (token, count, options) => {\n  let result;\n\n  const tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === \"string\") {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace(\"{{count}}\", count.toString());\n  }\n\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"in \" + result;\n    } else {\n      return result + \" ago\";\n    }\n  }\n\n  return result;\n};\n","export function buildFormatLongFn(args) {\n  return (options = {}) => {\n    // TODO: Remove String()\n    const width = options.width ? String(options.width) : args.defaultWidth;\n    const format = args.formats[width] || args.formats[args.defaultWidth];\n    return format;\n  };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n  full: \"EEEE, MMMM do, y\",\n  long: \"MMMM do, y\",\n  medium: \"MMM d, y\",\n  short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n  full: \"h:mm:ss a zzzz\",\n  long: \"h:mm:ss a z\",\n  medium: \"h:mm:ss a\",\n  short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n  full: \"{{date}} 'at' {{time}}\",\n  long: \"{{date}} 'at' {{time}}\",\n  medium: \"{{date}}, {{time}}\",\n  short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: \"full\",\n  }),\n\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: \"full\",\n  }),\n\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: \"full\",\n  }),\n};\n","const formatRelativeLocale = {\n  lastWeek: \"'last' eeee 'at' p\",\n  yesterday: \"'yesterday at' p\",\n  today: \"'today at' p\",\n  tomorrow: \"'tomorrow at' p\",\n  nextWeek: \"eeee 'at' p\",\n  other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n  formatRelativeLocale[token];\n","/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n  return (value, options) => {\n    const context = options?.context ? String(options.context) : \"standalone\";\n\n    let valuesArray;\n    if (context === \"formatting\" && args.formattingValues) {\n      const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      const width = options?.width ? String(options.width) : defaultWidth;\n\n      valuesArray =\n        args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      const defaultWidth = args.defaultWidth;\n      const width = options?.width ? String(options.width) : args.defaultWidth;\n\n      valuesArray = args.values[width] || args.values[defaultWidth];\n    }\n    const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n    // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n    return valuesArray[index];\n  };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n  narrow: [\"B\", \"A\"],\n  abbreviated: [\"BC\", \"AD\"],\n  wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n  narrow: [\"1\", \"2\", \"3\", \"4\"],\n  abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n  wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n  narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n  abbreviated: [\n    \"Jan\",\n    \"Feb\",\n    \"Mar\",\n    \"Apr\",\n    \"May\",\n    \"Jun\",\n    \"Jul\",\n    \"Aug\",\n    \"Sep\",\n    \"Oct\",\n    \"Nov\",\n    \"Dec\",\n  ],\n\n  wide: [\n    \"January\",\n    \"February\",\n    \"March\",\n    \"April\",\n    \"May\",\n    \"June\",\n    \"July\",\n    \"August\",\n    \"September\",\n    \"October\",\n    \"November\",\n    \"December\",\n  ],\n};\n\nconst dayValues = {\n  narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n  short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n  abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n  wide: [\n    \"Sunday\",\n    \"Monday\",\n    \"Tuesday\",\n    \"Wednesday\",\n    \"Thursday\",\n    \"Friday\",\n    \"Saturday\",\n  ],\n};\n\nconst dayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"morning\",\n    afternoon: \"afternoon\",\n    evening: \"evening\",\n    night: \"night\",\n  },\n};\n\nconst formattingDayPeriodValues = {\n  narrow: {\n    am: \"a\",\n    pm: \"p\",\n    midnight: \"mi\",\n    noon: \"n\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  abbreviated: {\n    am: \"AM\",\n    pm: \"PM\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n  wide: {\n    am: \"a.m.\",\n    pm: \"p.m.\",\n    midnight: \"midnight\",\n    noon: \"noon\",\n    morning: \"in the morning\",\n    afternoon: \"in the afternoon\",\n    evening: \"in the evening\",\n    night: \"at night\",\n  },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n  const number = Number(dirtyNumber);\n\n  // If ordinal numbers depend on context, for example,\n  // if they are different for different grammatical genders,\n  // use `options.unit`.\n  //\n  // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n  // 'day', 'hour', 'minute', 'second'.\n\n  const rem100 = number % 100;\n  if (rem100 > 20 || rem100 < 10) {\n    switch (rem100 % 10) {\n      case 1:\n        return number + \"st\";\n      case 2:\n        return number + \"nd\";\n      case 3:\n        return number + \"rd\";\n    }\n  }\n  return number + \"th\";\n};\n\nexport const localize = {\n  ordinalNumber,\n\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: \"wide\",\n  }),\n\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: \"wide\",\n    argumentCallback: (quarter) => quarter - 1,\n  }),\n\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: \"wide\",\n  }),\n\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: \"wide\",\n  }),\n\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: \"wide\",\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: \"wide\",\n  }),\n};\n","export function buildMatchFn(args) {\n  return (string, options = {}) => {\n    const width = options.width;\n\n    const matchPattern =\n      (width && args.matchPatterns[width]) ||\n      args.matchPatterns[args.defaultMatchWidth];\n    const matchResult = string.match(matchPattern);\n\n    if (!matchResult) {\n      return null;\n    }\n    const matchedString = matchResult[0];\n\n    const parsePatterns =\n      (width && args.parsePatterns[width]) ||\n      args.parsePatterns[args.defaultParseWidth];\n\n    const key = Array.isArray(parsePatterns)\n      ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n      : // [TODO] -- I challenge you to fix the type\n        findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n    let value;\n\n    value = args.valueCallback ? args.valueCallback(key) : key;\n    value = options.valueCallback\n      ? // [TODO] -- I challenge you to fix the type\n        options.valueCallback(value)\n      : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n\nfunction findKey(object, predicate) {\n  for (const key in object) {\n    if (\n      Object.prototype.hasOwnProperty.call(object, key) &&\n      predicate(object[key])\n    ) {\n      return key;\n    }\n  }\n  return undefined;\n}\n\nfunction findIndex(array, predicate) {\n  for (let key = 0; key < array.length; key++) {\n    if (predicate(array[key])) {\n      return key;\n    }\n  }\n  return undefined;\n}\n","export function buildMatchPatternFn(args) {\n  return (string, options = {}) => {\n    const matchResult = string.match(args.matchPattern);\n    if (!matchResult) return null;\n    const matchedString = matchResult[0];\n\n    const parseResult = string.match(args.parsePattern);\n    if (!parseResult) return null;\n    let value = args.valueCallback\n      ? args.valueCallback(parseResult[0])\n      : parseResult[0];\n\n    // [TODO] I challenge you to fix the type\n    value = options.valueCallback ? options.valueCallback(value) : value;\n\n    const rest = string.slice(matchedString.length);\n\n    return { value, rest };\n  };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n  narrow: /^(b|a)/i,\n  abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n  any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n  narrow: [\n    /^j/i,\n    /^f/i,\n    /^m/i,\n    /^a/i,\n    /^m/i,\n    /^j/i,\n    /^j/i,\n    /^a/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n\n  any: [\n    /^ja/i,\n    /^f/i,\n    /^mar/i,\n    /^ap/i,\n    /^may/i,\n    /^jun/i,\n    /^jul/i,\n    /^au/i,\n    /^s/i,\n    /^o/i,\n    /^n/i,\n    /^d/i,\n  ],\n};\n\nconst matchDayPatterns = {\n  narrow: /^[smtwf]/i,\n  short: /^(su|mo|tu|we|th|fr|sa)/i,\n  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n  any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^mi/i,\n    noon: /^no/i,\n    morning: /morning/i,\n    afternoon: /afternoon/i,\n    evening: /evening/i,\n    night: /night/i,\n  },\n};\n\nexport const match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: (value) => parseInt(value, 10),\n  }),\n\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: \"any\",\n    valueCallback: (index) => index + 1,\n  }),\n\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: \"wide\",\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: \"any\",\n  }),\n\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: \"any\",\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: \"any\",\n  }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n  code: \"en-US\",\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 0 /* Sunday */,\n    firstWeekContainsDate: 1,\n  },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const diff = differenceInCalendarDays(_date, startOfYear(_date));\n  const dayOfYear = diff + 1;\n  return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n  const _date = toDate(date, options?.in);\n  const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n  // Round the number of weeks to the nearest integer because the number of\n  // milliseconds in a week is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n\n  const defaultOptions = getDefaultOptions();\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n  firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n  firstWeekOfNextYear.setHours(0, 0, 0, 0);\n  const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n  const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n  firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n  firstWeekOfThisYear.setHours(0, 0, 0, 0);\n  const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n  if (+_date >= +startOfNextYear) {\n    return year + 1;\n  } else if (+_date >= +startOfThisYear) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n *   weekStartsOn: 1,\n *   firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n  const defaultOptions = getDefaultOptions();\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const year = getWeekYear(date, options);\n  const firstWeek = constructFrom(options?.in || date, 0);\n  firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n  firstWeek.setHours(0, 0, 0, 0);\n  const _date = startOfWeek(firstWeek, options);\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n *   weekStartsOn: 1,\n *   firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n  const _date = toDate(date, options?.in);\n  const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n  // Round the number of weeks to the nearest integer because the number of\n  // milliseconds in a week is not constant (e.g. it's different in the week of\n  // the daylight saving time clock shift).\n  return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n  const sign = number < 0 ? \"-\" : \"\";\n  const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n  return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* |                                |\n * |  d  | Day of month                   |  D  |                                |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  m  | Minute                         |  M  | Month                          |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  y  | Year (abs)                     |  Y  |                                |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n  // Year\n  y(date, token) {\n    // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n    // | Year     |     y | yy |   yyy |  yyyy | yyyyy |\n    // |----------|-------|----|-------|-------|-------|\n    // | AD 1     |     1 | 01 |   001 |  0001 | 00001 |\n    // | AD 12    |    12 | 12 |   012 |  0012 | 00012 |\n    // | AD 123   |   123 | 23 |   123 |  0123 | 00123 |\n    // | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |\n    // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n    const signedYear = date.getFullYear();\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    const year = signedYear > 0 ? signedYear : 1 - signedYear;\n    return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n  },\n\n  // Month\n  M(date, token) {\n    const month = date.getMonth();\n    return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n  },\n\n  // Day of the month\n  d(date, token) {\n    return addLeadingZeros(date.getDate(), token.length);\n  },\n\n  // AM or PM\n  a(date, token) {\n    const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n    switch (token) {\n      case \"a\":\n      case \"aa\":\n        return dayPeriodEnumValue.toUpperCase();\n      case \"aaa\":\n        return dayPeriodEnumValue;\n      case \"aaaaa\":\n        return dayPeriodEnumValue[0];\n      case \"aaaa\":\n      default:\n        return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n    }\n  },\n\n  // Hour [1-12]\n  h(date, token) {\n    return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n  },\n\n  // Hour [0-23]\n  H(date, token) {\n    return addLeadingZeros(date.getHours(), token.length);\n  },\n\n  // Minute\n  m(date, token) {\n    return addLeadingZeros(date.getMinutes(), token.length);\n  },\n\n  // Second\n  s(date, token) {\n    return addLeadingZeros(date.getSeconds(), token.length);\n  },\n\n  // Fraction of second\n  S(date, token) {\n    const numberOfDigits = token.length;\n    const milliseconds = date.getMilliseconds();\n    const fractionalSeconds = Math.trunc(\n      milliseconds * Math.pow(10, numberOfDigits - 3),\n    );\n    return addLeadingZeros(fractionalSeconds, token.length);\n  },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n  am: \"am\",\n  pm: \"pm\",\n  midnight: \"midnight\",\n  noon: \"noon\",\n  morning: \"morning\",\n  afternoon: \"afternoon\",\n  evening: \"evening\",\n  night: \"night\",\n};\n\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* | Milliseconds in day            |\n * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |\n * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |\n * |  d  | Day of month                   |  D  | Day of year                    |\n * |  e  | Local day of week              |  E  | Day of week                    |\n * |  f  |                                |  F* | Day of week in month           |\n * |  g* | Modified Julian day            |  G  | Era                            |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  i! | ISO day of week                |  I! | ISO week of year               |\n * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |\n * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |\n * |  l* | (deprecated)                   |  L  | Stand-alone month              |\n * |  m  | Minute                         |  M  | Month                          |\n * |  n  |                                |  N  |                                |\n * |  o! | Ordinal number modifier        |  O  | Timezone (GMT)                 |\n * |  p! | Long localized time            |  P! | Long localized date            |\n * |  q  | Stand-alone quarter            |  Q  | Quarter                        |\n * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |\n * |  u  | Extended year                  |  U* | Cyclic year                    |\n * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |\n * |  w  | Local week of year             |  W* | Week of month                  |\n * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |\n * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |\n * |  z  | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n *   i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n *   `R` is supposed to be used in conjunction with `I` and `i`\n *   for universal ISO week-numbering date, whereas\n *   `Y` is supposed to be used in conjunction with `w` and `e`\n *   for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n  // Era\n  G: function (date, token, localize) {\n    const era = date.getFullYear() > 0 ? 1 : 0;\n    switch (token) {\n      // AD, BC\n      case \"G\":\n      case \"GG\":\n      case \"GGG\":\n        return localize.era(era, { width: \"abbreviated\" });\n      // A, B\n      case \"GGGGG\":\n        return localize.era(era, { width: \"narrow\" });\n      // Anno Domini, Before Christ\n      case \"GGGG\":\n      default:\n        return localize.era(era, { width: \"wide\" });\n    }\n  },\n\n  // Year\n  y: function (date, token, localize) {\n    // Ordinal number\n    if (token === \"yo\") {\n      const signedYear = date.getFullYear();\n      // Returns 1 for 1 BC (which is year 0 in JavaScript)\n      const year = signedYear > 0 ? signedYear : 1 - signedYear;\n      return localize.ordinalNumber(year, { unit: \"year\" });\n    }\n\n    return lightFormatters.y(date, token);\n  },\n\n  // Local week-numbering year\n  Y: function (date, token, localize, options) {\n    const signedWeekYear = getWeekYear(date, options);\n    // Returns 1 for 1 BC (which is year 0 in JavaScript)\n    const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n    // Two digit year\n    if (token === \"YY\") {\n      const twoDigitYear = weekYear % 100;\n      return addLeadingZeros(twoDigitYear, 2);\n    }\n\n    // Ordinal number\n    if (token === \"Yo\") {\n      return localize.ordinalNumber(weekYear, { unit: \"year\" });\n    }\n\n    // Padding\n    return addLeadingZeros(weekYear, token.length);\n  },\n\n  // ISO week-numbering year\n  R: function (date, token) {\n    const isoWeekYear = getISOWeekYear(date);\n\n    // Padding\n    return addLeadingZeros(isoWeekYear, token.length);\n  },\n\n  // Extended year. This is a single number designating the year of this calendar system.\n  // The main difference between `y` and `u` localizers are B.C. years:\n  // | Year | `y` | `u` |\n  // |------|-----|-----|\n  // | AC 1 |   1 |   1 |\n  // | BC 1 |   1 |   0 |\n  // | BC 2 |   2 |  -1 |\n  // Also `yy` always returns the last two digits of a year,\n  // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n  u: function (date, token) {\n    const year = date.getFullYear();\n    return addLeadingZeros(year, token.length);\n  },\n\n  // Quarter\n  Q: function (date, token, localize) {\n    const quarter = Math.ceil((date.getMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"Q\":\n        return String(quarter);\n      // 01, 02, 03, 04\n      case \"QQ\":\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case \"Qo\":\n        return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"QQQ\":\n        return localize.quarter(quarter, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"QQQQQ\":\n        return localize.quarter(quarter, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"QQQQ\":\n      default:\n        return localize.quarter(quarter, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Stand-alone quarter\n  q: function (date, token, localize) {\n    const quarter = Math.ceil((date.getMonth() + 1) / 3);\n    switch (token) {\n      // 1, 2, 3, 4\n      case \"q\":\n        return String(quarter);\n      // 01, 02, 03, 04\n      case \"qq\":\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n      case \"qo\":\n        return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n      // Q1, Q2, Q3, Q4\n      case \"qqq\":\n        return localize.quarter(quarter, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n      case \"qqqqq\":\n        return localize.quarter(quarter, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // 1st quarter, 2nd quarter, ...\n      case \"qqqq\":\n      default:\n        return localize.quarter(quarter, {\n          width: \"wide\",\n          context: \"standalone\",\n        });\n    }\n  },\n\n  // Month\n  M: function (date, token, localize) {\n    const month = date.getMonth();\n    switch (token) {\n      case \"M\":\n      case \"MM\":\n        return lightFormatters.M(date, token);\n      // 1st, 2nd, ..., 12th\n      case \"Mo\":\n        return localize.ordinalNumber(month + 1, { unit: \"month\" });\n      // Jan, Feb, ..., Dec\n      case \"MMM\":\n        return localize.month(month, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // J, F, ..., D\n      case \"MMMMM\":\n        return localize.month(month, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // January, February, ..., December\n      case \"MMMM\":\n      default:\n        return localize.month(month, { width: \"wide\", context: \"formatting\" });\n    }\n  },\n\n  // Stand-alone month\n  L: function (date, token, localize) {\n    const month = date.getMonth();\n    switch (token) {\n      // 1, 2, ..., 12\n      case \"L\":\n        return String(month + 1);\n      // 01, 02, ..., 12\n      case \"LL\":\n        return addLeadingZeros(month + 1, 2);\n      // 1st, 2nd, ..., 12th\n      case \"Lo\":\n        return localize.ordinalNumber(month + 1, { unit: \"month\" });\n      // Jan, Feb, ..., Dec\n      case \"LLL\":\n        return localize.month(month, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // J, F, ..., D\n      case \"LLLLL\":\n        return localize.month(month, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // January, February, ..., December\n      case \"LLLL\":\n      default:\n        return localize.month(month, { width: \"wide\", context: \"standalone\" });\n    }\n  },\n\n  // Local week of year\n  w: function (date, token, localize, options) {\n    const week = getWeek(date, options);\n\n    if (token === \"wo\") {\n      return localize.ordinalNumber(week, { unit: \"week\" });\n    }\n\n    return addLeadingZeros(week, token.length);\n  },\n\n  // ISO week of year\n  I: function (date, token, localize) {\n    const isoWeek = getISOWeek(date);\n\n    if (token === \"Io\") {\n      return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n    }\n\n    return addLeadingZeros(isoWeek, token.length);\n  },\n\n  // Day of the month\n  d: function (date, token, localize) {\n    if (token === \"do\") {\n      return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n    }\n\n    return lightFormatters.d(date, token);\n  },\n\n  // Day of year\n  D: function (date, token, localize) {\n    const dayOfYear = getDayOfYear(date);\n\n    if (token === \"Do\") {\n      return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n    }\n\n    return addLeadingZeros(dayOfYear, token.length);\n  },\n\n  // Day of week\n  E: function (date, token, localize) {\n    const dayOfWeek = date.getDay();\n    switch (token) {\n      // Tue\n      case \"E\":\n      case \"EE\":\n      case \"EEE\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"EEEEE\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"EEEEEE\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"EEEE\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Local day of week\n  e: function (date, token, localize, options) {\n    const dayOfWeek = date.getDay();\n    const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (Nth day of week with current locale or weekStartsOn)\n      case \"e\":\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case \"ee\":\n        return addLeadingZeros(localDayOfWeek, 2);\n      // 1st, 2nd, ..., 7th\n      case \"eo\":\n        return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n      case \"eee\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"eeeee\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"eeeeee\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"eeee\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Stand-alone local day of week\n  c: function (date, token, localize, options) {\n    const dayOfWeek = date.getDay();\n    const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n    switch (token) {\n      // Numerical value (same as in `e`)\n      case \"c\":\n        return String(localDayOfWeek);\n      // Padded numerical value\n      case \"cc\":\n        return addLeadingZeros(localDayOfWeek, token.length);\n      // 1st, 2nd, ..., 7th\n      case \"co\":\n        return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n      case \"ccc\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"standalone\",\n        });\n      // T\n      case \"ccccc\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"standalone\",\n        });\n      // Tu\n      case \"cccccc\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"standalone\",\n        });\n      // Tuesday\n      case \"cccc\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"standalone\",\n        });\n    }\n  },\n\n  // ISO day of week\n  i: function (date, token, localize) {\n    const dayOfWeek = date.getDay();\n    const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n    switch (token) {\n      // 2\n      case \"i\":\n        return String(isoDayOfWeek);\n      // 02\n      case \"ii\":\n        return addLeadingZeros(isoDayOfWeek, token.length);\n      // 2nd\n      case \"io\":\n        return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n      // Tue\n      case \"iii\":\n        return localize.day(dayOfWeek, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      // T\n      case \"iiiii\":\n        return localize.day(dayOfWeek, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      // Tu\n      case \"iiiiii\":\n        return localize.day(dayOfWeek, {\n          width: \"short\",\n          context: \"formatting\",\n        });\n      // Tuesday\n      case \"iiii\":\n      default:\n        return localize.day(dayOfWeek, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // AM or PM\n  a: function (date, token, localize) {\n    const hours = date.getHours();\n    const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n    switch (token) {\n      case \"a\":\n      case \"aa\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"aaa\":\n        return localize\n          .dayPeriod(dayPeriodEnumValue, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          })\n          .toLowerCase();\n      case \"aaaaa\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"aaaa\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // AM, PM, midnight, noon\n  b: function (date, token, localize) {\n    const hours = date.getHours();\n    let dayPeriodEnumValue;\n    if (hours === 12) {\n      dayPeriodEnumValue = dayPeriodEnum.noon;\n    } else if (hours === 0) {\n      dayPeriodEnumValue = dayPeriodEnum.midnight;\n    } else {\n      dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n    }\n\n    switch (token) {\n      case \"b\":\n      case \"bb\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"bbb\":\n        return localize\n          .dayPeriod(dayPeriodEnumValue, {\n            width: \"abbreviated\",\n            context: \"formatting\",\n          })\n          .toLowerCase();\n      case \"bbbbb\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"bbbb\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // in the morning, in the afternoon, in the evening, at night\n  B: function (date, token, localize) {\n    const hours = date.getHours();\n    let dayPeriodEnumValue;\n    if (hours >= 17) {\n      dayPeriodEnumValue = dayPeriodEnum.evening;\n    } else if (hours >= 12) {\n      dayPeriodEnumValue = dayPeriodEnum.afternoon;\n    } else if (hours >= 4) {\n      dayPeriodEnumValue = dayPeriodEnum.morning;\n    } else {\n      dayPeriodEnumValue = dayPeriodEnum.night;\n    }\n\n    switch (token) {\n      case \"B\":\n      case \"BB\":\n      case \"BBB\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"abbreviated\",\n          context: \"formatting\",\n        });\n      case \"BBBBB\":\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"narrow\",\n          context: \"formatting\",\n        });\n      case \"BBBB\":\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: \"wide\",\n          context: \"formatting\",\n        });\n    }\n  },\n\n  // Hour [1-12]\n  h: function (date, token, localize) {\n    if (token === \"ho\") {\n      let hours = date.getHours() % 12;\n      if (hours === 0) hours = 12;\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return lightFormatters.h(date, token);\n  },\n\n  // Hour [0-23]\n  H: function (date, token, localize) {\n    if (token === \"Ho\") {\n      return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n    }\n\n    return lightFormatters.H(date, token);\n  },\n\n  // Hour [0-11]\n  K: function (date, token, localize) {\n    const hours = date.getHours() % 12;\n\n    if (token === \"Ko\") {\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n\n  // Hour [1-24]\n  k: function (date, token, localize) {\n    let hours = date.getHours();\n    if (hours === 0) hours = 24;\n\n    if (token === \"ko\") {\n      return localize.ordinalNumber(hours, { unit: \"hour\" });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n\n  // Minute\n  m: function (date, token, localize) {\n    if (token === \"mo\") {\n      return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n    }\n\n    return lightFormatters.m(date, token);\n  },\n\n  // Second\n  s: function (date, token, localize) {\n    if (token === \"so\") {\n      return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n    }\n\n    return lightFormatters.s(date, token);\n  },\n\n  // Fraction of second\n  S: function (date, token) {\n    return lightFormatters.S(date, token);\n  },\n\n  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n  X: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    if (timezoneOffset === 0) {\n      return \"Z\";\n    }\n\n    switch (token) {\n      // Hours and optional minutes\n      case \"X\":\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XX`\n      case \"XXXX\":\n      case \"XX\": // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XXX`\n      case \"XXXXX\":\n      case \"XXX\": // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n  x: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Hours and optional minutes\n      case \"x\":\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xx`\n      case \"xxxx\":\n      case \"xx\": // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xxx`\n      case \"xxxxx\":\n      case \"xxx\": // Hours and minutes with `:` delimiter\n      default:\n        return formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (GMT)\n  O: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case \"O\":\n      case \"OO\":\n      case \"OOO\":\n        return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n      // Long\n      case \"OOOO\":\n      default:\n        return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Timezone (specific non-location)\n  z: function (date, token, _localize) {\n    const timezoneOffset = date.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case \"z\":\n      case \"zz\":\n      case \"zzz\":\n        return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n      // Long\n      case \"zzzz\":\n      default:\n        return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n    }\n  },\n\n  // Seconds timestamp\n  t: function (date, token, _localize) {\n    const timestamp = Math.trunc(+date / 1000);\n    return addLeadingZeros(timestamp, token.length);\n  },\n\n  // Milliseconds timestamp\n  T: function (date, token, _localize) {\n    return addLeadingZeros(+date, token.length);\n  },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n  const sign = offset > 0 ? \"-\" : \"+\";\n  const absOffset = Math.abs(offset);\n  const hours = Math.trunc(absOffset / 60);\n  const minutes = absOffset % 60;\n  if (minutes === 0) {\n    return sign + String(hours);\n  }\n  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n  if (offset % 60 === 0) {\n    const sign = offset > 0 ? \"-\" : \"+\";\n    return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n  }\n  return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n  const sign = offset > 0 ? \"-\" : \"+\";\n  const absOffset = Math.abs(offset);\n  const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n  const minutes = addLeadingZeros(absOffset % 60, 2);\n  return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n  switch (pattern) {\n    case \"P\":\n      return formatLong.date({ width: \"short\" });\n    case \"PP\":\n      return formatLong.date({ width: \"medium\" });\n    case \"PPP\":\n      return formatLong.date({ width: \"long\" });\n    case \"PPPP\":\n    default:\n      return formatLong.date({ width: \"full\" });\n  }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n  switch (pattern) {\n    case \"p\":\n      return formatLong.time({ width: \"short\" });\n    case \"pp\":\n      return formatLong.time({ width: \"medium\" });\n    case \"ppp\":\n      return formatLong.time({ width: \"long\" });\n    case \"pppp\":\n    default:\n      return formatLong.time({ width: \"full\" });\n  }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n  const matchResult = pattern.match(/(P+)(p+)?/) || [];\n  const datePattern = matchResult[1];\n  const timePattern = matchResult[2];\n\n  if (!timePattern) {\n    return dateLongFormatter(pattern, formatLong);\n  }\n\n  let dateTimeFormat;\n\n  switch (datePattern) {\n    case \"P\":\n      dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n      break;\n    case \"PP\":\n      dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n      break;\n    case \"PPP\":\n      dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n      break;\n    case \"PPPP\":\n    default:\n      dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n      break;\n  }\n\n  return dateTimeFormat\n    .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n    .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n  p: timeLongFormatter,\n  P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n  return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n  return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n  const _message = message(token, format, input);\n  console.warn(_message);\n  if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n  const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n  return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n  isProtectedDayOfYearToken,\n  isProtectedWeekYearToken,\n  warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n//   (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n//   except a single quote symbol, which ends the sequence.\n//   Two quote characters do not end the sequence.\n//   If there is no matching single quote\n//   then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n  /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit                            | Pattern | Result examples                   | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era                             | G..GGG  | AD, BC                            |       |\n * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 | GGGGG   | A, B                              |       |\n * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |\n * |                                 | yy      | 44, 01, 00, 17                    | 5     |\n * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |\n * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |\n * |                                 | yyyyy   | ...                               | 3,5   |\n * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |\n * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |\n * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |\n * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |\n * |                                 | YYYYY   | ...                               | 3,5   |\n * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |\n * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |\n * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |\n * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |\n * |                                 | RRRRR   | ...                               | 3,5,7 |\n * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |\n * |                                 | uu      | -43, 01, 1900, 2017               | 5     |\n * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |\n * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |\n * |                                 | uuuuu   | ...                               | 3,5   |\n * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |\n * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | QQ      | 01, 02, 03, 04                    |       |\n * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |\n * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | qq      | 01, 02, 03, 04                    |       |\n * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |\n * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |\n * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | MM      | 01, 02, ..., 12                   |       |\n * |                                 | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 | MMMM    | January, February, ..., December  | 2     |\n * |                                 | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |\n * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | LL      | 01, 02, ..., 12                   |       |\n * |                                 | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 | LLLL    | January, February, ..., December  | 2     |\n * |                                 | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | w       | 1, 2, ..., 53                     |       |\n * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |\n * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | II      | 01, 02, ..., 53                   | 7     |\n * | Day of month                    | d       | 1, 2, ..., 31                     |       |\n * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |\n * |                                 | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |\n * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |\n * |                                 | DD      | 01, 02, ..., 365, 366             | 9     |\n * |                                 | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 | DDDD    | ...                               | 3     |\n * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |\n * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |\n * |                                 | ii      | 01, 02, ..., 07                   | 7     |\n * |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |\n * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |\n * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |\n * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |\n * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | ee      | 02, 03, ..., 01                   |       |\n * |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | cc      | 02, 03, ..., 01                   |       |\n * |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | AM, PM                          | a..aa   | AM, PM                            |       |\n * |                                 | aaa     | am, pm                            |       |\n * |                                 | aaaa    | a.m., p.m.                        | 2     |\n * |                                 | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |\n * |                                 | bbb     | am, pm, noon, midnight            |       |\n * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |\n * |                                 | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |\n * |                                 | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |\n * |                                 | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |\n * |                                 | KK      | 01, 02, ..., 11, 00               |       |\n * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |\n * |                                 | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          | m       | 0, 1, ..., 59                     |       |\n * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | mm      | 00, 01, ..., 59                   |       |\n * | Second                          | s       | 0, 1, ..., 59                     |       |\n * |                                 | so      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | ss      | 00, 01, ..., 59                   |       |\n * | Fraction of second              | S       | 0, 1, ..., 9                      |       |\n * |                                 | SS      | 00, 01, ..., 99                   |       |\n * |                                 | SSS     | 000, 001, ..., 999                |       |\n * |                                 | SSSS    | ...                               | 3     |\n * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |\n * |                                 | XX      | -0800, +0530, Z                   |       |\n * |                                 | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |\n * |                                 | xx      | -0800, +0530, +0000               |       |\n * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |\n * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |\n * | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |\n * |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |\n * | Seconds timestamp               | t       | 512969520                         | 7     |\n * |                                 | tt      | ...                               | 3,7   |\n * | Milliseconds timestamp          | T       | 512969520900                      | 7     |\n * |                                 | TT      | ...                               | 3,7   |\n * | Long localized date             | P       | 04/29/1453                        | 7     |\n * |                                 | PP      | Apr 29, 1453                      | 7     |\n * |                                 | PPP     | April 29th, 1453                  | 7     |\n * |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |\n * | Long localized time             | p       | 12:00 AM                          | 7     |\n * |                                 | pp      | 12:00:00 AM                       | 7     |\n * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |\n * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |\n * | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |\n * |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |\n * |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |\n * |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n *    the output will be the same as default pattern for this unit, usually\n *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n *    are marked with \"2\" in the last column of the table.\n *\n *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n *    The output will be padded with zeros to match the length of the pattern.\n *\n *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` always returns the last two digits of a year,\n *    while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n *    | Year | `yy` | `uu` |\n *    |------|------|------|\n *    | 1    |   01 |   01 |\n *    | 14   |   14 |   14 |\n *    | 376  |   76 |  376 |\n *    | 1453 |   53 | 1453 |\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n *    and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n *    so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `t`: seconds timestamp\n *    - `T`: milliseconds timestamp\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n *   locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n  const defaultOptions = getDefaultOptions();\n  const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n  const firstWeekContainsDate =\n    options?.firstWeekContainsDate ??\n    options?.locale?.options?.firstWeekContainsDate ??\n    defaultOptions.firstWeekContainsDate ??\n    defaultOptions.locale?.options?.firstWeekContainsDate ??\n    1;\n\n  const weekStartsOn =\n    options?.weekStartsOn ??\n    options?.locale?.options?.weekStartsOn ??\n    defaultOptions.weekStartsOn ??\n    defaultOptions.locale?.options?.weekStartsOn ??\n    0;\n\n  const originalDate = toDate(date, options?.in);\n\n  if (!isValid(originalDate)) {\n    throw new RangeError(\"Invalid time value\");\n  }\n\n  let parts = formatStr\n    .match(longFormattingTokensRegExp)\n    .map((substring) => {\n      const firstCharacter = substring[0];\n      if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n        const longFormatter = longFormatters[firstCharacter];\n        return longFormatter(substring, locale.formatLong);\n      }\n      return substring;\n    })\n    .join(\"\")\n    .match(formattingTokensRegExp)\n    .map((substring) => {\n      // Replace two single quote characters with one single quote character\n      if (substring === \"''\") {\n        return { isToken: false, value: \"'\" };\n      }\n\n      const firstCharacter = substring[0];\n      if (firstCharacter === \"'\") {\n        return { isToken: false, value: cleanEscapedString(substring) };\n      }\n\n      if (formatters[firstCharacter]) {\n        return { isToken: true, value: substring };\n      }\n\n      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n        throw new RangeError(\n          \"Format string contains an unescaped latin alphabet character `\" +\n            firstCharacter +\n            \"`\",\n        );\n      }\n\n      return { isToken: false, value: substring };\n    });\n\n  // invoke localize preprocessor (only for french locales at the moment)\n  if (locale.localize.preprocessor) {\n    parts = locale.localize.preprocessor(originalDate, parts);\n  }\n\n  const formatterOptions = {\n    firstWeekContainsDate,\n    weekStartsOn,\n    locale,\n  };\n\n  return parts\n    .map((part) => {\n      if (!part.isToken) return part.value;\n\n      const token = part.value;\n\n      if (\n        (!options?.useAdditionalWeekYearTokens &&\n          isProtectedWeekYearToken(token)) ||\n        (!options?.useAdditionalDayOfYearTokens &&\n          isProtectedDayOfYearToken(token))\n      ) {\n        warnOrThrowProtectedError(token, formatStr, String(date));\n      }\n\n      const formatter = formatters[token[0]];\n      return formatter(originalDate, token, locale.localize, formatterOptions);\n    })\n    .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n  const matched = input.match(escapedStringRegExp);\n\n  if (!matched) {\n    return input;\n  }\n\n  return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n  const monthIndex = _date.getMonth();\n  const lastDayOfMonth = constructFrom(_date, 0);\n  lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n  lastDayOfMonth.setHours(0, 0, 0, 0);\n  return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getMonth} function options.\n */\n\n/**\n * @name getMonth\n * @category Month Helpers\n * @summary Get the month of the given date.\n *\n * @description\n * Get the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The month index (0-11)\n *\n * @example\n * // Which month is 29 February 2012?\n * const result = getMonth(new Date(2012, 1, 29))\n * //=> 1\n */\nexport function getMonth(date, options) {\n  return toDate(date, options?.in).getMonth();\n}\n\n// Fallback for modularized imports:\nexport default getMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getYear} function options.\n */\n\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The year\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport function getYear(date, options) {\n  return toDate(date, options?.in).getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default getYear;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n  return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n  return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n  return (\n    laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n    laterDate_.getMonth() === earlierDate_.getMonth()\n  );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameYear} function options.\n */\n\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport function isSameYear(laterDate, earlierDate, options) {\n  const [laterDate_, earlierDate_] = normalizeDates(\n    options?.in,\n    laterDate,\n    earlierDate,\n  );\n  return laterDate_.getFullYear() === earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default isSameYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n  const _date = toDate(date, options?.in);\n  const year = _date.getFullYear();\n  const day = _date.getDate();\n\n  const midMonth = constructFrom(options?.in || date, 0);\n  midMonth.setFullYear(year, month, 15);\n  midMonth.setHours(0, 0, 0, 0);\n  const daysInMonth = getDaysInMonth(midMonth);\n\n  // Set the earlier date, allows to wrap Jan 31 to Feb 28\n  _date.setMonth(month, Math.min(day, daysInMonth));\n  return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setYear} function options.\n */\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year, options) {\n  const date_ = toDate(date, options?.in);\n\n  // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n  if (isNaN(+date_)) return constructFrom(options?.in || date, NaN);\n\n  date_.setFullYear(year);\n  return date_;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n","const FIVE_WEEKS = 5;\nconst FOUR_WEEKS = 4;\n/**\n * Returns the number of weeks to display in the broadcast calendar for a given\n * month.\n *\n * The broadcast calendar may have either 4 or 5 weeks in a month, depending on\n * the start and end dates of the broadcast weeks.\n *\n * @since 9.4.0\n * @param month The month for which to calculate the number of weeks.\n * @param dateLib The date library to use for date manipulation.\n * @returns The number of weeks in the broadcast calendar (4 or 5).\n */\nexport function getBroadcastWeeksInMonth(month, dateLib) {\n    // Get the first day of the month\n    const firstDayOfMonth = dateLib.startOfMonth(month);\n    // Get the day of the week for the first day of the month (1-7, where 1 is Monday)\n    const firstDayOfWeek = firstDayOfMonth.getDay() > 0 ? firstDayOfMonth.getDay() : 7;\n    const broadcastStartDate = dateLib.addDays(month, -firstDayOfWeek + 1);\n    const lastDateOfLastWeek = dateLib.addDays(broadcastStartDate, FIVE_WEEKS * 7 - 1);\n    const numberOfWeeks = dateLib.getMonth(month) === dateLib.getMonth(lastDateOfLastWeek)\n        ? FIVE_WEEKS\n        : FOUR_WEEKS;\n    return numberOfWeeks;\n}\n","/**\n * Returns the start date of the week in the broadcast calendar.\n *\n * The broadcast week starts on Monday. If the first day of the month is not a\n * Monday, this function calculates the previous Monday as the start of the\n * broadcast week.\n *\n * @since 9.4.0\n * @param date The date for which to calculate the start of the broadcast week.\n * @param dateLib The date library to use for date manipulation.\n * @returns The start date of the broadcast week.\n */\nexport function startOfBroadcastWeek(date, dateLib) {\n    const firstOfMonth = dateLib.startOfMonth(date);\n    const dayOfWeek = firstOfMonth.getDay();\n    if (dayOfWeek === 1) {\n        return firstOfMonth;\n    }\n    else if (dayOfWeek === 0) {\n        return dateLib.addDays(firstOfMonth, -1 * 6);\n    }\n    else {\n        return dateLib.addDays(firstOfMonth, -1 * (dayOfWeek - 1));\n    }\n}\n","import { getBroadcastWeeksInMonth } from \"./getBroadcastWeeksInMonth.js\";\nimport { startOfBroadcastWeek } from \"./startOfBroadcastWeek.js\";\n/**\n * Returns the end date of the week in the broadcast calendar.\n *\n * The broadcast week ends on the last day of the last broadcast week for the\n * given date.\n *\n * @since 9.4.0\n * @param date The date for which to calculate the end of the broadcast week.\n * @param dateLib The date library to use for date manipulation.\n * @returns The end date of the broadcast week.\n */\nexport function endOfBroadcastWeek(date, dateLib) {\n    const startDate = startOfBroadcastWeek(date, dateLib);\n    const numberOfWeeks = getBroadcastWeeksInMonth(date, dateLib);\n    const endDate = dateLib.addDays(startDate, numberOfWeeks * 7 - 1);\n    return endDate;\n}\n","import { format } from \"date-fns\";\nimport { enUS as dateFnsEnUS } from \"date-fns/locale\";\n/** English (United States) locale extended with DayPicker-specific translations. */\nexport const enUS = {\n    ...dateFnsEnUS,\n    labels: {\n        labelDayButton: (date, modifiers, options, dateLib) => {\n            let formatDate;\n            if (dateLib && typeof dateLib.format === \"function\") {\n                formatDate = dateLib.format.bind(dateLib);\n            }\n            else {\n                formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });\n            }\n            let label = formatDate(date, \"PPPP\");\n            if (modifiers.today)\n                label = `Today, ${label}`;\n            if (modifiers.selected)\n                label = `${label}, selected`;\n            return label;\n        },\n        labelMonthDropdown: \"Choose the Month\",\n        labelNext: \"Go to the Next Month\",\n        labelPrevious: \"Go to the Previous Month\",\n        labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,\n        labelYearDropdown: \"Choose the Year\",\n        labelGrid: (date, options, dateLib) => {\n            let formatDate;\n            if (dateLib && typeof dateLib.format === \"function\") {\n                formatDate = dateLib.format.bind(dateLib);\n            }\n            else {\n                formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });\n            }\n            return formatDate(date, \"LLLL yyyy\");\n        },\n        labelGridcell: (date, modifiers, options, dateLib) => {\n            let formatDate;\n            if (dateLib && typeof dateLib.format === \"function\") {\n                formatDate = dateLib.format.bind(dateLib);\n            }\n            else {\n                formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });\n            }\n            let label = formatDate(date, \"PPPP\");\n            if (modifiers?.today) {\n                label = `Today, ${label}`;\n            }\n            return label;\n        },\n        labelNav: \"Navigation bar\",\n        labelWeekNumberHeader: \"Week Number\",\n        labelWeekday: (date, options, dateLib) => {\n            let formatDate;\n            if (dateLib && typeof dateLib.format === \"function\") {\n                formatDate = dateLib.format.bind(dateLib);\n            }\n            else {\n                formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });\n            }\n            return formatDate(date, \"cccc\");\n        },\n    },\n};\n","import { TZDate } from \"@date-fns/tz\";\nimport { addDays, addMonths, addWeeks, addYears, differenceInCalendarDays, differenceInCalendarMonths, eachMonthOfInterval, eachYearOfInterval, endOfISOWeek, endOfMonth, endOfWeek, endOfYear, format, getISOWeek, getMonth, getWeek, getYear, isAfter, isBefore, isDate, isSameDay, isSameMonth, isSameYear, max, min, setMonth, setYear, startOfDay, startOfISOWeek, startOfMonth, startOfWeek, startOfYear, } from \"date-fns\";\nimport { endOfBroadcastWeek } from \"../helpers/endOfBroadcastWeek.js\";\nimport { startOfBroadcastWeek } from \"../helpers/startOfBroadcastWeek.js\";\nimport { enUS } from \"../locale/en-US.js\";\n/**\n * A wrapper class around [date-fns](http://date-fns.org) that provides utility\n * methods for date manipulation and formatting.\n *\n * @since 9.2.0\n * @example\n *   const dateLib = new DateLib({ locale: es });\n *   const newDate = dateLib.addDays(new Date(), 5);\n */\nexport class DateLib {\n    /**\n     * Creates an instance of `DateLib`.\n     *\n     * @param options Configuration options for the date library.\n     * @param overrides Custom overrides for the date library functions.\n     */\n    constructor(options, overrides) {\n        /**\n         * Creates a new `Date` object representing today's date.\n         *\n         * @since 9.5.0\n         * @returns A `Date` object for today's date.\n         */\n        this.today = () => {\n            if (this.overrides?.today) {\n                return this.overrides.today();\n            }\n            if (this.options.timeZone) {\n                return TZDate.tz(this.options.timeZone);\n            }\n            const DateCtor = this.options.Date ?? Date;\n            return new DateCtor();\n        };\n        /**\n         * Creates a new `Date` object with the specified year, month, and day.\n         *\n         * @since 9.5.0\n         * @param year The year.\n         * @param monthIndex The month (0-11).\n         * @param date The day of the month.\n         * @returns A new `Date` object.\n         */\n        this.newDate = (year, monthIndex, date) => {\n            if (this.overrides?.newDate) {\n                return this.overrides.newDate(year, monthIndex, date);\n            }\n            if (this.options.timeZone) {\n                return new TZDate(year, monthIndex, date, this.options.timeZone);\n            }\n            return new Date(year, monthIndex, date);\n        };\n        /**\n         * Adds the specified number of days to the given date.\n         *\n         * @param date The date to add days to.\n         * @param amount The number of days to add.\n         * @returns The new date with the days added.\n         */\n        this.addDays = (date, amount) => {\n            return this.overrides?.addDays\n                ? this.overrides.addDays(date, amount)\n                : addDays(date, amount);\n        };\n        /**\n         * Adds the specified number of months to the given date.\n         *\n         * @param date The date to add months to.\n         * @param amount The number of months to add.\n         * @returns The new date with the months added.\n         */\n        this.addMonths = (date, amount) => {\n            return this.overrides?.addMonths\n                ? this.overrides.addMonths(date, amount)\n                : addMonths(date, amount);\n        };\n        /**\n         * Adds the specified number of weeks to the given date.\n         *\n         * @param date The date to add weeks to.\n         * @param amount The number of weeks to add.\n         * @returns The new date with the weeks added.\n         */\n        this.addWeeks = (date, amount) => {\n            return this.overrides?.addWeeks\n                ? this.overrides.addWeeks(date, amount)\n                : addWeeks(date, amount);\n        };\n        /**\n         * Adds the specified number of years to the given date.\n         *\n         * @param date The date to add years to.\n         * @param amount The number of years to add.\n         * @returns The new date with the years added.\n         */\n        this.addYears = (date, amount) => {\n            return this.overrides?.addYears\n                ? this.overrides.addYears(date, amount)\n                : addYears(date, amount);\n        };\n        /**\n         * Returns the number of calendar days between the given dates.\n         *\n         * @param dateLeft The later date.\n         * @param dateRight The earlier date.\n         * @returns The number of calendar days between the dates.\n         */\n        this.differenceInCalendarDays = (dateLeft, dateRight) => {\n            return this.overrides?.differenceInCalendarDays\n                ? this.overrides.differenceInCalendarDays(dateLeft, dateRight)\n                : differenceInCalendarDays(dateLeft, dateRight);\n        };\n        /**\n         * Returns the number of calendar months between the given dates.\n         *\n         * @param dateLeft The later date.\n         * @param dateRight The earlier date.\n         * @returns The number of calendar months between the dates.\n         */\n        this.differenceInCalendarMonths = (dateLeft, dateRight) => {\n            return this.overrides?.differenceInCalendarMonths\n                ? this.overrides.differenceInCalendarMonths(dateLeft, dateRight)\n                : differenceInCalendarMonths(dateLeft, dateRight);\n        };\n        /**\n         * Returns the months between the given dates.\n         *\n         * @param interval The interval to get the months for.\n         */\n        this.eachMonthOfInterval = (interval) => {\n            return this.overrides?.eachMonthOfInterval\n                ? this.overrides.eachMonthOfInterval(interval)\n                : eachMonthOfInterval(interval);\n        };\n        /**\n         * Returns the years between the given dates.\n         *\n         * @since 9.11.1\n         * @param interval The interval to get the years for.\n         * @returns The array of years in the interval.\n         */\n        this.eachYearOfInterval = (interval) => {\n            const years = this.overrides?.eachYearOfInterval\n                ? this.overrides.eachYearOfInterval(interval)\n                : eachYearOfInterval(interval);\n            // Remove duplicates that may happen across DST transitions (e.g., \"America/Sao_Paulo\")\n            // See https://github.com/date-fns/tz/issues/72\n            const uniqueYears = new Set(years.map((d) => this.getYear(d)));\n            if (uniqueYears.size === years.length) {\n                // No duplicates, return as is\n                return years;\n            }\n            // Rebuild the array to ensure one date per year\n            const yearsArray = [];\n            uniqueYears.forEach((y) => {\n                yearsArray.push(new Date(y, 0, 1));\n            });\n            return yearsArray;\n        };\n        /**\n         * Returns the end of the broadcast week for the given date.\n         *\n         * @param date The original date.\n         * @returns The end of the broadcast week.\n         */\n        this.endOfBroadcastWeek = (date) => {\n            return this.overrides?.endOfBroadcastWeek\n                ? this.overrides.endOfBroadcastWeek(date)\n                : endOfBroadcastWeek(date, this);\n        };\n        /**\n         * Returns the end of the ISO week for the given date.\n         *\n         * @param date The original date.\n         * @returns The end of the ISO week.\n         */\n        this.endOfISOWeek = (date) => {\n            return this.overrides?.endOfISOWeek\n                ? this.overrides.endOfISOWeek(date)\n                : endOfISOWeek(date);\n        };\n        /**\n         * Returns the end of the month for the given date.\n         *\n         * @param date The original date.\n         * @returns The end of the month.\n         */\n        this.endOfMonth = (date) => {\n            return this.overrides?.endOfMonth\n                ? this.overrides.endOfMonth(date)\n                : endOfMonth(date);\n        };\n        /**\n         * Returns the end of the week for the given date.\n         *\n         * @param date The original date.\n         * @returns The end of the week.\n         */\n        this.endOfWeek = (date, options) => {\n            return this.overrides?.endOfWeek\n                ? this.overrides.endOfWeek(date, options)\n                : endOfWeek(date, this.options);\n        };\n        /**\n         * Returns the end of the year for the given date.\n         *\n         * @param date The original date.\n         * @returns The end of the year.\n         */\n        this.endOfYear = (date) => {\n            return this.overrides?.endOfYear\n                ? this.overrides.endOfYear(date)\n                : endOfYear(date);\n        };\n        /**\n         * Formats the given date using the specified format string.\n         *\n         * @param date The date to format.\n         * @param formatStr The format string.\n         * @returns The formatted date string.\n         */\n        this.format = (date, formatStr, _options) => {\n            const formatted = this.overrides?.format\n                ? this.overrides.format(date, formatStr, this.options)\n                : format(date, formatStr, this.options);\n            if (this.options.numerals && this.options.numerals !== \"latn\") {\n                return this.replaceDigits(formatted);\n            }\n            return formatted;\n        };\n        /**\n         * Returns the ISO week number for the given date.\n         *\n         * @param date The date to get the ISO week number for.\n         * @returns The ISO week number.\n         */\n        this.getISOWeek = (date) => {\n            return this.overrides?.getISOWeek\n                ? this.overrides.getISOWeek(date)\n                : getISOWeek(date);\n        };\n        /**\n         * Returns the month of the given date.\n         *\n         * @param date The date to get the month for.\n         * @returns The month.\n         */\n        this.getMonth = (date, _options) => {\n            return this.overrides?.getMonth\n                ? this.overrides.getMonth(date, this.options)\n                : getMonth(date, this.options);\n        };\n        /**\n         * Returns the year of the given date.\n         *\n         * @param date The date to get the year for.\n         * @returns The year.\n         */\n        this.getYear = (date, _options) => {\n            return this.overrides?.getYear\n                ? this.overrides.getYear(date, this.options)\n                : getYear(date, this.options);\n        };\n        /**\n         * Returns the local week number for the given date.\n         *\n         * @param date The date to get the week number for.\n         * @returns The week number.\n         */\n        this.getWeek = (date, _options) => {\n            return this.overrides?.getWeek\n                ? this.overrides.getWeek(date, this.options)\n                : getWeek(date, this.options);\n        };\n        /**\n         * Checks if the first date is after the second date.\n         *\n         * @param date The date to compare.\n         * @param dateToCompare The date to compare with.\n         * @returns True if the first date is after the second date.\n         */\n        this.isAfter = (date, dateToCompare) => {\n            return this.overrides?.isAfter\n                ? this.overrides.isAfter(date, dateToCompare)\n                : isAfter(date, dateToCompare);\n        };\n        /**\n         * Checks if the first date is before the second date.\n         *\n         * @param date The date to compare.\n         * @param dateToCompare The date to compare with.\n         * @returns True if the first date is before the second date.\n         */\n        this.isBefore = (date, dateToCompare) => {\n            return this.overrides?.isBefore\n                ? this.overrides.isBefore(date, dateToCompare)\n                : isBefore(date, dateToCompare);\n        };\n        /**\n         * Checks if the given value is a Date object.\n         *\n         * @param value The value to check.\n         * @returns True if the value is a Date object.\n         */\n        this.isDate = (value) => {\n            return this.overrides?.isDate\n                ? this.overrides.isDate(value)\n                : isDate(value);\n        };\n        /**\n         * Checks if the given dates are on the same day.\n         *\n         * @param dateLeft The first date to compare.\n         * @param dateRight The second date to compare.\n         * @returns True if the dates are on the same day.\n         */\n        this.isSameDay = (dateLeft, dateRight) => {\n            return this.overrides?.isSameDay\n                ? this.overrides.isSameDay(dateLeft, dateRight)\n                : isSameDay(dateLeft, dateRight);\n        };\n        /**\n         * Checks if the given dates are in the same month.\n         *\n         * @param dateLeft The first date to compare.\n         * @param dateRight The second date to compare.\n         * @returns True if the dates are in the same month.\n         */\n        this.isSameMonth = (dateLeft, dateRight) => {\n            return this.overrides?.isSameMonth\n                ? this.overrides.isSameMonth(dateLeft, dateRight)\n                : isSameMonth(dateLeft, dateRight);\n        };\n        /**\n         * Checks if the given dates are in the same year.\n         *\n         * @param dateLeft The first date to compare.\n         * @param dateRight The second date to compare.\n         * @returns True if the dates are in the same year.\n         */\n        this.isSameYear = (dateLeft, dateRight) => {\n            return this.overrides?.isSameYear\n                ? this.overrides.isSameYear(dateLeft, dateRight)\n                : isSameYear(dateLeft, dateRight);\n        };\n        /**\n         * Returns the latest date in the given array of dates.\n         *\n         * @param dates The array of dates to compare.\n         * @returns The latest date.\n         */\n        this.max = (dates) => {\n            return this.overrides?.max ? this.overrides.max(dates) : max(dates);\n        };\n        /**\n         * Returns the earliest date in the given array of dates.\n         *\n         * @param dates The array of dates to compare.\n         * @returns The earliest date.\n         */\n        this.min = (dates) => {\n            return this.overrides?.min ? this.overrides.min(dates) : min(dates);\n        };\n        /**\n         * Sets the month of the given date.\n         *\n         * @param date The date to set the month on.\n         * @param month The month to set (0-11).\n         * @returns The new date with the month set.\n         */\n        this.setMonth = (date, month) => {\n            return this.overrides?.setMonth\n                ? this.overrides.setMonth(date, month)\n                : setMonth(date, month);\n        };\n        /**\n         * Sets the year of the given date.\n         *\n         * @param date The date to set the year on.\n         * @param year The year to set.\n         * @returns The new date with the year set.\n         */\n        this.setYear = (date, year) => {\n            return this.overrides?.setYear\n                ? this.overrides.setYear(date, year)\n                : setYear(date, year);\n        };\n        /**\n         * Returns the start of the broadcast week for the given date.\n         *\n         * @param date The original date.\n         * @returns The start of the broadcast week.\n         */\n        this.startOfBroadcastWeek = (date, _dateLib) => {\n            return this.overrides?.startOfBroadcastWeek\n                ? this.overrides.startOfBroadcastWeek(date, this)\n                : startOfBroadcastWeek(date, this);\n        };\n        /**\n         * Returns the start of the day for the given date.\n         *\n         * @param date The original date.\n         * @returns The start of the day.\n         */\n        this.startOfDay = (date) => {\n            return this.overrides?.startOfDay\n                ? this.overrides.startOfDay(date)\n                : startOfDay(date);\n        };\n        /**\n         * Returns the start of the ISO week for the given date.\n         *\n         * @param date The original date.\n         * @returns The start of the ISO week.\n         */\n        this.startOfISOWeek = (date) => {\n            return this.overrides?.startOfISOWeek\n                ? this.overrides.startOfISOWeek(date)\n                : startOfISOWeek(date);\n        };\n        /**\n         * Returns the start of the month for the given date.\n         *\n         * @param date The original date.\n         * @returns The start of the month.\n         */\n        this.startOfMonth = (date) => {\n            return this.overrides?.startOfMonth\n                ? this.overrides.startOfMonth(date)\n                : startOfMonth(date);\n        };\n        /**\n         * Returns the start of the week for the given date.\n         *\n         * @param date The original date.\n         * @returns The start of the week.\n         */\n        this.startOfWeek = (date, _options) => {\n            return this.overrides?.startOfWeek\n                ? this.overrides.startOfWeek(date, this.options)\n                : startOfWeek(date, this.options);\n        };\n        /**\n         * Returns the start of the year for the given date.\n         *\n         * @param date The original date.\n         * @returns The start of the year.\n         */\n        this.startOfYear = (date) => {\n            return this.overrides?.startOfYear\n                ? this.overrides.startOfYear(date)\n                : startOfYear(date);\n        };\n        this.options = { locale: enUS, ...options };\n        this.overrides = overrides;\n    }\n    /**\n     * Generates a mapping of Arabic digits (0-9) to the target numbering system\n     * digits.\n     *\n     * @since 9.5.0\n     * @returns A record mapping Arabic digits to the target numerals.\n     */\n    getDigitMap() {\n        const { numerals = \"latn\" } = this.options;\n        // Use Intl.NumberFormat to create a formatter with the specified numbering system\n        const formatter = new Intl.NumberFormat(\"en-US\", {\n            numberingSystem: numerals,\n        });\n        // Map Arabic digits (0-9) to the target numerals\n        const digitMap = {};\n        for (let i = 0; i < 10; i++) {\n            digitMap[i.toString()] = formatter.format(i);\n        }\n        return digitMap;\n    }\n    /**\n     * Replaces Arabic digits in a string with the target numbering system digits.\n     *\n     * @since 9.5.0\n     * @param input The string containing Arabic digits.\n     * @returns The string with digits replaced.\n     */\n    replaceDigits(input) {\n        const digitMap = this.getDigitMap();\n        return input.replace(/\\d/g, (digit) => digitMap[digit] || digit);\n    }\n    /**\n     * Formats a number using the configured numbering system.\n     *\n     * @since 9.5.0\n     * @param value The number to format.\n     * @returns The formatted number as a string.\n     */\n    formatNumber(value) {\n        return this.replaceDigits(value.toString());\n    }\n    /**\n     * Returns the preferred ordering for month and year labels for the current\n     * locale.\n     */\n    getMonthYearOrder() {\n        const code = this.options.locale?.code;\n        if (!code) {\n            return \"month-first\";\n        }\n        return DateLib.yearFirstLocales.has(code) ? \"year-first\" : \"month-first\";\n    }\n    /**\n     * Formats the month/year pair respecting locale conventions.\n     *\n     * @since 9.11.0\n     */\n    formatMonthYear(date) {\n        const { locale, timeZone, numerals } = this.options;\n        const localeCode = locale?.code;\n        if (localeCode && DateLib.yearFirstLocales.has(localeCode)) {\n            try {\n                const intl = new Intl.DateTimeFormat(localeCode, {\n                    month: \"long\",\n                    year: \"numeric\",\n                    timeZone,\n                    numberingSystem: numerals,\n                });\n                const formatted = intl.format(date);\n                return formatted;\n            }\n            catch {\n                // Fallback to date-fns formatting below.\n            }\n        }\n        const pattern = this.getMonthYearOrder() === \"year-first\" ? \"y LLLL\" : \"LLLL y\";\n        return this.format(date, pattern);\n    }\n}\nDateLib.yearFirstLocales = new Set([\n    \"eu\",\n    \"hu\",\n    \"ja\",\n    \"ja-Hira\",\n    \"ja-JP\",\n    \"ko\",\n    \"ko-KR\",\n    \"lt\",\n    \"lt-LT\",\n    \"lv\",\n    \"lv-LV\",\n    \"mn\",\n    \"mn-MN\",\n    \"zh\",\n    \"zh-CN\",\n    \"zh-HK\",\n    \"zh-TW\",\n]);\n/** The default locale (English). */\nexport { enUS as defaultLocale } from \"../locale/en-US.js\";\n/**\n * The default date library with English locale.\n *\n * @since 9.2.0\n */\nexport const defaultDateLib = new DateLib();\n","import { defaultDateLib } from \"./DateLib.js\";\n/**\n * Represents a day displayed in the calendar.\n *\n * In DayPicker, a `CalendarDay` is a wrapper around a `Date` object that\n * provides additional information about the day, such as whether it belongs to\n * the displayed month.\n */\nexport class CalendarDay {\n    constructor(date, displayMonth, dateLib = defaultDateLib) {\n        this.date = date;\n        this.displayMonth = displayMonth;\n        this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));\n        this.dateLib = dateLib;\n        this.isoDate = dateLib.format(date, \"yyyy-MM-dd\");\n        this.displayMonthId = dateLib.format(displayMonth, \"yyyy-MM\");\n        this.dateMonthId = dateLib.format(date, \"yyyy-MM\");\n    }\n    /**\n     * Checks if this day is equal to another `CalendarDay`, considering both the\n     * date and the displayed month.\n     *\n     * @param day The `CalendarDay` to compare with.\n     * @returns `true` if the days are equal, otherwise `false`.\n     */\n    isEqualTo(day) {\n        return (this.dateLib.isSameDay(day.date, this.date) &&\n            this.dateLib.isSameMonth(day.displayMonth, this.displayMonth));\n    }\n}\n","/**\n * Represents a month in a calendar year.\n *\n * A `CalendarMonth` contains the weeks within the month and the date of the\n * month.\n */\nexport class CalendarMonth {\n    constructor(month, weeks) {\n        this.date = month;\n        this.weeks = weeks;\n    }\n}\n","/**\n * Represents a week in a calendar month.\n *\n * A `CalendarWeek` contains the days within the week and the week number.\n */\nexport class CalendarWeek {\n    constructor(weekNumber, days) {\n        this.days = days;\n        this.weekNumber = weekNumber;\n    }\n}\n","import React from \"react\";\n/**\n * Render the label in the month caption.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function CaptionLabel(props) {\n    return React.createElement(\"span\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the chevron icon used in the navigation buttons and dropdowns.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Chevron(props) {\n    const { size = 24, orientation = \"left\", className, style } = props;\n    return (React.createElement(\"svg\", { className: className, style: style, width: size, height: size, viewBox: \"0 0 24 24\" },\n        orientation === \"up\" && (React.createElement(\"polygon\", { points: \"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28\" })),\n        orientation === \"down\" && (React.createElement(\"polygon\", { points: \"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72\" })),\n        orientation === \"left\" && (React.createElement(\"polygon\", { points: \"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20\" })),\n        orientation === \"right\" && (React.createElement(\"polygon\", { points: \"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20\" }))));\n}\n","import React from \"react\";\n/**\n * Render a grid cell for a specific day in the calendar.\n *\n * Handles interaction and focus for the day. If you only need to change the\n * content of the day cell, consider swapping the `DayButton` component\n * instead.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Day(props) {\n    const { day, modifiers, ...tdProps } = props;\n    return React.createElement(\"td\", { ...tdProps });\n}\n","import React from \"react\";\n/**\n * Render a button for a specific day in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function DayButton(props) {\n    const { day, modifiers, ...buttonProps } = props;\n    const ref = React.useRef(null);\n    React.useEffect(() => {\n        if (modifiers.focused)\n            ref.current?.focus();\n    }, [modifiers.focused]);\n    return React.createElement(\"button\", { ref: ref, ...buttonProps });\n}\n","/**\n * Enum representing the UI elements composing DayPicker. These elements are\n * mapped to {@link CustomComponents}, {@link ClassNames}, and {@link Styles}.\n *\n * Some elements are extended by flags and modifiers.\n */\nexport var UI;\n(function (UI) {\n    /** The root component displaying the months and the navigation bar. */\n    UI[\"Root\"] = \"root\";\n    /** The Chevron SVG element used by navigation buttons and dropdowns. */\n    UI[\"Chevron\"] = \"chevron\";\n    /**\n     * The grid cell with the day's date. Extended by {@link DayFlag} and\n     * {@link SelectionState}.\n     */\n    UI[\"Day\"] = \"day\";\n    /** The button containing the formatted day's date, inside the grid cell. */\n    UI[\"DayButton\"] = \"day_button\";\n    /** The caption label of the month (when not showing the dropdown navigation). */\n    UI[\"CaptionLabel\"] = \"caption_label\";\n    /** The container of the dropdown navigation (when enabled). */\n    UI[\"Dropdowns\"] = \"dropdowns\";\n    /** The dropdown element to select for years and months. */\n    UI[\"Dropdown\"] = \"dropdown\";\n    /** The container element of the dropdown. */\n    UI[\"DropdownRoot\"] = \"dropdown_root\";\n    /** The root element of the footer. */\n    UI[\"Footer\"] = \"footer\";\n    /** The month grid. */\n    UI[\"MonthGrid\"] = \"month_grid\";\n    /** Contains the dropdown navigation or the caption label. */\n    UI[\"MonthCaption\"] = \"month_caption\";\n    /** The dropdown with the months. */\n    UI[\"MonthsDropdown\"] = \"months_dropdown\";\n    /** Wrapper of the month grid. */\n    UI[\"Month\"] = \"month\";\n    /** The container of the displayed months. */\n    UI[\"Months\"] = \"months\";\n    /** The navigation bar with the previous and next buttons. */\n    UI[\"Nav\"] = \"nav\";\n    /**\n     * The next month button in the navigation. *\n     *\n     * @since 9.1.0\n     */\n    UI[\"NextMonthButton\"] = \"button_next\";\n    /**\n     * The previous month button in the navigation.\n     *\n     * @since 9.1.0\n     */\n    UI[\"PreviousMonthButton\"] = \"button_previous\";\n    /** The row containing the week. */\n    UI[\"Week\"] = \"week\";\n    /** The group of row weeks in a month (`tbody`). */\n    UI[\"Weeks\"] = \"weeks\";\n    /** The column header with the weekday. */\n    UI[\"Weekday\"] = \"weekday\";\n    /** The row grouping the weekdays in the column headers. */\n    UI[\"Weekdays\"] = \"weekdays\";\n    /** The cell containing the week number. */\n    UI[\"WeekNumber\"] = \"week_number\";\n    /** The cell header of the week numbers column. */\n    UI[\"WeekNumberHeader\"] = \"week_number_header\";\n    /** The dropdown with the years. */\n    UI[\"YearsDropdown\"] = \"years_dropdown\";\n})(UI || (UI = {}));\n/** Enum representing flags for the {@link UI | UI.Day} element. */\nexport var DayFlag;\n(function (DayFlag) {\n    /** The day is disabled. */\n    DayFlag[\"disabled\"] = \"disabled\";\n    /** The day is hidden. */\n    DayFlag[\"hidden\"] = \"hidden\";\n    /** The day is outside the current month. */\n    DayFlag[\"outside\"] = \"outside\";\n    /** The day is focused. */\n    DayFlag[\"focused\"] = \"focused\";\n    /** The day is today. */\n    DayFlag[\"today\"] = \"today\";\n})(DayFlag || (DayFlag = {}));\n/**\n * Enum representing selection states that can be applied to the\n * {@link UI | UI.Day} element in selection mode.\n */\nexport var SelectionState;\n(function (SelectionState) {\n    /** The day is at the end of a selected range. */\n    SelectionState[\"range_end\"] = \"range_end\";\n    /** The day is at the middle of a selected range. */\n    SelectionState[\"range_middle\"] = \"range_middle\";\n    /** The day is at the start of a selected range. */\n    SelectionState[\"range_start\"] = \"range_start\";\n    /** The day is selected. */\n    SelectionState[\"selected\"] = \"selected\";\n})(SelectionState || (SelectionState = {}));\n/**\n * Enum representing different animation states for transitioning between\n * months.\n */\nexport var Animation;\n(function (Animation) {\n    /** The entering weeks when they appear before the exiting month. */\n    Animation[\"weeks_before_enter\"] = \"weeks_before_enter\";\n    /** The exiting weeks when they disappear before the entering month. */\n    Animation[\"weeks_before_exit\"] = \"weeks_before_exit\";\n    /** The entering weeks when they appear after the exiting month. */\n    Animation[\"weeks_after_enter\"] = \"weeks_after_enter\";\n    /** The exiting weeks when they disappear after the entering month. */\n    Animation[\"weeks_after_exit\"] = \"weeks_after_exit\";\n    /** The entering caption when it appears after the exiting month. */\n    Animation[\"caption_after_enter\"] = \"caption_after_enter\";\n    /** The exiting caption when it disappears after the entering month. */\n    Animation[\"caption_after_exit\"] = \"caption_after_exit\";\n    /** The entering caption when it appears before the exiting month. */\n    Animation[\"caption_before_enter\"] = \"caption_before_enter\";\n    /** The exiting caption when it disappears before the entering month. */\n    Animation[\"caption_before_exit\"] = \"caption_before_exit\";\n})(Animation || (Animation = {}));\n","import { createContext, useContext } from \"react\";\n/** @ignore */\nexport const dayPickerContext = createContext(undefined);\n/**\n * Provides access to the DayPicker context, which includes properties and\n * methods to interact with the DayPicker component. This hook must be used\n * within a custom component.\n *\n * @template T - Use this type to refine the returned context type with a\n *   specific selection mode.\n * @returns The context to work with DayPicker.\n * @throws {Error} If the hook is used outside of a DayPicker provider.\n * @group Hooks\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function useDayPicker() {\n    const context = useContext(dayPickerContext);\n    if (context === undefined) {\n        throw new Error(\"useDayPicker() must be used within a custom component.\");\n    }\n    return context;\n}\n","import React from \"react\";\nimport { UI } from \"../UI.js\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render a dropdown component for navigation in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Dropdown(props) {\n    const { options, className, ...selectProps } = props;\n    const { classNames, components, styles } = useDayPicker();\n    const cssClassSelect = [classNames[UI.Dropdown], className].join(\" \");\n    const selectedOption = options?.find(({ value }) => value === selectProps.value);\n    return (React.createElement(\"span\", { \"data-disabled\": selectProps.disabled, className: classNames[UI.DropdownRoot], style: styles?.[UI.DropdownRoot] },\n        React.createElement(components.Select, { className: cssClassSelect, ...selectProps }, options?.map(({ value, label, disabled }) => (React.createElement(components.Option, { key: value, value: value, disabled: disabled }, label)))),\n        React.createElement(\"span\", { className: classNames[UI.CaptionLabel], style: styles?.[UI.CaptionLabel], \"aria-hidden\": true },\n            selectedOption?.label,\n            React.createElement(components.Chevron, { orientation: \"down\", size: 18, className: classNames[UI.Chevron], style: styles?.[UI.Chevron] }))));\n}\n","import React from \"react\";\n/**\n * Render the navigation dropdowns for the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function DropdownNav(props) {\n    return React.createElement(\"div\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the footer of the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Footer(props) {\n    return React.createElement(\"div\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the grid with the weekday header row and the weeks for a specific\n * month.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Month(props) {\n    const { calendarMonth, displayIndex, ...divProps } = props;\n    return React.createElement(\"div\", { ...divProps }, props.children);\n}\n","import React from \"react\";\n/**\n * Render the caption for a month in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function MonthCaption(props) {\n    const { calendarMonth, displayIndex, ...divProps } = props;\n    return React.createElement(\"div\", { ...divProps });\n}\n","import React from \"react\";\n/**\n * Render the grid of days for a specific month.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function MonthGrid(props) {\n    return React.createElement(\"table\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render a container wrapping the month grids.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Months(props) {\n    return React.createElement(\"div\", { ...props });\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render a dropdown to navigate between months in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function MonthsDropdown(props) {\n    const { components } = useDayPicker();\n    return React.createElement(components.Dropdown, { ...props });\n}\n","import React, { useCallback, } from \"react\";\nimport { UI } from \"../UI.js\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render the navigation toolbar with buttons to navigate between months.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Nav(props) {\n    const { onPreviousClick, onNextClick, previousMonth, nextMonth, ...navProps } = props;\n    const { components, classNames, styles, labels: { labelPrevious, labelNext }, } = useDayPicker();\n    const handleNextClick = useCallback((e) => {\n        if (nextMonth) {\n            onNextClick?.(e);\n        }\n    }, [nextMonth, onNextClick]);\n    const handlePreviousClick = useCallback((e) => {\n        if (previousMonth) {\n            onPreviousClick?.(e);\n        }\n    }, [previousMonth, onPreviousClick]);\n    return (React.createElement(\"nav\", { ...navProps },\n        React.createElement(components.PreviousMonthButton, { type: \"button\", className: classNames[UI.PreviousMonthButton], style: styles?.[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, \"aria-disabled\": previousMonth ? undefined : true, \"aria-label\": labelPrevious(previousMonth), onClick: handlePreviousClick },\n            React.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], style: styles?.[UI.Chevron], orientation: \"left\" })),\n        React.createElement(components.NextMonthButton, { type: \"button\", className: classNames[UI.NextMonthButton], style: styles?.[UI.NextMonthButton], tabIndex: nextMonth ? undefined : -1, \"aria-disabled\": nextMonth ? undefined : true, \"aria-label\": labelNext(nextMonth), onClick: handleNextClick },\n            React.createElement(components.Chevron, { disabled: nextMonth ? undefined : true, orientation: \"right\", className: classNames[UI.Chevron], style: styles?.[UI.Chevron] }))));\n}\n","import React from \"react\";\n/**\n * Render the button to navigate to the next month in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function NextMonthButton(props) {\n    return React.createElement(\"button\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render an `option` element.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Option(props) {\n    return React.createElement(\"option\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the button to navigate to the previous month in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function PreviousMonthButton(props) {\n    return React.createElement(\"button\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the root element of the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Root(props) {\n    const { rootRef, ...rest } = props;\n    return React.createElement(\"div\", { ...rest, ref: rootRef });\n}\n","import React from \"react\";\n/**\n * Render a `select` element.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Select(props) {\n    return React.createElement(\"select\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render a table row representing a week in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Week(props) {\n    const { week, ...trProps } = props;\n    return React.createElement(\"tr\", { ...trProps });\n}\n","import React from \"react\";\n/**\n * Render a table header cell with the name of a weekday (e.g., \"Mo\", \"Tu\").\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Weekday(props) {\n    return React.createElement(\"th\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the table row containing the weekday names.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Weekdays(props) {\n    return (React.createElement(\"thead\", { \"aria-hidden\": true },\n        React.createElement(\"tr\", { ...props })));\n}\n","import React from \"react\";\n/**\n * Render a table cell displaying the number of the week.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function WeekNumber(props) {\n    const { week, ...thProps } = props;\n    return React.createElement(\"th\", { ...thProps });\n}\n","import React from \"react\";\n/**\n * Render the header cell for the week numbers column.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function WeekNumberHeader(props) {\n    return React.createElement(\"th\", { ...props });\n}\n","import React from \"react\";\n/**\n * Render the container for the weeks in the month grid.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function Weeks(props) {\n    return React.createElement(\"tbody\", { ...props });\n}\n","import React from \"react\";\nimport { useDayPicker } from \"../useDayPicker.js\";\n/**\n * Render a dropdown to navigate between years in the calendar.\n *\n * @group Components\n * @see https://daypicker.dev/guides/custom-components\n */\nexport function YearsDropdown(props) {\n    const { components } = useDayPicker();\n    return React.createElement(components.Dropdown, { ...props });\n}\n","export * from \"./CaptionLabel.js\";\nexport * from \"./Chevron.js\";\nexport * from \"./Day.js\";\nexport * from \"./DayButton.js\";\nexport * from \"./Dropdown.js\";\nexport * from \"./DropdownNav.js\";\nexport * from \"./Footer.js\";\nexport * from \"./Month.js\";\nexport * from \"./MonthCaption.js\";\nexport * from \"./MonthGrid.js\";\nexport * from \"./Months.js\";\nexport * from \"./MonthsDropdown.js\";\nexport * from \"./Nav.js\";\nexport * from \"./NextMonthButton.js\";\nexport * from \"./Option.js\";\nexport * from \"./PreviousMonthButton.js\";\nexport * from \"./Root.js\";\nexport * from \"./Select.js\";\nexport * from \"./Week.js\";\nexport * from \"./Weekday.js\";\nexport * from \"./Weekdays.js\";\nexport * from \"./WeekNumber.js\";\nexport * from \"./WeekNumberHeader.js\";\nexport * from \"./Weeks.js\";\nexport * from \"./YearsDropdown.js\";\n","import { defaultDateLib } from \"../classes/index.js\";\n/**\n * Checks if a given date is within a specified date range.\n *\n * @since 9.0.0\n * @param range - The date range to check against.\n * @param date - The date to check.\n * @param excludeEnds - If `true`, the range's start and end dates are excluded.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the date is within the range, otherwise `false`.\n * @group Utilities\n */\nexport function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {\n    let { from, to } = range;\n    const { differenceInCalendarDays, isSameDay } = dateLib;\n    if (from && to) {\n        const isRangeInverted = differenceInCalendarDays(to, from) < 0;\n        if (isRangeInverted) {\n            [from, to] = [to, from];\n        }\n        const isInRange = differenceInCalendarDays(date, from) >= (excludeEnds ? 1 : 0) &&\n            differenceInCalendarDays(to, date) >= (excludeEnds ? 1 : 0);\n        return isInRange;\n    }\n    if (!excludeEnds && to) {\n        return isSameDay(to, date);\n    }\n    if (!excludeEnds && from) {\n        return isSameDay(from, date);\n    }\n    return false;\n}\n","/**\n * Checks if the given value is of type {@link DateInterval}.\n *\n * @param matcher - The value to check.\n * @returns `true` if the value is a {@link DateInterval}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateInterval(matcher) {\n    return Boolean(matcher &&\n        typeof matcher === \"object\" &&\n        \"before\" in matcher &&\n        \"after\" in matcher);\n}\n/**\n * Checks if the given value is of type {@link DateRange}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DateRange}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateRange(value) {\n    return Boolean(value && typeof value === \"object\" && \"from\" in value);\n}\n/**\n * Checks if the given value is of type {@link DateAfter}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DateAfter}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateAfterType(value) {\n    return Boolean(value && typeof value === \"object\" && \"after\" in value);\n}\n/**\n * Checks if the given value is of type {@link DateBefore}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DateBefore}, otherwise `false`.\n * @group Utilities\n */\nexport function isDateBeforeType(value) {\n    return Boolean(value && typeof value === \"object\" && \"before\" in value);\n}\n/**\n * Checks if the given value is of type {@link DayOfWeek}.\n *\n * @param value - The value to check.\n * @returns `true` if the value is a {@link DayOfWeek}, otherwise `false`.\n * @group Utilities\n */\nexport function isDayOfWeekType(value) {\n    return Boolean(value && typeof value === \"object\" && \"dayOfWeek\" in value);\n}\n/**\n * Checks if the given value is an array of valid dates.\n *\n * @private\n * @param value - The value to check.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the value is an array of valid dates, otherwise `false`.\n */\nexport function isDatesArray(value, dateLib) {\n    return Array.isArray(value) && value.every(dateLib.isDate);\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType, } from \"./typeguards.js\";\n/**\n * Checks if a given date matches at least one of the specified {@link Matcher}.\n *\n * @param date - The date to check.\n * @param matchers - The matchers to check against.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the date matches any of the matchers, otherwise `false`.\n * @group Utilities\n */\nexport function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {\n    const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;\n    const { isSameDay, differenceInCalendarDays, isAfter } = dateLib;\n    return matchersArr.some((matcher) => {\n        if (typeof matcher === \"boolean\") {\n            return matcher;\n        }\n        if (dateLib.isDate(matcher)) {\n            return isSameDay(date, matcher);\n        }\n        if (isDatesArray(matcher, dateLib)) {\n            return matcher.some((matcherDate) => isSameDay(date, matcherDate));\n        }\n        if (isDateRange(matcher)) {\n            return rangeIncludesDate(matcher, date, false, dateLib);\n        }\n        if (isDayOfWeekType(matcher)) {\n            if (!Array.isArray(matcher.dayOfWeek)) {\n                return matcher.dayOfWeek === date.getDay();\n            }\n            return matcher.dayOfWeek.includes(date.getDay());\n        }\n        if (isDateInterval(matcher)) {\n            const diffBefore = differenceInCalendarDays(matcher.before, date);\n            const diffAfter = differenceInCalendarDays(matcher.after, date);\n            const isDayBefore = diffBefore > 0;\n            const isDayAfter = diffAfter < 0;\n            const isClosedInterval = isAfter(matcher.before, matcher.after);\n            if (isClosedInterval) {\n                return isDayAfter && isDayBefore;\n            }\n            else {\n                return isDayBefore || isDayAfter;\n            }\n        }\n        if (isDateAfterType(matcher)) {\n            return differenceInCalendarDays(date, matcher.after) > 0;\n        }\n        if (isDateBeforeType(matcher)) {\n            return differenceInCalendarDays(matcher.before, date) > 0;\n        }\n        if (typeof matcher === \"function\") {\n            return matcher(date);\n        }\n        return false;\n    });\n}\n","import { DayFlag } from \"../UI.js\";\nimport { dateMatchModifiers } from \"../utils/dateMatchModifiers.js\";\n/**\n * Creates a function to retrieve the modifiers for a given day.\n *\n * This function calculates both internal and custom modifiers for each day\n * based on the provided calendar days and DayPicker props.\n *\n * @private\n * @param days The array of `CalendarDay` objects to process.\n * @param props The DayPicker props, including modifiers and configuration\n *   options.\n * @param dateLib The date library to use for date manipulation.\n * @returns A function that retrieves the modifiers for a given `CalendarDay`.\n */\nexport function createGetModifiers(days, props, navStart, navEnd, dateLib) {\n    const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today(), } = props;\n    const { isSameDay, isSameMonth, startOfMonth, isBefore, endOfMonth, isAfter, } = dateLib;\n    const computedNavStart = navStart && startOfMonth(navStart);\n    const computedNavEnd = navEnd && endOfMonth(navEnd);\n    const internalModifiersMap = {\n        [DayFlag.focused]: [],\n        [DayFlag.outside]: [],\n        [DayFlag.disabled]: [],\n        [DayFlag.hidden]: [],\n        [DayFlag.today]: [],\n    };\n    const customModifiersMap = {};\n    for (const day of days) {\n        const { date, displayMonth } = day;\n        const isOutside = Boolean(displayMonth && !isSameMonth(date, displayMonth));\n        const isBeforeNavStart = Boolean(computedNavStart && isBefore(date, computedNavStart));\n        const isAfterNavEnd = Boolean(computedNavEnd && isAfter(date, computedNavEnd));\n        const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));\n        const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) ||\n            isBeforeNavStart ||\n            isAfterNavEnd ||\n            // Broadcast calendar will show outside days as default\n            (!broadcastCalendar && !showOutsideDays && isOutside) ||\n            (broadcastCalendar && showOutsideDays === false && isOutside);\n        const isToday = isSameDay(date, today);\n        if (isOutside)\n            internalModifiersMap.outside.push(day);\n        if (isDisabled)\n            internalModifiersMap.disabled.push(day);\n        if (isHidden)\n            internalModifiersMap.hidden.push(day);\n        if (isToday)\n            internalModifiersMap.today.push(day);\n        // Add custom modifiers\n        if (modifiers) {\n            Object.keys(modifiers).forEach((name) => {\n                const modifierValue = modifiers?.[name];\n                const isMatch = modifierValue\n                    ? dateMatchModifiers(date, modifierValue, dateLib)\n                    : false;\n                if (!isMatch)\n                    return;\n                if (customModifiersMap[name]) {\n                    customModifiersMap[name].push(day);\n                }\n                else {\n                    customModifiersMap[name] = [day];\n                }\n            });\n        }\n    }\n    return (day) => {\n        // Initialize all the modifiers to false\n        const dayFlags = {\n            [DayFlag.focused]: false,\n            [DayFlag.disabled]: false,\n            [DayFlag.hidden]: false,\n            [DayFlag.outside]: false,\n            [DayFlag.today]: false,\n        };\n        const customModifiers = {};\n        // Find the modifiers for the given day\n        for (const name in internalModifiersMap) {\n            const days = internalModifiersMap[name];\n            dayFlags[name] = days.some((d) => d === day);\n        }\n        for (const name in customModifiersMap) {\n            customModifiers[name] = customModifiersMap[name].some((d) => d === day);\n        }\n        return {\n            ...dayFlags,\n            // custom modifiers should override all the previous ones\n            ...customModifiers,\n        };\n    };\n}\n","import { DayFlag, SelectionState, UI } from \"../UI.js\";\n/**\n * Returns the class names for a day based on its modifiers.\n *\n * This function combines the base class name for the day with any class names\n * associated with active modifiers.\n *\n * @param modifiers The modifiers applied to the day.\n * @param classNames The base class names for the calendar elements.\n * @param modifiersClassNames The class names associated with specific\n *   modifiers.\n * @returns An array of class names for the day.\n */\nexport function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {\n    const modifierClassNames = Object.entries(modifiers)\n        .filter(([, active]) => active === true)\n        .reduce((previousValue, [key]) => {\n        if (modifiersClassNames[key]) {\n            previousValue.push(modifiersClassNames[key]);\n        }\n        else if (classNames[DayFlag[key]]) {\n            previousValue.push(classNames[DayFlag[key]]);\n        }\n        else if (classNames[SelectionState[key]]) {\n            previousValue.push(classNames[SelectionState[key]]);\n        }\n        return previousValue;\n    }, [classNames[UI.Day]]);\n    return modifierClassNames;\n}\n","import * as components from \"../components/custom-components.js\";\n/**\n * Merges custom components from the props with the default components.\n *\n * This function ensures that any custom components provided in the props\n * override the default components.\n *\n * @param customComponents The custom components provided in the DayPicker\n *   props.\n * @returns An object containing the merged components.\n */\nexport function getComponents(customComponents) {\n    return {\n        ...components,\n        ...customComponents,\n    };\n}\n","/**\n * Extracts `data-` attributes from the DayPicker props.\n *\n * This function collects all `data-` attributes from the props and adds\n * additional attributes based on the DayPicker configuration.\n *\n * @param props The DayPicker props.\n * @returns An object containing the `data-` attributes.\n */\nexport function getDataAttributes(props) {\n    const dataAttributes = {\n        \"data-mode\": props.mode ?? undefined,\n        \"data-required\": \"required\" in props ? props.required : undefined,\n        \"data-multiple-months\": (props.numberOfMonths && props.numberOfMonths > 1) || undefined,\n        \"data-week-numbers\": props.showWeekNumber || undefined,\n        \"data-broadcast-calendar\": props.broadcastCalendar || undefined,\n        \"data-nav-layout\": props.navLayout || undefined,\n    };\n    Object.entries(props).forEach(([key, val]) => {\n        if (key.startsWith(\"data-\")) {\n            dataAttributes[key] = val;\n        }\n    });\n    return dataAttributes;\n}\n","import { Animation, DayFlag, SelectionState, UI } from \"../UI.js\";\n/**\n * Returns the default class names for the UI elements.\n *\n * This function generates a mapping of default class names for various UI\n * elements, day flags, selection states, and animations.\n *\n * @returns An object containing the default class names.\n * @group Utilities\n */\nexport function getDefaultClassNames() {\n    const classNames = {};\n    for (const key in UI) {\n        classNames[UI[key]] =\n            `rdp-${UI[key]}`;\n    }\n    for (const key in DayFlag) {\n        classNames[DayFlag[key]] =\n            `rdp-${DayFlag[key]}`;\n    }\n    for (const key in SelectionState) {\n        classNames[SelectionState[key]] =\n            `rdp-${SelectionState[key]}`;\n    }\n    for (const key in Animation) {\n        classNames[Animation[key]] =\n            `rdp-${Animation[key]}`;\n    }\n    return classNames;\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the caption of the month.\n *\n * @defaultValue Locale-specific month/year order (e.g., \"November 2022\").\n * @param month The date representing the month.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n *   instance is created.\n * @returns The formatted caption as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatCaption(month, options, dateLib) {\n    const lib = dateLib ?? new DateLib(options);\n    return lib.formatMonthYear(month);\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the day date shown in the day cell.\n *\n * @defaultValue `d` (e.g., \"1\").\n * @param date The date to format.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n *   instance is created.\n * @returns The formatted day as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatDay(date, options, dateLib) {\n    return (dateLib ?? new DateLib(options)).format(date, \"d\");\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the month for the dropdown option label.\n *\n * @defaultValue The localized full month name.\n * @param month The date representing the month.\n * @param dateLib The date library to use for formatting. Defaults to\n *   `defaultDateLib`.\n * @returns The formatted month name as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatMonthDropdown(month, dateLib = defaultDateLib) {\n    return dateLib.format(month, \"LLLL\");\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the name of a weekday to be displayed in the weekdays header.\n *\n * @defaultValue `cccccc` (e.g., \"Mo\" for Monday).\n * @param weekday The date representing the weekday.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n *   instance is created.\n * @returns The formatted weekday name as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatWeekdayName(weekday, options, dateLib) {\n    return (dateLib ?? new DateLib(options)).format(weekday, \"cccccc\");\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the week number.\n *\n * @defaultValue The week number as a string, with a leading zero for single-digit numbers.\n * @param weekNumber The week number to format.\n * @param dateLib The date library to use for formatting. Defaults to\n *   `defaultDateLib`.\n * @returns The formatted week number as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {\n    if (weekNumber < 10) {\n        return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);\n    }\n    return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);\n}\n","/**\n * Formats the header for the week number column.\n *\n * @defaultValue An empty string `\"\"`.\n * @returns The formatted week number header as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatWeekNumberHeader() {\n    return ``;\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the year for the dropdown option label.\n *\n * @param year The year to format.\n * @param dateLib The date library to use for formatting. Defaults to\n *   `defaultDateLib`.\n * @returns The formatted year as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatYearDropdown(year, dateLib = defaultDateLib) {\n    return dateLib.format(year, \"yyyy\");\n}\n","export * from \"./formatCaption.js\";\nexport * from \"./formatDay.js\";\nexport * from \"./formatMonthDropdown.js\";\nexport * from \"./formatWeekdayName.js\";\nexport * from \"./formatWeekNumber.js\";\nexport * from \"./formatWeekNumberHeader.js\";\nexport * from \"./formatYearDropdown.js\";\n","import * as defaultFormatters from \"../formatters/index.js\";\n/**\n * Merges custom formatters from the props with the default formatters.\n *\n * @param customFormatters The custom formatters provided in the DayPicker\n *   props.\n * @returns The merged formatters object.\n */\nexport function getFormatters(customFormatters) {\n    return {\n        ...defaultFormatters,\n        ...customFormatters,\n    };\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for a day button.\n *\n * Use the `modifiers` argument to provide additional context for the label,\n * such as indicating if the day is \"today\" or \"selected.\"\n *\n * @defaultValue The formatted date.\n * @param date - The date to format.\n * @param modifiers - The modifiers providing context for the day.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the day button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelDayButton(date, modifiers, options, dateLib) {\n    let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n    if (modifiers.today)\n        label = `Today, ${label}`;\n    if (modifiers.selected)\n        label = `${label}, selected`;\n    return label;\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for the month grid, which is announced when entering\n * the grid.\n *\n * @defaultValue Locale-specific month/year order (e.g., \"November 2022\").\n * @param date - The date representing the month.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the month grid.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGrid(date, options, dateLib) {\n    const lib = dateLib ?? new DateLib(options);\n    return lib.formatMonthYear(date);\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the label for a day grid cell when the calendar is not interactive.\n *\n * @param date - The date to format.\n * @param modifiers - Optional modifiers providing context for the day.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The label for the day grid cell.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelGridcell(date, modifiers, options, dateLib) {\n    let label = (dateLib ?? new DateLib(options)).format(date, \"PPPP\");\n    if (modifiers?.today) {\n        label = `Today, ${label}`;\n    }\n    return label;\n}\n","/**\n * Generates the ARIA label for the months dropdown.\n *\n * @defaultValue `\"Choose the Month\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the months dropdown.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelMonthDropdown(_options) {\n    return \"Choose the Month\";\n}\n","/**\n * Generates the ARIA label for the navigation toolbar.\n *\n * @defaultValue `\"\"`\n * @returns The ARIA label for the navigation toolbar.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNav() {\n    return \"\";\n}\n","const defaultLabel = \"Go to the Next Month\";\n/**\n * Generates the ARIA label for the \"next month\" button.\n *\n * @defaultValue `\"Go to the Next Month\"`\n * @param month - The date representing the next month, or `undefined` if there\n *   is no next month.\n * @returns The ARIA label for the \"next month\" button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelNext(_month, _options) {\n    return defaultLabel;\n}\n","/**\n * Generates the ARIA label for the \"previous month\" button.\n *\n * @defaultValue `\"Go to the Previous Month\"`\n * @param month - The date representing the previous month, or `undefined` if\n *   there is no previous month.\n * @returns The ARIA label for the \"previous month\" button.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelPrevious(_month) {\n    return \"Go to the Previous Month\";\n}\n","import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Generates the ARIA label for a weekday column header.\n *\n * @defaultValue `\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\", \"Sunday\"`\n * @param date - The date representing the weekday.\n * @param options - Optional configuration for the date formatting library.\n * @param dateLib - An optional instance of the date formatting library.\n * @returns The ARIA label for the weekday column header.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekday(date, options, dateLib) {\n    return (dateLib ?? new DateLib(options)).format(date, \"cccc\");\n}\n","/**\n * Generates the ARIA label for the week number cell (the first cell in a row).\n *\n * @defaultValue `Week ${weekNumber}`\n * @param weekNumber - The number of the week.\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the week number cell.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumber(weekNumber, _options) {\n    return `Week ${weekNumber}`;\n}\n","/**\n * Generates the ARIA label for the week number header element.\n *\n * @defaultValue `\"Week Number\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the week number header.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelWeekNumberHeader(_options) {\n    return \"Week Number\";\n}\n","/**\n * Generates the ARIA label for the years dropdown.\n *\n * @defaultValue `\"Choose the Year\"`\n * @param options - Optional configuration for the date formatting library.\n * @returns The ARIA label for the years dropdown.\n * @group Labels\n * @see https://daypicker.dev/docs/translation#aria-labels\n */\nexport function labelYearDropdown(_options) {\n    return \"Choose the Year\";\n}\n","export * from \"./labelDayButton.js\";\nexport * from \"./labelGrid.js\";\nexport * from \"./labelGrid.js\";\nexport * from \"./labelGridcell.js\";\nexport * from \"./labelMonthDropdown.js\";\nexport * from \"./labelNav.js\";\nexport * from \"./labelNext.js\";\nexport * from \"./labelPrevious.js\";\nexport * from \"./labelWeekday.js\";\nexport * from \"./labelWeekNumber.js\";\nexport * from \"./labelWeekNumberHeader.js\";\nexport * from \"./labelYearDropdown.js\";\n","import * as defaultLabels from \"../labels/index.js\";\nconst resolveLabel = (defaultLabel, customLabel, localeLabel) => {\n    if (customLabel)\n        return customLabel;\n    if (localeLabel) {\n        return (typeof localeLabel === \"function\"\n            ? localeLabel\n            : (..._args) => localeLabel);\n    }\n    return defaultLabel;\n};\n/**\n * Merges custom labels from the props with the default labels.\n *\n * When available, uses the locale-provided translation for `labelNext`.\n *\n * @param customLabels The custom labels provided in the DayPicker props.\n * @param options Options from the date library, used to resolve locale\n *   translations.\n * @returns The merged labels object with locale-aware defaults.\n */\nexport function getLabels(customLabels, options) {\n    const localeLabels = options.locale?.labels ?? {};\n    return {\n        ...defaultLabels,\n        ...(customLabels ?? {}),\n        labelDayButton: resolveLabel(defaultLabels.labelDayButton, customLabels?.labelDayButton, localeLabels.labelDayButton),\n        labelMonthDropdown: resolveLabel(defaultLabels.labelMonthDropdown, customLabels?.labelMonthDropdown, localeLabels.labelMonthDropdown),\n        labelNext: resolveLabel(defaultLabels.labelNext, customLabels?.labelNext, localeLabels.labelNext),\n        labelPrevious: resolveLabel(defaultLabels.labelPrevious, customLabels?.labelPrevious, localeLabels.labelPrevious),\n        labelWeekNumber: resolveLabel(defaultLabels.labelWeekNumber, customLabels?.labelWeekNumber, localeLabels.labelWeekNumber),\n        labelYearDropdown: resolveLabel(defaultLabels.labelYearDropdown, customLabels?.labelYearDropdown, localeLabels.labelYearDropdown),\n        labelGrid: resolveLabel(defaultLabels.labelGrid, customLabels?.labelGrid, localeLabels.labelGrid),\n        labelGridcell: resolveLabel(defaultLabels.labelGridcell, customLabels?.labelGridcell, localeLabels.labelGridcell),\n        labelNav: resolveLabel(defaultLabels.labelNav, customLabels?.labelNav, localeLabels.labelNav),\n        labelWeekNumberHeader: resolveLabel(defaultLabels.labelWeekNumberHeader, customLabels?.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),\n        labelWeekday: resolveLabel(defaultLabels.labelWeekday, customLabels?.labelWeekday, localeLabels.labelWeekday),\n    };\n}\n","/**\n * Returns the months to show in the dropdown.\n *\n * This function generates a list of months for the current year, formatted\n * using the provided formatter, and determines whether each month should be\n * disabled based on the navigation range.\n *\n * @param displayMonth The currently displayed month.\n * @param navStart The start date for navigation.\n * @param navEnd The end date for navigation.\n * @param formatters The formatters to use for formatting the month labels.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dropdown options representing the months, or `undefined`\n *   if no months are available.\n */\nexport function getMonthOptions(displayMonth, navStart, navEnd, formatters, dateLib) {\n    const { startOfMonth, startOfYear, endOfYear, eachMonthOfInterval, getMonth, } = dateLib;\n    const months = eachMonthOfInterval({\n        start: startOfYear(displayMonth),\n        end: endOfYear(displayMonth),\n    });\n    const options = months.map((month) => {\n        const label = formatters.formatMonthDropdown(month, dateLib);\n        const value = getMonth(month);\n        const disabled = (navStart && month < startOfMonth(navStart)) ||\n            (navEnd && month > startOfMonth(navEnd)) ||\n            false;\n        return { value, label, disabled };\n    });\n    return options;\n}\n","import { UI } from \"../UI.js\";\n/**\n * Returns the computed style for a day based on its modifiers.\n *\n * This function merges the base styles for the day with any styles associated\n * with active modifiers.\n *\n * @param dayModifiers The modifiers applied to the day.\n * @param styles The base styles for the calendar elements.\n * @param modifiersStyles The styles associated with specific modifiers.\n * @returns The computed style for the day.\n */\nexport function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {\n    let style = { ...styles?.[UI.Day] };\n    Object.entries(dayModifiers)\n        .filter(([, active]) => active === true)\n        .forEach(([modifier]) => {\n        style = {\n            ...style,\n            ...modifiersStyles?.[modifier],\n        };\n    });\n    return style;\n}\n","/**\n * Generates a series of 7 days, starting from the beginning of the week, to use\n * for formatting weekday names (e.g., Monday, Tuesday, etc.).\n *\n * @param dateLib The date library to use for date manipulation.\n * @param ISOWeek Whether to use ISO week numbering (weeks start on Monday).\n * @param broadcastCalendar Whether to use the broadcast calendar (weeks start\n *   on Monday, but may include adjustments for broadcast-specific rules).\n * @returns An array of 7 dates representing the weekdays.\n */\nexport function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {\n    const referenceToday = today ?? dateLib.today();\n    const start = broadcastCalendar\n        ? dateLib.startOfBroadcastWeek(referenceToday, dateLib)\n        : ISOWeek\n            ? dateLib.startOfISOWeek(referenceToday)\n            : dateLib.startOfWeek(referenceToday);\n    const days = [];\n    for (let i = 0; i < 7; i++) {\n        const day = dateLib.addDays(start, i);\n        days.push(day);\n    }\n    return days;\n}\n","/**\n * Returns the years to display in the dropdown.\n *\n * This function generates a list of years between the navigation start and end\n * dates, formatted using the provided formatter.\n *\n * @param navStart The start date for navigation.\n * @param navEnd The end date for navigation.\n * @param formatters The formatters to use for formatting the year labels.\n * @param dateLib The date library to use for date manipulation.\n * @param reverse If true, reverses the order of the years (descending).\n * @returns An array of dropdown options representing the years, or `undefined`\n *   if `navStart` or `navEnd` is not provided.\n */\nexport function getYearOptions(navStart, navEnd, formatters, dateLib, reverse = false) {\n    if (!navStart)\n        return undefined;\n    if (!navEnd)\n        return undefined;\n    const { startOfYear, endOfYear, eachYearOfInterval, getYear } = dateLib;\n    const firstNavYear = startOfYear(navStart);\n    const lastNavYear = endOfYear(navEnd);\n    const years = eachYearOfInterval({ start: firstNavYear, end: lastNavYear });\n    if (reverse)\n        years.reverse();\n    return years.map((year) => {\n        const label = formatters.formatYearDropdown(year, dateLib);\n        return {\n            value: getYear(year),\n            label,\n            disabled: false,\n        };\n    });\n}\n","import { TZDate } from \"@date-fns/tz\";\nimport { differenceInCalendarDays as differenceInCalendarDaysFn, differenceInCalendarMonths as differenceInCalendarMonthsFn, getISOWeek as getISOWeekFn, getWeek as getWeekFn, } from \"date-fns\";\n/**\n * Creates `dateLib` overrides that keep all calendar math at noon in the target\n * time zone. This avoids second-level offset changes (e.g., historical zones\n * with +03:41:12) from pushing dates backward across midnight.\n */\nexport function createNoonOverrides(timeZone, options = {}) {\n    const { weekStartsOn, locale } = options;\n    const fallbackWeekStartsOn = (weekStartsOn ??\n        locale?.options?.weekStartsOn ??\n        0);\n    // Keep all internal math anchored at noon in the target zone to avoid\n    // historical second-level offsets from crossing midnight.\n    const toNoonTZDate = (date) => {\n        const normalizedDate = typeof date === \"number\" || typeof date === \"string\"\n            ? new Date(date)\n            : date;\n        return new TZDate(normalizedDate.getFullYear(), normalizedDate.getMonth(), normalizedDate.getDate(), 12, 0, 0, timeZone);\n    };\n    // Convert a value into a host `Date` that represents the same calendar day\n    // as the target-zone noon. This is useful for helpers (e.g., date-fns week\n    // utilities) that expect local `Date` instances rather than `TZDate`s.\n    const toCalendarDate = (date) => {\n        const zoned = toNoonTZDate(date);\n        return new Date(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 0, 0, 0, 0);\n    };\n    return {\n        today: () => {\n            return toNoonTZDate(TZDate.tz(timeZone));\n        },\n        newDate: (year, monthIndex, date) => {\n            return new TZDate(year, monthIndex, date, 12, 0, 0, timeZone);\n        },\n        startOfDay: (date) => {\n            return toNoonTZDate(date);\n        },\n        startOfWeek: (date, options) => {\n            const base = toNoonTZDate(date);\n            const weekStartsOnValue = (options?.weekStartsOn ??\n                fallbackWeekStartsOn);\n            const diff = (base.getDay() - weekStartsOnValue + 7) % 7;\n            base.setDate(base.getDate() - diff);\n            return base;\n        },\n        startOfISOWeek: (date) => {\n            const base = toNoonTZDate(date);\n            const diff = (base.getDay() - 1 + 7) % 7;\n            base.setDate(base.getDate() - diff);\n            return base;\n        },\n        startOfMonth: (date) => {\n            const base = toNoonTZDate(date);\n            base.setDate(1);\n            return base;\n        },\n        startOfYear: (date) => {\n            const base = toNoonTZDate(date);\n            base.setMonth(0, 1);\n            return base;\n        },\n        endOfWeek: (date, options) => {\n            const base = toNoonTZDate(date);\n            const weekStartsOnValue = (options?.weekStartsOn ??\n                fallbackWeekStartsOn);\n            const endDow = (weekStartsOnValue + 6) % 7;\n            const diff = (endDow - base.getDay() + 7) % 7;\n            base.setDate(base.getDate() + diff);\n            return base;\n        },\n        endOfISOWeek: (date) => {\n            const base = toNoonTZDate(date);\n            const diff = (7 - base.getDay()) % 7;\n            base.setDate(base.getDate() + diff);\n            return base;\n        },\n        endOfMonth: (date) => {\n            const base = toNoonTZDate(date);\n            base.setMonth(base.getMonth() + 1, 0);\n            return base;\n        },\n        endOfYear: (date) => {\n            const base = toNoonTZDate(date);\n            base.setMonth(11, 31);\n            return base;\n        },\n        eachMonthOfInterval: (interval) => {\n            const start = toNoonTZDate(interval.start);\n            const end = toNoonTZDate(interval.end);\n            const result = [];\n            const cursor = new TZDate(start.getFullYear(), start.getMonth(), 1, 12, 0, 0, timeZone);\n            const endKey = end.getFullYear() * 12 + end.getMonth();\n            while (cursor.getFullYear() * 12 + cursor.getMonth() <= endKey) {\n                result.push(new TZDate(cursor, timeZone));\n                cursor.setMonth(cursor.getMonth() + 1, 1);\n            }\n            return result;\n        },\n        // Normalize to noon once before arithmetic (avoid DST/midnight edge cases),\n        // mutate the same TZDate, and return it.\n        addDays: (date, amount) => {\n            const base = toNoonTZDate(date);\n            base.setDate(base.getDate() + amount);\n            return base;\n        },\n        addWeeks: (date, amount) => {\n            const base = toNoonTZDate(date);\n            base.setDate(base.getDate() + amount * 7);\n            return base;\n        },\n        addMonths: (date, amount) => {\n            const base = toNoonTZDate(date);\n            base.setMonth(base.getMonth() + amount);\n            return base;\n        },\n        addYears: (date, amount) => {\n            const base = toNoonTZDate(date);\n            base.setFullYear(base.getFullYear() + amount);\n            return base;\n        },\n        eachYearOfInterval: (interval) => {\n            const start = toNoonTZDate(interval.start);\n            const end = toNoonTZDate(interval.end);\n            const years = [];\n            const cursor = new TZDate(start.getFullYear(), 0, 1, 12, 0, 0, timeZone);\n            while (cursor.getFullYear() <= end.getFullYear()) {\n                years.push(new TZDate(cursor, timeZone));\n                cursor.setFullYear(cursor.getFullYear() + 1, 0, 1);\n            }\n            return years;\n        },\n        getWeek: (date, options) => {\n            const base = toCalendarDate(date);\n            return getWeekFn(base, {\n                weekStartsOn: options?.weekStartsOn ?? fallbackWeekStartsOn,\n                firstWeekContainsDate: options?.firstWeekContainsDate ??\n                    locale?.options?.firstWeekContainsDate ??\n                    1,\n            });\n        },\n        getISOWeek: (date) => {\n            const base = toCalendarDate(date);\n            return getISOWeekFn(base);\n        },\n        differenceInCalendarDays: (dateLeft, dateRight) => {\n            const left = toCalendarDate(dateLeft);\n            const right = toCalendarDate(dateRight);\n            return differenceInCalendarDaysFn(left, right);\n        },\n        differenceInCalendarMonths: (dateLeft, dateRight) => {\n            const left = toCalendarDate(dateLeft);\n            const right = toCalendarDate(dateRight);\n            return differenceInCalendarMonthsFn(left, right);\n        },\n    };\n}\n","import { useLayoutEffect, useRef } from \"react\";\nimport { Animation } from \"./UI.js\";\nconst asHtmlElement = (element) => {\n    if (element instanceof HTMLElement)\n        return element;\n    return null;\n};\nconst queryMonthEls = (element) => [\n    ...(element.querySelectorAll(\"[data-animated-month]\") ?? []),\n];\nconst queryMonthEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-month]\"));\nconst queryCaptionEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-caption]\"));\nconst queryWeeksEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weeks]\"));\nconst queryNavEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-nav]\"));\nconst queryWeekdaysEl = (element) => asHtmlElement(element.querySelector(\"[data-animated-weekdays]\"));\n/**\n * Handles animations for transitioning between months in the DayPicker\n * component.\n *\n * @private\n * @param rootElRef - A reference to the root element of the DayPicker\n *   component.\n * @param enabled - Whether animations are enabled.\n * @param options - Configuration options for the animation, including class\n *   names, months, focused day, and the date utility library.\n */\nexport function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib, }) {\n    const previousRootElSnapshotRef = useRef(null);\n    const previousMonthsRef = useRef(months);\n    const animatingRef = useRef(false);\n    useLayoutEffect(() => {\n        // get previous months before updating the previous months ref\n        const previousMonths = previousMonthsRef.current;\n        // update previous months ref for next effect trigger\n        previousMonthsRef.current = months;\n        if (!enabled ||\n            !rootElRef.current ||\n            // safety check because the ref can be set to anything by consumers\n            !(rootElRef.current instanceof HTMLElement) ||\n            // validation required for the animation to work as expected\n            months.length === 0 ||\n            previousMonths.length === 0 ||\n            months.length !== previousMonths.length) {\n            return;\n        }\n        const isSameMonth = dateLib.isSameMonth(months[0].date, previousMonths[0].date);\n        const isAfterPreviousMonth = dateLib.isAfter(months[0].date, previousMonths[0].date);\n        const captionAnimationClass = isAfterPreviousMonth\n            ? classNames[Animation.caption_after_enter]\n            : classNames[Animation.caption_before_enter];\n        const weeksAnimationClass = isAfterPreviousMonth\n            ? classNames[Animation.weeks_after_enter]\n            : classNames[Animation.weeks_before_enter];\n        // get previous root element snapshot before updating the snapshot ref\n        const previousRootElSnapshot = previousRootElSnapshotRef.current;\n        // update snapshot for next effect trigger\n        const rootElSnapshot = rootElRef.current.cloneNode(true);\n        if (rootElSnapshot instanceof HTMLElement) {\n            // if this effect is triggered while animating, we need to clean up the new root snapshot\n            // to put it in the same state as when not animating, to correctly animate the next month change\n            const currentMonthElsSnapshot = queryMonthEls(rootElSnapshot);\n            currentMonthElsSnapshot.forEach((currentMonthElSnapshot) => {\n                if (!(currentMonthElSnapshot instanceof HTMLElement))\n                    return;\n                // remove the old month snapshots from the new root snapshot\n                const previousMonthElSnapshot = queryMonthEl(currentMonthElSnapshot);\n                if (previousMonthElSnapshot &&\n                    currentMonthElSnapshot.contains(previousMonthElSnapshot)) {\n                    currentMonthElSnapshot.removeChild(previousMonthElSnapshot);\n                }\n                // remove animation classes from the new month snapshots\n                const captionEl = queryCaptionEl(currentMonthElSnapshot);\n                if (captionEl) {\n                    captionEl.classList.remove(captionAnimationClass);\n                }\n                const weeksEl = queryWeeksEl(currentMonthElSnapshot);\n                if (weeksEl) {\n                    weeksEl.classList.remove(weeksAnimationClass);\n                }\n            });\n            previousRootElSnapshotRef.current = rootElSnapshot;\n        }\n        else {\n            previousRootElSnapshotRef.current = null;\n        }\n        if (animatingRef.current ||\n            isSameMonth ||\n            // skip animation if a day is focused because it can cause issues to the animation and is better for a11y\n            focused) {\n            return;\n        }\n        const previousMonthEls = previousRootElSnapshot instanceof HTMLElement\n            ? queryMonthEls(previousRootElSnapshot)\n            : [];\n        const currentMonthEls = queryMonthEls(rootElRef.current);\n        if (currentMonthEls?.every((el) => el instanceof HTMLElement) &&\n            previousMonthEls?.every((el) => el instanceof HTMLElement)) {\n            animatingRef.current = true;\n            const cleanUpFunctions = [];\n            // set isolation to isolate to isolate the stacking context during animation\n            rootElRef.current.style.isolation = \"isolate\";\n            // set z-index to 1 to ensure the nav is clickable over the other elements being animated\n            const navEl = queryNavEl(rootElRef.current);\n            if (navEl) {\n                navEl.style.zIndex = \"1\";\n            }\n            currentMonthEls.forEach((currentMonthEl, index) => {\n                const previousMonthEl = previousMonthEls[index];\n                if (!previousMonthEl) {\n                    return;\n                }\n                // animate new displayed month\n                currentMonthEl.style.position = \"relative\";\n                currentMonthEl.style.overflow = \"hidden\";\n                const captionEl = queryCaptionEl(currentMonthEl);\n                if (captionEl) {\n                    captionEl.classList.add(captionAnimationClass);\n                }\n                const weeksEl = queryWeeksEl(currentMonthEl);\n                if (weeksEl) {\n                    weeksEl.classList.add(weeksAnimationClass);\n                }\n                // animate new displayed month end\n                const cleanUp = () => {\n                    animatingRef.current = false;\n                    if (rootElRef.current) {\n                        rootElRef.current.style.isolation = \"\";\n                    }\n                    if (navEl) {\n                        navEl.style.zIndex = \"\";\n                    }\n                    if (captionEl) {\n                        captionEl.classList.remove(captionAnimationClass);\n                    }\n                    if (weeksEl) {\n                        weeksEl.classList.remove(weeksAnimationClass);\n                    }\n                    currentMonthEl.style.position = \"\";\n                    currentMonthEl.style.overflow = \"\";\n                    if (currentMonthEl.contains(previousMonthEl)) {\n                        currentMonthEl.removeChild(previousMonthEl);\n                    }\n                };\n                cleanUpFunctions.push(cleanUp);\n                // animate old displayed month\n                previousMonthEl.style.pointerEvents = \"none\";\n                previousMonthEl.style.position = \"absolute\";\n                previousMonthEl.style.overflow = \"hidden\";\n                previousMonthEl.setAttribute(\"aria-hidden\", \"true\");\n                // hide the weekdays container of the old month and only the new one\n                const previousWeekdaysEl = queryWeekdaysEl(previousMonthEl);\n                if (previousWeekdaysEl) {\n                    previousWeekdaysEl.style.opacity = \"0\";\n                }\n                const previousCaptionEl = queryCaptionEl(previousMonthEl);\n                if (previousCaptionEl) {\n                    previousCaptionEl.classList.add(isAfterPreviousMonth\n                        ? classNames[Animation.caption_before_exit]\n                        : classNames[Animation.caption_after_exit]);\n                    previousCaptionEl.addEventListener(\"animationend\", cleanUp);\n                }\n                const previousWeeksEl = queryWeeksEl(previousMonthEl);\n                if (previousWeeksEl) {\n                    previousWeeksEl.classList.add(isAfterPreviousMonth\n                        ? classNames[Animation.weeks_before_exit]\n                        : classNames[Animation.weeks_after_exit]);\n                }\n                currentMonthEl.insertBefore(previousMonthEl, currentMonthEl.firstChild);\n            });\n        }\n    });\n}\n","/**\n * Returns all the dates to display in the calendar.\n *\n * This function calculates the range of dates to display based on the provided\n * display months, constraints, and calendar configuration.\n *\n * @param displayMonths The months to display in the calendar.\n * @param maxDate The maximum date to include in the range.\n * @param props The DayPicker props, including calendar configuration options.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dates to display in the calendar.\n */\nexport function getDates(displayMonths, maxDate, props, dateLib) {\n    const firstMonth = displayMonths[0];\n    const lastMonth = displayMonths[displayMonths.length - 1];\n    const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};\n    const { addDays, differenceInCalendarDays, differenceInCalendarMonths, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, isAfter, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n    const startWeekFirstDate = broadcastCalendar\n        ? startOfBroadcastWeek(firstMonth, dateLib)\n        : ISOWeek\n            ? startOfISOWeek(firstMonth)\n            : startOfWeek(firstMonth);\n    const displayMonthsWeekEnd = broadcastCalendar\n        ? endOfBroadcastWeek(lastMonth)\n        : ISOWeek\n            ? endOfISOWeek(endOfMonth(lastMonth))\n            : endOfWeek(endOfMonth(lastMonth));\n    // If maxDate is set, clamp the grid to the end of that week.\n    const constraintWeekEnd = maxDate &&\n        (broadcastCalendar\n            ? endOfBroadcastWeek(maxDate)\n            : ISOWeek\n                ? endOfISOWeek(maxDate)\n                : endOfWeek(maxDate));\n    // Pick the earliest week end between the displayed months and the constraint.\n    const gridEndDate = constraintWeekEnd && isAfter(displayMonthsWeekEnd, constraintWeekEnd)\n        ? constraintWeekEnd\n        : displayMonthsWeekEnd;\n    const nOfDays = differenceInCalendarDays(gridEndDate, startWeekFirstDate);\n    const nOfMonths = differenceInCalendarMonths(lastMonth, firstMonth) + 1;\n    const dates = [];\n    for (let i = 0; i <= nOfDays; i++) {\n        const date = addDays(startWeekFirstDate, i);\n        dates.push(date);\n    }\n    // If fixed weeks is enabled, add the extra dates to the array\n    const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;\n    const extraDates = nrOfDaysWithFixedWeeks * nOfMonths;\n    if (fixedWeeks && dates.length < extraDates) {\n        const daysToAdd = extraDates - dates.length;\n        for (let i = 0; i < daysToAdd; i++) {\n            const date = addDays(dates[dates.length - 1], 1);\n            dates.push(date);\n        }\n    }\n    return dates;\n}\n","/**\n * Returns all the days belonging to the calendar by merging the days in the\n * weeks for each month.\n *\n * @param calendarMonths The array of calendar months.\n * @returns An array of `CalendarDay` objects representing all the days in the\n *   calendar.\n */\nexport function getDays(calendarMonths) {\n    const initialDays = [];\n    return calendarMonths.reduce((days, month) => {\n        const weekDays = month.weeks.reduce((weekDays, week) => {\n            return weekDays.concat(week.days.slice());\n        }, initialDays.slice());\n        return days.concat(weekDays.slice());\n    }, initialDays.slice());\n}\n","/**\n * Returns the months to display in the calendar.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n *   calendar.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param props The DayPicker props, including `numberOfMonths`.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of dates representing the months to display.\n */\nexport function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib) {\n    const { numberOfMonths = 1 } = props;\n    const months = [];\n    for (let i = 0; i < numberOfMonths; i++) {\n        const month = dateLib.addMonths(firstDisplayedMonth, i);\n        if (calendarEndMonth && month > calendarEndMonth) {\n            break;\n        }\n        months.push(month);\n    }\n    return months;\n}\n","/**\n * Determines the initial month to display in the calendar based on the provided\n * props.\n *\n * This function calculates the starting month, considering constraints such as\n * `startMonth`, `endMonth`, and the number of months to display.\n *\n * @param props The DayPicker props, including navigation and date constraints.\n * @param dateLib The date library to use for date manipulation.\n * @returns The initial month to display.\n */\nexport function getInitialMonth(props, navStart, navEnd, dateLib) {\n    const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1, } = props;\n    let initialMonth = month || defaultMonth || today;\n    const { differenceInCalendarMonths, addMonths, startOfMonth } = dateLib;\n    if (navEnd &&\n        differenceInCalendarMonths(navEnd, initialMonth) < numberOfMonths - 1) {\n        const offset = -1 * (numberOfMonths - 1);\n        initialMonth = addMonths(navEnd, offset);\n    }\n    if (navStart && differenceInCalendarMonths(initialMonth, navStart) < 0) {\n        initialMonth = navStart;\n    }\n    return startOfMonth(initialMonth);\n}\n","import { CalendarDay, CalendarMonth, CalendarWeek } from \"../classes/index.js\";\n/**\n * Returns the months to display in the calendar.\n *\n * This function generates `CalendarMonth` objects for each month to be\n * displayed, including their weeks and days, based on the provided display\n * months and dates.\n *\n * @param displayMonths The months (as dates) to display in the calendar.\n * @param dates The dates to display in the calendar.\n * @param props Options from the DayPicker props context.\n * @param dateLib The date library to use for date manipulation.\n * @returns An array of `CalendarMonth` objects representing the months to\n *   display.\n */\nexport function getMonths(displayMonths, dates, props, dateLib) {\n    const { addDays, endOfBroadcastWeek, endOfISOWeek, endOfMonth, endOfWeek, getISOWeek, getWeek, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n    const dayPickerMonths = displayMonths.reduce((months, month) => {\n        const firstDateOfFirstWeek = props.broadcastCalendar\n            ? startOfBroadcastWeek(month, dateLib)\n            : props.ISOWeek\n                ? startOfISOWeek(month)\n                : startOfWeek(month);\n        const lastDateOfLastWeek = props.broadcastCalendar\n            ? endOfBroadcastWeek(month)\n            : props.ISOWeek\n                ? endOfISOWeek(endOfMonth(month))\n                : endOfWeek(endOfMonth(month));\n        /** The dates to display in the month. */\n        const monthDates = dates.filter((date) => {\n            return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;\n        });\n        const nrOfDaysWithFixedWeeks = props.broadcastCalendar ? 35 : 42;\n        if (props.fixedWeeks && monthDates.length < nrOfDaysWithFixedWeeks) {\n            const extraDates = dates.filter((date) => {\n                const daysToAdd = nrOfDaysWithFixedWeeks - monthDates.length;\n                return (date > lastDateOfLastWeek &&\n                    date <= addDays(lastDateOfLastWeek, daysToAdd));\n            });\n            monthDates.push(...extraDates);\n        }\n        const weeks = monthDates.reduce((weeks, date) => {\n            const weekNumber = props.ISOWeek ? getISOWeek(date) : getWeek(date);\n            const week = weeks.find((week) => week.weekNumber === weekNumber);\n            const day = new CalendarDay(date, month, dateLib);\n            if (!week) {\n                weeks.push(new CalendarWeek(weekNumber, [day]));\n            }\n            else {\n                week.days.push(day);\n            }\n            return weeks;\n        }, []);\n        const dayPickerMonth = new CalendarMonth(month, weeks);\n        months.push(dayPickerMonth);\n        return months;\n    }, []);\n    if (!props.reverseMonths) {\n        return dayPickerMonths;\n    }\n    else {\n        return dayPickerMonths.reverse();\n    }\n}\n","/**\n * Returns the start and end months for calendar navigation.\n *\n * @param props The DayPicker props, including navigation and layout options.\n * @param dateLib The date library to use for date manipulation.\n * @returns A tuple containing the start and end months for navigation.\n */\nexport function getNavMonths(props, dateLib) {\n    let { startMonth, endMonth } = props;\n    const { startOfYear, startOfDay, startOfMonth, endOfMonth, addYears, endOfYear, today, } = dateLib;\n    const hasYearDropdown = props.captionLayout === \"dropdown\" ||\n        props.captionLayout === \"dropdown-years\";\n    if (startMonth) {\n        startMonth = startOfMonth(startMonth);\n    }\n    else if (!startMonth && hasYearDropdown) {\n        startMonth = startOfYear(addYears(props.today ?? today(), -100));\n    }\n    if (endMonth) {\n        endMonth = endOfMonth(endMonth);\n    }\n    else if (!endMonth && hasYearDropdown) {\n        endMonth = endOfYear(props.today ?? today());\n    }\n    return [\n        startMonth ? startOfDay(startMonth) : startMonth,\n        endMonth ? startOfDay(endMonth) : endMonth,\n    ];\n}\n","/**\n * Returns the next month the user can navigate to, based on the given options.\n *\n * The next month is not always the next calendar month:\n *\n * - If it is after the `calendarEndMonth`, it returns `undefined`.\n * - If paged navigation is enabled, it skips forward by the number of displayed\n *   months.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n *   calendar.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param options Navigation options, including `numberOfMonths` and\n *   `pagedNavigation`.\n * @param dateLib The date library to use for date manipulation.\n * @returns The next month, or `undefined` if navigation is not possible.\n */\nexport function getNextMonth(firstDisplayedMonth, calendarEndMonth, options, dateLib) {\n    if (options.disableNavigation) {\n        return undefined;\n    }\n    const { pagedNavigation, numberOfMonths = 1 } = options;\n    const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;\n    const offset = pagedNavigation ? numberOfMonths : 1;\n    const month = startOfMonth(firstDisplayedMonth);\n    if (!calendarEndMonth) {\n        return addMonths(month, offset);\n    }\n    const monthsDiff = differenceInCalendarMonths(calendarEndMonth, firstDisplayedMonth);\n    if (monthsDiff < numberOfMonths) {\n        return undefined;\n    }\n    return addMonths(month, offset);\n}\n","/**\n * Returns the previous month the user can navigate to, based on the given\n * options.\n *\n * The previous month is not always the previous calendar month:\n *\n * - If it is before the `calendarStartMonth`, it returns `undefined`.\n * - If paged navigation is enabled, it skips back by the number of displayed\n *   months.\n *\n * @param firstDisplayedMonth The first month currently displayed in the\n *   calendar.\n * @param calendarStartMonth The earliest month the user can navigate to.\n * @param options Navigation options, including `numberOfMonths` and\n *   `pagedNavigation`.\n * @param dateLib The date library to use for date manipulation.\n * @returns The previous month, or `undefined` if navigation is not possible.\n */\nexport function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, dateLib) {\n    if (options.disableNavigation) {\n        return undefined;\n    }\n    const { pagedNavigation, numberOfMonths } = options;\n    const { startOfMonth, addMonths, differenceInCalendarMonths } = dateLib;\n    const offset = pagedNavigation ? (numberOfMonths ?? 1) : 1;\n    const month = startOfMonth(firstDisplayedMonth);\n    if (!calendarStartMonth) {\n        return addMonths(month, -offset);\n    }\n    const monthsDiff = differenceInCalendarMonths(month, calendarStartMonth);\n    if (monthsDiff <= 0) {\n        return undefined;\n    }\n    return addMonths(month, -offset);\n}\n","/**\n * Returns an array of calendar weeks from an array of calendar months.\n *\n * @param months The array of calendar months.\n * @returns An array of calendar weeks.\n */\nexport function getWeeks(months) {\n    const initialWeeks = [];\n    return months.reduce((weeks, month) => {\n        return weeks.concat(month.weeks.slice());\n    }, initialWeeks.slice());\n}\n","import { useState } from \"react\";\n/**\n * A custom hook for managing both controlled and uncontrolled component states.\n *\n * This hook allows a component to support both controlled and uncontrolled\n * states by determining whether the `controlledValue` is provided. If it is\n * undefined, the hook falls back to using the internal state.\n *\n * @example\n *   // Uncontrolled usage\n *   const [value, setValue] = useControlledValue(0, undefined);\n *\n *   // Controlled usage\n *   const [value, setValue] = useControlledValue(0, props.value);\n *\n * @template T - The type of the value.\n * @param defaultValue The initial value for the uncontrolled state.\n * @param controlledValue The value for the controlled state. If undefined, the\n *   component will use the uncontrolled state.\n * @returns A tuple where the first element is the current value (either\n *   controlled or uncontrolled) and the second element is a setter function to\n *   update the value.\n */\nexport function useControlledValue(defaultValue, controlledValue) {\n    const [uncontrolledValue, setValue] = useState(defaultValue);\n    const value = controlledValue === undefined ? uncontrolledValue : controlledValue;\n    return [value, setValue];\n}\n","import { useEffect, useMemo } from \"react\";\nimport { getDates } from \"./helpers/getDates.js\";\nimport { getDays } from \"./helpers/getDays.js\";\nimport { getDisplayMonths } from \"./helpers/getDisplayMonths.js\";\nimport { getInitialMonth } from \"./helpers/getInitialMonth.js\";\nimport { getMonths } from \"./helpers/getMonths.js\";\nimport { getNavMonths } from \"./helpers/getNavMonth.js\";\nimport { getNextMonth } from \"./helpers/getNextMonth.js\";\nimport { getPreviousMonth } from \"./helpers/getPreviousMonth.js\";\nimport { getWeeks } from \"./helpers/getWeeks.js\";\nimport { useControlledValue } from \"./helpers/useControlledValue.js\";\n/**\n * Provides the calendar object to work with the calendar in custom components.\n *\n * @private\n * @param props - The DayPicker props related to calendar configuration.\n * @param dateLib - The date utility library instance.\n * @returns The calendar object containing displayed days, weeks, months, and\n *   navigation methods.\n */\nexport function useCalendar(props, dateLib) {\n    const [navStart, navEnd] = getNavMonths(props, dateLib);\n    const { startOfMonth, endOfMonth } = dateLib;\n    const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);\n    const [firstMonth, setFirstMonth] = useControlledValue(initialMonth, \n    // initialMonth is always computed from props.month if provided\n    props.month ? initialMonth : undefined);\n    // biome-ignore lint/correctness/useExhaustiveDependencies: change the initial month when the time zone changes.\n    useEffect(() => {\n        const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);\n        setFirstMonth(newInitialMonth);\n    }, [props.timeZone]);\n    /** The months displayed in the calendar. */\n    // biome-ignore lint/correctness/useExhaustiveDependencies: We want to recompute only when specific props change.\n    const { months, weeks, days, previousMonth, nextMonth } = useMemo(() => {\n        const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props.numberOfMonths }, dateLib);\n        const dates = getDates(displayMonths, props.endMonth ? endOfMonth(props.endMonth) : undefined, {\n            ISOWeek: props.ISOWeek,\n            fixedWeeks: props.fixedWeeks,\n            broadcastCalendar: props.broadcastCalendar,\n        }, dateLib);\n        const months = getMonths(displayMonths, dates, {\n            broadcastCalendar: props.broadcastCalendar,\n            fixedWeeks: props.fixedWeeks,\n            ISOWeek: props.ISOWeek,\n            reverseMonths: props.reverseMonths,\n        }, dateLib);\n        const weeks = getWeeks(months);\n        const days = getDays(months);\n        const previousMonth = getPreviousMonth(firstMonth, navStart, props, dateLib);\n        const nextMonth = getNextMonth(firstMonth, navEnd, props, dateLib);\n        return {\n            months,\n            weeks,\n            days,\n            previousMonth,\n            nextMonth,\n        };\n    }, [\n        dateLib,\n        firstMonth.getTime(),\n        navEnd?.getTime(),\n        navStart?.getTime(),\n        props.disableNavigation,\n        props.broadcastCalendar,\n        props.endMonth?.getTime(),\n        props.fixedWeeks,\n        props.ISOWeek,\n        props.numberOfMonths,\n        props.pagedNavigation,\n        props.reverseMonths,\n    ]);\n    const { disableNavigation, onMonthChange } = props;\n    const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));\n    const goToMonth = (date) => {\n        if (disableNavigation) {\n            return;\n        }\n        let newMonth = startOfMonth(date);\n        // if month is before start, use the first month instead\n        if (navStart && newMonth < startOfMonth(navStart)) {\n            newMonth = startOfMonth(navStart);\n        }\n        // if month is after endMonth, use the last month instead\n        if (navEnd && newMonth > startOfMonth(navEnd)) {\n            newMonth = startOfMonth(navEnd);\n        }\n        setFirstMonth(newMonth);\n        onMonthChange?.(newMonth);\n    };\n    const goToDay = (day) => {\n        // is this check necessary?\n        if (isDayInCalendar(day)) {\n            return;\n        }\n        goToMonth(day.date);\n    };\n    const calendar = {\n        months,\n        weeks,\n        days,\n        navStart,\n        navEnd,\n        previousMonth,\n        nextMonth,\n        goToMonth,\n        goToDay,\n    };\n    return calendar;\n}\n","import { DayFlag } from \"../UI.js\";\nvar FocusTargetPriority;\n(function (FocusTargetPriority) {\n    FocusTargetPriority[FocusTargetPriority[\"Today\"] = 0] = \"Today\";\n    FocusTargetPriority[FocusTargetPriority[\"Selected\"] = 1] = \"Selected\";\n    FocusTargetPriority[FocusTargetPriority[\"LastFocused\"] = 2] = \"LastFocused\";\n    FocusTargetPriority[FocusTargetPriority[\"FocusedModifier\"] = 3] = \"FocusedModifier\";\n})(FocusTargetPriority || (FocusTargetPriority = {}));\n/**\n * Determines if a day is focusable based on its modifiers.\n *\n * A day is considered focusable if it is not disabled, hidden, or outside the\n * displayed month.\n *\n * @param modifiers The modifiers applied to the day.\n * @returns `true` if the day is focusable, otherwise `false`.\n */\nfunction isFocusableDay(modifiers) {\n    return (!modifiers[DayFlag.disabled] &&\n        !modifiers[DayFlag.hidden] &&\n        !modifiers[DayFlag.outside]);\n}\n/**\n * Calculates the focus target day based on priority.\n *\n * This function determines the day that should receive focus in the calendar,\n * prioritizing days with specific modifiers (e.g., \"focused\", \"today\") or\n * selection states.\n *\n * @param days The array of `CalendarDay` objects to evaluate.\n * @param getModifiers A function to retrieve the modifiers for a given day.\n * @param isSelected A function to determine if a day is selected.\n * @param lastFocused The last focused day, if any.\n * @returns The `CalendarDay` that should receive focus, or `undefined` if no\n *   focusable day is found.\n */\nexport function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {\n    let focusTarget;\n    let foundFocusTargetPriority = -1;\n    for (const day of days) {\n        const modifiers = getModifiers(day);\n        if (isFocusableDay(modifiers)) {\n            if (modifiers[DayFlag.focused] &&\n                foundFocusTargetPriority < FocusTargetPriority.FocusedModifier) {\n                focusTarget = day;\n                foundFocusTargetPriority = FocusTargetPriority.FocusedModifier;\n            }\n            else if (lastFocused?.isEqualTo(day) &&\n                foundFocusTargetPriority < FocusTargetPriority.LastFocused) {\n                focusTarget = day;\n                foundFocusTargetPriority = FocusTargetPriority.LastFocused;\n            }\n            else if (isSelected(day.date) &&\n                foundFocusTargetPriority < FocusTargetPriority.Selected) {\n                focusTarget = day;\n                foundFocusTargetPriority = FocusTargetPriority.Selected;\n            }\n            else if (modifiers[DayFlag.today] &&\n                foundFocusTargetPriority < FocusTargetPriority.Today) {\n                focusTarget = day;\n                foundFocusTargetPriority = FocusTargetPriority.Today;\n            }\n        }\n    }\n    if (!focusTarget) {\n        // Return the first day that is focusable\n        focusTarget = days.find((day) => isFocusableDay(getModifiers(day)));\n    }\n    return focusTarget;\n}\n","/**\n * Calculates the next date that should be focused in the calendar.\n *\n * This function determines the next focusable date based on the movement\n * direction, constraints, and calendar configuration.\n *\n * @param moveBy The unit of movement (e.g., \"day\", \"week\").\n * @param moveDir The direction of movement (\"before\" or \"after\").\n * @param refDate The reference date from which to calculate the next focusable\n *   date.\n * @param navStart The earliest date the user can navigate to.\n * @param navEnd The latest date the user can navigate to.\n * @param props The DayPicker props, including calendar configuration options.\n * @param dateLib The date library to use for date manipulation.\n * @returns The next focusable date.\n */\nexport function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {\n    const { ISOWeek, broadcastCalendar } = props;\n    const { addDays, addMonths, addWeeks, addYears, endOfBroadcastWeek, endOfISOWeek, endOfWeek, max, min, startOfBroadcastWeek, startOfISOWeek, startOfWeek, } = dateLib;\n    const moveFns = {\n        day: addDays,\n        week: addWeeks,\n        month: addMonths,\n        year: addYears,\n        startOfWeek: (date) => broadcastCalendar\n            ? startOfBroadcastWeek(date, dateLib)\n            : ISOWeek\n                ? startOfISOWeek(date)\n                : startOfWeek(date),\n        endOfWeek: (date) => broadcastCalendar\n            ? endOfBroadcastWeek(date)\n            : ISOWeek\n                ? endOfISOWeek(date)\n                : endOfWeek(date),\n    };\n    let focusableDate = moveFns[moveBy](refDate, moveDir === \"after\" ? 1 : -1);\n    if (moveDir === \"before\" && navStart) {\n        focusableDate = max([navStart, focusableDate]);\n    }\n    else if (moveDir === \"after\" && navEnd) {\n        focusableDate = min([navEnd, focusableDate]);\n    }\n    return focusableDate;\n}\n","import { CalendarDay } from \"../classes/index.js\";\nimport { dateMatchModifiers } from \"../utils/dateMatchModifiers.js\";\nimport { getFocusableDate } from \"./getFocusableDate.js\";\n/**\n * Determines the next focusable day in the calendar.\n *\n * This function recursively calculates the next focusable day based on the\n * movement direction and modifiers applied to the days.\n *\n * @param moveBy The unit of movement (e.g., \"day\", \"week\").\n * @param moveDir The direction of movement (\"before\" or \"after\").\n * @param refDay The currently focused day.\n * @param calendarStartMonth The earliest month the user can navigate to.\n * @param calendarEndMonth The latest month the user can navigate to.\n * @param props The DayPicker props, including modifiers and configuration\n *   options.\n * @param dateLib The date library to use for date manipulation.\n * @param attempt The current recursion attempt (used to limit recursion depth).\n * @returns The next focusable day, or `undefined` if no focusable day is found.\n */\nexport function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt = 0) {\n    if (attempt > 365) {\n        // Limit the recursion to 365 attempts\n        return undefined;\n    }\n    const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);\n    const isDisabled = Boolean(props.disabled &&\n        dateMatchModifiers(focusableDate, props.disabled, dateLib));\n    const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));\n    const targetMonth = focusableDate;\n    const focusDay = new CalendarDay(focusableDate, targetMonth, dateLib);\n    if (!isDisabled && !isHidden) {\n        return focusDay;\n    }\n    // Recursively attempt to find the next focusable date\n    return getNextFocus(moveBy, moveDir, focusDay, calendarStartMonth, calendarEndMonth, props, dateLib, attempt + 1);\n}\n","import { useState } from \"react\";\nimport { calculateFocusTarget } from \"./helpers/calculateFocusTarget.js\";\nimport { getNextFocus } from \"./helpers/getNextFocus.js\";\n/**\n * Manages focus behavior for the DayPicker component, including setting,\n * moving, and blurring focus on calendar days.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param calendar - The calendar object containing the displayed days and\n *   months.\n * @param getModifiers - A function to retrieve modifiers for a given day.\n * @param isSelected - A function to check if a date is selected.\n * @param dateLib - The date utility library instance.\n * @returns An object containing focus-related methods and the currently focused\n *   day.\n */\nexport function useFocus(props, calendar, getModifiers, isSelected, dateLib) {\n    const { autoFocus } = props;\n    const [lastFocused, setLastFocused] = useState();\n    const focusTarget = calculateFocusTarget(calendar.days, getModifiers, isSelected || (() => false), lastFocused);\n    const [focusedDay, setFocused] = useState(autoFocus ? focusTarget : undefined);\n    const blur = () => {\n        setLastFocused(focusedDay);\n        setFocused(undefined);\n    };\n    const moveFocus = (moveBy, moveDir) => {\n        if (!focusedDay)\n            return;\n        const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);\n        if (!nextFocus)\n            return;\n        if (props.disableNavigation) {\n            const isNextInCalendar = calendar.days.some((day) => day.isEqualTo(nextFocus));\n            if (!isNextInCalendar) {\n                return;\n            }\n        }\n        calendar.goToDay(nextFocus);\n        setFocused(nextFocus);\n    };\n    const isFocusTarget = (day) => {\n        return Boolean(focusTarget?.isEqualTo(day));\n    };\n    const useFocus = {\n        isFocusTarget,\n        setFocused,\n        focused: focusedDay,\n        blur,\n        moveFocus,\n    };\n    return useFocus;\n}\n","import { useControlledValue } from \"../helpers/useControlledValue.js\";\n/**\n * Hook to manage multiple-date selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected dates, a function to select dates,\n *   and a function to check if a date is selected.\n */\nexport function useMulti(props, dateLib) {\n    const { selected: initiallySelected, required, onSelect, } = props;\n    const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n    const selected = !onSelect ? internallySelected : initiallySelected;\n    const { isSameDay } = dateLib;\n    const isSelected = (date) => {\n        return selected?.some((d) => isSameDay(d, date)) ?? false;\n    };\n    const { min, max } = props;\n    const select = (triggerDate, modifiers, e) => {\n        let newDates = [...(selected ?? [])];\n        if (isSelected(triggerDate)) {\n            if (selected?.length === min) {\n                // Min value reached, do nothing\n                return;\n            }\n            if (required && selected?.length === 1) {\n                // Required value already selected do nothing\n                return;\n            }\n            newDates = selected?.filter((d) => !isSameDay(d, triggerDate));\n        }\n        else {\n            if (selected?.length === max) {\n                // Max value reached, reset the selection to date\n                newDates = [triggerDate];\n            }\n            else {\n                // Add the date to the selection\n                newDates = [...newDates, triggerDate];\n            }\n        }\n        if (!onSelect) {\n            setSelected(newDates);\n        }\n        onSelect?.(newDates, triggerDate, modifiers, e);\n        return newDates;\n    };\n    return {\n        selected,\n        select,\n        isSelected,\n    };\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Adds a date to an existing range, considering constraints like minimum and\n * maximum range size.\n *\n * @param date - The date to add to the range.\n * @param initialRange - The initial range to which the date will be added.\n * @param min - The minimum number of days in the range.\n * @param max - The maximum number of days in the range.\n * @param required - Whether the range must always include at least one date.\n * @param dateLib - The date utility library instance.\n * @returns The updated date range, or `undefined` if the range is cleared.\n * @group Utilities\n */\nexport function addToRange(date, initialRange, min = 0, max = 0, required = false, dateLib = defaultDateLib) {\n    const { from, to } = initialRange || {};\n    const { isSameDay, isAfter, isBefore } = dateLib;\n    let range;\n    if (!from && !to) {\n        // the range is empty, add the date\n        range = { from: date, to: min > 0 ? undefined : date };\n    }\n    else if (from && !to) {\n        // adding date to an incomplete range\n        if (isSameDay(from, date)) {\n            // adding a date equal to the start of the range\n            if (min === 0) {\n                range = { from, to: date };\n            }\n            else if (required) {\n                range = { from, to: undefined };\n            }\n            else {\n                range = undefined;\n            }\n        }\n        else if (isBefore(date, from)) {\n            // adding a date before the start of the range\n            range = { from: date, to: from };\n        }\n        else {\n            // adding a date after the start of the range\n            range = { from, to: date };\n        }\n    }\n    else if (from && to) {\n        // adding date to a complete range\n        if (isSameDay(from, date) && isSameDay(to, date)) {\n            // adding a date that is equal to both start and end of the range\n            if (required) {\n                range = { from, to };\n            }\n            else {\n                range = undefined;\n            }\n        }\n        else if (isSameDay(from, date)) {\n            // adding a date equal to the the start of the range\n            range = { from, to: min > 0 ? undefined : date };\n        }\n        else if (isSameDay(to, date)) {\n            // adding a dare equal to the end of the range\n            range = { from: date, to: min > 0 ? undefined : date };\n        }\n        else if (isBefore(date, from)) {\n            // adding a date before the start of the range\n            range = { from: date, to: to };\n        }\n        else if (isAfter(date, from)) {\n            // adding a date after the start of the range\n            range = { from, to: date };\n        }\n        else if (isAfter(date, to)) {\n            // adding a date after the end of the range\n            range = { from, to: date };\n        }\n        else {\n            throw new Error(\"Invalid range\");\n        }\n    }\n    // check for min / max\n    if (range?.from && range?.to) {\n        const diff = dateLib.differenceInCalendarDays(range.to, range.from);\n        if (max > 0 && diff > max) {\n            range = { from: date, to: undefined };\n        }\n        else if (min > 1 && diff < min) {\n            range = { from: date, to: undefined };\n        }\n    }\n    return range;\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\n/**\n * Checks if a date range contains one or more specified days of the week.\n *\n * @since 9.2.2\n * @param range - The date range to check.\n * @param dayOfWeek - The day(s) of the week to check for (`0-6`, where `0` is\n *   Sunday).\n * @param dateLib - The date utility library instance.\n * @returns `true` if the range contains the specified day(s) of the week,\n *   otherwise `false`.\n * @group Utilities\n */\nexport function rangeContainsDayOfWeek(range, dayOfWeek, dateLib = defaultDateLib) {\n    const dayOfWeekArr = !Array.isArray(dayOfWeek) ? [dayOfWeek] : dayOfWeek;\n    let date = range.from;\n    const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n    // iterate at maximum one week or the total days if the range is shorter than one week\n    const totalDaysLimit = Math.min(totalDays, 6);\n    for (let i = 0; i <= totalDaysLimit; i++) {\n        if (dayOfWeekArr.includes(date.getDay())) {\n            return true;\n        }\n        date = dateLib.addDays(date, 1);\n    }\n    return false;\n}\n","import { defaultDateLib } from \"../classes/index.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\n/**\n * Determines if two date ranges overlap.\n *\n * @since 9.2.2\n * @param rangeLeft - The first date range.\n * @param rangeRight - The second date range.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the ranges overlap, otherwise `false`.\n * @group Utilities\n */\nexport function rangeOverlaps(rangeLeft, rangeRight, dateLib = defaultDateLib) {\n    return (rangeIncludesDate(rangeLeft, rangeRight.from, false, dateLib) ||\n        rangeIncludesDate(rangeLeft, rangeRight.to, false, dateLib) ||\n        rangeIncludesDate(rangeRight, rangeLeft.from, false, dateLib) ||\n        rangeIncludesDate(rangeRight, rangeLeft.to, false, dateLib));\n}\n","import { defaultDateLib } from \"../classes/DateLib.js\";\nimport { dateMatchModifiers } from \"./dateMatchModifiers.js\";\nimport { rangeContainsDayOfWeek } from \"./rangeContainsDayOfWeek.js\";\nimport { rangeIncludesDate } from \"./rangeIncludesDate.js\";\nimport { rangeOverlaps } from \"./rangeOverlaps.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDatesArray, isDayOfWeekType, } from \"./typeguards.js\";\n/**\n * Checks if a date range contains dates that match the given modifiers.\n *\n * @since 9.2.2\n * @param range - The date range to check.\n * @param modifiers - The modifiers to match against.\n * @param dateLib - The date utility library instance.\n * @returns `true` if the range contains matching dates, otherwise `false`.\n * @group Utilities\n */\nexport function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {\n    const matchers = Array.isArray(modifiers) ? modifiers : [modifiers];\n    // Defer function matchers evaluation as they are the least performant.\n    const nonFunctionMatchers = matchers.filter((matcher) => typeof matcher !== \"function\");\n    const nonFunctionMatchersResult = nonFunctionMatchers.some((matcher) => {\n        if (typeof matcher === \"boolean\")\n            return matcher;\n        if (dateLib.isDate(matcher)) {\n            return rangeIncludesDate(range, matcher, false, dateLib);\n        }\n        if (isDatesArray(matcher, dateLib)) {\n            return matcher.some((date) => rangeIncludesDate(range, date, false, dateLib));\n        }\n        if (isDateRange(matcher)) {\n            if (matcher.from && matcher.to) {\n                return rangeOverlaps(range, { from: matcher.from, to: matcher.to }, dateLib);\n            }\n            return false;\n        }\n        if (isDayOfWeekType(matcher)) {\n            return rangeContainsDayOfWeek(range, matcher.dayOfWeek, dateLib);\n        }\n        if (isDateInterval(matcher)) {\n            const isClosedInterval = dateLib.isAfter(matcher.before, matcher.after);\n            if (isClosedInterval) {\n                return rangeOverlaps(range, {\n                    from: dateLib.addDays(matcher.after, 1),\n                    to: dateLib.addDays(matcher.before, -1),\n                }, dateLib);\n            }\n            return (dateMatchModifiers(range.from, matcher, dateLib) ||\n                dateMatchModifiers(range.to, matcher, dateLib));\n        }\n        if (isDateAfterType(matcher) || isDateBeforeType(matcher)) {\n            return (dateMatchModifiers(range.from, matcher, dateLib) ||\n                dateMatchModifiers(range.to, matcher, dateLib));\n        }\n        return false;\n    });\n    if (nonFunctionMatchersResult) {\n        return true;\n    }\n    const functionMatchers = matchers.filter((matcher) => typeof matcher === \"function\");\n    if (functionMatchers.length) {\n        let date = range.from;\n        const totalDays = dateLib.differenceInCalendarDays(range.to, range.from);\n        for (let i = 0; i <= totalDays; i++) {\n            if (functionMatchers.some((matcher) => matcher(date))) {\n                return true;\n            }\n            date = dateLib.addDays(date, 1);\n        }\n    }\n    return false;\n}\n","import { useControlledValue } from \"../helpers/useControlledValue.js\";\nimport { addToRange, rangeContainsModifiers } from \"../utils/index.js\";\nimport { rangeIncludesDate } from \"../utils/rangeIncludesDate.js\";\n/**\n * Hook to manage range selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected range, a function to select a\n *   range, and a function to check if a date is within the range.\n */\nexport function useRange(props, dateLib) {\n    const { disabled, excludeDisabled, resetOnSelect, selected: initiallySelected, required, onSelect, } = props;\n    const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n    const selected = !onSelect ? internallySelected : initiallySelected;\n    const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);\n    const select = (triggerDate, modifiers, e) => {\n        const { min, max } = props;\n        let newRange;\n        if (triggerDate) {\n            const selectedFrom = selected?.from;\n            const selectedTo = selected?.to;\n            const hasFullRange = !!selectedFrom && !!selectedTo;\n            const isClickingSingleDayRange = !!selectedFrom &&\n                !!selectedTo &&\n                dateLib.isSameDay(selectedFrom, selectedTo) &&\n                dateLib.isSameDay(triggerDate, selectedFrom);\n            if (resetOnSelect && (hasFullRange || !selected?.from)) {\n                if (!required && isClickingSingleDayRange) {\n                    newRange = undefined;\n                }\n                else {\n                    newRange = { from: triggerDate, to: undefined };\n                }\n            }\n            else {\n                newRange = addToRange(triggerDate, selected, min, max, required, dateLib);\n            }\n        }\n        if (excludeDisabled && disabled && newRange?.from && newRange.to) {\n            if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {\n                // if a disabled days is found, the range is reset\n                newRange.from = triggerDate;\n                newRange.to = undefined;\n            }\n        }\n        if (!onSelect) {\n            setSelected(newRange);\n        }\n        onSelect?.(newRange, triggerDate, modifiers, e);\n        return newRange;\n    };\n    return {\n        selected,\n        select,\n        isSelected,\n    };\n}\n","import { useControlledValue } from \"../helpers/useControlledValue.js\";\n/**\n * Hook to manage single-date selection in the DayPicker component.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns An object containing the selected date, a function to select a date,\n *   and a function to check if a date is selected.\n */\nexport function useSingle(props, dateLib) {\n    const { selected: initiallySelected, required, onSelect, } = props;\n    const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : undefined);\n    const selected = !onSelect ? internallySelected : initiallySelected;\n    const { isSameDay } = dateLib;\n    const isSelected = (compareDate) => {\n        return selected ? isSameDay(selected, compareDate) : false;\n    };\n    const select = (triggerDate, modifiers, e) => {\n        let newDate = triggerDate;\n        if (!required && selected && selected && isSameDay(triggerDate, selected)) {\n            // If the date is the same, clear the selection.\n            newDate = undefined;\n        }\n        if (!onSelect) {\n            setSelected(newDate);\n        }\n        if (required) {\n            onSelect?.(newDate, triggerDate, modifiers, e);\n        }\n        else {\n            onSelect?.(newDate, triggerDate, modifiers, e);\n        }\n        return newDate;\n    };\n    return {\n        selected,\n        select,\n        isSelected,\n    };\n}\n","import { useMulti } from \"./selection/useMulti.js\";\nimport { useRange } from \"./selection/useRange.js\";\nimport { useSingle } from \"./selection/useSingle.js\";\n/**\n * Determines the appropriate selection hook to use based on the selection mode\n * and returns the corresponding selection object.\n *\n * @template T - The type of DayPicker props.\n * @param props - The DayPicker props.\n * @param dateLib - The date utility library instance.\n * @returns The selection object for the specified mode, or `undefined` if no\n *   mode is set.\n */\nexport function useSelection(props, dateLib) {\n    const single = useSingle(props, dateLib);\n    const multi = useMulti(props, dateLib);\n    const range = useRange(props, dateLib);\n    switch (props.mode) {\n        case \"single\":\n            return single;\n        case \"multiple\":\n            return multi;\n        case \"range\":\n            return range;\n        default:\n            return undefined;\n    }\n}\n","import { TZDate } from \"@date-fns/tz\";\n/**\n * Convert a {@link Date} or {@link TZDate} instance to the given time zone.\n * Reuses the same instance when it is already a {@link TZDate} using the target\n * time zone to avoid extra allocations.\n */\nexport function toTimeZone(date, timeZone) {\n    if (date instanceof TZDate && date.timeZone === timeZone) {\n        return date;\n    }\n    return new TZDate(date, timeZone);\n}\n","import { TZDate } from \"@date-fns/tz\";\nimport { toTimeZone } from \"./toTimeZone.js\";\nimport { isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, } from \"./typeguards.js\";\nfunction toZoneNoon(date, timeZone, noonSafe) {\n    if (!noonSafe)\n        return toTimeZone(date, timeZone);\n    const zoned = toTimeZone(date, timeZone);\n    const noonZoned = new TZDate(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 12, 0, 0, timeZone);\n    return new Date(noonZoned.getTime());\n}\nfunction convertMatcher(matcher, timeZone, noonSafe) {\n    if (typeof matcher === \"boolean\" || typeof matcher === \"function\") {\n        return matcher;\n    }\n    if (matcher instanceof Date) {\n        return toZoneNoon(matcher, timeZone, noonSafe);\n    }\n    if (Array.isArray(matcher)) {\n        return matcher.map((value) => value instanceof Date ? toZoneNoon(value, timeZone, noonSafe) : value);\n    }\n    if (isDateRange(matcher)) {\n        return {\n            ...matcher,\n            from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,\n            to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to,\n        };\n    }\n    if (isDateInterval(matcher)) {\n        return {\n            before: toZoneNoon(matcher.before, timeZone, noonSafe),\n            after: toZoneNoon(matcher.after, timeZone, noonSafe),\n        };\n    }\n    if (isDateAfterType(matcher)) {\n        return {\n            after: toZoneNoon(matcher.after, timeZone, noonSafe),\n        };\n    }\n    if (isDateBeforeType(matcher)) {\n        return {\n            before: toZoneNoon(matcher.before, timeZone, noonSafe),\n        };\n    }\n    return matcher;\n}\n/**\n * Convert any {@link Matcher} or array of matchers to the specified time zone.\n *\n * @param matchers - The matcher or matchers to convert.\n * @param timeZone - The target IANA time zone.\n * @returns The converted matcher(s).\n * @group Utilities\n */\nexport function convertMatchersToTimeZone(matchers, timeZone, noonSafe) {\n    if (!matchers) {\n        return matchers;\n    }\n    if (Array.isArray(matchers)) {\n        return matchers.map((matcher) => convertMatcher(matcher, timeZone, noonSafe));\n    }\n    return convertMatcher(matchers, timeZone, noonSafe);\n}\n","import React, { useCallback, useMemo, useRef } from \"react\";\nimport { DateLib, defaultLocale } from \"./classes/DateLib.js\";\nimport { createGetModifiers } from \"./helpers/createGetModifiers.js\";\nimport { getClassNamesForModifiers } from \"./helpers/getClassNamesForModifiers.js\";\nimport { getComponents } from \"./helpers/getComponents.js\";\nimport { getDataAttributes } from \"./helpers/getDataAttributes.js\";\nimport { getDefaultClassNames } from \"./helpers/getDefaultClassNames.js\";\nimport { getFormatters } from \"./helpers/getFormatters.js\";\nimport { getLabels } from \"./helpers/getLabels.js\";\nimport { getMonthOptions } from \"./helpers/getMonthOptions.js\";\nimport { getStyleForModifiers } from \"./helpers/getStyleForModifiers.js\";\nimport { getWeekdays } from \"./helpers/getWeekdays.js\";\nimport { getYearOptions } from \"./helpers/getYearOptions.js\";\nimport { createNoonOverrides } from \"./noonDateLib.js\";\nimport { DayFlag, SelectionState, UI } from \"./UI.js\";\nimport { useAnimation } from \"./useAnimation.js\";\nimport { useCalendar } from \"./useCalendar.js\";\nimport { dayPickerContext } from \"./useDayPicker.js\";\nimport { useFocus } from \"./useFocus.js\";\nimport { useSelection } from \"./useSelection.js\";\nimport { convertMatchersToTimeZone } from \"./utils/convertMatchersToTimeZone.js\";\nimport { rangeIncludesDate } from \"./utils/rangeIncludesDate.js\";\nimport { toTimeZone } from \"./utils/toTimeZone.js\";\nimport { isDateRange } from \"./utils/typeguards.js\";\n/**\n * Renders the DayPicker calendar component.\n *\n * @param initialProps - The props for the DayPicker component.\n * @returns The rendered DayPicker component.\n * @group DayPicker\n * @see https://daypicker.dev\n */\nexport function DayPicker(initialProps) {\n    let props = initialProps;\n    const timeZone = props.timeZone;\n    if (timeZone) {\n        props = {\n            ...initialProps,\n            timeZone,\n        };\n        if (props.today) {\n            props.today = toTimeZone(props.today, timeZone);\n        }\n        if (props.month) {\n            props.month = toTimeZone(props.month, timeZone);\n        }\n        if (props.defaultMonth) {\n            props.defaultMonth = toTimeZone(props.defaultMonth, timeZone);\n        }\n        if (props.startMonth) {\n            props.startMonth = toTimeZone(props.startMonth, timeZone);\n        }\n        if (props.endMonth) {\n            props.endMonth = toTimeZone(props.endMonth, timeZone);\n        }\n        if (props.mode === \"single\" && props.selected) {\n            props.selected = toTimeZone(props.selected, timeZone);\n        }\n        else if (props.mode === \"multiple\" && props.selected) {\n            props.selected = props.selected?.map((date) => toTimeZone(date, timeZone));\n        }\n        else if (props.mode === \"range\" && props.selected) {\n            props.selected = {\n                from: props.selected.from\n                    ? toTimeZone(props.selected.from, timeZone)\n                    : props.selected.from,\n                to: props.selected.to\n                    ? toTimeZone(props.selected.to, timeZone)\n                    : props.selected.to,\n            };\n        }\n        if (props.disabled !== undefined) {\n            props.disabled = convertMatchersToTimeZone(props.disabled, timeZone);\n        }\n        if (props.hidden !== undefined) {\n            props.hidden = convertMatchersToTimeZone(props.hidden, timeZone);\n        }\n        if (props.modifiers) {\n            const nextModifiers = {};\n            Object.keys(props.modifiers).forEach((key) => {\n                nextModifiers[key] = convertMatchersToTimeZone(props.modifiers?.[key], timeZone);\n            });\n            props.modifiers = nextModifiers;\n        }\n    }\n    const { components, formatters, labels, dateLib, locale, classNames } = useMemo(() => {\n        const locale = { ...defaultLocale, ...props.locale };\n        const weekStartsOn = props.broadcastCalendar ? 1 : props.weekStartsOn;\n        const noonOverrides = props.noonSafe && props.timeZone\n            ? createNoonOverrides(props.timeZone, {\n                weekStartsOn,\n                locale,\n            })\n            : undefined;\n        const overrides = props.dateLib && noonOverrides\n            ? { ...noonOverrides, ...props.dateLib }\n            : (props.dateLib ?? noonOverrides);\n        const dateLib = new DateLib({\n            locale,\n            weekStartsOn,\n            firstWeekContainsDate: props.firstWeekContainsDate,\n            useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,\n            useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,\n            timeZone: props.timeZone,\n            numerals: props.numerals,\n        }, overrides);\n        return {\n            dateLib,\n            components: getComponents(props.components),\n            formatters: getFormatters(props.formatters),\n            labels: getLabels(props.labels, dateLib.options),\n            locale,\n            classNames: { ...getDefaultClassNames(), ...props.classNames },\n        };\n    }, [\n        props.locale,\n        props.broadcastCalendar,\n        props.weekStartsOn,\n        props.firstWeekContainsDate,\n        props.useAdditionalWeekYearTokens,\n        props.useAdditionalDayOfYearTokens,\n        props.timeZone,\n        props.numerals,\n        props.dateLib,\n        props.noonSafe,\n        props.components,\n        props.formatters,\n        props.labels,\n        props.classNames,\n    ]);\n    if (!props.today) {\n        props = { ...props, today: dateLib.today() };\n    }\n    const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles, } = props;\n    const { formatCaption, formatDay, formatMonthDropdown, formatWeekNumber, formatWeekNumberHeader, formatWeekdayName, formatYearDropdown, } = formatters;\n    const calendar = useCalendar(props, dateLib);\n    const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth, } = calendar;\n    const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);\n    const { isSelected, select, selected: selectedValue, } = useSelection(props, dateLib) ?? {};\n    const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected ?? (() => false), dateLib);\n    const { labelDayButton, labelGridcell, labelGrid, labelMonthDropdown, labelNav, labelPrevious, labelNext, labelWeekday, labelWeekNumber, labelWeekNumberHeader, labelYearDropdown, } = labels;\n    const weekdays = useMemo(() => getWeekdays(dateLib, props.ISOWeek, props.broadcastCalendar, props.today), [dateLib, props.ISOWeek, props.broadcastCalendar, props.today]);\n    const isInteractive = mode !== undefined || onDayClick !== undefined;\n    const handlePreviousClick = useCallback(() => {\n        if (!previousMonth)\n            return;\n        goToMonth(previousMonth);\n        onPrevClick?.(previousMonth);\n    }, [previousMonth, goToMonth, onPrevClick]);\n    const handleNextClick = useCallback(() => {\n        if (!nextMonth)\n            return;\n        goToMonth(nextMonth);\n        onNextClick?.(nextMonth);\n    }, [goToMonth, nextMonth, onNextClick]);\n    const handleDayClick = useCallback((day, m) => (e) => {\n        e.preventDefault();\n        e.stopPropagation();\n        setFocused(day);\n        if (m.disabled) {\n            return;\n        }\n        select?.(day.date, m, e);\n        onDayClick?.(day.date, m, e);\n    }, [select, onDayClick, setFocused]);\n    const handleDayFocus = useCallback((day, m) => (e) => {\n        setFocused(day);\n        onDayFocus?.(day.date, m, e);\n    }, [onDayFocus, setFocused]);\n    const handleDayBlur = useCallback((day, m) => (e) => {\n        blur();\n        onDayBlur?.(day.date, m, e);\n    }, [blur, onDayBlur]);\n    const handleDayKeyDown = useCallback((day, modifiers) => (e) => {\n        const keyMap = {\n            ArrowLeft: [\n                e.shiftKey ? \"month\" : \"day\",\n                props.dir === \"rtl\" ? \"after\" : \"before\",\n            ],\n            ArrowRight: [\n                e.shiftKey ? \"month\" : \"day\",\n                props.dir === \"rtl\" ? \"before\" : \"after\",\n            ],\n            ArrowDown: [e.shiftKey ? \"year\" : \"week\", \"after\"],\n            ArrowUp: [e.shiftKey ? \"year\" : \"week\", \"before\"],\n            PageUp: [e.shiftKey ? \"year\" : \"month\", \"before\"],\n            PageDown: [e.shiftKey ? \"year\" : \"month\", \"after\"],\n            Home: [\"startOfWeek\", \"before\"],\n            End: [\"endOfWeek\", \"after\"],\n        };\n        if (keyMap[e.key]) {\n            e.preventDefault();\n            e.stopPropagation();\n            const [moveBy, moveDir] = keyMap[e.key];\n            moveFocus(moveBy, moveDir);\n        }\n        onDayKeyDown?.(day.date, modifiers, e);\n    }, [moveFocus, onDayKeyDown, props.dir]);\n    const handleDayMouseEnter = useCallback((day, modifiers) => (e) => {\n        onDayMouseEnter?.(day.date, modifiers, e);\n    }, [onDayMouseEnter]);\n    const handleDayMouseLeave = useCallback((day, modifiers) => (e) => {\n        onDayMouseLeave?.(day.date, modifiers, e);\n    }, [onDayMouseLeave]);\n    const handleMonthChange = useCallback((date, monthOffset) => (e) => {\n        const selectedMonth = Number(e.target.value);\n        const month = dateLib.setMonth(dateLib.startOfMonth(date), selectedMonth);\n        goToMonth(dateLib.addMonths(month, -monthOffset));\n    }, [dateLib, goToMonth]);\n    const handleYearChange = useCallback((date, monthOffset) => (e) => {\n        const selectedYear = Number(e.target.value);\n        const month = dateLib.setYear(dateLib.startOfMonth(date), selectedYear);\n        goToMonth(dateLib.addMonths(month, -monthOffset));\n    }, [dateLib, goToMonth]);\n    const { className, style } = useMemo(() => ({\n        className: [classNames[UI.Root], props.className]\n            .filter(Boolean)\n            .join(\" \"),\n        style: { ...styles?.[UI.Root], ...props.style },\n    }), [classNames, props.className, props.style, styles]);\n    const dataAttributes = getDataAttributes(props);\n    const getDropdownStyle = (dropdown) => {\n        const dropdownStyle = styles?.[UI.Dropdown];\n        const specificDropdownStyle = styles?.[dropdown];\n        if (!dropdownStyle && !specificDropdownStyle) {\n            return undefined;\n        }\n        return {\n            ...dropdownStyle,\n            ...specificDropdownStyle,\n        };\n    };\n    const rootElRef = useRef(null);\n    useAnimation(rootElRef, Boolean(props.animate), {\n        classNames,\n        months,\n        focused,\n        dateLib,\n    });\n    const contextValue = {\n        dayPickerProps: props,\n        selected: selectedValue,\n        select: select,\n        isSelected,\n        months,\n        nextMonth,\n        previousMonth,\n        goToMonth,\n        getModifiers,\n        components,\n        classNames,\n        styles,\n        labels,\n        formatters,\n    };\n    return (React.createElement(dayPickerContext.Provider, { value: contextValue },\n        React.createElement(components.Root, { rootRef: props.animate ? rootElRef : undefined, className: className, style: style, dir: props.dir, id: props.id, lang: props.lang ?? locale.code, nonce: props.nonce, title: props.title, role: props.role, \"aria-label\": props[\"aria-label\"], \"aria-labelledby\": props[\"aria-labelledby\"], ...dataAttributes },\n            React.createElement(components.Months, { className: classNames[UI.Months], style: styles?.[UI.Months] },\n                !props.hideNavigation && !navLayout && (React.createElement(components.Nav, { \"data-animated-nav\": props.animate ? \"true\" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], \"aria-label\": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),\n                months.map((calendarMonth, displayIndex) => {\n                    const monthOffset = props.reverseMonths\n                        ? months.length - 1 - displayIndex\n                        : displayIndex;\n                    return (React.createElement(components.Month, { \"data-animated-month\": props.animate ? \"true\" : undefined, className: classNames[UI.Month], style: styles?.[UI.Month], \n                        // biome-ignore lint/suspicious/noArrayIndexKey: breaks animation\n                        key: displayIndex, displayIndex: displayIndex, calendarMonth: calendarMonth },\n                        navLayout === \"around\" &&\n                            !props.hideNavigation &&\n                            displayIndex === 0 && (React.createElement(components.PreviousMonthButton, { type: \"button\", className: classNames[UI.PreviousMonthButton], style: styles?.[UI.PreviousMonthButton], tabIndex: previousMonth ? undefined : -1, \"aria-disabled\": previousMonth ? undefined : true, \"aria-label\": labelPrevious(previousMonth), onClick: handlePreviousClick, \"data-animated-button\": props.animate ? \"true\" : undefined },\n                            React.createElement(components.Chevron, { disabled: previousMonth ? undefined : true, className: classNames[UI.Chevron], style: styles?.[UI.Chevron], orientation: props.dir === \"rtl\" ? \"right\" : \"left\" }))),\n                        React.createElement(components.MonthCaption, { \"data-animated-caption\": props.animate ? \"true\" : undefined, className: classNames[UI.MonthCaption], style: styles?.[UI.MonthCaption], calendarMonth: calendarMonth, displayIndex: displayIndex }, captionLayout?.startsWith(\"dropdown\") ? (React.createElement(components.DropdownNav, { className: classNames[UI.Dropdowns], style: styles?.[UI.Dropdowns] },\n                            (() => {\n                                const monthControl = captionLayout === \"dropdown\" ||\n                                    captionLayout === \"dropdown-months\" ? (React.createElement(components.MonthsDropdown, { key: \"month\", className: classNames[UI.MonthsDropdown], \"aria-label\": labelMonthDropdown(), disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date, monthOffset), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters, dateLib), style: getDropdownStyle(UI.MonthsDropdown), value: dateLib.getMonth(calendarMonth.date) })) : (React.createElement(\"span\", { key: \"month\" }, formatMonthDropdown(calendarMonth.date, dateLib)));\n                                const yearControl = captionLayout === \"dropdown\" ||\n                                    captionLayout === \"dropdown-years\" ? (React.createElement(components.YearsDropdown, { key: \"year\", className: classNames[UI.YearsDropdown], \"aria-label\": labelYearDropdown(dateLib.options), disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date, monthOffset), options: getYearOptions(navStart, navEnd, formatters, dateLib, Boolean(props.reverseYears)), style: getDropdownStyle(UI.YearsDropdown), value: dateLib.getYear(calendarMonth.date) })) : (React.createElement(\"span\", { key: \"year\" }, formatYearDropdown(calendarMonth.date, dateLib)));\n                                const controls = dateLib.getMonthYearOrder() === \"year-first\"\n                                    ? [yearControl, monthControl]\n                                    : [monthControl, yearControl];\n                                return controls;\n                            })(),\n                            React.createElement(\"span\", { role: \"status\", \"aria-live\": \"polite\", style: {\n                                    border: 0,\n                                    clip: \"rect(0 0 0 0)\",\n                                    height: \"1px\",\n                                    margin: \"-1px\",\n                                    overflow: \"hidden\",\n                                    padding: 0,\n                                    position: \"absolute\",\n                                    width: \"1px\",\n                                    whiteSpace: \"nowrap\",\n                                    wordWrap: \"normal\",\n                                } }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))) : (React.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], style: styles?.[UI.CaptionLabel], role: \"status\", \"aria-live\": \"polite\" }, formatCaption(calendarMonth.date, dateLib.options, dateLib)))),\n                        navLayout === \"around\" &&\n                            !props.hideNavigation &&\n                            displayIndex === numberOfMonths - 1 && (React.createElement(components.NextMonthButton, { type: \"button\", className: classNames[UI.NextMonthButton], style: styles?.[UI.NextMonthButton], tabIndex: nextMonth ? undefined : -1, \"aria-disabled\": nextMonth ? undefined : true, \"aria-label\": labelNext(nextMonth), onClick: handleNextClick, \"data-animated-button\": props.animate ? \"true\" : undefined },\n                            React.createElement(components.Chevron, { disabled: nextMonth ? undefined : true, className: classNames[UI.Chevron], style: styles?.[UI.Chevron], orientation: props.dir === \"rtl\" ? \"left\" : \"right\" }))),\n                        displayIndex === numberOfMonths - 1 &&\n                            navLayout === \"after\" &&\n                            !props.hideNavigation && (React.createElement(components.Nav, { \"data-animated-nav\": props.animate ? \"true\" : undefined, className: classNames[UI.Nav], style: styles?.[UI.Nav], \"aria-label\": labelNav(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth: previousMonth, nextMonth: nextMonth })),\n                        React.createElement(components.MonthGrid, { role: \"grid\", \"aria-multiselectable\": mode === \"multiple\" || mode === \"range\", \"aria-label\": labelGrid(calendarMonth.date, dateLib.options, dateLib) ||\n                                undefined, className: classNames[UI.MonthGrid], style: styles?.[UI.MonthGrid] },\n                            !props.hideWeekdays && (React.createElement(components.Weekdays, { \"data-animated-weekdays\": props.animate ? \"true\" : undefined, className: classNames[UI.Weekdays], style: styles?.[UI.Weekdays] },\n                                showWeekNumber && (React.createElement(components.WeekNumberHeader, { \"aria-label\": labelWeekNumberHeader(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles?.[UI.WeekNumberHeader], scope: \"col\" }, formatWeekNumberHeader())),\n                                weekdays.map((weekday) => (React.createElement(components.Weekday, { \"aria-label\": labelWeekday(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles?.[UI.Weekday], scope: \"col\" }, formatWeekdayName(weekday, dateLib.options, dateLib)))))),\n                            React.createElement(components.Weeks, { \"data-animated-weeks\": props.animate ? \"true\" : undefined, className: classNames[UI.Weeks], style: styles?.[UI.Weeks] }, calendarMonth.weeks.map((week) => {\n                                return (React.createElement(components.Week, { className: classNames[UI.Week], key: week.weekNumber, style: styles?.[UI.Week], week: week },\n                                    showWeekNumber && (React.createElement(components.WeekNumber, { week: week, style: styles?.[UI.WeekNumber], \"aria-label\": labelWeekNumber(week.weekNumber, {\n                                            locale,\n                                        }), className: classNames[UI.WeekNumber], scope: \"row\", role: \"rowheader\" }, formatWeekNumber(week.weekNumber, dateLib))),\n                                    week.days.map((day) => {\n                                        const { date } = day;\n                                        const modifiers = getModifiers(day);\n                                        modifiers[DayFlag.focused] =\n                                            !modifiers.hidden &&\n                                                Boolean(focused?.isEqualTo(day));\n                                        modifiers[SelectionState.selected] =\n                                            isSelected?.(date) || modifiers.selected;\n                                        if (isDateRange(selectedValue)) {\n                                            // add range modifiers\n                                            const { from, to } = selectedValue;\n                                            modifiers[SelectionState.range_start] = Boolean(from && to && dateLib.isSameDay(date, from));\n                                            modifiers[SelectionState.range_end] = Boolean(from && to && dateLib.isSameDay(date, to));\n                                            modifiers[SelectionState.range_middle] =\n                                                rangeIncludesDate(selectedValue, date, true, dateLib);\n                                        }\n                                        const style = getStyleForModifiers(modifiers, styles, props.modifiersStyles);\n                                        const className = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);\n                                        const ariaLabel = !isInteractive && !modifiers.hidden\n                                            ? labelGridcell(date, modifiers, dateLib.options, dateLib)\n                                            : undefined;\n                                        return (React.createElement(components.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day: day, modifiers: modifiers, className: className.join(\" \"), style: style, role: \"gridcell\", \"aria-selected\": modifiers.selected || undefined, \"aria-label\": ariaLabel, \"data-day\": day.isoDate, \"data-month\": day.outside ? day.dateMonthId : undefined, \"data-selected\": modifiers.selected || undefined, \"data-disabled\": modifiers.disabled || undefined, \"data-hidden\": modifiers.hidden || undefined, \"data-outside\": day.outside || undefined, \"data-focused\": modifiers.focused || undefined, \"data-today\": modifiers.today || undefined }, !modifiers.hidden && isInteractive ? (React.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles?.[UI.DayButton], type: \"button\", day: day, modifiers: modifiers, disabled: (!modifiers.focused &&\n                                                modifiers.disabled) ||\n                                                undefined, \"aria-disabled\": (modifiers.focused &&\n                                                modifiers.disabled) ||\n                                                undefined, tabIndex: isFocusTarget(day) ? 0 : -1, \"aria-label\": labelDayButton(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay(date, dateLib.options, dateLib))) : (!modifiers.hidden &&\n                                            formatDay(day.date, dateLib.options, dateLib))));\n                                    })));\n                            })))));\n                })),\n            props.footer && (React.createElement(components.Footer, { className: classNames[UI.Footer], style: styles?.[UI.Footer], role: \"status\", \"aria-live\": \"polite\" }, props.footer)))));\n}\n","import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { type DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';\nimport { Button, buttonVariants } from '@/components/ui/button';\nimport { cn } from '@/lib/utils';\n\nfunction Calendar({\n  className,\n  classNames,\n  showOutsideDays = true,\n  captionLayout = 'label',\n  buttonVariant = 'link',\n  formatters,\n  components,\n  ...props\n}: React.ComponentProps<typeof DayPicker> & {\n  buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n}) {\n  const defaultClassNames = getDefaultClassNames();\n\n  return (\n    <DayPicker\n      showOutsideDays={showOutsideDays}\n      className={cn(\n        'group/calendar bg-surface-2xs p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',\n        String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n        String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n        className,\n      )}\n      captionLayout={captionLayout}\n      formatters={{\n        formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),\n        ...formatters,\n      }}\n      classNames={{\n        root: cn('w-fit', defaultClassNames.root),\n        months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),\n        month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n        nav: cn(\n          'absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1',\n          defaultClassNames.nav,\n        ),\n        button_previous: cn(\n          buttonVariants({ variant: buttonVariant }),\n          'h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-disabled',\n          defaultClassNames.button_previous,\n        ),\n        button_next: cn(\n          buttonVariants({ variant: buttonVariant }),\n          'h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-disabled',\n          defaultClassNames.button_next,\n        ),\n        month_caption: cn(\n          'flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]',\n          defaultClassNames.month_caption,\n        ),\n        dropdowns: cn(\n          'flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium',\n          defaultClassNames.dropdowns,\n        ),\n        dropdown_root: cn(\n          'border-input has-focus:border-stroke has-focus:ring-ring has-focus:ring-[1px] relative border',\n          defaultClassNames.dropdown_root,\n        ),\n        dropdown: cn('bg-popover absolute inset-0 opacity-0', defaultClassNames.dropdown),\n        caption_label: cn(\n          'select-none font-medium',\n          captionLayout === 'label'\n            ? 'text-sm'\n            : '[&>svg]:text-content-tertiary flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5',\n          defaultClassNames.caption_label,\n        ),\n        month_grid: cn('w-full border-collapse', defaultClassNames.month_grid),\n        weekdays: cn('flex', defaultClassNames.weekdays),\n        weekday: cn(\n          'text-content-tertiary flex-1 select-none rounded-md text-[0.8rem] font-normal',\n          defaultClassNames.weekday,\n        ),\n        week: cn('mt-2 flex w-full', defaultClassNames.week),\n        week_number_header: cn('w-[--cell-size] select-none', defaultClassNames.week_number_header),\n        week_number: cn(\n          'text-content-tertiary select-none text-[0.8rem]',\n          defaultClassNames.week_number,\n        ),\n        day: cn(\n          'group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md',\n          defaultClassNames.day,\n        ),\n        range_start: cn('bg-surface-hard rounded-l-full', defaultClassNames.range_start),\n        range_middle: cn('rounded-none', defaultClassNames.range_middle),\n        range_end: cn('bg-surface-hard rounded-r-full', defaultClassNames.range_end),\n        today: cn(\n          'bg-surface-hard text-content-primary rounded-md data-[selected=true]:rounded-none',\n          defaultClassNames.today,\n        ),\n        outside: cn(\n          'text-content-disabled aria-selected:text-content-disabled',\n          defaultClassNames.outside,\n        ),\n        disabled: cn('text-content-disabled', defaultClassNames.disabled),\n        hidden: cn('invisible', defaultClassNames.hidden),\n        ...classNames,\n      }}\n      components={{\n        Root: ({ className, rootRef, ...props }) => {\n          return <div data-slot='calendar' ref={rootRef} className={cn(className)} {...props} />;\n        },\n        Chevron: ({ className, orientation, ...props }) => {\n          if (orientation === 'left') {\n            return <ChevronLeftIcon className={cn('size-6', className)} {...props} />;\n          }\n\n          if (orientation === 'right') {\n            return <ChevronRightIcon className={cn('size-6', className)} {...props} />;\n          }\n\n          return <ChevronDownIcon className={cn('size-6', className)} {...props} />;\n        },\n        DayButton: CalendarDayButton,\n        WeekNumber: ({ children, ...props }) => {\n          return (\n            <td {...props}>\n              <div className='flex size-[--cell-size] items-center justify-center text-center'>\n                {children}\n              </div>\n            </td>\n          );\n        },\n        ...components,\n      }}\n      {...props}\n    />\n  );\n}\n\nfunction CalendarDayButton({\n  className,\n  day,\n  modifiers,\n  ...props\n}: React.ComponentProps<typeof DayButton>) {\n  const defaultClassNames = getDefaultClassNames();\n\n  const ref = React.useRef<HTMLButtonElement>(null);\n  React.useEffect(() => {\n    if (modifiers.focused) ref.current?.focus();\n  }, [modifiers.focused]);\n\n  return (\n    <Button\n      ref={ref}\n      variant='link'\n      arrow={false}\n      data-day={day.date.toLocaleDateString()}\n      data-selected-single={\n        modifiers.selected &&\n        !modifiers.range_start &&\n        !modifiers.range_end &&\n        !modifiers.range_middle\n      }\n      data-range-start={modifiers.range_start}\n      data-range-end={modifiers.range_end}\n      data-range-middle={modifiers.range_middle}\n      className={cn(\n        'flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 p-2 font-normal text-sm! leading-xs data-[range-end=true]:rounded-full data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-full data-[range-end=true]:bg-surface-md data-[range-middle=true]:bg-surface data-[range-start=true]:bg-surface-hard data-[selected-single=true]:bg-surface-hard data-[selected-single=true]:font-bold data-[range-end=true]:text-content-primary data-[range-middle=true]:text-content-primary data-[range-start=true]:text-content-primary data-[selected-single=true]:text-content-primary group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-stroke-2xl group-data-[focused=true]/day:ring-[1px] group-data-[focused=true]/day:ring-stroke-2xl/50 [&>span]:text-xs [&>span]:opacity-70',\n        defaultClassNames.day,\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport { Calendar, CalendarDayButton };\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162],"mappings":"gTA2BA,SAAgB,EAAO,EAAU,EAAM,EAAS,OAAQ,CACtD,OAAO,IAAI,KAAK,eAAe,QAAS,CAEtC,KAAM,UACI,WACV,aAAc,CAChB,CAAC,CAAC,CAAC,OAAO,CAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAC3B,MAAM,CAAC,CAAC,CACR,KAAK,GAAG,CACX,CCpCA,IAAM,EAAoB,CAAC,EACrB,EAAc,CAAC,EAerB,SAAgB,EAAS,EAAU,EAAM,CACvC,GAAI,CAKF,IAAM,GAAY,EAJe,KAAc,IAAI,KAAK,eAAe,QAAS,CAC9E,WACA,aAAc,YAChB,CAAC,CAAC,CAAC,OAAA,CACsB,CAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,GAE5C,OADI,KAAa,EAAoB,EAAY,GAC1C,EAAW,EAAW,EAAU,MAAM,GAAG,CA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