@formatjs/intl-displaynames 6.6.8 → 6.6.10
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CanonicalCodeForDisplayNames =
|
|
3
|
+
exports.CanonicalCodeForDisplayNames = CanonicalCodeForDisplayNames;
|
|
4
4
|
var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
|
|
5
5
|
var IsValidDateTimeFieldCode_1 = require("./IsValidDateTimeFieldCode");
|
|
6
6
|
var UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
|
|
@@ -49,4 +49,3 @@ function CanonicalCodeForDisplayNames(type, code) {
|
|
|
49
49
|
}
|
|
50
50
|
return code.toUpperCase();
|
|
51
51
|
}
|
|
52
|
-
exports.CanonicalCodeForDisplayNames = CanonicalCodeForDisplayNames;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IsValidDateTimeFieldCode =
|
|
3
|
+
exports.IsValidDateTimeFieldCode = IsValidDateTimeFieldCode;
|
|
4
4
|
var CODES_FOR_DATE_TIME_FIELD = [
|
|
5
5
|
'era',
|
|
6
6
|
'year',
|
|
@@ -18,4 +18,3 @@ var CODES_FOR_DATE_TIME_FIELD = [
|
|
|
18
18
|
function IsValidDateTimeFieldCode(field) {
|
|
19
19
|
return CODES_FOR_DATE_TIME_FIELD.indexOf(field) >= 0;
|
|
20
20
|
}
|
|
21
|
-
exports.IsValidDateTimeFieldCode = IsValidDateTimeFieldCode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/intl-displaynames",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.10",
|
|
4
4
|
"description": "Polyfill for: https://tc39.es/proposal-intl-displaynames",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"i18n",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"url": "git+https://github.com/formatjs/formatjs.git"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"tslib": "^2.
|
|
25
|
-
"@formatjs/
|
|
26
|
-
"@formatjs/
|
|
24
|
+
"tslib": "^2.7.0",
|
|
25
|
+
"@formatjs/ecma402-abstract": "2.2.0",
|
|
26
|
+
"@formatjs/intl-localematcher": "0.5.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@formatjs/intl-getcanonicallocales": "2.3.
|
|
30
|
-
"@formatjs/intl-locale": "4.0.
|
|
29
|
+
"@formatjs/intl-getcanonicallocales": "2.3.1",
|
|
30
|
+
"@formatjs/intl-locale": "4.0.2"
|
|
31
31
|
},
|
|
32
32
|
"bugs": {
|
|
33
33
|
"url": "https://github.com/formatjs/formatjs/issues"
|
package/polyfill.iife.js
CHANGED
|
@@ -1,54 +1,31 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
var __assign = function() {
|
|
23
|
-
__assign = Object.assign || function __assign2(t) {
|
|
24
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
-
s = arguments[i];
|
|
26
|
-
for (var p in s)
|
|
27
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
28
|
-
t[p] = s[p];
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
+
var __spreadValues = (a, b) => {
|
|
8
|
+
for (var prop in b || (b = {}))
|
|
9
|
+
if (__hasOwnProp.call(b, prop))
|
|
10
|
+
__defNormalProp(a, prop, b[prop]);
|
|
11
|
+
if (__getOwnPropSymbols)
|
|
12
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
+
if (__propIsEnum.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
29
15
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
16
|
+
return a;
|
|
17
|
+
};
|
|
18
|
+
var __publicField = (obj, key, value) => {
|
|
19
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
20
|
+
return value;
|
|
33
21
|
};
|
|
34
|
-
function __spreadArray(to, from, pack) {
|
|
35
|
-
if (pack || arguments.length === 2)
|
|
36
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
37
|
-
if (ar || !(i in from)) {
|
|
38
|
-
if (!ar)
|
|
39
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
40
|
-
ar[i] = from[i];
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
44
|
-
}
|
|
45
22
|
|
|
46
|
-
//
|
|
23
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeLocaleList.js
|
|
47
24
|
function CanonicalizeLocaleList(locales) {
|
|
48
25
|
return Intl.getCanonicalLocales(locales);
|
|
49
26
|
}
|
|
50
27
|
|
|
51
|
-
//
|
|
28
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/262.js
|
|
52
29
|
function ToString(o) {
|
|
53
30
|
if (typeof o === "symbol") {
|
|
54
31
|
throw TypeError("Cannot convert a Symbol value to a string");
|
|
@@ -67,7 +44,7 @@
|
|
|
67
44
|
var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
|
|
68
45
|
var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
69
46
|
|
|
70
|
-
//
|
|
47
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOption.js
|
|
71
48
|
function GetOption(opts, prop, type, values, fallback) {
|
|
72
49
|
if (typeof opts !== "object") {
|
|
73
50
|
throw new TypeError("Options must be an object");
|
|
@@ -93,7 +70,7 @@
|
|
|
93
70
|
return fallback;
|
|
94
71
|
}
|
|
95
72
|
|
|
96
|
-
//
|
|
73
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js
|
|
97
74
|
function GetOptionsObject(options) {
|
|
98
75
|
if (typeof options === "undefined") {
|
|
99
76
|
return /* @__PURE__ */ Object.create(null);
|
|
@@ -104,7 +81,7 @@
|
|
|
104
81
|
throw new TypeError("Options must be an object");
|
|
105
82
|
}
|
|
106
83
|
|
|
107
|
-
//
|
|
84
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js
|
|
108
85
|
var SANCTIONED_UNITS = [
|
|
109
86
|
"angle-degree",
|
|
110
87
|
"area-acre",
|
|
@@ -155,7 +132,7 @@
|
|
|
155
132
|
}
|
|
156
133
|
var SIMPLE_UNITS = SANCTIONED_UNITS.map(removeUnitNamespace);
|
|
157
134
|
|
|
158
|
-
//
|
|
135
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedCurrencyCode.js
|
|
159
136
|
function toUpperCase(str) {
|
|
160
137
|
return str.replace(/([a-z])/g, function(_, c) {
|
|
161
138
|
return c.toUpperCase();
|
|
@@ -173,7 +150,106 @@
|
|
|
173
150
|
return true;
|
|
174
151
|
}
|
|
175
152
|
|
|
176
|
-
//
|
|
153
|
+
// node_modules/.aspect_rules_js/tslib@2.7.0/node_modules/tslib/tslib.es6.mjs
|
|
154
|
+
var extendStatics = function(d, b) {
|
|
155
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
156
|
+
d2.__proto__ = b2;
|
|
157
|
+
} || function(d2, b2) {
|
|
158
|
+
for (var p in b2)
|
|
159
|
+
if (Object.prototype.hasOwnProperty.call(b2, p))
|
|
160
|
+
d2[p] = b2[p];
|
|
161
|
+
};
|
|
162
|
+
return extendStatics(d, b);
|
|
163
|
+
};
|
|
164
|
+
function __extends(d, b) {
|
|
165
|
+
if (typeof b !== "function" && b !== null)
|
|
166
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
167
|
+
extendStatics(d, b);
|
|
168
|
+
function __() {
|
|
169
|
+
this.constructor = d;
|
|
170
|
+
}
|
|
171
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
172
|
+
}
|
|
173
|
+
function __spreadArray(to, from, pack) {
|
|
174
|
+
if (pack || arguments.length === 2)
|
|
175
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
176
|
+
if (ar || !(i in from)) {
|
|
177
|
+
if (!ar)
|
|
178
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
179
|
+
ar[i] = from[i];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/lib/index.js
|
|
186
|
+
function memoize(fn, options) {
|
|
187
|
+
var cache = options && options.cache ? options.cache : cacheDefault;
|
|
188
|
+
var serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
189
|
+
var strategy = options && options.strategy ? options.strategy : strategyDefault;
|
|
190
|
+
return strategy(fn, {
|
|
191
|
+
cache,
|
|
192
|
+
serializer
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function isPrimitive(value) {
|
|
196
|
+
return value == null || typeof value === "number" || typeof value === "boolean";
|
|
197
|
+
}
|
|
198
|
+
function monadic(fn, cache, serializer, arg) {
|
|
199
|
+
var cacheKey = isPrimitive(arg) ? arg : serializer(arg);
|
|
200
|
+
var computedValue = cache.get(cacheKey);
|
|
201
|
+
if (typeof computedValue === "undefined") {
|
|
202
|
+
computedValue = fn.call(this, arg);
|
|
203
|
+
cache.set(cacheKey, computedValue);
|
|
204
|
+
}
|
|
205
|
+
return computedValue;
|
|
206
|
+
}
|
|
207
|
+
function variadic(fn, cache, serializer) {
|
|
208
|
+
var args = Array.prototype.slice.call(arguments, 3);
|
|
209
|
+
var cacheKey = serializer(args);
|
|
210
|
+
var computedValue = cache.get(cacheKey);
|
|
211
|
+
if (typeof computedValue === "undefined") {
|
|
212
|
+
computedValue = fn.apply(this, args);
|
|
213
|
+
cache.set(cacheKey, computedValue);
|
|
214
|
+
}
|
|
215
|
+
return computedValue;
|
|
216
|
+
}
|
|
217
|
+
function assemble(fn, context, strategy, cache, serialize) {
|
|
218
|
+
return strategy.bind(context, fn, cache, serialize);
|
|
219
|
+
}
|
|
220
|
+
function strategyDefault(fn, options) {
|
|
221
|
+
var strategy = fn.length === 1 ? monadic : variadic;
|
|
222
|
+
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
|
|
223
|
+
}
|
|
224
|
+
function strategyVariadic(fn, options) {
|
|
225
|
+
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
|
|
226
|
+
}
|
|
227
|
+
function strategyMonadic(fn, options) {
|
|
228
|
+
return assemble(fn, this, monadic, options.cache.create(), options.serializer);
|
|
229
|
+
}
|
|
230
|
+
var serializerDefault = function() {
|
|
231
|
+
return JSON.stringify(arguments);
|
|
232
|
+
};
|
|
233
|
+
function ObjectWithoutPrototypeCache() {
|
|
234
|
+
this.cache = /* @__PURE__ */ Object.create(null);
|
|
235
|
+
}
|
|
236
|
+
ObjectWithoutPrototypeCache.prototype.get = function(key) {
|
|
237
|
+
return this.cache[key];
|
|
238
|
+
};
|
|
239
|
+
ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
|
|
240
|
+
this.cache[key] = value;
|
|
241
|
+
};
|
|
242
|
+
var cacheDefault = {
|
|
243
|
+
create: function create() {
|
|
244
|
+
return new ObjectWithoutPrototypeCache();
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
var strategies = {
|
|
248
|
+
variadic: strategyVariadic,
|
|
249
|
+
monadic: strategyMonadic
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/utils.js
|
|
177
253
|
function setInternalSlot(map, pl, field, value) {
|
|
178
254
|
if (!map.get(pl)) {
|
|
179
255
|
map.set(pl, /* @__PURE__ */ Object.create(null));
|
|
@@ -206,20 +282,70 @@
|
|
|
206
282
|
throw new Err(message);
|
|
207
283
|
}
|
|
208
284
|
}
|
|
285
|
+
var createMemoizedNumberFormat = memoize(function() {
|
|
286
|
+
var _a;
|
|
287
|
+
var args = [];
|
|
288
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
289
|
+
args[_i] = arguments[_i];
|
|
290
|
+
}
|
|
291
|
+
return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
292
|
+
}, {
|
|
293
|
+
strategy: strategies.variadic
|
|
294
|
+
});
|
|
295
|
+
var createMemoizedDateTimeFormat = memoize(function() {
|
|
296
|
+
var _a;
|
|
297
|
+
var args = [];
|
|
298
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
299
|
+
args[_i] = arguments[_i];
|
|
300
|
+
}
|
|
301
|
+
return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
302
|
+
}, {
|
|
303
|
+
strategy: strategies.variadic
|
|
304
|
+
});
|
|
305
|
+
var createMemoizedPluralRules = memoize(function() {
|
|
306
|
+
var _a;
|
|
307
|
+
var args = [];
|
|
308
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
309
|
+
args[_i] = arguments[_i];
|
|
310
|
+
}
|
|
311
|
+
return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
312
|
+
}, {
|
|
313
|
+
strategy: strategies.variadic
|
|
314
|
+
});
|
|
315
|
+
var createMemoizedLocale = memoize(function() {
|
|
316
|
+
var _a;
|
|
317
|
+
var args = [];
|
|
318
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
319
|
+
args[_i] = arguments[_i];
|
|
320
|
+
}
|
|
321
|
+
return new ((_a = Intl.Locale).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
322
|
+
}, {
|
|
323
|
+
strategy: strategies.variadic
|
|
324
|
+
});
|
|
325
|
+
var createMemoizedListFormat = memoize(function() {
|
|
326
|
+
var _a;
|
|
327
|
+
var args = [];
|
|
328
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
329
|
+
args[_i] = arguments[_i];
|
|
330
|
+
}
|
|
331
|
+
return new ((_a = Intl.ListFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();
|
|
332
|
+
}, {
|
|
333
|
+
strategy: strategies.variadic
|
|
334
|
+
});
|
|
209
335
|
|
|
210
|
-
//
|
|
336
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js
|
|
211
337
|
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]/;
|
|
212
338
|
|
|
213
|
-
//
|
|
339
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js
|
|
214
340
|
var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source));
|
|
215
341
|
var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$"));
|
|
216
342
|
|
|
217
|
-
//
|
|
343
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeLocaleList.js
|
|
218
344
|
function CanonicalizeLocaleList2(locales) {
|
|
219
345
|
return Intl.getCanonicalLocales(locales);
|
|
220
346
|
}
|
|
221
347
|
|
|
222
|
-
//
|
|
348
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/languageMatching.js
|
|
223
349
|
var data = {
|
|
224
350
|
supplemental: {
|
|
225
351
|
languageMatching: {
|
|
@@ -2841,7 +2967,7 @@
|
|
|
2841
2967
|
}
|
|
2842
2968
|
};
|
|
2843
2969
|
|
|
2844
|
-
//
|
|
2970
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/regions.generated.js
|
|
2845
2971
|
var regions = {
|
|
2846
2972
|
"001": [
|
|
2847
2973
|
"001",
|
|
@@ -4176,7 +4302,7 @@
|
|
|
4176
4302
|
]
|
|
4177
4303
|
};
|
|
4178
4304
|
|
|
4179
|
-
//
|
|
4305
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js
|
|
4180
4306
|
var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
|
|
4181
4307
|
function invariant2(condition, message, Err) {
|
|
4182
4308
|
if (Err === void 0) {
|
|
@@ -4330,7 +4456,7 @@
|
|
|
4330
4456
|
return result;
|
|
4331
4457
|
}
|
|
4332
4458
|
|
|
4333
|
-
//
|
|
4459
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js
|
|
4334
4460
|
function BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4335
4461
|
var foundLocale;
|
|
4336
4462
|
var extension;
|
|
@@ -4355,7 +4481,7 @@
|
|
|
4355
4481
|
};
|
|
4356
4482
|
}
|
|
4357
4483
|
|
|
4358
|
-
//
|
|
4484
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js
|
|
4359
4485
|
function BestAvailableLocale(availableLocales, locale) {
|
|
4360
4486
|
var candidate = locale;
|
|
4361
4487
|
while (true) {
|
|
@@ -4373,7 +4499,7 @@
|
|
|
4373
4499
|
}
|
|
4374
4500
|
}
|
|
4375
4501
|
|
|
4376
|
-
//
|
|
4502
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js
|
|
4377
4503
|
function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
|
|
4378
4504
|
var result = { locale: "" };
|
|
4379
4505
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4392,7 +4518,7 @@
|
|
|
4392
4518
|
return result;
|
|
4393
4519
|
}
|
|
4394
4520
|
|
|
4395
|
-
//
|
|
4521
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js
|
|
4396
4522
|
function UnicodeExtensionValue(extension, key) {
|
|
4397
4523
|
invariant2(key.length === 2, "key must have 2 elements");
|
|
4398
4524
|
var size = extension.length;
|
|
@@ -4431,7 +4557,7 @@
|
|
|
4431
4557
|
return void 0;
|
|
4432
4558
|
}
|
|
4433
4559
|
|
|
4434
|
-
//
|
|
4560
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js
|
|
4435
4561
|
function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
|
|
4436
4562
|
var matcher = options.localeMatcher;
|
|
4437
4563
|
var r;
|
|
@@ -4495,7 +4621,7 @@
|
|
|
4495
4621
|
return result;
|
|
4496
4622
|
}
|
|
4497
4623
|
|
|
4498
|
-
//
|
|
4624
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/LookupSupportedLocales.js
|
|
4499
4625
|
function LookupSupportedLocales(availableLocales, requestedLocales) {
|
|
4500
4626
|
var subset = [];
|
|
4501
4627
|
for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
|
|
@@ -4509,7 +4635,7 @@
|
|
|
4509
4635
|
return subset;
|
|
4510
4636
|
}
|
|
4511
4637
|
|
|
4512
|
-
//
|
|
4638
|
+
// node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/index.js
|
|
4513
4639
|
function match(requestedLocales, availableLocales, defaultLocale, opts) {
|
|
4514
4640
|
return ResolveLocale(availableLocales, CanonicalizeLocaleList2(requestedLocales), {
|
|
4515
4641
|
localeMatcher: (opts === null || opts === void 0 ? void 0 : opts.algorithm) || "best fit"
|
|
@@ -4518,7 +4644,7 @@
|
|
|
4518
4644
|
}).locale;
|
|
4519
4645
|
}
|
|
4520
4646
|
|
|
4521
|
-
//
|
|
4647
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/SupportedLocales.js
|
|
4522
4648
|
function SupportedLocales(availableLocales, requestedLocales, options) {
|
|
4523
4649
|
var matcher = "best fit";
|
|
4524
4650
|
if (options !== void 0) {
|
|
@@ -4531,7 +4657,7 @@
|
|
|
4531
4657
|
return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
|
|
4532
4658
|
}
|
|
4533
4659
|
|
|
4534
|
-
//
|
|
4660
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/data.js
|
|
4535
4661
|
var MissingLocaleDataError = (
|
|
4536
4662
|
/** @class */
|
|
4537
4663
|
function(_super) {
|
|
@@ -4545,7 +4671,7 @@
|
|
|
4545
4671
|
}(Error)
|
|
4546
4672
|
);
|
|
4547
4673
|
|
|
4548
|
-
//
|
|
4674
|
+
// node_modules/.aspect_rules_js/@formatjs+ecma402-abstract@0.0.0/node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js
|
|
4549
4675
|
var RangePatternType;
|
|
4550
4676
|
(function(RangePatternType2) {
|
|
4551
4677
|
RangePatternType2["startRange"] = "startRange";
|
|
@@ -4553,7 +4679,7 @@
|
|
|
4553
4679
|
RangePatternType2["endRange"] = "endRange";
|
|
4554
4680
|
})(RangePatternType || (RangePatternType = {}));
|
|
4555
4681
|
|
|
4556
|
-
//
|
|
4682
|
+
// packages/intl-displaynames/abstract/IsValidDateTimeFieldCode.ts
|
|
4557
4683
|
var CODES_FOR_DATE_TIME_FIELD = [
|
|
4558
4684
|
"era",
|
|
4559
4685
|
"year",
|
|
@@ -4572,7 +4698,7 @@
|
|
|
4572
4698
|
return CODES_FOR_DATE_TIME_FIELD.indexOf(field) >= 0;
|
|
4573
4699
|
}
|
|
4574
4700
|
|
|
4575
|
-
//
|
|
4701
|
+
// packages/intl-displaynames/abstract/CanonicalCodeForDisplayNames.ts
|
|
4576
4702
|
var UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
|
|
4577
4703
|
var ALPHA_4 = /^[a-z]{4}$/i;
|
|
4578
4704
|
var UNICODE_TYPE_REGEX = /^[a-z0-9]{3,8}([-_][a-z0-9]{3,8})*$/i;
|
|
@@ -4599,7 +4725,7 @@
|
|
|
4599
4725
|
if (!isUnicodeScriptSubtag(code)) {
|
|
4600
4726
|
throw RangeError("invalid script");
|
|
4601
4727
|
}
|
|
4602
|
-
return
|
|
4728
|
+
return `${code[0].toUpperCase()}${code.slice(1).toLowerCase()}`;
|
|
4603
4729
|
}
|
|
4604
4730
|
if (type === "calendar") {
|
|
4605
4731
|
if (!isUnicodeLocaleIdentifierType(code)) {
|
|
@@ -4620,120 +4746,179 @@
|
|
|
4620
4746
|
return code.toUpperCase();
|
|
4621
4747
|
}
|
|
4622
4748
|
|
|
4623
|
-
//
|
|
4624
|
-
var
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4749
|
+
// packages/intl-displaynames/index.ts
|
|
4750
|
+
var _DisplayNames = class _DisplayNames {
|
|
4751
|
+
constructor(locales, options) {
|
|
4752
|
+
if (new.target === void 0) {
|
|
4753
|
+
throw TypeError(`Constructor Intl.DisplayNames requires 'new'`);
|
|
4754
|
+
}
|
|
4755
|
+
const requestedLocales = CanonicalizeLocaleList(locales);
|
|
4756
|
+
options = GetOptionsObject(options);
|
|
4757
|
+
const opt = /* @__PURE__ */ Object.create(null);
|
|
4758
|
+
const { localeData } = _DisplayNames;
|
|
4759
|
+
const matcher = GetOption(
|
|
4760
|
+
options,
|
|
4761
|
+
"localeMatcher",
|
|
4762
|
+
"string",
|
|
4763
|
+
["lookup", "best fit"],
|
|
4764
|
+
"best fit"
|
|
4765
|
+
);
|
|
4766
|
+
opt.localeMatcher = matcher;
|
|
4767
|
+
const r = ResolveLocale(
|
|
4768
|
+
Array.from(_DisplayNames.availableLocales),
|
|
4769
|
+
requestedLocales,
|
|
4770
|
+
opt,
|
|
4771
|
+
[],
|
|
4772
|
+
// there is no relevantExtensionKeys
|
|
4773
|
+
_DisplayNames.localeData,
|
|
4774
|
+
_DisplayNames.getDefaultLocale
|
|
4775
|
+
);
|
|
4776
|
+
const style = GetOption(
|
|
4777
|
+
options,
|
|
4778
|
+
"style",
|
|
4779
|
+
"string",
|
|
4780
|
+
["narrow", "short", "long"],
|
|
4781
|
+
"long"
|
|
4782
|
+
);
|
|
4783
|
+
setSlot(this, "style", style);
|
|
4784
|
+
const type = GetOption(
|
|
4785
|
+
options,
|
|
4786
|
+
"type",
|
|
4787
|
+
"string",
|
|
4788
|
+
["language", "region", "script", "currency", "calendar", "dateTimeField"],
|
|
4789
|
+
void 0
|
|
4790
|
+
);
|
|
4791
|
+
if (type === void 0) {
|
|
4792
|
+
throw TypeError(`Intl.DisplayNames constructor requires "type" option`);
|
|
4793
|
+
}
|
|
4794
|
+
setSlot(this, "type", type);
|
|
4795
|
+
const fallback = GetOption(
|
|
4796
|
+
options,
|
|
4797
|
+
"fallback",
|
|
4798
|
+
"string",
|
|
4799
|
+
["code", "none"],
|
|
4800
|
+
"code"
|
|
4801
|
+
);
|
|
4802
|
+
setSlot(this, "fallback", fallback);
|
|
4803
|
+
setSlot(this, "locale", r.locale);
|
|
4804
|
+
const { dataLocale } = r;
|
|
4805
|
+
const dataLocaleData = localeData[dataLocale];
|
|
4806
|
+
invariant(!!dataLocaleData, `Missing locale data for ${dataLocale}`);
|
|
4807
|
+
setSlot(this, "localeData", dataLocaleData);
|
|
4808
|
+
invariant(
|
|
4809
|
+
dataLocaleData !== void 0,
|
|
4810
|
+
`locale data for ${r.locale} does not exist.`
|
|
4811
|
+
);
|
|
4812
|
+
const { types } = dataLocaleData;
|
|
4813
|
+
invariant(typeof types === "object" && types != null, "invalid types data");
|
|
4814
|
+
const typeFields = types[type];
|
|
4815
|
+
invariant(
|
|
4816
|
+
typeof typeFields === "object" && typeFields != null,
|
|
4817
|
+
"invalid typeFields data"
|
|
4818
|
+
);
|
|
4819
|
+
const languageDisplay = GetOption(
|
|
4820
|
+
options,
|
|
4821
|
+
"languageDisplay",
|
|
4822
|
+
"string",
|
|
4823
|
+
["dialect", "standard"],
|
|
4824
|
+
"dialect"
|
|
4825
|
+
);
|
|
4826
|
+
if (type === "language") {
|
|
4827
|
+
setSlot(this, "languageDisplay", languageDisplay);
|
|
4828
|
+
const typeFields2 = types[type][languageDisplay];
|
|
4829
|
+
invariant(
|
|
4830
|
+
typeof typeFields2 === "object" && typeFields2 != null,
|
|
4831
|
+
"invalid language typeFields data"
|
|
4646
4832
|
);
|
|
4647
|
-
var style = GetOption(options, "style", "string", ["narrow", "short", "long"], "long");
|
|
4648
|
-
setSlot(this, "style", style);
|
|
4649
|
-
var type = GetOption(options, "type", "string", ["language", "region", "script", "currency", "calendar", "dateTimeField"], void 0);
|
|
4650
|
-
if (type === void 0) {
|
|
4651
|
-
throw TypeError('Intl.DisplayNames constructor requires "type" option');
|
|
4652
|
-
}
|
|
4653
|
-
setSlot(this, "type", type);
|
|
4654
|
-
var fallback = GetOption(options, "fallback", "string", ["code", "none"], "code");
|
|
4655
|
-
setSlot(this, "fallback", fallback);
|
|
4656
|
-
setSlot(this, "locale", r.locale);
|
|
4657
|
-
var dataLocale = r.dataLocale;
|
|
4658
|
-
var dataLocaleData = localeData[dataLocale];
|
|
4659
|
-
invariant(!!dataLocaleData, "Missing locale data for ".concat(dataLocale));
|
|
4660
|
-
setSlot(this, "localeData", dataLocaleData);
|
|
4661
|
-
invariant(dataLocaleData !== void 0, "locale data for ".concat(r.locale, " does not exist."));
|
|
4662
|
-
var types = dataLocaleData.types;
|
|
4663
|
-
invariant(typeof types === "object" && types != null, "invalid types data");
|
|
4664
|
-
var typeFields = types[type];
|
|
4665
|
-
invariant(typeof typeFields === "object" && typeFields != null, "invalid typeFields data");
|
|
4666
|
-
var languageDisplay = GetOption(options, "languageDisplay", "string", ["dialect", "standard"], "dialect");
|
|
4667
|
-
if (type === "language") {
|
|
4668
|
-
setSlot(this, "languageDisplay", languageDisplay);
|
|
4669
|
-
var typeFields_1 = types[type][languageDisplay];
|
|
4670
|
-
invariant(typeof typeFields_1 === "object" && typeFields_1 != null, "invalid language typeFields data");
|
|
4671
|
-
}
|
|
4672
|
-
var styleFields = type === "language" ? types[type][languageDisplay][style] : types[type][style];
|
|
4673
|
-
invariant(typeof styleFields === "object" && styleFields != null, "invalid styleFields data");
|
|
4674
|
-
setSlot(this, "fields", styleFields);
|
|
4675
4833
|
}
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
var codeAsString = ToString(code);
|
|
4699
|
-
if (!isValidCodeForDisplayNames(type, codeAsString)) {
|
|
4700
|
-
throw RangeError("invalid code for Intl.DisplayNames.prototype.of");
|
|
4701
|
-
}
|
|
4702
|
-
var _a = getMultiInternalSlots(__INTERNAL_SLOT_MAP__, this, "localeData", "style", "fallback"), localeData = _a.localeData, style = _a.style, fallback = _a.fallback;
|
|
4703
|
-
var canonicalCode = CanonicalCodeForDisplayNames(type, codeAsString);
|
|
4704
|
-
var name;
|
|
4705
|
-
if (type === "language") {
|
|
4706
|
-
var languageDisplay = getSlot(this, "languageDisplay");
|
|
4707
|
-
name = getNameForTypeLanguage(languageDisplay, localeData, style, canonicalCode, fallback);
|
|
4708
|
-
} else {
|
|
4709
|
-
var typesData = localeData.types[type];
|
|
4710
|
-
name = typesData[style][canonicalCode] || typesData.long[canonicalCode];
|
|
4711
|
-
}
|
|
4712
|
-
if (name !== void 0) {
|
|
4713
|
-
return name;
|
|
4714
|
-
}
|
|
4715
|
-
if (fallback === "code") {
|
|
4716
|
-
return codeAsString;
|
|
4834
|
+
const styleFields = type === "language" ? types[type][languageDisplay][style] : types[type][style];
|
|
4835
|
+
invariant(
|
|
4836
|
+
typeof styleFields === "object" && styleFields != null,
|
|
4837
|
+
"invalid styleFields data"
|
|
4838
|
+
);
|
|
4839
|
+
setSlot(this, "fields", styleFields);
|
|
4840
|
+
}
|
|
4841
|
+
static supportedLocalesOf(locales, options) {
|
|
4842
|
+
return SupportedLocales(
|
|
4843
|
+
_DisplayNames.availableLocales,
|
|
4844
|
+
CanonicalizeLocaleList(locales),
|
|
4845
|
+
options
|
|
4846
|
+
);
|
|
4847
|
+
}
|
|
4848
|
+
static __addLocaleData(...data2) {
|
|
4849
|
+
for (const { data: d, locale } of data2) {
|
|
4850
|
+
const minimizedLocale = new Intl.Locale(locale).minimize().toString();
|
|
4851
|
+
_DisplayNames.localeData[locale] = _DisplayNames.localeData[minimizedLocale] = d;
|
|
4852
|
+
_DisplayNames.availableLocales.add(minimizedLocale);
|
|
4853
|
+
_DisplayNames.availableLocales.add(locale);
|
|
4854
|
+
if (!_DisplayNames.__defaultLocale) {
|
|
4855
|
+
_DisplayNames.__defaultLocale = minimizedLocale;
|
|
4717
4856
|
}
|
|
4718
|
-
}
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4857
|
+
}
|
|
4858
|
+
}
|
|
4859
|
+
of(code) {
|
|
4860
|
+
checkReceiver(this, "of");
|
|
4861
|
+
const type = getSlot(this, "type");
|
|
4862
|
+
const codeAsString = ToString(code);
|
|
4863
|
+
if (!isValidCodeForDisplayNames(type, codeAsString)) {
|
|
4864
|
+
throw RangeError("invalid code for Intl.DisplayNames.prototype.of");
|
|
4865
|
+
}
|
|
4866
|
+
const { localeData, style, fallback } = getMultiInternalSlots(
|
|
4867
|
+
__INTERNAL_SLOT_MAP__,
|
|
4868
|
+
this,
|
|
4869
|
+
"localeData",
|
|
4870
|
+
"style",
|
|
4871
|
+
"fallback"
|
|
4872
|
+
);
|
|
4873
|
+
let canonicalCode = CanonicalCodeForDisplayNames(type, codeAsString);
|
|
4874
|
+
let name;
|
|
4875
|
+
if (type === "language") {
|
|
4876
|
+
const languageDisplay = getSlot(this, "languageDisplay");
|
|
4877
|
+
name = getNameForTypeLanguage(
|
|
4878
|
+
languageDisplay,
|
|
4879
|
+
localeData,
|
|
4880
|
+
style,
|
|
4881
|
+
canonicalCode,
|
|
4882
|
+
fallback
|
|
4883
|
+
);
|
|
4884
|
+
} else {
|
|
4885
|
+
const typesData = localeData.types[type];
|
|
4886
|
+
name = typesData[style][canonicalCode] || typesData.long[canonicalCode];
|
|
4887
|
+
}
|
|
4888
|
+
if (name !== void 0) {
|
|
4889
|
+
return name;
|
|
4890
|
+
}
|
|
4891
|
+
if (fallback === "code") {
|
|
4892
|
+
return codeAsString;
|
|
4893
|
+
}
|
|
4894
|
+
}
|
|
4895
|
+
resolvedOptions() {
|
|
4896
|
+
checkReceiver(this, "resolvedOptions");
|
|
4897
|
+
return __spreadValues({}, getMultiInternalSlots(
|
|
4898
|
+
__INTERNAL_SLOT_MAP__,
|
|
4899
|
+
this,
|
|
4900
|
+
"locale",
|
|
4901
|
+
"style",
|
|
4902
|
+
"type",
|
|
4903
|
+
"fallback",
|
|
4904
|
+
"languageDisplay"
|
|
4905
|
+
));
|
|
4906
|
+
}
|
|
4907
|
+
static getDefaultLocale() {
|
|
4908
|
+
return _DisplayNames.__defaultLocale;
|
|
4909
|
+
}
|
|
4910
|
+
};
|
|
4911
|
+
__publicField(_DisplayNames, "localeData", {});
|
|
4912
|
+
__publicField(_DisplayNames, "availableLocales", /* @__PURE__ */ new Set());
|
|
4913
|
+
__publicField(_DisplayNames, "__defaultLocale", "");
|
|
4914
|
+
__publicField(_DisplayNames, "polyfilled", true);
|
|
4915
|
+
var DisplayNames = _DisplayNames;
|
|
4733
4916
|
function isValidCodeForDisplayNames(type, code) {
|
|
4734
4917
|
switch (type) {
|
|
4735
4918
|
case "language":
|
|
4736
|
-
return /^[a-z]{2,3}(-[a-z]{4})?(-([a-z]{2}|\d{3}))?(-([a-z\d]{5,8}|\d[a-z\d]{3}))*$/i.test(
|
|
4919
|
+
return /^[a-z]{2,3}(-[a-z]{4})?(-([a-z]{2}|\d{3}))?(-([a-z\d]{5,8}|\d[a-z\d]{3}))*$/i.test(
|
|
4920
|
+
code
|
|
4921
|
+
);
|
|
4737
4922
|
case "region":
|
|
4738
4923
|
return /^([a-z]{2}|\d{3})$/i.test(code);
|
|
4739
4924
|
case "script":
|
|
@@ -4772,27 +4957,29 @@
|
|
|
4772
4957
|
}
|
|
4773
4958
|
function checkReceiver(receiver, methodName) {
|
|
4774
4959
|
if (!(receiver instanceof DisplayNames)) {
|
|
4775
|
-
throw TypeError(
|
|
4960
|
+
throw TypeError(
|
|
4961
|
+
`Method Intl.DisplayNames.prototype.${methodName} called on incompatible receiver`
|
|
4962
|
+
);
|
|
4776
4963
|
}
|
|
4777
4964
|
}
|
|
4778
4965
|
function getNameForTypeLanguage(languageDisplay, localeData, style, canonicalCode, fallback) {
|
|
4779
|
-
|
|
4780
|
-
|
|
4966
|
+
const typesData = localeData.types.language[languageDisplay];
|
|
4967
|
+
const name = typesData[style][canonicalCode] || typesData.long[canonicalCode];
|
|
4781
4968
|
if (name === void 0) {
|
|
4782
|
-
|
|
4969
|
+
const regionMatch = /-([a-z]{2}|\d{3})\b/i.exec(canonicalCode);
|
|
4783
4970
|
if (regionMatch) {
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
if (
|
|
4788
|
-
|
|
4789
|
-
|
|
4971
|
+
const languageSubTag = canonicalCode.substring(0, regionMatch.index) + canonicalCode.substring(regionMatch.index + regionMatch[0].length);
|
|
4972
|
+
const regionSubTag = regionMatch[1];
|
|
4973
|
+
const name2 = typesData[style][languageSubTag] || typesData.long[languageSubTag];
|
|
4974
|
+
if (name2 !== void 0 && regionSubTag) {
|
|
4975
|
+
const regionsData = localeData.types.region;
|
|
4976
|
+
const regionDisplayName = regionsData[style][regionSubTag] || regionsData.long[regionSubTag];
|
|
4790
4977
|
if (regionDisplayName || fallback === "code") {
|
|
4791
|
-
|
|
4792
|
-
return pattern.replace("{0}",
|
|
4978
|
+
const pattern = localeData.patterns.locale;
|
|
4979
|
+
return pattern.replace("{0}", name2).replace("{1}", regionDisplayName || regionSubTag);
|
|
4793
4980
|
}
|
|
4794
4981
|
} else {
|
|
4795
|
-
return
|
|
4982
|
+
return name2;
|
|
4796
4983
|
}
|
|
4797
4984
|
}
|
|
4798
4985
|
} else {
|
|
@@ -4800,12 +4987,12 @@
|
|
|
4800
4987
|
}
|
|
4801
4988
|
}
|
|
4802
4989
|
|
|
4803
|
-
//
|
|
4990
|
+
// packages/intl-displaynames/supported-locales.generated.ts
|
|
4804
4991
|
var supportedLocales = ["af", "af-NA", "agq", "ak", "am", "ar", "ar-AE", "ar-BH", "ar-DJ", "ar-DZ", "ar-EG", "ar-EH", "ar-ER", "ar-IL", "ar-IQ", "ar-JO", "ar-KM", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-MR", "ar-OM", "ar-PS", "ar-QA", "ar-SA", "ar-SD", "ar-SO", "ar-SS", "ar-SY", "ar-TD", "ar-TN", "ar-YE", "as", "asa", "ast", "az", "az-Cyrl", "az-Latn", "bas", "be", "be-tarask", "bem", "bez", "bg", "bm", "bn", "bn-IN", "bo", "bo-IN", "br", "brx", "bs", "bs-Cyrl", "bs-Latn", "ca", "ca-AD", "ca-ES-valencia", "ca-FR", "ca-IT", "ccp", "ccp-IN", "ce", "ceb", "cgg", "chr", "ckb", "ckb-IR", "cs", "cy", "da", "da-GL", "dav", "de", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee", "ee-TG", "el", "el-CY", "en", "en-001", "en-150", "en-AE", "en-AG", "en-AI", "en-AS", "en-AT", "en-AU", "en-BB", "en-BE", "en-BI", "en-BM", "en-BS", "en-BW", "en-BZ", "en-CA", "en-CC", "en-CH", "en-CK", "en-CM", "en-CX", "en-CY", "en-DE", "en-DG", "en-DK", "en-DM", "en-ER", "en-FI", "en-FJ", "en-FK", "en-FM", "en-GB", "en-GD", "en-GG", "en-GH", "en-GI", "en-GM", "en-GU", "en-GY", "en-HK", "en-IE", "en-IL", "en-IM", "en-IN", "en-IO", "en-JE", "en-JM", "en-KE", "en-KI", "en-KN", "en-KY", "en-LC", "en-LR", "en-LS", "en-MG", "en-MH", "en-MO", "en-MP", "en-MS", "en-MT", "en-MU", "en-MW", "en-MY", "en-NA", "en-NF", "en-NG", "en-NL", "en-NR", "en-NU", "en-NZ", "en-PG", "en-PH", "en-PK", "en-PN", "en-PR", "en-PW", "en-RW", "en-SB", "en-SC", "en-SD", "en-SE", "en-SG", "en-SH", "en-SI", "en-SL", "en-SS", "en-SX", "en-SZ", "en-TC", "en-TK", "en-TO", "en-TT", "en-TV", "en-TZ", "en-UG", "en-UM", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "eo", "es", "es-419", "es-AR", "es-BO", "es-BR", "es-BZ", "es-CL", "es-CO", "es-CR", "es-CU", "es-DO", "es-EA", "es-EC", "es-GQ", "es-GT", "es-HN", "es-IC", "es-MX", "es-NI", "es-PA", "es-PE", "es-PH", "es-PR", "es-PY", "es-SV", "es-US", "es-UY", "es-VE", "et", "eu", "ewo", "fa", "fa-AF", "ff", "ff-Adlm", "ff-Adlm-BF", "ff-Adlm-CM", "ff-Adlm-GH", "ff-Adlm-GM", "ff-Adlm-GW", "ff-Adlm-LR", "ff-Adlm-MR", "ff-Adlm-NE", "ff-Adlm-NG", "ff-Adlm-SL", "ff-Adlm-SN", "ff-Latn", "ff-Latn-BF", "ff-Latn-CM", "ff-Latn-GH", "ff-Latn-GM", "ff-Latn-GN", "ff-Latn-GW", "ff-Latn-LR", "ff-Latn-MR", "ff-Latn-NE", "ff-Latn-NG", "ff-Latn-SL", "fi", "fil", "fo", "fo-DK", "fr", "fr-BE", "fr-BF", "fr-BI", "fr-BJ", "fr-BL", "fr-CA", "fr-CD", "fr-CF", "fr-CG", "fr-CH", "fr-CI", "fr-CM", "fr-DJ", "fr-DZ", "fr-GA", "fr-GF", "fr-GN", "fr-GP", "fr-GQ", "fr-HT", "fr-KM", "fr-LU", "fr-MA", "fr-MC", "fr-MF", "fr-MG", "fr-ML", "fr-MQ", "fr-MR", "fr-MU", "fr-NC", "fr-NE", "fr-PF", "fr-PM", "fr-RE", "fr-RW", "fr-SC", "fr-SN", "fr-SY", "fr-TD", "fr-TG", "fr-TN", "fr-VU", "fr-WF", "fr-YT", "fur", "fy", "ga", "ga-GB", "gd", "gl", "gsw", "gsw-FR", "gsw-LI", "gu", "guz", "gv", "ha", "ha-GH", "ha-NE", "haw", "he", "hi", "hr", "hr-BA", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it", "it-CH", "it-SM", "it-VA", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "kgp", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko", "ko-KP", "kok", "ks", "ks-Arab", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln", "ln-AO", "ln-CF", "ln-CG", "lo", "lrc", "lrc-IQ", "lt", "lu", "luo", "luy", "lv", "mai", "mas", "mas-TZ", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni", "mni-Beng", "mr", "ms", "ms-BN", "ms-ID", "ms-SG", "mt", "mua", "my", "mzn", "naq", "nb", "nb-SJ", "nd", "nds", "nds-NL", "ne", "ne-IN", "nl", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nmg", "nn", "nnh", "no", "nus", "nyn", "om", "om-KE", "or", "os", "os-RU", "pa", "pa-Arab", "pa-Guru", "pcm", "pl", "ps", "ps-PK", "pt", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "qu", "qu-BO", "qu-EC", "rm", "rn", "ro", "ro-MD", "rof", "ru", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "rw", "rwk", "sa", "sah", "saq", "sat", "sat-Olck", "sbp", "sc", "sd", "sd-Arab", "sd-Deva", "se", "se-FI", "se-SE", "seh", "ses", "sg", "shi", "shi-Latn", "shi-Tfng", "si", "sk", "sl", "smn", "sn", "so", "so-DJ", "so-ET", "so-KE", "sq", "sq-MK", "sq-XK", "sr", "sr-Cyrl", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Latn", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "su", "su-Latn", "sv", "sv-AX", "sv-FI", "sw", "sw-CD", "sw-KE", "sw-UG", "ta", "ta-LK", "ta-MY", "ta-SG", "te", "teo", "teo-KE", "tg", "th", "ti", "ti-ER", "tk", "to", "tr", "tr-CY", "tt", "twq", "tzm", "ug", "uk", "und", "ur", "ur-IN", "uz", "uz-Arab", "uz-Cyrl", "uz-Latn", "vai", "vai-Latn", "vai-Vaii", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo", "yo-BJ", "yrl", "yrl-CO", "yrl-VE", "yue", "yue-Hans", "yue-Hant", "zgh", "zh", "zh-Hans", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hant", "zh-Hant-HK", "zh-Hant-MO", "zu"];
|
|
4805
4992
|
|
|
4806
|
-
//
|
|
4993
|
+
// packages/intl-displaynames/should-polyfill.ts
|
|
4807
4994
|
function hasMissingICUBug() {
|
|
4808
|
-
|
|
4995
|
+
const DisplayNames2 = Intl.DisplayNames;
|
|
4809
4996
|
if (DisplayNames2 && !DisplayNames2.polyfilled) {
|
|
4810
4997
|
return new DisplayNames2(["en"], {
|
|
4811
4998
|
type: "region"
|
|
@@ -4814,7 +5001,7 @@
|
|
|
4814
5001
|
return false;
|
|
4815
5002
|
}
|
|
4816
5003
|
function hasScriptBug() {
|
|
4817
|
-
|
|
5004
|
+
const DisplayNames2 = Intl.DisplayNames;
|
|
4818
5005
|
if (DisplayNames2 && !DisplayNames2.polyfilled) {
|
|
4819
5006
|
return new DisplayNames2(["en"], {
|
|
4820
5007
|
type: "script"
|
|
@@ -4826,16 +5013,13 @@
|
|
|
4826
5013
|
if (!locale) {
|
|
4827
5014
|
return true;
|
|
4828
5015
|
}
|
|
4829
|
-
|
|
5016
|
+
const locales = Array.isArray(locale) ? locale : [locale];
|
|
4830
5017
|
return Intl.DisplayNames.supportedLocalesOf(locales).length === locales.length;
|
|
4831
5018
|
}
|
|
4832
5019
|
function _shouldPolyfillWithoutLocale() {
|
|
4833
5020
|
return !Intl.DisplayNames || hasMissingICUBug() || hasScriptBug();
|
|
4834
5021
|
}
|
|
4835
|
-
function shouldPolyfill(locale) {
|
|
4836
|
-
if (locale === void 0) {
|
|
4837
|
-
locale = "en";
|
|
4838
|
-
}
|
|
5022
|
+
function shouldPolyfill(locale = "en") {
|
|
4839
5023
|
try {
|
|
4840
5024
|
if (_shouldPolyfillWithoutLocale() || !supportedLocalesOf(locale)) {
|
|
4841
5025
|
return match([locale], supportedLocales, "en");
|
|
@@ -4845,7 +5029,7 @@
|
|
|
4845
5029
|
}
|
|
4846
5030
|
}
|
|
4847
5031
|
|
|
4848
|
-
//
|
|
5032
|
+
// packages/intl-displaynames/polyfill.ts
|
|
4849
5033
|
if (shouldPolyfill()) {
|
|
4850
5034
|
Object.defineProperty(Intl, "DisplayNames", {
|
|
4851
5035
|
value: DisplayNames,
|
package/should-polyfill.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports._shouldPolyfillWithoutLocale = _shouldPolyfillWithoutLocale;
|
|
4
|
+
exports.shouldPolyfill = shouldPolyfill;
|
|
4
5
|
var intl_localematcher_1 = require("@formatjs/intl-localematcher");
|
|
5
6
|
var supported_locales_generated_1 = require("./supported-locales.generated");
|
|
6
7
|
/**
|
|
@@ -38,7 +39,6 @@ function supportedLocalesOf(locale) {
|
|
|
38
39
|
function _shouldPolyfillWithoutLocale() {
|
|
39
40
|
return !Intl.DisplayNames || hasMissingICUBug() || hasScriptBug();
|
|
40
41
|
}
|
|
41
|
-
exports._shouldPolyfillWithoutLocale = _shouldPolyfillWithoutLocale;
|
|
42
42
|
function shouldPolyfill(locale) {
|
|
43
43
|
if (locale === void 0) { locale = 'en'; }
|
|
44
44
|
try {
|
|
@@ -50,4 +50,3 @@ function shouldPolyfill(locale) {
|
|
|
50
50
|
return true;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
exports.shouldPolyfill = shouldPolyfill;
|