{"version":3,"file":"index-BUjD_Fc3.js","sources":["../../../node_modules/date-fns/esm/addDays/index.js","../../../node_modules/date-fns/esm/addMonths/index.js","../../../node_modules/date-fns/esm/add/index.js"],"sourcesContent":["import toInteger from '../_lib/toInteger/index.js';\nimport toDate from '../toDate/index.js';\nimport requiredArgs from '../_lib/requiredArgs/index.js';\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 * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the days added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * var result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var amount = toInteger(dirtyAmount);\n\n  if (isNaN(amount)) {\n    return new Date(NaN);\n  }\n\n  if (!amount) {\n    // If 0 days, no-op to avoid changing times in the hour before end of DST\n    return date;\n  }\n\n  date.setDate(date.getDate() + amount);\n  return date;\n}","import toInteger from '../_lib/toInteger/index.js';\nimport toDate from '../toDate/index.js';\nimport requiredArgs from '../_lib/requiredArgs/index.js';\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 * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * var result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var amount = toInteger(dirtyAmount);\n\n  if (isNaN(amount)) {\n    return new Date(NaN);\n  }\n\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\n  var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n  // month, day, etc. For example, new Date(2020, 1, 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\n  var endOfDesiredMonth = new Date(date.getTime());\n  endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n  var daysInMonth = endOfDesiredMonth.getDate();\n\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(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n    return date;\n  }\n}","import addDays from '../addDays/index.js';\nimport addMonths from '../addMonths/index.js';\nimport toDate from '../toDate/index.js';\nimport requiredArgs from '../_lib/requiredArgs/index.js';\nimport toInteger from '../_lib/toInteger/index.js';\n/**\n * @name add\n * @category Common Helpers\n * @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @description\n * Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n *\n * | Key            | Description                        |\n * |----------------|------------------------------------|\n * | years          | Amount of years to be added        |\n * | months         | Amount of months to be added       |\n * | weeks          | Amount of weeks to be added       |\n * | days           | Amount of days to be added         |\n * | hours          | Amount of hours to be added        |\n * | minutes        | Amount of minutes to be added      |\n * | seconds        | Amount of seconds to be added      |\n *\n * All values default to 0\n *\n * @returns {Date} the new date with the seconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add the following duration to 1 September 2014, 10:19:50\n * var result = add(new Date(2014, 8, 1, 10, 19, 50), {\n *   years: 2,\n *   months: 9,\n *   weeks: 1,\n *   days: 7,\n *   hours: 5,\n *   minutes: 9,\n *   seconds: 30,\n * })\n * //=> Thu Jun 15 2017 15:29:20\n */\n\nexport default function add(dirtyDate, duration) {\n  requiredArgs(2, arguments);\n  if (!duration || typeof duration !== 'object') return new Date(NaN);\n  var years = 'years' in duration ? toInteger(duration.years) : 0;\n  var months = 'months' in duration ? toInteger(duration.months) : 0;\n  var weeks = 'weeks' in duration ? toInteger(duration.weeks) : 0;\n  var days = 'days' in duration ? toInteger(duration.days) : 0;\n  var hours = 'hours' in duration ? toInteger(duration.hours) : 0;\n  var minutes = 'minutes' in duration ? toInteger(duration.minutes) : 0;\n  var seconds = 'seconds' in duration ? toInteger(duration.seconds) : 0; // Add years and months\n\n  var date = toDate(dirtyDate);\n  var dateWithMonths = months || years ? addMonths(date, months + years * 12) : date; // Add weeks and days\n\n  var dateWithDays = days || weeks ? addDays(dateWithMonths, days + weeks * 7) : dateWithMonths; // Add days, hours, minutes and seconds\n\n  var minutesToAdd = minutes + hours * 60;\n  var secondsToAdd = seconds + minutesToAdd * 60;\n  var msToAdd = secondsToAdd * 1000;\n  var finalDate = new Date(dateWithDays.getTime() + msToAdd);\n  return finalDate;\n}"],"names":["addDays","dirtyDate","dirtyAmount","requiredArgs","date","toDate","amount","toInteger","addMonths","dayOfMonth","endOfDesiredMonth","daysInMonth","add","duration","years","months","weeks","days","hours","minutes","seconds","dateWithMonths","dateWithDays","minutesToAdd","secondsToAdd","msToAdd","finalDate"],"mappings":"sDA0Be,SAASA,EAAQC,EAAWC,EAAa,CACtDC,EAAa,EAAG,SAAS,EACzB,IAAIC,EAAOC,EAAOJ,CAAS,EACvBK,EAASC,EAAUL,CAAW,EAElC,OAAI,MAAMI,CAAM,EACP,IAAI,KAAK,GAAG,GAGhBA,GAKLF,EAAK,QAAQA,EAAK,QAAO,EAAKE,CAAM,EAC7BF,EACT,CChBe,SAASI,EAAUP,EAAWC,EAAa,CACxDC,EAAa,EAAG,SAAS,EACzB,IAAIC,EAAOC,EAAOJ,CAAS,EACvBK,EAASC,EAAUL,CAAW,EAElC,GAAI,MAAMI,CAAM,EACd,OAAO,IAAI,KAAK,GAAG,EAGrB,GAAI,CAACA,EAEH,OAAOF,EAGT,IAAIK,EAAaL,EAAK,UASlBM,EAAoB,IAAI,KAAKN,EAAK,QAAO,CAAE,EAC/CM,EAAkB,SAASN,EAAK,SAAU,EAAGE,EAAS,EAAG,CAAC,EAC1D,IAAIK,EAAcD,EAAkB,QAAS,EAE7C,OAAID,GAAcE,EAGTD,GASPN,EAAK,YAAYM,EAAkB,YAAa,EAAEA,EAAkB,SAAU,EAAED,CAAU,EACnFL,EAEX,CCvBe,SAASQ,EAAIX,EAAWY,EAAU,CAE/C,GADAV,EAAa,EAAG,SAAS,EACrB,CAACU,GAAY,OAAOA,GAAa,SAAU,OAAO,IAAI,KAAK,GAAG,EAClE,IAAIC,EAAQ,UAAWD,EAAWN,EAAUM,EAAS,KAAK,EAAI,EAC1DE,E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