{"ast":null,"code":"const formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: \"llai na eiliad\",\n    other: \"llai na {{count}} eiliad\"\n  },\n  xSeconds: {\n    one: \"1 eiliad\",\n    other: \"{{count}} eiliad\"\n  },\n  halfAMinute: \"hanner munud\",\n  lessThanXMinutes: {\n    one: \"llai na munud\",\n    two: \"llai na 2 funud\",\n    other: \"llai na {{count}} munud\"\n  },\n  xMinutes: {\n    one: \"1 munud\",\n    two: \"2 funud\",\n    other: \"{{count}} munud\"\n  },\n  aboutXHours: {\n    one: \"tua 1 awr\",\n    other: \"tua {{count}} awr\"\n  },\n  xHours: {\n    one: \"1 awr\",\n    other: \"{{count}} awr\"\n  },\n  xDays: {\n    one: \"1 diwrnod\",\n    two: \"2 ddiwrnod\",\n    other: \"{{count}} diwrnod\"\n  },\n  aboutXWeeks: {\n    one: \"tua 1 wythnos\",\n    two: \"tua pythefnos\",\n    other: \"tua {{count}} wythnos\"\n  },\n  xWeeks: {\n    one: \"1 wythnos\",\n    two: \"pythefnos\",\n    other: \"{{count}} wythnos\"\n  },\n  aboutXMonths: {\n    one: \"tua 1 mis\",\n    two: \"tua 2 fis\",\n    other: \"tua {{count}} mis\"\n  },\n  xMonths: {\n    one: \"1 mis\",\n    two: \"2 fis\",\n    other: \"{{count}} mis\"\n  },\n  aboutXYears: {\n    one: \"tua 1 flwyddyn\",\n    two: \"tua 2 flynedd\",\n    other: \"tua {{count}} mlynedd\"\n  },\n  xYears: {\n    one: \"1 flwyddyn\",\n    two: \"2 flynedd\",\n    other: \"{{count}} mlynedd\"\n  },\n  overXYears: {\n    one: \"dros 1 flwyddyn\",\n    two: \"dros 2 flynedd\",\n    other: \"dros {{count}} mlynedd\"\n  },\n  almostXYears: {\n    one: \"bron 1 flwyddyn\",\n    two: \"bron 2 flynedd\",\n    other: \"bron {{count}} mlynedd\"\n  }\n};\nexport const formatDistance = (token, count, options) => {\n  let result;\n  const tokenValue = formatDistanceLocale[token];\n  if (typeof tokenValue === \"string\") {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else if (count === 2 && !!tokenValue.two) {\n    result = tokenValue.two;\n  } else {\n    result = tokenValue.other.replace(\"{{count}}\", String(count));\n  }\n  if (options?.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return \"mewn \" + result;\n    } else {\n      return result + \" yn ôl\";\n    }\n  }\n  return result;\n};","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}