UNPKG

@formatjs/intl-pluralrules

Version:
1,437 lines (1,414 loc) 139 kB
(() => { var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/CanonicalizeLocaleList.js function CanonicalizeLocaleList(locales) { return Intl.getCanonicalLocales(locales); } // node_modules/.aspect_rules_js/@formatjs+bigdecimal@0.0.0/node_modules/@formatjs/bigdecimal/index.js var DIV_PRECISION = 40; var SpecialValue = function(SpecialValue2) { SpecialValue2[SpecialValue2["NONE"] = 0] = "NONE"; SpecialValue2[SpecialValue2["NAN"] = 1] = "NAN"; SpecialValue2[SpecialValue2["POSITIVE_INFINITY"] = 2] = "POSITIVE_INFINITY"; SpecialValue2[SpecialValue2["NEGATIVE_INFINITY"] = 3] = "NEGATIVE_INFINITY"; return SpecialValue2; }(SpecialValue || {}); function removeTrailingZeros(mantissa, exponent) { if (mantissa === 0n) return [0n, 0]; while (mantissa % 10n === 0n) { mantissa /= 10n; exponent++; } return [mantissa, exponent]; } function bigintAbs(n) { return n < 0n ? -n : n; } function digitCount(n) { if (n === 0n) return 1; if (n < 0n) n = -n; let count = 0; const big15 = 1000000000000000n; while (n >= big15) { n /= big15; count += 15; } let r = Number(n); while (r >= 1) { r /= 10; count++; } return count; } var TEN_BIGINT = 10n; function bigintPow10(n) { if (n <= 0) return 1n; let result = 1n; let base = TEN_BIGINT; let exp = n; while (exp > 0) { if (exp & 1) result *= base; base *= base; exp >>= 1; } return result; } function parseDecimalString(s) { s = s.trim(); if (s === "NaN") { return { mantissa: 0n, exponent: 0, special: SpecialValue.NAN, negativeZero: false }; } if (s === "Infinity" || s === "+Infinity") { return { mantissa: 0n, exponent: 0, special: SpecialValue.POSITIVE_INFINITY, negativeZero: false }; } if (s === "-Infinity") { return { mantissa: 0n, exponent: 0, special: SpecialValue.NEGATIVE_INFINITY, negativeZero: false }; } let negative = false; let idx = 0; if (s[idx] === "-") { negative = true; idx++; } else if (s[idx] === "+") { idx++; } let eIdx = s.indexOf("e", idx); if (eIdx === -1) eIdx = s.indexOf("E", idx); let sciExp = 0; let numPart; if (eIdx !== -1) { sciExp = parseInt(s.substring(eIdx + 1), 10); numPart = s.substring(idx, eIdx); } else { numPart = s.substring(idx); } const dotIdx = numPart.indexOf("."); let intPart; let fracPart; if (dotIdx !== -1) { intPart = numPart.substring(0, dotIdx); fracPart = numPart.substring(dotIdx + 1); } else { intPart = numPart; fracPart = ""; } const combined = intPart + fracPart; const exponent = sciExp - fracPart.length; if (combined === "" || combined === "0" || /^0+$/.test(combined)) { return { mantissa: 0n, exponent: 0, special: SpecialValue.NONE, negativeZero: negative }; } let mantissa = BigInt(combined); if (negative) mantissa = -mantissa; const [normMantissa, normExponent] = removeTrailingZeros(mantissa, exponent); return { mantissa: normMantissa, exponent: normExponent, special: SpecialValue.NONE, negativeZero: false }; } var BigDecimal = class _BigDecimal { constructor(value) { __publicField(this, "_mantissa"); __publicField(this, "_exponent"); __publicField(this, "_special"); __publicField(this, "_negativeZero"); if (typeof value === "bigint") { const [m, e] = removeTrailingZeros(value, 0); this._mantissa = m; this._exponent = e; this._special = SpecialValue.NONE; this._negativeZero = false; return; } if (typeof value === "number") { if (Number.isNaN(value)) { this._mantissa = 0n; this._exponent = 0; this._special = SpecialValue.NAN; this._negativeZero = false; return; } if (value === Infinity) { this._mantissa = 0n; this._exponent = 0; this._special = SpecialValue.POSITIVE_INFINITY; this._negativeZero = false; return; } if (value === -Infinity) { this._mantissa = 0n; this._exponent = 0; this._special = SpecialValue.NEGATIVE_INFINITY; this._negativeZero = false; return; } if (value === 0) { this._mantissa = 0n; this._exponent = 0; this._special = SpecialValue.NONE; this._negativeZero = Object.is(value, -0); return; } value = String(value); } const parsed = parseDecimalString(value); this._mantissa = parsed.mantissa; this._exponent = parsed.exponent; this._special = parsed.special; this._negativeZero = parsed.negativeZero; } // Private constructor for internal use static _create(mantissa, exponent, special, negativeZero) { const bd = Object.create(_BigDecimal.prototype); bd._mantissa = mantissa; bd._exponent = exponent; bd._special = special; bd._negativeZero = negativeZero; return bd; } // Auto-coerce to BigDecimal for decimal.js compat static _coerce(v) { return v instanceof _BigDecimal ? v : new _BigDecimal(v); } // --- Arithmetic --- times(y) { const other = _BigDecimal._coerce(y); if (this._special || other._special) { return this._specialArith(other, "times"); } if (this._mantissa === 0n || other._mantissa === 0n) { const negZero = this._isSignNegative() ? !other._isSignNegative() : other._isSignNegative(); return _BigDecimal._create(0n, 0, SpecialValue.NONE, negZero); } const m = this._mantissa * other._mantissa; const e = this._exponent + other._exponent; const [nm, ne] = removeTrailingZeros(m, e); return _BigDecimal._create(nm, ne, SpecialValue.NONE, false); } div(y) { const other = _BigDecimal._coerce(y); if (this._special || other._special) { return this._specialArith(other, "div"); } if (other._mantissa === 0n) { if (this._mantissa === 0n) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } const neg = this._isSignNegative() !== other._isSignNegative(); return _BigDecimal._create(0n, 0, neg ? SpecialValue.NEGATIVE_INFINITY : SpecialValue.POSITIVE_INFINITY, false); } if (this._mantissa === 0n) { const negZero = this._isSignNegative() !== other._isSignNegative(); return _BigDecimal._create(0n, 0, SpecialValue.NONE, negZero); } const scaledNumerator = this._mantissa * bigintPow10(DIV_PRECISION); const quotient = scaledNumerator / other._mantissa; const newExponent = this._exponent - other._exponent - DIV_PRECISION; const [nm, ne] = removeTrailingZeros(quotient, newExponent); return _BigDecimal._create(nm, ne, SpecialValue.NONE, false); } plus(y) { const other = _BigDecimal._coerce(y); if (this._special || other._special) { return this._specialArith(other, "plus"); } if (this._mantissa === 0n && other._mantissa === 0n) { const negZero = this._negativeZero && other._negativeZero; return _BigDecimal._create(0n, 0, SpecialValue.NONE, negZero); } if (this._mantissa === 0n) return other; if (other._mantissa === 0n) return this; let m1 = this._mantissa; let m2 = other._mantissa; const e1 = this._exponent; const e2 = other._exponent; const minE = Math.min(e1, e2); if (e1 > minE) m1 *= bigintPow10(e1 - minE); if (e2 > minE) m2 *= bigintPow10(e2 - minE); const sum = m1 + m2; if (sum === 0n) { return _BigDecimal._create(0n, 0, SpecialValue.NONE, false); } const [nm, ne] = removeTrailingZeros(sum, minE); return _BigDecimal._create(nm, ne, SpecialValue.NONE, false); } minus(y) { return this.plus(_BigDecimal._coerce(y).negated()); } mod(y) { const other = _BigDecimal._coerce(y); if (this._special || other._special) { if (this._special === SpecialValue.NAN || other._special === SpecialValue.NAN) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } if (this._special === SpecialValue.POSITIVE_INFINITY || this._special === SpecialValue.NEGATIVE_INFINITY) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } if (other._special === SpecialValue.POSITIVE_INFINITY || other._special === SpecialValue.NEGATIVE_INFINITY) { return this; } } if (other._mantissa === 0n) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } if (this._mantissa === 0n) { return this; } let m1 = this._mantissa; let m2 = other._mantissa; const e1 = this._exponent; const e2 = other._exponent; const minE = Math.min(e1, e2); if (e1 > minE) m1 *= bigintPow10(e1 - minE); if (e2 > minE) m2 *= bigintPow10(e2 - minE); const remainder = m1 % m2; if (remainder === 0n) { return _BigDecimal._create(0n, 0, SpecialValue.NONE, false); } const [nm, ne] = removeTrailingZeros(remainder, minE); return _BigDecimal._create(nm, ne, SpecialValue.NONE, false); } abs() { if (this._special === SpecialValue.NAN) return this; if (this._special === SpecialValue.NEGATIVE_INFINITY) { return _BigDecimal._create(0n, 0, SpecialValue.POSITIVE_INFINITY, false); } return _BigDecimal._create(bigintAbs(this._mantissa), this._exponent, this._special, false); } negated() { if (this._special === SpecialValue.NAN) return this; if (this._special === SpecialValue.POSITIVE_INFINITY) { return _BigDecimal._create(0n, 0, SpecialValue.NEGATIVE_INFINITY, false); } if (this._special === SpecialValue.NEGATIVE_INFINITY) { return _BigDecimal._create(0n, 0, SpecialValue.POSITIVE_INFINITY, false); } if (this._mantissa === 0n) { return _BigDecimal._create(0n, 0, SpecialValue.NONE, !this._negativeZero); } return _BigDecimal._create(-this._mantissa, this._exponent, SpecialValue.NONE, false); } pow(n) { if (this._special === SpecialValue.NAN) return this; if (n === 0) return new _BigDecimal(1); if (n < 0) { return new _BigDecimal(1).div(this.pow(-n)); } if (this._special === SpecialValue.POSITIVE_INFINITY) return this; if (this._special === SpecialValue.NEGATIVE_INFINITY) { return n % 2 === 0 ? _BigDecimal._create(0n, 0, SpecialValue.POSITIVE_INFINITY, false) : this; } if (this._mantissa === 0n) return new _BigDecimal(0); const m = this._mantissa ** BigInt(n); const e = this._exponent * n; const [nm, ne] = removeTrailingZeros(m, e); return _BigDecimal._create(nm, ne, SpecialValue.NONE, false); } floor() { if (this._special !== SpecialValue.NONE) return this; if (this._mantissa === 0n) return this; if (this._exponent >= 0) return this; const divisor = bigintPow10(-this._exponent); const m = this._mantissa; let q = m / divisor; if (m < 0n && m % divisor !== 0n) { q -= 1n; } if (q === 0n) { const negZero = this._mantissa < 0n; return _BigDecimal._create(0n, 0, SpecialValue.NONE, negZero); } const [nm, ne] = removeTrailingZeros(q, 0); return _BigDecimal._create(nm, ne, SpecialValue.NONE, false); } ceil() { if (this._special !== SpecialValue.NONE) return this; if (this._mantissa === 0n) return this; if (this._exponent >= 0) return this; const divisor = bigintPow10(-this._exponent); const m = this._mantissa; let q = m / divisor; if (m > 0n && m % divisor !== 0n) { q += 1n; } if (q === 0n) { return _BigDecimal._create(0n, 0, SpecialValue.NONE, false); } const [nm, ne] = removeTrailingZeros(q, 0); return _BigDecimal._create(nm, ne, SpecialValue.NONE, false); } log(base) { if (this._special === SpecialValue.NAN) return this; if (this._special === SpecialValue.NEGATIVE_INFINITY) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } if (this._special === SpecialValue.POSITIVE_INFINITY) { return _BigDecimal._create(0n, 0, SpecialValue.POSITIVE_INFINITY, false); } if (this._mantissa < 0n) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } if (this._mantissa === 0n) { return _BigDecimal._create(0n, 0, SpecialValue.NEGATIVE_INFINITY, false); } if (base === 10) { return this._log10(); } const log10x = this._log10(); const log10b = new _BigDecimal(Math.log10(base)); return log10x.div(log10b); } _log10() { const absMantissa = bigintAbs(this._mantissa); const digits = digitCount(absMantissa); let log10Mantissa; if (digits <= 15) { log10Mantissa = Math.log10(Number(absMantissa)); } else { const shift = digits - 17; const leading = absMantissa / bigintPow10(shift); log10Mantissa = Math.log10(Number(leading)) + shift; } const totalLog10 = log10Mantissa + this._exponent; return new _BigDecimal(totalLog10); } // --- Comparison --- eq(y) { const other = _BigDecimal._coerce(y); if (this._special === SpecialValue.NAN || other._special === SpecialValue.NAN) return false; if (this._special !== other._special) return false; if (this._special !== SpecialValue.NONE) return true; if (this._mantissa === 0n && other._mantissa === 0n) return true; return this._mantissa === other._mantissa && this._exponent === other._exponent; } _compareTo(other) { if (this._special === SpecialValue.NAN || other._special === SpecialValue.NAN) { return NaN; } if (this._special === SpecialValue.POSITIVE_INFINITY) { return other._special === SpecialValue.POSITIVE_INFINITY ? 0 : 1; } if (this._special === SpecialValue.NEGATIVE_INFINITY) { return other._special === SpecialValue.NEGATIVE_INFINITY ? 0 : -1; } if (other._special === SpecialValue.POSITIVE_INFINITY) return -1; if (other._special === SpecialValue.NEGATIVE_INFINITY) return 1; const thisZero = this._mantissa === 0n; const otherZero = other._mantissa === 0n; if (thisZero && otherZero) return 0; if (thisZero) return other._mantissa > 0n ? -1 : 1; if (otherZero) return this._mantissa > 0n ? 1 : -1; const thisNeg = this._mantissa < 0n; const otherNeg = other._mantissa < 0n; if (thisNeg !== otherNeg) return thisNeg ? -1 : 1; let m1 = this._mantissa; let m2 = other._mantissa; const e1 = this._exponent; const e2 = other._exponent; const minE = Math.min(e1, e2); if (e1 > minE) m1 *= bigintPow10(e1 - minE); if (e2 > minE) m2 *= bigintPow10(e2 - minE); if (m1 < m2) return -1; if (m1 > m2) return 1; return 0; } lessThan(y) { const c = this._compareTo(_BigDecimal._coerce(y)); return c === -1; } greaterThan(y) { const c = this._compareTo(_BigDecimal._coerce(y)); return c === 1; } lessThanOrEqualTo(y) { const c = this._compareTo(_BigDecimal._coerce(y)); return c === 0 || c === -1; } greaterThanOrEqualTo(y) { const c = this._compareTo(_BigDecimal._coerce(y)); return c === 0 || c === 1; } // --- Queries --- isZero() { return this._special === SpecialValue.NONE && this._mantissa === 0n; } isNaN() { return this._special === SpecialValue.NAN; } isFinite() { return this._special === SpecialValue.NONE; } isNegative() { if (this._special === SpecialValue.NAN) return false; if (this._special === SpecialValue.NEGATIVE_INFINITY) return true; if (this._special === SpecialValue.POSITIVE_INFINITY) return false; if (this._mantissa === 0n) return this._negativeZero; return this._mantissa < 0n; } isPositive() { if (this._special === SpecialValue.NAN) return false; if (this._special === SpecialValue.POSITIVE_INFINITY) return true; if (this._special === SpecialValue.NEGATIVE_INFINITY) return false; if (this._mantissa === 0n) return !this._negativeZero; return this._mantissa > 0n; } isInteger() { if (this._special !== SpecialValue.NONE) return false; if (this._mantissa === 0n) return true; return this._exponent >= 0; } // --- Conversion --- toJSON() { return this.toString(); } toNumber() { if (this._special === SpecialValue.NAN) return NaN; if (this._special === SpecialValue.POSITIVE_INFINITY) return Infinity; if (this._special === SpecialValue.NEGATIVE_INFINITY) return -Infinity; if (this._mantissa === 0n) return this._negativeZero ? -0 : 0; return Number(this.toString()); } toString() { if (this._special === SpecialValue.NAN) return "NaN"; if (this._special === SpecialValue.POSITIVE_INFINITY) return "Infinity"; if (this._special === SpecialValue.NEGATIVE_INFINITY) return "-Infinity"; if (this._mantissa === 0n) return "0"; const negative = this._mantissa < 0n; const absStr = bigintAbs(this._mantissa).toString(); const prefix = negative ? "-" : ""; if (this._exponent === 0) { return prefix + absStr; } if (this._exponent > 0) { return prefix + absStr + "0".repeat(this._exponent); } const decimalPlaces = -this._exponent; if (decimalPlaces < absStr.length) { const intPart = absStr.slice(0, absStr.length - decimalPlaces); const fracPart = absStr.slice(absStr.length - decimalPlaces); return prefix + intPart + "." + fracPart; } else { const leadingZeros = decimalPlaces - absStr.length; return prefix + "0." + "0".repeat(leadingZeros) + absStr; } } // --- Static --- static pow(base, exp) { const n = typeof exp === "number" ? exp : exp.toNumber(); if (typeof base === "number" && base === 10) { return _BigDecimal._create(1n, n, SpecialValue.NONE, false); } const bd = base instanceof _BigDecimal ? base : new _BigDecimal(base); return bd.pow(n); } static set(_config) { } // --- Internal helpers --- _isSignNegative() { if (this._special === SpecialValue.NEGATIVE_INFINITY) return true; if (this._mantissa < 0n) return true; if (this._mantissa === 0n) return this._negativeZero; return false; } _specialArith(other, op) { const a = this._special; const b = other._special; if (a === SpecialValue.NAN || b === SpecialValue.NAN) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } const aNeg = this._isSignNegative(); const bNeg = other._isSignNegative(); const aInf = a === SpecialValue.POSITIVE_INFINITY || a === SpecialValue.NEGATIVE_INFINITY; const bInf = b === SpecialValue.POSITIVE_INFINITY || b === SpecialValue.NEGATIVE_INFINITY; if (op === "times") { if (aInf || bInf) { if (aInf && other._mantissa === 0n && !bInf || bInf && this._mantissa === 0n && !aInf) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } const neg = aNeg !== bNeg; return _BigDecimal._create(0n, 0, neg ? SpecialValue.NEGATIVE_INFINITY : SpecialValue.POSITIVE_INFINITY, false); } } if (op === "div") { if (aInf && bInf) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } if (aInf) { const neg = aNeg !== bNeg; return _BigDecimal._create(0n, 0, neg ? SpecialValue.NEGATIVE_INFINITY : SpecialValue.POSITIVE_INFINITY, false); } if (bInf) { const negZero = aNeg !== bNeg; return _BigDecimal._create(0n, 0, SpecialValue.NONE, negZero); } } if (op === "plus") { if (aInf && bInf) { if (aNeg !== bNeg) { return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } return this; } if (aInf) return this; if (bInf) return other; } return _BigDecimal._create(0n, 0, SpecialValue.NAN, false); } }; var bigdecimal_default = BigDecimal; // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/constants.js var TEN = new BigDecimal(10); var ZERO = new BigDecimal(0); var NEGATIVE_ZERO = new BigDecimal(-0); // node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js function memoize(fn, options) { const cache = options && options.cache ? options.cache : cacheDefault; const serializer = options && options.serializer ? options.serializer : serializerDefault; const strategy = options && options.strategy ? options.strategy : strategyDefault; return strategy(fn, { cache, serializer }); } function isPrimitive(value) { return value == null || typeof value === "number" || typeof value === "boolean"; } function monadic(fn, cache, serializer, arg) { const cacheKey = isPrimitive(arg) ? arg : serializer(arg); let computedValue = cache.get(cacheKey); if (typeof computedValue === "undefined") { computedValue = fn.call(this, arg); cache.set(cacheKey, computedValue); } return computedValue; } function variadic(fn, cache, serializer) { const args = Array.prototype.slice.call(arguments, 3); const cacheKey = serializer(args); let computedValue = cache.get(cacheKey); if (typeof computedValue === "undefined") { computedValue = fn.apply(this, args); cache.set(cacheKey, computedValue); } return computedValue; } function assemble(fn, context, strategy, cache, serialize) { return strategy.bind(context, fn, cache, serialize); } function strategyDefault(fn, options) { const strategy = fn.length === 1 ? monadic : variadic; return assemble(fn, this, strategy, options.cache.create(), options.serializer); } function strategyVariadic(fn, options) { return assemble(fn, this, variadic, options.cache.create(), options.serializer); } function strategyMonadic(fn, options) { return assemble(fn, this, monadic, options.cache.create(), options.serializer); } var serializerDefault = function() { return JSON.stringify(arguments); }; var ObjectWithoutPrototypeCache = class { constructor() { __publicField(this, "cache"); this.cache = /* @__PURE__ */ Object.create(null); } get(key) { return this.cache[key]; } set(key, value) { this.cache[key] = value; } }; var cacheDefault = { create: function create() { return new ObjectWithoutPrototypeCache(); } }; var strategies = { variadic: strategyVariadic, monadic: strategyMonadic }; // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/utils.js function repeat(s, times) { if (typeof s.repeat === "function") { return s.repeat(times); } const arr = Array.from({ length: times }); for (let i = 0; i < arr.length; i++) { arr[i] = s; } return arr.join(""); } function invariant(condition, message, Err = Error) { if (!condition) { throw new Err(message); } } var createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic }); var createMemoizedPluralRules = memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic }); var createMemoizedLocale = memoize((...args) => new Intl.Locale(...args), { strategy: strategies.variadic }); var createMemoizedListFormat = memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic }); // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/262.js function ToString(o) { if (typeof o === "symbol") { throw TypeError("Cannot convert a Symbol value to a string"); } return String(o); } function ToNumber(arg) { if (typeof arg === "number") { return new BigDecimal(arg); } if (typeof arg === "bigint") { return new BigDecimal(arg.toString()); } invariant(typeof arg !== "symbol", "Symbol is not supported", TypeError); if (arg === void 0) { return new BigDecimal(NaN); } if (arg === null || arg === 0) { return ZERO; } if (arg === true) { return new BigDecimal(1); } if (typeof arg === "string") { try { return new BigDecimal(arg); } catch { return new BigDecimal(NaN); } } invariant(typeof arg === "object", "object expected", TypeError); let primValue = ToPrimitive(arg, "number"); invariant(typeof primValue !== "object", "object expected", TypeError); return ToNumber(primValue); } function ToObject(arg) { if (arg == null) { throw new TypeError("undefined/null cannot be converted to object"); } return Object(arg); } function Type(x) { if (x === null) { return "Null"; } if (typeof x === "undefined") { return "Undefined"; } if (typeof x === "function" || typeof x === "object") { return "Object"; } if (typeof x === "number") { return "Number"; } if (typeof x === "boolean") { return "Boolean"; } if (typeof x === "string") { return "String"; } if (typeof x === "symbol") { return "Symbol"; } if (typeof x === "bigint") { return "BigInt"; } } var MINUTES_PER_HOUR = 60; var SECONDS_PER_MINUTE = 60; var MS_PER_SECOND = 1e3; var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE; var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR; function IsCallable(fn) { return typeof fn === "function"; } function OrdinaryToPrimitive(O, hint) { let methodNames; if (hint === "string") { methodNames = ["toString", "valueOf"]; } else { methodNames = ["valueOf", "toString"]; } for (const name of methodNames) { const method = O[name]; if (IsCallable(method)) { let result = method.call(O); if (typeof result !== "object") { return result; } } } throw new TypeError("Cannot convert object to primitive value"); } function ToPrimitive(input, preferredType) { if (typeof input === "object" && input != null) { const exoticToPrim = Symbol.toPrimitive in input ? input[Symbol.toPrimitive] : void 0; let hint; if (exoticToPrim !== void 0) { if (preferredType === void 0) { hint = "default"; } else if (preferredType === "string") { hint = "string"; } else { invariant(preferredType === "number", 'preferredType must be "string" or "number"'); hint = "number"; } let result = exoticToPrim.call(input, hint); if (typeof result !== "object") { return result; } throw new TypeError("Cannot convert exotic object to primitive."); } if (preferredType === void 0) { preferredType = "number"; } return OrdinaryToPrimitive(input, preferredType); } return input; } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/CoerceOptionsToObject.js function CoerceOptionsToObject(options) { if (typeof options === "undefined") { return /* @__PURE__ */ Object.create(null); } return ToObject(options); } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/DefaultNumberOption.js function DefaultNumberOption(inputVal, min, max, fallback) { if (inputVal === void 0) { return fallback; } const val = Number(inputVal); if (isNaN(val) || val < min || val > max) { throw new RangeError(`${val} is outside of range [${min}, ${max}]`); } return Math.floor(val); } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/GetNumberOption.js function GetNumberOption(options, property, minimum, maximum, fallback) { const val = options[property]; return DefaultNumberOption(val, minimum, maximum, fallback); } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/GetOption.js function GetOption(opts, prop, type, values, fallback) { if (typeof opts !== "object") { throw new TypeError("Options must be an object"); } let value = opts[prop]; if (value !== void 0) { if (type !== "boolean" && type !== "string") { throw new TypeError("invalid type"); } if (type === "boolean") { value = Boolean(value); } if (type === "string") { value = ToString(value); } if (values !== void 0 && !values.filter((val) => val == value).length) { throw new RangeError(`${value} is not within ${values.join(", ")}`); } return value; } return fallback; } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/IsSanctionedSimpleUnitIdentifier.js var SANCTIONED_UNITS = [ "angle-degree", "area-acre", "area-hectare", "concentr-percent", "digital-bit", "digital-byte", "digital-gigabit", "digital-gigabyte", "digital-kilobit", "digital-kilobyte", "digital-megabit", "digital-megabyte", "digital-petabyte", "digital-terabit", "digital-terabyte", "duration-day", "duration-hour", "duration-millisecond", "duration-minute", "duration-month", "duration-second", "duration-week", "duration-year", "length-centimeter", "length-foot", "length-inch", "length-kilometer", "length-meter", "length-mile-scandinavian", "length-mile", "length-millimeter", "length-yard", "mass-gram", "mass-kilogram", "mass-ounce", "mass-pound", "mass-stone", "temperature-celsius", "temperature-fahrenheit", "volume-fluid-ounce", "volume-gallon", "volume-liter", "volume-milliliter" ]; function removeUnitNamespace(unit) { return unit.slice(unit.indexOf("-") + 1); } var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace); // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/NumberFormat/ApplyUnsignedRoundingMode.js function ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode) { if (x.eq(r1) || r1.eq(r2)) return r1; if (x.eq(r2)) return r2; invariant(r1.lessThan(x) && x.lessThan(r2), `x should be between r1 and r2 but x=${x}, r1=${r1}, r2=${r2}`); if (unsignedRoundingMode === "zero") { return r1; } if (unsignedRoundingMode === "infinity") { return r2; } const d1 = x.minus(r1); const d2 = r2.minus(x); if (d1.lessThan(d2)) { return r1; } if (d2.lessThan(d1)) { return r2; } invariant(d1.eq(d2), "d1 should be equal to d2"); if (unsignedRoundingMode === "half-zero") { return r1; } if (unsignedRoundingMode === "half-infinity") { return r2; } invariant(unsignedRoundingMode === "half-even", "unsignedRoundingMode should be half-even"); const cardinality = r1.div(r2.minus(r1)).mod(2); if (cardinality.isZero()) { return r1; } return r2; } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/NumberFormat/decimal-cache.js var getPowerOf10 = memoize((exponent) => { return BigDecimal.pow(10, exponent); }); // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/NumberFormat/ComputeExponentForMagnitude.js function ComputeExponentForMagnitude(internalSlots, magnitude) { const { notation, dataLocaleData, numberingSystem } = internalSlots; switch (notation) { case "standard": return 0; case "scientific": return magnitude.toNumber(); case "engineering": const thousands = magnitude.div(3).floor(); return thousands.times(3).toNumber(); default: { invariant(notation === "compact", "Invalid notation"); const { compactDisplay, style, currencyDisplay } = internalSlots; let thresholdMap; if (style === "currency" && currencyDisplay !== "name") { const currency = dataLocaleData.numbers.currency[numberingSystem] || dataLocaleData.numbers.currency[dataLocaleData.numbers.nu[0]]; thresholdMap = currency.short; } else { const decimal = dataLocaleData.numbers.decimal[numberingSystem] || dataLocaleData.numbers.decimal[dataLocaleData.numbers.nu[0]]; thresholdMap = compactDisplay === "long" ? decimal.long : decimal.short; } if (!thresholdMap) { return 0; } const num = getPowerOf10(magnitude).toString(); const thresholds = Object.keys(thresholdMap); if (num < thresholds[0]) { return 0; } if (num > thresholds[thresholds.length - 1]) { const magnitudeKey2 = thresholds[thresholds.length - 1]; const compactPattern2 = thresholdMap[magnitudeKey2].other; if (compactPattern2 === "0") { return 0; } return magnitudeKey2.length - thresholdMap[magnitudeKey2].other.match(/0+/)[0].length; } const i = thresholds.indexOf(num); if (i === -1) { return 0; } const magnitudeKey = thresholds[i]; const compactPattern = thresholdMap[magnitudeKey].other; if (compactPattern === "0") { return 0; } return magnitudeKey.length - thresholdMap[magnitudeKey].other.match(/0+/)[0].length; } } } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/NumberFormat/GetUnsignedRoundingMode.js var negativeMapping = { ceil: "zero", floor: "infinity", expand: "infinity", trunc: "zero", halfCeil: "half-zero", halfFloor: "half-infinity", halfExpand: "half-infinity", halfTrunc: "half-zero", halfEven: "half-even" }; var positiveMapping = { ceil: "infinity", floor: "zero", expand: "infinity", trunc: "zero", halfCeil: "half-infinity", halfFloor: "half-zero", halfExpand: "half-infinity", halfTrunc: "half-zero", halfEven: "half-even" }; function GetUnsignedRoundingMode(roundingMode, isNegative) { if (isNegative) { return negativeMapping[roundingMode]; } return positiveMapping[roundingMode]; } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/NumberFormat/ToRawFixed.js function ToRawFixedFn(n, f) { return n.times(getPowerOf10(-f)); } function findN1R1(x, f, roundingIncrement) { const nx = x.times(getPowerOf10(f)).floor(); const n1 = nx.div(roundingIncrement).floor().times(roundingIncrement); const r1 = ToRawFixedFn(n1, f); return { n1, r1 }; } function findN2R2(x, f, roundingIncrement) { const nx = x.times(getPowerOf10(f)).ceil(); const n2 = nx.div(roundingIncrement).ceil().times(roundingIncrement); const r2 = ToRawFixedFn(n2, f); return { n2, r2 }; } function ToRawFixed(x, minFraction, maxFraction, roundingIncrement, unsignedRoundingMode) { const f = maxFraction; const { n1, r1 } = findN1R1(x, f, roundingIncrement); const { n2, r2 } = findN2R2(x, f, roundingIncrement); const r = ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode); let n, xFinal; let m; if (r.eq(r1)) { n = n1; xFinal = r1; } else { n = n2; xFinal = r2; } if (n.isZero()) { m = "0"; } else { m = n.toString(); } let int; if (f !== 0) { let k = m.length; if (k <= f) { const z = repeat("0", f - k + 1); m = z + m; k = f + 1; } const a = m.slice(0, k - f); const b = m.slice(m.length - f); m = a + "." + b; int = a.length; } else { int = m.length; } let cut = maxFraction - minFraction; while (cut > 0 && m[m.length - 1] === "0") { m = m.slice(0, m.length - 1); cut--; } if (m[m.length - 1] === ".") { m = m.slice(0, m.length - 1); } return { formattedString: m, roundedNumber: xFinal, integerDigitsCount: int, roundingMagnitude: -f }; } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/NumberFormat/ToRawPrecision.js function findN1E1R1(x, p) { const maxN1 = getPowerOf10(p); const minN1 = getPowerOf10(p - 1); const log10x = x.log(10); let e1 = log10x.floor(); const divisor = getPowerOf10(e1.minus(p).plus(1)); let n1 = x.div(divisor).floor(); let r1 = n1.times(divisor); if (n1.greaterThanOrEqualTo(maxN1)) { e1 = e1.plus(1); const newDivisor = getPowerOf10(e1.minus(p).plus(1)); n1 = x.div(newDivisor).floor(); r1 = n1.times(newDivisor); } else if (n1.lessThan(minN1)) { e1 = e1.minus(1); const newDivisor = getPowerOf10(e1.minus(p).plus(1)); n1 = x.div(newDivisor).floor(); r1 = n1.times(newDivisor); } if (r1.lessThanOrEqualTo(x) && n1.lessThan(maxN1) && n1.greaterThanOrEqualTo(minN1)) { return { n1, e1, r1 }; } const maxE1 = x.div(minN1).log(10).plus(p).minus(1).ceil(); let currentE1 = maxE1; while (true) { const currentDivisor = getPowerOf10(currentE1.minus(p).plus(1)); let currentN1 = x.div(currentDivisor).floor(); if (currentN1.lessThan(maxN1) && currentN1.greaterThanOrEqualTo(minN1)) { const currentR1 = currentN1.times(currentDivisor); if (currentR1.lessThanOrEqualTo(x)) { return { n1: currentN1, e1: currentE1, r1: currentR1 }; } } currentE1 = currentE1.minus(1); } } function findN2E2R2(x, p) { const maxN2 = getPowerOf10(p); const minN2 = getPowerOf10(p - 1); const log10x = x.log(10); let e2 = log10x.floor(); const divisor = getPowerOf10(e2.minus(p).plus(1)); let n2 = x.div(divisor).ceil(); let r2 = n2.times(divisor); if (n2.greaterThanOrEqualTo(maxN2)) { e2 = e2.plus(1); const newDivisor = getPowerOf10(e2.minus(p).plus(1)); n2 = x.div(newDivisor).ceil(); r2 = n2.times(newDivisor); } else if (n2.lessThan(minN2)) { e2 = e2.minus(1); const newDivisor = getPowerOf10(e2.minus(p).plus(1)); n2 = x.div(newDivisor).ceil(); r2 = n2.times(newDivisor); } if (r2.greaterThanOrEqualTo(x) && n2.lessThan(maxN2) && n2.greaterThanOrEqualTo(minN2)) { return { n2, e2, r2 }; } const minE2 = x.div(maxN2).log(10).plus(p).minus(1).floor(); let currentE2 = minE2; while (true) { const currentDivisor = getPowerOf10(currentE2.minus(p).plus(1)); let currentN2 = x.div(currentDivisor).ceil(); if (currentN2.lessThan(maxN2) && currentN2.greaterThanOrEqualTo(minN2)) { const currentR2 = currentN2.times(currentDivisor); if (currentR2.greaterThanOrEqualTo(x)) { return { n2: currentN2, e2: currentE2, r2: currentR2 }; } } currentE2 = currentE2.plus(1); } } function ToRawPrecision(x, minPrecision, maxPrecision, unsignedRoundingMode) { const p = maxPrecision; let m; let e; let xFinal; if (x.isZero()) { m = repeat("0", p); e = 0; xFinal = ZERO; } else { const { n1, e1, r1 } = findN1E1R1(x, p); const { n2, e2, r2 } = findN2E2R2(x, p); let r = ApplyUnsignedRoundingMode(x, r1, r2, unsignedRoundingMode); let n; if (r.eq(r1)) { n = n1; e = e1.toNumber(); xFinal = r1; } else { n = n2; e = e2.toNumber(); xFinal = r2; } m = n.toString(); } let int; if (e >= p - 1) { m = m + repeat("0", e - p + 1); int = e + 1; } else if (e >= 0) { m = m.slice(0, e + 1) + "." + m.slice(m.length - (p - (e + 1))); int = e + 1; } else { invariant(e < 0, "e should be less than 0"); m = "0." + repeat("0", -e - 1) + m; int = 1; } if (m.includes(".") && maxPrecision > minPrecision) { let cut = maxPrecision - minPrecision; while (cut > 0 && m[m.length - 1] === "0") { m = m.slice(0, m.length - 1); cut--; } if (m[m.length - 1] === ".") { m = m.slice(0, m.length - 1); } } return { formattedString: m, roundedNumber: xFinal, integerDigitsCount: int, roundingMagnitude: e }; } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/NumberFormat/FormatNumericToString.js function FormatNumericToString(intlObject, _x) { let x = _x; let sign; if (x.isZero() && x.isNegative()) { sign = "negative"; x = ZERO; } else { invariant(x.isFinite(), "NumberFormatDigitInternalSlots value is not finite"); if (x.lessThan(0)) { sign = "negative"; } else { sign = "positive"; } if (sign === "negative") { x = x.negated(); } } let result; const roundingType = intlObject.roundingType; const unsignedRoundingMode = GetUnsignedRoundingMode(intlObject.roundingMode, sign === "negative"); switch (roundingType) { case "significantDigits": result = ToRawPrecision(x, intlObject.minimumSignificantDigits, intlObject.maximumSignificantDigits, unsignedRoundingMode); break; case "fractionDigits": result = ToRawFixed(x, intlObject.minimumFractionDigits, intlObject.maximumFractionDigits, intlObject.roundingIncrement, unsignedRoundingMode); break; default: let sResult = ToRawPrecision(x, intlObject.minimumSignificantDigits, intlObject.maximumSignificantDigits, unsignedRoundingMode); let fResult = ToRawFixed(x, intlObject.minimumFractionDigits, intlObject.maximumFractionDigits, intlObject.roundingIncrement, unsignedRoundingMode); if (intlObject.roundingType === "morePrecision") { if (sResult.roundingMagnitude <= fResult.roundingMagnitude) { result = sResult; } else { result = fResult; } } else { invariant(intlObject.roundingType === "lessPrecision", "Invalid roundingType"); if (sResult.roundingMagnitude <= fResult.roundingMagnitude) { result = fResult; } else { result = sResult; } } break; } x = result.roundedNumber; let string = result.formattedString; if (intlObject.trailingZeroDisplay === "stripIfInteger" && x.isInteger()) { let i = string.indexOf("."); if (i > -1) { string = string.slice(0, i); } } const int = result.integerDigitsCount; const minInteger = intlObject.minimumIntegerDigits; if (int < minInteger) { const forwardZeros = repeat("0", minInteger - int); string = forwardZeros + string; } if (sign === "negative") { if (x.isZero()) { x = NEGATIVE_ZERO; } else { x = x.negated(); } } return { roundedNumber: x, formattedString: string }; } // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/regex.generated.js var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD803[\uDD8E\uDD8F\uDED1-\uDED8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDC00-\uDCEF\uDCFA-\uDCFC\uDD00-\uDEB3\uDEBA-\uDED0\uDEE0-\uDEF0\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED8\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0-\uDCBB\uDCC0\uDCC1\uDCD0-\uDCD8\uDD00-\uDE57\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/; // node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/NumberFormat/format_to_parts.js var CARET_S_UNICODE_REGEX = new RegExp(`^${S_UNICODE_REGEX.source}`); var S_DOLLAR_UNICODE_REGEX = new RegExp(`${S_UNICODE_REGEX.source}$`); // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/CanonicalizeLocaleList.js function CanonicalizeLocaleList2(locales) { return Intl.getCanonicalLocales(locales); } // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/abstract/languageMatching.js var data = { supplemental: { languageMatching: { "written-new": [ { paradigmLocales: { _locales: "en en_GB es es_419 pt_BR pt_PT" } }, { $enUS: { _value: "AS+CA+GU+MH+MP+PH+PR+UM+US+VI" } }, { $cnsar: { _value: "HK+MO" } }, { $americas: { _value: "019" } }, { $maghreb: { _value: "MA+DZ+TN+LY+MR+EH" } }, { no: { _desired: "nb", _distance: "1" } }, { bs: { _desired: "hr", _distance: "4" } }, { bs: { _desired: "sh", _distance: "4" } }, { hr: { _desired: "sh", _distance: "4" } }, { sr: { _desired: "sh", _distance: "4" } }, { aa: { _desired: "ssy", _distance: "4" } }, { de: { _desired: "gsw", _distance: "4", _oneway: "true" } }, { de: { _desired: "lb", _distance: "4", _oneway: "true" } }, { no: { _desired: "da", _distance: "8" } },