first commit
This commit is contained in:
20
node_modules/i18n-js/LICENSE.md
generated
vendored
Normal file
20
node_modules/i18n-js/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Nando Vieira
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
1134
node_modules/i18n-js/README.md
generated
vendored
Normal file
1134
node_modules/i18n-js/README.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
node_modules/i18n-js/dist/browser/index.js
generated
vendored
Normal file
2
node_modules/i18n-js/dist/browser/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/i18n-js/dist/browser/index.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/browser/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
293
node_modules/i18n-js/dist/import/I18n.js
generated
vendored
Normal file
293
node_modules/i18n-js/dist/import/I18n.js
generated
vendored
Normal file
@@ -0,0 +1,293 @@
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import get from "lodash/get";
|
||||
import has from "lodash/has";
|
||||
import merge from "lodash/merge";
|
||||
import { Locales } from "./Locales";
|
||||
import { Pluralization } from "./Pluralization";
|
||||
import { MissingTranslation } from "./MissingTranslation";
|
||||
import { camelCaseKeys, createTranslationOptions, formatNumber, getFullScope, inferType, interpolate, isSet, lookup, numberToDelimited, numberToHuman, numberToHumanSize, parseDate, pluralize, strftime, timeAgoInWords, } from "./helpers";
|
||||
const DEFAULT_I18N_OPTIONS = {
|
||||
defaultLocale: "en",
|
||||
locale: "en",
|
||||
defaultSeparator: ".",
|
||||
placeholder: /(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,
|
||||
enableFallback: false,
|
||||
missingBehavior: "message",
|
||||
missingTranslationPrefix: "",
|
||||
missingPlaceholder: (_i18n, placeholder) => `[missing "${placeholder}" value]`,
|
||||
nullPlaceholder: (i18n, placeholder, message, options) => i18n.missingPlaceholder(i18n, placeholder, message, options),
|
||||
transformKey: (key) => key,
|
||||
};
|
||||
export class I18n {
|
||||
constructor(translations = {}, options = {}) {
|
||||
this._locale = DEFAULT_I18N_OPTIONS.locale;
|
||||
this._defaultLocale = DEFAULT_I18N_OPTIONS.defaultLocale;
|
||||
this._version = 0;
|
||||
this.onChangeHandlers = [];
|
||||
this.translations = {};
|
||||
this.t = this.translate;
|
||||
this.p = this.pluralize;
|
||||
this.l = this.localize;
|
||||
this.distanceOfTimeInWords = this.timeAgoInWords;
|
||||
const { locale, enableFallback, missingBehavior, missingTranslationPrefix, missingPlaceholder, nullPlaceholder, defaultLocale, defaultSeparator, placeholder, transformKey, } = Object.assign(Object.assign({}, DEFAULT_I18N_OPTIONS), options);
|
||||
this.locale = locale;
|
||||
this.defaultLocale = defaultLocale;
|
||||
this.defaultSeparator = defaultSeparator;
|
||||
this.enableFallback = enableFallback;
|
||||
this.locale = locale;
|
||||
this.missingBehavior = missingBehavior;
|
||||
this.missingTranslationPrefix = missingTranslationPrefix;
|
||||
this.missingPlaceholder = missingPlaceholder;
|
||||
this.nullPlaceholder = nullPlaceholder;
|
||||
this.placeholder = placeholder;
|
||||
this.pluralization = new Pluralization(this);
|
||||
this.locales = new Locales(this);
|
||||
this.missingTranslation = new MissingTranslation(this);
|
||||
this.transformKey = transformKey;
|
||||
this.interpolate = interpolate;
|
||||
this.store(translations);
|
||||
}
|
||||
store(translations) {
|
||||
merge(this.translations, translations);
|
||||
this.hasChanged();
|
||||
}
|
||||
get locale() {
|
||||
return this._locale || this.defaultLocale || "en";
|
||||
}
|
||||
set locale(newLocale) {
|
||||
if (typeof newLocale !== "string") {
|
||||
throw new Error(`Expected newLocale to be a string; got ${inferType(newLocale)}`);
|
||||
}
|
||||
const changed = this._locale !== newLocale;
|
||||
this._locale = newLocale;
|
||||
if (changed) {
|
||||
this.hasChanged();
|
||||
}
|
||||
}
|
||||
get defaultLocale() {
|
||||
return this._defaultLocale || "en";
|
||||
}
|
||||
set defaultLocale(newLocale) {
|
||||
if (typeof newLocale !== "string") {
|
||||
throw new Error(`Expected newLocale to be a string; got ${inferType(newLocale)}`);
|
||||
}
|
||||
const changed = this._defaultLocale !== newLocale;
|
||||
this._defaultLocale = newLocale;
|
||||
if (changed) {
|
||||
this.hasChanged();
|
||||
}
|
||||
}
|
||||
translate(scope, options) {
|
||||
options = Object.assign({}, options);
|
||||
const translationOptions = createTranslationOptions(this, scope, options);
|
||||
let translation;
|
||||
const hasFoundTranslation = translationOptions.some((translationOption) => {
|
||||
if (isSet(translationOption.scope)) {
|
||||
translation = lookup(this, translationOption.scope, options);
|
||||
}
|
||||
else if (isSet(translationOption.message)) {
|
||||
translation = translationOption.message;
|
||||
}
|
||||
return translation !== undefined && translation !== null;
|
||||
});
|
||||
if (!hasFoundTranslation) {
|
||||
return this.missingTranslation.get(scope, options);
|
||||
}
|
||||
if (typeof translation === "string") {
|
||||
translation = this.interpolate(this, translation, options);
|
||||
}
|
||||
else if (typeof translation === "object" &&
|
||||
translation &&
|
||||
isSet(options.count)) {
|
||||
translation = pluralize({
|
||||
i18n: this,
|
||||
count: options.count || 0,
|
||||
scope: translation,
|
||||
options,
|
||||
baseScope: getFullScope(this, scope, options),
|
||||
});
|
||||
}
|
||||
if (options && translation instanceof Array) {
|
||||
translation = translation.map((entry) => typeof entry === "string"
|
||||
? interpolate(this, entry, options)
|
||||
: entry);
|
||||
}
|
||||
return translation;
|
||||
}
|
||||
pluralize(count, scope, options) {
|
||||
return pluralize({
|
||||
i18n: this,
|
||||
count,
|
||||
scope,
|
||||
options: Object.assign({}, options),
|
||||
baseScope: getFullScope(this, scope, options !== null && options !== void 0 ? options : {}),
|
||||
});
|
||||
}
|
||||
localize(type, value, options) {
|
||||
options = Object.assign({}, options);
|
||||
if (value === undefined || value === null) {
|
||||
return "";
|
||||
}
|
||||
switch (type) {
|
||||
case "currency":
|
||||
return this.numberToCurrency(value);
|
||||
case "number":
|
||||
return formatNumber(value, Object.assign({ delimiter: ",", precision: 3, separator: ".", significant: false, stripInsignificantZeros: false }, lookup(this, "number.format")));
|
||||
case "percentage":
|
||||
return this.numberToPercentage(value);
|
||||
default: {
|
||||
let localizedValue;
|
||||
if (type.match(/^(date|time)/)) {
|
||||
localizedValue = this.toTime(type, value);
|
||||
}
|
||||
else {
|
||||
localizedValue = value.toString();
|
||||
}
|
||||
return interpolate(this, localizedValue, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
toTime(scope, input) {
|
||||
const date = parseDate(input);
|
||||
const format = lookup(this, scope);
|
||||
if (date.toString().match(/invalid/i)) {
|
||||
return date.toString();
|
||||
}
|
||||
if (!format) {
|
||||
return date.toString();
|
||||
}
|
||||
return this.strftime(date, format);
|
||||
}
|
||||
numberToCurrency(input, options = {}) {
|
||||
return formatNumber(input, Object.assign(Object.assign(Object.assign({ delimiter: ",", format: "%u%n", precision: 2, separator: ".", significant: false, stripInsignificantZeros: false, unit: "$" }, camelCaseKeys(this.get("number.format"))), camelCaseKeys(this.get("number.currency.format"))), options));
|
||||
}
|
||||
numberToPercentage(input, options = {}) {
|
||||
return formatNumber(input, Object.assign(Object.assign(Object.assign({ delimiter: "", format: "%n%", precision: 3, stripInsignificantZeros: false, separator: ".", significant: false }, camelCaseKeys(this.get("number.format"))), camelCaseKeys(this.get("number.percentage.format"))), options));
|
||||
}
|
||||
numberToHumanSize(input, options = {}) {
|
||||
return numberToHumanSize(this, input, Object.assign(Object.assign(Object.assign({ delimiter: "", precision: 3, significant: true, stripInsignificantZeros: true, units: {
|
||||
billion: "Billion",
|
||||
million: "Million",
|
||||
quadrillion: "Quadrillion",
|
||||
thousand: "Thousand",
|
||||
trillion: "Trillion",
|
||||
unit: "",
|
||||
} }, camelCaseKeys(this.get("number.human.format"))), camelCaseKeys(this.get("number.human.storage_units"))), options));
|
||||
}
|
||||
numberToHuman(input, options = {}) {
|
||||
return numberToHuman(this, input, Object.assign(Object.assign(Object.assign({ delimiter: "", separator: ".", precision: 3, significant: true, stripInsignificantZeros: true, format: "%n %u", roundMode: "default", units: {
|
||||
billion: "Billion",
|
||||
million: "Million",
|
||||
quadrillion: "Quadrillion",
|
||||
thousand: "Thousand",
|
||||
trillion: "Trillion",
|
||||
unit: "",
|
||||
} }, camelCaseKeys(this.get("number.human.format"))), camelCaseKeys(this.get("number.human.decimal_units"))), options));
|
||||
}
|
||||
numberToRounded(input, options) {
|
||||
return formatNumber(input, Object.assign({ unit: "", precision: 3, significant: false, separator: ".", delimiter: "", stripInsignificantZeros: false }, options));
|
||||
}
|
||||
numberToDelimited(input, options = {}) {
|
||||
return numberToDelimited(input, Object.assign({ delimiterPattern: /(\d)(?=(\d\d\d)+(?!\d))/g, delimiter: ",", separator: "." }, options));
|
||||
}
|
||||
withLocale(locale, callback) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const originalLocale = this.locale;
|
||||
try {
|
||||
this.locale = locale;
|
||||
yield callback();
|
||||
}
|
||||
finally {
|
||||
this.locale = originalLocale;
|
||||
}
|
||||
});
|
||||
}
|
||||
strftime(date, format, options = {}) {
|
||||
return strftime(date, format, Object.assign(Object.assign(Object.assign({}, camelCaseKeys(lookup(this, "date"))), { meridian: {
|
||||
am: lookup(this, "time.am") || "AM",
|
||||
pm: lookup(this, "time.pm") || "PM",
|
||||
} }), options));
|
||||
}
|
||||
update(path, override, options = { strict: false }) {
|
||||
if (options.strict && !has(this.translations, path)) {
|
||||
throw new Error(`The path "${path}" is not currently defined`);
|
||||
}
|
||||
const currentNode = get(this.translations, path);
|
||||
const currentType = inferType(currentNode);
|
||||
const overrideType = inferType(override);
|
||||
if (options.strict && currentType !== overrideType) {
|
||||
throw new Error(`The current type for "${path}" is "${currentType}", but you're trying to override it with "${overrideType}"`);
|
||||
}
|
||||
let newNode;
|
||||
if (overrideType === "object") {
|
||||
newNode = Object.assign(Object.assign({}, currentNode), override);
|
||||
}
|
||||
else {
|
||||
newNode = override;
|
||||
}
|
||||
const components = path.split(this.defaultSeparator);
|
||||
const prop = components.pop();
|
||||
let buffer = this.translations;
|
||||
for (const component of components) {
|
||||
if (!buffer[component]) {
|
||||
buffer[component] = {};
|
||||
}
|
||||
buffer = buffer[component];
|
||||
}
|
||||
buffer[prop] = newNode;
|
||||
this.hasChanged();
|
||||
}
|
||||
toSentence(items, options = {}) {
|
||||
const { wordsConnector, twoWordsConnector, lastWordConnector } = Object.assign(Object.assign({ wordsConnector: ", ", twoWordsConnector: " and ", lastWordConnector: ", and " }, camelCaseKeys(lookup(this, "support.array"))), options);
|
||||
const size = items.length;
|
||||
switch (size) {
|
||||
case 0:
|
||||
return "";
|
||||
case 1:
|
||||
return `${items[0]}`;
|
||||
case 2:
|
||||
return items.join(twoWordsConnector);
|
||||
default:
|
||||
return [
|
||||
items.slice(0, size - 1).join(wordsConnector),
|
||||
lastWordConnector,
|
||||
items[size - 1],
|
||||
].join("");
|
||||
}
|
||||
}
|
||||
timeAgoInWords(fromTime, toTime, options = {}) {
|
||||
return timeAgoInWords(this, fromTime, toTime, options);
|
||||
}
|
||||
onChange(callback) {
|
||||
this.onChangeHandlers.push(callback);
|
||||
return () => {
|
||||
this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(callback), 1);
|
||||
};
|
||||
}
|
||||
get version() {
|
||||
return this._version;
|
||||
}
|
||||
formatNumber(input, options = {}) {
|
||||
options = Object.assign(Object.assign({ delimiter: ",", precision: 3, separator: ".", unit: "", format: "%u%n", significant: false, stripInsignificantZeros: false }, camelCaseKeys(this.get("number.format"))), options);
|
||||
return formatNumber(input, options);
|
||||
}
|
||||
get(scope) {
|
||||
return lookup(this, scope);
|
||||
}
|
||||
runCallbacks() {
|
||||
this.onChangeHandlers.forEach((callback) => callback(this));
|
||||
}
|
||||
hasChanged() {
|
||||
this._version += 1;
|
||||
this.runCallbacks();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=I18n.js.map
|
||||
1
node_modules/i18n-js/dist/import/I18n.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/I18n.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
56
node_modules/i18n-js/dist/import/Locales.js
generated
vendored
Normal file
56
node_modules/i18n-js/dist/import/Locales.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
import uniq from "lodash/uniq";
|
||||
export const defaultLocaleResolver = (i18n, locale) => {
|
||||
const locales = [];
|
||||
const list = [];
|
||||
locales.push(locale);
|
||||
if (!locale) {
|
||||
locales.push(i18n.locale);
|
||||
}
|
||||
if (i18n.enableFallback) {
|
||||
locales.push(i18n.defaultLocale);
|
||||
}
|
||||
locales
|
||||
.filter(Boolean)
|
||||
.map((entry) => entry.toString())
|
||||
.forEach(function (currentLocale) {
|
||||
if (!list.includes(currentLocale)) {
|
||||
list.push(currentLocale);
|
||||
}
|
||||
if (!i18n.enableFallback) {
|
||||
return;
|
||||
}
|
||||
const codes = currentLocale.split("-");
|
||||
if (codes.length === 3) {
|
||||
list.push(`${codes[0]}-${codes[1]}`);
|
||||
}
|
||||
list.push(codes[0]);
|
||||
});
|
||||
return uniq(list);
|
||||
};
|
||||
export class Locales {
|
||||
constructor(i18n) {
|
||||
this.i18n = i18n;
|
||||
this.registry = {};
|
||||
this.register("default", defaultLocaleResolver);
|
||||
}
|
||||
register(locale, localeResolver) {
|
||||
if (typeof localeResolver !== "function") {
|
||||
const result = localeResolver;
|
||||
localeResolver = (() => result);
|
||||
}
|
||||
this.registry[locale] = localeResolver;
|
||||
}
|
||||
get(locale) {
|
||||
let locales = this.registry[locale] ||
|
||||
this.registry[this.i18n.locale] ||
|
||||
this.registry.default;
|
||||
if (typeof locales === "function") {
|
||||
locales = locales(this.i18n, locale);
|
||||
}
|
||||
if (!(locales instanceof Array)) {
|
||||
locales = [locales];
|
||||
}
|
||||
return locales;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Locales.js.map
|
||||
1
node_modules/i18n-js/dist/import/Locales.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/Locales.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Locales.js","sourceRoot":"","sources":["../../src/Locales.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AA0B/B,MAAM,CAAC,MAAM,qBAAqB,GAAmB,CACnD,IAAU,EACV,MAAc,EACJ,EAAE;IACZ,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,MAAM,IAAI,GAAa,EAAE,CAAC;IAI1B,OA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Ac,EACd,cAAkD;QAElD,IAAI,OAAO,cAAc,KAAK,UAAU,EAAE,CAAC;YACzC,MAAM,MAAM,GAAG,cAAc,CAAC;YAC9B,cAAc,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,CAAmB,CAAC;QACpD,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC;IACzC,CAAC;IAgBM,GAAG,CAAC,MAAc;QACvB,IAAI,OAAO,GACT,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QAExB,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;YAClC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,CAAC,CAAC,OAAO,YAAY,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC;QACtB,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
||||
43
node_modules/i18n-js/dist/import/MissingTranslation.js
generated
vendored
Normal file
43
node_modules/i18n-js/dist/import/MissingTranslation.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
import { getFullScope, inferType } from "./helpers";
|
||||
export const guessStrategy = function (i18n, scope) {
|
||||
if (scope instanceof Array) {
|
||||
scope = scope.join(i18n.defaultSeparator);
|
||||
}
|
||||
const message = scope.split(i18n.defaultSeparator).slice(-1)[0];
|
||||
return (i18n.missingTranslationPrefix +
|
||||
message
|
||||
.replace("_", " ")
|
||||
.replace(/([a-z])([A-Z])/g, (_match, p1, p2) => `${p1} ${p2.toLowerCase()}`));
|
||||
};
|
||||
export const messageStrategy = (i18n, scope, options) => {
|
||||
const fullScope = getFullScope(i18n, scope, options);
|
||||
const locale = "locale" in options ? options.locale : i18n.locale;
|
||||
const localeType = inferType(locale);
|
||||
const fullScopeWithLocale = [
|
||||
localeType == "string" ? locale : localeType,
|
||||
fullScope,
|
||||
].join(i18n.defaultSeparator);
|
||||
return `[missing "${fullScopeWithLocale}" translation]`;
|
||||
};
|
||||
export const errorStrategy = (i18n, scope, options) => {
|
||||
const fullScope = getFullScope(i18n, scope, options);
|
||||
const fullScopeWithLocale = [i18n.locale, fullScope].join(i18n.defaultSeparator);
|
||||
throw new Error(`Missing translation: ${fullScopeWithLocale}`);
|
||||
};
|
||||
export class MissingTranslation {
|
||||
constructor(i18n) {
|
||||
this.i18n = i18n;
|
||||
this.registry = {};
|
||||
this.register("guess", guessStrategy);
|
||||
this.register("message", messageStrategy);
|
||||
this.register("error", errorStrategy);
|
||||
}
|
||||
register(name, strategy) {
|
||||
this.registry[name] = strategy;
|
||||
}
|
||||
get(scope, options) {
|
||||
var _a;
|
||||
return this.registry[(_a = options.missingBehavior) !== null && _a !== void 0 ? _a : this.i18n.missingBehavior](this.i18n, scope, options);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=MissingTranslation.js.map
|
||||
1
node_modules/i18n-js/dist/import/MissingTranslation.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/MissingTranslation.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"MissingTranslation.js","sourceRoot":"","sources":["../../src/MissingTranslation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAepD,MAAM,CAAC,MAAM,aAAa,GAA+B,UACvD,IAAI,EACJ,KAAK;IAEL,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAGD,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,KA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E,CAAC,CAAC;AAEF,MAAM,OAAO,kBAAkB;IAI7B,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QAEnB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QACtC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACxC,CAAC;IA0BM,QAAQ,CAAC,IAAY,EAAE,QAAoC;QAChE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACjC,CAAC;IAWM,GAAG,CAAC,KAAY,EAAE,OAAa;;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAA,OAAO,CAAC,eAAe,mCAAI,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CACxE,IAAI,CAAC,IAAI,EACT,KAAK,EACL,OAAO,CACR,CAAC;IACJ,CAAC;CACF"}
|
||||
29
node_modules/i18n-js/dist/import/Pluralization.js
generated
vendored
Normal file
29
node_modules/i18n-js/dist/import/Pluralization.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import { en } from "make-plural";
|
||||
export function useMakePlural({ pluralizer, includeZero = true, ordinal = false, }) {
|
||||
return function (_i18n, count) {
|
||||
return [
|
||||
includeZero && count === 0 ? "zero" : "",
|
||||
pluralizer(count, ordinal),
|
||||
].filter(Boolean);
|
||||
};
|
||||
}
|
||||
export const defaultPluralizer = useMakePlural({
|
||||
pluralizer: en,
|
||||
includeZero: true,
|
||||
});
|
||||
export class Pluralization {
|
||||
constructor(i18n) {
|
||||
this.i18n = i18n;
|
||||
this.registry = {};
|
||||
this.register("default", defaultPluralizer);
|
||||
}
|
||||
register(locale, pluralizer) {
|
||||
this.registry[locale] = pluralizer;
|
||||
}
|
||||
get(locale) {
|
||||
return (this.registry[locale] ||
|
||||
this.registry[this.i18n.locale] ||
|
||||
this.registry["default"]);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Pluralization.js.map
|
||||
1
node_modules/i18n-js/dist/import/Pluralization.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/Pluralization.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Pluralization.js","sourceRoot":"","sources":["../../src/Pluralization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAgBjC,MAAM,UAAU,aAAa,CAAC,EAC5B,UAAU,EACV,WAAW,GAAG,IAAI,EAClB,OAAO,GAAG,KAAK,GAKhB;IACC,OAAO,UAAU,KAAW,EAAE,KAAa;QACzC,OAAO;YACL,WAAW,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACxC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC;SAC3B,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAqBD,MAAM,CAAC,MAAM,iBAAiB,GAAe,aAAa,CAAC;IACzD,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC;AAwCH,MAAM,OAAO,aAAa;IAIxB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QAEnB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IAC9C,CAAC;IAqCM,QAAQ,CAAC,MAAc,EAAE,UAAsB;QACpD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;IACrC,CAAC;IAYM,GAAG,CAAC,MAAc;QACvB,OAAO,CACL,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CACzB,CAAC;IACJ,CAAC;CACF"}
|
||||
2907
node_modules/i18n-js/dist/import/bignumber.js
generated
vendored
Normal file
2907
node_modules/i18n-js/dist/import/bignumber.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
node_modules/i18n-js/dist/import/helpers/camelCaseKeys.js
generated
vendored
Normal file
11
node_modules/i18n-js/dist/import/helpers/camelCaseKeys.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import camelCase from "lodash/camelCase";
|
||||
export function camelCaseKeys(target) {
|
||||
if (!target) {
|
||||
return {};
|
||||
}
|
||||
return Object.keys(target).reduce((buffer, key) => {
|
||||
buffer[camelCase(key)] = target[key];
|
||||
return buffer;
|
||||
}, {});
|
||||
}
|
||||
//# sourceMappingURL=camelCaseKeys.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/camelCaseKeys.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/camelCaseKeys.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"camelCaseKeys.js","sourceRoot":"","sources":["../../../src/helpers/camelCaseKeys.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kBAAkB,CAAC;AAczC,MAAM,UAAU,aAAa,CAAW,MAAe;IACrD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,EAAO,CAAC;IACjB,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,MAAc,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACvD,MAAe,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAI,MAAe,CAAC,GAAG,CAAC,CAAC;QACzD,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAO,CAAC,CAAC;AACd,CAAC"}
|
||||
16
node_modules/i18n-js/dist/import/helpers/createTranslationOptions.js
generated
vendored
Normal file
16
node_modules/i18n-js/dist/import/helpers/createTranslationOptions.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { isSet } from "./isSet";
|
||||
export function createTranslationOptions(i18n, scope, options) {
|
||||
let translationOptions = [{ scope }];
|
||||
if (isSet(options.defaults)) {
|
||||
translationOptions = translationOptions.concat(options.defaults);
|
||||
}
|
||||
if (isSet(options.defaultValue)) {
|
||||
const message = typeof options.defaultValue === "function"
|
||||
? options.defaultValue(i18n, scope, options)
|
||||
: options.defaultValue;
|
||||
translationOptions.push({ message });
|
||||
delete options.defaultValue;
|
||||
}
|
||||
return translationOptions;
|
||||
}
|
||||
//# sourceMappingURL=createTranslationOptions.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/createTranslationOptions.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/createTranslationOptions.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"createTranslationOptions.js","sourceRoot":"","sources":["../../../src/helpers/createTranslationOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAiBhC,MAAM,UAAU,wBAAwB,CACtC,IAAU,EACV,KAAY,EACZ,OAAa;IAEb,IAAI,kBAAkB,GAAW,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAI7C,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnE,CAAC;IAID,IAAI,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,MAAM,OAAO,GACX,OAAO,OAAO,CAAC,YAAY,KAAK,UAAU;YACxC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC;YAC5C,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;QAE3B,kBAAkB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QACrC,OAAO,OAAO,CAAC,YAAY,CAAC;IAC9B,CAAC;IAED,OAAO,kBAAmD,CAAC;AAC7D,CAAC"}
|
||||
20
node_modules/i18n-js/dist/import/helpers/expandRoundMode.js
generated
vendored
Normal file
20
node_modules/i18n-js/dist/import/helpers/expandRoundMode.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { BigNumber } from "bignumber.js";
|
||||
var RoundingModeMap;
|
||||
(function (RoundingModeMap) {
|
||||
RoundingModeMap[RoundingModeMap["up"] = BigNumber.ROUND_UP] = "up";
|
||||
RoundingModeMap[RoundingModeMap["down"] = BigNumber.ROUND_DOWN] = "down";
|
||||
RoundingModeMap[RoundingModeMap["truncate"] = BigNumber.ROUND_DOWN] = "truncate";
|
||||
RoundingModeMap[RoundingModeMap["halfUp"] = BigNumber.ROUND_HALF_UP] = "halfUp";
|
||||
RoundingModeMap[RoundingModeMap["default"] = BigNumber.ROUND_HALF_UP] = "default";
|
||||
RoundingModeMap[RoundingModeMap["halfDown"] = BigNumber.ROUND_HALF_DOWN] = "halfDown";
|
||||
RoundingModeMap[RoundingModeMap["halfEven"] = BigNumber.ROUND_HALF_EVEN] = "halfEven";
|
||||
RoundingModeMap[RoundingModeMap["banker"] = BigNumber.ROUND_HALF_EVEN] = "banker";
|
||||
RoundingModeMap[RoundingModeMap["ceiling"] = BigNumber.ROUND_CEIL] = "ceiling";
|
||||
RoundingModeMap[RoundingModeMap["ceil"] = BigNumber.ROUND_CEIL] = "ceil";
|
||||
RoundingModeMap[RoundingModeMap["floor"] = BigNumber.ROUND_FLOOR] = "floor";
|
||||
})(RoundingModeMap || (RoundingModeMap = {}));
|
||||
export function expandRoundMode(roundMode) {
|
||||
var _a;
|
||||
return ((_a = RoundingModeMap[roundMode]) !== null && _a !== void 0 ? _a : RoundingModeMap.default);
|
||||
}
|
||||
//# sourceMappingURL=expandRoundMode.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/expandRoundMode.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/expandRoundMode.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"expandRoundMode.js","sourceRoot":"","sources":["../../../src/helpers/expandRoundMode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,IAAK,eAYJ;AAZD,WAAK,eAAe;IAClB,wCAAO,SAAS,CAAC,QAAQ,QAAA,CAAA;IACzB,0CAAS,SAAS,CAAC,UAAU,UAAA,CAAA;IAC7B,8CAAa,SAAS,CAAC,UAAU,cAAA,CAAA;IACjC,4CAAW,SAAS,CAAC,aAAa,YAAA,CAAA;IAClC,6CAAY,SAAS,CAAC,aAAa,aAAA,CAAA;IACnC,8CAAa,SAAS,CAAC,eAAe,cAAA,CAAA;IACtC,8CAAa,SAAS,CAAC,eAAe,cAAA,CAAA;IACtC,4CAAW,SAAS,CAAC,eAAe,YAAA,CAAA;IACpC,6CAAY,SAAS,CAAC,UAAU,aAAA,CAAA;IAChC,0CAAS,SAAS,CAAC,UAAU,UAAA,CAAA;IAC7B,2CAAU,SAAS,CAAC,WAAW,WAAA,CAAA;AACjC,CAAC,EAZI,eAAe,KAAf,eAAe,QAYnB;AAOD,MAAM,UAAU,eAAe,CAC7B,SAAuB;;IAEvB,OAAO,CAAC,MAAA,eAAe,CAAC,SAAS,CAAC,mCAChC,eAAe,CAAC,OAAO,CAA2B,CAAC;AACvD,CAAC"}
|
||||
61
node_modules/i18n-js/dist/import/helpers/formatNumber.js
generated
vendored
Normal file
61
node_modules/i18n-js/dist/import/helpers/formatNumber.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
import { BigNumber } from "bignumber.js";
|
||||
import repeat from "lodash/repeat";
|
||||
import { roundNumber } from "./roundNumber";
|
||||
function replaceInFormat(format, { formattedNumber, unit }) {
|
||||
return format.replace("%n", formattedNumber).replace("%u", unit);
|
||||
}
|
||||
function computeSignificand({ significand, whole, precision, }) {
|
||||
if (whole === "0" || precision === null) {
|
||||
return significand;
|
||||
}
|
||||
const limit = Math.max(0, precision - whole.length);
|
||||
return (significand !== null && significand !== void 0 ? significand : "").substr(0, limit);
|
||||
}
|
||||
export function formatNumber(input, options) {
|
||||
var _a, _b, _c;
|
||||
const originalNumber = new BigNumber(input);
|
||||
if (options.raise && !originalNumber.isFinite()) {
|
||||
throw new Error(`"${input}" is not a valid numeric value`);
|
||||
}
|
||||
const roundedNumber = roundNumber(originalNumber, options);
|
||||
const numeric = new BigNumber(roundedNumber);
|
||||
const isNegative = numeric.lt(0);
|
||||
const isZero = numeric.isZero();
|
||||
let [whole, significand] = roundedNumber.split(".");
|
||||
const buffer = [];
|
||||
let formattedNumber;
|
||||
const positiveFormat = (_a = options.format) !== null && _a !== void 0 ? _a : "%n";
|
||||
const negativeFormat = (_b = options.negativeFormat) !== null && _b !== void 0 ? _b : `-${positiveFormat}`;
|
||||
const format = isNegative && !isZero ? negativeFormat : positiveFormat;
|
||||
whole = whole.replace("-", "");
|
||||
while (whole.length > 0) {
|
||||
buffer.unshift(whole.substr(Math.max(0, whole.length - 3), 3));
|
||||
whole = whole.substr(0, whole.length - 3);
|
||||
}
|
||||
whole = buffer.join("");
|
||||
formattedNumber = buffer.join(options.delimiter);
|
||||
if (options.significant) {
|
||||
significand = computeSignificand({
|
||||
whole,
|
||||
significand,
|
||||
precision: options.precision,
|
||||
});
|
||||
}
|
||||
else {
|
||||
significand = significand !== null && significand !== void 0 ? significand : repeat("0", (_c = options.precision) !== null && _c !== void 0 ? _c : 0);
|
||||
}
|
||||
if (options.stripInsignificantZeros && significand) {
|
||||
significand = significand.replace(/0+$/, "");
|
||||
}
|
||||
if (originalNumber.isNaN()) {
|
||||
formattedNumber = input.toString();
|
||||
}
|
||||
if (significand && originalNumber.isFinite()) {
|
||||
formattedNumber += (options.separator || ".") + significand;
|
||||
}
|
||||
return replaceInFormat(format, {
|
||||
formattedNumber,
|
||||
unit: options.unit,
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=formatNumber.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/formatNumber.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/formatNumber.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"formatNumber.js","sourceRoot":"","sources":["../../../src/helpers/formatNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,MAAM,MAAM,eAAe,CAAC;AAGnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,SAAS,eAAe,CACtB,MAAc,EACd,EAAE,eAAe,EAAE,IAAI,EAA6C;IAEpE,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,WAAW,EACX,KAAK,EACL,SAAS,GAKV;IACC,IAAI,KAAK,KAAK,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACxC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAEpD,OAAO,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC;AAWD,MAAM,UAAU,YAAY,CAC1B,KAAc,EACd,OAA4B;;IAE5B,MAAM,cAAc,GAAG,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;IAE5C,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,EAAE,CAAC;Q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AC,SAAS,CAAC,CAAC;IAEjD,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,WAAW,GAAG,kBAAkB,CAAC;YAC/B,KAAK;YACL,WAAW;YACX,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,WAAW,GAAG,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,MAAM,CAAC,GAAG,EAAE,MAAA,OAAO,CAAC,SAAS,mCAAI,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,IAAI,OAAO,CAAC,uBAAuB,IAAI,WAAW,EAAE,CAAC;QACnD,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI,cAAc,CAAC,KAAK,EAAE,EAAE,CAAC;QAC3B,eAAe,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IACrC,CAAC;IAED,IAAI,WAAW,IAAI,cAAc,CAAC,QAAQ,EAAE,EAAE,CAAC;QAC7C,eAAe,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,WAAW,CAAC;IAC9D,CAAC;IAED,OAAO,eAAe,CAAC,MAAM,EAAE;QAC7B,eAAe;QACf,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC,CAAC;AACL,CAAC"}
|
||||
14
node_modules/i18n-js/dist/import/helpers/getFullScope.js
generated
vendored
Normal file
14
node_modules/i18n-js/dist/import/helpers/getFullScope.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export function getFullScope(i18n, scope, options) {
|
||||
let result = "";
|
||||
if (scope instanceof String || typeof scope === "string") {
|
||||
result = scope;
|
||||
}
|
||||
if (scope instanceof Array) {
|
||||
result = scope.join(i18n.defaultSeparator);
|
||||
}
|
||||
if (options.scope) {
|
||||
result = [options.scope, result].join(i18n.defaultSeparator);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
//# sourceMappingURL=getFullScope.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/getFullScope.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/getFullScope.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getFullScope.js","sourceRoot":"","sources":["../../../src/helpers/getFullScope.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,YAAY,CAAC,IAAU,EAAE,KAAY,EAAE,OAAa;IAClE,IAAI,MAAM,GAAG,EAAE,CAAC;IAGhB,IAAI,KAAK,YAAY,MAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACzD,MAAM,GAAG,KAAe,CAAC;IAC3B,CAAC;IAGD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,MAAM,GAAI,KAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC3D,CAAC;IAMD,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
||||
18
node_modules/i18n-js/dist/import/helpers/index.js
generated
vendored
Normal file
18
node_modules/i18n-js/dist/import/helpers/index.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
export { camelCaseKeys } from "./camelCaseKeys";
|
||||
export { createTranslationOptions } from "./createTranslationOptions";
|
||||
export { expandRoundMode } from "./expandRoundMode";
|
||||
export { formatNumber } from "./formatNumber";
|
||||
export { getFullScope } from "./getFullScope";
|
||||
export { inferType } from "./inferType";
|
||||
export { interpolate } from "./interpolate";
|
||||
export { isSet } from "./isSet";
|
||||
export { lookup } from "./lookup";
|
||||
export { numberToDelimited } from "./numberToDelimited";
|
||||
export { numberToHuman } from "./numberToHuman";
|
||||
export { numberToHumanSize } from "./numberToHumanSize";
|
||||
export { parseDate } from "./parseDate";
|
||||
export { pluralize } from "./pluralize";
|
||||
export { roundNumber } from "./roundNumber";
|
||||
export { strftime } from "./strftime";
|
||||
export { timeAgoInWords } from "./timeAgoInWords";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/index.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
||||
12
node_modules/i18n-js/dist/import/helpers/inferType.js
generated
vendored
Normal file
12
node_modules/i18n-js/dist/import/helpers/inferType.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export function inferType(instance) {
|
||||
var _a, _b;
|
||||
if (instance === null) {
|
||||
return "null";
|
||||
}
|
||||
const type = typeof instance;
|
||||
if (type !== "object") {
|
||||
return type;
|
||||
}
|
||||
return ((_b = (_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || "object";
|
||||
}
|
||||
//# sourceMappingURL=inferType.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/inferType.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/inferType.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"inferType.js","sourceRoot":"","sources":["../../../src/helpers/inferType.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,SAAS,CAAC,QAAiB;;IACzC,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,QAAQ,CAAC;IAE7B,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAA,MAAA,MAAC,QAAgB,aAAhB,QAAQ,uBAAR,QAAQ,CAAU,WAAW,0CAAE,IAAI,0CAAE,WAAW,EAAE,KAAI,QAAQ,CAAC;AACzE,CAAC"}
|
||||
29
node_modules/i18n-js/dist/import/helpers/interpolate.js
generated
vendored
Normal file
29
node_modules/i18n-js/dist/import/helpers/interpolate.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import { isSet } from "./isSet";
|
||||
export function interpolate(i18n, message, options) {
|
||||
options = Object.keys(options).reduce((buffer, key) => {
|
||||
buffer[i18n.transformKey(key)] = options[key];
|
||||
return buffer;
|
||||
}, {});
|
||||
const matches = message.match(i18n.placeholder);
|
||||
if (!matches) {
|
||||
return message;
|
||||
}
|
||||
while (matches.length) {
|
||||
let value;
|
||||
const placeholder = matches.shift();
|
||||
const name = placeholder.replace(i18n.placeholder, "$1");
|
||||
if (isSet(options[name])) {
|
||||
value = options[name].toString().replace(/\$/gm, "_#$#_");
|
||||
}
|
||||
else if (name in options) {
|
||||
value = i18n.nullPlaceholder(i18n, placeholder, message, options);
|
||||
}
|
||||
else {
|
||||
value = i18n.missingPlaceholder(i18n, placeholder, message, options);
|
||||
}
|
||||
const regex = new RegExp(placeholder.replace(/\{/gm, "\\{").replace(/\}/gm, "\\}"), "g");
|
||||
message = message.replace(regex, value);
|
||||
}
|
||||
return message.replace(/_#\$#_/g, "$");
|
||||
}
|
||||
//# sourceMappingURL=interpolate.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/interpolate.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/interpolate.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interpolate.js","sourceRoot":"","sources":["../../../src/helpers/interpolate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAgBhC,MAAM,UAAU,WAAW,CACzB,IAAU,EACV,OAAe,EACf,OAAyB;IAEzB,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACpD,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9C,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAsB,CAAC,CAAC;IAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEhD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC;QACtB,IAAI,KAAa,CAAC;QAClB,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,EAAY,CAAC;QAC9C,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAEzD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACzB,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5D,CAAC;aAAM,IAAI,IAAI,IAAI,OAAO,EAAE,CAAC;YAC3B,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,MAAM,CACtB,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,EACzD,GAAG,CACJ,CAAC;QAEF,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC"}
|
||||
4
node_modules/i18n-js/dist/import/helpers/isSet.js
generated
vendored
Normal file
4
node_modules/i18n-js/dist/import/helpers/isSet.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export function isSet(value) {
|
||||
return value !== undefined && value !== null;
|
||||
}
|
||||
//# sourceMappingURL=isSet.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/isSet.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/isSet.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isSet.js","sourceRoot":"","sources":["../../../src/helpers/isSet.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,KAAK,CAAC,KAAc;IAClC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AAC/C,CAAC"}
|
||||
18
node_modules/i18n-js/dist/import/helpers/lookup.js
generated
vendored
Normal file
18
node_modules/i18n-js/dist/import/helpers/lookup.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { isSet } from "./isSet";
|
||||
import { getFullScope } from "./getFullScope";
|
||||
import { inferType } from "./inferType";
|
||||
export function lookup(i18n, scope, options = {}) {
|
||||
options = Object.assign({}, options);
|
||||
const locale = "locale" in options ? options.locale : i18n.locale;
|
||||
const localeType = inferType(locale);
|
||||
const locales = i18n.locales
|
||||
.get(localeType === "string" ? locale : typeof locale)
|
||||
.slice();
|
||||
const keys = getFullScope(i18n, scope, options)
|
||||
.split(i18n.defaultSeparator)
|
||||
.map((component) => i18n.transformKey(component));
|
||||
const entries = locales.map((locale) => keys.reduce((path, key) => path && path[key], i18n.translations[locale]));
|
||||
entries.push(options.defaultValue);
|
||||
return entries.find((entry) => isSet(entry));
|
||||
}
|
||||
//# sourceMappingURL=lookup.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/lookup.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/lookup.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../../src/helpers/lookup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiBxC,MAAM,UAAU,MAAM,CAAC,IAAU,EAAE,KAAY,EAAE,UAAgB,EAAE;IACjE,OAAO,qBAAQ,OAAO,CAAE,CAAC;IAEzB,MAAM,MAAM,GAAG,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IAClE,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAErC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO;SACzB,GAAG,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC;SACrD,KAAK,EAAE,CAAC;IAEX,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC;SAC5C,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC;SAC5B,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IAEpD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACrC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CACzE,CAAC;IAEF,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAEnC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/C,CAAC"}
|
||||
14
node_modules/i18n-js/dist/import/helpers/numberToDelimited.js
generated
vendored
Normal file
14
node_modules/i18n-js/dist/import/helpers/numberToDelimited.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { BigNumber } from "bignumber.js";
|
||||
export function numberToDelimited(input, options) {
|
||||
const numeric = new BigNumber(input);
|
||||
if (!numeric.isFinite()) {
|
||||
return input.toString();
|
||||
}
|
||||
if (!options.delimiterPattern.global) {
|
||||
throw new Error(`options.delimiterPattern must be a global regular expression; received ${options.delimiterPattern}`);
|
||||
}
|
||||
let [left, right] = numeric.toString().split(".");
|
||||
left = left.replace(options.delimiterPattern, (digitToDelimiter) => `${digitToDelimiter}${options.delimiter}`);
|
||||
return [left, right].filter(Boolean).join(options.separator);
|
||||
}
|
||||
//# sourceMappingURL=numberToDelimited.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/numberToDelimited.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/numberToDelimited.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"numberToDelimited.js","sourceRoot":"","sources":["../../../src/helpers/numberToDelimited.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAezC,MAAM,UAAU,iBAAiB,CAC/B,KAAc,EACd,OAAiC;IAEjC,MAAM,OAAO,GAAG,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;IAErC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CACb,0EAA0E,OAAO,CAAC,gBAAgB,EAAE,CACrG,CAAC;IACJ,CAAC;IAGD,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElD,IAAI,GAAG,IAAI,CAAC,OAAO,CACjB,OAAO,CAAC,gBAAgB,EACxB,CAAC,gBAAgB,EAAE,EAAE,CAAC,GAAG,gBAAgB,GAAG,OAAO,CAAC,SAAS,EAAE,CAChE,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAC/D,CAAC"}
|
||||
71
node_modules/i18n-js/dist/import/helpers/numberToHuman.js
generated
vendored
Normal file
71
node_modules/i18n-js/dist/import/helpers/numberToHuman.js
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
import { BigNumber } from "bignumber.js";
|
||||
import sortBy from "lodash/sortBy";
|
||||
import zipObject from "lodash/zipObject";
|
||||
import { getFullScope } from "./getFullScope";
|
||||
import { lookup } from "./lookup";
|
||||
import { roundNumber } from "./roundNumber";
|
||||
import { inferType } from "./inferType";
|
||||
const DECIMAL_UNITS = {
|
||||
"0": "unit",
|
||||
"1": "ten",
|
||||
"2": "hundred",
|
||||
"3": "thousand",
|
||||
"6": "million",
|
||||
"9": "billion",
|
||||
"12": "trillion",
|
||||
"15": "quadrillion",
|
||||
"-1": "deci",
|
||||
"-2": "centi",
|
||||
"-3": "mili",
|
||||
"-6": "micro",
|
||||
"-9": "nano",
|
||||
"-12": "pico",
|
||||
"-15": "femto",
|
||||
};
|
||||
const INVERTED_DECIMAL_UNITS = zipObject(Object.values(DECIMAL_UNITS), Object.keys(DECIMAL_UNITS).map((key) => parseInt(key, 10)));
|
||||
export function numberToHuman(i18n, input, options) {
|
||||
const roundOptions = {
|
||||
roundMode: options.roundMode,
|
||||
precision: options.precision,
|
||||
significant: options.significant,
|
||||
};
|
||||
let units;
|
||||
if (inferType(options.units) === "string") {
|
||||
const scope = options.units;
|
||||
units = lookup(i18n, scope);
|
||||
if (!units) {
|
||||
throw new Error(`The scope "${i18n.locale}${i18n.defaultSeparator}${getFullScope(i18n, scope, {})}" couldn't be found`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
units = options.units;
|
||||
}
|
||||
let formattedNumber = roundNumber(new BigNumber(input), roundOptions);
|
||||
const unitExponents = (units) => sortBy(Object.keys(units).map((name) => INVERTED_DECIMAL_UNITS[name]), (numeric) => numeric * -1);
|
||||
const calculateExponent = (num, units) => {
|
||||
const exponent = num.isZero()
|
||||
? 0
|
||||
: Math.floor(Math.log10(num.abs().toNumber()));
|
||||
return unitExponents(units).find((exp) => exponent >= exp) || 0;
|
||||
};
|
||||
const determineUnit = (units, exponent) => {
|
||||
const expName = DECIMAL_UNITS[exponent.toString()];
|
||||
return units[expName] || "";
|
||||
};
|
||||
const exponent = calculateExponent(new BigNumber(formattedNumber), units);
|
||||
const unit = determineUnit(units, exponent);
|
||||
formattedNumber = roundNumber(new BigNumber(formattedNumber).div(Math.pow(10, exponent)), roundOptions);
|
||||
if (options.stripInsignificantZeros) {
|
||||
let [whole, significand] = formattedNumber.split(".");
|
||||
significand = (significand || "").replace(/0+$/, "");
|
||||
formattedNumber = whole;
|
||||
if (significand) {
|
||||
formattedNumber += `${options.separator}${significand}`;
|
||||
}
|
||||
}
|
||||
return options.format
|
||||
.replace("%n", formattedNumber || "0")
|
||||
.replace("%u", unit)
|
||||
.trim();
|
||||
}
|
||||
//# sourceMappingURL=numberToHuman.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/numberToHuman.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/numberToHuman.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"numberToHuman.js","sourceRoot":"","sources":["../../../src/helpers/numberToHuman.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,MAAM,MAAM,eAAe,CAAC;AACnC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AAIzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAA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IAE5C,eAAe,GAAG,WAAW,CAC3B,IAAI,SAAS,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,SAAA,EAAE,EAAI,QAAQ,CAAA,CAAC,EAClD,YAAY,CACb,CAAC;IAEF,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QAEpC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACtD,WAAW,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAErD,eAAe,GAAG,KAAK,CAAC;QAExB,IAAI,WAAW,EAAE,CAAC;YAChB,eAAe,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,WAAW,EAAE,CAAC;QAC1D,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC,MAAM;SAClB,OAAO,CAAC,IAAI,EAAE,eAAe,IAAI,GAAG,CAAC;SACrC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;SACnB,IAAI,EAAE,CAAC;AACZ,CAAC"}
|
||||
48
node_modules/i18n-js/dist/import/helpers/numberToHumanSize.js
generated
vendored
Normal file
48
node_modules/i18n-js/dist/import/helpers/numberToHumanSize.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
import { BigNumber } from "bignumber.js";
|
||||
import { roundNumber } from "./roundNumber";
|
||||
import { expandRoundMode } from "./expandRoundMode";
|
||||
const STORAGE_UNITS = ["byte", "kb", "mb", "gb", "tb", "pb", "eb"];
|
||||
export function numberToHumanSize(i18n, input, options) {
|
||||
const roundMode = expandRoundMode(options.roundMode);
|
||||
const base = 1024;
|
||||
const num = new BigNumber(input).abs();
|
||||
const smallerThanBase = num.lt(base);
|
||||
let numberToBeFormatted;
|
||||
const computeExponent = (numeric, units) => {
|
||||
const max = units.length - 1;
|
||||
const exp = new BigNumber(Math.log(numeric.toNumber()))
|
||||
.div(Math.log(base))
|
||||
.integerValue(BigNumber.ROUND_DOWN)
|
||||
.toNumber();
|
||||
return Math.min(max, exp);
|
||||
};
|
||||
const storageUnitKey = (units) => {
|
||||
const keyEnd = smallerThanBase ? "byte" : units[exponent];
|
||||
return `number.human.storage_units.units.${keyEnd}`;
|
||||
};
|
||||
const exponent = computeExponent(num, STORAGE_UNITS);
|
||||
if (smallerThanBase) {
|
||||
numberToBeFormatted = num.integerValue();
|
||||
}
|
||||
else {
|
||||
numberToBeFormatted = new BigNumber(roundNumber(num.div(Math.pow(base, exponent)), {
|
||||
significant: options.significant,
|
||||
precision: options.precision,
|
||||
roundMode: options.roundMode,
|
||||
}));
|
||||
}
|
||||
const format = i18n.translate("number.human.storage_units.format", {
|
||||
defaultValue: "%n %u",
|
||||
});
|
||||
const unit = i18n.translate(storageUnitKey(STORAGE_UNITS), {
|
||||
count: num.integerValue().toNumber(),
|
||||
});
|
||||
let formattedNumber = numberToBeFormatted.toFixed(options.precision, roundMode);
|
||||
if (options.stripInsignificantZeros) {
|
||||
formattedNumber = formattedNumber
|
||||
.replace(/(\..*?)0+$/, "$1")
|
||||
.replace(/\.$/, "");
|
||||
}
|
||||
return format.replace("%n", formattedNumber).replace("%u", unit);
|
||||
}
|
||||
//# sourceMappingURL=numberToHumanSize.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/numberToHumanSize.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/numberToHumanSize.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"numberToHumanSize.js","sourceRoot":"","sources":["../../../src/helpers/numberToHumanSize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKpD,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EA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AAS,CACjC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,SAAA,IAAI,EAAI,QAAQ,CAAA,CAAC,EAAE;YACrC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CACH,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,mCAAmC,EAAE;QACjE,YAAY,EAAE,OAAO;KACtB,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE;QACzD,KAAK,EAAE,GAAG,CAAC,YAAY,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC,CAAC;IAEH,IAAI,eAAe,GAAG,mBAAmB,CAAC,OAAO,CAC/C,OAAO,CAAC,SAAmB,EAC3B,SAAS,CACV,CAAC;IAEF,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QACpC,eAAe,GAAG,eAAe;aAC9B,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;aAC3B,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnE,CAAC"}
|
||||
31
node_modules/i18n-js/dist/import/helpers/parseDate.js
generated
vendored
Normal file
31
node_modules/i18n-js/dist/import/helpers/parseDate.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
export function parseDate(input) {
|
||||
if (input instanceof Date) {
|
||||
return input;
|
||||
}
|
||||
if (typeof input === "number") {
|
||||
const date = new Date();
|
||||
date.setTime(input);
|
||||
return date;
|
||||
}
|
||||
const matches = new String(input).match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})(?:[.,](\d{1,3}))?)?(Z|\+00:?00)?/);
|
||||
if (matches) {
|
||||
const parts = matches.slice(1, 8).map((match) => parseInt(match, 10) || 0);
|
||||
parts[1] -= 1;
|
||||
const [year, month, day, hour, minute, second, milliseconds] = parts;
|
||||
const timezone = matches[8];
|
||||
if (timezone) {
|
||||
return new Date(Date.UTC(year, month, day, hour, minute, second, milliseconds));
|
||||
}
|
||||
else {
|
||||
return new Date(year, month, day, hour, minute, second, milliseconds);
|
||||
}
|
||||
}
|
||||
if (input.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)) {
|
||||
const date = new Date();
|
||||
date.setTime(Date.parse([RegExp.$1, RegExp.$2, RegExp.$3, RegExp.$6, RegExp.$4, RegExp.$5].join(" ")));
|
||||
}
|
||||
const date = new Date();
|
||||
date.setTime(Date.parse(input));
|
||||
return date;
|
||||
}
|
||||
//# sourceMappingURL=parseDate.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/parseDate.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/parseDate.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"parseDate.js","sourceRoot":"","sources":["../../../src/helpers/parseDate.ts"],"names":[],"mappings":"AAkCA,MAAM,UAAU,SAAS,CAAC,KAAe;IAEvC,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAE9B,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,OAAO,CAAC,KAA0B,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CACrC,wFAAwF,CACzF,CAAC;IAEF,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,KAAK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EhC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
||||
33
node_modules/i18n-js/dist/import/helpers/pluralize.js
generated
vendored
Normal file
33
node_modules/i18n-js/dist/import/helpers/pluralize.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import { isSet } from "./isSet";
|
||||
import { lookup } from "./lookup";
|
||||
export function pluralize({ i18n, count, scope, options, baseScope, }) {
|
||||
options = Object.assign({}, options);
|
||||
let translations;
|
||||
let message;
|
||||
if (typeof scope === "object" && scope) {
|
||||
translations = scope;
|
||||
}
|
||||
else {
|
||||
translations = lookup(i18n, scope, options);
|
||||
}
|
||||
if (!translations) {
|
||||
return i18n.missingTranslation.get(scope, options);
|
||||
}
|
||||
const pluralizer = i18n.pluralization.get(options.locale);
|
||||
const keys = pluralizer(i18n, count);
|
||||
const missingKeys = [];
|
||||
while (keys.length) {
|
||||
const key = keys.shift();
|
||||
if (isSet(translations[key])) {
|
||||
message = translations[key];
|
||||
break;
|
||||
}
|
||||
missingKeys.push(key);
|
||||
}
|
||||
if (!isSet(message)) {
|
||||
return i18n.missingTranslation.get(baseScope.split(i18n.defaultSeparator).concat([missingKeys[0]]), options);
|
||||
}
|
||||
options.count = count;
|
||||
return i18n.interpolate(i18n, message, options);
|
||||
}
|
||||
//# sourceMappingURL=pluralize.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/pluralize.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/pluralize.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pluralize.js","sourceRoot":"","sources":["../../../src/helpers/pluralize.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAmBlC,MAAM,UAAU,SAAS,CAAC,EACxB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,OAAO,EACP,SAAS,GAOV;IACC,OAAO,qBAAQ,OAAO,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OAAO,CAAC,CAAC;AAClD,CAAC"}
|
||||
28
node_modules/i18n-js/dist/import/helpers/roundNumber.js
generated
vendored
Normal file
28
node_modules/i18n-js/dist/import/helpers/roundNumber.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { BigNumber } from "bignumber.js";
|
||||
import { expandRoundMode } from "./expandRoundMode";
|
||||
function digitCount(numeric) {
|
||||
if (numeric.isZero()) {
|
||||
return 1;
|
||||
}
|
||||
return Math.floor(Math.log10(numeric.abs().toNumber()) + 1);
|
||||
}
|
||||
function getAbsolutePrecision(numeric, { precision, significant }) {
|
||||
if (significant && precision !== null && precision > 0) {
|
||||
return precision - digitCount(numeric);
|
||||
}
|
||||
return precision;
|
||||
}
|
||||
export function roundNumber(numeric, options) {
|
||||
const precision = getAbsolutePrecision(numeric, options);
|
||||
if (precision === null) {
|
||||
return numeric.toString();
|
||||
}
|
||||
const roundMode = expandRoundMode(options.roundMode);
|
||||
if (precision >= 0) {
|
||||
return numeric.toFixed(precision, roundMode);
|
||||
}
|
||||
const rounder = Math.pow(10, Math.abs(precision));
|
||||
numeric = new BigNumber(numeric.div(rounder).toFixed(0, roundMode)).times(rounder);
|
||||
return numeric.toString();
|
||||
}
|
||||
//# sourceMappingURL=roundNumber.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/roundNumber.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/roundNumber.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"roundNumber.js","sourceRoot":"","sources":["../../../src/helpers/roundNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAQpD,SAAS,UAAU,CAAC,OAAkB;IACpC,IAAI,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,oBAAoB,CAC3B,OAAkB,EAClB,EAAE,SAAS,EAAE,WAAW,EAAmB;IAE3C,IAAI,WAAW,IAAI,SAAS,KAAK,IAAI,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;QACvD,OAAO,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAaD,MAAM,UAAU,WAAW,CACzB,OAAkB,EAClB,OAAwB;IAExB,MAAM,SAAS,GAAG,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAEzD,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM,SAAS,GAAG,eAAe,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAErD,IAAI,SAAS,IAAI,CAAC,EAAE,CAAC;QACnB,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC/C,CAAC;IAID,MAAM,OAAO,GAAG,SAAA,EAAE,EAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA,CAAC;IAE1C,OAAO,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,CACvE,OAAO,CACR,CAAC;IAEF,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;AAC5B,CAAC"}
|
||||
102
node_modules/i18n-js/dist/import/helpers/strftime.js
generated
vendored
Normal file
102
node_modules/i18n-js/dist/import/helpers/strftime.js
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
const DEFAULT_OPTIONS = {
|
||||
meridian: { am: "AM", pm: "PM" },
|
||||
dayNames: [
|
||||
"Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday",
|
||||
],
|
||||
abbrDayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
||||
monthNames: [
|
||||
null,
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December",
|
||||
],
|
||||
abbrMonthNames: [
|
||||
null,
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec",
|
||||
],
|
||||
};
|
||||
export function strftime(date, format, options = {}) {
|
||||
const { abbrDayNames, dayNames, abbrMonthNames, monthNames, meridian: AM_PM, utc, } = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options);
|
||||
if (isNaN(date.getTime())) {
|
||||
throw new Error("strftime() requires a valid date object, but received an invalid date.");
|
||||
}
|
||||
const weekDay = utc ? date.getUTCDay() : date.getDay();
|
||||
const day = utc ? date.getUTCDate() : date.getDate();
|
||||
const year = utc ? date.getUTCFullYear() : date.getFullYear();
|
||||
const month = (utc ? date.getUTCMonth() : date.getMonth()) + 1;
|
||||
const hour = utc ? date.getUTCHours() : date.getHours();
|
||||
let hour12 = hour;
|
||||
const meridian = hour > 11 ? "pm" : "am";
|
||||
const secs = utc ? date.getUTCSeconds() : date.getSeconds();
|
||||
const mins = utc ? date.getUTCMinutes() : date.getMinutes();
|
||||
const offset = utc ? 0 : date.getTimezoneOffset();
|
||||
const absOffsetHours = Math.floor(Math.abs(offset / 60));
|
||||
const absOffsetMinutes = Math.abs(offset) - absOffsetHours * 60;
|
||||
const timezoneoffset = (offset > 0 ? "-" : "+") +
|
||||
(absOffsetHours.toString().length < 2
|
||||
? "0" + absOffsetHours
|
||||
: absOffsetHours) +
|
||||
(absOffsetMinutes.toString().length < 2
|
||||
? "0" + absOffsetMinutes
|
||||
: absOffsetMinutes);
|
||||
if (hour12 > 12) {
|
||||
hour12 = hour12 - 12;
|
||||
}
|
||||
else if (hour12 === 0) {
|
||||
hour12 = 12;
|
||||
}
|
||||
format = format.replace("%a", abbrDayNames[weekDay]);
|
||||
format = format.replace("%A", dayNames[weekDay]);
|
||||
format = format.replace("%b", abbrMonthNames[month]);
|
||||
format = format.replace("%B", monthNames[month]);
|
||||
format = format.replace("%d", day.toString().padStart(2, "0"));
|
||||
format = format.replace("%e", day.toString());
|
||||
format = format.replace("%-d", day.toString());
|
||||
format = format.replace("%H", hour.toString().padStart(2, "0"));
|
||||
format = format.replace("%-H", hour.toString());
|
||||
format = format.replace("%k", hour.toString());
|
||||
format = format.replace("%I", hour12.toString().padStart(2, "0"));
|
||||
format = format.replace("%-I", hour12.toString());
|
||||
format = format.replace("%l", hour12.toString());
|
||||
format = format.replace("%m", month.toString().padStart(2, "0"));
|
||||
format = format.replace("%-m", month.toString());
|
||||
format = format.replace("%M", mins.toString().padStart(2, "0"));
|
||||
format = format.replace("%-M", mins.toString());
|
||||
format = format.replace("%p", AM_PM[meridian]);
|
||||
format = format.replace("%P", AM_PM[meridian].toLowerCase());
|
||||
format = format.replace("%S", secs.toString().padStart(2, "0"));
|
||||
format = format.replace("%-S", secs.toString());
|
||||
format = format.replace("%w", weekDay.toString());
|
||||
format = format.replace("%y", year.toString().padStart(2, "0").substr(-2));
|
||||
format = format.replace("%-y", year.toString().padStart(2, "0").substr(-2).replace(/^0+/, ""));
|
||||
format = format.replace("%Y", year.toString());
|
||||
format = format.replace(/%z/i, timezoneoffset);
|
||||
return format;
|
||||
}
|
||||
//# sourceMappingURL=strftime.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/strftime.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/strftime.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"strftime.js","sourceRoot":"","sources":["../../../src/helpers/strftime.ts"],"names":[],"mappings":"AAEA,MAAM,eAAe,GAAoB;IACvC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE;IAChC,QAAQ,EAAE;QACR,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,WAAW;QACX,UAAU;QACV,QAAQ;QACR,UAAU;KACX;IACD,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAC/D,UAAU,EAAE;QACV,IAAI;QACJ,SAAS;QACT,UAAU;QACV,OAAO;QACP,OAAO;QACP,KAAK;QACL,MAAM;QACN,MAAM;QACN,QAAQ;QACR,WAAW;QACX,SAAS;QACT,UAAU;QACV,UAAU;KACX;IACD,cAAc,EAAE;QACd,IAAI;QACJ,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN;CACF,CAAC;AAkDF,MAAM,UAAU,QAAQ,CACtB,IAAU,EACV,MAAc,EACd,UAAoC,EAAE;IAEtC,MAAM,EACJ,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,UAAU,EACV,QAAQ,EAAE,KAAK,EACf,GAAG,GACJ,mCAAQ,eAAe,GAAK,OAAO,CAAE,CAAC;IAEvC,IAAI,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAA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AAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC7D,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAChE,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAChD,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAClD,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,MAAM,GAAG,MAAM,CAAC,OAAO,CACrB,KAAK,EACL,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAC/D,CAAC;IACF,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/C,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IAE/C,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
||||
94
node_modules/i18n-js/dist/import/helpers/timeAgoInWords.js
generated
vendored
Normal file
94
node_modules/i18n-js/dist/import/helpers/timeAgoInWords.js
generated
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
import range from "lodash/range";
|
||||
import { parseDate } from "./parseDate";
|
||||
const within = (start, end, actual) => actual >= start && actual <= end;
|
||||
export function timeAgoInWords(i18n, fromTime, toTime, options = {}) {
|
||||
const scope = options.scope || "datetime.distance_in_words";
|
||||
const t = (name, count = 0) => i18n.t(name, { count, scope });
|
||||
fromTime = parseDate(fromTime);
|
||||
toTime = parseDate(toTime);
|
||||
let fromInSeconds = fromTime.getTime() / 1000;
|
||||
let toInSeconds = toTime.getTime() / 1000;
|
||||
if (fromInSeconds > toInSeconds) {
|
||||
[fromTime, toTime, fromInSeconds, toInSeconds] = [
|
||||
toTime,
|
||||
fromTime,
|
||||
toInSeconds,
|
||||
fromInSeconds,
|
||||
];
|
||||
}
|
||||
const distanceInSeconds = Math.round(toInSeconds - fromInSeconds);
|
||||
const distanceInMinutes = Math.round((toInSeconds - fromInSeconds) / 60);
|
||||
const distanceInHours = distanceInMinutes / 60;
|
||||
const distanceInDays = distanceInHours / 24;
|
||||
const distanceInHoursRounded = Math.round(distanceInMinutes / 60);
|
||||
const distanceInDaysRounded = Math.round(distanceInDays);
|
||||
const distanceInMonthsRounded = Math.round(distanceInDaysRounded / 30);
|
||||
if (within(0, 1, distanceInMinutes)) {
|
||||
if (!options.includeSeconds) {
|
||||
return distanceInMinutes === 0
|
||||
? t("less_than_x_minutes", 1)
|
||||
: t("x_minutes", distanceInMinutes);
|
||||
}
|
||||
if (within(0, 4, distanceInSeconds)) {
|
||||
return t("less_than_x_seconds", 5);
|
||||
}
|
||||
if (within(5, 9, distanceInSeconds)) {
|
||||
return t("less_than_x_seconds", 10);
|
||||
}
|
||||
if (within(10, 19, distanceInSeconds)) {
|
||||
return t("less_than_x_seconds", 20);
|
||||
}
|
||||
if (within(20, 39, distanceInSeconds)) {
|
||||
return t("half_a_minute");
|
||||
}
|
||||
if (within(40, 59, distanceInSeconds)) {
|
||||
return t("less_than_x_minutes", 1);
|
||||
}
|
||||
return t("x_minutes", 1);
|
||||
}
|
||||
if (within(2, 44, distanceInMinutes)) {
|
||||
return t("x_minutes", distanceInMinutes);
|
||||
}
|
||||
if (within(45, 89, distanceInMinutes)) {
|
||||
return t("about_x_hours", 1);
|
||||
}
|
||||
if (within(90, 1439, distanceInMinutes)) {
|
||||
return t("about_x_hours", distanceInHoursRounded);
|
||||
}
|
||||
if (within(1440, 2519, distanceInMinutes)) {
|
||||
return t("x_days", 1);
|
||||
}
|
||||
if (within(2520, 43199, distanceInMinutes)) {
|
||||
return t("x_days", distanceInDaysRounded);
|
||||
}
|
||||
if (within(43200, 86399, distanceInMinutes)) {
|
||||
return t("about_x_months", Math.round(distanceInMinutes / 43200));
|
||||
}
|
||||
if (within(86400, 525599, distanceInMinutes)) {
|
||||
return t("x_months", distanceInMonthsRounded);
|
||||
}
|
||||
let fromYear = fromTime.getFullYear();
|
||||
if (fromTime.getMonth() + 1 >= 3) {
|
||||
fromYear += 1;
|
||||
}
|
||||
let toYear = toTime.getFullYear();
|
||||
if (toTime.getMonth() + 1 < 3) {
|
||||
toYear -= 1;
|
||||
}
|
||||
const leapYears = fromYear > toYear
|
||||
? 0
|
||||
: range(fromYear, toYear).filter((year) => new Date(year, 1, 29).getMonth() == 1).length;
|
||||
const minutesInYear = 525600;
|
||||
const minuteOffsetForLeapYear = leapYears * 1440;
|
||||
const minutesWithOffset = distanceInMinutes - minuteOffsetForLeapYear;
|
||||
const distanceInYears = Math.trunc(minutesWithOffset / minutesInYear);
|
||||
const diff = parseFloat((minutesWithOffset / minutesInYear - distanceInYears).toPrecision(3));
|
||||
if (diff < 0.25) {
|
||||
return t("about_x_years", distanceInYears);
|
||||
}
|
||||
if (diff < 0.75) {
|
||||
return t("over_x_years", distanceInYears);
|
||||
}
|
||||
return t("almost_x_years", distanceInYears + 1);
|
||||
}
|
||||
//# sourceMappingURL=timeAgoInWords.js.map
|
||||
1
node_modules/i18n-js/dist/import/helpers/timeAgoInWords.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/helpers/timeAgoInWords.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"timeAgoInWords.js","sourceRoot":"","sources":["../../../src/helpers/timeAgoInWords.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MA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;IAChB,CAAC;IAED,IAAI,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;IAElC,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,CAAC,CAAC;IACd,CAAC;IAED,MAAM,SAAS,GACb,QAAQ,GAAG,MAAM;QACf,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,MAAM,CAC5B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAChD,CAAC,MAAM,CAAC;IAEf,MAAM,aAAa,GAAG,MAAO,CAAC;IAC9B,MAAM,uBAAuB,GAAG,SAAS,GAAG,IAAI,CAAC;IACjD,MAAM,iBAAiB,GAAG,iBAAiB,GAAG,uBAAuB,CAAC;IACtE,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,CAAC,CAAC;IAEtE,MAAM,IAAI,GAAG,UAAU,CACrB,CAAC,iBAAiB,GAAG,aAAa,GAAG,eAAe,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CACrE,CAAC;IAEF,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;QAChB,OAAO,CAAC,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAC7C,CAAC;IAED,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;QAChB,OAAO,CAAC,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,CAAC,CAAC,gBAAgB,EAAE,eAAe,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
||||
6
node_modules/i18n-js/dist/import/index.js
generated
vendored
Normal file
6
node_modules/i18n-js/dist/import/index.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export { I18n } from "./I18n";
|
||||
export { Locales } from "./Locales";
|
||||
export { MissingTranslation } from "./MissingTranslation";
|
||||
export { Pluralization, useMakePlural } from "./Pluralization";
|
||||
export * from "./typing";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/i18n-js/dist/import/index.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/D,cAAc,UAAU,CAAC"}
|
||||
3777
node_modules/i18n-js/dist/import/lodash.js
generated
vendored
Normal file
3777
node_modules/i18n-js/dist/import/lodash.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/i18n-js/dist/import/lodash.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/lodash.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"lodash.js","sourceRoot":"","sources":["../../src/lodash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,cAAc,CAAC"}
|
||||
663
node_modules/i18n-js/dist/import/make-plural.js
generated
vendored
Normal file
663
node_modules/i18n-js/dist/import/make-plural.js
generated
vendored
Normal file
@@ -0,0 +1,663 @@
|
||||
const a = (n, ord) => {
|
||||
if (ord) return 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
const b = (n, ord) => {
|
||||
if (ord) return 'other';
|
||||
return (n == 0 || n == 1) ? 'one' : 'other';
|
||||
};
|
||||
const c = (n, ord) => {
|
||||
if (ord) return 'other';
|
||||
return n >= 0 && n <= 1 ? 'one' : 'other';
|
||||
};
|
||||
const d = (n, ord) => {
|
||||
const s = String(n).split('.'), v0 = !s[1];
|
||||
if (ord) return 'other';
|
||||
return n == 1 && v0 ? 'one' : 'other';
|
||||
};
|
||||
const e = (n, ord) => 'other';
|
||||
const f = (n, ord) => {
|
||||
if (ord) return 'other';
|
||||
return n == 1 ? 'one'
|
||||
: n == 2 ? 'two'
|
||||
: 'other';
|
||||
};
|
||||
|
||||
export const af = a;
|
||||
export const ak = b;
|
||||
export const am = c;
|
||||
export const an = a;
|
||||
export const ar = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return 'other';
|
||||
return n == 0 ? 'zero'
|
||||
: n == 1 ? 'one'
|
||||
: n == 2 ? 'two'
|
||||
: (n100 >= 3 && n100 <= 10) ? 'few'
|
||||
: (n100 >= 11 && n100 <= 99) ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const ars = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return 'other';
|
||||
return n == 0 ? 'zero'
|
||||
: n == 1 ? 'one'
|
||||
: n == 2 ? 'two'
|
||||
: (n100 >= 3 && n100 <= 10) ? 'few'
|
||||
: (n100 >= 11 && n100 <= 99) ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const as = (n, ord) => {
|
||||
if (ord) return (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'
|
||||
: (n == 2 || n == 3) ? 'two'
|
||||
: n == 4 ? 'few'
|
||||
: n == 6 ? 'many'
|
||||
: 'other';
|
||||
return n >= 0 && n <= 1 ? 'one' : 'other';
|
||||
};
|
||||
export const asa = a;
|
||||
export const ast = d;
|
||||
export const az = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], i10 = i.slice(-1), i100 = i.slice(-2), i1000 = i.slice(-3);
|
||||
if (ord) return (i10 == 1 || i10 == 2 || i10 == 5 || i10 == 7 || i10 == 8) || (i100 == 20 || i100 == 50 || i100 == 70 || i100 == 80) ? 'one'
|
||||
: (i10 == 3 || i10 == 4) || (i1000 == 100 || i1000 == 200 || i1000 == 300 || i1000 == 400 || i1000 == 500 || i1000 == 600 || i1000 == 700 || i1000 == 800 || i1000 == 900) ? 'few'
|
||||
: i == 0 || i10 == 6 || (i100 == 40 || i100 == 60 || i100 == 90) ? 'many'
|
||||
: 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const bal = (n, ord) => n == 1 ? 'one' : 'other';
|
||||
export const be = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return (n10 == 2 || n10 == 3) && n100 != 12 && n100 != 13 ? 'few' : 'other';
|
||||
return n10 == 1 && n100 != 11 ? 'one'
|
||||
: (n10 >= 2 && n10 <= 4) && (n100 < 12 || n100 > 14) ? 'few'
|
||||
: t0 && n10 == 0 || (n10 >= 5 && n10 <= 9) || (n100 >= 11 && n100 <= 14) ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const bem = a;
|
||||
export const bez = a;
|
||||
export const bg = a;
|
||||
export const bho = b;
|
||||
export const bm = e;
|
||||
export const bn = (n, ord) => {
|
||||
if (ord) return (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'
|
||||
: (n == 2 || n == 3) ? 'two'
|
||||
: n == 4 ? 'few'
|
||||
: n == 6 ? 'many'
|
||||
: 'other';
|
||||
return n >= 0 && n <= 1 ? 'one' : 'other';
|
||||
};
|
||||
export const bo = e;
|
||||
export const br = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2), n1000000 = t0 && s[0].slice(-6);
|
||||
if (ord) return 'other';
|
||||
return n10 == 1 && n100 != 11 && n100 != 71 && n100 != 91 ? 'one'
|
||||
: n10 == 2 && n100 != 12 && n100 != 72 && n100 != 92 ? 'two'
|
||||
: ((n10 == 3 || n10 == 4) || n10 == 9) && (n100 < 10 || n100 > 19) && (n100 < 70 || n100 > 79) && (n100 < 90 || n100 > 99) ? 'few'
|
||||
: n != 0 && t0 && n1000000 == 0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const brx = a;
|
||||
export const bs = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one'
|
||||
: v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) || (f10 >= 2 && f10 <= 4) && (f100 < 12 || f100 > 14) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const ca = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
||||
if (ord) return (n == 1 || n == 3) ? 'one'
|
||||
: n == 2 ? 'two'
|
||||
: n == 4 ? 'few'
|
||||
: 'other';
|
||||
return n == 1 && v0 ? 'one'
|
||||
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const ce = a;
|
||||
export const ceb = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), f10 = f.slice(-1);
|
||||
if (ord) return 'other';
|
||||
return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';
|
||||
};
|
||||
export const cgg = a;
|
||||
export const chr = a;
|
||||
export const ckb = a;
|
||||
export const cs = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1];
|
||||
if (ord) return 'other';
|
||||
return n == 1 && v0 ? 'one'
|
||||
: (i >= 2 && i <= 4) && v0 ? 'few'
|
||||
: !v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const cy = (n, ord) => {
|
||||
if (ord) return (n == 0 || n == 7 || n == 8 || n == 9) ? 'zero'
|
||||
: n == 1 ? 'one'
|
||||
: n == 2 ? 'two'
|
||||
: (n == 3 || n == 4) ? 'few'
|
||||
: (n == 5 || n == 6) ? 'many'
|
||||
: 'other';
|
||||
return n == 0 ? 'zero'
|
||||
: n == 1 ? 'one'
|
||||
: n == 2 ? 'two'
|
||||
: n == 3 ? 'few'
|
||||
: n == 6 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const da = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], t0 = Number(s[0]) == n;
|
||||
if (ord) return 'other';
|
||||
return n == 1 || !t0 && (i == 0 || i == 1) ? 'one' : 'other';
|
||||
};
|
||||
export const de = d;
|
||||
export const doi = c;
|
||||
export const dsb = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i100 = i.slice(-2), f100 = f.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return v0 && i100 == 1 || f100 == 1 ? 'one'
|
||||
: v0 && i100 == 2 || f100 == 2 ? 'two'
|
||||
: v0 && (i100 == 3 || i100 == 4) || (f100 == 3 || f100 == 4) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const dv = a;
|
||||
export const dz = e;
|
||||
export const ee = a;
|
||||
export const el = a;
|
||||
export const en = (n, ord) => {
|
||||
const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return n10 == 1 && n100 != 11 ? 'one'
|
||||
: n10 == 2 && n100 != 12 ? 'two'
|
||||
: n10 == 3 && n100 != 13 ? 'few'
|
||||
: 'other';
|
||||
return n == 1 && v0 ? 'one' : 'other';
|
||||
};
|
||||
export const eo = a;
|
||||
export const es = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
||||
if (ord) return 'other';
|
||||
return n == 1 ? 'one'
|
||||
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const et = d;
|
||||
export const eu = a;
|
||||
export const fa = c;
|
||||
export const ff = (n, ord) => {
|
||||
if (ord) return 'other';
|
||||
return n >= 0 && n < 2 ? 'one' : 'other';
|
||||
};
|
||||
export const fi = d;
|
||||
export const fil = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), f10 = f.slice(-1);
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';
|
||||
};
|
||||
export const fo = a;
|
||||
export const fr = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return n >= 0 && n < 2 ? 'one'
|
||||
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const fur = a;
|
||||
export const fy = d;
|
||||
export const ga = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n;
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return n == 1 ? 'one'
|
||||
: n == 2 ? 'two'
|
||||
: (t0 && n >= 3 && n <= 6) ? 'few'
|
||||
: (t0 && n >= 7 && n <= 10) ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const gd = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n;
|
||||
if (ord) return (n == 1 || n == 11) ? 'one'
|
||||
: (n == 2 || n == 12) ? 'two'
|
||||
: (n == 3 || n == 13) ? 'few'
|
||||
: 'other';
|
||||
return (n == 1 || n == 11) ? 'one'
|
||||
: (n == 2 || n == 12) ? 'two'
|
||||
: ((t0 && n >= 3 && n <= 10) || (t0 && n >= 13 && n <= 19)) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const gl = d;
|
||||
export const gsw = a;
|
||||
export const gu = (n, ord) => {
|
||||
if (ord) return n == 1 ? 'one'
|
||||
: (n == 2 || n == 3) ? 'two'
|
||||
: n == 4 ? 'few'
|
||||
: n == 6 ? 'many'
|
||||
: 'other';
|
||||
return n >= 0 && n <= 1 ? 'one' : 'other';
|
||||
};
|
||||
export const guw = b;
|
||||
export const gv = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return v0 && i10 == 1 ? 'one'
|
||||
: v0 && i10 == 2 ? 'two'
|
||||
: v0 && (i100 == 0 || i100 == 20 || i100 == 40 || i100 == 60 || i100 == 80) ? 'few'
|
||||
: !v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const ha = a;
|
||||
export const haw = a;
|
||||
export const he = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1];
|
||||
if (ord) return 'other';
|
||||
return i == 1 && v0 || i == 0 && !v0 ? 'one'
|
||||
: i == 2 && v0 ? 'two'
|
||||
: 'other';
|
||||
};
|
||||
export const hi = (n, ord) => {
|
||||
if (ord) return n == 1 ? 'one'
|
||||
: (n == 2 || n == 3) ? 'two'
|
||||
: n == 4 ? 'few'
|
||||
: n == 6 ? 'many'
|
||||
: 'other';
|
||||
return n >= 0 && n <= 1 ? 'one' : 'other';
|
||||
};
|
||||
export const hnj = e;
|
||||
export const hr = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one'
|
||||
: v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) || (f10 >= 2 && f10 <= 4) && (f100 < 12 || f100 > 14) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const hsb = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i100 = i.slice(-2), f100 = f.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return v0 && i100 == 1 || f100 == 1 ? 'one'
|
||||
: v0 && i100 == 2 || f100 == 2 ? 'two'
|
||||
: v0 && (i100 == 3 || i100 == 4) || (f100 == 3 || f100 == 4) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const hu = (n, ord) => {
|
||||
if (ord) return (n == 1 || n == 5) ? 'one' : 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const hy = (n, ord) => {
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return n >= 0 && n < 2 ? 'one' : 'other';
|
||||
};
|
||||
export const ia = d;
|
||||
export const id = e;
|
||||
export const ig = e;
|
||||
export const ii = e;
|
||||
export const io = d;
|
||||
export const is = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], t = (s[1] || '').replace(/0+$/, ''), t0 = Number(s[0]) == n, i10 = i.slice(-1), i100 = i.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return t0 && i10 == 1 && i100 != 11 || t % 10 == 1 && t % 100 != 11 ? 'one' : 'other';
|
||||
};
|
||||
export const it = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
||||
if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
|
||||
return n == 1 && v0 ? 'one'
|
||||
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const iu = f;
|
||||
export const ja = e;
|
||||
export const jbo = e;
|
||||
export const jgo = a;
|
||||
export const jmc = a;
|
||||
export const jv = e;
|
||||
export const jw = e;
|
||||
export const ka = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], i100 = i.slice(-2);
|
||||
if (ord) return i == 1 ? 'one'
|
||||
: i == 0 || ((i100 >= 2 && i100 <= 20) || i100 == 40 || i100 == 60 || i100 == 80) ? 'many'
|
||||
: 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const kab = (n, ord) => {
|
||||
if (ord) return 'other';
|
||||
return n >= 0 && n < 2 ? 'one' : 'other';
|
||||
};
|
||||
export const kaj = a;
|
||||
export const kcg = a;
|
||||
export const kde = e;
|
||||
export const kea = e;
|
||||
export const kk = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1);
|
||||
if (ord) return n10 == 6 || n10 == 9 || t0 && n10 == 0 && n != 0 ? 'many' : 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const kkj = a;
|
||||
export const kl = a;
|
||||
export const km = e;
|
||||
export const kn = c;
|
||||
export const ko = e;
|
||||
export const ks = a;
|
||||
export const ksb = a;
|
||||
export const ksh = (n, ord) => {
|
||||
if (ord) return 'other';
|
||||
return n == 0 ? 'zero'
|
||||
: n == 1 ? 'one'
|
||||
: 'other';
|
||||
};
|
||||
export const ku = a;
|
||||
export const kw = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2), n1000 = t0 && s[0].slice(-3), n100000 = t0 && s[0].slice(-5), n1000000 = t0 && s[0].slice(-6);
|
||||
if (ord) return (t0 && n >= 1 && n <= 4) || ((n100 >= 1 && n100 <= 4) || (n100 >= 21 && n100 <= 24) || (n100 >= 41 && n100 <= 44) || (n100 >= 61 && n100 <= 64) || (n100 >= 81 && n100 <= 84)) ? 'one'
|
||||
: n == 5 || n100 == 5 ? 'many'
|
||||
: 'other';
|
||||
return n == 0 ? 'zero'
|
||||
: n == 1 ? 'one'
|
||||
: (n100 == 2 || n100 == 22 || n100 == 42 || n100 == 62 || n100 == 82) || t0 && n1000 == 0 && ((n100000 >= 1000 && n100000 <= 20000) || n100000 == 40000 || n100000 == 60000 || n100000 == 80000) || n != 0 && n1000000 == 100000 ? 'two'
|
||||
: (n100 == 3 || n100 == 23 || n100 == 43 || n100 == 63 || n100 == 83) ? 'few'
|
||||
: n != 1 && (n100 == 1 || n100 == 21 || n100 == 41 || n100 == 61 || n100 == 81) ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const ky = a;
|
||||
export const lag = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0];
|
||||
if (ord) return 'other';
|
||||
return n == 0 ? 'zero'
|
||||
: (i == 0 || i == 1) && n != 0 ? 'one'
|
||||
: 'other';
|
||||
};
|
||||
export const lb = a;
|
||||
export const lg = a;
|
||||
export const lij = (n, ord) => {
|
||||
const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n;
|
||||
if (ord) return (n == 11 || n == 8 || (t0 && n >= 80 && n <= 89) || (t0 && n >= 800 && n <= 899)) ? 'many' : 'other';
|
||||
return n == 1 && v0 ? 'one' : 'other';
|
||||
};
|
||||
export const lkt = e;
|
||||
export const ln = b;
|
||||
export const lo = (n, ord) => {
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return 'other';
|
||||
};
|
||||
export const lt = (n, ord) => {
|
||||
const s = String(n).split('.'), f = s[1] || '', t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return 'other';
|
||||
return n10 == 1 && (n100 < 11 || n100 > 19) ? 'one'
|
||||
: (n10 >= 2 && n10 <= 9) && (n100 < 11 || n100 > 19) ? 'few'
|
||||
: f != 0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const lv = (n, ord) => {
|
||||
const s = String(n).split('.'), f = s[1] || '', v = f.length, t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2), f100 = f.slice(-2), f10 = f.slice(-1);
|
||||
if (ord) return 'other';
|
||||
return t0 && n10 == 0 || (n100 >= 11 && n100 <= 19) || v == 2 && (f100 >= 11 && f100 <= 19) ? 'zero'
|
||||
: n10 == 1 && n100 != 11 || v == 2 && f10 == 1 && f100 != 11 || v != 2 && f10 == 1 ? 'one'
|
||||
: 'other';
|
||||
};
|
||||
export const mas = a;
|
||||
export const mg = b;
|
||||
export const mgo = a;
|
||||
export const mk = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);
|
||||
if (ord) return i10 == 1 && i100 != 11 ? 'one'
|
||||
: i10 == 2 && i100 != 12 ? 'two'
|
||||
: (i10 == 7 || i10 == 8) && i100 != 17 && i100 != 18 ? 'many'
|
||||
: 'other';
|
||||
return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : 'other';
|
||||
};
|
||||
export const ml = a;
|
||||
export const mn = a;
|
||||
export const mo = (n, ord) => {
|
||||
const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return n == 1 && v0 ? 'one'
|
||||
: !v0 || n == 0 || n != 1 && (n100 >= 1 && n100 <= 19) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const mr = (n, ord) => {
|
||||
if (ord) return n == 1 ? 'one'
|
||||
: (n == 2 || n == 3) ? 'two'
|
||||
: n == 4 ? 'few'
|
||||
: 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const ms = (n, ord) => {
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return 'other';
|
||||
};
|
||||
export const mt = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return 'other';
|
||||
return n == 1 ? 'one'
|
||||
: n == 2 ? 'two'
|
||||
: n == 0 || (n100 >= 3 && n100 <= 10) ? 'few'
|
||||
: (n100 >= 11 && n100 <= 19) ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const my = e;
|
||||
export const nah = a;
|
||||
export const naq = f;
|
||||
export const nb = a;
|
||||
export const nd = a;
|
||||
export const ne = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n;
|
||||
if (ord) return (t0 && n >= 1 && n <= 4) ? 'one' : 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const nl = d;
|
||||
export const nn = a;
|
||||
export const nnh = a;
|
||||
export const no = a;
|
||||
export const nqo = e;
|
||||
export const nr = a;
|
||||
export const nso = b;
|
||||
export const ny = a;
|
||||
export const nyn = a;
|
||||
export const om = a;
|
||||
export const or = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n;
|
||||
if (ord) return (n == 1 || n == 5 || (t0 && n >= 7 && n <= 9)) ? 'one'
|
||||
: (n == 2 || n == 3) ? 'two'
|
||||
: n == 4 ? 'few'
|
||||
: n == 6 ? 'many'
|
||||
: 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const os = a;
|
||||
export const osa = e;
|
||||
export const pa = b;
|
||||
export const pap = a;
|
||||
export const pcm = c;
|
||||
export const pl = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return n == 1 && v0 ? 'one'
|
||||
: v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) ? 'few'
|
||||
: v0 && i != 1 && (i10 == 0 || i10 == 1) || v0 && (i10 >= 5 && i10 <= 9) || v0 && (i100 >= 12 && i100 <= 14) ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const prg = (n, ord) => {
|
||||
const s = String(n).split('.'), f = s[1] || '', v = f.length, t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2), f100 = f.slice(-2), f10 = f.slice(-1);
|
||||
if (ord) return 'other';
|
||||
return t0 && n10 == 0 || (n100 >= 11 && n100 <= 19) || v == 2 && (f100 >= 11 && f100 <= 19) ? 'zero'
|
||||
: n10 == 1 && n100 != 11 || v == 2 && f10 == 1 && f100 != 11 || v != 2 && f10 == 1 ? 'one'
|
||||
: 'other';
|
||||
};
|
||||
export const ps = a;
|
||||
export const pt = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
||||
if (ord) return 'other';
|
||||
return (i == 0 || i == 1) ? 'one'
|
||||
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const pt_PT = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
||||
if (ord) return 'other';
|
||||
return n == 1 && v0 ? 'one'
|
||||
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const rm = a;
|
||||
export const ro = (n, ord) => {
|
||||
const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return n == 1 && v0 ? 'one'
|
||||
: !v0 || n == 0 || n != 1 && (n100 >= 1 && n100 <= 19) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const rof = a;
|
||||
export const ru = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return v0 && i10 == 1 && i100 != 11 ? 'one'
|
||||
: v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) ? 'few'
|
||||
: v0 && i10 == 0 || v0 && (i10 >= 5 && i10 <= 9) || v0 && (i100 >= 11 && i100 <= 14) ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const rwk = a;
|
||||
export const sah = e;
|
||||
export const saq = a;
|
||||
export const sat = f;
|
||||
export const sc = (n, ord) => {
|
||||
const s = String(n).split('.'), v0 = !s[1];
|
||||
if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
|
||||
return n == 1 && v0 ? 'one' : 'other';
|
||||
};
|
||||
export const scn = (n, ord) => {
|
||||
const s = String(n).split('.'), v0 = !s[1];
|
||||
if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
|
||||
return n == 1 && v0 ? 'one' : 'other';
|
||||
};
|
||||
export const sd = a;
|
||||
export const sdh = a;
|
||||
export const se = f;
|
||||
export const seh = a;
|
||||
export const ses = e;
|
||||
export const sg = e;
|
||||
export const sh = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one'
|
||||
: v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) || (f10 >= 2 && f10 <= 4) && (f100 < 12 || f100 > 14) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const shi = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n;
|
||||
if (ord) return 'other';
|
||||
return n >= 0 && n <= 1 ? 'one'
|
||||
: (t0 && n >= 2 && n <= 10) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const si = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '';
|
||||
if (ord) return 'other';
|
||||
return (n == 0 || n == 1) || i == 0 && f == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const sk = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1];
|
||||
if (ord) return 'other';
|
||||
return n == 1 && v0 ? 'one'
|
||||
: (i >= 2 && i <= 4) && v0 ? 'few'
|
||||
: !v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const sl = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i100 = i.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return v0 && i100 == 1 ? 'one'
|
||||
: v0 && i100 == 2 ? 'two'
|
||||
: v0 && (i100 == 3 || i100 == 4) || !v0 ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const sma = f;
|
||||
export const smi = f;
|
||||
export const smj = f;
|
||||
export const smn = f;
|
||||
export const sms = f;
|
||||
export const sn = a;
|
||||
export const so = a;
|
||||
export const sq = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return n == 1 ? 'one'
|
||||
: n10 == 4 && n100 != 14 ? 'many'
|
||||
: 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const sr = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), i100 = i.slice(-2), f10 = f.slice(-1), f100 = f.slice(-2);
|
||||
if (ord) return 'other';
|
||||
return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one'
|
||||
: v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) || (f10 >= 2 && f10 <= 4) && (f100 < 12 || f100 > 14) ? 'few'
|
||||
: 'other';
|
||||
};
|
||||
export const ss = a;
|
||||
export const ssy = a;
|
||||
export const st = a;
|
||||
export const su = e;
|
||||
export const sv = (n, ord) => {
|
||||
const s = String(n).split('.'), v0 = !s[1], t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2);
|
||||
if (ord) return (n10 == 1 || n10 == 2) && n100 != 11 && n100 != 12 ? 'one' : 'other';
|
||||
return n == 1 && v0 ? 'one' : 'other';
|
||||
};
|
||||
export const sw = d;
|
||||
export const syr = a;
|
||||
export const ta = a;
|
||||
export const te = a;
|
||||
export const teo = a;
|
||||
export const th = e;
|
||||
export const ti = b;
|
||||
export const tig = a;
|
||||
export const tk = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1);
|
||||
if (ord) return (n10 == 6 || n10 == 9) || n == 10 ? 'few' : 'other';
|
||||
return n == 1 ? 'one' : 'other';
|
||||
};
|
||||
export const tl = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], f = s[1] || '', v0 = !s[1], i10 = i.slice(-1), f10 = f.slice(-1);
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';
|
||||
};
|
||||
export const tn = a;
|
||||
export const to = e;
|
||||
export const tpi = e;
|
||||
export const tr = a;
|
||||
export const ts = a;
|
||||
export const tzm = (n, ord) => {
|
||||
const s = String(n).split('.'), t0 = Number(s[0]) == n;
|
||||
if (ord) return 'other';
|
||||
return (n == 0 || n == 1) || (t0 && n >= 11 && n <= 99) ? 'one' : 'other';
|
||||
};
|
||||
export const ug = a;
|
||||
export const uk = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], t0 = Number(s[0]) == n, n10 = t0 && s[0].slice(-1), n100 = t0 && s[0].slice(-2), i10 = i.slice(-1), i100 = i.slice(-2);
|
||||
if (ord) return n10 == 3 && n100 != 13 ? 'few' : 'other';
|
||||
return v0 && i10 == 1 && i100 != 11 ? 'one'
|
||||
: v0 && (i10 >= 2 && i10 <= 4) && (i100 < 12 || i100 > 14) ? 'few'
|
||||
: v0 && i10 == 0 || v0 && (i10 >= 5 && i10 <= 9) || v0 && (i100 >= 11 && i100 <= 14) ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const und = e;
|
||||
export const ur = d;
|
||||
export const uz = a;
|
||||
export const ve = a;
|
||||
export const vec = (n, ord) => {
|
||||
const s = String(n).split('.'), i = s[0], v0 = !s[1], i1000000 = i.slice(-6);
|
||||
if (ord) return (n == 11 || n == 8 || n == 80 || n == 800) ? 'many' : 'other';
|
||||
return n == 1 && v0 ? 'one'
|
||||
: i != 0 && i1000000 == 0 && v0 ? 'many'
|
||||
: 'other';
|
||||
};
|
||||
export const vi = (n, ord) => {
|
||||
if (ord) return n == 1 ? 'one' : 'other';
|
||||
return 'other';
|
||||
};
|
||||
export const vo = a;
|
||||
export const vun = a;
|
||||
export const wa = b;
|
||||
export const wae = a;
|
||||
export const wo = e;
|
||||
export const xh = a;
|
||||
export const xog = a;
|
||||
export const yi = d;
|
||||
export const yo = e;
|
||||
export const yue = e;
|
||||
export const zh = e;
|
||||
export const zu = c;
|
||||
1
node_modules/i18n-js/dist/import/make-plural.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/make-plural.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"make-plural.js","sourceRoot":"","sources":["../../src/make-plural.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,GAAG,EACH,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,KAAK,EACL,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,EACF,GAAG,EACH,EAAE,EACF,EAAE,GACH,MAAM,qBAAqB,CAAC"}
|
||||
24
node_modules/i18n-js/dist/import/pluralize/ru.js
generated
vendored
Normal file
24
node_modules/i18n-js/dist/import/pluralize/ru.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
export const ru = (_i18n, count) => {
|
||||
const mod10 = count % 10;
|
||||
const mod100 = count % 100;
|
||||
let key;
|
||||
const one = mod10 === 1 && mod100 !== 11;
|
||||
const few = [2, 3, 4].includes(mod10) && ![12, 13, 14].includes(mod100);
|
||||
const many = mod10 === 0 ||
|
||||
[5, 6, 7, 8, 9].includes(mod10) ||
|
||||
[11, 12, 13, 14].includes(mod100);
|
||||
if (one) {
|
||||
key = "one";
|
||||
}
|
||||
else if (few) {
|
||||
key = "few";
|
||||
}
|
||||
else if (many) {
|
||||
key = "many";
|
||||
}
|
||||
else {
|
||||
key = "other";
|
||||
}
|
||||
return [key];
|
||||
};
|
||||
//# sourceMappingURL=ru.js.map
|
||||
1
node_modules/i18n-js/dist/import/pluralize/ru.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/pluralize/ru.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ru.js","sourceRoot":"","sources":["../../../src/pluralize/ru.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,EAAE,GAAe,CAAC,KAAW,EAAE,KAAa,EAAE,EAAE;IAC3D,MAAM,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,KAAK,GAAG,GAAG,CAAC;IAC3B,IAAI,GAAG,CAAC;IAER,MAAM,GAAG,GAAG,KAAK,KAAK,CAAC,IAAI,MAAM,KAAK,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACxE,MAAM,IAAI,GACR,KAAK,KAAK,CAAC;QACX,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC/B,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEpC,IAAI,GAAG,EAAE,CAAC;QACR,GAAG,GAAG,KAAK,CAAC;IACd,CAAC;SAAM,IAAI,GAAG,EAAE,CAAC;QACf,GAAG,GAAG,KAAK,CAAC;IACd,CAAC;SAAM,IAAI,IAAI,EAAE,CAAC;QAChB,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,OAAO,CAAC;IAChB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,CAAC;AACf,CAAC,CAAC"}
|
||||
15
node_modules/i18n-js/dist/import/pluralize/westSlavic.js
generated
vendored
Normal file
15
node_modules/i18n-js/dist/import/pluralize/westSlavic.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
export const westSlavic = (_i18n, count) => {
|
||||
const few = [2, 3, 4];
|
||||
let key;
|
||||
if (count == 1) {
|
||||
key = "one";
|
||||
}
|
||||
else if (few.includes(count)) {
|
||||
key = "few";
|
||||
}
|
||||
else {
|
||||
key = "other";
|
||||
}
|
||||
return [key];
|
||||
};
|
||||
//# sourceMappingURL=westSlavic.js.map
|
||||
1
node_modules/i18n-js/dist/import/pluralize/westSlavic.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/pluralize/westSlavic.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"westSlavic.js","sourceRoot":"","sources":["../../../src/pluralize/westSlavic.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,UAAU,GAAe,CAAC,KAAW,EAAE,KAAa,EAAE,EAAE;IACnE,MAAM,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACtB,IAAI,GAAG,CAAC;IAER,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACf,GAAG,GAAG,KAAK,CAAC;IACd,CAAC;SAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,GAAG,GAAG,KAAK,CAAC;IACd,CAAC;SAAM,CAAC;QACN,GAAG,GAAG,OAAO,CAAC;IAChB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,CAAC;AACf,CAAC,CAAC"}
|
||||
2
node_modules/i18n-js/dist/import/typing.js
generated
vendored
Normal file
2
node_modules/i18n-js/dist/import/typing.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=typing.js.map
|
||||
1
node_modules/i18n-js/dist/import/typing.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/import/typing.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"typing.js","sourceRoot":"","sources":["../../src/typing.ts"],"names":[],"mappings":""}
|
||||
300
node_modules/i18n-js/dist/require/I18n.js
generated
vendored
Normal file
300
node_modules/i18n-js/dist/require/I18n.js
generated
vendored
Normal file
@@ -0,0 +1,300 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.I18n = void 0;
|
||||
const get_1 = __importDefault(require("lodash/get"));
|
||||
const has_1 = __importDefault(require("lodash/has"));
|
||||
const merge_1 = __importDefault(require("lodash/merge"));
|
||||
const Locales_1 = require("./Locales");
|
||||
const Pluralization_1 = require("./Pluralization");
|
||||
const MissingTranslation_1 = require("./MissingTranslation");
|
||||
const helpers_1 = require("./helpers");
|
||||
const DEFAULT_I18N_OPTIONS = {
|
||||
defaultLocale: "en",
|
||||
locale: "en",
|
||||
defaultSeparator: ".",
|
||||
placeholder: /(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,
|
||||
enableFallback: false,
|
||||
missingBehavior: "message",
|
||||
missingTranslationPrefix: "",
|
||||
missingPlaceholder: (_i18n, placeholder) => `[missing "${placeholder}" value]`,
|
||||
nullPlaceholder: (i18n, placeholder, message, options) => i18n.missingPlaceholder(i18n, placeholder, message, options),
|
||||
transformKey: (key) => key,
|
||||
};
|
||||
class I18n {
|
||||
constructor(translations = {}, options = {}) {
|
||||
this._locale = DEFAULT_I18N_OPTIONS.locale;
|
||||
this._defaultLocale = DEFAULT_I18N_OPTIONS.defaultLocale;
|
||||
this._version = 0;
|
||||
this.onChangeHandlers = [];
|
||||
this.translations = {};
|
||||
this.t = this.translate;
|
||||
this.p = this.pluralize;
|
||||
this.l = this.localize;
|
||||
this.distanceOfTimeInWords = this.timeAgoInWords;
|
||||
const { locale, enableFallback, missingBehavior, missingTranslationPrefix, missingPlaceholder, nullPlaceholder, defaultLocale, defaultSeparator, placeholder, transformKey, } = Object.assign(Object.assign({}, DEFAULT_I18N_OPTIONS), options);
|
||||
this.locale = locale;
|
||||
this.defaultLocale = defaultLocale;
|
||||
this.defaultSeparator = defaultSeparator;
|
||||
this.enableFallback = enableFallback;
|
||||
this.locale = locale;
|
||||
this.missingBehavior = missingBehavior;
|
||||
this.missingTranslationPrefix = missingTranslationPrefix;
|
||||
this.missingPlaceholder = missingPlaceholder;
|
||||
this.nullPlaceholder = nullPlaceholder;
|
||||
this.placeholder = placeholder;
|
||||
this.pluralization = new Pluralization_1.Pluralization(this);
|
||||
this.locales = new Locales_1.Locales(this);
|
||||
this.missingTranslation = new MissingTranslation_1.MissingTranslation(this);
|
||||
this.transformKey = transformKey;
|
||||
this.interpolate = helpers_1.interpolate;
|
||||
this.store(translations);
|
||||
}
|
||||
store(translations) {
|
||||
(0, merge_1.default)(this.translations, translations);
|
||||
this.hasChanged();
|
||||
}
|
||||
get locale() {
|
||||
return this._locale || this.defaultLocale || "en";
|
||||
}
|
||||
set locale(newLocale) {
|
||||
if (typeof newLocale !== "string") {
|
||||
throw new Error(`Expected newLocale to be a string; got ${(0, helpers_1.inferType)(newLocale)}`);
|
||||
}
|
||||
const changed = this._locale !== newLocale;
|
||||
this._locale = newLocale;
|
||||
if (changed) {
|
||||
this.hasChanged();
|
||||
}
|
||||
}
|
||||
get defaultLocale() {
|
||||
return this._defaultLocale || "en";
|
||||
}
|
||||
set defaultLocale(newLocale) {
|
||||
if (typeof newLocale !== "string") {
|
||||
throw new Error(`Expected newLocale to be a string; got ${(0, helpers_1.inferType)(newLocale)}`);
|
||||
}
|
||||
const changed = this._defaultLocale !== newLocale;
|
||||
this._defaultLocale = newLocale;
|
||||
if (changed) {
|
||||
this.hasChanged();
|
||||
}
|
||||
}
|
||||
translate(scope, options) {
|
||||
options = Object.assign({}, options);
|
||||
const translationOptions = (0, helpers_1.createTranslationOptions)(this, scope, options);
|
||||
let translation;
|
||||
const hasFoundTranslation = translationOptions.some((translationOption) => {
|
||||
if ((0, helpers_1.isSet)(translationOption.scope)) {
|
||||
translation = (0, helpers_1.lookup)(this, translationOption.scope, options);
|
||||
}
|
||||
else if ((0, helpers_1.isSet)(translationOption.message)) {
|
||||
translation = translationOption.message;
|
||||
}
|
||||
return translation !== undefined && translation !== null;
|
||||
});
|
||||
if (!hasFoundTranslation) {
|
||||
return this.missingTranslation.get(scope, options);
|
||||
}
|
||||
if (typeof translation === "string") {
|
||||
translation = this.interpolate(this, translation, options);
|
||||
}
|
||||
else if (typeof translation === "object" &&
|
||||
translation &&
|
||||
(0, helpers_1.isSet)(options.count)) {
|
||||
translation = (0, helpers_1.pluralize)({
|
||||
i18n: this,
|
||||
count: options.count || 0,
|
||||
scope: translation,
|
||||
options,
|
||||
baseScope: (0, helpers_1.getFullScope)(this, scope, options),
|
||||
});
|
||||
}
|
||||
if (options && translation instanceof Array) {
|
||||
translation = translation.map((entry) => typeof entry === "string"
|
||||
? (0, helpers_1.interpolate)(this, entry, options)
|
||||
: entry);
|
||||
}
|
||||
return translation;
|
||||
}
|
||||
pluralize(count, scope, options) {
|
||||
return (0, helpers_1.pluralize)({
|
||||
i18n: this,
|
||||
count,
|
||||
scope,
|
||||
options: Object.assign({}, options),
|
||||
baseScope: (0, helpers_1.getFullScope)(this, scope, options !== null && options !== void 0 ? options : {}),
|
||||
});
|
||||
}
|
||||
localize(type, value, options) {
|
||||
options = Object.assign({}, options);
|
||||
if (value === undefined || value === null) {
|
||||
return "";
|
||||
}
|
||||
switch (type) {
|
||||
case "currency":
|
||||
return this.numberToCurrency(value);
|
||||
case "number":
|
||||
return (0, helpers_1.formatNumber)(value, Object.assign({ delimiter: ",", precision: 3, separator: ".", significant: false, stripInsignificantZeros: false }, (0, helpers_1.lookup)(this, "number.format")));
|
||||
case "percentage":
|
||||
return this.numberToPercentage(value);
|
||||
default: {
|
||||
let localizedValue;
|
||||
if (type.match(/^(date|time)/)) {
|
||||
localizedValue = this.toTime(type, value);
|
||||
}
|
||||
else {
|
||||
localizedValue = value.toString();
|
||||
}
|
||||
return (0, helpers_1.interpolate)(this, localizedValue, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
toTime(scope, input) {
|
||||
const date = (0, helpers_1.parseDate)(input);
|
||||
const format = (0, helpers_1.lookup)(this, scope);
|
||||
if (date.toString().match(/invalid/i)) {
|
||||
return date.toString();
|
||||
}
|
||||
if (!format) {
|
||||
return date.toString();
|
||||
}
|
||||
return this.strftime(date, format);
|
||||
}
|
||||
numberToCurrency(input, options = {}) {
|
||||
return (0, helpers_1.formatNumber)(input, Object.assign(Object.assign(Object.assign({ delimiter: ",", format: "%u%n", precision: 2, separator: ".", significant: false, stripInsignificantZeros: false, unit: "$" }, (0, helpers_1.camelCaseKeys)(this.get("number.format"))), (0, helpers_1.camelCaseKeys)(this.get("number.currency.format"))), options));
|
||||
}
|
||||
numberToPercentage(input, options = {}) {
|
||||
return (0, helpers_1.formatNumber)(input, Object.assign(Object.assign(Object.assign({ delimiter: "", format: "%n%", precision: 3, stripInsignificantZeros: false, separator: ".", significant: false }, (0, helpers_1.camelCaseKeys)(this.get("number.format"))), (0, helpers_1.camelCaseKeys)(this.get("number.percentage.format"))), options));
|
||||
}
|
||||
numberToHumanSize(input, options = {}) {
|
||||
return (0, helpers_1.numberToHumanSize)(this, input, Object.assign(Object.assign(Object.assign({ delimiter: "", precision: 3, significant: true, stripInsignificantZeros: true, units: {
|
||||
billion: "Billion",
|
||||
million: "Million",
|
||||
quadrillion: "Quadrillion",
|
||||
thousand: "Thousand",
|
||||
trillion: "Trillion",
|
||||
unit: "",
|
||||
} }, (0, helpers_1.camelCaseKeys)(this.get("number.human.format"))), (0, helpers_1.camelCaseKeys)(this.get("number.human.storage_units"))), options));
|
||||
}
|
||||
numberToHuman(input, options = {}) {
|
||||
return (0, helpers_1.numberToHuman)(this, input, Object.assign(Object.assign(Object.assign({ delimiter: "", separator: ".", precision: 3, significant: true, stripInsignificantZeros: true, format: "%n %u", roundMode: "default", units: {
|
||||
billion: "Billion",
|
||||
million: "Million",
|
||||
quadrillion: "Quadrillion",
|
||||
thousand: "Thousand",
|
||||
trillion: "Trillion",
|
||||
unit: "",
|
||||
} }, (0, helpers_1.camelCaseKeys)(this.get("number.human.format"))), (0, helpers_1.camelCaseKeys)(this.get("number.human.decimal_units"))), options));
|
||||
}
|
||||
numberToRounded(input, options) {
|
||||
return (0, helpers_1.formatNumber)(input, Object.assign({ unit: "", precision: 3, significant: false, separator: ".", delimiter: "", stripInsignificantZeros: false }, options));
|
||||
}
|
||||
numberToDelimited(input, options = {}) {
|
||||
return (0, helpers_1.numberToDelimited)(input, Object.assign({ delimiterPattern: /(\d)(?=(\d\d\d)+(?!\d))/g, delimiter: ",", separator: "." }, options));
|
||||
}
|
||||
withLocale(locale, callback) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const originalLocale = this.locale;
|
||||
try {
|
||||
this.locale = locale;
|
||||
yield callback();
|
||||
}
|
||||
finally {
|
||||
this.locale = originalLocale;
|
||||
}
|
||||
});
|
||||
}
|
||||
strftime(date, format, options = {}) {
|
||||
return (0, helpers_1.strftime)(date, format, Object.assign(Object.assign(Object.assign({}, (0, helpers_1.camelCaseKeys)((0, helpers_1.lookup)(this, "date"))), { meridian: {
|
||||
am: (0, helpers_1.lookup)(this, "time.am") || "AM",
|
||||
pm: (0, helpers_1.lookup)(this, "time.pm") || "PM",
|
||||
} }), options));
|
||||
}
|
||||
update(path, override, options = { strict: false }) {
|
||||
if (options.strict && !(0, has_1.default)(this.translations, path)) {
|
||||
throw new Error(`The path "${path}" is not currently defined`);
|
||||
}
|
||||
const currentNode = (0, get_1.default)(this.translations, path);
|
||||
const currentType = (0, helpers_1.inferType)(currentNode);
|
||||
const overrideType = (0, helpers_1.inferType)(override);
|
||||
if (options.strict && currentType !== overrideType) {
|
||||
throw new Error(`The current type for "${path}" is "${currentType}", but you're trying to override it with "${overrideType}"`);
|
||||
}
|
||||
let newNode;
|
||||
if (overrideType === "object") {
|
||||
newNode = Object.assign(Object.assign({}, currentNode), override);
|
||||
}
|
||||
else {
|
||||
newNode = override;
|
||||
}
|
||||
const components = path.split(this.defaultSeparator);
|
||||
const prop = components.pop();
|
||||
let buffer = this.translations;
|
||||
for (const component of components) {
|
||||
if (!buffer[component]) {
|
||||
buffer[component] = {};
|
||||
}
|
||||
buffer = buffer[component];
|
||||
}
|
||||
buffer[prop] = newNode;
|
||||
this.hasChanged();
|
||||
}
|
||||
toSentence(items, options = {}) {
|
||||
const { wordsConnector, twoWordsConnector, lastWordConnector } = Object.assign(Object.assign({ wordsConnector: ", ", twoWordsConnector: " and ", lastWordConnector: ", and " }, (0, helpers_1.camelCaseKeys)((0, helpers_1.lookup)(this, "support.array"))), options);
|
||||
const size = items.length;
|
||||
switch (size) {
|
||||
case 0:
|
||||
return "";
|
||||
case 1:
|
||||
return `${items[0]}`;
|
||||
case 2:
|
||||
return items.join(twoWordsConnector);
|
||||
default:
|
||||
return [
|
||||
items.slice(0, size - 1).join(wordsConnector),
|
||||
lastWordConnector,
|
||||
items[size - 1],
|
||||
].join("");
|
||||
}
|
||||
}
|
||||
timeAgoInWords(fromTime, toTime, options = {}) {
|
||||
return (0, helpers_1.timeAgoInWords)(this, fromTime, toTime, options);
|
||||
}
|
||||
onChange(callback) {
|
||||
this.onChangeHandlers.push(callback);
|
||||
return () => {
|
||||
this.onChangeHandlers.splice(this.onChangeHandlers.indexOf(callback), 1);
|
||||
};
|
||||
}
|
||||
get version() {
|
||||
return this._version;
|
||||
}
|
||||
formatNumber(input, options = {}) {
|
||||
options = Object.assign(Object.assign({ delimiter: ",", precision: 3, separator: ".", unit: "", format: "%u%n", significant: false, stripInsignificantZeros: false }, (0, helpers_1.camelCaseKeys)(this.get("number.format"))), options);
|
||||
return (0, helpers_1.formatNumber)(input, options);
|
||||
}
|
||||
get(scope) {
|
||||
return (0, helpers_1.lookup)(this, scope);
|
||||
}
|
||||
runCallbacks() {
|
||||
this.onChangeHandlers.forEach((callback) => callback(this));
|
||||
}
|
||||
hasChanged() {
|
||||
this._version += 1;
|
||||
this.runCallbacks();
|
||||
}
|
||||
}
|
||||
exports.I18n = I18n;
|
||||
//# sourceMappingURL=I18n.js.map
|
||||
1
node_modules/i18n-js/dist/require/I18n.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/I18n.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
64
node_modules/i18n-js/dist/require/Locales.js
generated
vendored
Normal file
64
node_modules/i18n-js/dist/require/Locales.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Locales = exports.defaultLocaleResolver = void 0;
|
||||
const uniq_1 = __importDefault(require("lodash/uniq"));
|
||||
const defaultLocaleResolver = (i18n, locale) => {
|
||||
const locales = [];
|
||||
const list = [];
|
||||
locales.push(locale);
|
||||
if (!locale) {
|
||||
locales.push(i18n.locale);
|
||||
}
|
||||
if (i18n.enableFallback) {
|
||||
locales.push(i18n.defaultLocale);
|
||||
}
|
||||
locales
|
||||
.filter(Boolean)
|
||||
.map((entry) => entry.toString())
|
||||
.forEach(function (currentLocale) {
|
||||
if (!list.includes(currentLocale)) {
|
||||
list.push(currentLocale);
|
||||
}
|
||||
if (!i18n.enableFallback) {
|
||||
return;
|
||||
}
|
||||
const codes = currentLocale.split("-");
|
||||
if (codes.length === 3) {
|
||||
list.push(`${codes[0]}-${codes[1]}`);
|
||||
}
|
||||
list.push(codes[0]);
|
||||
});
|
||||
return (0, uniq_1.default)(list);
|
||||
};
|
||||
exports.defaultLocaleResolver = defaultLocaleResolver;
|
||||
class Locales {
|
||||
constructor(i18n) {
|
||||
this.i18n = i18n;
|
||||
this.registry = {};
|
||||
this.register("default", exports.defaultLocaleResolver);
|
||||
}
|
||||
register(locale, localeResolver) {
|
||||
if (typeof localeResolver !== "function") {
|
||||
const result = localeResolver;
|
||||
localeResolver = (() => result);
|
||||
}
|
||||
this.registry[locale] = localeResolver;
|
||||
}
|
||||
get(locale) {
|
||||
let locales = this.registry[locale] ||
|
||||
this.registry[this.i18n.locale] ||
|
||||
this.registry.default;
|
||||
if (typeof locales === "function") {
|
||||
locales = locales(this.i18n, locale);
|
||||
}
|
||||
if (!(locales instanceof Array)) {
|
||||
locales = [locales];
|
||||
}
|
||||
return locales;
|
||||
}
|
||||
}
|
||||
exports.Locales = Locales;
|
||||
//# sourceMappingURL=Locales.js.map
|
||||
1
node_modules/i18n-js/dist/require/Locales.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/Locales.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Locales.js","sourceRoot":"","sources":["../../src/Locales.ts"],"names":[],"mappings":";;;;;;AAAA,uDAA+B;AA0BxB,MAAM,qBAAqB,GAAmB,CACnD,IAAU,EACV,MAAc,EACJ,EAAE;IACZ,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,MAAM,IAAI,GAAa,EAAE,CAAC;IAI1B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAGrB,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAGD,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;QACxB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACnC,CAAC;IAQD,OAAO;SACJ,MAAM,CAAC,OAAO,CAAC;SACf,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;SAChC,OAAO,CAAC,UAAU,aAAqB;QACtC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,OAAO;QACT,CAAC;QAED,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEvC,IAAI,KAAK,CAAC,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AC;QACtB,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAtED,0BAsEC"}
|
||||
50
node_modules/i18n-js/dist/require/MissingTranslation.js
generated
vendored
Normal file
50
node_modules/i18n-js/dist/require/MissingTranslation.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MissingTranslation = exports.errorStrategy = exports.messageStrategy = exports.guessStrategy = void 0;
|
||||
const helpers_1 = require("./helpers");
|
||||
const guessStrategy = function (i18n, scope) {
|
||||
if (scope instanceof Array) {
|
||||
scope = scope.join(i18n.defaultSeparator);
|
||||
}
|
||||
const message = scope.split(i18n.defaultSeparator).slice(-1)[0];
|
||||
return (i18n.missingTranslationPrefix +
|
||||
message
|
||||
.replace("_", " ")
|
||||
.replace(/([a-z])([A-Z])/g, (_match, p1, p2) => `${p1} ${p2.toLowerCase()}`));
|
||||
};
|
||||
exports.guessStrategy = guessStrategy;
|
||||
const messageStrategy = (i18n, scope, options) => {
|
||||
const fullScope = (0, helpers_1.getFullScope)(i18n, scope, options);
|
||||
const locale = "locale" in options ? options.locale : i18n.locale;
|
||||
const localeType = (0, helpers_1.inferType)(locale);
|
||||
const fullScopeWithLocale = [
|
||||
localeType == "string" ? locale : localeType,
|
||||
fullScope,
|
||||
].join(i18n.defaultSeparator);
|
||||
return `[missing "${fullScopeWithLocale}" translation]`;
|
||||
};
|
||||
exports.messageStrategy = messageStrategy;
|
||||
const errorStrategy = (i18n, scope, options) => {
|
||||
const fullScope = (0, helpers_1.getFullScope)(i18n, scope, options);
|
||||
const fullScopeWithLocale = [i18n.locale, fullScope].join(i18n.defaultSeparator);
|
||||
throw new Error(`Missing translation: ${fullScopeWithLocale}`);
|
||||
};
|
||||
exports.errorStrategy = errorStrategy;
|
||||
class MissingTranslation {
|
||||
constructor(i18n) {
|
||||
this.i18n = i18n;
|
||||
this.registry = {};
|
||||
this.register("guess", exports.guessStrategy);
|
||||
this.register("message", exports.messageStrategy);
|
||||
this.register("error", exports.errorStrategy);
|
||||
}
|
||||
register(name, strategy) {
|
||||
this.registry[name] = strategy;
|
||||
}
|
||||
get(scope, options) {
|
||||
var _a;
|
||||
return this.registry[(_a = options.missingBehavior) !== null && _a !== void 0 ? _a : this.i18n.missingBehavior](this.i18n, scope, options);
|
||||
}
|
||||
}
|
||||
exports.MissingTranslation = MissingTranslation;
|
||||
//# sourceMappingURL=MissingTranslation.js.map
|
||||
1
node_modules/i18n-js/dist/require/MissingTranslation.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/MissingTranslation.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"MissingTranslation.js","sourceRoot":"","sources":["../../src/MissingTranslation.ts"],"names":[],"mappings":";;;AACA,uCAAoD;AAe7C,MAAM,aAAa,GAA+B,UACvD,IAAI,EACJ,KAAK;IAEL,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAGD,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAIhE,OAAO,CACL,IAAI,CAAC,wBAAwB;QAC7B,OAAO;aACJ,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;aACjB,OAAO,CACN,iBAAiB,EACjB,CAAC,MAAc,EAAE,EAAU,EAAE,EAAU,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CACxE,CACJ,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,aAAa,iBAsBxB;AAiBK,MAAM,eAAe,GAA+B,CACzD,IAAI,EACJ,KAAK,EACL,OAAO,EACP,EAAE;IACF,MAAM,SAAS,GAAG,IAAA,sBAAY,E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QAAoC;QAChE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACjC,CAAC;IAWM,GAAG,CAAC,KAAY,EAAE,OAAa;;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAA,OAAO,CAAC,eAAe,mCAAI,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CACxE,IAAI,CAAC,IAAI,EACT,KAAK,EACL,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AAzDD,gDAyDC"}
|
||||
34
node_modules/i18n-js/dist/require/Pluralization.js
generated
vendored
Normal file
34
node_modules/i18n-js/dist/require/Pluralization.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Pluralization = exports.defaultPluralizer = exports.useMakePlural = void 0;
|
||||
const make_plural_1 = require("make-plural");
|
||||
function useMakePlural({ pluralizer, includeZero = true, ordinal = false, }) {
|
||||
return function (_i18n, count) {
|
||||
return [
|
||||
includeZero && count === 0 ? "zero" : "",
|
||||
pluralizer(count, ordinal),
|
||||
].filter(Boolean);
|
||||
};
|
||||
}
|
||||
exports.useMakePlural = useMakePlural;
|
||||
exports.defaultPluralizer = useMakePlural({
|
||||
pluralizer: make_plural_1.en,
|
||||
includeZero: true,
|
||||
});
|
||||
class Pluralization {
|
||||
constructor(i18n) {
|
||||
this.i18n = i18n;
|
||||
this.registry = {};
|
||||
this.register("default", exports.defaultPluralizer);
|
||||
}
|
||||
register(locale, pluralizer) {
|
||||
this.registry[locale] = pluralizer;
|
||||
}
|
||||
get(locale) {
|
||||
return (this.registry[locale] ||
|
||||
this.registry[this.i18n.locale] ||
|
||||
this.registry["default"]);
|
||||
}
|
||||
}
|
||||
exports.Pluralization = Pluralization;
|
||||
//# sourceMappingURL=Pluralization.js.map
|
||||
1
node_modules/i18n-js/dist/require/Pluralization.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/Pluralization.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"Pluralization.js","sourceRoot":"","sources":["../../src/Pluralization.ts"],"names":[],"mappings":";;;AAAA,6CAAiC;AAgBjC,SAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,WAAW,GAAG,IAAI,EAClB,OAAO,GAAG,KAAK,GAKhB;IACC,OAAO,UAAU,KAAW,EAAE,KAAa;QACzC,OAAO;YACL,WAAW,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YACxC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC;SAC3B,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAfD,sCAeC;AAqBY,QAAA,iBAAiB,GAAe,aAAa,CAAC;IACzD,UAAU,EAAE,gBAAE;IACd,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC;AAwCH,MAAa,aAAa;IAIxB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QAEnB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,yBAAiB,CAAC,CAAC;IAC9C,CAAC;IAqCM,QAAQ,CAAC,MAAc,EAAE,UAAsB;QACpD,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;IACrC,CAAC;IAYM,GAAG,CAAC,MAAc;QACvB,OAAO,CACL,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CACzB,CAAC;IACJ,CAAC;CACF;AAnED,sCAmEC"}
|
||||
18
node_modules/i18n-js/dist/require/helpers/camelCaseKeys.js
generated
vendored
Normal file
18
node_modules/i18n-js/dist/require/helpers/camelCaseKeys.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.camelCaseKeys = void 0;
|
||||
const camelCase_1 = __importDefault(require("lodash/camelCase"));
|
||||
function camelCaseKeys(target) {
|
||||
if (!target) {
|
||||
return {};
|
||||
}
|
||||
return Object.keys(target).reduce((buffer, key) => {
|
||||
buffer[(0, camelCase_1.default)(key)] = target[key];
|
||||
return buffer;
|
||||
}, {});
|
||||
}
|
||||
exports.camelCaseKeys = camelCaseKeys;
|
||||
//# sourceMappingURL=camelCaseKeys.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/camelCaseKeys.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/camelCaseKeys.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"camelCaseKeys.js","sourceRoot":"","sources":["../../../src/helpers/camelCaseKeys.ts"],"names":[],"mappings":";;;;;;AAAA,iEAAyC;AAczC,SAAgB,aAAa,CAAW,MAAe;IACrD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,EAAO,CAAC;IACjB,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,MAAc,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACvD,MAAe,CAAC,IAAA,mBAAS,EAAC,GAAG,CAAC,CAAC,GAAI,MAAe,CAAC,GAAG,CAAC,CAAC;QACzD,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAO,CAAC,CAAC;AACd,CAAC;AATD,sCASC"}
|
||||
20
node_modules/i18n-js/dist/require/helpers/createTranslationOptions.js
generated
vendored
Normal file
20
node_modules/i18n-js/dist/require/helpers/createTranslationOptions.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createTranslationOptions = void 0;
|
||||
const isSet_1 = require("./isSet");
|
||||
function createTranslationOptions(i18n, scope, options) {
|
||||
let translationOptions = [{ scope }];
|
||||
if ((0, isSet_1.isSet)(options.defaults)) {
|
||||
translationOptions = translationOptions.concat(options.defaults);
|
||||
}
|
||||
if ((0, isSet_1.isSet)(options.defaultValue)) {
|
||||
const message = typeof options.defaultValue === "function"
|
||||
? options.defaultValue(i18n, scope, options)
|
||||
: options.defaultValue;
|
||||
translationOptions.push({ message });
|
||||
delete options.defaultValue;
|
||||
}
|
||||
return translationOptions;
|
||||
}
|
||||
exports.createTranslationOptions = createTranslationOptions;
|
||||
//# sourceMappingURL=createTranslationOptions.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/createTranslationOptions.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/createTranslationOptions.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"createTranslationOptions.js","sourceRoot":"","sources":["../../../src/helpers/createTranslationOptions.ts"],"names":[],"mappings":";;;AAEA,mCAAgC;AAiBhC,SAAgB,wBAAwB,CACtC,IAAU,EACV,KAAY,EACZ,OAAa;IAEb,IAAI,kBAAkB,GAAW,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAI7C,IAAI,IAAA,aAAK,EAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5B,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnE,CAAC;IAID,IAAI,IAAA,aAAK,EAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,MAAM,OAAO,GACX,OAAO,OAAO,CAAC,YAAY,KAAK,UAAU;YACxC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC;YAC5C,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;QAE3B,kBAAkB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QACrC,OAAO,OAAO,CAAC,YAAY,CAAC;IAC9B,CAAC;IAED,OAAO,kBAAmD,CAAC;AAC7D,CAAC;AA1BD,4DA0BC"}
|
||||
24
node_modules/i18n-js/dist/require/helpers/expandRoundMode.js
generated
vendored
Normal file
24
node_modules/i18n-js/dist/require/helpers/expandRoundMode.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.expandRoundMode = void 0;
|
||||
const bignumber_js_1 = require("bignumber.js");
|
||||
var RoundingModeMap;
|
||||
(function (RoundingModeMap) {
|
||||
RoundingModeMap[RoundingModeMap["up"] = bignumber_js_1.BigNumber.ROUND_UP] = "up";
|
||||
RoundingModeMap[RoundingModeMap["down"] = bignumber_js_1.BigNumber.ROUND_DOWN] = "down";
|
||||
RoundingModeMap[RoundingModeMap["truncate"] = bignumber_js_1.BigNumber.ROUND_DOWN] = "truncate";
|
||||
RoundingModeMap[RoundingModeMap["halfUp"] = bignumber_js_1.BigNumber.ROUND_HALF_UP] = "halfUp";
|
||||
RoundingModeMap[RoundingModeMap["default"] = bignumber_js_1.BigNumber.ROUND_HALF_UP] = "default";
|
||||
RoundingModeMap[RoundingModeMap["halfDown"] = bignumber_js_1.BigNumber.ROUND_HALF_DOWN] = "halfDown";
|
||||
RoundingModeMap[RoundingModeMap["halfEven"] = bignumber_js_1.BigNumber.ROUND_HALF_EVEN] = "halfEven";
|
||||
RoundingModeMap[RoundingModeMap["banker"] = bignumber_js_1.BigNumber.ROUND_HALF_EVEN] = "banker";
|
||||
RoundingModeMap[RoundingModeMap["ceiling"] = bignumber_js_1.BigNumber.ROUND_CEIL] = "ceiling";
|
||||
RoundingModeMap[RoundingModeMap["ceil"] = bignumber_js_1.BigNumber.ROUND_CEIL] = "ceil";
|
||||
RoundingModeMap[RoundingModeMap["floor"] = bignumber_js_1.BigNumber.ROUND_FLOOR] = "floor";
|
||||
})(RoundingModeMap || (RoundingModeMap = {}));
|
||||
function expandRoundMode(roundMode) {
|
||||
var _a;
|
||||
return ((_a = RoundingModeMap[roundMode]) !== null && _a !== void 0 ? _a : RoundingModeMap.default);
|
||||
}
|
||||
exports.expandRoundMode = expandRoundMode;
|
||||
//# sourceMappingURL=expandRoundMode.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/expandRoundMode.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/expandRoundMode.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"expandRoundMode.js","sourceRoot":"","sources":["../../../src/helpers/expandRoundMode.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AAGzC,IAAK,eAYJ;AAZD,WAAK,eAAe;IAClB,wCAAO,wBAAS,CAAC,QAAQ,QAAA,CAAA;IACzB,0CAAS,wBAAS,CAAC,UAAU,UAAA,CAAA;IAC7B,8CAAa,wBAAS,CAAC,UAAU,cAAA,CAAA;IACjC,4CAAW,wBAAS,CAAC,aAAa,YAAA,CAAA;IAClC,6CAAY,wBAAS,CAAC,aAAa,aAAA,CAAA;IACnC,8CAAa,wBAAS,CAAC,eAAe,cAAA,CAAA;IACtC,8CAAa,wBAAS,CAAC,eAAe,cAAA,CAAA;IACtC,4CAAW,wBAAS,CAAC,eAAe,YAAA,CAAA;IACpC,6CAAY,wBAAS,CAAC,UAAU,aAAA,CAAA;IAChC,0CAAS,wBAAS,CAAC,UAAU,UAAA,CAAA;IAC7B,2CAAU,wBAAS,CAAC,WAAW,WAAA,CAAA;AACjC,CAAC,EAZI,eAAe,KAAf,eAAe,QAYnB;AAOD,SAAgB,eAAe,CAC7B,SAAuB;;IAEvB,OAAO,CAAC,MAAA,eAAe,CAAC,SAAS,CAAC,mCAChC,eAAe,CAAC,OAAO,CAA2B,CAAC;AACvD,CAAC;AALD,0CAKC"}
|
||||
68
node_modules/i18n-js/dist/require/helpers/formatNumber.js
generated
vendored
Normal file
68
node_modules/i18n-js/dist/require/helpers/formatNumber.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.formatNumber = void 0;
|
||||
const bignumber_js_1 = require("bignumber.js");
|
||||
const repeat_1 = __importDefault(require("lodash/repeat"));
|
||||
const roundNumber_1 = require("./roundNumber");
|
||||
function replaceInFormat(format, { formattedNumber, unit }) {
|
||||
return format.replace("%n", formattedNumber).replace("%u", unit);
|
||||
}
|
||||
function computeSignificand({ significand, whole, precision, }) {
|
||||
if (whole === "0" || precision === null) {
|
||||
return significand;
|
||||
}
|
||||
const limit = Math.max(0, precision - whole.length);
|
||||
return (significand !== null && significand !== void 0 ? significand : "").substr(0, limit);
|
||||
}
|
||||
function formatNumber(input, options) {
|
||||
var _a, _b, _c;
|
||||
const originalNumber = new bignumber_js_1.BigNumber(input);
|
||||
if (options.raise && !originalNumber.isFinite()) {
|
||||
throw new Error(`"${input}" is not a valid numeric value`);
|
||||
}
|
||||
const roundedNumber = (0, roundNumber_1.roundNumber)(originalNumber, options);
|
||||
const numeric = new bignumber_js_1.BigNumber(roundedNumber);
|
||||
const isNegative = numeric.lt(0);
|
||||
const isZero = numeric.isZero();
|
||||
let [whole, significand] = roundedNumber.split(".");
|
||||
const buffer = [];
|
||||
let formattedNumber;
|
||||
const positiveFormat = (_a = options.format) !== null && _a !== void 0 ? _a : "%n";
|
||||
const negativeFormat = (_b = options.negativeFormat) !== null && _b !== void 0 ? _b : `-${positiveFormat}`;
|
||||
const format = isNegative && !isZero ? negativeFormat : positiveFormat;
|
||||
whole = whole.replace("-", "");
|
||||
while (whole.length > 0) {
|
||||
buffer.unshift(whole.substr(Math.max(0, whole.length - 3), 3));
|
||||
whole = whole.substr(0, whole.length - 3);
|
||||
}
|
||||
whole = buffer.join("");
|
||||
formattedNumber = buffer.join(options.delimiter);
|
||||
if (options.significant) {
|
||||
significand = computeSignificand({
|
||||
whole,
|
||||
significand,
|
||||
precision: options.precision,
|
||||
});
|
||||
}
|
||||
else {
|
||||
significand = significand !== null && significand !== void 0 ? significand : (0, repeat_1.default)("0", (_c = options.precision) !== null && _c !== void 0 ? _c : 0);
|
||||
}
|
||||
if (options.stripInsignificantZeros && significand) {
|
||||
significand = significand.replace(/0+$/, "");
|
||||
}
|
||||
if (originalNumber.isNaN()) {
|
||||
formattedNumber = input.toString();
|
||||
}
|
||||
if (significand && originalNumber.isFinite()) {
|
||||
formattedNumber += (options.separator || ".") + significand;
|
||||
}
|
||||
return replaceInFormat(format, {
|
||||
formattedNumber,
|
||||
unit: options.unit,
|
||||
});
|
||||
}
|
||||
exports.formatNumber = formatNumber;
|
||||
//# sourceMappingURL=formatNumber.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/formatNumber.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/formatNumber.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"formatNumber.js","sourceRoot":"","sources":["../../../src/helpers/formatNumber.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyC;AACzC,2DAAmC;AAGnC,+CAA4C;AAE5C,SAAS,eAAe,CACtB,MAAc,EACd,EAAE,eAAe,EAAE,IAAI,EAA6C;IAEpE,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,WAAW,EACX,KAAK,EACL,SAAS,GAKV;IACC,IAAI,KAAK,KAAK,GAAG,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACxC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC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AC;AAzDD,oCAyDC"}
|
||||
18
node_modules/i18n-js/dist/require/helpers/getFullScope.js
generated
vendored
Normal file
18
node_modules/i18n-js/dist/require/helpers/getFullScope.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getFullScope = void 0;
|
||||
function getFullScope(i18n, scope, options) {
|
||||
let result = "";
|
||||
if (scope instanceof String || typeof scope === "string") {
|
||||
result = scope;
|
||||
}
|
||||
if (scope instanceof Array) {
|
||||
result = scope.join(i18n.defaultSeparator);
|
||||
}
|
||||
if (options.scope) {
|
||||
result = [options.scope, result].join(i18n.defaultSeparator);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.getFullScope = getFullScope;
|
||||
//# sourceMappingURL=getFullScope.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/getFullScope.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/getFullScope.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getFullScope.js","sourceRoot":"","sources":["../../../src/helpers/getFullScope.ts"],"names":[],"mappings":";;;AAaA,SAAgB,YAAY,CAAC,IAAU,EAAE,KAAY,EAAE,OAAa;IAClE,IAAI,MAAM,GAAG,EAAE,CAAC;IAGhB,IAAI,KAAK,YAAY,MAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACzD,MAAM,GAAG,KAAe,CAAC;IAC3B,CAAC;IAGD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,MAAM,GAAI,KAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC3D,CAAC;IAMD,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAtBD,oCAsBC"}
|
||||
38
node_modules/i18n-js/dist/require/helpers/index.js
generated
vendored
Normal file
38
node_modules/i18n-js/dist/require/helpers/index.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.timeAgoInWords = exports.strftime = exports.roundNumber = exports.pluralize = exports.parseDate = exports.numberToHumanSize = exports.numberToHuman = exports.numberToDelimited = exports.lookup = exports.isSet = exports.interpolate = exports.inferType = exports.getFullScope = exports.formatNumber = exports.expandRoundMode = exports.createTranslationOptions = exports.camelCaseKeys = void 0;
|
||||
var camelCaseKeys_1 = require("./camelCaseKeys");
|
||||
Object.defineProperty(exports, "camelCaseKeys", { enumerable: true, get: function () { return camelCaseKeys_1.camelCaseKeys; } });
|
||||
var createTranslationOptions_1 = require("./createTranslationOptions");
|
||||
Object.defineProperty(exports, "createTranslationOptions", { enumerable: true, get: function () { return createTranslationOptions_1.createTranslationOptions; } });
|
||||
var expandRoundMode_1 = require("./expandRoundMode");
|
||||
Object.defineProperty(exports, "expandRoundMode", { enumerable: true, get: function () { return expandRoundMode_1.expandRoundMode; } });
|
||||
var formatNumber_1 = require("./formatNumber");
|
||||
Object.defineProperty(exports, "formatNumber", { enumerable: true, get: function () { return formatNumber_1.formatNumber; } });
|
||||
var getFullScope_1 = require("./getFullScope");
|
||||
Object.defineProperty(exports, "getFullScope", { enumerable: true, get: function () { return getFullScope_1.getFullScope; } });
|
||||
var inferType_1 = require("./inferType");
|
||||
Object.defineProperty(exports, "inferType", { enumerable: true, get: function () { return inferType_1.inferType; } });
|
||||
var interpolate_1 = require("./interpolate");
|
||||
Object.defineProperty(exports, "interpolate", { enumerable: true, get: function () { return interpolate_1.interpolate; } });
|
||||
var isSet_1 = require("./isSet");
|
||||
Object.defineProperty(exports, "isSet", { enumerable: true, get: function () { return isSet_1.isSet; } });
|
||||
var lookup_1 = require("./lookup");
|
||||
Object.defineProperty(exports, "lookup", { enumerable: true, get: function () { return lookup_1.lookup; } });
|
||||
var numberToDelimited_1 = require("./numberToDelimited");
|
||||
Object.defineProperty(exports, "numberToDelimited", { enumerable: true, get: function () { return numberToDelimited_1.numberToDelimited; } });
|
||||
var numberToHuman_1 = require("./numberToHuman");
|
||||
Object.defineProperty(exports, "numberToHuman", { enumerable: true, get: function () { return numberToHuman_1.numberToHuman; } });
|
||||
var numberToHumanSize_1 = require("./numberToHumanSize");
|
||||
Object.defineProperty(exports, "numberToHumanSize", { enumerable: true, get: function () { return numberToHumanSize_1.numberToHumanSize; } });
|
||||
var parseDate_1 = require("./parseDate");
|
||||
Object.defineProperty(exports, "parseDate", { enumerable: true, get: function () { return parseDate_1.parseDate; } });
|
||||
var pluralize_1 = require("./pluralize");
|
||||
Object.defineProperty(exports, "pluralize", { enumerable: true, get: function () { return pluralize_1.pluralize; } });
|
||||
var roundNumber_1 = require("./roundNumber");
|
||||
Object.defineProperty(exports, "roundNumber", { enumerable: true, get: function () { return roundNumber_1.roundNumber; } });
|
||||
var strftime_1 = require("./strftime");
|
||||
Object.defineProperty(exports, "strftime", { enumerable: true, get: function () { return strftime_1.strftime; } });
|
||||
var timeAgoInWords_1 = require("./timeAgoInWords");
|
||||
Object.defineProperty(exports, "timeAgoInWords", { enumerable: true, get: function () { return timeAgoInWords_1.timeAgoInWords; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/index.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
|
||||
16
node_modules/i18n-js/dist/require/helpers/inferType.js
generated
vendored
Normal file
16
node_modules/i18n-js/dist/require/helpers/inferType.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.inferType = void 0;
|
||||
function inferType(instance) {
|
||||
var _a, _b;
|
||||
if (instance === null) {
|
||||
return "null";
|
||||
}
|
||||
const type = typeof instance;
|
||||
if (type !== "object") {
|
||||
return type;
|
||||
}
|
||||
return ((_b = (_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || "object";
|
||||
}
|
||||
exports.inferType = inferType;
|
||||
//# sourceMappingURL=inferType.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/inferType.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/inferType.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"inferType.js","sourceRoot":"","sources":["../../../src/helpers/inferType.ts"],"names":[],"mappings":";;;AASA,SAAgB,SAAS,CAAC,QAAiB;;IACzC,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,QAAQ,CAAC;IAE7B,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAA,MAAA,MAAC,QAAgB,aAAhB,QAAQ,uBAAR,QAAQ,CAAU,WAAW,0CAAE,IAAI,0CAAE,WAAW,EAAE,KAAI,QAAQ,CAAC;AACzE,CAAC;AAZD,8BAYC"}
|
||||
33
node_modules/i18n-js/dist/require/helpers/interpolate.js
generated
vendored
Normal file
33
node_modules/i18n-js/dist/require/helpers/interpolate.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.interpolate = void 0;
|
||||
const isSet_1 = require("./isSet");
|
||||
function interpolate(i18n, message, options) {
|
||||
options = Object.keys(options).reduce((buffer, key) => {
|
||||
buffer[i18n.transformKey(key)] = options[key];
|
||||
return buffer;
|
||||
}, {});
|
||||
const matches = message.match(i18n.placeholder);
|
||||
if (!matches) {
|
||||
return message;
|
||||
}
|
||||
while (matches.length) {
|
||||
let value;
|
||||
const placeholder = matches.shift();
|
||||
const name = placeholder.replace(i18n.placeholder, "$1");
|
||||
if ((0, isSet_1.isSet)(options[name])) {
|
||||
value = options[name].toString().replace(/\$/gm, "_#$#_");
|
||||
}
|
||||
else if (name in options) {
|
||||
value = i18n.nullPlaceholder(i18n, placeholder, message, options);
|
||||
}
|
||||
else {
|
||||
value = i18n.missingPlaceholder(i18n, placeholder, message, options);
|
||||
}
|
||||
const regex = new RegExp(placeholder.replace(/\{/gm, "\\{").replace(/\}/gm, "\\}"), "g");
|
||||
message = message.replace(regex, value);
|
||||
}
|
||||
return message.replace(/_#\$#_/g, "$");
|
||||
}
|
||||
exports.interpolate = interpolate;
|
||||
//# sourceMappingURL=interpolate.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/interpolate.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/interpolate.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interpolate.js","sourceRoot":"","sources":["../../../src/helpers/interpolate.ts"],"names":[],"mappings":";;;AAEA,mCAAgC;AAgBhC,SAAgB,WAAW,CACzB,IAAU,EACV,OAAe,EACf,OAAyB;IAEzB,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACpD,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9C,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,EAAsB,CAAC,CAAC;IAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEhD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC;QACtB,IAAI,KAAa,CAAC;QAClB,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,EAAY,CAAC;QAC9C,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAEzD,IAAI,IAAA,aAAK,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACzB,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5D,CAAC;aAAM,IAAI,IAAI,IAAI,OAAO,EAAE,CAAC;YAC3B,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,MAAM,CACtB,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,EACzD,GAAG,CACJ,CAAC;QAEF,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC;AArCD,kCAqCC"}
|
||||
8
node_modules/i18n-js/dist/require/helpers/isSet.js
generated
vendored
Normal file
8
node_modules/i18n-js/dist/require/helpers/isSet.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isSet = void 0;
|
||||
function isSet(value) {
|
||||
return value !== undefined && value !== null;
|
||||
}
|
||||
exports.isSet = isSet;
|
||||
//# sourceMappingURL=isSet.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/isSet.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/isSet.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isSet.js","sourceRoot":"","sources":["../../../src/helpers/isSet.ts"],"names":[],"mappings":";;;AASA,SAAgB,KAAK,CAAC,KAAc;IAClC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AAC/C,CAAC;AAFD,sBAEC"}
|
||||
22
node_modules/i18n-js/dist/require/helpers/lookup.js
generated
vendored
Normal file
22
node_modules/i18n-js/dist/require/helpers/lookup.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.lookup = void 0;
|
||||
const isSet_1 = require("./isSet");
|
||||
const getFullScope_1 = require("./getFullScope");
|
||||
const inferType_1 = require("./inferType");
|
||||
function lookup(i18n, scope, options = {}) {
|
||||
options = Object.assign({}, options);
|
||||
const locale = "locale" in options ? options.locale : i18n.locale;
|
||||
const localeType = (0, inferType_1.inferType)(locale);
|
||||
const locales = i18n.locales
|
||||
.get(localeType === "string" ? locale : typeof locale)
|
||||
.slice();
|
||||
const keys = (0, getFullScope_1.getFullScope)(i18n, scope, options)
|
||||
.split(i18n.defaultSeparator)
|
||||
.map((component) => i18n.transformKey(component));
|
||||
const entries = locales.map((locale) => keys.reduce((path, key) => path && path[key], i18n.translations[locale]));
|
||||
entries.push(options.defaultValue);
|
||||
return entries.find((entry) => (0, isSet_1.isSet)(entry));
|
||||
}
|
||||
exports.lookup = lookup;
|
||||
//# sourceMappingURL=lookup.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/lookup.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/lookup.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../../src/helpers/lookup.ts"],"names":[],"mappings":";;;AAEA,mCAAgC;AAChC,iDAA8C;AAC9C,2CAAwC;AAiBxC,SAAgB,MAAM,CAAC,IAAU,EAAE,KAAY,EAAE,UAAgB,EAAE;IACjE,OAAO,qBAAQ,OAAO,CAAE,CAAC;IAEzB,MAAM,MAAM,GAAG,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IAClE,MAAM,UAAU,GAAG,IAAA,qBAAS,EAAC,MAAM,CAAC,CAAC;IAErC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO;SACzB,GAAG,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC;SACrD,KAAK,EAAE,CAAC;IAEX,MAAM,IAAI,GAAG,IAAA,2BAAY,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC;SAC5C,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC;SAC5B,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IAEpD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACrC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CACzE,CAAC;IAEF,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAEnC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,aAAK,EAAC,KAAK,CAAC,CAAC,CAAC;AAC/C,CAAC;AArBD,wBAqBC"}
|
||||
18
node_modules/i18n-js/dist/require/helpers/numberToDelimited.js
generated
vendored
Normal file
18
node_modules/i18n-js/dist/require/helpers/numberToDelimited.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.numberToDelimited = void 0;
|
||||
const bignumber_js_1 = require("bignumber.js");
|
||||
function numberToDelimited(input, options) {
|
||||
const numeric = new bignumber_js_1.BigNumber(input);
|
||||
if (!numeric.isFinite()) {
|
||||
return input.toString();
|
||||
}
|
||||
if (!options.delimiterPattern.global) {
|
||||
throw new Error(`options.delimiterPattern must be a global regular expression; received ${options.delimiterPattern}`);
|
||||
}
|
||||
let [left, right] = numeric.toString().split(".");
|
||||
left = left.replace(options.delimiterPattern, (digitToDelimiter) => `${digitToDelimiter}${options.delimiter}`);
|
||||
return [left, right].filter(Boolean).join(options.separator);
|
||||
}
|
||||
exports.numberToDelimited = numberToDelimited;
|
||||
//# sourceMappingURL=numberToDelimited.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/numberToDelimited.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/numberToDelimited.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"numberToDelimited.js","sourceRoot":"","sources":["../../../src/helpers/numberToDelimited.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AAezC,SAAgB,iBAAiB,CAC/B,KAAc,EACd,OAAiC;IAEjC,MAAM,OAAO,GAAG,IAAI,wBAAS,CAAC,KAAK,CAAC,CAAC;IAErC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CACb,0EAA0E,OAAO,CAAC,gBAAgB,EAAE,CACrG,CAAC;IACJ,CAAC;IAGD,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElD,IAAI,GAAG,IAAI,CAAC,OAAO,CACjB,OAAO,CAAC,gBAAgB,EACxB,CAAC,gBAAgB,EAAE,EAAE,CAAC,GAAG,gBAAgB,GAAG,OAAO,CAAC,SAAS,EAAE,CAChE,CAAC;IAEF,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAC/D,CAAC;AAzBD,8CAyBC"}
|
||||
78
node_modules/i18n-js/dist/require/helpers/numberToHuman.js
generated
vendored
Normal file
78
node_modules/i18n-js/dist/require/helpers/numberToHuman.js
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.numberToHuman = void 0;
|
||||
const bignumber_js_1 = require("bignumber.js");
|
||||
const sortBy_1 = __importDefault(require("lodash/sortBy"));
|
||||
const zipObject_1 = __importDefault(require("lodash/zipObject"));
|
||||
const getFullScope_1 = require("./getFullScope");
|
||||
const lookup_1 = require("./lookup");
|
||||
const roundNumber_1 = require("./roundNumber");
|
||||
const inferType_1 = require("./inferType");
|
||||
const DECIMAL_UNITS = {
|
||||
"0": "unit",
|
||||
"1": "ten",
|
||||
"2": "hundred",
|
||||
"3": "thousand",
|
||||
"6": "million",
|
||||
"9": "billion",
|
||||
"12": "trillion",
|
||||
"15": "quadrillion",
|
||||
"-1": "deci",
|
||||
"-2": "centi",
|
||||
"-3": "mili",
|
||||
"-6": "micro",
|
||||
"-9": "nano",
|
||||
"-12": "pico",
|
||||
"-15": "femto",
|
||||
};
|
||||
const INVERTED_DECIMAL_UNITS = (0, zipObject_1.default)(Object.values(DECIMAL_UNITS), Object.keys(DECIMAL_UNITS).map((key) => parseInt(key, 10)));
|
||||
function numberToHuman(i18n, input, options) {
|
||||
const roundOptions = {
|
||||
roundMode: options.roundMode,
|
||||
precision: options.precision,
|
||||
significant: options.significant,
|
||||
};
|
||||
let units;
|
||||
if ((0, inferType_1.inferType)(options.units) === "string") {
|
||||
const scope = options.units;
|
||||
units = (0, lookup_1.lookup)(i18n, scope);
|
||||
if (!units) {
|
||||
throw new Error(`The scope "${i18n.locale}${i18n.defaultSeparator}${(0, getFullScope_1.getFullScope)(i18n, scope, {})}" couldn't be found`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
units = options.units;
|
||||
}
|
||||
let formattedNumber = (0, roundNumber_1.roundNumber)(new bignumber_js_1.BigNumber(input), roundOptions);
|
||||
const unitExponents = (units) => (0, sortBy_1.default)(Object.keys(units).map((name) => INVERTED_DECIMAL_UNITS[name]), (numeric) => numeric * -1);
|
||||
const calculateExponent = (num, units) => {
|
||||
const exponent = num.isZero()
|
||||
? 0
|
||||
: Math.floor(Math.log10(num.abs().toNumber()));
|
||||
return unitExponents(units).find((exp) => exponent >= exp) || 0;
|
||||
};
|
||||
const determineUnit = (units, exponent) => {
|
||||
const expName = DECIMAL_UNITS[exponent.toString()];
|
||||
return units[expName] || "";
|
||||
};
|
||||
const exponent = calculateExponent(new bignumber_js_1.BigNumber(formattedNumber), units);
|
||||
const unit = determineUnit(units, exponent);
|
||||
formattedNumber = (0, roundNumber_1.roundNumber)(new bignumber_js_1.BigNumber(formattedNumber).div(Math.pow(10, exponent)), roundOptions);
|
||||
if (options.stripInsignificantZeros) {
|
||||
let [whole, significand] = formattedNumber.split(".");
|
||||
significand = (significand || "").replace(/0+$/, "");
|
||||
formattedNumber = whole;
|
||||
if (significand) {
|
||||
formattedNumber += `${options.separator}${significand}`;
|
||||
}
|
||||
}
|
||||
return options.format
|
||||
.replace("%n", formattedNumber || "0")
|
||||
.replace("%u", unit)
|
||||
.trim();
|
||||
}
|
||||
exports.numberToHuman = numberToHuman;
|
||||
//# sourceMappingURL=numberToHuman.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/numberToHuman.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/numberToHuman.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"numberToHuman.js","sourceRoot":"","sources":["../../../src/helpers/numberToHuman.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyC;AACzC,2DAAmC;AACnC,iEAAyC;AAIzC,iDAA8C;AAC9C,qCAAkC;AAClC,+CAA4C;AAC5C,2CAAwC;AAKxC,MAAM,aAAa,GAAG;IACpB,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,KA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AS,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,SAAA,EAAE,EAAI,QAAQ,CAAA,CAAC,EAClD,YAAY,CACb,CAAC;IAEF,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QAEpC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACtD,WAAW,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAErD,eAAe,GAAG,KAAK,CAAC;QAExB,IAAI,WAAW,EAAE,CAAC;YAChB,eAAe,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,WAAW,EAAE,CAAC;QAC1D,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC,MAAM;SAClB,OAAO,CAAC,IAAI,EAAE,eAAe,IAAI,GAAG,CAAC;SACrC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC;SACnB,IAAI,EAAE,CAAC;AACZ,CAAC;AA9ED,sCA8EC"}
|
||||
52
node_modules/i18n-js/dist/require/helpers/numberToHumanSize.js
generated
vendored
Normal file
52
node_modules/i18n-js/dist/require/helpers/numberToHumanSize.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.numberToHumanSize = void 0;
|
||||
const bignumber_js_1 = require("bignumber.js");
|
||||
const roundNumber_1 = require("./roundNumber");
|
||||
const expandRoundMode_1 = require("./expandRoundMode");
|
||||
const STORAGE_UNITS = ["byte", "kb", "mb", "gb", "tb", "pb", "eb"];
|
||||
function numberToHumanSize(i18n, input, options) {
|
||||
const roundMode = (0, expandRoundMode_1.expandRoundMode)(options.roundMode);
|
||||
const base = 1024;
|
||||
const num = new bignumber_js_1.BigNumber(input).abs();
|
||||
const smallerThanBase = num.lt(base);
|
||||
let numberToBeFormatted;
|
||||
const computeExponent = (numeric, units) => {
|
||||
const max = units.length - 1;
|
||||
const exp = new bignumber_js_1.BigNumber(Math.log(numeric.toNumber()))
|
||||
.div(Math.log(base))
|
||||
.integerValue(bignumber_js_1.BigNumber.ROUND_DOWN)
|
||||
.toNumber();
|
||||
return Math.min(max, exp);
|
||||
};
|
||||
const storageUnitKey = (units) => {
|
||||
const keyEnd = smallerThanBase ? "byte" : units[exponent];
|
||||
return `number.human.storage_units.units.${keyEnd}`;
|
||||
};
|
||||
const exponent = computeExponent(num, STORAGE_UNITS);
|
||||
if (smallerThanBase) {
|
||||
numberToBeFormatted = num.integerValue();
|
||||
}
|
||||
else {
|
||||
numberToBeFormatted = new bignumber_js_1.BigNumber((0, roundNumber_1.roundNumber)(num.div(Math.pow(base, exponent)), {
|
||||
significant: options.significant,
|
||||
precision: options.precision,
|
||||
roundMode: options.roundMode,
|
||||
}));
|
||||
}
|
||||
const format = i18n.translate("number.human.storage_units.format", {
|
||||
defaultValue: "%n %u",
|
||||
});
|
||||
const unit = i18n.translate(storageUnitKey(STORAGE_UNITS), {
|
||||
count: num.integerValue().toNumber(),
|
||||
});
|
||||
let formattedNumber = numberToBeFormatted.toFixed(options.precision, roundMode);
|
||||
if (options.stripInsignificantZeros) {
|
||||
formattedNumber = formattedNumber
|
||||
.replace(/(\..*?)0+$/, "$1")
|
||||
.replace(/\.$/, "");
|
||||
}
|
||||
return format.replace("%n", formattedNumber).replace("%u", unit);
|
||||
}
|
||||
exports.numberToHumanSize = numberToHumanSize;
|
||||
//# sourceMappingURL=numberToHumanSize.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/numberToHumanSize.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/numberToHumanSize.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"numberToHumanSize.js","sourceRoot":"","sources":["../../../src/helpers/numberToHumanSize.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AAIzC,+CAA4C;AAC5C,uDAAoD;AAKpD,MAAM,a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AY,EAAE,CAAC;IAC3C,CAAC;SAAM,CAAC;QACN,mBAAmB,GAAG,IAAI,wBAAS,CACjC,IAAA,yBAAW,EAAC,GAAG,CAAC,GAAG,CAAC,SAAA,IAAI,EAAI,QAAQ,CAAA,CAAC,EAAE;YACrC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAC,CACH,CAAC;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,mCAAmC,EAAE;QACjE,YAAY,EAAE,OAAO;KACtB,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE;QACzD,KAAK,EAAE,GAAG,CAAC,YAAY,EAAE,CAAC,QAAQ,EAAE;KACrC,CAAC,CAAC;IAEH,IAAI,eAAe,GAAG,mBAAmB,CAAC,OAAO,CAC/C,OAAO,CAAC,SAAmB,EAC3B,SAAS,CACV,CAAC;IAEF,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;QACpC,eAAe,GAAG,eAAe;aAC9B,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;aAC3B,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACnE,CAAC;AA5DD,8CA4DC"}
|
||||
35
node_modules/i18n-js/dist/require/helpers/parseDate.js
generated
vendored
Normal file
35
node_modules/i18n-js/dist/require/helpers/parseDate.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.parseDate = void 0;
|
||||
function parseDate(input) {
|
||||
if (input instanceof Date) {
|
||||
return input;
|
||||
}
|
||||
if (typeof input === "number") {
|
||||
const date = new Date();
|
||||
date.setTime(input);
|
||||
return date;
|
||||
}
|
||||
const matches = new String(input).match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})(?:[.,](\d{1,3}))?)?(Z|\+00:?00)?/);
|
||||
if (matches) {
|
||||
const parts = matches.slice(1, 8).map((match) => parseInt(match, 10) || 0);
|
||||
parts[1] -= 1;
|
||||
const [year, month, day, hour, minute, second, milliseconds] = parts;
|
||||
const timezone = matches[8];
|
||||
if (timezone) {
|
||||
return new Date(Date.UTC(year, month, day, hour, minute, second, milliseconds));
|
||||
}
|
||||
else {
|
||||
return new Date(year, month, day, hour, minute, second, milliseconds);
|
||||
}
|
||||
}
|
||||
if (input.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)) {
|
||||
const date = new Date();
|
||||
date.setTime(Date.parse([RegExp.$1, RegExp.$2, RegExp.$3, RegExp.$6, RegExp.$4, RegExp.$5].join(" ")));
|
||||
}
|
||||
const date = new Date();
|
||||
date.setTime(Date.parse(input));
|
||||
return date;
|
||||
}
|
||||
exports.parseDate = parseDate;
|
||||
//# sourceMappingURL=parseDate.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/parseDate.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/parseDate.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"parseDate.js","sourceRoot":"","sources":["../../../src/helpers/parseDate.ts"],"names":[],"mappings":";;;AAkCA,SAAgB,SAAS,CAAC,KAAe;IAEvC,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAE9B,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,OAAO,CAAC,KAA0B,CAAC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IAAI,CACrE,GAAG,CACJ,CACF,CACF,CAAC;IACJ,CAAC;IAGD,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAEhC,OAAO,IAAI,CAAC;AACd,CAAC;AAzDD,8BAyDC"}
|
||||
37
node_modules/i18n-js/dist/require/helpers/pluralize.js
generated
vendored
Normal file
37
node_modules/i18n-js/dist/require/helpers/pluralize.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.pluralize = void 0;
|
||||
const isSet_1 = require("./isSet");
|
||||
const lookup_1 = require("./lookup");
|
||||
function pluralize({ i18n, count, scope, options, baseScope, }) {
|
||||
options = Object.assign({}, options);
|
||||
let translations;
|
||||
let message;
|
||||
if (typeof scope === "object" && scope) {
|
||||
translations = scope;
|
||||
}
|
||||
else {
|
||||
translations = (0, lookup_1.lookup)(i18n, scope, options);
|
||||
}
|
||||
if (!translations) {
|
||||
return i18n.missingTranslation.get(scope, options);
|
||||
}
|
||||
const pluralizer = i18n.pluralization.get(options.locale);
|
||||
const keys = pluralizer(i18n, count);
|
||||
const missingKeys = [];
|
||||
while (keys.length) {
|
||||
const key = keys.shift();
|
||||
if ((0, isSet_1.isSet)(translations[key])) {
|
||||
message = translations[key];
|
||||
break;
|
||||
}
|
||||
missingKeys.push(key);
|
||||
}
|
||||
if (!(0, isSet_1.isSet)(message)) {
|
||||
return i18n.missingTranslation.get(baseScope.split(i18n.defaultSeparator).concat([missingKeys[0]]), options);
|
||||
}
|
||||
options.count = count;
|
||||
return i18n.interpolate(i18n, message, options);
|
||||
}
|
||||
exports.pluralize = pluralize;
|
||||
//# sourceMappingURL=pluralize.js.map
|
||||
1
node_modules/i18n-js/dist/require/helpers/pluralize.js.map
generated
vendored
Normal file
1
node_modules/i18n-js/dist/require/helpers/pluralize.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pluralize.js","sourceRoot":"","sources":["../../../src/helpers/pluralize.ts"],"names":[],"mappings":";;;AAGA,mCAAgC;AAChC,qCAAkC;AAmBlC,SAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,KAAK,EACL,KAAK,EACL,OAAO,EACP,SAAS,GAOV;IACC,OAAO,qBAAQ,OAAO,CAAE,CAAC;IACzB,IAAI,YAAY,CAAC;IACjB,IAAI,OAAO,CAAC;IAEZ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,EAAE,CAAC;QACvC,YAAY,GAAG,KAAK,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,YAAY,GAAG,IAAA,eAAM,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACrC,MAAM,WAAW,GAAgB,EAAE,CAAC;IAEpC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;QACnB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,EAAY,CAAC;QAEnC,IAAI,IAAA,aAAK,EAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YAC7B,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;YAC5B,MAAM;QACR,CAAC;QAED,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,IAAA,aAAK,EAAC,OAAO,CAAC,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAChC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAC/D,OAAO,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAEtB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AApDD,8BAoDC"}
|
||||
32
node_modules/i18n-js/dist/require/helpers/roundNumber.js
generated
vendored
Normal file
32
node_modules/i18n-js/dist/require/helpers/roundNumber.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.roundNumber = void 0;
|
||||
const bignumber_js_1 = require("bignumber.js");
|
||||
const expandRoundMode_1 = require("./expandRoundMode");
|
||||
function digitCount(numeric) {
|
||||
if (numeric.isZero()) {
|
||||
return 1;
|
||||
}
|
||||
return Math.floor(Math.log10(numeric.abs().toNumber()) + 1);
|
||||
}
|
||||
function getAbsolutePrecision(numeric, { precision, significant }) {
|
||||
if (significant && precision !== null && precision > 0) {
|
||||
return precision - digitCount(numeric);
|
||||
}
|
||||
return precision;
|
||||
}
|
||||
function roundNumber(numeric, options) {
|
||||
const precision = getAbsolutePrecision(numeric, options);
|
||||
if (precision === null) {
|
||||
return numeric.toString();
|
||||
}
|
||||
const roundMode = (0, expandRoundMode_1.expandRoundMode)(options.roundMode);
|
||||
if (precision >= 0) {
|
||||
return numeric.toFixed(precision, roundMode);
|
||||
}
|
||||
const rounder = Math.pow(10, Math.abs(precision));
|
||||
numeric = new bignumber_js_1.BigNumber(numeric.div(rounder).toFixed(0, roundMode)).times(rounder);
|
||||
return numeric.toString();
|
||||
}
|
||||
exports.roundNumber = roundNumber;
|
||||
//# sourceMappingURL=roundNumber.js.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user