@formatjs/intl-numberformat 7.2.3 → 7.3.0

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./src/core"), exports);
4
+ (0, tslib_1.__exportStar)(require("./src/core"), exports);
@@ -1,2 +1,2 @@
1
- export declare function shouldPolyfill(locale?: string | string[]): boolean;
1
+ export declare function shouldPolyfill(locale?: string): string | undefined;
2
2
  //# sourceMappingURL=should-polyfill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"should-polyfill.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-numberformat/should-polyfill.ts"],"names":[],"mappings":"AA8CA,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,WAQxD"}
1
+ {"version":3,"file":"should-polyfill.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-numberformat/should-polyfill.ts"],"names":[],"mappings":"AAgDA,wBAAgB,cAAc,CAAC,MAAM,SAAO,sBAU3C"}
@@ -1,3 +1,5 @@
1
+ import { match } from '@formatjs/intl-localematcher';
2
+ import { supportedLocales } from './supported-locales';
1
3
  /**
2
4
  * Check if this is old Node that only supports en
3
5
  * @returns
@@ -40,9 +42,12 @@ function supportedLocalesOf(locale) {
40
42
  return Intl.NumberFormat.supportedLocalesOf(locales).length === locales.length;
41
43
  }
42
44
  export function shouldPolyfill(locale) {
43
- return (typeof Intl === 'undefined' ||
45
+ if (locale === void 0) { locale = 'en'; }
46
+ if (typeof Intl === 'undefined' ||
44
47
  !('NumberFormat' in Intl) ||
45
48
  !supportsES2020() ||
46
49
  onlySupportsEn() ||
47
- !supportedLocalesOf(locale));
50
+ !supportedLocalesOf(locale)) {
51
+ return locale ? match([locale], supportedLocales, 'en') : undefined;
52
+ }
48
53
  }
package/lib/src/core.js CHANGED
@@ -41,7 +41,7 @@ export var NumberFormat = function (locales, options) {
41
41
  var internalSlots = getInternalSlots(this);
42
42
  var dataLocale = internalSlots.dataLocale;
43
43
  var dataLocaleData = NumberFormat.localeData[dataLocale];
44
- invariant(dataLocaleData !== undefined, "Cannot load locale-dependent data for " + dataLocale + ".");
44
+ invariant(dataLocaleData !== undefined, "Cannot load locale-dependent data for ".concat(dataLocale, "."));
45
45
  internalSlots.pl = new Intl.PluralRules(dataLocale, {
46
46
  minimumFractionDigits: internalSlots.minimumFractionDigits,
47
47
  maximumFractionDigits: internalSlots.maximumFractionDigits,
@@ -169,7 +169,7 @@ NumberFormat.__addLocaleData = function __addLocaleData() {
169
169
  NumberFormat.__addUnitData = function __addUnitData(locale, unitsData) {
170
170
  var _a = NumberFormat.localeData, _b = locale, existingData = _a[_b];
171
171
  if (!existingData) {
172
- throw new Error("Locale data for \"" + locale + "\" has not been loaded in NumberFormat. \nPlease __addLocaleData before adding additional unit data");
172
+ throw new Error("Locale data for \"".concat(locale, "\" has not been loaded in NumberFormat. \nPlease __addLocaleData before adding additional unit data"));
173
173
  }
174
174
  for (var unit in unitsData.simple) {
175
175
  existingData.units.simple[unit] = unitsData.simple[unit];
@@ -0,0 +1,2 @@
1
+ export declare const supportedLocales: string[];
2
+ //# sourceMappingURL=supported-locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supported-locales.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-numberformat/supported-locales.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAA+nI,CAAA"}
@@ -0,0 +1,2 @@
1
+ // This file is generated from supported-locales-gen.ts
2
+ export var supportedLocales = ["af-NA", "af", "agq", "ak", "am", "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", "ar", "as", "asa", "ast", "az-Cyrl", "az-Latn", "az", "bas", "be", "bem", "bez", "bg", "bm", "bn-IN", "bn", "bo-IN", "bo", "br", "brx", "bs-Cyrl", "bs-Latn", "bs", "ca-AD", "ca-ES-VALENCIA", "ca-FR", "ca-IT", "ca", "ccp-IN", "ccp", "ce", "ceb", "cgg", "chr", "ckb-IR", "ckb", "cs", "cy", "da-GL", "da", "dav", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "de", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee-TG", "ee", "el-CY", "el", "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-US-POSIX", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "en", "eo", "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", "es", "et", "eu", "ewo", "fa-AF", "fa", "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-Adlm", "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", "ff-Latn", "ff", "fi", "fil", "fo-DK", "fo", "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", "fr", "fur", "fy", "ga-GB", "ga", "gd", "gl", "gsw-FR", "gsw-LI", "gsw", "gu", "guz", "gv", "ha-GH", "ha-NE", "ha", "haw", "he", "hi", "hr-BA", "hr", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it-CH", "it-SM", "it-VA", "it", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko-KP", "ko", "kok", "ks-Arab", "ks", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln-AO", "ln-CF", "ln-CG", "ln", "lo", "lrc-IQ", "lrc", "lt", "lu", "luo", "luy", "lv", "mai", "mas-TZ", "mas", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni-Beng", "mni", "mr", "ms-BN", "ms-ID", "ms-SG", "ms", "mt", "mua", "my", "mzn", "naq", "nb-SJ", "nb", "nd", "nds-NL", "nds", "ne-IN", "ne", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nl", "nmg", "nn", "nnh", "no", "nus", "nyn", "om-KE", "om", "or", "os-RU", "os", "pa-Arab", "pa-Guru", "pa", "pcm", "pl", "ps-PK", "ps", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "pt", "qu-BO", "qu-EC", "qu", "rm", "rn", "ro-MD", "ro", "rof", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "ru", "rw", "rwk", "sa", "sah", "saq", "sat-Olck", "sat", "sbp", "sd-Arab", "sd-Deva", "sd", "se-FI", "se-SE", "se", "seh", "ses", "sg", "shi-Latn", "shi-Tfng", "shi", "si", "sk", "sl", "smn", "sn", "so-DJ", "so-ET", "so-KE", "so", "sq-MK", "sq-XK", "sq", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Cyrl", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "sr-Latn", "sr", "su-Latn", "su", "sv-AX", "sv-FI", "sv", "sw-CD", "sw-KE", "sw-UG", "sw", "ta-LK", "ta-MY", "ta-SG", "ta", "te", "teo-KE", "teo", "tg", "th", "ti-ER", "ti", "tk", "to", "tr-CY", "tr", "tt", "twq", "tzm", "ug", "uk", "ur-IN", "ur", "uz-Arab", "uz-Cyrl", "uz-Latn", "uz", "vai-Latn", "vai-Vaii", "vai", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo-BJ", "yo", "yue-Hans", "yue-Hant", "yue", "zgh", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hans", "zh-Hant-HK", "zh-Hant-MO", "zh-Hant", "zh", "zu"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/intl-numberformat",
3
- "version": "7.2.3",
3
+ "version": "7.3.0",
4
4
  "description": "Ponyfill for ES2020 Intl.NumberFormat",
5
5
  "keywords": [
6
6
  "polyfill",
@@ -22,7 +22,8 @@
22
22
  "url": "git+https://github.com/formatjs/formatjs.git"
23
23
  },
24
24
  "dependencies": {
25
- "@formatjs/ecma402-abstract": "1.9.8",
25
+ "@formatjs/ecma402-abstract": "1.11.0",
26
+ "@formatjs/intl-localematcher": "0.2.21",
26
27
  "tslib": "^2.1.0"
27
28
  },
28
29
  "bugs": {
package/polyfill-force.js CHANGED
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var core_1 = require("./src/core");
4
4
  var to_locale_string_1 = require("./src/to_locale_string");
5
5
  var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
6
- ecma402_abstract_1.defineProperty(Intl, 'NumberFormat', { value: core_1.NumberFormat });
7
- ecma402_abstract_1.defineProperty(Number.prototype, 'toLocaleString', {
6
+ (0, ecma402_abstract_1.defineProperty)(Intl, 'NumberFormat', { value: core_1.NumberFormat });
7
+ (0, ecma402_abstract_1.defineProperty)(Number.prototype, 'toLocaleString', {
8
8
  value: function toLocaleString(locales, options) {
9
- return to_locale_string_1.toLocaleString(this, locales, options);
9
+ return (0, to_locale_string_1.toLocaleString)(this, locales, options);
10
10
  },
11
11
  });
package/polyfill.iife.js CHANGED
@@ -6,11 +6,11 @@
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __markAsModule = function(target) {
9
- return __defProp(target, "__esModule", {value: true});
9
+ return __defProp(target, "__esModule", { value: true });
10
10
  };
11
11
  var __commonJS = function(cb, mod) {
12
12
  return function __require() {
13
- return mod || (0, cb[Object.keys(cb)[0]])((mod = {exports: {}}).exports, mod), mod.exports;
13
+ return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14
14
  };
15
15
  };
16
16
  var __reExport = function(target, module, desc) {
@@ -18,23 +18,23 @@
18
18
  for (var keys = __getOwnPropNames(module), i = 0, n = keys.length, key; i < n; i++) {
19
19
  key = keys[i];
20
20
  if (!__hasOwnProp.call(target, key) && key !== "default")
21
- __defProp(target, key, {get: function(k) {
21
+ __defProp(target, key, { get: function(k) {
22
22
  return module[k];
23
- }.bind(null, key), enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable});
23
+ }.bind(null, key), enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
24
24
  }
25
25
  return target;
26
26
  };
27
27
  var __toModule = function(module) {
28
- return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? {get: function() {
28
+ return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: function() {
29
29
  return module.default;
30
- }, enumerable: true} : {value: module, enumerable: true})), module);
30
+ }, enumerable: true } : { value: module, enumerable: true })), module);
31
31
  };
32
32
 
33
33
  // bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/utils.js
34
34
  var require_utils = __commonJS({
35
35
  "bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/utils.js": function(exports) {
36
36
  "use strict";
37
- Object.defineProperty(exports, "__esModule", {value: true});
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.invariant = exports.UNICODE_EXTENSION_SEQUENCE_REGEX = void 0;
39
39
  exports.UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
40
40
  function invariant2(condition, message, Err) {
@@ -53,7 +53,7 @@
53
53
  var require_BestAvailableLocale = __commonJS({
54
54
  "bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/BestAvailableLocale.js": function(exports) {
55
55
  "use strict";
56
- Object.defineProperty(exports, "__esModule", {value: true});
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
57
  exports.BestAvailableLocale = void 0;
58
58
  function BestAvailableLocale(availableLocales, locale) {
59
59
  var candidate = locale;
@@ -79,16 +79,16 @@
79
79
  var require_LookupMatcher = __commonJS({
80
80
  "bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/LookupMatcher.js": function(exports) {
81
81
  "use strict";
82
- Object.defineProperty(exports, "__esModule", {value: true});
82
+ Object.defineProperty(exports, "__esModule", { value: true });
83
83
  exports.LookupMatcher = void 0;
84
84
  var utils_1 = require_utils();
85
85
  var BestAvailableLocale_1 = require_BestAvailableLocale();
86
86
  function LookupMatcher(availableLocales, requestedLocales, getDefaultLocale) {
87
- var result = {locale: ""};
87
+ var result = { locale: "" };
88
88
  for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
89
89
  var locale = requestedLocales_1[_i];
90
90
  var noExtensionLocale = locale.replace(utils_1.UNICODE_EXTENSION_SEQUENCE_REGEX, "");
91
- var availableLocale = BestAvailableLocale_1.BestAvailableLocale(availableLocales, noExtensionLocale);
91
+ var availableLocale = (0, BestAvailableLocale_1.BestAvailableLocale)(availableLocales, noExtensionLocale);
92
92
  if (availableLocale) {
93
93
  result.locale = availableLocale;
94
94
  if (locale !== noExtensionLocale) {
@@ -108,7 +108,7 @@
108
108
  var require_BestFitMatcher = __commonJS({
109
109
  "bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/BestFitMatcher.js": function(exports) {
110
110
  "use strict";
111
- Object.defineProperty(exports, "__esModule", {value: true});
111
+ Object.defineProperty(exports, "__esModule", { value: true });
112
112
  exports.BestFitMatcher = void 0;
113
113
  var BestAvailableLocale_1 = require_BestAvailableLocale();
114
114
  var utils_1 = require_utils();
@@ -145,7 +145,7 @@
145
145
  foundLocale = minimizedRequestedLocale;
146
146
  break;
147
147
  }
148
- foundLocale = BestAvailableLocale_1.BestAvailableLocale(minimizedAvailableLocales, maximizedRequestedLocale);
148
+ foundLocale = (0, BestAvailableLocale_1.BestAvailableLocale)(minimizedAvailableLocales, maximizedRequestedLocale);
149
149
  }
150
150
  return {
151
151
  locale: foundLocale && minimizedAvailableLocaleMap[foundLocale] || getDefaultLocale()
@@ -159,13 +159,13 @@
159
159
  var require_UnicodeExtensionValue = __commonJS({
160
160
  "bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/UnicodeExtensionValue.js": function(exports) {
161
161
  "use strict";
162
- Object.defineProperty(exports, "__esModule", {value: true});
162
+ Object.defineProperty(exports, "__esModule", { value: true });
163
163
  exports.UnicodeExtensionValue = void 0;
164
164
  var utils_1 = require_utils();
165
165
  function UnicodeExtensionValue(extension, key) {
166
- utils_1.invariant(key.length === 2, "key must have 2 elements");
166
+ (0, utils_1.invariant)(key.length === 2, "key must have 2 elements");
167
167
  var size = extension.length;
168
- var searchValue = "-" + key + "-";
168
+ var searchValue = "-".concat(key, "-");
169
169
  var pos = extension.indexOf(searchValue);
170
170
  if (pos !== -1) {
171
171
  var start = pos + 4;
@@ -192,7 +192,7 @@
192
192
  }
193
193
  return extension.slice(start, end);
194
194
  }
195
- searchValue = "-" + key;
195
+ searchValue = "-".concat(key);
196
196
  pos = extension.indexOf(searchValue);
197
197
  if (pos !== -1 && pos + 3 === size) {
198
198
  return "";
@@ -207,7 +207,7 @@
207
207
  var require_ResolveLocale = __commonJS({
208
208
  "bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/ResolveLocale.js": function(exports) {
209
209
  "use strict";
210
- Object.defineProperty(exports, "__esModule", {value: true});
210
+ Object.defineProperty(exports, "__esModule", { value: true });
211
211
  exports.ResolveLocale = void 0;
212
212
  var LookupMatcher_1 = require_LookupMatcher();
213
213
  var BestFitMatcher_1 = require_BestFitMatcher();
@@ -217,40 +217,40 @@
217
217
  var matcher = options.localeMatcher;
218
218
  var r;
219
219
  if (matcher === "lookup") {
220
- r = LookupMatcher_1.LookupMatcher(availableLocales, requestedLocales, getDefaultLocale);
220
+ r = (0, LookupMatcher_1.LookupMatcher)(availableLocales, requestedLocales, getDefaultLocale);
221
221
  } else {
222
- r = BestFitMatcher_1.BestFitMatcher(availableLocales, requestedLocales, getDefaultLocale);
222
+ r = (0, BestFitMatcher_1.BestFitMatcher)(availableLocales, requestedLocales, getDefaultLocale);
223
223
  }
224
224
  var foundLocale = r.locale;
225
- var result = {locale: "", dataLocale: foundLocale};
225
+ var result = { locale: "", dataLocale: foundLocale };
226
226
  var supportedExtension = "-u";
227
227
  for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
228
228
  var key = relevantExtensionKeys_1[_i];
229
- utils_1.invariant(foundLocale in localeData, "Missing locale data for " + foundLocale);
229
+ (0, utils_1.invariant)(foundLocale in localeData, "Missing locale data for ".concat(foundLocale));
230
230
  var foundLocaleData = localeData[foundLocale];
231
- utils_1.invariant(typeof foundLocaleData === "object" && foundLocaleData !== null, "locale data " + key + " must be an object");
231
+ (0, utils_1.invariant)(typeof foundLocaleData === "object" && foundLocaleData !== null, "locale data ".concat(key, " must be an object"));
232
232
  var keyLocaleData = foundLocaleData[key];
233
- utils_1.invariant(Array.isArray(keyLocaleData), "keyLocaleData for " + key + " must be an array");
233
+ (0, utils_1.invariant)(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key, " must be an array"));
234
234
  var value = keyLocaleData[0];
235
- utils_1.invariant(typeof value === "string" || value === null, "value must be string or null but got " + typeof value + " in key " + key);
235
+ (0, utils_1.invariant)(typeof value === "string" || value === null, "value must be string or null but got ".concat(typeof value, " in key ").concat(key));
236
236
  var supportedExtensionAddition = "";
237
237
  if (r.extension) {
238
- var requestedValue = UnicodeExtensionValue_1.UnicodeExtensionValue(r.extension, key);
238
+ var requestedValue = (0, UnicodeExtensionValue_1.UnicodeExtensionValue)(r.extension, key);
239
239
  if (requestedValue !== void 0) {
240
240
  if (requestedValue !== "") {
241
241
  if (~keyLocaleData.indexOf(requestedValue)) {
242
242
  value = requestedValue;
243
- supportedExtensionAddition = "-" + key + "-" + value;
243
+ supportedExtensionAddition = "-".concat(key, "-").concat(value);
244
244
  }
245
245
  } else if (~requestedValue.indexOf("true")) {
246
246
  value = "true";
247
- supportedExtensionAddition = "-" + key;
247
+ supportedExtensionAddition = "-".concat(key);
248
248
  }
249
249
  }
250
250
  }
251
251
  if (key in options) {
252
252
  var optionsValue = options[key];
253
- utils_1.invariant(typeof optionsValue === "string" || typeof optionsValue === "undefined" || optionsValue === null, "optionsValue must be String, Undefined or Null");
253
+ (0, utils_1.invariant)(typeof optionsValue === "string" || typeof optionsValue === "undefined" || optionsValue === null, "optionsValue must be String, Undefined or Null");
254
254
  if (~keyLocaleData.indexOf(optionsValue)) {
255
255
  if (optionsValue !== value) {
256
256
  value = optionsValue;
@@ -283,7 +283,7 @@
283
283
  var require_LookupSupportedLocales = __commonJS({
284
284
  "bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/abstract/LookupSupportedLocales.js": function(exports) {
285
285
  "use strict";
286
- Object.defineProperty(exports, "__esModule", {value: true});
286
+ Object.defineProperty(exports, "__esModule", { value: true });
287
287
  exports.LookupSupportedLocales = void 0;
288
288
  var utils_1 = require_utils();
289
289
  var BestAvailableLocale_1 = require_BestAvailableLocale();
@@ -292,7 +292,7 @@
292
292
  for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {
293
293
  var locale = requestedLocales_1[_i];
294
294
  var noExtensionLocale = locale.replace(utils_1.UNICODE_EXTENSION_SEQUENCE_REGEX, "");
295
- var availableLocale = BestAvailableLocale_1.BestAvailableLocale(availableLocales, noExtensionLocale);
295
+ var availableLocale = (0, BestAvailableLocale_1.BestAvailableLocale)(availableLocales, noExtensionLocale);
296
296
  if (availableLocale) {
297
297
  subset.push(availableLocale);
298
298
  }
@@ -307,29 +307,29 @@
307
307
  var require_intl_localematcher = __commonJS({
308
308
  "bazel-out/darwin-fastbuild/bin/packages/intl-localematcher/index.js": function(exports) {
309
309
  "use strict";
310
- Object.defineProperty(exports, "__esModule", {value: true});
310
+ Object.defineProperty(exports, "__esModule", { value: true });
311
311
  exports.ResolveLocale = exports.LookupSupportedLocales = exports.match = void 0;
312
312
  var ResolveLocale_1 = require_ResolveLocale();
313
- function match(requestedLocales, availableLocales, defaultLocale, opts) {
313
+ function match2(requestedLocales, availableLocales, defaultLocale, opts) {
314
314
  var locales = availableLocales.reduce(function(all, l) {
315
315
  all.add(l);
316
316
  return all;
317
317
  }, new Set());
318
- return ResolveLocale_1.ResolveLocale(locales, requestedLocales, {
318
+ return (0, ResolveLocale_1.ResolveLocale)(locales, requestedLocales, {
319
319
  localeMatcher: (opts === null || opts === void 0 ? void 0 : opts.algorithm) || "best fit"
320
320
  }, [], {}, function() {
321
321
  return defaultLocale;
322
322
  }).locale;
323
323
  }
324
- exports.match = match;
324
+ exports.match = match2;
325
325
  var LookupSupportedLocales_1 = require_LookupSupportedLocales();
326
- Object.defineProperty(exports, "LookupSupportedLocales", {enumerable: true, get: function() {
326
+ Object.defineProperty(exports, "LookupSupportedLocales", { enumerable: true, get: function() {
327
327
  return LookupSupportedLocales_1.LookupSupportedLocales;
328
- }});
328
+ } });
329
329
  var ResolveLocale_2 = require_ResolveLocale();
330
- Object.defineProperty(exports, "ResolveLocale", {enumerable: true, get: function() {
330
+ Object.defineProperty(exports, "ResolveLocale", { enumerable: true, get: function() {
331
331
  return ResolveLocale_2.ResolveLocale;
332
- }});
332
+ } });
333
333
  }
334
334
  });
335
335
 
@@ -423,7 +423,7 @@
423
423
  if (val !== void 0) {
424
424
  val = Number(val);
425
425
  if (isNaN(val) || val < min || val > max) {
426
- throw new RangeError(val + " is outside of range [" + min + ", " + max + "]");
426
+ throw new RangeError("".concat(val, " is outside of range [").concat(min, ", ").concat(max, "]"));
427
427
  }
428
428
  return Math.floor(val);
429
429
  }
@@ -455,7 +455,7 @@
455
455
  if (values !== void 0 && !values.filter(function(val) {
456
456
  return val == value;
457
457
  }).length) {
458
- throw new RangeError(value + " is not within " + values.join(", "));
458
+ throw new RangeError("".concat(value, " is not within ").concat(values.join(", ")));
459
459
  }
460
460
  return value;
461
461
  }
@@ -671,10 +671,10 @@
671
671
  m = m + repeat("0", e - p + 1);
672
672
  int = e + 1;
673
673
  } else if (e >= 0) {
674
- m = m.slice(0, e + 1) + "." + m.slice(e + 1);
674
+ m = "".concat(m.slice(0, e + 1), ".").concat(m.slice(e + 1));
675
675
  int = e + 1;
676
676
  } else {
677
- m = "0." + repeat("0", -e - 1) + m;
677
+ m = "0.".concat(repeat("0", -e - 1)).concat(m);
678
678
  int = 1;
679
679
  }
680
680
  if (m.indexOf(".") >= 0 && maxPrecision > minPrecision) {
@@ -687,7 +687,7 @@
687
687
  m = m.slice(0, -1);
688
688
  }
689
689
  }
690
- return {formattedString: m, roundedNumber: xFinal, integerDigitsCount: int};
690
+ return { formattedString: m, roundedNumber: xFinal, integerDigitsCount: int };
691
691
  function adjustDecimalPlace(x2, magnitude) {
692
692
  return magnitude < 0 ? x2 * Math.pow(10, -magnitude) : x2 / Math.pow(10, magnitude);
693
693
  }
@@ -717,7 +717,7 @@
717
717
  }
718
718
  var a = m.slice(0, k - f);
719
719
  var b = m.slice(k - f);
720
- m = a + "." + b;
720
+ m = "".concat(a, ".").concat(b);
721
721
  int = a.length;
722
722
  } else {
723
723
  int = m.length;
@@ -730,7 +730,7 @@
730
730
  if (m[m.length - 1] === ".") {
731
731
  m = m.slice(0, -1);
732
732
  }
733
- return {formattedString: m, roundedNumber: xFinal, integerDigitsCount: int};
733
+ return { formattedString: m, roundedNumber: xFinal, integerDigitsCount: int };
734
734
  }
735
735
 
736
736
  // bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/NumberFormat/FormatNumericToString.js
@@ -766,7 +766,7 @@
766
766
  if (isNegative) {
767
767
  x = -x;
768
768
  }
769
- return {roundedNumber: x, formattedString: string};
769
+ return { roundedNumber: x, formattedString: string };
770
770
  }
771
771
 
772
772
  // bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/NumberFormat/ComputeExponent.js
@@ -806,14 +806,14 @@
806
806
  }
807
807
 
808
808
  // bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/NumberFormat/digit-mapping.generated.js
809
- var digitMapping = {"adlm": ["\uD83A\uDD50", "\uD83A\uDD51", "\uD83A\uDD52", "\uD83A\uDD53", "\uD83A\uDD54", "\uD83A\uDD55", "\uD83A\uDD56", "\uD83A\uDD57", "\uD83A\uDD58", "\uD83A\uDD59"], "ahom": ["\uD805\uDF30", "\uD805\uDF31", "\uD805\uDF32", "\uD805\uDF33", "\uD805\uDF34", "\uD805\uDF35", "\uD805\uDF36", "\uD805\uDF37", "\uD805\uDF38", "\uD805\uDF39"], "arab": ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"], "arabext": ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"], "bali": ["\u1B50", "\u1B51", "\u1B52", "\u1B53", "\u1B54", "\u1B55", "\u1B56", "\u1B57", "\u1B58", "\u1B59"], "beng": ["\u09E6", "\u09E7", "\u09E8", "\u09E9", "\u09EA", "\u09EB", "\u09EC", "\u09ED", "\u09EE", "\u09EF"], "bhks": ["\uD807\uDC50", "\uD807\uDC51", "\uD807\uDC52", "\uD807\uDC53", "\uD807\uDC54", "\uD807\uDC55", "\uD807\uDC56", "\uD807\uDC57", "\uD807\uDC58", "\uD807\uDC59"], "brah": ["\uD804\uDC66", "\uD804\uDC67", "\uD804\uDC68", "\uD804\uDC69", "\uD804\uDC6A", "\uD804\uDC6B", "\uD804\uDC6C", "\uD804\uDC6D", "\uD804\uDC6E", "\uD804\uDC6F"], "cakm": ["\uD804\uDD36", "\uD804\uDD37", "\uD804\uDD38", "\uD804\uDD39", "\uD804\uDD3A", "\uD804\uDD3B", "\uD804\uDD3C", "\uD804\uDD3D", "\uD804\uDD3E", "\uD804\uDD3F"], "cham": ["\uAA50", "\uAA51", "\uAA52", "\uAA53", "\uAA54", "\uAA55", "\uAA56", "\uAA57", "\uAA58", "\uAA59"], "deva": ["\u0966", "\u0967", "\u0968", "\u0969", "\u096A", "\u096B", "\u096C", "\u096D", "\u096E", "\u096F"], "diak": ["\uD806\uDD50", "\uD806\uDD51", "\uD806\uDD52", "\uD806\uDD53", "\uD806\uDD54", "\uD806\uDD55", "\uD806\uDD56", "\uD806\uDD57", "\uD806\uDD58", "\uD806\uDD59"], "fullwide": ["\uFF10", "\uFF11", "\uFF12", "\uFF13", "\uFF14", "\uFF15", "\uFF16", "\uFF17", "\uFF18", "\uFF19"], "gong": ["\uD807\uDDA0", "\uD807\uDDA1", "\uD807\uDDA2", "\uD807\uDDA3", "\uD807\uDDA4", "\uD807\uDDA5", "\uD807\uDDA6", "\uD807\uDDA7", "\uD807\uDDA8", "\uD807\uDDA9"], "gonm": ["\uD807\uDD50", "\uD807\uDD51", "\uD807\uDD52", "\uD807\uDD53", "\uD807\uDD54", "\uD807\uDD55", "\uD807\uDD56", "\uD807\uDD57", "\uD807\uDD58", "\uD807\uDD59"], "gujr": ["\u0AE6", "\u0AE7", "\u0AE8", "\u0AE9", "\u0AEA", "\u0AEB", "\u0AEC", "\u0AED", "\u0AEE", "\u0AEF"], "guru": ["\u0A66", "\u0A67", "\u0A68", "\u0A69", "\u0A6A", "\u0A6B", "\u0A6C", "\u0A6D", "\u0A6E", "\u0A6F"], "hanidec": ["\u3007", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u4E03", "\u516B", "\u4E5D"], "hmng": ["\uD81A\uDF50", "\uD81A\uDF51", "\uD81A\uDF52", "\uD81A\uDF53", "\uD81A\uDF54", "\uD81A\uDF55", "\uD81A\uDF56", "\uD81A\uDF57", "\uD81A\uDF58", "\uD81A\uDF59"], "hmnp": ["\uD838\uDD40", "\uD838\uDD41", "\uD838\uDD42", "\uD838\uDD43", "\uD838\uDD44", "\uD838\uDD45", "\uD838\uDD46", "\uD838\uDD47", "\uD838\uDD48", "\uD838\uDD49"], "java": ["\uA9D0", "\uA9D1", "\uA9D2", "\uA9D3", "\uA9D4", "\uA9D5", "\uA9D6", "\uA9D7", "\uA9D8", "\uA9D9"], "kali": ["\uA900", "\uA901", "\uA902", "\uA903", "\uA904", "\uA905", "\uA906", "\uA907", "\uA908", "\uA909"], "khmr": ["\u17E0", "\u17E1", "\u17E2", "\u17E3", "\u17E4", "\u17E5", "\u17E6", "\u17E7", "\u17E8", "\u17E9"], "knda": ["\u0CE6", "\u0CE7", "\u0CE8", "\u0CE9", "\u0CEA", "\u0CEB", "\u0CEC", "\u0CED", "\u0CEE", "\u0CEF"], "lana": ["\u1A80", "\u1A81", "\u1A82", "\u1A83", "\u1A84", "\u1A85", "\u1A86", "\u1A87", "\u1A88", "\u1A89"], "lanatham": ["\u1A90", "\u1A91", "\u1A92", "\u1A93", "\u1A94", "\u1A95", "\u1A96", "\u1A97", "\u1A98", "\u1A99"], "laoo": ["\u0ED0", "\u0ED1", "\u0ED2", "\u0ED3", "\u0ED4", "\u0ED5", "\u0ED6", "\u0ED7", "\u0ED8", "\u0ED9"], "lepc": ["\u1A90", "\u1A91", "\u1A92", "\u1A93", "\u1A94", "\u1A95", "\u1A96", "\u1A97", "\u1A98", "\u1A99"], "limb": ["\u1946", "\u1947", "\u1948", "\u1949", "\u194A", "\u194B", "\u194C", "\u194D", "\u194E", "\u194F"], "mathbold": ["\uD835\uDFCE", "\uD835\uDFCF", "\uD835\uDFD0", "\uD835\uDFD1", "\uD835\uDFD2", "\uD835\uDFD3", "\uD835\uDFD4", "\uD835\uDFD5", "\uD835\uDFD6", "\uD835\uDFD7"], "mathdbl": ["\uD835\uDFD8", "\uD835\uDFD9", "\uD835\uDFDA", "\uD835\uDFDB", "\uD835\uDFDC", "\uD835\uDFDD", "\uD835\uDFDE", "\uD835\uDFDF", "\uD835\uDFE0", "\uD835\uDFE1"], "mathmono": ["\uD835\uDFF6", "\uD835\uDFF7", "\uD835\uDFF8", "\uD835\uDFF9", "\uD835\uDFFA", "\uD835\uDFFB", "\uD835\uDFFC", "\uD835\uDFFD", "\uD835\uDFFE", "\uD835\uDFFF"], "mathsanb": ["\uD835\uDFEC", "\uD835\uDFED", "\uD835\uDFEE", "\uD835\uDFEF", "\uD835\uDFF0", "\uD835\uDFF1", "\uD835\uDFF2", "\uD835\uDFF3", "\uD835\uDFF4", "\uD835\uDFF5"], "mathsans": ["\uD835\uDFE2", "\uD835\uDFE3", "\uD835\uDFE4", "\uD835\uDFE5", "\uD835\uDFE6", "\uD835\uDFE7", "\uD835\uDFE8", "\uD835\uDFE9", "\uD835\uDFEA", "\uD835\uDFEB"], "mlym": ["\u0D66", "\u0D67", "\u0D68", "\u0D69", "\u0D6A", "\u0D6B", "\u0D6C", "\u0D6D", "\u0D6E", "\u0D6F"], "modi": ["\uD805\uDE50", "\uD805\uDE51", "\uD805\uDE52", "\uD805\uDE53", "\uD805\uDE54", "\uD805\uDE55", "\uD805\uDE56", "\uD805\uDE57", "\uD805\uDE58", "\uD805\uDE59"], "mong": ["\u1810", "\u1811", "\u1812", "\u1813", "\u1814", "\u1815", "\u1816", "\u1817", "\u1818", "\u1819"], "mroo": ["\uD81A\uDE60", "\uD81A\uDE61", "\uD81A\uDE62", "\uD81A\uDE63", "\uD81A\uDE64", "\uD81A\uDE65", "\uD81A\uDE66", "\uD81A\uDE67", "\uD81A\uDE68", "\uD81A\uDE69"], "mtei": ["\uABF0", "\uABF1", "\uABF2", "\uABF3", "\uABF4", "\uABF5", "\uABF6", "\uABF7", "\uABF8", "\uABF9"], "mymr": ["\u1040", "\u1041", "\u1042", "\u1043", "\u1044", "\u1045", "\u1046", "\u1047", "\u1048", "\u1049"], "mymrshan": ["\u1090", "\u1091", "\u1092", "\u1093", "\u1094", "\u1095", "\u1096", "\u1097", "\u1098", "\u1099"], "mymrtlng": ["\uA9F0", "\uA9F1", "\uA9F2", "\uA9F3", "\uA9F4", "\uA9F5", "\uA9F6", "\uA9F7", "\uA9F8", "\uA9F9"], "newa": ["\uD805\uDC50", "\uD805\uDC51", "\uD805\uDC52", "\uD805\uDC53", "\uD805\uDC54", "\uD805\uDC55", "\uD805\uDC56", "\uD805\uDC57", "\uD805\uDC58", "\uD805\uDC59"], "nkoo": ["\u07C0", "\u07C1", "\u07C2", "\u07C3", "\u07C4", "\u07C5", "\u07C6", "\u07C7", "\u07C8", "\u07C9"], "olck": ["\u1C50", "\u1C51", "\u1C52", "\u1C53", "\u1C54", "\u1C55", "\u1C56", "\u1C57", "\u1C58", "\u1C59"], "orya": ["\u0B66", "\u0B67", "\u0B68", "\u0B69", "\u0B6A", "\u0B6B", "\u0B6C", "\u0B6D", "\u0B6E", "\u0B6F"], "osma": ["\uD801\uDCA0", "\uD801\uDCA1", "\uD801\uDCA2", "\uD801\uDCA3", "\uD801\uDCA4", "\uD801\uDCA5", "\uD801\uDCA6", "\uD801\uDCA7", "\uD801\uDCA8", "\uD801\uDCA9"], "rohg": ["\uD803\uDD30", "\uD803\uDD31", "\uD803\uDD32", "\uD803\uDD33", "\uD803\uDD34", "\uD803\uDD35", "\uD803\uDD36", "\uD803\uDD37", "\uD803\uDD38", "\uD803\uDD39"], "saur": ["\uA8D0", "\uA8D1", "\uA8D2", "\uA8D3", "\uA8D4", "\uA8D5", "\uA8D6", "\uA8D7", "\uA8D8", "\uA8D9"], "segment": ["\uD83E\uDFF0", "\uD83E\uDFF1", "\uD83E\uDFF2", "\uD83E\uDFF3", "\uD83E\uDFF4", "\uD83E\uDFF5", "\uD83E\uDFF6", "\uD83E\uDFF7", "\uD83E\uDFF8", "\uD83E\uDFF9"], "shrd": ["\uD804\uDDD0", "\uD804\uDDD1", "\uD804\uDDD2", "\uD804\uDDD3", "\uD804\uDDD4", "\uD804\uDDD5", "\uD804\uDDD6", "\uD804\uDDD7", "\uD804\uDDD8", "\uD804\uDDD9"], "sind": ["\uD804\uDEF0", "\uD804\uDEF1", "\uD804\uDEF2", "\uD804\uDEF3", "\uD804\uDEF4", "\uD804\uDEF5", "\uD804\uDEF6", "\uD804\uDEF7", "\uD804\uDEF8", "\uD804\uDEF9"], "sinh": ["\u0DE6", "\u0DE7", "\u0DE8", "\u0DE9", "\u0DEA", "\u0DEB", "\u0DEC", "\u0DED", "\u0DEE", "\u0DEF"], "sora": ["\uD804\uDCF0", "\uD804\uDCF1", "\uD804\uDCF2", "\uD804\uDCF3", "\uD804\uDCF4", "\uD804\uDCF5", "\uD804\uDCF6", "\uD804\uDCF7", "\uD804\uDCF8", "\uD804\uDCF9"], "sund": ["\u1BB0", "\u1BB1", "\u1BB2", "\u1BB3", "\u1BB4", "\u1BB5", "\u1BB6", "\u1BB7", "\u1BB8", "\u1BB9"], "takr": ["\uD805\uDEC0", "\uD805\uDEC1", "\uD805\uDEC2", "\uD805\uDEC3", "\uD805\uDEC4", "\uD805\uDEC5", "\uD805\uDEC6", "\uD805\uDEC7", "\uD805\uDEC8", "\uD805\uDEC9"], "talu": ["\u19D0", "\u19D1", "\u19D2", "\u19D3", "\u19D4", "\u19D5", "\u19D6", "\u19D7", "\u19D8", "\u19D9"], "tamldec": ["\u0BE6", "\u0BE7", "\u0BE8", "\u0BE9", "\u0BEA", "\u0BEB", "\u0BEC", "\u0BED", "\u0BEE", "\u0BEF"], "telu": ["\u0C66", "\u0C67", "\u0C68", "\u0C69", "\u0C6A", "\u0C6B", "\u0C6C", "\u0C6D", "\u0C6E", "\u0C6F"], "thai": ["\u0E50", "\u0E51", "\u0E52", "\u0E53", "\u0E54", "\u0E55", "\u0E56", "\u0E57", "\u0E58", "\u0E59"], "tibt": ["\u0F20", "\u0F21", "\u0F22", "\u0F23", "\u0F24", "\u0F25", "\u0F26", "\u0F27", "\u0F28", "\u0F29"], "tirh": ["\uD805\uDCD0", "\uD805\uDCD1", "\uD805\uDCD2", "\uD805\uDCD3", "\uD805\uDCD4", "\uD805\uDCD5", "\uD805\uDCD6", "\uD805\uDCD7", "\uD805\uDCD8", "\uD805\uDCD9"], "vaii": ["\u1620", "\u1621", "\u1622", "\u1623", "\u1624", "\u1625", "\u1626", "\u1627", "\u1628", "\u1629"], "wara": ["\uD806\uDCE0", "\uD806\uDCE1", "\uD806\uDCE2", "\uD806\uDCE3", "\uD806\uDCE4", "\uD806\uDCE5", "\uD806\uDCE6", "\uD806\uDCE7", "\uD806\uDCE8", "\uD806\uDCE9"], "wcho": ["\uD838\uDEF0", "\uD838\uDEF1", "\uD838\uDEF2", "\uD838\uDEF3", "\uD838\uDEF4", "\uD838\uDEF5", "\uD838\uDEF6", "\uD838\uDEF7", "\uD838\uDEF8", "\uD838\uDEF9"]};
809
+ var digitMapping = { "adlm": ["\uD83A\uDD50", "\uD83A\uDD51", "\uD83A\uDD52", "\uD83A\uDD53", "\uD83A\uDD54", "\uD83A\uDD55", "\uD83A\uDD56", "\uD83A\uDD57", "\uD83A\uDD58", "\uD83A\uDD59"], "ahom": ["\uD805\uDF30", "\uD805\uDF31", "\uD805\uDF32", "\uD805\uDF33", "\uD805\uDF34", "\uD805\uDF35", "\uD805\uDF36", "\uD805\uDF37", "\uD805\uDF38", "\uD805\uDF39"], "arab": ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"], "arabext": ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"], "bali": ["\u1B50", "\u1B51", "\u1B52", "\u1B53", "\u1B54", "\u1B55", "\u1B56", "\u1B57", "\u1B58", "\u1B59"], "beng": ["\u09E6", "\u09E7", "\u09E8", "\u09E9", "\u09EA", "\u09EB", "\u09EC", "\u09ED", "\u09EE", "\u09EF"], "bhks": ["\uD807\uDC50", "\uD807\uDC51", "\uD807\uDC52", "\uD807\uDC53", "\uD807\uDC54", "\uD807\uDC55", "\uD807\uDC56", "\uD807\uDC57", "\uD807\uDC58", "\uD807\uDC59"], "brah": ["\uD804\uDC66", "\uD804\uDC67", "\uD804\uDC68", "\uD804\uDC69", "\uD804\uDC6A", "\uD804\uDC6B", "\uD804\uDC6C", "\uD804\uDC6D", "\uD804\uDC6E", "\uD804\uDC6F"], "cakm": ["\uD804\uDD36", "\uD804\uDD37", "\uD804\uDD38", "\uD804\uDD39", "\uD804\uDD3A", "\uD804\uDD3B", "\uD804\uDD3C", "\uD804\uDD3D", "\uD804\uDD3E", "\uD804\uDD3F"], "cham": ["\uAA50", "\uAA51", "\uAA52", "\uAA53", "\uAA54", "\uAA55", "\uAA56", "\uAA57", "\uAA58", "\uAA59"], "deva": ["\u0966", "\u0967", "\u0968", "\u0969", "\u096A", "\u096B", "\u096C", "\u096D", "\u096E", "\u096F"], "diak": ["\uD806\uDD50", "\uD806\uDD51", "\uD806\uDD52", "\uD806\uDD53", "\uD806\uDD54", "\uD806\uDD55", "\uD806\uDD56", "\uD806\uDD57", "\uD806\uDD58", "\uD806\uDD59"], "fullwide": ["\uFF10", "\uFF11", "\uFF12", "\uFF13", "\uFF14", "\uFF15", "\uFF16", "\uFF17", "\uFF18", "\uFF19"], "gong": ["\uD807\uDDA0", "\uD807\uDDA1", "\uD807\uDDA2", "\uD807\uDDA3", "\uD807\uDDA4", "\uD807\uDDA5", "\uD807\uDDA6", "\uD807\uDDA7", "\uD807\uDDA8", "\uD807\uDDA9"], "gonm": ["\uD807\uDD50", "\uD807\uDD51", "\uD807\uDD52", "\uD807\uDD53", "\uD807\uDD54", "\uD807\uDD55", "\uD807\uDD56", "\uD807\uDD57", "\uD807\uDD58", "\uD807\uDD59"], "gujr": ["\u0AE6", "\u0AE7", "\u0AE8", "\u0AE9", "\u0AEA", "\u0AEB", "\u0AEC", "\u0AED", "\u0AEE", "\u0AEF"], "guru": ["\u0A66", "\u0A67", "\u0A68", "\u0A69", "\u0A6A", "\u0A6B", "\u0A6C", "\u0A6D", "\u0A6E", "\u0A6F"], "hanidec": ["\u3007", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u4E03", "\u516B", "\u4E5D"], "hmng": ["\uD81A\uDF50", "\uD81A\uDF51", "\uD81A\uDF52", "\uD81A\uDF53", "\uD81A\uDF54", "\uD81A\uDF55", "\uD81A\uDF56", "\uD81A\uDF57", "\uD81A\uDF58", "\uD81A\uDF59"], "hmnp": ["\uD838\uDD40", "\uD838\uDD41", "\uD838\uDD42", "\uD838\uDD43", "\uD838\uDD44", "\uD838\uDD45", "\uD838\uDD46", "\uD838\uDD47", "\uD838\uDD48", "\uD838\uDD49"], "java": ["\uA9D0", "\uA9D1", "\uA9D2", "\uA9D3", "\uA9D4", "\uA9D5", "\uA9D6", "\uA9D7", "\uA9D8", "\uA9D9"], "kali": ["\uA900", "\uA901", "\uA902", "\uA903", "\uA904", "\uA905", "\uA906", "\uA907", "\uA908", "\uA909"], "khmr": ["\u17E0", "\u17E1", "\u17E2", "\u17E3", "\u17E4", "\u17E5", "\u17E6", "\u17E7", "\u17E8", "\u17E9"], "knda": ["\u0CE6", "\u0CE7", "\u0CE8", "\u0CE9", "\u0CEA", "\u0CEB", "\u0CEC", "\u0CED", "\u0CEE", "\u0CEF"], "lana": ["\u1A80", "\u1A81", "\u1A82", "\u1A83", "\u1A84", "\u1A85", "\u1A86", "\u1A87", "\u1A88", "\u1A89"], "lanatham": ["\u1A90", "\u1A91", "\u1A92", "\u1A93", "\u1A94", "\u1A95", "\u1A96", "\u1A97", "\u1A98", "\u1A99"], "laoo": ["\u0ED0", "\u0ED1", "\u0ED2", "\u0ED3", "\u0ED4", "\u0ED5", "\u0ED6", "\u0ED7", "\u0ED8", "\u0ED9"], "lepc": ["\u1A90", "\u1A91", "\u1A92", "\u1A93", "\u1A94", "\u1A95", "\u1A96", "\u1A97", "\u1A98", "\u1A99"], "limb": ["\u1946", "\u1947", "\u1948", "\u1949", "\u194A", "\u194B", "\u194C", "\u194D", "\u194E", "\u194F"], "mathbold": ["\uD835\uDFCE", "\uD835\uDFCF", "\uD835\uDFD0", "\uD835\uDFD1", "\uD835\uDFD2", "\uD835\uDFD3", "\uD835\uDFD4", "\uD835\uDFD5", "\uD835\uDFD6", "\uD835\uDFD7"], "mathdbl": ["\uD835\uDFD8", "\uD835\uDFD9", "\uD835\uDFDA", "\uD835\uDFDB", "\uD835\uDFDC", "\uD835\uDFDD", "\uD835\uDFDE", "\uD835\uDFDF", "\uD835\uDFE0", "\uD835\uDFE1"], "mathmono": ["\uD835\uDFF6", "\uD835\uDFF7", "\uD835\uDFF8", "\uD835\uDFF9", "\uD835\uDFFA", "\uD835\uDFFB", "\uD835\uDFFC", "\uD835\uDFFD", "\uD835\uDFFE", "\uD835\uDFFF"], "mathsanb": ["\uD835\uDFEC", "\uD835\uDFED", "\uD835\uDFEE", "\uD835\uDFEF", "\uD835\uDFF0", "\uD835\uDFF1", "\uD835\uDFF2", "\uD835\uDFF3", "\uD835\uDFF4", "\uD835\uDFF5"], "mathsans": ["\uD835\uDFE2", "\uD835\uDFE3", "\uD835\uDFE4", "\uD835\uDFE5", "\uD835\uDFE6", "\uD835\uDFE7", "\uD835\uDFE8", "\uD835\uDFE9", "\uD835\uDFEA", "\uD835\uDFEB"], "mlym": ["\u0D66", "\u0D67", "\u0D68", "\u0D69", "\u0D6A", "\u0D6B", "\u0D6C", "\u0D6D", "\u0D6E", "\u0D6F"], "modi": ["\uD805\uDE50", "\uD805\uDE51", "\uD805\uDE52", "\uD805\uDE53", "\uD805\uDE54", "\uD805\uDE55", "\uD805\uDE56", "\uD805\uDE57", "\uD805\uDE58", "\uD805\uDE59"], "mong": ["\u1810", "\u1811", "\u1812", "\u1813", "\u1814", "\u1815", "\u1816", "\u1817", "\u1818", "\u1819"], "mroo": ["\uD81A\uDE60", "\uD81A\uDE61", "\uD81A\uDE62", "\uD81A\uDE63", "\uD81A\uDE64", "\uD81A\uDE65", "\uD81A\uDE66", "\uD81A\uDE67", "\uD81A\uDE68", "\uD81A\uDE69"], "mtei": ["\uABF0", "\uABF1", "\uABF2", "\uABF3", "\uABF4", "\uABF5", "\uABF6", "\uABF7", "\uABF8", "\uABF9"], "mymr": ["\u1040", "\u1041", "\u1042", "\u1043", "\u1044", "\u1045", "\u1046", "\u1047", "\u1048", "\u1049"], "mymrshan": ["\u1090", "\u1091", "\u1092", "\u1093", "\u1094", "\u1095", "\u1096", "\u1097", "\u1098", "\u1099"], "mymrtlng": ["\uA9F0", "\uA9F1", "\uA9F2", "\uA9F3", "\uA9F4", "\uA9F5", "\uA9F6", "\uA9F7", "\uA9F8", "\uA9F9"], "newa": ["\uD805\uDC50", "\uD805\uDC51", "\uD805\uDC52", "\uD805\uDC53", "\uD805\uDC54", "\uD805\uDC55", "\uD805\uDC56", "\uD805\uDC57", "\uD805\uDC58", "\uD805\uDC59"], "nkoo": ["\u07C0", "\u07C1", "\u07C2", "\u07C3", "\u07C4", "\u07C5", "\u07C6", "\u07C7", "\u07C8", "\u07C9"], "olck": ["\u1C50", "\u1C51", "\u1C52", "\u1C53", "\u1C54", "\u1C55", "\u1C56", "\u1C57", "\u1C58", "\u1C59"], "orya": ["\u0B66", "\u0B67", "\u0B68", "\u0B69", "\u0B6A", "\u0B6B", "\u0B6C", "\u0B6D", "\u0B6E", "\u0B6F"], "osma": ["\uD801\uDCA0", "\uD801\uDCA1", "\uD801\uDCA2", "\uD801\uDCA3", "\uD801\uDCA4", "\uD801\uDCA5", "\uD801\uDCA6", "\uD801\uDCA7", "\uD801\uDCA8", "\uD801\uDCA9"], "rohg": ["\uD803\uDD30", "\uD803\uDD31", "\uD803\uDD32", "\uD803\uDD33", "\uD803\uDD34", "\uD803\uDD35", "\uD803\uDD36", "\uD803\uDD37", "\uD803\uDD38", "\uD803\uDD39"], "saur": ["\uA8D0", "\uA8D1", "\uA8D2", "\uA8D3", "\uA8D4", "\uA8D5", "\uA8D6", "\uA8D7", "\uA8D8", "\uA8D9"], "segment": ["\uD83E\uDFF0", "\uD83E\uDFF1", "\uD83E\uDFF2", "\uD83E\uDFF3", "\uD83E\uDFF4", "\uD83E\uDFF5", "\uD83E\uDFF6", "\uD83E\uDFF7", "\uD83E\uDFF8", "\uD83E\uDFF9"], "shrd": ["\uD804\uDDD0", "\uD804\uDDD1", "\uD804\uDDD2", "\uD804\uDDD3", "\uD804\uDDD4", "\uD804\uDDD5", "\uD804\uDDD6", "\uD804\uDDD7", "\uD804\uDDD8", "\uD804\uDDD9"], "sind": ["\uD804\uDEF0", "\uD804\uDEF1", "\uD804\uDEF2", "\uD804\uDEF3", "\uD804\uDEF4", "\uD804\uDEF5", "\uD804\uDEF6", "\uD804\uDEF7", "\uD804\uDEF8", "\uD804\uDEF9"], "sinh": ["\u0DE6", "\u0DE7", "\u0DE8", "\u0DE9", "\u0DEA", "\u0DEB", "\u0DEC", "\u0DED", "\u0DEE", "\u0DEF"], "sora": ["\uD804\uDCF0", "\uD804\uDCF1", "\uD804\uDCF2", "\uD804\uDCF3", "\uD804\uDCF4", "\uD804\uDCF5", "\uD804\uDCF6", "\uD804\uDCF7", "\uD804\uDCF8", "\uD804\uDCF9"], "sund": ["\u1BB0", "\u1BB1", "\u1BB2", "\u1BB3", "\u1BB4", "\u1BB5", "\u1BB6", "\u1BB7", "\u1BB8", "\u1BB9"], "takr": ["\uD805\uDEC0", "\uD805\uDEC1", "\uD805\uDEC2", "\uD805\uDEC3", "\uD805\uDEC4", "\uD805\uDEC5", "\uD805\uDEC6", "\uD805\uDEC7", "\uD805\uDEC8", "\uD805\uDEC9"], "talu": ["\u19D0", "\u19D1", "\u19D2", "\u19D3", "\u19D4", "\u19D5", "\u19D6", "\u19D7", "\u19D8", "\u19D9"], "tamldec": ["\u0BE6", "\u0BE7", "\u0BE8", "\u0BE9", "\u0BEA", "\u0BEB", "\u0BEC", "\u0BED", "\u0BEE", "\u0BEF"], "telu": ["\u0C66", "\u0C67", "\u0C68", "\u0C69", "\u0C6A", "\u0C6B", "\u0C6C", "\u0C6D", "\u0C6E", "\u0C6F"], "thai": ["\u0E50", "\u0E51", "\u0E52", "\u0E53", "\u0E54", "\u0E55", "\u0E56", "\u0E57", "\u0E58", "\u0E59"], "tibt": ["\u0F20", "\u0F21", "\u0F22", "\u0F23", "\u0F24", "\u0F25", "\u0F26", "\u0F27", "\u0F28", "\u0F29"], "tirh": ["\uD805\uDCD0", "\uD805\uDCD1", "\uD805\uDCD2", "\uD805\uDCD3", "\uD805\uDCD4", "\uD805\uDCD5", "\uD805\uDCD6", "\uD805\uDCD7", "\uD805\uDCD8", "\uD805\uDCD9"], "vaii": ["\u1620", "\u1621", "\u1622", "\u1623", "\u1624", "\u1625", "\u1626", "\u1627", "\u1628", "\u1629"], "wara": ["\uD806\uDCE0", "\uD806\uDCE1", "\uD806\uDCE2", "\uD806\uDCE3", "\uD806\uDCE4", "\uD806\uDCE5", "\uD806\uDCE6", "\uD806\uDCE7", "\uD806\uDCE8", "\uD806\uDCE9"], "wcho": ["\uD838\uDEF0", "\uD838\uDEF1", "\uD838\uDEF2", "\uD838\uDEF3", "\uD838\uDEF4", "\uD838\uDEF5", "\uD838\uDEF6", "\uD838\uDEF7", "\uD838\uDEF8", "\uD838\uDEF9"] };
810
810
 
811
811
  // bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/regex.generated.js
812
812
  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]/;
813
813
 
814
814
  // bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/NumberFormat/format_to_parts.js
815
- var CARET_S_UNICODE_REGEX = new RegExp("^" + S_UNICODE_REGEX.source);
816
- var S_DOLLAR_UNICODE_REGEX = new RegExp(S_UNICODE_REGEX.source + "$");
815
+ var CARET_S_UNICODE_REGEX = new RegExp("^".concat(S_UNICODE_REGEX.source));
816
+ var S_DOLLAR_UNICODE_REGEX = new RegExp("".concat(S_UNICODE_REGEX.source, "$"));
817
817
  var CLDR_NUMBER_PATTERN = /[#0](?:[\.,][#0]+)*/g;
818
818
  function formatToParts(numberResult, data, pl, options) {
819
819
  var sign = numberResult.sign, exponent = numberResult.exponent, magnitude = numberResult.magnitude;
@@ -863,11 +863,11 @@
863
863
  var currencyData = data.numbers.currency[numberingSystem] || data.numbers.currency[defaultNumberingSystem];
864
864
  var afterCurrency = currencyData.currencySpacing.afterInsertBetween;
865
865
  if (afterCurrency && !S_DOLLAR_UNICODE_REGEX.test(nonNameCurrencyPart)) {
866
- numberPattern = numberPattern.replace("\xA4{0}", "\xA4" + afterCurrency + "{0}");
866
+ numberPattern = numberPattern.replace("\xA4{0}", "\xA4".concat(afterCurrency, "{0}"));
867
867
  }
868
868
  var beforeCurrency = currencyData.currencySpacing.beforeInsertBetween;
869
869
  if (beforeCurrency && !CARET_S_UNICODE_REGEX.test(nonNameCurrencyPart)) {
870
- numberPattern = numberPattern.replace("{0}\xA4", "{0}" + beforeCurrency + "\xA4");
870
+ numberPattern = numberPattern.replace("{0}\xA4", "{0}".concat(beforeCurrency, "\xA4"));
871
871
  }
872
872
  }
873
873
  var numberPatternParts = numberPattern.split(/({c:[^}]+}|\{0\}|[¤%\-\+])/g);
@@ -884,16 +884,16 @@
884
884
  break;
885
885
  }
886
886
  case "-":
887
- numberParts.push({type: "minusSign", value: symbols.minusSign});
887
+ numberParts.push({ type: "minusSign", value: symbols.minusSign });
888
888
  break;
889
889
  case "+":
890
- numberParts.push({type: "plusSign", value: symbols.plusSign});
890
+ numberParts.push({ type: "plusSign", value: symbols.plusSign });
891
891
  break;
892
892
  case "%":
893
- numberParts.push({type: "percentSign", value: symbols.percentSign});
893
+ numberParts.push({ type: "percentSign", value: symbols.percentSign });
894
894
  break;
895
895
  case "\xA4":
896
- numberParts.push({type: "currency", value: nonNameCurrencyPart});
896
+ numberParts.push({ type: "currency", value: nonNameCurrencyPart });
897
897
  break;
898
898
  default:
899
899
  if (/^\{c:/.test(part)) {
@@ -902,7 +902,7 @@
902
902
  value: part.substring(3, part.length - 1)
903
903
  });
904
904
  } else {
905
- numberParts.push({type: "literal", value: part});
905
+ numberParts.push({ type: "literal", value: part });
906
906
  }
907
907
  break;
908
908
  }
@@ -927,11 +927,11 @@
927
927
  result.push.apply(result, numberParts);
928
928
  break;
929
929
  case "{1}":
930
- result.push({type: "currency", value: unitName});
930
+ result.push({ type: "currency", value: unitName });
931
931
  break;
932
932
  default:
933
933
  if (part) {
934
- result.push({type: "literal", value: part});
934
+ result.push({ type: "literal", value: part });
935
935
  }
936
936
  break;
937
937
  }
@@ -966,14 +966,14 @@
966
966
  var interpolateMatch = /^(\s*)\{0\}(\s*)$/.exec(part);
967
967
  if (interpolateMatch) {
968
968
  if (interpolateMatch[1]) {
969
- result.push({type: "literal", value: interpolateMatch[1]});
969
+ result.push({ type: "literal", value: interpolateMatch[1] });
970
970
  }
971
971
  result.push.apply(result, numberParts);
972
972
  if (interpolateMatch[2]) {
973
- result.push({type: "literal", value: interpolateMatch[2]});
973
+ result.push({ type: "literal", value: interpolateMatch[2] });
974
974
  }
975
975
  } else if (part) {
976
- result.push({type: "unit", value: part});
976
+ result.push({ type: "unit", value: part });
977
977
  }
978
978
  }
979
979
  return result;
@@ -986,9 +986,9 @@
986
986
  var result = [];
987
987
  var n = numberResult.formattedString, x = numberResult.roundedNumber;
988
988
  if (isNaN(x)) {
989
- return [{type: "nan", value: n}];
989
+ return [{ type: "nan", value: n }];
990
990
  } else if (!isFinite(x)) {
991
- return [{type: "infinity", value: n}];
991
+ return [{ type: "infinity", value: n }];
992
992
  }
993
993
  var digitReplacementTable = digitMapping[numberingSystem];
994
994
  if (digitReplacementTable) {
@@ -1030,21 +1030,21 @@
1030
1030
  }
1031
1031
  while (groups.length > 0) {
1032
1032
  var integerGroup = groups.pop();
1033
- result.push({type: "integer", value: integerGroup});
1033
+ result.push({ type: "integer", value: integerGroup });
1034
1034
  if (groups.length > 0) {
1035
- result.push({type: "group", value: groupSepSymbol});
1035
+ result.push({ type: "group", value: groupSepSymbol });
1036
1036
  }
1037
1037
  }
1038
1038
  } else {
1039
- result.push({type: "integer", value: integer});
1039
+ result.push({ type: "integer", value: integer });
1040
1040
  }
1041
1041
  if (fraction !== void 0) {
1042
- result.push({type: "decimal", value: symbols.decimal}, {type: "fraction", value: fraction});
1042
+ result.push({ type: "decimal", value: symbols.decimal }, { type: "fraction", value: fraction });
1043
1043
  }
1044
1044
  if ((notation === "scientific" || notation === "engineering") && isFinite(x)) {
1045
- result.push({type: "exponentSeparator", value: symbols.exponential});
1045
+ result.push({ type: "exponentSeparator", value: symbols.exponential });
1046
1046
  if (exponent < 0) {
1047
- result.push({type: "exponentMinusSign", value: symbols.minusSign});
1047
+ result.push({ type: "exponentMinusSign", value: symbols.minusSign });
1048
1048
  exponent = -exponent;
1049
1049
  }
1050
1050
  var exponentResult = ToRawFixed(exponent, 0, 0);
@@ -1057,7 +1057,7 @@
1057
1057
  }
1058
1058
  function getPatternForSign(pattern, sign) {
1059
1059
  if (pattern.indexOf(";") < 0) {
1060
- pattern = pattern + ";-" + pattern;
1060
+ pattern = "".concat(pattern, ";-").concat(pattern);
1061
1061
  }
1062
1062
  var _a = pattern.split(";"), zeroPattern = _a[0], negativePattern = _a[1];
1063
1063
  switch (sign) {
@@ -1066,7 +1066,7 @@
1066
1066
  case -1:
1067
1067
  return negativePattern;
1068
1068
  default:
1069
- return negativePattern.indexOf("-") >= 0 ? negativePattern.replace(/-/g, "+") : "+" + zeroPattern;
1069
+ return negativePattern.indexOf("-") >= 0 ? negativePattern.replace(/-/g, "+") : "+".concat(zeroPattern);
1070
1070
  }
1071
1071
  }
1072
1072
  function getCompactDisplayPattern(numberResult, pl, data, style, compactDisplay, currencyDisplay, numberingSystem) {
@@ -1158,7 +1158,7 @@
1158
1158
  sign = -1;
1159
1159
  }
1160
1160
  }
1161
- return formatToParts({roundedNumber: x, formattedString: n, exponent: exponent, magnitude: magnitude, sign: sign}, internalSlots.dataLocaleData, pl, internalSlots);
1161
+ return formatToParts({ roundedNumber: x, formattedString: n, exponent: exponent, magnitude: magnitude, sign: sign }, internalSlots.dataLocaleData, pl, internalSlots);
1162
1162
  }
1163
1163
 
1164
1164
  // bazel-out/darwin-fastbuild/bin/packages/ecma402-abstract/lib/NumberFormat/FormatNumericToParts.js
@@ -1255,24 +1255,24 @@
1255
1255
  opt.localeMatcher = matcher;
1256
1256
  var numberingSystem = GetOption(options, "numberingSystem", "string", void 0, void 0);
1257
1257
  if (numberingSystem !== void 0 && numberingSystemNames2.indexOf(numberingSystem) < 0) {
1258
- throw RangeError("Invalid numberingSystems: " + numberingSystem);
1258
+ throw RangeError("Invalid numberingSystems: ".concat(numberingSystem));
1259
1259
  }
1260
1260
  opt.nu = numberingSystem;
1261
1261
  var r = (0, import_intl_localematcher.ResolveLocale)(availableLocales, requestedLocales, opt, ["nu"], localeData, getDefaultLocale);
1262
1262
  var dataLocaleData = localeData[r.dataLocale];
1263
- invariant(!!dataLocaleData, "Missing locale data for " + r.dataLocale);
1263
+ invariant(!!dataLocaleData, "Missing locale data for ".concat(r.dataLocale));
1264
1264
  var internalSlots = getInternalSlots2(nf);
1265
1265
  internalSlots.locale = r.locale;
1266
1266
  internalSlots.dataLocale = r.dataLocale;
1267
1267
  internalSlots.numberingSystem = r.nu;
1268
1268
  internalSlots.dataLocaleData = dataLocaleData;
1269
- SetNumberFormatUnitOptions(nf, options, {getInternalSlots: getInternalSlots2});
1269
+ SetNumberFormatUnitOptions(nf, options, { getInternalSlots: getInternalSlots2 });
1270
1270
  var style = internalSlots.style;
1271
1271
  var mnfdDefault;
1272
1272
  var mxfdDefault;
1273
1273
  if (style === "currency") {
1274
1274
  var currency = internalSlots.currency;
1275
- var cDigits = CurrencyDigits(currency, {currencyDigitsData: currencyDigitsData2});
1275
+ var cDigits = CurrencyDigits(currency, { currencyDigitsData: currencyDigitsData2 });
1276
1276
  mnfdDefault = cDigits;
1277
1277
  mxfdDefault = cDigits;
1278
1278
  } else {
@@ -1309,7 +1309,7 @@
1309
1309
 
1310
1310
  // node_modules/tslib/tslib.es6.js
1311
1311
  var extendStatics = function(d, b) {
1312
- extendStatics = Object.setPrototypeOf || {__proto__: []} instanceof Array && function(d2, b2) {
1312
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
1313
1313
  d2.__proto__ = b2;
1314
1314
  } || function(d2, b2) {
1315
1315
  for (var p in b2)
@@ -1348,7 +1348,7 @@
1348
1348
  })(RangePatternType || (RangePatternType = {}));
1349
1349
 
1350
1350
  // bazel-out/darwin-fastbuild/bin/packages/intl-numberformat/lib/src/currency-digits.generated.js
1351
- var currencyDigitsData = {"ADP": 0, "AFN": 0, "ALL": 0, "AMD": 2, "BHD": 3, "BIF": 0, "BYN": 2, "BYR": 0, "CAD": 2, "CHF": 2, "CLF": 4, "CLP": 0, "COP": 2, "CRC": 2, "CZK": 2, "DEFAULT": 2, "DJF": 0, "DKK": 2, "ESP": 0, "GNF": 0, "GYD": 2, "HUF": 2, "IDR": 2, "IQD": 0, "IRR": 0, "ISK": 0, "ITL": 0, "JOD": 3, "JPY": 0, "KMF": 0, "KPW": 0, "KRW": 0, "KWD": 3, "LAK": 0, "LBP": 0, "LUF": 0, "LYD": 3, "MGA": 0, "MGF": 0, "MMK": 0, "MNT": 2, "MRO": 0, "MUR": 2, "NOK": 2, "OMR": 3, "PKR": 2, "PYG": 0, "RSD": 0, "RWF": 0, "SEK": 2, "SLL": 0, "SOS": 0, "STD": 0, "SYP": 0, "TMM": 0, "TND": 3, "TRL": 0, "TWD": 2, "TZS": 2, "UGX": 0, "UYI": 0, "UYW": 4, "UZS": 2, "VEF": 2, "VND": 0, "VUV": 0, "XAF": 0, "XOF": 0, "XPF": 0, "YER": 0, "ZMK": 0, "ZWD": 0};
1351
+ var currencyDigitsData = { "ADP": 0, "AFN": 0, "ALL": 0, "AMD": 2, "BHD": 3, "BIF": 0, "BYN": 2, "BYR": 0, "CAD": 2, "CHF": 2, "CLF": 4, "CLP": 0, "COP": 2, "CRC": 2, "CZK": 2, "DEFAULT": 2, "DJF": 0, "DKK": 2, "ESP": 0, "GNF": 0, "GYD": 2, "HUF": 2, "IDR": 2, "IQD": 0, "IRR": 0, "ISK": 0, "ITL": 0, "JOD": 3, "JPY": 0, "KMF": 0, "KPW": 0, "KRW": 0, "KWD": 3, "LAK": 0, "LBP": 0, "LUF": 0, "LYD": 3, "MGA": 0, "MGF": 0, "MMK": 0, "MNT": 2, "MRO": 0, "MUR": 2, "NOK": 2, "OMR": 3, "PKR": 2, "PYG": 0, "RSD": 0, "RWF": 0, "SEK": 2, "SLL": 0, "SOS": 0, "STD": 0, "SYP": 0, "TMM": 0, "TND": 3, "TRL": 0, "TWD": 2, "TZS": 2, "UGX": 0, "UYI": 0, "UYW": 4, "UZS": 2, "VEF": 2, "VND": 0, "VUV": 0, "XAF": 0, "XOF": 0, "XPF": 0, "YER": 0, "ZMK": 0, "ZWD": 0 };
1352
1352
 
1353
1353
  // bazel-out/darwin-fastbuild/bin/packages/intl-numberformat/lib/src/numbering-systems.generated.js
1354
1354
  var numberingSystemNames = ["adlm", "ahom", "arab", "arabext", "armn", "armnlow", "bali", "beng", "bhks", "brah", "cakm", "cham", "cyrl", "deva", "diak", "ethi", "fullwide", "geor", "gong", "gonm", "grek", "greklow", "gujr", "guru", "hanidays", "hanidec", "hans", "hansfin", "hant", "hantfin", "hebr", "hmng", "hmnp", "java", "jpan", "jpanfin", "jpanyear", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "roman", "romanlow", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "taml", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", "wcho"];
@@ -1399,7 +1399,7 @@
1399
1399
  var internalSlots = getInternalSlots(this);
1400
1400
  var dataLocale = internalSlots.dataLocale;
1401
1401
  var dataLocaleData = NumberFormat.localeData[dataLocale];
1402
- invariant(dataLocaleData !== void 0, "Cannot load locale-dependent data for " + dataLocale + ".");
1402
+ invariant(dataLocaleData !== void 0, "Cannot load locale-dependent data for ".concat(dataLocale, "."));
1403
1403
  internalSlots.pl = new Intl.PluralRules(dataLocale, {
1404
1404
  minimumFractionDigits: internalSlots.minimumFractionDigits,
1405
1405
  maximumFractionDigits: internalSlots.maximumFractionDigits,
@@ -1508,7 +1508,7 @@
1508
1508
  NumberFormat.__addUnitData = function __addUnitData(locale, unitsData) {
1509
1509
  var _a = NumberFormat.localeData, _b = locale, existingData = _a[_b];
1510
1510
  if (!existingData) {
1511
- throw new Error('Locale data for "' + locale + '" has not been loaded in NumberFormat. \nPlease __addLocaleData before adding additional unit data');
1511
+ throw new Error('Locale data for "'.concat(locale, '" has not been loaded in NumberFormat. \nPlease __addLocaleData before adding additional unit data'));
1512
1512
  }
1513
1513
  for (var unit in unitsData.simple) {
1514
1514
  existingData.units.simple[unit] = unitsData.simple[unit];
@@ -1566,6 +1566,12 @@
1566
1566
  return numberFormat.format(x);
1567
1567
  }
1568
1568
 
1569
+ // bazel-out/darwin-fastbuild/bin/packages/intl-numberformat/lib/should-polyfill.js
1570
+ var import_intl_localematcher3 = __toModule(require_intl_localematcher());
1571
+
1572
+ // bazel-out/darwin-fastbuild/bin/packages/intl-numberformat/lib/supported-locales.js
1573
+ var supportedLocales = ["af-NA", "af", "agq", "ak", "am", "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", "ar", "as", "asa", "ast", "az-Cyrl", "az-Latn", "az", "bas", "be", "bem", "bez", "bg", "bm", "bn-IN", "bn", "bo-IN", "bo", "br", "brx", "bs-Cyrl", "bs-Latn", "bs", "ca-AD", "ca-ES-VALENCIA", "ca-FR", "ca-IT", "ca", "ccp-IN", "ccp", "ce", "ceb", "cgg", "chr", "ckb-IR", "ckb", "cs", "cy", "da-GL", "da", "dav", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "de", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee-TG", "ee", "el-CY", "el", "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-US-POSIX", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "en", "eo", "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", "es", "et", "eu", "ewo", "fa-AF", "fa", "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-Adlm", "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", "ff-Latn", "ff", "fi", "fil", "fo-DK", "fo", "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", "fr", "fur", "fy", "ga-GB", "ga", "gd", "gl", "gsw-FR", "gsw-LI", "gsw", "gu", "guz", "gv", "ha-GH", "ha-NE", "ha", "haw", "he", "hi", "hr-BA", "hr", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it-CH", "it-SM", "it-VA", "it", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko-KP", "ko", "kok", "ks-Arab", "ks", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln-AO", "ln-CF", "ln-CG", "ln", "lo", "lrc-IQ", "lrc", "lt", "lu", "luo", "luy", "lv", "mai", "mas-TZ", "mas", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni-Beng", "mni", "mr", "ms-BN", "ms-ID", "ms-SG", "ms", "mt", "mua", "my", "mzn", "naq", "nb-SJ", "nb", "nd", "nds-NL", "nds", "ne-IN", "ne", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nl", "nmg", "nn", "nnh", "no", "nus", "nyn", "om-KE", "om", "or", "os-RU", "os", "pa-Arab", "pa-Guru", "pa", "pcm", "pl", "ps-PK", "ps", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "pt", "qu-BO", "qu-EC", "qu", "rm", "rn", "ro-MD", "ro", "rof", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "ru", "rw", "rwk", "sa", "sah", "saq", "sat-Olck", "sat", "sbp", "sd-Arab", "sd-Deva", "sd", "se-FI", "se-SE", "se", "seh", "ses", "sg", "shi-Latn", "shi-Tfng", "shi", "si", "sk", "sl", "smn", "sn", "so-DJ", "so-ET", "so-KE", "so", "sq-MK", "sq-XK", "sq", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Cyrl", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "sr-Latn", "sr", "su-Latn", "su", "sv-AX", "sv-FI", "sv", "sw-CD", "sw-KE", "sw-UG", "sw", "ta-LK", "ta-MY", "ta-SG", "ta", "te", "teo-KE", "teo", "tg", "th", "ti-ER", "ti", "tk", "to", "tr-CY", "tr", "tt", "twq", "tzm", "ug", "uk", "ur-IN", "ur", "uz-Arab", "uz-Cyrl", "uz-Latn", "uz", "vai-Latn", "vai-Vaii", "vai", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo-BJ", "yo", "yue-Hans", "yue-Hant", "yue", "zgh", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hans", "zh-Hant-HK", "zh-Hant-MO", "zh-Hant", "zh", "zu"];
1574
+
1569
1575
  // bazel-out/darwin-fastbuild/bin/packages/intl-numberformat/lib/should-polyfill.js
1570
1576
  function onlySupportsEn() {
1571
1577
  return !Intl.NumberFormat.polyfilled && !Intl.NumberFormat.supportedLocalesOf(["es"]).length;
@@ -1594,12 +1600,17 @@
1594
1600
  return Intl.NumberFormat.supportedLocalesOf(locales).length === locales.length;
1595
1601
  }
1596
1602
  function shouldPolyfill(locale) {
1597
- return typeof Intl === "undefined" || !("NumberFormat" in Intl) || !supportsES2020() || onlySupportsEn() || !supportedLocalesOf2(locale);
1603
+ if (locale === void 0) {
1604
+ locale = "en";
1605
+ }
1606
+ if (typeof Intl === "undefined" || !("NumberFormat" in Intl) || !supportsES2020() || onlySupportsEn() || !supportedLocalesOf2(locale)) {
1607
+ return locale ? (0, import_intl_localematcher3.match)([locale], supportedLocales, "en") : void 0;
1608
+ }
1598
1609
  }
1599
1610
 
1600
1611
  // bazel-out/darwin-fastbuild/bin/packages/intl-numberformat/lib/polyfill.js
1601
1612
  if (shouldPolyfill()) {
1602
- defineProperty(Intl, "NumberFormat", {value: NumberFormat});
1613
+ defineProperty(Intl, "NumberFormat", { value: NumberFormat });
1603
1614
  defineProperty(Number.prototype, "toLocaleString", {
1604
1615
  value: function toLocaleString2(locales, options) {
1605
1616
  return toLocaleString(this, locales, options);
package/polyfill.js CHANGED
@@ -4,11 +4,11 @@ var core_1 = require("./src/core");
4
4
  var to_locale_string_1 = require("./src/to_locale_string");
5
5
  var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
6
6
  var should_polyfill_1 = require("./should-polyfill");
7
- if (should_polyfill_1.shouldPolyfill()) {
8
- ecma402_abstract_1.defineProperty(Intl, 'NumberFormat', { value: core_1.NumberFormat });
9
- ecma402_abstract_1.defineProperty(Number.prototype, 'toLocaleString', {
7
+ if ((0, should_polyfill_1.shouldPolyfill)()) {
8
+ (0, ecma402_abstract_1.defineProperty)(Intl, 'NumberFormat', { value: core_1.NumberFormat });
9
+ (0, ecma402_abstract_1.defineProperty)(Number.prototype, 'toLocaleString', {
10
10
  value: function toLocaleString(locales, options) {
11
- return to_locale_string_1.toLocaleString(this, locales, options);
11
+ return (0, to_locale_string_1.toLocaleString)(this, locales, options);
12
12
  },
13
13
  });
14
14
  }
@@ -1,2 +1,2 @@
1
- export declare function shouldPolyfill(locale?: string | string[]): boolean;
1
+ export declare function shouldPolyfill(locale?: string): string | undefined;
2
2
  //# sourceMappingURL=should-polyfill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"should-polyfill.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-numberformat/should-polyfill.ts"],"names":[],"mappings":"AA8CA,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,WAQxD"}
1
+ {"version":3,"file":"should-polyfill.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-numberformat/should-polyfill.ts"],"names":[],"mappings":"AAgDA,wBAAgB,cAAc,CAAC,MAAM,SAAO,sBAU3C"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.shouldPolyfill = void 0;
4
+ var intl_localematcher_1 = require("@formatjs/intl-localematcher");
5
+ var supported_locales_1 = require("./supported-locales");
4
6
  /**
5
7
  * Check if this is old Node that only supports en
6
8
  * @returns
@@ -43,10 +45,13 @@ function supportedLocalesOf(locale) {
43
45
  return Intl.NumberFormat.supportedLocalesOf(locales).length === locales.length;
44
46
  }
45
47
  function shouldPolyfill(locale) {
46
- return (typeof Intl === 'undefined' ||
48
+ if (locale === void 0) { locale = 'en'; }
49
+ if (typeof Intl === 'undefined' ||
47
50
  !('NumberFormat' in Intl) ||
48
51
  !supportsES2020() ||
49
52
  onlySupportsEn() ||
50
- !supportedLocalesOf(locale));
53
+ !supportedLocalesOf(locale)) {
54
+ return locale ? (0, intl_localematcher_1.match)([locale], supported_locales_1.supportedLocales, 'en') : undefined;
55
+ }
51
56
  }
52
57
  exports.shouldPolyfill = shouldPolyfill;
package/src/core.js CHANGED
@@ -6,7 +6,7 @@ var ecma402_abstract_1 = require("@formatjs/ecma402-abstract");
6
6
  var currency_digits_generated_1 = require("./currency-digits.generated");
7
7
  var numbering_systems_generated_1 = require("./numbering-systems.generated");
8
8
  // eslint-disable-next-line import/no-cycle
9
- var get_internal_slots_1 = tslib_1.__importDefault(require("./get_internal_slots"));
9
+ var get_internal_slots_1 = (0, tslib_1.__importDefault)(require("./get_internal_slots"));
10
10
  var RESOLVED_OPTIONS_KEYS = [
11
11
  'locale',
12
12
  'numberingSystem',
@@ -31,10 +31,10 @@ var RESOLVED_OPTIONS_KEYS = [
31
31
  */
32
32
  exports.NumberFormat = function (locales, options) {
33
33
  // Cannot use `new.target` bc of IE11 & TS transpiles it to something else
34
- if (!this || !ecma402_abstract_1.OrdinaryHasInstance(exports.NumberFormat, this)) {
34
+ if (!this || !(0, ecma402_abstract_1.OrdinaryHasInstance)(exports.NumberFormat, this)) {
35
35
  return new exports.NumberFormat(locales, options);
36
36
  }
37
- ecma402_abstract_1.InitializeNumberFormat(this, locales, options, {
37
+ (0, ecma402_abstract_1.InitializeNumberFormat)(this, locales, options, {
38
38
  getInternalSlots: get_internal_slots_1.default,
39
39
  localeData: exports.NumberFormat.localeData,
40
40
  availableLocales: exports.NumberFormat.availableLocales,
@@ -42,10 +42,10 @@ exports.NumberFormat = function (locales, options) {
42
42
  currencyDigitsData: currency_digits_generated_1.currencyDigitsData,
43
43
  numberingSystemNames: numbering_systems_generated_1.numberingSystemNames,
44
44
  });
45
- var internalSlots = get_internal_slots_1.default(this);
45
+ var internalSlots = (0, get_internal_slots_1.default)(this);
46
46
  var dataLocale = internalSlots.dataLocale;
47
47
  var dataLocaleData = exports.NumberFormat.localeData[dataLocale];
48
- ecma402_abstract_1.invariant(dataLocaleData !== undefined, "Cannot load locale-dependent data for " + dataLocale + ".");
48
+ (0, ecma402_abstract_1.invariant)(dataLocaleData !== undefined, "Cannot load locale-dependent data for ".concat(dataLocale, "."));
49
49
  internalSlots.pl = new Intl.PluralRules(dataLocale, {
50
50
  minimumFractionDigits: internalSlots.minimumFractionDigits,
51
51
  maximumFractionDigits: internalSlots.maximumFractionDigits,
@@ -56,7 +56,7 @@ exports.NumberFormat = function (locales, options) {
56
56
  return this;
57
57
  };
58
58
  function formatToParts(x) {
59
- return ecma402_abstract_1.FormatNumericToParts(this, toNumeric(x), {
59
+ return (0, ecma402_abstract_1.FormatNumericToParts)(this, toNumeric(x), {
60
60
  getInternalSlots: get_internal_slots_1.default,
61
61
  });
62
62
  }
@@ -72,15 +72,15 @@ catch (e) {
72
72
  // In older browser (e.g Chrome 36 like polyfill.io)
73
73
  // TypeError: Cannot redefine property: name
74
74
  }
75
- ecma402_abstract_1.defineProperty(exports.NumberFormat.prototype, 'formatToParts', {
75
+ (0, ecma402_abstract_1.defineProperty)(exports.NumberFormat.prototype, 'formatToParts', {
76
76
  value: formatToParts,
77
77
  });
78
- ecma402_abstract_1.defineProperty(exports.NumberFormat.prototype, 'resolvedOptions', {
78
+ (0, ecma402_abstract_1.defineProperty)(exports.NumberFormat.prototype, 'resolvedOptions', {
79
79
  value: function resolvedOptions() {
80
- if (typeof this !== 'object' || !ecma402_abstract_1.OrdinaryHasInstance(exports.NumberFormat, this)) {
80
+ if (typeof this !== 'object' || !(0, ecma402_abstract_1.OrdinaryHasInstance)(exports.NumberFormat, this)) {
81
81
  throw TypeError('Method Intl.NumberFormat.prototype.resolvedOptions called on incompatible receiver');
82
82
  }
83
- var internalSlots = get_internal_slots_1.default(this);
83
+ var internalSlots = (0, get_internal_slots_1.default)(this);
84
84
  var ro = {};
85
85
  for (var _i = 0, RESOLVED_OPTIONS_KEYS_1 = RESOLVED_OPTIONS_KEYS; _i < RESOLVED_OPTIONS_KEYS_1.length; _i++) {
86
86
  var key = RESOLVED_OPTIONS_KEYS_1[_i];
@@ -96,10 +96,10 @@ var formatDescriptor = {
96
96
  enumerable: false,
97
97
  configurable: true,
98
98
  get: function () {
99
- if (typeof this !== 'object' || !ecma402_abstract_1.OrdinaryHasInstance(exports.NumberFormat, this)) {
99
+ if (typeof this !== 'object' || !(0, ecma402_abstract_1.OrdinaryHasInstance)(exports.NumberFormat, this)) {
100
100
  throw TypeError('Intl.NumberFormat format property accessor called on incompatible receiver');
101
101
  }
102
- var internalSlots = get_internal_slots_1.default(this);
102
+ var internalSlots = (0, get_internal_slots_1.default)(this);
103
103
  // eslint-disable-next-line @typescript-eslint/no-this-alias
104
104
  var numberFormat = this;
105
105
  var boundFormat = internalSlots.boundFormat;
@@ -146,9 +146,9 @@ catch (e) {
146
146
  }
147
147
  Object.defineProperty(exports.NumberFormat.prototype, 'format', formatDescriptor);
148
148
  // Static properties
149
- ecma402_abstract_1.defineProperty(exports.NumberFormat, 'supportedLocalesOf', {
149
+ (0, ecma402_abstract_1.defineProperty)(exports.NumberFormat, 'supportedLocalesOf', {
150
150
  value: function supportedLocalesOf(locales, options) {
151
- return ecma402_abstract_1.SupportedLocales(exports.NumberFormat.availableLocales, ecma402_abstract_1.CanonicalizeLocaleList(locales), options);
151
+ return (0, ecma402_abstract_1.SupportedLocales)(exports.NumberFormat.availableLocales, (0, ecma402_abstract_1.CanonicalizeLocaleList)(locales), options);
152
152
  },
153
153
  });
154
154
  exports.NumberFormat.__addLocaleData = function __addLocaleData() {
@@ -173,7 +173,7 @@ exports.NumberFormat.__addLocaleData = function __addLocaleData() {
173
173
  exports.NumberFormat.__addUnitData = function __addUnitData(locale, unitsData) {
174
174
  var _a = exports.NumberFormat.localeData, _b = locale, existingData = _a[_b];
175
175
  if (!existingData) {
176
- throw new Error("Locale data for \"" + locale + "\" has not been loaded in NumberFormat. \nPlease __addLocaleData before adding additional unit data");
176
+ throw new Error("Locale data for \"".concat(locale, "\" has not been loaded in NumberFormat. \nPlease __addLocaleData before adding additional unit data"));
177
177
  }
178
178
  for (var unit in unitsData.simple) {
179
179
  existingData.units.simple[unit] = unitsData.simple[unit];
@@ -193,7 +193,7 @@ function toNumeric(val) {
193
193
  if (typeof val === 'bigint') {
194
194
  return val;
195
195
  }
196
- return ecma402_abstract_1.ToNumber(val);
196
+ return (0, ecma402_abstract_1.ToNumber)(val);
197
197
  }
198
198
  try {
199
199
  // IE11 does not have Symbol
@@ -0,0 +1,2 @@
1
+ export declare const supportedLocales: string[];
2
+ //# sourceMappingURL=supported-locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supported-locales.d.ts","sourceRoot":"","sources":["../../../../../packages/intl-numberformat/supported-locales.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAA+nI,CAAA"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.supportedLocales = void 0;
4
+ // This file is generated from supported-locales-gen.ts
5
+ exports.supportedLocales = ["af-NA", "af", "agq", "ak", "am", "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", "ar", "as", "asa", "ast", "az-Cyrl", "az-Latn", "az", "bas", "be", "bem", "bez", "bg", "bm", "bn-IN", "bn", "bo-IN", "bo", "br", "brx", "bs-Cyrl", "bs-Latn", "bs", "ca-AD", "ca-ES-VALENCIA", "ca-FR", "ca-IT", "ca", "ccp-IN", "ccp", "ce", "ceb", "cgg", "chr", "ckb-IR", "ckb", "cs", "cy", "da-GL", "da", "dav", "de-AT", "de-BE", "de-CH", "de-IT", "de-LI", "de-LU", "de", "dje", "doi", "dsb", "dua", "dyo", "dz", "ebu", "ee-TG", "ee", "el-CY", "el", "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-US-POSIX", "en-VC", "en-VG", "en-VI", "en-VU", "en-WS", "en-ZA", "en-ZM", "en-ZW", "en", "eo", "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", "es", "et", "eu", "ewo", "fa-AF", "fa", "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-Adlm", "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", "ff-Latn", "ff", "fi", "fil", "fo-DK", "fo", "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", "fr", "fur", "fy", "ga-GB", "ga", "gd", "gl", "gsw-FR", "gsw-LI", "gsw", "gu", "guz", "gv", "ha-GH", "ha-NE", "ha", "haw", "he", "hi", "hr-BA", "hr", "hsb", "hu", "hy", "ia", "id", "ig", "ii", "is", "it-CH", "it-SM", "it-VA", "it", "ja", "jgo", "jmc", "jv", "ka", "kab", "kam", "kde", "kea", "khq", "ki", "kk", "kkj", "kl", "kln", "km", "kn", "ko-KP", "ko", "kok", "ks-Arab", "ks", "ksb", "ksf", "ksh", "ku", "kw", "ky", "lag", "lb", "lg", "lkt", "ln-AO", "ln-CF", "ln-CG", "ln", "lo", "lrc-IQ", "lrc", "lt", "lu", "luo", "luy", "lv", "mai", "mas-TZ", "mas", "mer", "mfe", "mg", "mgh", "mgo", "mi", "mk", "ml", "mn", "mni-Beng", "mni", "mr", "ms-BN", "ms-ID", "ms-SG", "ms", "mt", "mua", "my", "mzn", "naq", "nb-SJ", "nb", "nd", "nds-NL", "nds", "ne-IN", "ne", "nl-AW", "nl-BE", "nl-BQ", "nl-CW", "nl-SR", "nl-SX", "nl", "nmg", "nn", "nnh", "no", "nus", "nyn", "om-KE", "om", "or", "os-RU", "os", "pa-Arab", "pa-Guru", "pa", "pcm", "pl", "ps-PK", "ps", "pt-AO", "pt-CH", "pt-CV", "pt-GQ", "pt-GW", "pt-LU", "pt-MO", "pt-MZ", "pt-PT", "pt-ST", "pt-TL", "pt", "qu-BO", "qu-EC", "qu", "rm", "rn", "ro-MD", "ro", "rof", "ru-BY", "ru-KG", "ru-KZ", "ru-MD", "ru-UA", "ru", "rw", "rwk", "sa", "sah", "saq", "sat-Olck", "sat", "sbp", "sd-Arab", "sd-Deva", "sd", "se-FI", "se-SE", "se", "seh", "ses", "sg", "shi-Latn", "shi-Tfng", "shi", "si", "sk", "sl", "smn", "sn", "so-DJ", "so-ET", "so-KE", "so", "sq-MK", "sq-XK", "sq", "sr-Cyrl-BA", "sr-Cyrl-ME", "sr-Cyrl-XK", "sr-Cyrl", "sr-Latn-BA", "sr-Latn-ME", "sr-Latn-XK", "sr-Latn", "sr", "su-Latn", "su", "sv-AX", "sv-FI", "sv", "sw-CD", "sw-KE", "sw-UG", "sw", "ta-LK", "ta-MY", "ta-SG", "ta", "te", "teo-KE", "teo", "tg", "th", "ti-ER", "ti", "tk", "to", "tr-CY", "tr", "tt", "twq", "tzm", "ug", "uk", "ur-IN", "ur", "uz-Arab", "uz-Cyrl", "uz-Latn", "uz", "vai-Latn", "vai-Vaii", "vai", "vi", "vun", "wae", "wo", "xh", "xog", "yav", "yi", "yo-BJ", "yo", "yue-Hans", "yue-Hant", "yue", "zgh", "zh-Hans-HK", "zh-Hans-MO", "zh-Hans-SG", "zh-Hans", "zh-Hant-HK", "zh-Hant-MO", "zh-Hant", "zh", "zu"];