@judo/i18n 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["defaultOptions","formatDistanceLocale","formatDistance","dateFormats","timeFormats","dateTimeFormats","formatLong","formatRelativeLocale","formatRelative","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","formattingDayPeriodValues","ordinalNumber","localize","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","formatDistance","formatLong","formatRelative","localize","match","defaultOptions","defaultOptions","localize","week","formatLong","format","defaultOptions","defaultLocale","parseDate","week","formatDistance","dateFormats","timeFormats","dateTimeFormats","formatLong","formatRelativeLocale","formatRelative","eraValues","quarterValues","monthValues","dayValues","dayPeriodValues","ordinalNumber","localize","matchOrdinalNumberPattern","parseOrdinalNumberPattern","matchEraPatterns","parseEraPatterns","matchQuarterPatterns","parseQuarterPatterns","matchMonthPatterns","parseMonthPatterns","matchDayPatterns","parseDayPatterns","matchDayPeriodPatterns","parseDayPeriodPatterns","match","formatDistance","formatLong","formatRelative","localize","match","format","DATE_LOCALES: Record<string, Locale>","current: Record<string, unknown> | string | undefined","keys: string[]","translationKey: string"],"sources":["../src/translation-keys.ts","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeek.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeekYear.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfDay.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarDays.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeekYear.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfYear.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDayOfYear.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeek.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeekYear.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeekYear.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeek.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/addLeadingZeros.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/lightFormatters.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/formatters.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/longFormatters.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/protectedTokens.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/parseISO.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatDistance.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatLong.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/formatRelative.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/localize.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de/_lib/match.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/de.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/hu/_lib/formatDistance.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/hu/_lib/formatLong.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/hu/_lib/formatRelative.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/hu/_lib/localize.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/hu/_lib/match.js","../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/hu.js","../src/formatters.ts","../src/system-messages.ts","../src/i18n-service.ts","../src/locale-constants.ts","../src/i18n-provider.tsx","../src/use-model-label.ts"],"sourcesContent":["/**\n * Generate translation key from model element.\n * Format: {elementType}.{sourceId|name}.{property}\n *\n * @param element - Model element with sourceId, name, and @type\n * @param property - Property to translate (label, placeholder, tooltip, etc.)\n * @returns Translation key string\n */\nexport function getTranslationKey(\n\telement: { sourceId?: string; name: string; \"@type\"?: string },\n\tproperty: \"label\" | \"placeholder\" | \"tooltip\" | \"confirmationMessage\" = \"label\"\n): string {\n\tconst id = element.sourceId || element.name;\n\tconst rawType = element[\"@type\"] || \"element\";\n\t// Remove namespace prefix (e.g., \"ui:TextInput\" -> \"textinput\")\n\tconst type = rawType.replace(/^(ui:|data:)/i, \"\").toLowerCase();\n\treturn `${type}.${id}.${property}`;\n}\n\n/**\n * Generate translation key for system messages.\n * Format: system.{category}.{key}\n *\n * @param category - Message category (e.g., 'action', 'validation', 'nav')\n * @param key - Specific message key\n * @returns Translation key string\n */\nexport function getSystemMessageKey(category: string, key: string): string {\n\treturn `system.${category}.${key}`;\n}\n\n/**\n * Generate translation key for a column in a table.\n * Format: column.{sourceId|name}.label\n *\n * @param column - Column element with sourceId and name\n * @returns Translation key string\n */\nexport function getColumnTranslationKey(column: { sourceId?: string; name: string }): string {\n\tconst id = column.sourceId || column.name;\n\treturn `column.${id}.label`;\n}\n\n/**\n * Generate translation key for an enum value.\n * Format: enum.{enumName}.{value}\n *\n * @param enumName - Name of the enumeration\n * @param value - Enum value\n * @returns Translation key string\n */\nexport function getEnumTranslationKey(enumName: string, value: string): string {\n\treturn `enum.${enumName}.${value}`;\n}\n\n/**\n * Generate translation key for navigation item.\n * Format: nav.{sourceId|name}.label\n *\n * @param item - Navigation item with sourceId and name\n * @returns Translation key string\n */\nexport function getNavItemTranslationKey(item: { sourceId?: string; name: string }): string {\n\tconst id = item.sourceId || item.name;\n\treturn `nav.${id}.label`;\n}\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\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 reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\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 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\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 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_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 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\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 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_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 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\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 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\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 * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import {\n millisecondsInHour,\n millisecondsInMinute,\n} from \"./constants.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link parseISO} function options.\n */\n\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid 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 * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n * @param options - An object with options\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport function parseISO(argument, options) {\n const invalidDate = () => constructFrom(options?.in, NaN);\n\n const additionalDigits = options?.additionalDigits ?? 2;\n const dateStrings = splitDateString(argument);\n\n let date;\n if (dateStrings.date) {\n const parseYearResult = parseYear(dateStrings.date, additionalDigits);\n date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n }\n\n if (!date || isNaN(+date)) return invalidDate();\n\n const timestamp = +date;\n let time = 0;\n let offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n if (isNaN(time)) return invalidDate();\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n if (isNaN(offset)) return invalidDate();\n } else {\n const tmpDate = new Date(timestamp + time);\n const result = toDate(0, options?.in);\n result.setFullYear(\n tmpDate.getUTCFullYear(),\n tmpDate.getUTCMonth(),\n tmpDate.getUTCDate(),\n );\n result.setHours(\n tmpDate.getUTCHours(),\n tmpDate.getUTCMinutes(),\n tmpDate.getUTCSeconds(),\n tmpDate.getUTCMilliseconds(),\n );\n return result;\n }\n\n return toDate(timestamp + time + offset, options?.in);\n}\n\nconst patterns = {\n dateTimeDelimiter: /[T ]/,\n timeZoneDelimiter: /[Z ]/i,\n timezone: /([Z+-].*)$/,\n};\n\nconst dateRegex =\n /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nconst timeRegex =\n /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nconst timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\n\nfunction splitDateString(dateString) {\n const dateStrings = {};\n const array = dateString.split(patterns.dateTimeDelimiter);\n let timeString;\n\n // The regex match should only return at maximum two array elements.\n // [date], [time], or [date, time].\n if (array.length > 2) {\n return dateStrings;\n }\n\n if (/:/.test(array[0])) {\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n timeString = dateString.substr(\n dateStrings.date.length,\n dateString.length,\n );\n }\n }\n\n if (timeString) {\n const token = patterns.timezone.exec(timeString);\n if (token) {\n dateStrings.time = timeString.replace(token[1], \"\");\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n const regex = new RegExp(\n \"^(?:(\\\\d{4}|[+-]\\\\d{\" +\n (4 + additionalDigits) +\n \"})|(\\\\d{2}|[+-]\\\\d{\" +\n (2 + additionalDigits) +\n \"})$)\",\n );\n\n const captures = dateString.match(regex);\n // Invalid ISO-formatted year\n if (!captures) return { year: NaN, restDateString: \"\" };\n\n const year = captures[1] ? parseInt(captures[1]) : null;\n const century = captures[2] ? parseInt(captures[2]) : null;\n\n // either year or century is null, not both\n return {\n year: century === null ? year : century * 100,\n restDateString: dateString.slice((captures[1] || captures[2]).length),\n };\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) return new Date(NaN);\n\n const captures = dateString.match(dateRegex);\n // Invalid ISO-formatted string\n if (!captures) return new Date(NaN);\n\n const isWeekDate = !!captures[4];\n const dayOfYear = parseDateUnit(captures[1]);\n const month = parseDateUnit(captures[2]) - 1;\n const day = parseDateUnit(captures[3]);\n const week = parseDateUnit(captures[4]);\n const dayOfWeek = parseDateUnit(captures[5]) - 1;\n\n if (isWeekDate) {\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN);\n }\n return dayOfISOWeekYear(year, week, dayOfWeek);\n } else {\n const date = new Date(0);\n if (\n !validateDate(year, month, day) ||\n !validateDayOfYearDate(year, dayOfYear)\n ) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n return date;\n }\n}\n\nfunction parseDateUnit(value) {\n return value ? parseInt(value) : 1;\n}\n\nfunction parseTime(timeString) {\n const captures = timeString.match(timeRegex);\n if (!captures) return NaN; // Invalid ISO-formatted time\n\n const hours = parseTimeUnit(captures[1]);\n const minutes = parseTimeUnit(captures[2]);\n const seconds = parseTimeUnit(captures[3]);\n\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n\n return (\n hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000\n );\n}\n\nfunction parseTimeUnit(value) {\n return (value && parseFloat(value.replace(\",\", \".\"))) || 0;\n}\n\nfunction parseTimezone(timezoneString) {\n if (timezoneString === \"Z\") return 0;\n\n const captures = timezoneString.match(timezoneRegex);\n if (!captures) return 0;\n\n const sign = captures[1] === \"+\" ? -1 : 1;\n const hours = parseInt(captures[2]);\n const minutes = (captures[3] && parseInt(captures[3])) || 0;\n\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n\n return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n const date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n const fourthOfJanuaryDay = date.getUTCDay() || 7;\n const diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}\n\n// Validation functions\n\n// February is null to handle the leap year (using ||)\nconst daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\n\nfunction validateDate(year, month, date) {\n return (\n month >= 0 &&\n month <= 11 &&\n date >= 1 &&\n date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28))\n );\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\n\nfunction validateWeekDate(_year, week, day) {\n return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\n\nfunction validateTime(hours, minutes, seconds) {\n if (hours === 24) {\n return minutes === 0 && seconds === 0;\n }\n\n return (\n seconds >= 0 &&\n seconds < 60 &&\n minutes >= 0 &&\n minutes < 60 &&\n hours >= 0 &&\n hours < 25\n );\n}\n\nfunction validateTimezone(_hours, minutes) {\n return minutes >= 0 && minutes <= 59;\n}\n\n// Fallback for modularized imports:\nexport default parseISO;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n standalone: {\n one: \"weniger als 1 Sekunde\",\n other: \"weniger als {{count}} Sekunden\",\n },\n withPreposition: {\n one: \"weniger als 1 Sekunde\",\n other: \"weniger als {{count}} Sekunden\",\n },\n },\n\n xSeconds: {\n standalone: {\n one: \"1 Sekunde\",\n other: \"{{count}} Sekunden\",\n },\n withPreposition: {\n one: \"1 Sekunde\",\n other: \"{{count}} Sekunden\",\n },\n },\n\n halfAMinute: {\n standalone: \"eine halbe Minute\",\n withPreposition: \"einer halben Minute\",\n },\n\n lessThanXMinutes: {\n standalone: {\n one: \"weniger als 1 Minute\",\n other: \"weniger als {{count}} Minuten\",\n },\n withPreposition: {\n one: \"weniger als 1 Minute\",\n other: \"weniger als {{count}} Minuten\",\n },\n },\n\n xMinutes: {\n standalone: {\n one: \"1 Minute\",\n other: \"{{count}} Minuten\",\n },\n withPreposition: {\n one: \"1 Minute\",\n other: \"{{count}} Minuten\",\n },\n },\n\n aboutXHours: {\n standalone: {\n one: \"etwa 1 Stunde\",\n other: \"etwa {{count}} Stunden\",\n },\n withPreposition: {\n one: \"etwa 1 Stunde\",\n other: \"etwa {{count}} Stunden\",\n },\n },\n\n xHours: {\n standalone: {\n one: \"1 Stunde\",\n other: \"{{count}} Stunden\",\n },\n withPreposition: {\n one: \"1 Stunde\",\n other: \"{{count}} Stunden\",\n },\n },\n\n xDays: {\n standalone: {\n one: \"1 Tag\",\n other: \"{{count}} Tage\",\n },\n withPreposition: {\n one: \"1 Tag\",\n other: \"{{count}} Tagen\",\n },\n },\n\n aboutXWeeks: {\n standalone: {\n one: \"etwa 1 Woche\",\n other: \"etwa {{count}} Wochen\",\n },\n withPreposition: {\n one: \"etwa 1 Woche\",\n other: \"etwa {{count}} Wochen\",\n },\n },\n\n xWeeks: {\n standalone: {\n one: \"1 Woche\",\n other: \"{{count}} Wochen\",\n },\n withPreposition: {\n one: \"1 Woche\",\n other: \"{{count}} Wochen\",\n },\n },\n\n aboutXMonths: {\n standalone: {\n one: \"etwa 1 Monat\",\n other: \"etwa {{count}} Monate\",\n },\n withPreposition: {\n one: \"etwa 1 Monat\",\n other: \"etwa {{count}} Monaten\",\n },\n },\n\n xMonths: {\n standalone: {\n one: \"1 Monat\",\n other: \"{{count}} Monate\",\n },\n withPreposition: {\n one: \"1 Monat\",\n other: \"{{count}} Monaten\",\n },\n },\n\n aboutXYears: {\n standalone: {\n one: \"etwa 1 Jahr\",\n other: \"etwa {{count}} Jahre\",\n },\n withPreposition: {\n one: \"etwa 1 Jahr\",\n other: \"etwa {{count}} Jahren\",\n },\n },\n\n xYears: {\n standalone: {\n one: \"1 Jahr\",\n other: \"{{count}} Jahre\",\n },\n withPreposition: {\n one: \"1 Jahr\",\n other: \"{{count}} Jahren\",\n },\n },\n\n overXYears: {\n standalone: {\n one: \"mehr als 1 Jahr\",\n other: \"mehr als {{count}} Jahre\",\n },\n withPreposition: {\n one: \"mehr als 1 Jahr\",\n other: \"mehr als {{count}} Jahren\",\n },\n },\n\n almostXYears: {\n standalone: {\n one: \"fast 1 Jahr\",\n other: \"fast {{count}} Jahre\",\n },\n withPreposition: {\n one: \"fast 1 Jahr\",\n other: \"fast {{count}} Jahren\",\n },\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = options?.addSuffix\n ? formatDistanceLocale[token].withPreposition\n : formatDistanceLocale[token].standalone;\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", String(count));\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return \"vor \" + result;\n }\n }\n\n return result;\n};\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\n// DIN 5008: https://de.wikipedia.org/wiki/Datumsformat#DIN_5008\nconst dateFormats = {\n full: \"EEEE, do MMMM y\", // Montag, 7. Januar 2018\n long: \"do MMMM y\", // 7. Januar 2018\n medium: \"do MMM y\", // 7. Jan. 2018\n short: \"dd.MM.y\", // 07.01.2018\n};\n\nconst timeFormats = {\n full: \"HH:mm:ss zzzz\",\n long: \"HH:mm:ss z\",\n medium: \"HH:mm:ss\",\n short: \"HH:mm\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'um' {{time}}\",\n long: \"{{date}} 'um' {{time}}\",\n medium: \"{{date}} {{time}}\",\n short: \"{{date}} {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'letzten' eeee 'um' p\",\n yesterday: \"'gestern um' p\",\n today: \"'heute um' p\",\n tomorrow: \"'morgen um' p\",\n nextWeek: \"eeee 'um' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"v.Chr.\", \"n.Chr.\"],\n abbreviated: [\"v.Chr.\", \"n.Chr.\"],\n wide: [\"vor Christus\", \"nach Christus\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1. Quartal\", \"2. Quartal\", \"3. Quartal\", \"4. Quartal\"],\n};\n\n// Note: in German, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mär\",\n \"Apr\",\n \"Mai\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Okt\",\n \"Nov\",\n \"Dez\",\n ],\n\n wide: [\n \"Januar\",\n \"Februar\",\n \"März\",\n \"April\",\n \"Mai\",\n \"Juni\",\n \"Juli\",\n \"August\",\n \"September\",\n \"Oktober\",\n \"November\",\n \"Dezember\",\n ],\n};\n\n// https://st.unicode.org/cldr-apps/v#/de/Gregorian/\nconst formattingMonthValues = {\n narrow: monthValues.narrow,\n abbreviated: [\n \"Jan.\",\n \"Feb.\",\n \"März\",\n \"Apr.\",\n \"Mai\",\n \"Juni\",\n \"Juli\",\n \"Aug.\",\n \"Sep.\",\n \"Okt.\",\n \"Nov.\",\n \"Dez.\",\n ],\n\n wide: monthValues.wide,\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"D\", \"M\", \"D\", \"F\", \"S\"],\n short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"],\n abbreviated: [\"So.\", \"Mo.\", \"Di.\", \"Mi.\", \"Do.\", \"Fr.\", \"Sa.\"],\n wide: [\n \"Sonntag\",\n \"Montag\",\n \"Dienstag\",\n \"Mittwoch\",\n \"Donnerstag\",\n \"Freitag\",\n \"Samstag\",\n ],\n};\n\n// https://www.unicode.org/cldr/charts/32/summary/de.html#1881\nconst dayPeriodValues = {\n narrow: {\n am: \"vm.\",\n pm: \"nm.\",\n midnight: \"Mitternacht\",\n noon: \"Mittag\",\n morning: \"Morgen\",\n afternoon: \"Nachm.\",\n evening: \"Abend\",\n night: \"Nacht\",\n },\n abbreviated: {\n am: \"vorm.\",\n pm: \"nachm.\",\n midnight: \"Mitternacht\",\n noon: \"Mittag\",\n morning: \"Morgen\",\n afternoon: \"Nachmittag\",\n evening: \"Abend\",\n night: \"Nacht\",\n },\n wide: {\n am: \"vormittags\",\n pm: \"nachmittags\",\n midnight: \"Mitternacht\",\n noon: \"Mittag\",\n morning: \"Morgen\",\n afternoon: \"Nachmittag\",\n evening: \"Abend\",\n night: \"Nacht\",\n },\n};\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"vm.\",\n pm: \"nm.\",\n midnight: \"Mitternacht\",\n noon: \"Mittag\",\n morning: \"morgens\",\n afternoon: \"nachm.\",\n evening: \"abends\",\n night: \"nachts\",\n },\n abbreviated: {\n am: \"vorm.\",\n pm: \"nachm.\",\n midnight: \"Mitternacht\",\n noon: \"Mittag\",\n morning: \"morgens\",\n afternoon: \"nachmittags\",\n evening: \"abends\",\n night: \"nachts\",\n },\n wide: {\n am: \"vormittags\",\n pm: \"nachmittags\",\n midnight: \"Mitternacht\",\n noon: \"Mittag\",\n morning: \"morgens\",\n afternoon: \"nachmittags\",\n evening: \"abends\",\n night: \"nachts\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber) => {\n const number = Number(dirtyNumber);\n\n return number + \".\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n formattingValues: formattingMonthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(\\.)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(v\\.? ?Chr\\.?|n\\.? ?Chr\\.?)/i,\n abbreviated: /^(v\\.? ?Chr\\.?|n\\.? ?Chr\\.?)/i,\n wide: /^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i,\n};\nconst parseEraPatterns = {\n any: [/^v/i, /^n/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](\\.)? Quartal/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated:\n /^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\\.?/i,\n wide: /^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^j[aä]/i,\n /^f/i,\n /^mär/i,\n /^ap/i,\n /^mai/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smdmf]/i,\n short: /^(so|mo|di|mi|do|fr|sa)/i,\n abbreviated: /^(son?|mon?|die?|mit?|don?|fre?|sam?)\\.?/i,\n wide: /^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i,\n};\nconst parseDayPatterns = {\n any: [/^so/i, /^mo/i, /^di/i, /^mi/i, /^do/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(vm\\.?|nm\\.?|Mitternacht|Mittag|morgens|nachm\\.?|abends|nachts)/i,\n abbreviated:\n /^(vorm\\.?|nachm\\.?|Mitternacht|Mittag|morgens|nachm\\.?|abends|nachts)/i,\n wide: /^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^v/i,\n pm: /^n/i,\n midnight: /^Mitte/i,\n noon: /^Mitta/i,\n morning: /morgens/i,\n afternoon: /nachmittags/i, // will never be matched. Afternoon is matched by `pm`\n evening: /abends/i,\n night: /nachts/i, // will never be matched. Night is matched by `pm`\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./de/_lib/formatDistance.js\";\nimport { formatLong } from \"./de/_lib/formatLong.js\";\nimport { formatRelative } from \"./de/_lib/formatRelative.js\";\nimport { localize } from \"./de/_lib/localize.js\";\nimport { match } from \"./de/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary German locale.\n * @language German\n * @iso-639-2 deu\n * @author Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)\n * @author Asia [@asia-t](https://github.com/asia-t)\n * @author Van Vuong Ngo [@vanvuongngo](https://github.com/vanvuongngo)\n * @author RomanErnst [@pex](https://github.com/pex)\n * @author Philipp Keck [@Philipp91](https://github.com/Philipp91)\n */\nexport const de = {\n code: \"de\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 1 /* Monday */,\n firstWeekContainsDate: 4,\n },\n};\n\n// Fallback for modularized imports:\nexport default de;\n","const translations = {\n about: \"körülbelül\",\n over: \"több mint\",\n almost: \"majdnem\",\n lessthan: \"kevesebb mint\",\n};\n\nconst withoutSuffixes = {\n xseconds: \" másodperc\",\n halfaminute: \"fél perc\",\n xminutes: \" perc\",\n xhours: \" óra\",\n xdays: \" nap\",\n xweeks: \" hét\",\n xmonths: \" hónap\",\n xyears: \" év\",\n};\n\nconst withSuffixes = {\n xseconds: {\n \"-1\": \" másodperccel ezelőtt\",\n 1: \" másodperc múlva\",\n 0: \" másodperce\",\n },\n halfaminute: {\n \"-1\": \"fél perccel ezelőtt\",\n 1: \"fél perc múlva\",\n 0: \"fél perce\",\n },\n xminutes: {\n \"-1\": \" perccel ezelőtt\",\n 1: \" perc múlva\",\n 0: \" perce\",\n },\n xhours: {\n \"-1\": \" órával ezelőtt\",\n 1: \" óra múlva\",\n 0: \" órája\",\n },\n xdays: {\n \"-1\": \" nappal ezelőtt\",\n 1: \" nap múlva\",\n 0: \" napja\",\n },\n xweeks: {\n \"-1\": \" héttel ezelőtt\",\n 1: \" hét múlva\",\n 0: \" hete\",\n },\n xmonths: {\n \"-1\": \" hónappal ezelőtt\",\n 1: \" hónap múlva\",\n 0: \" hónapja\",\n },\n xyears: {\n \"-1\": \" évvel ezelőtt\",\n 1: \" év múlva\",\n 0: \" éve\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n const adverb = token.match(/about|over|almost|lessthan/i);\n const unit = adverb ? token.replace(adverb[0], \"\") : token;\n\n const addSuffix = options?.addSuffix === true;\n const key = unit.toLowerCase();\n const comparison = options?.comparison || 0;\n\n const translated = addSuffix\n ? withSuffixes[key][comparison]\n : withoutSuffixes[key];\n\n let result = key === \"halfaminute\" ? translated : count + translated;\n\n if (adverb) {\n const adv = adverb[0].toLowerCase();\n result = translations[adv] + \" \" + result;\n }\n\n return result;\n};\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"y. MMMM d., EEEE\",\n long: \"y. MMMM d.\",\n medium: \"y. MMM d.\",\n short: \"y. MM. dd.\",\n};\n\nconst timeFormats = {\n full: \"H:mm:ss zzzz\",\n long: \"H:mm:ss z\",\n medium: \"H:mm:ss\",\n short: \"H:mm\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} {{time}}\",\n long: \"{{date}} {{time}}\",\n medium: \"{{date}} {{time}}\",\n short: \"{{date}} {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const accusativeWeekdays = [\n \"vasárnap\",\n \"hétfőn\",\n \"kedden\",\n \"szerdán\",\n \"csütörtökön\",\n \"pénteken\",\n \"szombaton\",\n];\n\nfunction week(isFuture) {\n return (date) => {\n const weekday = accusativeWeekdays[date.getDay()];\n const prefix = isFuture ? \"\" : \"'múlt' \";\n return `${prefix}'${weekday}' p'-kor'`;\n };\n}\nconst formatRelativeLocale = {\n lastWeek: week(false),\n yesterday: \"'tegnap' p'-kor'\",\n today: \"'ma' p'-kor'\",\n tomorrow: \"'holnap' p'-kor'\",\n nextWeek: week(true),\n other: \"P\",\n};\n\nexport const formatRelative = (token, date) => {\n const format = formatRelativeLocale[token];\n\n if (typeof format === \"function\") {\n return format(date);\n }\n\n return format;\n};\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"ie.\", \"isz.\"],\n abbreviated: [\"i. e.\", \"i. sz.\"],\n wide: [\"Krisztus előtt\", \"időszámításunk szerint\"],\n};\n\nconst quarterValues = {\n narrow: [\"1.\", \"2.\", \"3.\", \"4.\"],\n abbreviated: [\"1. n.év\", \"2. n.év\", \"3. n.év\", \"4. n.év\"],\n wide: [\"1. negyedév\", \"2. negyedév\", \"3. negyedév\", \"4. negyedév\"],\n};\n\nconst formattingQuarterValues = {\n narrow: [\"I.\", \"II.\", \"III.\", \"IV.\"],\n abbreviated: [\"I. n.év\", \"II. n.év\", \"III. n.év\", \"IV. n.év\"],\n wide: [\"I. negyedév\", \"II. negyedév\", \"III. negyedév\", \"IV. negyedév\"],\n};\n\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"Á\", \"M\", \"J\", \"J\", \"A\", \"Sz\", \"O\", \"N\", \"D\"],\n\n abbreviated: [\n \"jan.\",\n \"febr.\",\n \"márc.\",\n \"ápr.\",\n \"máj.\",\n \"jún.\",\n \"júl.\",\n \"aug.\",\n \"szept.\",\n \"okt.\",\n \"nov.\",\n \"dec.\",\n ],\n\n wide: [\n \"január\",\n \"február\",\n \"március\",\n \"április\",\n \"május\",\n \"június\",\n \"július\",\n \"augusztus\",\n \"szeptember\",\n \"október\",\n \"november\",\n \"december\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"V\", \"H\", \"K\", \"Sz\", \"Cs\", \"P\", \"Sz\"],\n short: [\"V\", \"H\", \"K\", \"Sze\", \"Cs\", \"P\", \"Szo\"],\n abbreviated: [\"V\", \"H\", \"K\", \"Sze\", \"Cs\", \"P\", \"Szo\"],\n wide: [\n \"vasárnap\",\n \"hétfő\",\n \"kedd\",\n \"szerda\",\n \"csütörtök\",\n \"péntek\",\n \"szombat\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"de.\",\n pm: \"du.\",\n midnight: \"éjfél\",\n noon: \"dél\",\n morning: \"reggel\",\n afternoon: \"du.\",\n evening: \"este\",\n night: \"éjjel\",\n },\n abbreviated: {\n am: \"de.\",\n pm: \"du.\",\n midnight: \"éjfél\",\n noon: \"dél\",\n morning: \"reggel\",\n afternoon: \"du.\",\n evening: \"este\",\n night: \"éjjel\",\n },\n wide: {\n am: \"de.\",\n pm: \"du.\",\n midnight: \"éjfél\",\n noon: \"dél\",\n morning: \"reggel\",\n afternoon: \"délután\",\n evening: \"este\",\n night: \"éjjel\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n return number + \".\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n formattingValues: formattingQuarterValues,\n defaultFormattingWidth: \"wide\",\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n }),\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)\\.?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(ie\\.|isz\\.)/i,\n abbreviated: /^(i\\.\\s?e\\.?|b?\\s?c\\s?e|i\\.\\s?sz\\.?)/i,\n wide: /^(Krisztus előtt|időszámításunk előtt|időszámításunk szerint|i\\. sz\\.)/i,\n};\nconst parseEraPatterns = {\n narrow: [/ie/i, /isz/i],\n abbreviated: [/^(i\\.?\\s?e\\.?|b\\s?ce)/i, /^(i\\.?\\s?sz\\.?|c\\s?e)/i],\n any: [/előtt/i, /(szerint|i. sz.)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]\\.?/i,\n abbreviated: /^[1234]?\\.?\\s?n\\.év/i,\n wide: /^([1234]|I|II|III|IV)?\\.?\\s?negyedév/i,\n};\nconst parseQuarterPatterns = {\n any: [/1|I$/i, /2|II$/i, /3|III/i, /4|IV/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmaásond]|sz/i,\n abbreviated:\n /^(jan\\.?|febr\\.?|márc\\.?|ápr\\.?|máj\\.?|jún\\.?|júl\\.?|aug\\.?|szept\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n wide: /^(január|február|március|április|május|június|július|augusztus|szeptember|október|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a|á/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s|sz/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^már/i,\n /^áp/i,\n /^máj/i,\n /^jún/i,\n /^júl/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^([vhkpc]|sz|cs|sz)/i,\n short: /^([vhkp]|sze|cs|szo)/i,\n abbreviated: /^([vhkp]|sze|cs|szo)/i,\n wide: /^(vasárnap|hétfő|kedd|szerda|csütörtök|péntek|szombat)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^v/i, /^h/i, /^k/i, /^sz/i, /^c/i, /^p/i, /^sz/i],\n any: [/^v/i, /^h/i, /^k/i, /^sze/i, /^c/i, /^p/i, /^szo/i],\n};\n\nconst matchDayPeriodPatterns = {\n any: /^((de|du)\\.?|éjfél|délután|dél|reggel|este|éjjel)/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^de\\.?/i,\n pm: /^du\\.?/i,\n midnight: /^éjf/i,\n noon: /^dé/i,\n morning: /reg/i,\n afternoon: /^délu\\.?/i,\n evening: /es/i,\n night: /éjj/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { formatDistance } from \"./hu/_lib/formatDistance.js\";\nimport { formatLong } from \"./hu/_lib/formatLong.js\";\nimport { formatRelative } from \"./hu/_lib/formatRelative.js\";\nimport { localize } from \"./hu/_lib/localize.js\";\nimport { match } from \"./hu/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary Hungarian locale.\n * @language Hungarian\n * @iso-639-2 hun\n * @author Pavlo Shpak [@pshpak](https://github.com/pshpak)\n * @author Eduardo Pardo [@eduardopsll](https://github.com/eduardopsll)\n * @author Zoltan Szepesi [@twodcube](https://github.com/twodcube)\n */\nexport const hu = {\n code: \"hu\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 1 /* Monday */,\n firstWeekContainsDate: 4,\n },\n};\n\n// Fallback for modularized imports:\nexport default hu;\n","import { format as dateFnsFormat, parseISO } from \"date-fns\";\nimport type { Locale } from \"date-fns\";\nimport { de, enUS, hu } from \"date-fns/locale\";\n\n/**\n * Mapping of locale codes to date-fns locale objects.\n */\nconst DATE_LOCALES: Record<string, Locale> = {\n\t\"en-US\": enUS,\n\t\"de-DE\": de,\n\t\"hu-HU\": hu,\n\ten: enUS,\n\tde: de,\n\thu: hu,\n};\n\n/**\n * Options for date formatting.\n */\nexport interface DateFormatOptions {\n\t/** Predefined format style */\n\tdateStyle?: \"short\" | \"medium\" | \"long\" | \"full\";\n\ttimeStyle?: \"short\" | \"medium\" | \"long\" | \"full\";\n\t/** Custom format string (date-fns format) */\n\tformat?: string;\n}\n\n/**\n * Options for number formatting.\n */\nexport interface NumberFormatOptions {\n\tstyle?: \"decimal\" | \"percent\" | \"currency\";\n\tminimumFractionDigits?: number;\n\tmaximumFractionDigits?: number;\n\tuseGrouping?: boolean;\n}\n\n/**\n * Parse a date value into a Date object.\n *\n * @param date - Date value (Date, ISO string, or timestamp)\n * @returns Parsed Date object\n */\nexport function parseDate(date: Date | string | number): Date {\n\tif (date instanceof Date) {\n\t\treturn date;\n\t}\n\tif (typeof date === \"string\") {\n\t\treturn parseISO(date);\n\t}\n\treturn new Date(date);\n}\n\n/**\n * Get the date-fns locale object for a given locale code.\n *\n * @param localeCode - Locale code (e.g., 'en-US', 'de-DE')\n * @returns date-fns Locale object, defaults to enUS\n */\nexport function getDateLocale(localeCode: string): Locale {\n\treturn DATE_LOCALES[localeCode] || DATE_LOCALES[localeCode.split(\"-\")[0]] || enUS;\n}\n\n/**\n * Format a date according to the specified locale and options.\n *\n * @param date - Date to format\n * @param localeCode - Locale code for formatting\n * @param options - Format options\n * @returns Formatted date string\n */\nexport function formatDate(date: Date | string | number, localeCode: string, options?: DateFormatOptions): string {\n\tconst dateObj = parseDate(date);\n\tconst locale = getDateLocale(localeCode);\n\n\t// If custom format provided, use it directly\n\tif (options?.format) {\n\t\treturn dateFnsFormat(dateObj, options.format, { locale });\n\t}\n\n\t// Use Intl.DateTimeFormat for style-based formatting\n\tif (options?.dateStyle || options?.timeStyle) {\n\t\treturn new Intl.DateTimeFormat(localeCode, {\n\t\t\tdateStyle: options.dateStyle,\n\t\t\ttimeStyle: options.timeStyle,\n\t\t}).format(dateObj);\n\t}\n\n\t// Default format\n\treturn dateFnsFormat(dateObj, \"PP\", { locale });\n}\n\n/**\n * Format a number according to the specified locale and options.\n *\n * @param value - Number to format\n * @param localeCode - Locale code for formatting\n * @param options - Format options\n * @returns Formatted number string\n */\nexport function formatNumber(value: number, localeCode: string, options?: NumberFormatOptions): string {\n\treturn new Intl.NumberFormat(localeCode, options).format(value);\n}\n\n/**\n * Format a currency value according to the specified locale.\n *\n * @param value - Number to format as currency\n * @param localeCode - Locale code for formatting\n * @param currency - Currency code (e.g., 'USD', 'EUR')\n * @returns Formatted currency string\n */\nexport function formatCurrency(value: number, localeCode: string, currency: string): string {\n\treturn new Intl.NumberFormat(localeCode, {\n\t\tstyle: \"currency\",\n\t\tcurrency,\n\t}).format(value);\n}\n\n/**\n * Format a relative time (e.g., \"2 days ago\", \"in 3 hours\").\n *\n * @param date - Date to format relative to now\n * @param localeCode - Locale code for formatting\n * @returns Formatted relative time string\n */\nexport function formatRelativeTime(date: Date | string | number, localeCode: string): string {\n\tconst dateObj = parseDate(date);\n\tconst now = new Date();\n\tconst diffMs = dateObj.getTime() - now.getTime();\n\tconst diffSeconds = Math.round(diffMs / 1000);\n\tconst diffMinutes = Math.round(diffSeconds / 60);\n\tconst diffHours = Math.round(diffMinutes / 60);\n\tconst diffDays = Math.round(diffHours / 24);\n\n\tconst rtf = new Intl.RelativeTimeFormat(localeCode, { numeric: \"auto\" });\n\n\tif (Math.abs(diffDays) >= 1) {\n\t\treturn rtf.format(diffDays, \"day\");\n\t}\n\tif (Math.abs(diffHours) >= 1) {\n\t\treturn rtf.format(diffHours, \"hour\");\n\t}\n\tif (Math.abs(diffMinutes) >= 1) {\n\t\treturn rtf.format(diffMinutes, \"minute\");\n\t}\n\treturn rtf.format(diffSeconds, \"second\");\n}\n\n/**\n * Format a percentage value.\n *\n * @param value - Number to format as percentage (0.1 = 10%)\n * @param localeCode - Locale code for formatting\n * @param fractionDigits - Number of decimal places\n * @returns Formatted percentage string\n */\nexport function formatPercent(value: number, localeCode: string, fractionDigits = 0): string {\n\treturn new Intl.NumberFormat(localeCode, {\n\t\tstyle: \"percent\",\n\t\tminimumFractionDigits: fractionDigits,\n\t\tmaximumFractionDigits: fractionDigits,\n\t}).format(value);\n}\n","/**\n * System messages used throughout the application.\n * Keys are organized by category for easy management and translation.\n */\nexport const SYSTEM_MESSAGES = {\n\t// Common actions\n\taction: {\n\t\tsave: {\n\t\t\tsuccess: \"Saved successfully\",\n\t\t\terror: \"Failed to save\",\n\t\t\tloading: \"Saving...\",\n\t\t},\n\t\tdelete: {\n\t\t\tsuccess: \"Deleted successfully\",\n\t\t\terror: \"Failed to delete\",\n\t\t\tconfirm: \"Are you sure you want to delete this item?\",\n\t\t\tconfirmTitle: \"Confirm Delete\",\n\t\t},\n\t\tcreate: {\n\t\t\tsuccess: \"Created successfully\",\n\t\t\terror: \"Failed to create\",\n\t\t},\n\t\tupdate: {\n\t\t\tsuccess: \"Updated successfully\",\n\t\t\terror: \"Failed to update\",\n\t\t},\n\t\tcancel: {\n\t\t\tlabel: \"Cancel\",\n\t\t},\n\t\tconfirm: {\n\t\t\tlabel: \"Confirm\",\n\t\t},\n\t\tclose: {\n\t\t\tlabel: \"Close\",\n\t\t},\n\t\tback: {\n\t\t\tlabel: \"Back\",\n\t\t},\n\t\trefresh: {\n\t\t\tlabel: \"Refresh\",\n\t\t\tsuccess: \"Refreshed successfully\",\n\t\t\terror: \"Failed to refresh\",\n\t\t},\n\t},\n\n\t// Validation messages\n\tvalidation: {\n\t\trequired: \"{{field}} is required\",\n\t\tminLength: \"{{field}} must be at least {{min}} characters\",\n\t\tmaxLength: \"{{field}} must be at most {{max}} characters\",\n\t\tmin: \"{{field}} must be at least {{min}}\",\n\t\tmax: \"{{field}} must be at most {{max}}\",\n\t\temail: \"Please enter a valid email address\",\n\t\turl: \"Please enter a valid URL\",\n\t\tnumber: \"Please enter a valid number\",\n\t\tinteger: \"Please enter a whole number\",\n\t\tpattern: \"{{field}} format is invalid\",\n\t\tunique: \"{{field}} must be unique\",\n\t\tdate: \"Please enter a valid date\",\n\t\tdateRange: \"End date must be after start date\",\n\t},\n\n\t// Navigation\n\tnav: {\n\t\tunsavedChanges: {\n\t\t\ttitle: \"Unsaved Changes\",\n\t\t\tmessage: \"You have unsaved changes. Are you sure you want to leave?\",\n\t\t\tstay: \"Stay\",\n\t\t\tleave: \"Leave\",\n\t\t},\n\t\tbreadcrumb: {\n\t\t\thome: \"Home\",\n\t\t},\n\t},\n\n\t// Session\n\tsession: {\n\t\ttimeout: {\n\t\t\ttitle: \"Session Expiring\",\n\t\t\tmessage: \"Your session will expire in {{time}}. Would you like to stay logged in?\",\n\t\t\tlogout: \"Logout\",\n\t\t\textend: \"Stay Logged In\",\n\t\t},\n\t\texpired: {\n\t\t\ttitle: \"Session Expired\",\n\t\t\tmessage: \"Your session has expired. Please log in again.\",\n\t\t},\n\t},\n\n\t// Loading states\n\tloading: {\n\t\tmodel: \"Loading application...\",\n\t\tdata: \"Loading data...\",\n\t\tsaving: \"Saving...\",\n\t\tdeleting: \"Deleting...\",\n\t\tprocessing: \"Processing...\",\n\t},\n\n\t// Error messages\n\terror: {\n\t\tgeneric: \"An error occurred\",\n\t\tnetwork: \"Network error. Please check your connection.\",\n\t\tnotFound: \"The requested resource was not found\",\n\t\tunauthorized: \"You are not authorized to perform this action\",\n\t\tforbidden: \"Access denied\",\n\t\tserverError: \"Server error. Please try again later.\",\n\t\ttimeout: \"Request timed out. Please try again.\",\n\t\tvalidation: \"Please correct the errors and try again\",\n\t},\n\n\t// Empty states\n\tempty: {\n\t\tnoData: \"No data available\",\n\t\tnoResults: \"No results found\",\n\t\tnoItems: \"No items to display\",\n\t\tnoSelection: \"No item selected\",\n\t},\n\n\t// Pagination\n\tpagination: {\n\t\tof: \"of\",\n\t\trowsPerPage: \"Rows per page\",\n\t\tshowing: \"Showing {{from}}-{{to}} of {{total}}\",\n\t\tfirstPage: \"First page\",\n\t\tlastPage: \"Last page\",\n\t\tpreviousPage: \"Previous page\",\n\t\tnextPage: \"Next page\",\n\t},\n\n\t// Table\n\ttable: {\n\t\tselectAll: \"Select all\",\n\t\tdeselectAll: \"Deselect all\",\n\t\tselectedCount: \"{{count}} selected\",\n\t\tsortAscending: \"Sort ascending\",\n\t\tsortDescending: \"Sort descending\",\n\t\tfilterBy: \"Filter by {{column}}\",\n\t\tclearFilter: \"Clear filter\",\n\t\tnoRows: \"No rows\",\n\t\tactions: \"Actions\",\n\t},\n\n\t// Dialog\n\tdialog: {\n\t\tconfirm: {\n\t\t\ttitle: \"Confirm\",\n\t\t\tyes: \"Yes\",\n\t\t\tno: \"No\",\n\t\t},\n\t\talert: {\n\t\t\ttitle: \"Alert\",\n\t\t\tok: \"OK\",\n\t\t},\n\t},\n\n\t// Auth\n\tauth: {\n\t\tlogin: \"Log In\",\n\t\tlogout: \"Log Out\",\n\t\tloggingIn: \"Logging in...\",\n\t\tloggingOut: \"Logging out...\",\n\t\tprofile: \"Profile\",\n\t},\n\n\t// Common labels\n\tcommon: {\n\t\tsearch: \"Search\",\n\t\tfilter: \"Filter\",\n\t\tclear: \"Clear\",\n\t\treset: \"Reset\",\n\t\tapply: \"Apply\",\n\t\tselect: \"Select\",\n\t\tselected: \"Selected\",\n\t\tall: \"All\",\n\t\tnone: \"None\",\n\t\tyes: \"Yes\",\n\t\tno: \"No\",\n\t\ttrue: \"True\",\n\t\tfalse: \"False\",\n\t\tenabled: \"Enabled\",\n\t\tdisabled: \"Disabled\",\n\t\tactive: \"Active\",\n\t\tinactive: \"Inactive\",\n\t\tmore: \"More\",\n\t\tless: \"Less\",\n\t\tdetails: \"Details\",\n\t\toptions: \"Options\",\n\t\tsettings: \"Settings\",\n\t\thelp: \"Help\",\n\t\tabout: \"About\",\n\t},\n} as const;\n\n/**\n * Type for system message keys.\n */\nexport type SystemMessageCategory = keyof typeof SYSTEM_MESSAGES;\n\n/**\n * Flatten nested object keys into dot-notation strings.\n */\ntype FlattenKeys<T, Prefix extends string = \"\"> = T extends object\n\t? {\n\t\t\t[K in keyof T]: K extends string\n\t\t\t\t? T[K] extends object\n\t\t\t\t\t? FlattenKeys<T[K], `${Prefix}${K}.`>\n\t\t\t\t\t: `${Prefix}${K}`\n\t\t\t\t: never;\n\t\t}[keyof T]\n\t: never;\n\n/**\n * Type for all flattened system message keys.\n */\nexport type SystemMessageKey = FlattenKeys<typeof SYSTEM_MESSAGES>;\n\n/**\n * Get a system message value by dot-notation path.\n *\n * @param path - Dot-notation path to the message (e.g., 'action.save.success')\n * @returns The message string or undefined if not found\n */\nexport function getSystemMessage(path: string): string | undefined {\n\tconst parts = path.split(\".\");\n\tlet current: Record<string, unknown> | string | undefined = SYSTEM_MESSAGES;\n\n\tfor (const part of parts) {\n\t\tif (current === undefined || current === null || typeof current === \"string\") {\n\t\t\treturn undefined;\n\t\t}\n\t\tcurrent = current[part] as Record<string, unknown> | string | undefined;\n\t}\n\n\treturn typeof current === \"string\" ? current : undefined;\n}\n\n/**\n * Get all keys from system messages in flat dot-notation format.\n *\n * @returns Array of all message keys\n */\nexport function getAllSystemMessageKeys(): string[] {\n\tconst keys: string[] = [];\n\n\tfunction traverse(obj: Record<string, unknown>, prefix: string): void {\n\t\tfor (const key of Object.keys(obj)) {\n\t\t\tconst value = obj[key];\n\t\t\tconst fullKey = prefix ? `${prefix}.${key}` : key;\n\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tkeys.push(fullKey);\n\t\t\t} else if (typeof value === \"object\" && value !== null) {\n\t\t\t\ttraverse(value as Record<string, unknown>, fullKey);\n\t\t\t}\n\t\t}\n\t}\n\n\ttraverse(SYSTEM_MESSAGES as unknown as Record<string, unknown>, \"\");\n\treturn keys;\n}\n","import type { DateFormatOptions, NumberFormatOptions } from \"./formatters\";\nimport { formatCurrency, formatDate, formatNumber, formatPercent, formatRelativeTime } from \"./formatters\";\n\n/**\n * Options for translation function.\n */\nexport interface TranslationOptions {\n\t/** Default value if key not found */\n\tdefaultValue?: string;\n\t/** Count for pluralization */\n\tcount?: number;\n\t/** Interpolation values */\n\t[key: string]: unknown;\n}\n\n/**\n * I18n service interface for internationalization.\n * This interface defines the contract for i18n implementations.\n */\nexport interface I18nService {\n\t/** Get current language */\n\tgetLanguage(): string;\n\n\t/** Set language (triggers re-render in React context) */\n\tsetLanguage(lang: string): Promise<void>;\n\n\t/** Get available languages */\n\tgetAvailableLanguages(): string[];\n\n\t/** Translate a key */\n\tt(key: string, options?: TranslationOptions): string;\n\n\t/** Check if translation exists */\n\texists(key: string): boolean;\n\n\t/** Format date according to current locale */\n\tformatDate(date: Date | string | number, options?: DateFormatOptions): string;\n\n\t/** Format number according to current locale */\n\tformatNumber(value: number, options?: NumberFormatOptions): string;\n\n\t/** Format currency */\n\tformatCurrency(value: number, currency: string): string;\n\n\t/** Format relative time */\n\tformatRelativeTime(date: Date | string | number): string;\n\n\t/** Format percentage */\n\tformatPercent(value: number, fractionDigits?: number): string;\n\n\t/** Subscribe to language changes */\n\tonLanguageChange(callback: (lang: string) => void): () => void;\n}\n\n/**\n * Configuration for creating an I18n service.\n */\nexport interface I18nServiceConfig {\n\t/** Default language */\n\tdefaultLanguage: string;\n\t/** Available languages */\n\tsupportedLanguages: string[];\n\t/** Translation resources (language -> key -> value) */\n\tresources?: Record<string, Record<string, string>>;\n}\n\n/**\n * Simple interpolation for translation strings.\n * Replaces {{key}} patterns with provided values.\n *\n * @param template - Template string with {{key}} patterns\n * @param values - Values to interpolate\n * @returns Interpolated string\n */\nexport function interpolate(template: string, values: Record<string, unknown>): string {\n\treturn template.replace(/\\{\\{(\\w+)\\}\\}/g, (_, key) => {\n\t\tconst value = values[key];\n\t\treturn value !== undefined ? String(value) : `{{${key}}}`;\n\t});\n}\n\n/**\n * Create a simple I18n service implementation.\n * This is a lightweight implementation for testing and basic usage.\n * In production, use react-i18next integration.\n *\n * @param config - I18n configuration\n * @returns I18nService implementation\n */\nexport function createI18nService(config: I18nServiceConfig): I18nService {\n\tlet currentLanguage = config.defaultLanguage;\n\tconst listeners = new Set<(lang: string) => void>();\n\tconst resources = config.resources || {};\n\n\treturn {\n\t\tgetLanguage(): string {\n\t\t\treturn currentLanguage;\n\t\t},\n\n\t\tasync setLanguage(lang: string): Promise<void> {\n\t\t\tif (!config.supportedLanguages.includes(lang)) {\n\t\t\t\tthrow new Error(`Language '${lang}' is not supported. Supported: ${config.supportedLanguages.join(\", \")}`);\n\t\t\t}\n\t\t\tcurrentLanguage = lang;\n\t\t\tfor (const listener of listeners) {\n\t\t\t\tlistener(lang);\n\t\t\t}\n\t\t},\n\n\t\tgetAvailableLanguages(): string[] {\n\t\t\treturn [...config.supportedLanguages];\n\t\t},\n\n\t\tt(key: string, options?: TranslationOptions): string {\n\t\t\tconst langResources = resources[currentLanguage] || {};\n\t\t\tlet value = langResources[key];\n\n\t\t\t// Try fallback language if not found\n\t\t\tif (value === undefined && currentLanguage !== config.defaultLanguage) {\n\t\t\t\tconst defaultResources = resources[config.defaultLanguage] || {};\n\t\t\t\tvalue = defaultResources[key];\n\t\t\t}\n\n\t\t\t// Use default value if still not found\n\t\t\tif (value === undefined) {\n\t\t\t\treturn options?.defaultValue ?? key;\n\t\t\t}\n\n\t\t\t// Handle interpolation\n\t\t\tif (options) {\n\t\t\t\tconst { defaultValue: _defaultValue, count: _count, ...interpolationValues } = options;\n\t\t\t\tif (Object.keys(interpolationValues).length > 0) {\n\t\t\t\t\tvalue = interpolate(value, interpolationValues);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn value;\n\t\t},\n\n\t\texists(key: string): boolean {\n\t\t\tconst langResources = resources[currentLanguage] || {};\n\t\t\tif (langResources[key] !== undefined) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst defaultResources = resources[config.defaultLanguage] || {};\n\t\t\treturn defaultResources[key] !== undefined;\n\t\t},\n\n\t\tformatDate(date: Date | string | number, options?: DateFormatOptions): string {\n\t\t\treturn formatDate(date, currentLanguage, options);\n\t\t},\n\n\t\tformatNumber(value: number, options?: NumberFormatOptions): string {\n\t\t\treturn formatNumber(value, currentLanguage, options);\n\t\t},\n\n\t\tformatCurrency(value: number, currency: string): string {\n\t\t\treturn formatCurrency(value, currentLanguage, currency);\n\t\t},\n\n\t\tformatRelativeTime(date: Date | string | number): string {\n\t\t\treturn formatRelativeTime(date, currentLanguage);\n\t\t},\n\n\t\tformatPercent(value: number, fractionDigits = 0): string {\n\t\t\treturn formatPercent(value, currentLanguage, fractionDigits);\n\t\t},\n\n\t\tonLanguageChange(callback: (lang: string) => void): () => void {\n\t\t\tlisteners.add(callback);\n\t\t\treturn () => {\n\t\t\t\tlisteners.delete(callback);\n\t\t\t};\n\t\t},\n\t};\n}\n","/**\n * Constants for locale management.\n * Separated from i18n-provider.tsx to preserve HMR boundaries.\n * See: specs/HMR.md — Standard I: Single-Authority Export Mandate\n */\n\n/** localStorage key used to persist the selected locale. */\nexport const LOCALE_STORAGE_KEY = \"judo-locale\";\n","/**\n * React integration for i18next.\n *\n * Provides an I18nProvider that initializes i18next with the application's\n * default language and an optional async locale loader. If no locale loader\n * is provided, translations are skipped and model labels are used as-is.\n */\n\nimport i18next, { type i18n as I18nInstance } from \"i18next\";\nimport { type ReactNode, createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from \"react\";\nimport { I18nextProvider, initReactI18next } from \"react-i18next\";\nimport { LOCALE_STORAGE_KEY } from \"./locale-constants\";\n\n/**\n * Read the persisted locale from localStorage.\n * Returns null if not available (SSR, no stored value, or storage error).\n */\nfunction readPersistedLocale(): string | null {\n\ttry {\n\t\treturn typeof window !== \"undefined\" ? localStorage.getItem(LOCALE_STORAGE_KEY) : null;\n\t} catch {\n\t\t// localStorage may be blocked (e.g. incognito in some browsers)\n\t\treturn null;\n\t}\n}\n\n/**\n * Write the selected locale to localStorage.\n * Silently ignores errors (e.g. storage full, blocked).\n */\nfunction writePersistedLocale(locale: string): void {\n\ttry {\n\t\tif (typeof window !== \"undefined\") {\n\t\t\tlocalStorage.setItem(LOCALE_STORAGE_KEY, locale);\n\t\t}\n\t} catch {\n\t\t// Ignore storage errors\n\t}\n}\n\n// ============================================\n// CONTEXT\n// ============================================\n\n/**\n * Locale context for managing the active locale and available locales.\n */\nexport interface LocaleContextType {\n\t/** Current active locale code (e.g., \"en-US\") */\n\tlocale: string;\n\t/** Change the active locale. Triggers async translation loading if a loader is configured. */\n\tsetLocale: (locale: string) => Promise<void>;\n\t/** Map of supported locale codes to their display labels */\n\tlocales: Record<string, string>;\n\t/** Whether translations are available (a locale loader was provided) */\n\thasTranslations: boolean;\n\t/** The i18next instance */\n\ti18n: I18nInstance;\n\t/**\n\t * Map of element sourceId (xmi:id) to human-readable translation key path.\n\t * Generated by codegen. When present, useModelLabel uses this to resolve keys.\n\t * When absent, falls back to the legacy type.sourceId.property format.\n\t */\n\ttranslationKeyMap?: Record<string, string>;\n}\n\nconst LocaleContext = createContext<LocaleContextType | null>(null);\n\n// ============================================\n// PROVIDER\n// ============================================\n\nexport interface I18nProviderProps {\n\t/**\n\t * Default locale from the Application model.\n\t * Falls back to \"en-US\" if not specified.\n\t */\n\tdefaultLocale?: string;\n\n\t/**\n\t * Supported locales. Keys are ISO locale codes, values are display labels.\n\t * @example { \"en-US\": \"English\", \"hu-HU\": \"Magyar\" }\n\t */\n\tlocales?: Record<string, string>;\n\n\t/**\n\t * Async locale loader function. Called with the locale code, must return\n\t * a flat key→value translation map compatible with i18next.\n\t *\n\t * If not provided, translations are skipped and model labels are used via\n\t * `defaultValue` fallback in `t()` calls.\n\t */\n\tlocaleLoader?: (locale: string) => Promise<Record<string, string>>;\n\n\t/**\n\t * Map of element sourceId (xmi:id) to human-readable translation key path.\n\t * Generated by codegen (`_translation-key-map.ts`).\n\t * When provided, useModelLabel() uses this map to resolve element translation keys\n\t * instead of the legacy type-based format.\n\t */\n\ttranslationKeyMap?: Record<string, string>;\n\n\t/**\n\t * When true, persists the selected locale to localStorage and restores it\n\t * on subsequent visits. The stored locale is only used if it appears in the\n\t * supported `locales` map; otherwise the `defaultLocale` is used.\n\t *\n\t * @default false\n\t */\n\tpersistLocale?: boolean;\n\n\tchildren: ReactNode;\n}\n\n/**\n * I18n provider that wraps the application with react-i18next.\n *\n * Initializes i18next with the model's default language and loads translations\n * via the provided `localeLoader`. Supports runtime locale switching.\n *\n * If no `localeLoader` is provided, i18next is initialized in a passthrough\n * mode where `t(key, { defaultValue })` always returns the `defaultValue`,\n * effectively using model-defined labels directly.\n */\nexport function I18nProvider({\n\tdefaultLocale = \"en-US\",\n\tlocales,\n\tlocaleLoader,\n\ttranslationKeyMap,\n\tpersistLocale = false,\n\tchildren,\n}: I18nProviderProps) {\n\tconst effectiveLocales = useMemo<Record<string, string>>(\n\t\t() => locales ?? { [defaultLocale]: defaultLocale },\n\t\t[locales, defaultLocale]\n\t);\n\n\tconst hasTranslations = localeLoader != null;\n\n\t// Resolve the initial locale: prefer persisted value (if valid), else use defaultLocale.\n\t// This runs during initialization (used in useState/i18next init) — not a hook.\n\tfunction getInitialLocale(): string {\n\t\tif (persistLocale) {\n\t\t\tconst stored = readPersistedLocale();\n\t\t\tif (stored && stored in effectiveLocales) {\n\t\t\t\treturn stored;\n\t\t\t}\n\t\t}\n\t\treturn defaultLocale;\n\t}\n\n\t// Create and initialize i18next instance once\n\tconst i18nRef = useRef<I18nInstance | null>(null);\n\tconst [ready, setReady] = useState(false);\n\tconst [currentLocale, setCurrentLocale] = useState(getInitialLocale);\n\tconst initPromiseRef = useRef<Promise<void> | null>(null);\n\n\tif (i18nRef.current === null) {\n\t\tconst initialLocale = getInitialLocale();\n\t\t// oxlint-disable-next-line import/no-named-as-default-member -- i18next.createInstance() is the idiomatic API\n\t\tconst instance = i18next.createInstance();\n\t\tinstance.use(initReactI18next);\n\t\ti18nRef.current = instance;\n\n\t\t// Start initialization synchronously (the promise is awaited in useEffect)\n\t\tinitPromiseRef.current = instance\n\t\t\t.init({\n\t\t\t\tlng: initialLocale,\n\t\t\t\tfallbackLng: \"en-US\",\n\t\t\t\tkeySeparator: false,\n\t\t\t\tinterpolation: {\n\t\t\t\t\tescapeValue: false, // React handles escaping\n\t\t\t\t},\n\t\t\t\tresources: {},\n\t\t\t\t// If no loader, returnNull: false ensures t() returns key or defaultValue\n\t\t\t\treturnNull: false,\n\t\t\t\tshowSupportNotice: false,\n\t\t\t})\n\t\t\t.then(() => {});\n\t}\n\n\tconst i18n = i18nRef.current!;\n\n\t// Capture initial values in refs for the initialization effect\n\tconst localeLoaderRef = useRef(localeLoader);\n\tconst initialLocaleRef = useRef(currentLocale);\n\n\t// Load translations for initial locale\n\tuseEffect(() => {\n\t\tlet cancelled = false;\n\t\tconst loader = localeLoaderRef.current;\n\t\tconst locale = initialLocaleRef.current;\n\n\t\tasync function loadInitialTranslations() {\n\t\t\t// Wait for i18next init\n\t\t\tif (initPromiseRef.current) {\n\t\t\t\tawait initPromiseRef.current;\n\t\t\t}\n\n\t\t\tif (cancelled) return;\n\n\t\t\t// Load translations if a loader is configured\n\t\t\tif (loader) {\n\t\t\t\ttry {\n\t\t\t\t\tconst translations = await loader(locale);\n\t\t\t\t\tif (cancelled) return;\n\t\t\t\t\ti18n.addResourceBundle(locale, \"translation\", translations, true, true);\n\t\t\t\t} catch {\n\t\t\t\t\t// Translations failed to load — fall back to model labels via defaultValue\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!cancelled) {\n\t\t\t\tsetReady(true);\n\t\t\t}\n\t\t}\n\n\t\tloadInitialTranslations();\n\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t};\n\t\t// oxlint-disable-next-line react-hooks/exhaustive-deps -- Only runs once on mount; i18n is stable ref captured above\n\t}, []);\n\n\t// setLocale handler\n\tconst setLocale = useCallback(\n\t\tasync (locale: string) => {\n\t\t\tif (!(locale in effectiveLocales)) {\n\t\t\t\tthrow new Error(`Locale \"${locale}\" is not supported. Supported: ${Object.keys(effectiveLocales).join(\", \")}`);\n\t\t\t}\n\n\t\t\t// Load translations for the new locale if loader is available\n\t\t\tif (localeLoader) {\n\t\t\t\ttry {\n\t\t\t\t\tconst translations = await localeLoader(locale);\n\t\t\t\t\ti18n.addResourceBundle(locale, \"translation\", translations, true, true);\n\t\t\t\t} catch {\n\t\t\t\t\t// Translation loading failed — i18next will fall back to defaultValues\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tawait i18n.changeLanguage(locale);\n\t\t\tsetCurrentLocale(locale);\n\n\t\t\t// Persist the selected locale to localStorage\n\t\t\tif (persistLocale) {\n\t\t\t\twritePersistedLocale(locale);\n\t\t\t}\n\t\t},\n\t\t[i18n, localeLoader, effectiveLocales, persistLocale]\n\t);\n\n\t// Context value\n\tconst contextValue = useMemo<LocaleContextType>(\n\t\t() => ({\n\t\t\tlocale: currentLocale,\n\t\t\tsetLocale,\n\t\t\tlocales: effectiveLocales,\n\t\t\thasTranslations,\n\t\t\ti18n,\n\t\t\ttranslationKeyMap,\n\t\t}),\n\t\t[currentLocale, setLocale, effectiveLocales, hasTranslations, i18n, translationKeyMap]\n\t);\n\n\t// Don't render until i18next is initialized and initial translations are loaded\n\tif (!ready) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<LocaleContext.Provider value={contextValue}>\n\t\t\t<I18nextProvider i18n={i18n}>{children}</I18nextProvider>\n\t\t</LocaleContext.Provider>\n\t);\n}\n\n// ============================================\n// HOOKS\n// ============================================\n\n/**\n * Hook to access locale context.\n * Provides the current locale, a setter for changing it, and available locales.\n *\n * @throws If used outside I18nProvider.\n */\nexport function useLocale(): LocaleContextType {\n\tconst context = useContext(LocaleContext);\n\tif (!context) {\n\t\tthrow new Error(\"useLocale must be used within I18nProvider\");\n\t}\n\treturn context;\n}\n\n/**\n * Hook to access locale context (optional).\n * Returns null if used outside I18nProvider.\n */\nexport function useLocaleOptional(): LocaleContextType | null {\n\treturn useContext(LocaleContext);\n}\n","/**\n * Hook for translating model element labels.\n *\n * Uses react-i18next's `useTranslation()` to look up the translation key\n * generated from the element, falling back to the model-defined label.\n *\n * When a `translationKeyMap` is provided via `I18nProvider`, the hook resolves\n * the element's `xmi:id` to a human-readable tree-path key (e.g.,\n * `\"PageName.container.input\"`). Without the map, it falls back to the legacy\n * type-based key format (`\"textinput.sourceId.label\"`).\n *\n * When no locale loader is configured (no translations available), the\n * `defaultValue` path is used, which returns `element.label ?? element.name`.\n */\n\nimport { useTranslation } from \"react-i18next\";\nimport { useLocaleOptional } from \"./i18n-provider\";\nimport { getTranslationKey } from \"./translation-keys\";\n\n/**\n * Resolved label result from the useModelLabel hook.\n */\nexport interface ModelLabelResult {\n\t/**\n\t * The translated label string. Falls back to `element.label ?? element.name`\n\t * when no translation is found.\n\t */\n\tlabel: string;\n\t/**\n\t * The translation key used for lookup.\n\t * Useful for debugging or for providing in test IDs.\n\t */\n\ttranslationKey: string;\n}\n\n/**\n * Hook to get a translated label for a model element.\n *\n * Resolves the translation key in two ways (in order of preference):\n * 1. If a `translationKeyMap` is configured (via codegen), looks up the element's\n * `xmi:id` to get a human-readable path key (e.g., `\"PageName.container.input\"`)\n * 2. Falls back to the legacy format: `{elementType}.{sourceId|name}.{property}`\n *\n * @param element - The model element (must have `name`; optionally `xmi:id`, `@type`, `sourceId`, `label`)\n * @param property - The property to translate (defaults to \"label\")\n * @returns The translated label and the translation key\n *\n * @example\n * ```tsx\n * function MyInput({ element }: { element: TextInput }) {\n * const { label } = useModelLabel(element);\n * return <TextField label={label} />;\n * }\n * ```\n */\nexport function useModelLabel(\n\telement: {\n\t\t\"xmi:id\"?: string;\n\t\tsourceId?: string;\n\t\tname: string;\n\t\t\"@type\"?: string;\n\t\tlabel?: string;\n\t},\n\tproperty: \"label\" | \"placeholder\" | \"tooltip\" | \"confirmationMessage\" = \"label\"\n): ModelLabelResult {\n\tconst { t } = useTranslation();\n\tconst localeCtx = useLocaleOptional();\n\n\t// Resolve the translation key:\n\t// 1. If translationKeyMap is available, use it (human-readable tree path)\n\t// 2. Otherwise fall back to the legacy type.sourceId.property format\n\tlet translationKey: string;\n\tconst keyMap = localeCtx?.translationKeyMap;\n\tconst elementId = element[\"xmi:id\"];\n\n\tif (keyMap && elementId && keyMap[elementId]) {\n\t\ttranslationKey = keyMap[elementId];\n\t} else {\n\t\ttranslationKey = getTranslationKey(element, property);\n\t}\n\n\tconst defaultValue = element.label ?? element.name;\n\tconst label = t(translationKey, { defaultValue });\n\n\treturn { label, translationKey };\n}\n"],"x_google_ignoreList":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"mappings":";;;;AAQA,SAAgB,kBACf,GACA,IAAwE,SAC/D;CACT,IAAM,IAAK,EAAQ,YAAY,EAAQ;AAIvC,QAAO,IAHS,EAAQ,YAAY,WAEf,QAAQ,iBAAiB,GAAG,CAAC,aAAa,CAChD,GAAG,EAAG,GAAG;;AAWzB,SAAgB,oBAAoB,GAAkB,GAAqB;AAC1E,QAAO,UAAU,EAAS,GAAG;;AAU9B,SAAgB,wBAAwB,GAAqD;AAE5F,QAAO,UADI,EAAO,YAAY,EAAO,KACjB;;AAWrB,SAAgB,sBAAsB,GAAkB,GAAuB;AAC9E,QAAO,QAAQ,EAAS,GAAG;;AAU5B,SAAgB,yBAAyB,GAAmD;AAE3F,QAAO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;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,aAAa;EACX,YAAY;EACZ,iBAAiB;EAClB;CAED,kBAAkB;EAChB,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,UAAU;EACR,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,aAAa;EACX,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,QAAQ;EACN,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,OAAO;EACL,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,aAAa;EACX,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,QAAQ;EACN,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,cAAc;EACZ,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,SAAS;EACP,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,aAAa;EACX,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,QAAQ;EACN,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,YAAY;EACV,YAAY;GACV,KAAK;GACL,OAAO;GACR;EACD,iBAAiB;GACf,KAAK;GACL,OAAO;GACR;EACF;CAED,cAAc;EACZ,YAAY;GACV,KAAK;GACL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AAiB,EAAO,EAGpB,KACH,qBAAqB,EAAO;IAG9B;EAAC;EAAM;EAAc;EAAkB;EAAc,CACrD,EAGK,IAAe,eACb;EACN,QAAQ;EACR;EACA,SAAS;EACT;EACA;EACA;EACA,GACD;EAAC;EAAe;EAAW;EAAkB;EAAiB;EAAM;EAAkB,CACtF;AAOD,QAJK,IAKJ,oBAAC,cAAc,UAAA;EAAS,OAAO;YAC9B,oBAAC,iBAAA;GAAsB;GAAO;IAA2B;GACjC,GANlB;;AAoBT,SAAgB,YAA+B;CAC9C,IAAM,IAAU,WAAW,cAAc;AACzC,KAAI,CAAC,EACJ,OAAU,MAAM,6CAA6C;AAE9D,QAAO;;AAOR,SAAgB,oBAA8C;AAC7D,QAAO,WAAW,cAAc;;ACtPjC,SAAgB,cACf,GAOA,IAAwE,SACrD;CACnB,IAAM,EAAE,SAAM,gBAAgB,EACxB,IAAY,mBAAmB,EAKjCC,GACE,IAAS,GAAW,mBACpB,IAAY,EAAQ;AAW1B,QATA,AAGC,IAHG,KAAU,KAAa,EAAO,KAChB,EAAO,KAEP,kBAAkB,GAAS,EAAS,EAM/C;EAAE,OAFK,EAAE,GAAgB,EAAE,cADb,EAAQ,SAAS,EAAQ,MACE,CAAC;EAEjC;EAAgB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Constants for locale management.
3
+ * Separated from i18n-provider.tsx to preserve HMR boundaries.
4
+ * See: specs/HMR.md — Standard I: Single-Authority Export Mandate
5
+ */
6
+ /** localStorage key used to persist the selected locale. */
7
+ export declare const LOCALE_STORAGE_KEY = "judo-locale";
8
+ //# sourceMappingURL=locale-constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale-constants.d.ts","sourceRoot":"","sources":["../src/locale-constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,4DAA4D;AAC5D,eAAO,MAAM,kBAAkB,gBAAgB,CAAC"}