{"ast":null,"code":"import { toDate } from \"./toDate.mjs\";\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 *\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) {\n  let result;\n  dates.forEach(function (dirtyDate) {\n    const currentDate = toDate(dirtyDate);\n    if (result === undefined || result < currentDate || isNaN(Number(currentDate))) {\n      result = currentDate;\n    }\n  });\n  return result || new Date(NaN);\n}\n\n// Fallback for modularized imports:\nexport default max;","map":{"version":3,"names":["toDate","max","dates","result","forEach","dirtyDate","currentDate","undefined","isNaN","Number","Date","NaN"],"sources":["/root/rfcontavagas_hom/12.-Servidor-local-Docker/Front-Parking-Angular/node_modules/date-fns/max.mjs"],"sourcesContent":["import { toDate } from \"./toDate.mjs\";\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 *\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) {\n  let result;\n  dates.forEach(function (dirtyDate) {\n    const currentDate = toDate(dirtyDate);\n\n    if (\n      result === undefined ||\n      result < currentDate ||\n      isNaN(Number(currentDate))\n    ) {\n      result = currentDate;\n    }\n  });\n\n  return result || new Date(NaN);\n}\n\n// Fallback for modularized imports:\nexport default max;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,GAAGA,CAACC,KAAK,EAAE;EACzB,IAAIC,MAAM;EACVD,KAAK,CAACE,OAAO,CAAC,UAAUC,SAAS,EAAE;IACjC,MAAMC,WAAW,GAAGN,MAAM,CAACK,SAAS,CAAC;IAErC,IACEF,MAAM,KAAKI,SAAS,IACpBJ,MAAM,GAAGG,WAAW,IACpBE,KAAK,CAACC,MAAM,CAACH,WAAW,CAAC,CAAC,EAC1B;MACAH,MAAM,GAAGG,WAAW;IACtB;EACF,CAAC,CAAC;EAEF,OAAOH,MAAM,IAAI,IAAIO,IAAI,CAACC,GAAG,CAAC;AAChC;;AAEA;AACA,eAAeV,GAAG","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}