registration
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { numberToLocale } from "./localize.mjs";
|
||||
"use strict";
|
||||
exports.formatDistance = void 0;
|
||||
var _index = require("./localize.cjs");
|
||||
|
||||
// Source: https://www.unicode.org/cldr/charts/32/summary/hi.html
|
||||
|
||||
@@ -81,7 +83,7 @@ const formatDistanceLocale = {
|
||||
},
|
||||
};
|
||||
|
||||
export const formatDistance = (token, count, options) => {
|
||||
const formatDistance = (token, count, options) => {
|
||||
let result;
|
||||
|
||||
const tokenValue = formatDistanceLocale[token];
|
||||
@@ -90,7 +92,10 @@ export const formatDistance = (token, count, options) => {
|
||||
} else if (count === 1) {
|
||||
result = tokenValue.one;
|
||||
} else {
|
||||
result = tokenValue.other.replace("{{count}}", numberToLocale(count));
|
||||
result = tokenValue.other.replace(
|
||||
"{{count}}",
|
||||
(0, _index.numberToLocale)(count),
|
||||
);
|
||||
}
|
||||
|
||||
if (options?.addSuffix) {
|
||||
@@ -103,3 +108,4 @@ export const formatDistance = (token, count, options) => {
|
||||
|
||||
return result;
|
||||
};
|
||||
exports.formatDistance = formatDistance;
|
||||
12
frontend/style/node_modules/date-fns/locale/hi/_lib/formatDistance.js
generated
vendored
12
frontend/style/node_modules/date-fns/locale/hi/_lib/formatDistance.js
generated
vendored
@@ -1,6 +1,4 @@
|
||||
"use strict";
|
||||
exports.formatDistance = void 0;
|
||||
var _index = require("./localize.js");
|
||||
import { numberToLocale } from "./localize.js";
|
||||
|
||||
// Source: https://www.unicode.org/cldr/charts/32/summary/hi.html
|
||||
|
||||
@@ -83,7 +81,7 @@ const formatDistanceLocale = {
|
||||
},
|
||||
};
|
||||
|
||||
const formatDistance = (token, count, options) => {
|
||||
export const formatDistance = (token, count, options) => {
|
||||
let result;
|
||||
|
||||
const tokenValue = formatDistanceLocale[token];
|
||||
@@ -92,10 +90,7 @@ const formatDistance = (token, count, options) => {
|
||||
} else if (count === 1) {
|
||||
result = tokenValue.one;
|
||||
} else {
|
||||
result = tokenValue.other.replace(
|
||||
"{{count}}",
|
||||
(0, _index.numberToLocale)(count),
|
||||
);
|
||||
result = tokenValue.other.replace("{{count}}", numberToLocale(count));
|
||||
}
|
||||
|
||||
if (options?.addSuffix) {
|
||||
@@ -108,4 +103,3 @@ const formatDistance = (token, count, options) => {
|
||||
|
||||
return result;
|
||||
};
|
||||
exports.formatDistance = formatDistance;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
|
||||
"use strict";
|
||||
exports.formatLong = void 0;
|
||||
var _index = require("../../_lib/buildFormatLongFn.cjs");
|
||||
|
||||
const dateFormats = {
|
||||
full: "EEEE, do MMMM, y", // CLDR #1787
|
||||
@@ -21,19 +23,19 @@ const dateTimeFormats = {
|
||||
short: "{{date}}, {{time}}", // CLDR #1798
|
||||
};
|
||||
|
||||
export const formatLong = {
|
||||
date: buildFormatLongFn({
|
||||
const formatLong = (exports.formatLong = {
|
||||
date: (0, _index.buildFormatLongFn)({
|
||||
formats: dateFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
|
||||
time: buildFormatLongFn({
|
||||
time: (0, _index.buildFormatLongFn)({
|
||||
formats: timeFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
|
||||
dateTime: buildFormatLongFn({
|
||||
dateTime: (0, _index.buildFormatLongFn)({
|
||||
formats: dateTimeFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
};
|
||||
});
|
||||
14
frontend/style/node_modules/date-fns/locale/hi/_lib/formatLong.js
generated
vendored
14
frontend/style/node_modules/date-fns/locale/hi/_lib/formatLong.js
generated
vendored
@@ -1,6 +1,4 @@
|
||||
"use strict";
|
||||
exports.formatLong = void 0;
|
||||
var _index = require("../../_lib/buildFormatLongFn.js");
|
||||
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
|
||||
|
||||
const dateFormats = {
|
||||
full: "EEEE, do MMMM, y", // CLDR #1787
|
||||
@@ -23,19 +21,19 @@ const dateTimeFormats = {
|
||||
short: "{{date}}, {{time}}", // CLDR #1798
|
||||
};
|
||||
|
||||
const formatLong = (exports.formatLong = {
|
||||
date: (0, _index.buildFormatLongFn)({
|
||||
export const formatLong = {
|
||||
date: buildFormatLongFn({
|
||||
formats: dateFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
|
||||
time: (0, _index.buildFormatLongFn)({
|
||||
time: buildFormatLongFn({
|
||||
formats: timeFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
|
||||
dateTime: (0, _index.buildFormatLongFn)({
|
||||
dateTime: buildFormatLongFn({
|
||||
formats: dateTimeFormats,
|
||||
defaultWidth: "full",
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
"use strict";
|
||||
exports.formatRelative = void 0;
|
||||
|
||||
const formatRelativeLocale = {
|
||||
lastWeek: "'पिछले' eeee p",
|
||||
yesterday: "'कल' p",
|
||||
@@ -7,5 +10,6 @@ const formatRelativeLocale = {
|
||||
other: "P",
|
||||
};
|
||||
|
||||
export const formatRelative = (token, _date, _baseDate, _options) =>
|
||||
const formatRelative = (token, _date, _baseDate, _options) =>
|
||||
formatRelativeLocale[token];
|
||||
exports.formatRelative = formatRelative;
|
||||
6
frontend/style/node_modules/date-fns/locale/hi/_lib/formatRelative.js
generated
vendored
6
frontend/style/node_modules/date-fns/locale/hi/_lib/formatRelative.js
generated
vendored
@@ -1,6 +1,3 @@
|
||||
"use strict";
|
||||
exports.formatRelative = void 0;
|
||||
|
||||
const formatRelativeLocale = {
|
||||
lastWeek: "'पिछले' eeee p",
|
||||
yesterday: "'कल' p",
|
||||
@@ -10,6 +7,5 @@ const formatRelativeLocale = {
|
||||
other: "P",
|
||||
};
|
||||
|
||||
const formatRelative = (token, _date, _baseDate, _options) =>
|
||||
export const formatRelative = (token, _date, _baseDate, _options) =>
|
||||
formatRelativeLocale[token];
|
||||
exports.formatRelative = formatRelative;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
|
||||
"use strict";
|
||||
exports.localeToNumber = localeToNumber;
|
||||
exports.localize = void 0;
|
||||
exports.numberToLocale = numberToLocale;
|
||||
var _index = require("../../_lib/buildLocalizeFn.cjs");
|
||||
|
||||
const numberValues = {
|
||||
locale: {
|
||||
@@ -181,47 +185,47 @@ const ordinalNumber = (dirtyNumber, _options) => {
|
||||
return numberToLocale(number);
|
||||
};
|
||||
|
||||
export function localeToNumber(locale) {
|
||||
function localeToNumber(locale) {
|
||||
const enNumber = locale.toString().replace(/[१२३४५६७८९०]/g, function (match) {
|
||||
return numberValues.number[match];
|
||||
});
|
||||
return Number(enNumber);
|
||||
}
|
||||
|
||||
export function numberToLocale(enNumber) {
|
||||
function numberToLocale(enNumber) {
|
||||
return enNumber.toString().replace(/\d/g, function (match) {
|
||||
return numberValues.locale[match];
|
||||
});
|
||||
}
|
||||
|
||||
export const localize = {
|
||||
const localize = (exports.localize = {
|
||||
ordinalNumber,
|
||||
|
||||
era: buildLocalizeFn({
|
||||
era: (0, _index.buildLocalizeFn)({
|
||||
values: eraValues,
|
||||
defaultWidth: "wide",
|
||||
}),
|
||||
|
||||
quarter: buildLocalizeFn({
|
||||
quarter: (0, _index.buildLocalizeFn)({
|
||||
values: quarterValues,
|
||||
defaultWidth: "wide",
|
||||
argumentCallback: (quarter) => quarter - 1,
|
||||
}),
|
||||
|
||||
month: buildLocalizeFn({
|
||||
month: (0, _index.buildLocalizeFn)({
|
||||
values: monthValues,
|
||||
defaultWidth: "wide",
|
||||
}),
|
||||
|
||||
day: buildLocalizeFn({
|
||||
day: (0, _index.buildLocalizeFn)({
|
||||
values: dayValues,
|
||||
defaultWidth: "wide",
|
||||
}),
|
||||
|
||||
dayPeriod: buildLocalizeFn({
|
||||
dayPeriod: (0, _index.buildLocalizeFn)({
|
||||
values: dayPeriodValues,
|
||||
defaultWidth: "wide",
|
||||
formattingValues: formattingDayPeriodValues,
|
||||
defaultFormattingWidth: "wide",
|
||||
}),
|
||||
};
|
||||
});
|
||||
24
frontend/style/node_modules/date-fns/locale/hi/_lib/localize.js
generated
vendored
24
frontend/style/node_modules/date-fns/locale/hi/_lib/localize.js
generated
vendored
@@ -1,8 +1,4 @@
|
||||
"use strict";
|
||||
exports.localeToNumber = localeToNumber;
|
||||
exports.localize = void 0;
|
||||
exports.numberToLocale = numberToLocale;
|
||||
var _index = require("../../_lib/buildLocalizeFn.js");
|
||||
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
|
||||
|
||||
const numberValues = {
|
||||
locale: {
|
||||
@@ -185,47 +181,47 @@ const ordinalNumber = (dirtyNumber, _options) => {
|
||||
return numberToLocale(number);
|
||||
};
|
||||
|
||||
function localeToNumber(locale) {
|
||||
export function localeToNumber(locale) {
|
||||
const enNumber = locale.toString().replace(/[१२३४५६७८९०]/g, function (match) {
|
||||
return numberValues.number[match];
|
||||
});
|
||||
return Number(enNumber);
|
||||
}
|
||||
|
||||
function numberToLocale(enNumber) {
|
||||
export function numberToLocale(enNumber) {
|
||||
return enNumber.toString().replace(/\d/g, function (match) {
|
||||
return numberValues.locale[match];
|
||||
});
|
||||
}
|
||||
|
||||
const localize = (exports.localize = {
|
||||
export const localize = {
|
||||
ordinalNumber,
|
||||
|
||||
era: (0, _index.buildLocalizeFn)({
|
||||
era: buildLocalizeFn({
|
||||
values: eraValues,
|
||||
defaultWidth: "wide",
|
||||
}),
|
||||
|
||||
quarter: (0, _index.buildLocalizeFn)({
|
||||
quarter: buildLocalizeFn({
|
||||
values: quarterValues,
|
||||
defaultWidth: "wide",
|
||||
argumentCallback: (quarter) => quarter - 1,
|
||||
}),
|
||||
|
||||
month: (0, _index.buildLocalizeFn)({
|
||||
month: buildLocalizeFn({
|
||||
values: monthValues,
|
||||
defaultWidth: "wide",
|
||||
}),
|
||||
|
||||
day: (0, _index.buildLocalizeFn)({
|
||||
day: buildLocalizeFn({
|
||||
values: dayValues,
|
||||
defaultWidth: "wide",
|
||||
}),
|
||||
|
||||
dayPeriod: (0, _index.buildLocalizeFn)({
|
||||
dayPeriod: buildLocalizeFn({
|
||||
values: dayPeriodValues,
|
||||
defaultWidth: "wide",
|
||||
formattingValues: formattingDayPeriodValues,
|
||||
defaultFormattingWidth: "wide",
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
|
||||
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
|
||||
import { localeToNumber } from "./localize.mjs";
|
||||
"use strict";
|
||||
exports.match = void 0;
|
||||
|
||||
var _index = require("../../_lib/buildMatchFn.cjs");
|
||||
var _index2 = require("../../_lib/buildMatchPatternFn.cjs");
|
||||
var _index3 = require("./localize.cjs");
|
||||
|
||||
const matchOrdinalNumberPattern = /^[०१२३४५६७८९]+/i;
|
||||
const parseOrdinalNumberPattern = /^[०१२३४५६७८९]+/i;
|
||||
@@ -92,21 +95,21 @@ const parseDayPeriodPatterns = {
|
||||
},
|
||||
};
|
||||
|
||||
export const match = {
|
||||
ordinalNumber: buildMatchPatternFn({
|
||||
const match = (exports.match = {
|
||||
ordinalNumber: (0, _index2.buildMatchPatternFn)({
|
||||
matchPattern: matchOrdinalNumberPattern,
|
||||
parsePattern: parseOrdinalNumberPattern,
|
||||
valueCallback: localeToNumber,
|
||||
valueCallback: _index3.localeToNumber,
|
||||
}),
|
||||
|
||||
era: buildMatchFn({
|
||||
era: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchEraPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseEraPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
quarter: buildMatchFn({
|
||||
quarter: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchQuarterPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseQuarterPatterns,
|
||||
@@ -114,24 +117,24 @@ export const match = {
|
||||
valueCallback: (index) => index + 1,
|
||||
}),
|
||||
|
||||
month: buildMatchFn({
|
||||
month: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchMonthPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseMonthPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
day: buildMatchFn({
|
||||
day: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchDayPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseDayPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
dayPeriod: buildMatchFn({
|
||||
dayPeriod: (0, _index.buildMatchFn)({
|
||||
matchPatterns: matchDayPeriodPatterns,
|
||||
defaultMatchWidth: "any",
|
||||
parsePatterns: parseDayPeriodPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
};
|
||||
});
|
||||
27
frontend/style/node_modules/date-fns/locale/hi/_lib/match.js
generated
vendored
27
frontend/style/node_modules/date-fns/locale/hi/_lib/match.js
generated
vendored
@@ -1,9 +1,6 @@
|
||||
"use strict";
|
||||
exports.match = void 0;
|
||||
|
||||
var _index = require("../../_lib/buildMatchFn.js");
|
||||
var _index2 = require("../../_lib/buildMatchPatternFn.js");
|
||||
var _index3 = require("./localize.js");
|
||||
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
|
||||
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
|
||||
import { localeToNumber } from "./localize.js";
|
||||
|
||||
const matchOrdinalNumberPattern = /^[०१२३४५६७८९]+/i;
|
||||
const parseOrdinalNumberPattern = /^[०१२३४५६७८९]+/i;
|
||||
@@ -95,21 +92,21 @@ const parseDayPeriodPatterns = {
|
||||
},
|
||||
};
|
||||
|
||||
const match = (exports.match = {
|
||||
ordinalNumber: (0, _index2.buildMatchPatternFn)({
|
||||
export const match = {
|
||||
ordinalNumber: buildMatchPatternFn({
|
||||
matchPattern: matchOrdinalNumberPattern,
|
||||
parsePattern: parseOrdinalNumberPattern,
|
||||
valueCallback: _index3.localeToNumber,
|
||||
valueCallback: localeToNumber,
|
||||
}),
|
||||
|
||||
era: (0, _index.buildMatchFn)({
|
||||
era: buildMatchFn({
|
||||
matchPatterns: matchEraPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseEraPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
quarter: (0, _index.buildMatchFn)({
|
||||
quarter: buildMatchFn({
|
||||
matchPatterns: matchQuarterPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseQuarterPatterns,
|
||||
@@ -117,24 +114,24 @@ const match = (exports.match = {
|
||||
valueCallback: (index) => index + 1,
|
||||
}),
|
||||
|
||||
month: (0, _index.buildMatchFn)({
|
||||
month: buildMatchFn({
|
||||
matchPatterns: matchMonthPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseMonthPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
day: (0, _index.buildMatchFn)({
|
||||
day: buildMatchFn({
|
||||
matchPatterns: matchDayPatterns,
|
||||
defaultMatchWidth: "wide",
|
||||
parsePatterns: parseDayPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
|
||||
dayPeriod: (0, _index.buildMatchFn)({
|
||||
dayPeriod: buildMatchFn({
|
||||
matchPatterns: matchDayPeriodPatterns,
|
||||
defaultMatchWidth: "any",
|
||||
parsePatterns: parseDayPeriodPatterns,
|
||||
defaultParseWidth: "any",
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user