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BzG,EAAQuG,cAVY,KAqBpBvG,EAAQsG,gBAVc,GAqBtBtG,EAAQwG,aAVWD,MAqBnBvG,EAAQmG,cAVYK,OAqBpBxG,EAAQkG,cAVYM,SAqBpBxG,EAAQqG,eAVaH,QAYrBlG,EAAQoG,iBADeC,O,wBC3MvB,IAAIzG,EAAyBC,EAAAA,OAAAA,QAC7BC,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAETD,EAAAA,QA0BA,SAAqBmH,IACnB,EAAI3G,EAAOH,SAAS,EAAGC,WACvB,IAAIoD,EAAQyD,EAAO/G,EAAQ6G,WAC3B,OAAOxF,KAAK2F,MAAM1D,EACpB,EA7BA,IAAIlD,EAASZ,EAAuBC,EAAQ,QACxCO,EAAUP,EAAQ,OA6BtB8B,EAAO3B,QAAUA,EAAQK,O,wBCnCzB,IAAIT,EAAyBC,EAAAA,OAAAA,QAC7BC,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAETD,EAAAA,QA8BA,SAAe0F,EAAM2B,GACnB,IAAI3E,EAAQ2E,EAAK3E,MACfE,EAAMyE,EAAKzE,IAEb,OADA,EAAIR,EAAQ/B,SAAS,EAAGC,YACjB,EAAIF,EAAQC,SAAS,EAAC,EAAIG,EAAOH,SAAS,CAACqF,EAAMhD,IAASE,GACnE,EAlCA,IAAIpC,EAASZ,EAAuBC,EAAQ,QACxCO,EAAUR,EAAuBC,EAAQ,QACzCuC,EAAUxC,EAAuBC,EAAQ,QAiC7C8B,EAAO3B,QAAUA,EAAQK,O","sources":["webpack://@rocket.chat/livechat/./node_modules/date-fns/closestIndexTo/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInCalendarMonths/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInISOWeekYears/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachYearOfInterval/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInWeeks/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInBusinessDays/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInCalendarDays/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachWeekendOfMonth/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInCalendarQuarters/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachWeekendOfYear/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachMinuteOfInterval/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/closestTo/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInMilliseconds/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/compareDesc/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInCalendarYears/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInDays/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInCalendarISOWeeks/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInCalendarWeeks/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachQuarterOfInterval/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/compareAsc/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInCalendarISOWeekYears/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachMonthOfInterval/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInMinutes/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachWeekendOfInterval/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInHours/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachHourOfInterval/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInQuarters/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInSeconds/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInMonths/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/differenceInYears/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachDayOfInterval/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/eachWeekOfInterval/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/constants/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/daysToWeeks/index.js","webpack://@rocket.chat/livechat/./node_modules/date-fns/clamp/index.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = closestIndexTo;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name closestIndexTo\n * @category Common Helpers\n * @summary Return an index of the closest date from the array comparing to the given date.\n *\n * @description\n * Return an index of the closest date from the array comparing to the given date.\n *\n * @param {Date | Number} dateToCompare - the date to compare with\n * @param {Array | Array} datesArray - the array to search\n * @returns {Number | undefined} an index of the date closest to the given date or undefined if no valid value is given\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Which date is closer to 6 September 2015?\n * const dateToCompare = new Date(2015, 8, 6)\n * const datesArray = [\n * new Date(2015, 0, 1),\n * new Date(2016, 0, 1),\n * new Date(2017, 0, 1)\n * ]\n * const result = closestIndexTo(dateToCompare, datesArray)\n * //=> 1\n */\nfunction closestIndexTo(dirtyDateToCompare, dirtyDatesArray) {\n (0, _index2.default)(2, arguments);\n var dateToCompare = (0, _index.default)(dirtyDateToCompare);\n if (isNaN(Number(dateToCompare))) return NaN;\n var timeToCompare = dateToCompare.getTime();\n var datesArray;\n // `dirtyDatesArray` is undefined or null\n if (dirtyDatesArray == null) {\n datesArray = [];\n\n // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n } else if (typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray;\n\n // If `dirtyDatesArray` is Array-like Object, convert to Array. Otherwise, make it empty Array\n } else {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n }\n var result;\n var minDistance;\n datesArray.forEach(function (dirtyDate, index) {\n var currentDate = (0, _index.default)(dirtyDate);\n if (isNaN(Number(currentDate))) {\n result = NaN;\n minDistance = NaN;\n return;\n }\n var distance = Math.abs(timeToCompare - currentDate.getTime());\n if (result == null || distance < Number(minDistance)) {\n result = index;\n minDistance = distance;\n }\n });\n return result;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInCalendarMonths;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\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 {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\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 */\nfunction differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n (0, _index2.default)(2, arguments);\n var dateLeft = (0, _index.default)(dirtyDateLeft);\n var dateRight = (0, _index.default)(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInISOWeekYears;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../differenceInCalendarISOWeekYears/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../compareAsc/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../subISOWeekYears/index.js\"));\nvar _index5 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name differenceInISOWeekYears\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of full ISO week-numbering years between the given dates.\n *\n * @description\n * Get the number of full ISO week-numbering years between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full ISO week-numbering years\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012?\n * const result = differenceInISOWeekYears(\n * new Date(2012, 0, 1),\n * new Date(2010, 0, 1)\n * )\n * //=> 1\n */\nfunction differenceInISOWeekYears(dirtyDateLeft, dirtyDateRight) {\n (0, _index5.default)(2, arguments);\n var dateLeft = (0, _index.default)(dirtyDateLeft);\n var dateRight = (0, _index.default)(dirtyDateRight);\n var sign = (0, _index3.default)(dateLeft, dateRight);\n var difference = Math.abs((0, _index2.default)(dateLeft, dateRight));\n dateLeft = (0, _index4.default)(dateLeft, sign * difference);\n\n // Math.abs(diff in full ISO years - diff in calendar ISO years) === 1\n // if last calendar ISO year is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastISOWeekYearNotFull = Number((0, _index3.default)(dateLeft, dateRight) === -sign);\n var result = sign * (difference - isLastISOWeekYearNotFull);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachYearOfInterval;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\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 * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @returns {Date[]} the array with starts of yearly timestamps from the month of the interval start to the month of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\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 */\nfunction eachYearOfInterval(dirtyInterval) {\n (0, _index2.default)(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = (0, _index.default)(interval.start);\n var endDate = (0, _index.default)(interval.end);\n var endTime = endDate.getTime();\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(startDate.getTime() <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n var dates = [];\n var currentDate = startDate;\n currentDate.setHours(0, 0, 0, 0);\n currentDate.setMonth(0, 1);\n while (currentDate.getTime() <= endTime) {\n dates.push((0, _index.default)(currentDate));\n currentDate.setFullYear(currentDate.getFullYear() + 1);\n }\n return dates;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInWeeks;\nvar _index = _interopRequireDefault(require(\"../differenceInDays/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar _index3 = require(\"../_lib/roundingMethods/index.js\");\n/**\n * @name differenceInWeeks\n * @category Week Helpers\n * @summary Get the number of full weeks between the given dates.\n *\n * @description\n * Get the number of full weeks between two dates. Fractional weeks are\n * truncated towards zero by default.\n *\n * One \"full week\" is the distance between a local time in one day to the same\n * local time 7 days earlier or later. A full week can sometimes be less than\n * or more than 7*24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 7*24-hour periods, use this instead:\n * `Math.floor(differenceInHours(dateLeft, dateRight)/(7*24))|0`.\n *\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of full weeks\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInWeeks(new Date(2014, 6, 20), new Date(2014, 6, 5))\n * //=> 2\n *\n * // How many full weeks are between\n * // 1 March 2020 0:00 and 6 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 8 weeks (54 days),\n * // even if DST starts and the period has\n * // only 54*24-1 hours.\n * const result = differenceInWeeks(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 6)\n * )\n * //=> 8\n */\nfunction differenceInWeeks(dateLeft, dateRight, options) {\n (0, _index2.default)(2, arguments);\n var diff = (0, _index.default)(dateLeft, dateRight) / 7;\n return (0, _index3.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInBusinessDays;\nvar _index = _interopRequireDefault(require(\"../addDays/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../differenceInCalendarDays/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../isSameDay/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../isValid/index.js\"));\nvar _index5 = _interopRequireDefault(require(\"../isWeekend/index.js\"));\nvar _index6 = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index7 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar _index8 = _interopRequireDefault(require(\"../_lib/toInteger/index.js\"));\n/**\n * @name differenceInBusinessDays\n * @category Day Helpers\n * @summary Get the number of business days between the given dates.\n *\n * @description\n * Get the number of business day periods between the given dates.\n * Business days being days that arent in the weekend.\n * Like `differenceInCalendarDays`, the function removes the times from\n * the dates before calculating the difference.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of business days\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many business days are between\n * // 10 January 2014 and 20 July 2014?\n * const result = differenceInBusinessDays(\n * new Date(2014, 6, 20),\n * new Date(2014, 0, 10)\n * )\n * //=> 136\n *\n * // How many business days are between\n * // 30 November 2021 and 1 November 2021?\n * const result = differenceInBusinessDays(\n * new Date(2021, 10, 30),\n * new Date(2021, 10, 1)\n * )\n * //=> 21\n *\n * // How many business days are between\n * // 1 November 2021 and 1 December 2021?\n * const result = differenceInBusinessDays(\n * new Date(2021, 10, 1),\n * new Date(2021, 11, 1)\n * )\n * //=> -22\n *\n * // How many business days are between\n * // 1 November 2021 and 1 November 2021 ?\n * const result = differenceInBusinessDays(\n * new Date(2021, 10, 1),\n * new Date(2021, 10, 1)\n * )\n * //=> 0\n */\nfunction differenceInBusinessDays(dirtyDateLeft, dirtyDateRight) {\n (0, _index7.default)(2, arguments);\n var dateLeft = (0, _index6.default)(dirtyDateLeft);\n var dateRight = (0, _index6.default)(dirtyDateRight);\n if (!(0, _index4.default)(dateLeft) || !(0, _index4.default)(dateRight)) return NaN;\n var calendarDifference = (0, _index2.default)(dateLeft, dateRight);\n var sign = calendarDifference < 0 ? -1 : 1;\n var weeks = (0, _index8.default)(calendarDifference / 7);\n var result = weeks * 5;\n dateRight = (0, _index.default)(dateRight, weeks * 7);\n\n // the loop below will run at most 6 times to account for the remaining days that don't makeup a full week\n while (!(0, _index3.default)(dateLeft, dateRight)) {\n // sign is used to account for both negative and positive differences\n result += (0, _index5.default)(dateRight) ? 0 : sign;\n dateRight = (0, _index.default)(dateRight, sign);\n }\n return result === 0 ? 0 : result;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInCalendarDays;\nvar _index = _interopRequireDefault(require(\"../_lib/getTimezoneOffsetInMilliseconds/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../startOfDay/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar MILLISECONDS_IN_DAY = 86400000;\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 {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n * @throws {TypeError} 2 arguments required\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 */\nfunction differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {\n (0, _index3.default)(2, arguments);\n var startOfDayLeft = (0, _index2.default)(dirtyDateLeft);\n var startOfDayRight = (0, _index2.default)(dirtyDateRight);\n var timestampLeft = startOfDayLeft.getTime() - (0, _index.default)(startOfDayLeft);\n var timestampRight = startOfDayRight.getTime() - (0, _index.default)(startOfDayRight);\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachWeekendOfMonth;\nvar _index = _interopRequireDefault(require(\"../eachWeekendOfInterval/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../startOfMonth/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../endOfMonth/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name eachWeekendOfMonth\n * @category Month Helpers\n * @summary List all the Saturdays and Sundays in the given month.\n *\n * @description\n * Get all the Saturdays and Sundays in the given month.\n *\n * @param {Date|Number} date - the given month\n * @returns {Date[]} an array containing all the Saturdays and Sundays\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} The passed date is invalid\n *\n * @example\n * // Lists all Saturdays and Sundays in the given month\n * const result = eachWeekendOfMonth(new Date(2022, 1, 1))\n * //=> [\n * // Sat Feb 05 2022 00:00:00,\n * // Sun Feb 06 2022 00:00:00,\n * // Sat Feb 12 2022 00:00:00,\n * // Sun Feb 13 2022 00:00:00,\n * // Sat Feb 19 2022 00:00:00,\n * // Sun Feb 20 2022 00:00:00,\n * // Sat Feb 26 2022 00:00:00,\n * // Sun Feb 27 2022 00:00:00\n * // ]\n */\nfunction eachWeekendOfMonth(dirtyDate) {\n (0, _index4.default)(1, arguments);\n var startDate = (0, _index2.default)(dirtyDate);\n if (isNaN(startDate.getTime())) throw new RangeError('The passed date is invalid');\n var endDate = (0, _index3.default)(dirtyDate);\n return (0, _index.default)({\n start: startDate,\n end: endDate\n });\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInCalendarQuarters;\nvar _index = _interopRequireDefault(require(\"../getQuarter/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name differenceInCalendarQuarters\n * @category Quarter Helpers\n * @summary Get the number of calendar quarters between the given dates.\n *\n * @description\n * Get the number of calendar quarters between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar quarters\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar quarters are between 31 December 2013 and 2 July 2014?\n * const result = differenceInCalendarQuarters(\n * new Date(2014, 6, 2),\n * new Date(2013, 11, 31)\n * )\n * //=> 3\n */\nfunction differenceInCalendarQuarters(dirtyDateLeft, dirtyDateRight) {\n (0, _index3.default)(2, arguments);\n var dateLeft = (0, _index2.default)(dirtyDateLeft);\n var dateRight = (0, _index2.default)(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var quarterDiff = (0, _index.default)(dateLeft) - (0, _index.default)(dateRight);\n return yearDiff * 4 + quarterDiff;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachWeekendOfYear;\nvar _index = _interopRequireDefault(require(\"../eachWeekendOfInterval/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../endOfYear/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../startOfYear/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name eachWeekendOfYear\n * @category Year Helpers\n * @summary List all the Saturdays and Sundays in the year.\n *\n * @description\n * Get all the Saturdays and Sundays in the year.\n *\n * @param {Date|Number} date - the given year\n * @returns {Date[]} an array containing all the Saturdays and Sundays\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} The passed date is invalid\n *\n * @example\n * // Lists all Saturdays and Sundays in the year\n * const result = eachWeekendOfYear(new Date(2020, 1, 1))\n * //=> [\n * // Sat Jan 03 2020 00:00:00,\n * // Sun Jan 04 2020 00:00:00,\n * // ...\n * // Sun Dec 27 2020 00:00:00\n * // ]\n * ]\n */\nfunction eachWeekendOfYear(dirtyDate) {\n (0, _index4.default)(1, arguments);\n var startDate = (0, _index3.default)(dirtyDate);\n var endDate = (0, _index2.default)(dirtyDate);\n return (0, _index.default)({\n start: startDate,\n end: endDate\n });\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachMinuteOfInterval;\nvar _index = _interopRequireDefault(require(\"../addMinutes/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../startOfMinute/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name eachMinuteOfInterval\n * @category Interval Helpers\n * @summary Return the array of minutes within the specified time interval.\n *\n * @description\n * Returns the array of minutes within the specified time interval.\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Number} [options.step=1] - the step to increment by. The step must be equal to or greater than 1\n * @throws {TypeError} 1 argument required\n * @returns {Date[]} the array with starts of minutes from the minute of the interval start to the minute of the interval end\n * @throws {RangeError} `options.step` must be a number equal to or greater than 1\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each minute between 14 October 2020, 13:00 and 14 October 2020, 13:03\n * const result = eachMinuteOfInterval({\n * start: new Date(2014, 9, 14, 13),\n * end: new Date(2014, 9, 14, 13, 3)\n * })\n * //=> [\n * // Wed Oct 14 2014 13:00:00,\n * // Wed Oct 14 2014 13:01:00,\n * // Wed Oct 14 2014 13:02:00,\n * // Wed Oct 14 2014 13:03:00\n * // ]\n */\nfunction eachMinuteOfInterval(interval, options) {\n var _options$step;\n (0, _index4.default)(1, arguments);\n var startDate = (0, _index3.default)((0, _index2.default)(interval.start));\n var endDate = (0, _index2.default)(interval.end);\n var startTime = startDate.getTime();\n var endTime = endDate.getTime();\n if (startTime >= endTime) {\n throw new RangeError('Invalid interval');\n }\n var dates = [];\n var currentDate = startDate;\n var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1);\n if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number equal to or greater than 1');\n while (currentDate.getTime() <= endTime) {\n dates.push((0, _index2.default)(currentDate));\n currentDate = (0, _index.default)(currentDate, step);\n }\n return dates;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = closestTo;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name closestTo\n * @category Common Helpers\n * @summary Return a date from the array closest to the given date.\n *\n * @description\n * Return a date from the array closest to the given date.\n *\n * @param {Date | Number} dateToCompare - the date to compare with\n * @param {Array | Array} datesArray - the array to search\n * @returns {Date | undefined} the date from the array closest to the given date or undefined if no valid value is given\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Which date is closer to 6 September 2015: 1 January 2000 or 1 January 2030?\n * const dateToCompare = new Date(2015, 8, 6)\n * const result = closestTo(dateToCompare, [\n * new Date(2000, 0, 1),\n * new Date(2030, 0, 1)\n * ])\n * //=> Tue Jan 01 2030 00:00:00\n */\nfunction closestTo(dirtyDateToCompare, dirtyDatesArray) {\n (0, _index2.default)(2, arguments);\n var dateToCompare = (0, _index.default)(dirtyDateToCompare);\n if (isNaN(Number(dateToCompare))) return new Date(NaN);\n var timeToCompare = dateToCompare.getTime();\n var datesArray;\n // `dirtyDatesArray` is undefined or null\n if (dirtyDatesArray == null) {\n datesArray = [];\n\n // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n } else if (typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray;\n\n // If `dirtyDatesArray` is Array-like Object, convert to Array. Otherwise, make it empty Array\n } else {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n }\n var result;\n var minDistance;\n datesArray.forEach(function (dirtyDate) {\n var currentDate = (0, _index.default)(dirtyDate);\n if (isNaN(Number(currentDate))) {\n result = new Date(NaN);\n minDistance = NaN;\n return;\n }\n var distance = Math.abs(timeToCompare - currentDate.getTime());\n if (result == null || distance < Number(minDistance)) {\n result = currentDate;\n minDistance = distance;\n }\n });\n return result;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInMilliseconds;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nfunction differenceInMilliseconds(dateLeft, dateRight) {\n (0, _index2.default)(2, arguments);\n return (0, _index.default)(dateLeft).getTime() - (0, _index.default)(dateRight).getTime();\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = compareDesc;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name compareDesc\n * @category Common Helpers\n * @summary Compare the two dates reverse chronologically and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return -1 if the first date is after the second,\n * 1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989 reverse chronologically:\n * const result = compareDesc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> 1\n *\n * @example\n * // Sort the array of dates in reverse chronological order:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareDesc)\n * //=> [\n * // Sun Jul 02 1995 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Wed Feb 11 1987 00:00:00\n * // ]\n */\nfunction compareDesc(dirtyDateLeft, dirtyDateRight) {\n (0, _index2.default)(2, arguments);\n var dateLeft = (0, _index.default)(dirtyDateLeft);\n var dateRight = (0, _index.default)(dirtyDateRight);\n var diff = dateLeft.getTime() - dateRight.getTime();\n if (diff > 0) {\n return -1;\n } else if (diff < 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInCalendarYears;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name differenceInCalendarYears\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar years\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInCalendarYears(\n * new Date(2015, 1, 11),\n * new Date(2013, 11, 31)\n * )\n * //=> 2\n */\nfunction differenceInCalendarYears(dirtyDateLeft, dirtyDateRight) {\n (0, _index2.default)(2, arguments);\n var dateLeft = (0, _index.default)(dirtyDateLeft);\n var dateRight = (0, _index.default)(dirtyDateRight);\n return dateLeft.getFullYear() - dateRight.getFullYear();\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInDays;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../differenceInCalendarDays/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n// Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\nfunction compareLocalAsc(dateLeft, dateRight) {\n var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full days according to the local timezone\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n//=> 92\n */\nfunction differenceInDays(dirtyDateLeft, dirtyDateRight) {\n (0, _index3.default)(2, arguments);\n var dateLeft = (0, _index.default)(dirtyDateLeft);\n var dateRight = (0, _index.default)(dirtyDateRight);\n var sign = compareLocalAsc(dateLeft, dateRight);\n var difference = Math.abs((0, _index2.default)(dateLeft, dateRight));\n dateLeft.setDate(dateLeft.getDate() - sign * difference);\n\n // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);\n var result = sign * (difference - isLastDayNotFull);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInCalendarISOWeeks;\nvar _index = _interopRequireDefault(require(\"../_lib/getTimezoneOffsetInMilliseconds/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../startOfISOWeek/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar MILLISECONDS_IN_WEEK = 604800000;\n\n/**\n * @name differenceInCalendarISOWeeks\n * @category ISO Week Helpers\n * @summary Get the number of calendar ISO weeks between the given dates.\n *\n * @description\n * Get the number of calendar ISO weeks between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar ISO weeks\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar ISO weeks are between 6 July 2014 and 21 July 2014?\n * const result = differenceInCalendarISOWeeks(\n * new Date(2014, 6, 21),\n * new Date(2014, 6, 6)\n * )\n * //=> 3\n */\nfunction differenceInCalendarISOWeeks(dirtyDateLeft, dirtyDateRight) {\n (0, _index3.default)(2, arguments);\n var startOfISOWeekLeft = (0, _index2.default)(dirtyDateLeft);\n var startOfISOWeekRight = (0, _index2.default)(dirtyDateRight);\n var timestampLeft = startOfISOWeekLeft.getTime() - (0, _index.default)(startOfISOWeekLeft);\n var timestampRight = startOfISOWeekRight.getTime() - (0, _index.default)(startOfISOWeekRight);\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInCalendarWeeks;\nvar _index = _interopRequireDefault(require(\"../startOfWeek/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/getTimezoneOffsetInMilliseconds/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar MILLISECONDS_IN_WEEK = 604800000;\n\n/**\n * @name differenceInCalendarWeeks\n * @category Week Helpers\n * @summary Get the number of calendar weeks between the given dates.\n *\n * @description\n * Get the number of calendar weeks between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Number} the number of calendar weeks\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // How many calendar weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5)\n * )\n * //=> 3\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5),\n * { weekStartsOn: 1 }\n * )\n * //=> 2\n */\nfunction differenceInCalendarWeeks(dirtyDateLeft, dirtyDateRight, options) {\n (0, _index3.default)(2, arguments);\n var startOfWeekLeft = (0, _index.default)(dirtyDateLeft, options);\n var startOfWeekRight = (0, _index.default)(dirtyDateRight, options);\n var timestampLeft = startOfWeekLeft.getTime() - (0, _index2.default)(startOfWeekLeft);\n var timestampRight = startOfWeekRight.getTime() - (0, _index2.default)(startOfWeekRight);\n\n // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachQuarterOfInterval;\nvar _index = _interopRequireDefault(require(\"../addQuarters/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../startOfQuarter/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name eachQuarterOfInterval\n * @category Interval Helpers\n * @summary Return the array of quarters within the specified time interval.\n *\n * @description\n * Return the array of quarters within the specified time interval.\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @returns {Date[]} the array with starts of quarters from the quarter of the interval start to the quarter of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each quarter within interval 6 February 2014 - 10 August 2014:\n * const result = eachQuarterOfInterval({\n * start: new Date(2014, 1, 6),\n * end: new Date(2014, 7, 10)\n * })\n * //=> [\n * // Wed Jan 01 2014 00:00:00,\n * // Tue Apr 01 2014 00:00:00,\n * // Tue Jul 01 2014 00:00:00,\n * // ]\n */\nfunction eachQuarterOfInterval(dirtyInterval) {\n (0, _index4.default)(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = (0, _index3.default)(interval.start);\n var endDate = (0, _index3.default)(interval.end);\n var endTime = endDate.getTime();\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(startDate.getTime() <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n var startDateQuarter = (0, _index2.default)(startDate);\n var endDateQuarter = (0, _index2.default)(endDate);\n endTime = endDateQuarter.getTime();\n var quarters = [];\n var currentQuarter = startDateQuarter;\n while (currentQuarter.getTime() <= endTime) {\n quarters.push((0, _index3.default)(currentQuarter));\n currentQuarter = (0, _index.default)(currentQuarter, 1);\n }\n return quarters;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = compareAsc;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nfunction compareAsc(dirtyDateLeft, dirtyDateRight) {\n (0, _index2.default)(2, arguments);\n var dateLeft = (0, _index.default)(dirtyDateLeft);\n var dateRight = (0, _index.default)(dirtyDateRight);\n var diff = dateLeft.getTime() - dateRight.getTime();\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInCalendarISOWeekYears;\nvar _index = _interopRequireDefault(require(\"../getISOWeekYear/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name differenceInCalendarISOWeekYears\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the number of calendar ISO week-numbering years between the given dates.\n *\n * @description\n * Get the number of calendar ISO week-numbering years between the given dates.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar ISO week-numbering years\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012?\n * const result = differenceInCalendarISOWeekYears(\n * new Date(2012, 0, 1),\n * new Date(2010, 0, 1)\n * )\n * //=> 2\n */\nfunction differenceInCalendarISOWeekYears(dirtyDateLeft, dirtyDateRight) {\n (0, _index2.default)(2, arguments);\n return (0, _index.default)(dirtyDateLeft) - (0, _index.default)(dirtyDateRight);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachMonthOfInterval;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\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 * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @returns {Date[]} the array with starts of months from the month of the interval start to the month of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\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 */\nfunction eachMonthOfInterval(dirtyInterval) {\n (0, _index2.default)(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = (0, _index.default)(interval.start);\n var endDate = (0, _index.default)(interval.end);\n var endTime = endDate.getTime();\n var dates = [];\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(startDate.getTime() <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n var currentDate = startDate;\n currentDate.setHours(0, 0, 0, 0);\n currentDate.setDate(1);\n while (currentDate.getTime() <= endTime) {\n dates.push((0, _index.default)(currentDate));\n currentDate.setMonth(currentDate.getMonth() + 1);\n }\n return dates;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInMinutes;\nvar _index = require(\"../constants/index.js\");\nvar _index2 = _interopRequireDefault(require(\"../differenceInMilliseconds/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar _index4 = require(\"../_lib/roundingMethods/index.js\");\n/**\n * @name differenceInMinutes\n * @category Minute Helpers\n * @summary Get the number of minutes between the given dates.\n *\n * @description\n * Get the signed number of full (rounded towards 0) minutes between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of minutes\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\n * const result = differenceInMinutes(\n * new Date(2014, 6, 2, 12, 20, 0),\n * new Date(2014, 6, 2, 12, 7, 59)\n * )\n * //=> 12\n *\n * @example\n * // How many minutes are between 10:01:59 and 10:00:00\n * const result = differenceInMinutes(\n * new Date(2000, 0, 1, 10, 0, 0),\n * new Date(2000, 0, 1, 10, 1, 59)\n * )\n * //=> -1\n */\nfunction differenceInMinutes(dateLeft, dateRight, options) {\n (0, _index3.default)(2, arguments);\n var diff = (0, _index2.default)(dateLeft, dateRight) / _index.millisecondsInMinute;\n return (0, _index4.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachWeekendOfInterval;\nvar _index = _interopRequireDefault(require(\"../eachDayOfInterval/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../isSunday/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../isWeekend/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name eachWeekendOfInterval\n * @category Interval Helpers\n * @summary List all the Saturdays and Sundays in the given date interval.\n *\n * @description\n * Get all the Saturdays and Sundays in the given date interval.\n *\n * @param {Interval} interval - the given interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @returns {Date[]} an array containing all the Saturdays and Sundays\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Lists all Saturdays and Sundays in the given date interval\n * const result = eachWeekendOfInterval({\n * start: new Date(2018, 8, 17),\n * end: new Date(2018, 8, 30)\n * })\n * //=> [\n * // Sat Sep 22 2018 00:00:00,\n * // Sun Sep 23 2018 00:00:00,\n * // Sat Sep 29 2018 00:00:00,\n * // Sun Sep 30 2018 00:00:00\n * // ]\n */\nfunction eachWeekendOfInterval(interval) {\n (0, _index4.default)(1, arguments);\n var dateInterval = (0, _index.default)(interval);\n var weekends = [];\n var index = 0;\n while (index < dateInterval.length) {\n var date = dateInterval[index++];\n if ((0, _index3.default)(date)) {\n weekends.push(date);\n if ((0, _index2.default)(date)) index = index + 5;\n }\n }\n return weekends;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInHours;\nvar _index = require(\"../constants/index.js\");\nvar _index2 = _interopRequireDefault(require(\"../differenceInMilliseconds/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar _index4 = require(\"../_lib/roundingMethods/index.js\");\n/**\n * @name differenceInHours\n * @category Hour Helpers\n * @summary Get the number of hours between the given dates.\n *\n * @description\n * Get the number of hours between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of hours\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\n * const result = differenceInHours(\n * new Date(2014, 6, 2, 19, 0),\n * new Date(2014, 6, 2, 6, 50)\n * )\n * //=> 12\n */\nfunction differenceInHours(dateLeft, dateRight, options) {\n (0, _index3.default)(2, arguments);\n var diff = (0, _index2.default)(dateLeft, dateRight) / _index.millisecondsInHour;\n return (0, _index4.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachHourOfInterval;\nvar _index = _interopRequireDefault(require(\"../addHours/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name eachHourOfInterval\n * @category Interval Helpers\n * @summary Return the array of hours within the specified time interval.\n *\n * @description\n * Return the array of hours within the specified time interval.\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1.\n * @returns {Date[]} the array with starts of hours from the hour of the interval start to the hour of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.step` must be a number greater than 1\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each hour between 6 October 2014, 12:00 and 6 October 2014, 15:00\n * const result = eachHourOfInterval({\n * start: new Date(2014, 9, 6, 12),\n * end: new Date(2014, 9, 6, 15)\n * })\n * //=> [\n * // Mon Oct 06 2014 12:00:00,\n * // Mon Oct 06 2014 13:00:00,\n * // Mon Oct 06 2014 14:00:00,\n * // Mon Oct 06 2014 15:00:00\n * // ]\n */\nfunction eachHourOfInterval(dirtyInterval, options) {\n var _options$step;\n (0, _index3.default)(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = (0, _index2.default)(interval.start);\n var endDate = (0, _index2.default)(interval.end);\n var startTime = startDate.getTime();\n var endTime = endDate.getTime();\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(startTime <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n var dates = [];\n var currentDate = startDate;\n currentDate.setMinutes(0, 0, 0);\n var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1);\n if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1');\n while (currentDate.getTime() <= endTime) {\n dates.push((0, _index2.default)(currentDate));\n currentDate = (0, _index.default)(currentDate, step);\n }\n return dates;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInQuarters;\nvar _index = _interopRequireDefault(require(\"../differenceInMonths/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar _index3 = require(\"../_lib/roundingMethods/index.js\");\n/**\n * @name differenceInQuarters\n * @category Quarter Helpers\n * @summary Get the number of quarters between the given dates.\n *\n * @description\n * Get the number of quarters between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of full quarters\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full quarters are between 31 December 2013 and 2 July 2014?\n * const result = differenceInQuarters(new Date(2014, 6, 2), new Date(2013, 11, 31))\n * //=> 2\n */\nfunction differenceInQuarters(dateLeft, dateRight, options) {\n (0, _index2.default)(2, arguments);\n var diff = (0, _index.default)(dateLeft, dateRight) / 3;\n return (0, _index3.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInSeconds;\nvar _index = _interopRequireDefault(require(\"../differenceInMilliseconds/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar _index3 = require(\"../_lib/roundingMethods/index.js\");\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nfunction differenceInSeconds(dateLeft, dateRight, options) {\n (0, _index2.default)(2, arguments);\n var diff = (0, _index.default)(dateLeft, dateRight) / 1000;\n return (0, _index3.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInMonths;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../differenceInCalendarMonths/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../compareAsc/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar _index5 = _interopRequireDefault(require(\"../isLastDayOfMonth/index.js\"));\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nfunction differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n (0, _index4.default)(2, arguments);\n var dateLeft = (0, _index.default)(dirtyDateLeft);\n var dateRight = (0, _index.default)(dirtyDateRight);\n var sign = (0, _index3.default)(dateLeft, dateRight);\n var difference = Math.abs((0, _index2.default)(dateLeft, dateRight));\n var result;\n\n // Check for the difference of less than month\n if (difference < 1) {\n result = 0;\n } else {\n if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n dateLeft.setDate(30);\n }\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference);\n\n // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastMonthNotFull = (0, _index3.default)(dateLeft, dateRight) === -sign;\n\n // Check for cases of one full calendar month\n if ((0, _index5.default)((0, _index.default)(dirtyDateLeft)) && difference === 1 && (0, _index3.default)(dirtyDateLeft, dateRight) === 1) {\n isLastMonthNotFull = false;\n }\n result = sign * (difference - Number(isLastMonthNotFull));\n }\n\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = differenceInYears;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../differenceInCalendarYears/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../compareAsc/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name differenceInYears\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full years\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31))\n * //=> 1\n */\nfunction differenceInYears(dirtyDateLeft, dirtyDateRight) {\n (0, _index4.default)(2, arguments);\n var dateLeft = (0, _index.default)(dirtyDateLeft);\n var dateRight = (0, _index.default)(dirtyDateRight);\n var sign = (0, _index3.default)(dateLeft, dateRight);\n var difference = Math.abs((0, _index2.default)(dateLeft, dateRight));\n\n // Set both dates to a valid leap year for accurate comparison when dealing\n // with leap days\n dateLeft.setFullYear(1584);\n dateRight.setFullYear(1584);\n\n // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full\n // If so, result must be decreased by 1 in absolute value\n var isLastYearNotFull = (0, _index3.default)(dateLeft, dateRight) === -sign;\n var result = sign * (difference - Number(isLastYearNotFull));\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachDayOfInterval;\nvar _index = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name eachDayOfInterval\n * @category Interval Helpers\n * @summary Return the array of dates within the specified time interval.\n *\n * @description\n * Return the array of dates within the specified time interval.\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1.\n * @returns {Date[]} the array with starts of days from the day of the interval start to the day of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.step` must be a number greater than 1\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * const result = eachDayOfInterval({\n * start: new Date(2014, 9, 6),\n * end: new Date(2014, 9, 10)\n * })\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\nfunction eachDayOfInterval(dirtyInterval, options) {\n var _options$step;\n (0, _index2.default)(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = (0, _index.default)(interval.start);\n var endDate = (0, _index.default)(interval.end);\n var endTime = endDate.getTime();\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(startDate.getTime() <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n var dates = [];\n var currentDate = startDate;\n currentDate.setHours(0, 0, 0, 0);\n var step = Number((_options$step = options === null || options === void 0 ? void 0 : options.step) !== null && _options$step !== void 0 ? _options$step : 1);\n if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1');\n while (currentDate.getTime() <= endTime) {\n dates.push((0, _index.default)(currentDate));\n currentDate.setDate(currentDate.getDate() + step);\n currentDate.setHours(0, 0, 0, 0);\n }\n return dates;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = eachWeekOfInterval;\nvar _index = _interopRequireDefault(require(\"../addWeeks/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../startOfWeek/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../toDate/index.js\"));\nvar _index4 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name eachWeekOfInterval\n * @category Interval Helpers\n * @summary Return the array of weeks within the specified time interval.\n *\n * @description\n * Return the array of weeks within the specified time interval.\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date[]} the array with starts of weeks from the week of the interval start to the week of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be 0, 1, ..., 6\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each week within interval 6 October 2014 - 23 November 2014:\n * const result = eachWeekOfInterval({\n * start: new Date(2014, 9, 6),\n * end: new Date(2014, 10, 23)\n * })\n * //=> [\n * // Sun Oct 05 2014 00:00:00,\n * // Sun Oct 12 2014 00:00:00,\n * // Sun Oct 19 2014 00:00:00,\n * // Sun Oct 26 2014 00:00:00,\n * // Sun Nov 02 2014 00:00:00,\n * // Sun Nov 09 2014 00:00:00,\n * // Sun Nov 16 2014 00:00:00,\n * // Sun Nov 23 2014 00:00:00\n * // ]\n */\nfunction eachWeekOfInterval(dirtyInterval, options) {\n (0, _index4.default)(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = (0, _index3.default)(interval.start);\n var endDate = (0, _index3.default)(interval.end);\n var endTime = endDate.getTime();\n\n // Throw an exception if start date is after end date or if any date is `Invalid Date`\n if (!(startDate.getTime() <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n var startDateWeek = (0, _index2.default)(startDate, options);\n var endDateWeek = (0, _index2.default)(endDate, options);\n\n // Some timezones switch DST at midnight, making start of day unreliable in these timezones, 3pm is a safe bet\n startDateWeek.setHours(15);\n endDateWeek.setHours(15);\n endTime = endDateWeek.getTime();\n var weeks = [];\n var currentWeek = startDateWeek;\n while (currentWeek.getTime() <= endTime) {\n currentWeek.setHours(0);\n weeks.push((0, _index3.default)(currentWeek));\n currentWeek = (0, _index.default)(currentWeek, 1);\n currentWeek.setHours(15);\n }\n return weeks;\n}\nmodule.exports = exports.default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.secondsInYear = exports.secondsInWeek = exports.secondsInQuarter = exports.secondsInMonth = exports.secondsInMinute = exports.secondsInHour = exports.secondsInDay = exports.quartersInYear = exports.monthsInYear = exports.monthsInQuarter = exports.minutesInHour = exports.minTime = exports.millisecondsInSecond = exports.millisecondsInMinute = exports.millisecondsInHour = exports.maxTime = exports.daysInYear = exports.daysInWeek = void 0;\n/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nvar daysInWeek = 7;\n\n/**\n * Days in 1 year\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n *\n * @name daysInYear\n * @constant\n * @type {number}\n * @default\n */\nexports.daysInWeek = daysInWeek;\nvar daysInYear = 365.2425;\n\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\nexports.daysInYear = daysInYear;\nvar maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexports.maxTime = maxTime;\nvar millisecondsInMinute = 60000;\n\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexports.millisecondsInMinute = millisecondsInMinute;\nvar millisecondsInHour = 3600000;\n\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\nexports.millisecondsInHour = millisecondsInHour;\nvar millisecondsInSecond = 1000;\n\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\nexports.millisecondsInSecond = millisecondsInSecond;\nvar minTime = -maxTime;\n\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\nexports.minTime = minTime;\nvar minutesInHour = 60;\n\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexports.minutesInHour = minutesInHour;\nvar monthsInQuarter = 3;\n\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\nexports.monthsInQuarter = monthsInQuarter;\nvar monthsInYear = 12;\n\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\nexports.monthsInYear = monthsInYear;\nvar quartersInYear = 4;\n\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\nexports.quartersInYear = quartersInYear;\nvar secondsInHour = 3600;\n\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\nexports.secondsInHour = secondsInHour;\nvar secondsInMinute = 60;\n\n/**\n * Seconds in 1 day\n *\n * @name secondsInDay\n * @constant\n * @type {number}\n * @default\n */\nexports.secondsInMinute = secondsInMinute;\nvar secondsInDay = secondsInHour * 24;\n\n/**\n * Seconds in 1 week\n *\n * @name secondsInWeek\n * @constant\n * @type {number}\n * @default\n */\nexports.secondsInDay = secondsInDay;\nvar secondsInWeek = secondsInDay * 7;\n\n/**\n * Seconds in 1 year\n *\n * @name secondsInYear\n * @constant\n * @type {number}\n * @default\n */\nexports.secondsInWeek = secondsInWeek;\nvar secondsInYear = secondsInDay * daysInYear;\n\n/**\n * Seconds in 1 month\n *\n * @name secondsInMonth\n * @constant\n * @type {number}\n * @default\n */\nexports.secondsInYear = secondsInYear;\nvar secondsInMonth = secondsInYear / 12;\n\n/**\n * Seconds in 1 quarter\n *\n * @name secondsInQuarter\n * @constant\n * @type {number}\n * @default\n */\nexports.secondsInMonth = secondsInMonth;\nvar secondsInQuarter = secondsInMonth * 3;\nexports.secondsInQuarter = secondsInQuarter;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = daysToWeeks;\nvar _index = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\nvar _index2 = require(\"../constants/index.js\");\n/**\n * @name daysToWeeks\n * @category Conversion Helpers\n * @summary Convert days to weeks.\n *\n * @description\n * Convert a number of days to a full number of weeks.\n *\n * @param {number} days - number of days to be converted\n *\n * @returns {number} the number of days converted in weeks\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Convert 14 days to weeks:\n * const result = daysToWeeks(14)\n * //=> 2\n *\n * @example\n * // It uses floor rounding:\n * const result = daysToWeeks(13)\n * //=> 1\n */\nfunction daysToWeeks(days) {\n (0, _index.default)(1, arguments);\n var weeks = days / _index2.daysInWeek;\n return Math.floor(weeks);\n}\nmodule.exports = exports.default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = clamp;\nvar _index = _interopRequireDefault(require(\"../max/index.js\"));\nvar _index2 = _interopRequireDefault(require(\"../min/index.js\"));\nvar _index3 = _interopRequireDefault(require(\"../_lib/requiredArgs/index.js\"));\n/**\n * @name clamp\n * @category Interval Helpers\n * @summary Return a date bounded by the start and the end of the given interval\n *\n * @description\n * Clamps a date to the lower bound with the start of the interval and the upper\n * bound with the end of the interval.\n *\n * - When the date is less than the start of the interval, the start is returned.\n * - When the date is greater than the end of the interval, the end is returned.\n * - Otherwise the date is returned.\n *\n * @example\n * // What is Mar, 21, 2021 bounded to an interval starting at Mar, 22, 2021 and ending at Apr, 01, 2021\n * const result = clamp(new Date(2021, 2, 21), {\n * start: new Date(2021, 2, 22),\n * end: new Date(2021, 3, 1),\n * })\n * //=> Mon Mar 22 2021 00:00:00\n *\n * @param {Date | Number} date - the date to be bounded\n * @param {Interval} interval - the interval to bound to\n * @returns {Date} the date bounded by the start and the end of the interval\n * @throws {TypeError} 2 arguments required\n */\nfunction clamp(date, _ref) {\n var start = _ref.start,\n end = _ref.end;\n (0, _index3.default)(2, arguments);\n return (0, _index2.default)([(0, _index.default)([date, start]), end]);\n}\nmodule.exports = exports.default;"],"names":["_interopRequireDefault","require","Object","defineProperty","exports","value","dirtyDateToCompare","dirtyDatesArray","_index2","default","arguments","dateToCompare","_index","isNaN","Number","NaN","result","minDistance","timeToCompare","getTime","forEach","Array","prototype","slice","call","dirtyDate","index","currentDate","distance","Math","abs","module","dirtyDateLeft","dirtyDateRight","dateLeft","dateRight","getFullYear","getMonth","_index5","sign","_index3","difference","_index4","dirtyInterval","interval","startDate","start","endTime","end","RangeError","dates","setHours","setMonth","push","setFullYear","options","diff","getRoundingMethod","roundingMethod","_index7","_index6","calendarDifference","weeks","_index8","startOfDayLeft","startOfDayRight","timestampLeft","timestampRight","round","MILLISECONDS_IN_DAY","endDate","_options$step","startTime","step","Date","compareLocalAsc","setDate","getDate","getHours","getMinutes","getSeconds","getMilliseconds","startOfISOWeekLeft","startOfISOWeekRight","MILLISECONDS_IN_WEEK","startOfWeekLeft","startOfWeekRight","startDateQuarter","quarters","currentQuarter","millisecondsInMinute","dateInterval","weekends","length","date","millisecondsInHour","setMinutes","isLastMonthNotFull","isLastYearNotFull","startDateWeek","endDateWeek","currentWeek","secondsInYear","secondsInWeek","secondsInQuarter","secondsInMonth","secondsInMinute","secondsInHour","secondsInDay","quartersInYear","monthsInYear","monthsInQuarter","minutesInHour","minTime","millisecondsInSecond","maxTime","daysInYear","daysInWeek","pow","days","floor","_ref"],"sourceRoot":""}