{"ast":null,"code":"import { toDate } from \"./toDate.mjs\";\nimport { addLeadingZeros } from \"./_lib/addLeadingZeros.mjs\";\n\n/**\n * The {@link formatISO} function options.\n */\n\n/**\n * @name formatISO\n * @category Common Helpers\n * @summary Format the date according to the ISO 8601 standard (https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003169814.htm).\n *\n * @description\n * Return the formatted date string in ISO 8601 format. Options may be passed to control the parts and notations of the date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param options - An object with options.\n *\n * @returns The formatted date string (in loca.l time zone)\n *\n * @throws `date` must not be Invalid Date\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52))\n * //=> '2019-09-18T19:00:52Z'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601, short format (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' })\n * //=> '20190918T190052'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format, date only:\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' })\n * //=> '2019-09-18'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format, time only (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' })\n * //=> '19:00:52Z'\n */\nexport function formatISO(date, options) {\n  const _date = toDate(date);\n  if (isNaN(_date.getTime())) {\n    throw new RangeError(\"Invalid time value\");\n  }\n  const format = options?.format ?? \"extended\";\n  const representation = options?.representation ?? \"complete\";\n  let result = \"\";\n  let tzOffset = \"\";\n  const dateDelimiter = format === \"extended\" ? \"-\" : \"\";\n  const timeDelimiter = format === \"extended\" ? \":\" : \"\";\n\n  // Representation is either 'date' or 'complete'\n  if (representation !== \"time\") {\n    const day = addLeadingZeros(_date.getDate(), 2);\n    const month = addLeadingZeros(_date.getMonth() + 1, 2);\n    const year = addLeadingZeros(_date.getFullYear(), 4);\n\n    // yyyyMMdd or yyyy-MM-dd.\n    result = `${year}${dateDelimiter}${month}${dateDelimiter}${day}`;\n  }\n\n  // Representation is either 'time' or 'complete'\n  if (representation !== \"date\") {\n    // Add the timezone.\n    const offset = _date.getTimezoneOffset();\n    if (offset !== 0) {\n      const absoluteOffset = Math.abs(offset);\n      const hourOffset = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);\n      const minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);\n      // If less than 0, the sign is +, because it is ahead of time.\n      const sign = offset < 0 ? \"+\" : \"-\";\n      tzOffset = `${sign}${hourOffset}:${minuteOffset}`;\n    } else {\n      tzOffset = \"Z\";\n    }\n    const hour = addLeadingZeros(_date.getHours(), 2);\n    const minute = addLeadingZeros(_date.getMinutes(), 2);\n    const second = addLeadingZeros(_date.getSeconds(), 2);\n\n    // If there's also date, separate it with time with 'T'\n    const separator = result === \"\" ? \"\" : \"T\";\n\n    // Creates a time string consisting of hour, minute, and second, separated by delimiters, if defined.\n    const time = [hour, minute, second].join(timeDelimiter);\n\n    // HHmmss or HH:mm:ss.\n    result = `${result}${separator}${time}${tzOffset}`;\n  }\n  return result;\n}\n\n// Fallback for modularized imports:\nexport default formatISO;","map":{"version":3,"names":["toDate","addLeadingZeros","formatISO","date","options","_date","isNaN","getTime","RangeError","format","representation","result","tzOffset","dateDelimiter","timeDelimiter","day","getDate","month","getMonth","year","getFullYear","offset","getTimezoneOffset","absoluteOffset","Math","abs","hourOffset","trunc","minuteOffset","sign","hour","getHours","minute","getMinutes","second","getSeconds","separator","time","join"],"sources":["/root/rfcontavagas_hom/12.-Servidor-local-Docker/Front-Parking-Angular/node_modules/date-fns/formatISO.mjs"],"sourcesContent":["import { toDate } from \"./toDate.mjs\";\nimport { addLeadingZeros } from \"./_lib/addLeadingZeros.mjs\";\n\n/**\n * The {@link formatISO} function options.\n */\n\n/**\n * @name formatISO\n * @category Common Helpers\n * @summary Format the date according to the ISO 8601 standard (https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003169814.htm).\n *\n * @description\n * Return the formatted date string in ISO 8601 format. Options may be passed to control the parts and notations of the date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n * @param options - An object with options.\n *\n * @returns The formatted date string (in loca.l time zone)\n *\n * @throws `date` must not be Invalid Date\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52))\n * //=> '2019-09-18T19:00:52Z'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601, short format (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' })\n * //=> '20190918T190052'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format, date only:\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' })\n * //=> '2019-09-18'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format, time only (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' })\n * //=> '19:00:52Z'\n */\nexport function formatISO(date, options) {\n  const _date = toDate(date);\n\n  if (isNaN(_date.getTime())) {\n    throw new RangeError(\"Invalid time value\");\n  }\n\n  const format = options?.format ?? \"extended\";\n  const representation = options?.representation ?? \"complete\";\n\n  let result = \"\";\n  let tzOffset = \"\";\n\n  const dateDelimiter = format === \"extended\" ? \"-\" : \"\";\n  const timeDelimiter = format === \"extended\" ? \":\" : \"\";\n\n  // Representation is either 'date' or 'complete'\n  if (representation !== \"time\") {\n    const day = addLeadingZeros(_date.getDate(), 2);\n    const month = addLeadingZeros(_date.getMonth() + 1, 2);\n    const year = addLeadingZeros(_date.getFullYear(), 4);\n\n    // yyyyMMdd or yyyy-MM-dd.\n    result = `${year}${dateDelimiter}${month}${dateDelimiter}${day}`;\n  }\n\n  // Representation is either 'time' or 'complete'\n  if (representation !== \"date\") {\n    // Add the timezone.\n    const offset = _date.getTimezoneOffset();\n\n    if (offset !== 0) {\n      const absoluteOffset = Math.abs(offset);\n      const hourOffset = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);\n      const minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);\n      // If less than 0, the sign is +, because it is ahead of time.\n      const sign = offset < 0 ? \"+\" : \"-\";\n\n      tzOffset = `${sign}${hourOffset}:${minuteOffset}`;\n    } else {\n      tzOffset = \"Z\";\n    }\n\n    const hour = addLeadingZeros(_date.getHours(), 2);\n    const minute = addLeadingZeros(_date.getMinutes(), 2);\n    const second = addLeadingZeros(_date.getSeconds(), 2);\n\n    // If there's also date, separate it with time with 'T'\n    const separator = result === \"\" ? \"\" : \"T\";\n\n    // Creates a time string consisting of hour, minute, and second, separated by delimiters, if defined.\n    const time = [hour, minute, second].join(timeDelimiter);\n\n    // HHmmss or HH:mm:ss.\n    result = `${result}${separator}${time}${tzOffset}`;\n  }\n\n  return result;\n}\n\n// Fallback for modularized imports:\nexport default formatISO;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,SAASC,eAAe,QAAQ,4BAA4B;;AAE5D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,SAASA,CAACC,IAAI,EAAEC,OAAO,EAAE;EACvC,MAAMC,KAAK,GAAGL,MAAM,CAACG,IAAI,CAAC;EAE1B,IAAIG,KAAK,CAACD,KAAK,CAACE,OAAO,CAAC,CAAC,CAAC,EAAE;IAC1B,MAAM,IAAIC,UAAU,CAAC,oBAAo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