@formatjs/intl-pluralrules 5.2.15 → 5.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/GetOperands.js +1 -2
- package/abstract/InitializePluralRules.js +1 -2
- package/abstract/ResolvePlural.js +1 -2
- package/get_internal_slots.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +6 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +7 -1
- package/package.json +6 -6
- package/polyfill.iife.js +222 -176
- package/should-polyfill.js +1 -2
package/abstract/GetOperands.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetOperands =
|
|
3
|
+
exports.GetOperands = GetOperands;
|
|
4
4
|
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
5
|
/**
|
|
6
6
|
* http://ecma-international.org/ecma-402/7.0/index.html#sec-getoperands
|
|
@@ -47,4 +47,3 @@ function GetOperands(s) {
|
|
|
47
47
|
FractionDigitsWithoutTrailing: t,
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
exports.GetOperands = GetOperands;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InitializePluralRules =
|
|
3
|
+
exports.InitializePluralRules = InitializePluralRules;
|
|
4
4
|
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
5
|
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
6
6
|
function InitializePluralRules(pl, locales, options, _a) {
|
|
@@ -18,4 +18,3 @@ function InitializePluralRules(pl, locales, options, _a) {
|
|
|
18
18
|
internalSlots.locale = r.locale;
|
|
19
19
|
return pl;
|
|
20
20
|
}
|
|
21
|
-
exports.InitializePluralRules = InitializePluralRules;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResolvePlural =
|
|
3
|
+
exports.ResolvePlural = ResolvePlural;
|
|
4
4
|
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
5
|
var GetOperands_1 = require("./GetOperands");
|
|
6
6
|
/**
|
|
@@ -24,4 +24,3 @@ function ResolvePlural(pl, n, _a) {
|
|
|
24
24
|
var operands = (0, GetOperands_1.GetOperands)(s);
|
|
25
25
|
return PluralRuleSelect(locale, type, n, operands);
|
|
26
26
|
}
|
|
27
|
-
exports.ResolvePlural = ResolvePlural;
|
package/get_internal_slots.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = getInternalSlots;
|
|
3
4
|
var internalSlotMap = new WeakMap();
|
|
4
5
|
function getInternalSlots(x) {
|
|
5
6
|
var internalSlots = internalSlotMap.get(x);
|
|
@@ -9,4 +10,3 @@ function getInternalSlots(x) {
|
|
|
9
10
|
}
|
|
10
11
|
return internalSlots;
|
|
11
12
|
}
|
|
12
|
-
exports.default = getInternalSlots;
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LDMLPluralRule,
|
|
1
|
+
import { LDMLPluralRule, NumberFormatDigitInternalSlots, PluralRulesData, PluralRulesLocaleData } from '@formatjs/ecma402-abstract';
|
|
2
2
|
export interface PluralRulesInternal extends NumberFormatDigitInternalSlots {
|
|
3
3
|
initializedPluralRules: boolean;
|
|
4
4
|
locale: string;
|
package/index.js
CHANGED
|
@@ -135,6 +135,12 @@ try {
|
|
|
135
135
|
enumerable: false,
|
|
136
136
|
configurable: true,
|
|
137
137
|
});
|
|
138
|
+
Object.defineProperty(PluralRules, 'name', {
|
|
139
|
+
value: 'PluralRules',
|
|
140
|
+
writable: false,
|
|
141
|
+
enumerable: false,
|
|
142
|
+
configurable: true,
|
|
143
|
+
});
|
|
138
144
|
}
|
|
139
145
|
catch (ex) {
|
|
140
146
|
// Meta fixes for test262
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LDMLPluralRule,
|
|
1
|
+
import { LDMLPluralRule, NumberFormatDigitInternalSlots, PluralRulesData, PluralRulesLocaleData } from '@formatjs/ecma402-abstract';
|
|
2
2
|
export interface PluralRulesInternal extends NumberFormatDigitInternalSlots {
|
|
3
3
|
initializedPluralRules: boolean;
|
|
4
4
|
locale: string;
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __spreadArray } from "tslib";
|
|
2
|
-
import { SupportedLocales, ToNumber,
|
|
2
|
+
import { CanonicalizeLocaleList, SupportedLocales, ToNumber, } from '@formatjs/ecma402-abstract';
|
|
3
3
|
import { InitializePluralRules } from './abstract/InitializePluralRules';
|
|
4
4
|
import { ResolvePlural } from './abstract/ResolvePlural';
|
|
5
5
|
import getInternalSlots from './get_internal_slots';
|
|
@@ -132,6 +132,12 @@ try {
|
|
|
132
132
|
enumerable: false,
|
|
133
133
|
configurable: true,
|
|
134
134
|
});
|
|
135
|
+
Object.defineProperty(PluralRules, 'name', {
|
|
136
|
+
value: 'PluralRules',
|
|
137
|
+
writable: false,
|
|
138
|
+
enumerable: false,
|
|
139
|
+
configurable: true,
|
|
140
|
+
});
|
|
135
141
|
}
|
|
136
142
|
catch (ex) {
|
|
137
143
|
// Meta fixes for test262
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-pluralrules",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.17",
|
|
4
4
|
"description": "Polyfill for Intl.PluralRules",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"polyfill",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"url": "git+https://github.com/formatjs/formatjs.git"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"tslib": "^2.
|
|
24
|
-
"@formatjs/
|
|
25
|
-
"@formatjs/
|
|
23
|
+
"tslib": "^2.7.0",
|
|
24
|
+
"@formatjs/intl-localematcher": "0.5.5",
|
|
25
|
+
"@formatjs/ecma402-abstract": "2.2.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@formatjs/intl-getcanonicallocales": "2.
|
|
29
|
-
"@formatjs/intl-locale": "4.0
|
|
28
|
+
"@formatjs/intl-getcanonicallocales": "2.4.0",
|
|
29
|
+
"@formatjs/intl-locale": "4.1.0"
|
|
30
30
|
},
|
|
31
31
|
"bugs": {
|
|
32
32
|
"url": "https://github.com/formatjs/formatjs/issues"
|
package/polyfill.iife.js
CHANGED
|
@@ -1,42 +1,17 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var p in b2)
|
|
8
|
-
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
9
|
-
d2[p] = b2[p];
|
|
10
|
-
};
|
|
11
|
-
return extendStatics(d, b);
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
+
var __publicField = (obj, key, value) => {
|
|
5
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
+
return value;
|
|
12
7
|
};
|
|
13
|
-
function __extends(d, b) {
|
|
14
|
-
if (typeof b !== "function" && b !== null)
|
|
15
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
16
|
-
extendStatics(d, b);
|
|
17
|
-
function __() {
|
|
18
|
-
this.constructor = d;
|
|
19
|
-
}
|
|
20
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
21
|
-
}
|
|
22
|
-
function __spreadArray(to, from, pack) {
|
|
23
|
-
if (pack || arguments.length === 2)
|
|
24
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
25
|
-
if (ar || !(i in from)) {
|
|
26
|
-
if (!ar)
|
|
27
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
28
|
-
ar[i] = from[i];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
32
|
-
}
|
|
33
8
|
|
|
34
|
-
//
|
|
9
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeLocaleList.js
|
|
35
10
|
function CanonicalizeLocaleList(locales) {
|
|
36
11
|
return Intl.getCanonicalLocales(locales);
|
|
37
12
|
}
|
|
38
13
|
|
|
39
|
-
//
|
|
14
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
|
|
40
15
|
function ToString(o) {
|
|
41
16
|
if (typeof o === "symbol") {
|
|
42
17
|
throw TypeError("Cannot convert a Symbol value to a string");
|
|
@@ -108,7 +83,7 @@
|
|
|
108
83
|
var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
|
|
109
84
|
var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
110
85
|
|
|
111
|
-
//
|
|
86
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CoerceOptionsToObject.js
|
|
112
87
|
function CoerceOptionsToObject(options) {
|
|
113
88
|
if (typeof options === "undefined") {
|
|
114
89
|
return /* @__PURE__ */ Object.create(null);
|
|
@@ -116,7 +91,7 @@
|
|
|
116
91
|
return ToObject(options);
|
|
117
92
|
}
|
|
118
93
|
|
|
119
|
-
//
|
|
94
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/DefaultNumberOption.js
|
|
120
95
|
function DefaultNumberOption(inputVal, min, max, fallback) {
|
|
121
96
|
if (inputVal === void 0) {
|
|
122
97
|
return fallback;
|
|
@@ -128,13 +103,13 @@
|
|
|
128
103
|
return Math.floor(val);
|
|
129
104
|
}
|
|
130
105
|
|
|
131
|
-
//
|
|
106
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetNumberOption.js
|
|
132
107
|
function GetNumberOption(options, property, minimum, maximum, fallback) {
|
|
133
108
|
var val = options[property];
|
|
134
109
|
return DefaultNumberOption(val, minimum, maximum, fallback);
|
|
135
110
|
}
|
|
136
111
|
|
|
137
|
-
//
|
|
112
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
|
|
138
113
|
function GetOption(opts, prop, type, values, fallback) {
|
|
139
114
|
if (typeof opts !== "object") {
|
|
140
115
|
throw new TypeError("Options must be an object");
|
|
@@ -160,7 +135,7 @@
|
|
|
160
135
|
return fallback;
|
|
161
136
|
}
|
|
162
137
|
|
|
163
|
-
//
|
|
138
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
|
|
164
139
|
var SANCTIONED_UNITS = [
|
|
165
140
|
"angle-degree",
|
|
166
141
|
"area-acre",
|
|
@@ -211,7 +186,39 @@
|
|
|
211
186
|
}
|
|
212
187
|
var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
|
|
213
188
|
|
|
214
|
-
//
|
|
189
|
+
// node_modules/.aspect_rules_js/tslib@2.8.0/node_modules/tslib/tslib.es6.mjs
|
|
190
|
+
var extendStatics = function(d, b) {
|
|
191
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
192
|
+
d2.__proto__ = b2;
|
|
193
|
+
} || function(d2, b2) {
|
|
194
|
+
for (var p in b2)
|
|
195
|
+
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
196
|
+
d2[p] = b2[p];
|
|
197
|
+
};
|
|
198
|
+
return extendStatics(d, b);
|
|
199
|
+
};
|
|
200
|
+
function __extends(d, b) {
|
|
201
|
+
if (typeof b !== "function" && b !== null)
|
|
202
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
203
|
+
extendStatics(d, b);
|
|
204
|
+
function __() {
|
|
205
|
+
this.constructor = d;
|
|
206
|
+
}
|
|
207
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
208
|
+
}
|
|
209
|
+
function __spreadArray(to, from, pack) {
|
|
210
|
+
if (pack || arguments.length === 2)
|
|
211
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
212
|
+
if (ar || !(i in from)) {
|
|
213
|
+
if (!ar)
|
|
214
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
215
|
+
ar[i] = from[i];
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/lib/index.js
|
|
215
222
|
function memoize(fn, options) {
|
|
216
223
|
var cache = options && options.cache ? options.cache : cacheDefault;
|
|
217
224
|
var serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
@@ -278,7 +285,7 @@
|
|
|
278
285
|
monadic: strategyMonadic
|
|
279
286
|
};
|
|
280
287
|
|
|
281
|
-
//
|
|
288
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
282
289
|
function getMagnitude(x) {
|
|
283
290
|
return Math.floor(Math.log(x) * Math.LOG10E);
|
|
284
291
|
}
|
|
@@ -351,7 +358,7 @@
|
|
|
351
358
|
strategy: strategies.variadic
|
|
352
359
|
});
|
|
353
360
|
|
|
354
|
-
//
|
|
361
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawPrecision.js
|
|
355
362
|
function ToRawPrecision(x, minPrecision, maxPrecision) {
|
|
356
363
|
var p = maxPrecision;
|
|
357
364
|
var m;
|
|
@@ -409,7 +416,7 @@
|
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
418
|
|
|
412
|
-
//
|
|
419
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawFixed.js
|
|
413
420
|
function ToRawFixed(x, minFraction, maxFraction) {
|
|
414
421
|
var f = maxFraction;
|
|
415
422
|
var n = Math.round(x * Math.pow(10, f));
|
|
@@ -449,7 +456,7 @@
|
|
|
449
456
|
return { formattedString: m, roundedNumber: xFinal, integerDigitsCount: int };
|
|
450
457
|
}
|
|
451
458
|
|
|
452
|
-
//
|
|
459
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToString.js
|
|
453
460
|
function FormatNumericToString(intlObject, x) {
|
|
454
461
|
var isNegative = x < 0 || SameValue(x, -0);
|
|
455
462
|
if (isNegative) {
|
|
@@ -485,19 +492,19 @@
|
|
|
485
492
|
return { roundedNumber: x, formattedString: string };
|
|
486
493
|
}
|
|
487
494
|
|
|
488
|
-
//
|
|
495
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
|
|
489
496
|
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\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-\u20BF\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-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\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-\uFBC1\uFDFC\uFDFD\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]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\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-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;
|
|
490
497
|
|
|
491
|
-
//
|
|
498
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js
|
|
492
499
|
var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source));
|
|
493
500
|
var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$"));
|
|
494
501
|
|
|
495
|
-
//
|
|
502
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeLocaleList.js
|
|
496
503
|
function CanonicalizeLocaleList2(locales) {
|
|
497
504
|
return Intl.getCanonicalLocales(locales);
|
|
498
505
|
}
|
|
499
506
|
|
|
500
|
-
//
|
|
507
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/languageMatching.js
|
|
501
508
|
var data = {
|
|
502
509
|
supplemental: {
|
|
503
510
|
languageMatching: {
|
|
@@ -3119,7 +3126,7 @@
|
|
|
3119
3126
|
}
|
|
3120
3127
|
};
|
|
3121
3128
|
|
|
3122
|
-
//
|
|
3129
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/regions.generated.js
|
|
3123
3130
|
var regions = {
|
|
3124
3131
|
"001": [
|
|
3125
3132
|
"001",
|
|
@@ -4454,7 +4461,7 @@
|
|
|
4454
4461
|
]
|
|
4455
4462
|
};
|
|
4456
4463
|
|
|
4457
|
-
//
|
|
4464
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js
|
|
4458
4465
|
var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
|
|
4459
4466
|
function invariant2(condition, message, Err) {
|
|
4460
4467
|
if (Err === void 0) {
|
|
@@ -4608,7 +4615,7 @@
|
|
|
4608
4615
|
return result;
|
|
4609
4616
|
}
|
|
4610
4617
|
|
|
4611
|
-
//
|
|
4618
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js
|
|
4612
4619
|
function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4613
4620
|
var foundLocale;
|
|
4614
4621
|
var extension;
|
|
@@ -4633,7 +4640,7 @@
|
|
|
4633
4640
|
};
|
|
4634
4641
|
}
|
|
4635
4642
|
|
|
4636
|
-
//
|
|
4643
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js
|
|
4637
4644
|
function BestAvailableLocale(availableLocales, locale) {
|
|
4638
4645
|
var candidate = locale;
|
|
4639
4646
|
while (true) {
|
|
@@ -4651,7 +4658,7 @@
|
|
|
4651
4658
|
}
|
|
4652
4659
|
}
|
|
4653
4660
|
|
|
4654
|
-
//
|
|
4661
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js
|
|
4655
4662
|
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4656
4663
|
var result = { locale: "" };
|
|
4657
4664
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4670,7 +4677,7 @@
|
|
|
4670
4677
|
return result;
|
|
4671
4678
|
}
|
|
4672
4679
|
|
|
4673
|
-
//
|
|
4680
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js
|
|
4674
4681
|
function UnicodeExtensionValue(extension, key) {
|
|
4675
4682
|
invariant2(key.length === 2, "key must have 2 elements");
|
|
4676
4683
|
var size = extension.length;
|
|
@@ -4709,7 +4716,7 @@
|
|
|
4709
4716
|
return void 0;
|
|
4710
4717
|
}
|
|
4711
4718
|
|
|
4712
|
-
//
|
|
4719
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js
|
|
4713
4720
|
function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
|
|
4714
4721
|
var matcher = options.localeMatcher;
|
|
4715
4722
|
var r;
|
|
@@ -4773,7 +4780,7 @@
|
|
|
4773
4780
|
return result;
|
|
4774
4781
|
}
|
|
4775
4782
|
|
|
4776
|
-
//
|
|
4783
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupSupportedLocales.js
|
|
4777
4784
|
function LookupSupportedLocales(availableLocales, requestedLocales) {
|
|
4778
4785
|
var subset = [];
|
|
4779
4786
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4787,7 +4794,7 @@
|
|
|
4787
4794
|
return subset;
|
|
4788
4795
|
}
|
|
4789
4796
|
|
|
4790
|
-
//
|
|
4797
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/index.js
|
|
4791
4798
|
function match(requestedLocales, availableLocales, defaultLocale, opts) {
|
|
4792
4799
|
return ResolveLocale(availableLocales, CanonicalizeLocaleList2(requestedLocales), {
|
|
4793
4800
|
localeMatcher: (opts === null || opts === void 0 ? void 0 : opts.algorithm) || "best fit"
|
|
@@ -4796,7 +4803,7 @@
|
|
|
4796
4803
|
}).locale;
|
|
4797
4804
|
}
|
|
4798
4805
|
|
|
4799
|
-
//
|
|
4806
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/SetNumberFormatDigitOptions.js
|
|
4800
4807
|
function SetNumberFormatDigitOptions(internalSlots, opts, mnfdDefault, mxfdDefault, notation) {
|
|
4801
4808
|
var mnid = GetNumberOption(opts, "minimumIntegerDigits", 1, 21, 1);
|
|
4802
4809
|
var mnfd = opts.minimumFractionDigits;
|
|
@@ -4863,7 +4870,7 @@
|
|
|
4863
4870
|
}
|
|
4864
4871
|
}
|
|
4865
4872
|
|
|
4866
|
-
//
|
|
4873
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/SupportedLocales.js
|
|
4867
4874
|
function SupportedLocales(availableLocales, requestedLocales, options) {
|
|
4868
4875
|
var matcher = "best fit";
|
|
4869
4876
|
if (options !== void 0) {
|
|
@@ -4876,7 +4883,7 @@
|
|
|
4876
4883
|
return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
|
|
4877
4884
|
}
|
|
4878
4885
|
|
|
4879
|
-
//
|
|
4886
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/data.js
|
|
4880
4887
|
var MissingLocaleDataError = (
|
|
4881
4888
|
/** @class */
|
|
4882
4889
|
function(_super) {
|
|
@@ -4890,7 +4897,7 @@
|
|
|
4890
4897
|
}(Error)
|
|
4891
4898
|
);
|
|
4892
4899
|
|
|
4893
|
-
//
|
|
4900
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js
|
|
4894
4901
|
var RangePatternType;
|
|
4895
4902
|
(function(RangePatternType2) {
|
|
4896
4903
|
RangePatternType2["startRange"] = "startRange";
|
|
@@ -4898,33 +4905,60 @@
|
|
|
4898
4905
|
RangePatternType2["endRange"] = "endRange";
|
|
4899
4906
|
})(RangePatternType || (RangePatternType = {}));
|
|
4900
4907
|
|
|
4901
|
-
//
|
|
4902
|
-
function InitializePluralRules(pl, locales, options,
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
+
// packages/intl-pluralrules/abstract/InitializePluralRules.ts
|
|
4909
|
+
function InitializePluralRules(pl, locales, options, {
|
|
4910
|
+
availableLocales,
|
|
4911
|
+
relevantExtensionKeys,
|
|
4912
|
+
localeData,
|
|
4913
|
+
getDefaultLocale,
|
|
4914
|
+
getInternalSlots: getInternalSlots2
|
|
4915
|
+
}) {
|
|
4916
|
+
const requestedLocales = CanonicalizeLocaleList(locales);
|
|
4917
|
+
const opt = /* @__PURE__ */ Object.create(null);
|
|
4918
|
+
const opts = CoerceOptionsToObject(options);
|
|
4919
|
+
const internalSlots = getInternalSlots2(pl);
|
|
4908
4920
|
internalSlots.initializedPluralRules = true;
|
|
4909
|
-
|
|
4921
|
+
const matcher = GetOption(
|
|
4922
|
+
opts,
|
|
4923
|
+
"localeMatcher",
|
|
4924
|
+
"string",
|
|
4925
|
+
["best fit", "lookup"],
|
|
4926
|
+
"best fit"
|
|
4927
|
+
);
|
|
4910
4928
|
opt.localeMatcher = matcher;
|
|
4911
|
-
internalSlots.type = GetOption(
|
|
4929
|
+
internalSlots.type = GetOption(
|
|
4930
|
+
opts,
|
|
4931
|
+
"type",
|
|
4932
|
+
"string",
|
|
4933
|
+
["cardinal", "ordinal"],
|
|
4934
|
+
"cardinal"
|
|
4935
|
+
);
|
|
4912
4936
|
SetNumberFormatDigitOptions(internalSlots, opts, 0, 3, "standard");
|
|
4913
|
-
|
|
4937
|
+
const r = ResolveLocale(
|
|
4938
|
+
availableLocales,
|
|
4939
|
+
requestedLocales,
|
|
4940
|
+
opt,
|
|
4941
|
+
relevantExtensionKeys,
|
|
4942
|
+
localeData,
|
|
4943
|
+
getDefaultLocale
|
|
4944
|
+
);
|
|
4914
4945
|
internalSlots.locale = r.locale;
|
|
4915
4946
|
return pl;
|
|
4916
4947
|
}
|
|
4917
4948
|
|
|
4918
|
-
//
|
|
4949
|
+
// packages/intl-pluralrules/abstract/GetOperands.ts
|
|
4919
4950
|
function GetOperands(s) {
|
|
4920
|
-
invariant(
|
|
4921
|
-
|
|
4951
|
+
invariant(
|
|
4952
|
+
typeof s === "string",
|
|
4953
|
+
`GetOperands should have been called with a string`
|
|
4954
|
+
);
|
|
4955
|
+
const n = ToNumber(s);
|
|
4922
4956
|
invariant(isFinite(n), "n should be finite");
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4957
|
+
let dp = s.indexOf(".");
|
|
4958
|
+
let iv;
|
|
4959
|
+
let f;
|
|
4960
|
+
let v;
|
|
4961
|
+
let fv = "";
|
|
4928
4962
|
if (dp === -1) {
|
|
4929
4963
|
iv = n;
|
|
4930
4964
|
f = 0;
|
|
@@ -4935,11 +4969,11 @@
|
|
|
4935
4969
|
f = ToNumber(fv);
|
|
4936
4970
|
v = fv.length;
|
|
4937
4971
|
}
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4972
|
+
const i = Math.abs(ToNumber(iv));
|
|
4973
|
+
let w;
|
|
4974
|
+
let t;
|
|
4941
4975
|
if (f !== 0) {
|
|
4942
|
-
|
|
4976
|
+
const ft = fv.replace(/0+$/, "");
|
|
4943
4977
|
w = ft.length;
|
|
4944
4978
|
t = ToNumber(ft);
|
|
4945
4979
|
} else {
|
|
@@ -4956,27 +4990,32 @@
|
|
|
4956
4990
|
};
|
|
4957
4991
|
}
|
|
4958
4992
|
|
|
4959
|
-
//
|
|
4960
|
-
function ResolvePlural(pl, n,
|
|
4961
|
-
|
|
4962
|
-
|
|
4993
|
+
// packages/intl-pluralrules/abstract/ResolvePlural.ts
|
|
4994
|
+
function ResolvePlural(pl, n, {
|
|
4995
|
+
getInternalSlots: getInternalSlots2,
|
|
4996
|
+
PluralRuleSelect: PluralRuleSelect2
|
|
4997
|
+
}) {
|
|
4998
|
+
const internalSlots = getInternalSlots2(pl);
|
|
4963
4999
|
invariant(Type(internalSlots) === "Object", "pl has to be an object");
|
|
4964
|
-
invariant(
|
|
5000
|
+
invariant(
|
|
5001
|
+
"initializedPluralRules" in internalSlots,
|
|
5002
|
+
"pluralrules must be initialized"
|
|
5003
|
+
);
|
|
4965
5004
|
invariant(Type(n) === "Number", "n must be a number");
|
|
4966
5005
|
if (!isFinite(n)) {
|
|
4967
5006
|
return "other";
|
|
4968
5007
|
}
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
5008
|
+
const { locale, type } = internalSlots;
|
|
5009
|
+
const res = FormatNumericToString(internalSlots, n);
|
|
5010
|
+
const s = res.formattedString;
|
|
5011
|
+
const operands = GetOperands(s);
|
|
4973
5012
|
return PluralRuleSelect2(locale, type, n, operands);
|
|
4974
5013
|
}
|
|
4975
5014
|
|
|
4976
|
-
//
|
|
5015
|
+
// packages/intl-pluralrules/get_internal_slots.ts
|
|
4977
5016
|
var internalSlotMap = /* @__PURE__ */ new WeakMap();
|
|
4978
5017
|
function getInternalSlots(x) {
|
|
4979
|
-
|
|
5018
|
+
let internalSlots = internalSlotMap.get(x);
|
|
4980
5019
|
if (!internalSlots) {
|
|
4981
5020
|
internalSlots = /* @__PURE__ */ Object.create(null);
|
|
4982
5021
|
internalSlotMap.set(x, internalSlots);
|
|
@@ -4984,90 +5023,94 @@
|
|
|
4984
5023
|
return internalSlots;
|
|
4985
5024
|
}
|
|
4986
5025
|
|
|
4987
|
-
//
|
|
5026
|
+
// packages/intl-pluralrules/index.ts
|
|
4988
5027
|
function validateInstance(instance, method) {
|
|
4989
5028
|
if (!(instance instanceof PluralRules)) {
|
|
4990
|
-
throw new TypeError(
|
|
5029
|
+
throw new TypeError(
|
|
5030
|
+
`Method Intl.PluralRules.prototype.${method} called on incompatible receiver ${String(
|
|
5031
|
+
instance
|
|
5032
|
+
)}`
|
|
5033
|
+
);
|
|
4991
5034
|
}
|
|
4992
5035
|
}
|
|
4993
|
-
function PluralRuleSelect(locale, type, _n,
|
|
4994
|
-
|
|
4995
|
-
|
|
5036
|
+
function PluralRuleSelect(locale, type, _n, { IntegerDigits, NumberOfFractionDigits, FractionDigits }) {
|
|
5037
|
+
return PluralRules.localeData[locale].fn(
|
|
5038
|
+
NumberOfFractionDigits ? `${IntegerDigits}.${FractionDigits}` : IntegerDigits,
|
|
5039
|
+
type === "ordinal"
|
|
5040
|
+
);
|
|
4996
5041
|
}
|
|
4997
|
-
var
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
if (!newTarget) {
|
|
5003
|
-
throw new TypeError("Intl.PluralRules must be called with 'new'");
|
|
5004
|
-
}
|
|
5005
|
-
return InitializePluralRules(this, locales, options, {
|
|
5006
|
-
availableLocales: PluralRules2.availableLocales,
|
|
5007
|
-
relevantExtensionKeys: PluralRules2.relevantExtensionKeys,
|
|
5008
|
-
localeData: PluralRules2.localeData,
|
|
5009
|
-
getDefaultLocale: PluralRules2.getDefaultLocale,
|
|
5010
|
-
getInternalSlots
|
|
5011
|
-
});
|
|
5042
|
+
var _PluralRules = class _PluralRules {
|
|
5043
|
+
constructor(locales, options) {
|
|
5044
|
+
const newTarget = this && this instanceof _PluralRules ? this.constructor : void 0;
|
|
5045
|
+
if (!newTarget) {
|
|
5046
|
+
throw new TypeError("Intl.PluralRules must be called with 'new'");
|
|
5012
5047
|
}
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
var n = ToNumber(val);
|
|
5038
|
-
return ResolvePlural(pr, n, { getInternalSlots, PluralRuleSelect });
|
|
5039
|
-
};
|
|
5040
|
-
PluralRules2.prototype.toString = function() {
|
|
5041
|
-
return "[object Intl.PluralRules]";
|
|
5042
|
-
};
|
|
5043
|
-
PluralRules2.supportedLocalesOf = function(locales, options) {
|
|
5044
|
-
return SupportedLocales(PluralRules2.availableLocales, CanonicalizeLocaleList(locales), options);
|
|
5045
|
-
};
|
|
5046
|
-
PluralRules2.__addLocaleData = function() {
|
|
5047
|
-
var data2 = [];
|
|
5048
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5049
|
-
data2[_i] = arguments[_i];
|
|
5048
|
+
return InitializePluralRules(this, locales, options, {
|
|
5049
|
+
availableLocales: _PluralRules.availableLocales,
|
|
5050
|
+
relevantExtensionKeys: _PluralRules.relevantExtensionKeys,
|
|
5051
|
+
localeData: _PluralRules.localeData,
|
|
5052
|
+
getDefaultLocale: _PluralRules.getDefaultLocale,
|
|
5053
|
+
getInternalSlots
|
|
5054
|
+
});
|
|
5055
|
+
}
|
|
5056
|
+
resolvedOptions() {
|
|
5057
|
+
validateInstance(this, "resolvedOptions");
|
|
5058
|
+
const opts = /* @__PURE__ */ Object.create(null);
|
|
5059
|
+
const internalSlots = getInternalSlots(this);
|
|
5060
|
+
opts.locale = internalSlots.locale;
|
|
5061
|
+
opts.type = internalSlots.type;
|
|
5062
|
+
[
|
|
5063
|
+
"minimumIntegerDigits",
|
|
5064
|
+
"minimumFractionDigits",
|
|
5065
|
+
"maximumFractionDigits",
|
|
5066
|
+
"minimumSignificantDigits",
|
|
5067
|
+
"maximumSignificantDigits"
|
|
5068
|
+
].forEach((field) => {
|
|
5069
|
+
const val = internalSlots[field];
|
|
5070
|
+
if (val !== void 0) {
|
|
5071
|
+
opts[field] = val;
|
|
5050
5072
|
}
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5073
|
+
});
|
|
5074
|
+
opts.pluralCategories = [
|
|
5075
|
+
..._PluralRules.localeData[opts.locale].categories[opts.type]
|
|
5076
|
+
];
|
|
5077
|
+
return opts;
|
|
5078
|
+
}
|
|
5079
|
+
select(val) {
|
|
5080
|
+
const pr = this;
|
|
5081
|
+
validateInstance(pr, "select");
|
|
5082
|
+
const n = ToNumber(val);
|
|
5083
|
+
return ResolvePlural(pr, n, { getInternalSlots, PluralRuleSelect });
|
|
5084
|
+
}
|
|
5085
|
+
toString() {
|
|
5086
|
+
return "[object Intl.PluralRules]";
|
|
5087
|
+
}
|
|
5088
|
+
static supportedLocalesOf(locales, options) {
|
|
5089
|
+
return SupportedLocales(
|
|
5090
|
+
_PluralRules.availableLocales,
|
|
5091
|
+
CanonicalizeLocaleList(locales),
|
|
5092
|
+
options
|
|
5093
|
+
);
|
|
5094
|
+
}
|
|
5095
|
+
static __addLocaleData(...data2) {
|
|
5096
|
+
for (const { data: d, locale } of data2) {
|
|
5097
|
+
_PluralRules.localeData[locale] = d;
|
|
5098
|
+
_PluralRules.availableLocales.add(locale);
|
|
5099
|
+
if (!_PluralRules.__defaultLocale) {
|
|
5100
|
+
_PluralRules.__defaultLocale = locale;
|
|
5058
5101
|
}
|
|
5059
|
-
}
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5104
|
+
static getDefaultLocale() {
|
|
5105
|
+
return _PluralRules.__defaultLocale;
|
|
5106
|
+
}
|
|
5107
|
+
};
|
|
5108
|
+
__publicField(_PluralRules, "localeData", {});
|
|
5109
|
+
__publicField(_PluralRules, "availableLocales", /* @__PURE__ */ new Set());
|
|
5110
|
+
__publicField(_PluralRules, "__defaultLocale", "");
|
|
5111
|
+
__publicField(_PluralRules, "relevantExtensionKeys", []);
|
|
5112
|
+
__publicField(_PluralRules, "polyfilled", true);
|
|
5113
|
+
var PluralRules = _PluralRules;
|
|
5071
5114
|
try {
|
|
5072
5115
|
if (typeof Symbol !== "undefined") {
|
|
5073
5116
|
Object.defineProperty(PluralRules.prototype, Symbol.toStringTag, {
|
|
@@ -5098,30 +5141,33 @@
|
|
|
5098
5141
|
enumerable: false,
|
|
5099
5142
|
configurable: true
|
|
5100
5143
|
});
|
|
5144
|
+
Object.defineProperty(PluralRules, "name", {
|
|
5145
|
+
value: "PluralRules",
|
|
5146
|
+
writable: false,
|
|
5147
|
+
enumerable: false,
|
|
5148
|
+
configurable: true
|
|
5149
|
+
});
|
|
5101
5150
|
} catch (ex) {
|
|
5102
5151
|
}
|
|
5103
5152
|
|
|
5104
|
-
//
|
|
5153
|
+
// packages/intl-pluralrules/supported-locales.generated.ts
|
|
5105
5154
|
var supportedLocales = ["af", "ak", "am", "an", "ar", "ars", "as", "asa", "ast", "az", "bal", "be", "bem", "bez", "bg", "bho", "bm", "bn", "bo", "br", "brx", "bs", "ca", "ce", "ceb", "cgg", "chr", "ckb", "cs", "cy", "da", "de", "doi", "dsb", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fil", "fo", "fr", "fur", "fy", "ga", "gd", "gl", "gsw", "gu", "guw", "gv", "ha", "haw", "he", "hi", "hnj", "hr", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "io", "is", "it", "iu", "ja", "jbo", "jgo", "jmc", "jv", "jw", "ka", "kab", "kaj", "kcg", "kde", "kea", "kk", "kkj", "kl", "km", "kn", "ko", "ks", "ksb", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lij", "lkt", "ln", "lo", "lt", "lv", "mas", "mg", "mgo", "mk", "ml", "mn", "mo", "mr", "ms", "mt", "my", "nah", "naq", "nb", "nd", "ne", "nl", "nn", "nnh", "no", "nqo", "nr", "nso", "ny", "nyn", "om", "or", "os", "osa", "pa", "pap", "pcm", "pl", "prg", "ps", "pt", "pt-PT", "rm", "ro", "rof", "ru", "rwk", "sah", "saq", "sat", "sc", "scn", "sd", "sdh", "se", "seh", "ses", "sg", "sh", "shi", "si", "sk", "sl", "sma", "smi", "smj", "smn", "sms", "sn", "so", "sq", "sr", "ss", "ssy", "st", "su", "sv", "sw", "syr", "ta", "te", "teo", "th", "ti", "tig", "tk", "tl", "tn", "to", "tpi", "tr", "ts", "tzm", "ug", "uk", "und", "ur", "uz", "ve", "vi", "vo", "vun", "wa", "wae", "wo", "xh", "xog", "yi", "yo", "yue", "zh", "zu"];
|
|
5106
5155
|
|
|
5107
|
-
//
|
|
5156
|
+
// packages/intl-pluralrules/should-polyfill.ts
|
|
5108
5157
|
function supportedLocalesOf(locale) {
|
|
5109
5158
|
if (!locale) {
|
|
5110
5159
|
return true;
|
|
5111
5160
|
}
|
|
5112
|
-
|
|
5161
|
+
const locales = Array.isArray(locale) ? locale : [locale];
|
|
5113
5162
|
return Intl.PluralRules.supportedLocalesOf(locales).length === locales.length;
|
|
5114
5163
|
}
|
|
5115
|
-
function shouldPolyfill(locale) {
|
|
5116
|
-
if (locale === void 0) {
|
|
5117
|
-
locale = "en";
|
|
5118
|
-
}
|
|
5164
|
+
function shouldPolyfill(locale = "en") {
|
|
5119
5165
|
if (!("PluralRules" in Intl) || new Intl.PluralRules("en", { minimumFractionDigits: 2 }).select(1) === "one" || !supportedLocalesOf(locale)) {
|
|
5120
5166
|
return locale ? match([locale], supportedLocales, "en") : void 0;
|
|
5121
5167
|
}
|
|
5122
5168
|
}
|
|
5123
5169
|
|
|
5124
|
-
//
|
|
5170
|
+
// packages/intl-pluralrules/polyfill.ts
|
|
5125
5171
|
if (shouldPolyfill()) {
|
|
5126
5172
|
Object.defineProperty(Intl, "PluralRules", {
|
|
5127
5173
|
value: PluralRules,
|
package/should-polyfill.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shouldPolyfill =
|
|
3
|
+
exports.shouldPolyfill = shouldPolyfill;
|
|
4
4
|
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
5
5
|
var supported_locales_generated_1 = require("./supported-locales.generated");
|
|
6
6
|
function supportedLocalesOf(locale) {
|
|
@@ -19,4 +19,3 @@ function shouldPolyfill(locale) {
|
|
|
19
19
|
return locale ? (0, intl_localematcher_1.match)([locale], supported_locales_generated_1.supportedLocales, 'en') : undefined;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
exports.shouldPolyfill = shouldPolyfill;
|