main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;

View File

@@ -0,0 +1,2 @@
import type { FormatDistanceFn } from "../../types.js";
export declare const formatDistance: FormatDistanceFn;

105
node_modules/date-fns/locale/hy/_lib/formatDistance.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "ավելի քիչ քան 1 վայրկյան",
other: "ավելի քիչ քան {{count}} վայրկյան",
},
xSeconds: {
one: "1 վայրկյան",
other: "{{count}} վայրկյան",
},
halfAMinute: "կես րոպե",
lessThanXMinutes: {
one: "ավելի քիչ քան 1 րոպե",
other: "ավելի քիչ քան {{count}} րոպե",
},
xMinutes: {
one: "1 րոպե",
other: "{{count}} րոպե",
},
aboutXHours: {
one: "մոտ 1 ժամ",
other: "մոտ {{count}} ժամ",
},
xHours: {
one: "1 ժամ",
other: "{{count}} ժամ",
},
xDays: {
one: "1 օր",
other: "{{count}} օր",
},
aboutXWeeks: {
one: "մոտ 1 շաբաթ",
other: "մոտ {{count}} շաբաթ",
},
xWeeks: {
one: "1 շաբաթ",
other: "{{count}} շաբաթ",
},
aboutXMonths: {
one: "մոտ 1 ամիս",
other: "մոտ {{count}} ամիս",
},
xMonths: {
one: "1 ամիս",
other: "{{count}} ամիս",
},
aboutXYears: {
one: "մոտ 1 տարի",
other: "մոտ {{count}} տարի",
},
xYears: {
one: "1 տարի",
other: "{{count}} տարի",
},
overXYears: {
one: "ավելի քան 1 տարի",
other: "ավելի քան {{count}} տարի",
},
almostXYears: {
one: "համարյա 1 տարի",
other: "համարյա {{count}} տարի",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + " հետո";
} else {
return result + " առաջ";
}
}
return result;
};
exports.formatDistance = formatDistance;

101
node_modules/date-fns/locale/hy/_lib/formatDistance.mjs generated vendored Normal file
View File

@@ -0,0 +1,101 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: "ավելի քիչ քան 1 վայրկյան",
other: "ավելի քիչ քան {{count}} վայրկյան",
},
xSeconds: {
one: "1 վայրկյան",
other: "{{count}} վայրկյան",
},
halfAMinute: "կես րոպե",
lessThanXMinutes: {
one: "ավելի քիչ քան 1 րոպե",
other: "ավելի քիչ քան {{count}} րոպե",
},
xMinutes: {
one: "1 րոպե",
other: "{{count}} րոպե",
},
aboutXHours: {
one: "մոտ 1 ժամ",
other: "մոտ {{count}} ժամ",
},
xHours: {
one: "1 ժամ",
other: "{{count}} ժամ",
},
xDays: {
one: "1 օր",
other: "{{count}} օր",
},
aboutXWeeks: {
one: "մոտ 1 շաբաթ",
other: "մոտ {{count}} շաբաթ",
},
xWeeks: {
one: "1 շաբաթ",
other: "{{count}} շաբաթ",
},
aboutXMonths: {
one: "մոտ 1 ամիս",
other: "մոտ {{count}} ամիս",
},
xMonths: {
one: "1 ամիս",
other: "{{count}} ամիս",
},
aboutXYears: {
one: "մոտ 1 տարի",
other: "մոտ {{count}} տարի",
},
xYears: {
one: "1 տարի",
other: "{{count}} տարի",
},
overXYears: {
one: "ավելի քան 1 տարի",
other: "ավելի քան {{count}} տարի",
},
almostXYears: {
one: "համարյա 1 տարի",
other: "համարյա {{count}} տարի",
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + " հետո";
} else {
return result + " առաջ";
}
}
return result;
};

View File

@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;

2
node_modules/date-fns/locale/hy/_lib/formatLong.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { FormatLong } from "../../types.js";
export declare const formatLong: FormatLong;

41
node_modules/date-fns/locale/hy/_lib/formatLong.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "d MMMM, y, EEEE",
long: "d MMMM, y",
medium: "d MMM, y",
short: "dd.MM.yyyy",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'ժ․'{{time}}",
long: "{{date}} 'ժ․'{{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

39
node_modules/date-fns/locale/hy/_lib/formatLong.mjs generated vendored Normal file
View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "d MMMM, y, EEEE",
long: "d MMMM, y",
medium: "d MMM, y",
short: "dd.MM.yyyy",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'ժ․'{{time}}",
long: "{{date}} 'ժ․'{{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;

View File

@@ -0,0 +1,2 @@
import type { FormatRelativeFn } from "../../types.js";
export declare const formatRelative: FormatRelativeFn;

15
node_modules/date-fns/locale/hy/_lib/formatRelative.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "'նախորդ' eeee p'֊ին'",
yesterday: "'երեկ' p'֊ին'",
today: "'այսօր' p'֊ին'",
tomorrow: "'վաղը' p'֊ին'",
nextWeek: "'հաջորդ' eeee p'֊ին'",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "'նախորդ' eeee p'֊ին'",
yesterday: "'երեկ' p'֊ին'",
today: "'այսօր' p'֊ին'",
tomorrow: "'վաղը' p'֊ին'",
nextWeek: "'հաջորդ' eeee p'֊ին'",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];

2
node_modules/date-fns/locale/hy/_lib/localize.d.mts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;

2
node_modules/date-fns/locale/hy/_lib/localize.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Localize } from "../../types.js";
export declare const localize: Localize;

180
node_modules/date-fns/locale/hy/_lib/localize.js generated vendored Normal file
View File

@@ -0,0 +1,180 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["Ք", "Մ"],
abbreviated: ["ՔԱ", "ՄԹ"],
wide: ["Քրիստոսից առաջ", "Մեր թվարկության"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Ք1", "Ք2", "Ք3", "Ք4"],
wide: ["1֊ին քառորդ", "2֊րդ քառորդ", "3֊րդ քառորդ", "4֊րդ քառորդ"],
};
const monthValues = {
narrow: ["Հ", "Փ", "Մ", "Ա", "Մ", "Հ", "Հ", "Օ", "Ս", "Հ", "Ն", "Դ"],
abbreviated: [
"հուն",
"փետ",
"մար",
"ապր",
"մայ",
"հուն",
"հուլ",
"օգս",
"սեպ",
"հոկ",
"նոյ",
"դեկ",
],
wide: [
"հունվար",
"փետրվար",
"մարտ",
"ապրիլ",
"մայիս",
"հունիս",
"հուլիս",
"օգոստոս",
"սեպտեմբեր",
"հոկտեմբեր",
"նոյեմբեր",
"դեկտեմբեր",
],
};
const dayValues = {
narrow: ["Կ", "Ե", "Ե", "Չ", "Հ", "Ո", "Շ"],
short: ["կր", "եր", "եք", "չք", "հգ", "ուր", "շբ"],
abbreviated: ["կիր", "երկ", "երք", "չոր", "հնգ", "ուրբ", "շաբ"],
wide: [
"կիրակի",
"երկուշաբթի",
"երեքշաբթի",
"չորեքշաբթի",
"հինգշաբթի",
"ուրբաթ",
"շաբաթ",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "կեսգշ",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "կեսգիշեր",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "կեսգիշեր",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "կեսգշ",
noon: "կեսօր",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "կեսգիշերին",
noon: "կեսօրին",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "կեսգիշերին",
noon: "կեսօրին",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
// If ordinal numbers depend on context, for example,
// if they are different for different grammatical genders,
// use `options.unit`.
//
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
// 'day', 'hour', 'minute', 'second'.
const rem100 = number % 100;
if (rem100 < 10) {
if (rem100 % 10 === 1) {
return number + "֊ին";
}
}
return number + "֊րդ";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

178
node_modules/date-fns/locale/hy/_lib/localize.mjs generated vendored Normal file
View File

@@ -0,0 +1,178 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["Ք", "Մ"],
abbreviated: ["ՔԱ", "ՄԹ"],
wide: ["Քրիստոսից առաջ", "Մեր թվարկության"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Ք1", "Ք2", "Ք3", "Ք4"],
wide: ["1֊ին քառորդ", "2֊րդ քառորդ", "3֊րդ քառորդ", "4֊րդ քառորդ"],
};
const monthValues = {
narrow: ["Հ", "Փ", "Մ", "Ա", "Մ", "Հ", "Հ", "Օ", "Ս", "Հ", "Ն", "Դ"],
abbreviated: [
"հուն",
"փետ",
"մար",
"ապր",
"մայ",
"հուն",
"հուլ",
"օգս",
"սեպ",
"հոկ",
"նոյ",
"դեկ",
],
wide: [
"հունվար",
"փետրվար",
"մարտ",
"ապրիլ",
"մայիս",
"հունիս",
"հուլիս",
"օգոստոս",
"սեպտեմբեր",
"հոկտեմբեր",
"նոյեմբեր",
"դեկտեմբեր",
],
};
const dayValues = {
narrow: ["Կ", "Ե", "Ե", "Չ", "Հ", "Ո", "Շ"],
short: ["կր", "եր", "եք", "չք", "հգ", "ուր", "շբ"],
abbreviated: ["կիր", "երկ", "երք", "չոր", "հնգ", "ուրբ", "շաբ"],
wide: [
"կիրակի",
"երկուշաբթի",
"երեքշաբթի",
"չորեքշաբթի",
"հինգշաբթի",
"ուրբաթ",
"շաբաթ",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "կեսգշ",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "կեսգիշեր",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "կեսգիշեր",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "կեսգշ",
noon: "կեսօր",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "կեսգիշերին",
noon: "կեսօրին",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "կեսգիշերին",
noon: "կեսօրին",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
// If ordinal numbers depend on context, for example,
// if they are different for different grammatical genders,
// use `options.unit`.
//
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
// 'day', 'hour', 'minute', 'second'.
const rem100 = number % 100;
if (rem100 < 10) {
if (rem100 % 10 === 1) {
return number + "֊ին";
}
}
return number + "֊րդ";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

2
node_modules/date-fns/locale/hy/_lib/match.d.mts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;

2
node_modules/date-fns/locale/hy/_lib/match.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { Match } from "../../types.js";
export declare const match: Match;

138
node_modules/date-fns/locale/hy/_lib/match.js generated vendored Normal file
View File

@@ -0,0 +1,138 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)((-|֊)?(ին|րդ))?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(Ք|Մ)/i,
abbreviated: /^(Ք\.?\s?Ա\.?|Մ\.?\s?Թ\.?\s?Ա\.?|Մ\.?\s?Թ\.?|Ք\.?\s?Հ\.?)/i,
wide: /^(քրիստոսից առաջ|մեր թվարկությունից առաջ|մեր թվարկության|քրիստոսից հետո)/i,
};
const parseEraPatterns = {
any: [/^ք/i, /^մ/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^ք[1234]/i,
wide: /^[1234]((-|֊)?(ին|րդ)) քառորդ/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[հփմաօսնդ]/i,
abbreviated: /^(հուն|փետ|մար|ապր|մայ|հուն|հուլ|օգս|սեպ|հոկ|նոյ|դեկ)/i,
wide: /^(հունվար|փետրվար|մարտ|ապրիլ|մայիս|հունիս|հուլիս|օգոստոս|սեպտեմբեր|հոկտեմբեր|նոյեմբեր|դեկտեմբեր)/i,
};
const parseMonthPatterns = {
narrow: [
/^հ/i,
/^փ/i,
/^մ/i,
/^ա/i,
/^մ/i,
/^հ/i,
/^հ/i,
/^օ/i,
/^ս/i,
/^հ/i,
/^ն/i,
/^դ/i,
],
any: [
/^հու/i,
/^փ/i,
/^մար/i,
/^ա/i,
/^մայ/i,
/^հուն/i,
/^հուլ/i,
/^օ/i,
/^ս/i,
/^հոկ/i,
/^ն/i,
/^դ/i,
],
};
const matchDayPatterns = {
narrow: /^[եչհոշկ]/i,
short: /^(կր|եր|եք|չք|հգ|ուր|շբ)/i,
abbreviated: /^(կիր|երկ|երք|չոր|հնգ|ուրբ|շաբ)/i,
wide: /^(կիրակի|երկուշաբթի|երեքշաբթի|չորեքշաբթի|հինգշաբթի|ուրբաթ|շաբաթ)/i,
};
const parseDayPatterns = {
narrow: [/^կ/i, /^ե/i, /^ե/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
short: [/^կ/i, /^եր/i, /^եք/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
abbreviated: [/^կ/i, /^երկ/i, /^երք/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
wide: [/^կ/i, /^երկ/i, /^երե/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
};
const matchDayPeriodPatterns = {
narrow: /^([ap]|կեսգշ|կեսօր|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,
any: /^([ap]\.?\s?m\.?|կեսգիշեր(ին)?|կեսօր(ին)?|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /կեսգիշեր/i,
noon: /կեսօր/i,
morning: /առավոտ/i,
afternoon: /ցերեկ/i,
evening: /երեկո/i,
night: /գիշեր/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

135
node_modules/date-fns/locale/hy/_lib/match.mjs generated vendored Normal file
View File

@@ -0,0 +1,135 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)((-|֊)?(ին|րդ))?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(Ք|Մ)/i,
abbreviated: /^(Ք\.?\s?Ա\.?|Մ\.?\s?Թ\.?\s?Ա\.?|Մ\.?\s?Թ\.?|Ք\.?\s?Հ\.?)/i,
wide: /^(քրիստոսից առաջ|մեր թվարկությունից առաջ|մեր թվարկության|քրիստոսից հետո)/i,
};
const parseEraPatterns = {
any: [/^ք/i, /^մ/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^ք[1234]/i,
wide: /^[1234]((-|֊)?(ին|րդ)) քառորդ/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[հփմաօսնդ]/i,
abbreviated: /^(հուն|փետ|մար|ապր|մայ|հուն|հուլ|օգս|սեպ|հոկ|նոյ|դեկ)/i,
wide: /^(հունվար|փետրվար|մարտ|ապրիլ|մայիս|հունիս|հուլիս|օգոստոս|սեպտեմբեր|հոկտեմբեր|նոյեմբեր|դեկտեմբեր)/i,
};
const parseMonthPatterns = {
narrow: [
/^հ/i,
/^փ/i,
/^մ/i,
/^ա/i,
/^մ/i,
/^հ/i,
/^հ/i,
/^օ/i,
/^ս/i,
/^հ/i,
/^ն/i,
/^դ/i,
],
any: [
/^հու/i,
/^փ/i,
/^մար/i,
/^ա/i,
/^մայ/i,
/^հուն/i,
/^հուլ/i,
/^օ/i,
/^ս/i,
/^հոկ/i,
/^ն/i,
/^դ/i,
],
};
const matchDayPatterns = {
narrow: /^[եչհոշկ]/i,
short: /^(կր|եր|եք|չք|հգ|ուր|շբ)/i,
abbreviated: /^(կիր|երկ|երք|չոր|հնգ|ուրբ|շաբ)/i,
wide: /^(կիրակի|երկուշաբթի|երեքշաբթի|չորեքշաբթի|հինգշաբթի|ուրբաթ|շաբաթ)/i,
};
const parseDayPatterns = {
narrow: [/^կ/i, /^ե/i, /^ե/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
short: [/^կ/i, /^եր/i, /^եք/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
abbreviated: [/^կ/i, /^երկ/i, /^երք/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
wide: [/^կ/i, /^երկ/i, /^երե/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
};
const matchDayPeriodPatterns = {
narrow: /^([ap]|կեսգշ|կեսօր|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,
any: /^([ap]\.?\s?m\.?|կեսգիշեր(ին)?|կեսօր(ին)?|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /կեսգիշեր/i,
noon: /կեսօր/i,
morning: /առավոտ/i,
afternoon: /ցերեկ/i,
evening: /երեկո/i,
night: /գիշեր/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};