{"ast":null,"code":"const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"moins d’une seconde\",\n    other: \"moins de {{count}} secondes\"\n  },\n  xSeconds: {\n    one: \"1 seconde\",\n    other: \"{{count}} secondes\"\n  },\n  halfAMinute: \"30 secondes\",\n  lessThanXMinutes: {\n    one: \"moins d’une minute\",\n    other: \"moins de {{count}} minutes\"\n  },\n  xMinutes: {\n    one: \"1 minute\",\n    other: \"{{count}} minutes\"\n  },\n  aboutXHours: {\n    one: \"environ 1 heure\",\n    other: \"environ {{count}} heures\"\n  },\n  xHours: {\n    one: \"1 heure\",\n    other: \"{{count}} heures\"\n  },\n  xDays: {\n    one: \"1 jour\",\n    other: \"{{count}} jours\"\n  },\n  aboutXWeeks: {\n    one: \"environ 1 semaine\",\n    other: \"environ {{count}} semaines\"\n  },\n  xWeeks: {\n    one: \"1 semaine\",\n    other: \"{{count}} semaines\"\n  },\n  aboutXMonths: {\n    one: \"environ 1 mois\",\n    other: \"environ {{count}} mois\"\n  },\n  xMonths: {\n    one: \"1 mois\",\n    other: \"{{count}} mois\"\n  },\n  aboutXYears: {\n    one: \"environ 1 an\",\n    other: \"environ {{count}} ans\"\n  },\n  xYears: {\n    one: \"1 an\",\n    other: \"{{count}} ans\"\n  },\n  overXYears: {\n    one: \"plus d’un an\",\n    other: \"plus de {{count}} ans\"\n  },\n  almostXYears: {\n    one: \"presqu’un an\",\n    other: \"presque {{count}} ans\"\n  }\n};\nexport const formatDistance = (token, count, options) => {\n  let result;\n  const form = formatDistanceLocale[token];\n  if (typeof form === \"string\") {\n    result = form;\n  } else if (count === 1) {\n    result = form.one;\n  } else {\n    result = form.other.replace(\"{{count}}\", String(count));\n  }\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"dans \" + result;\n    } else {\n      return \"il y a \" + result;\n    }\n  }\n  return result;\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}