@formatjs/intl-datetimeformat 6.16.4 → 6.16.6

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.
Files changed (115) hide show
  1. package/README.md +1 -1
  2. package/index.js +0 -1
  3. package/lib/index.js +0 -1
  4. package/lib/polyfill-force.js +0 -1
  5. package/lib/polyfill.js +0 -1
  6. package/lib/should-polyfill.js +0 -1
  7. package/lib/src/abstract/BasicFormatMatcher.js +0 -1
  8. package/lib/src/abstract/BestFitFormatMatcher.js +0 -1
  9. package/lib/src/abstract/DateTimeStyleFormat.js +0 -1
  10. package/lib/src/abstract/FormatDateTime.js +0 -1
  11. package/lib/src/abstract/FormatDateTimePattern.js +0 -1
  12. package/lib/src/abstract/FormatDateTimeRange.js +0 -1
  13. package/lib/src/abstract/FormatDateTimeRangeToParts.js +0 -1
  14. package/lib/src/abstract/FormatDateTimeToParts.js +0 -1
  15. package/lib/src/abstract/InitializeDateTimeFormat.js +0 -1
  16. package/lib/src/abstract/PartitionDateTimePattern.js +0 -1
  17. package/lib/src/abstract/PartitionDateTimeRangePattern.js +0 -1
  18. package/lib/src/abstract/ToDateTimeOptions.js +0 -1
  19. package/lib/src/abstract/ToLocalTime.js +0 -1
  20. package/lib/src/abstract/skeleton.js +0 -1
  21. package/lib/src/abstract/utils.js +0 -1
  22. package/lib/src/core.js +0 -1
  23. package/lib/src/data/all-tz.js +0 -1
  24. package/lib/src/data/links.js +0 -1
  25. package/lib/src/get_internal_slots.js +0 -1
  26. package/lib/src/packer.js +0 -1
  27. package/lib/src/to_locale_string.js +0 -1
  28. package/lib/src/types.js +0 -1
  29. package/lib/supported-locales.generated.js +0 -1
  30. package/lib/test262-main.js +0 -1
  31. package/package.json +5 -5
  32. package/polyfill-force.js +0 -1
  33. package/polyfill.iife.js +157 -83
  34. package/polyfill.js +0 -1
  35. package/should-polyfill.js +0 -1
  36. package/src/abstract/BasicFormatMatcher.js +0 -1
  37. package/src/abstract/BestFitFormatMatcher.js +0 -1
  38. package/src/abstract/DateTimeStyleFormat.js +0 -1
  39. package/src/abstract/FormatDateTime.js +0 -1
  40. package/src/abstract/FormatDateTimePattern.js +0 -1
  41. package/src/abstract/FormatDateTimeRange.js +0 -1
  42. package/src/abstract/FormatDateTimeRangeToParts.js +0 -1
  43. package/src/abstract/FormatDateTimeToParts.js +0 -1
  44. package/src/abstract/InitializeDateTimeFormat.js +0 -1
  45. package/src/abstract/PartitionDateTimePattern.js +0 -1
  46. package/src/abstract/PartitionDateTimeRangePattern.js +0 -1
  47. package/src/abstract/ToDateTimeOptions.js +0 -1
  48. package/src/abstract/ToLocalTime.js +0 -1
  49. package/src/abstract/skeleton.js +0 -1
  50. package/src/abstract/utils.js +0 -1
  51. package/src/core.js +0 -1
  52. package/src/data/all-tz.js +0 -1
  53. package/src/data/links.js +0 -1
  54. package/src/get_internal_slots.js +0 -1
  55. package/src/packer.js +0 -1
  56. package/src/to_locale_string.js +0 -1
  57. package/src/types.js +0 -1
  58. package/supported-locales.generated.js +0 -1
  59. package/test262-main.js +0 -1
  60. package/index.js.map +0 -1
  61. package/lib/index.js.map +0 -1
  62. package/lib/polyfill-force.js.map +0 -1
  63. package/lib/polyfill.js.map +0 -1
  64. package/lib/should-polyfill.js.map +0 -1
  65. package/lib/src/abstract/BasicFormatMatcher.js.map +0 -1
  66. package/lib/src/abstract/BestFitFormatMatcher.js.map +0 -1
  67. package/lib/src/abstract/DateTimeStyleFormat.js.map +0 -1
  68. package/lib/src/abstract/FormatDateTime.js.map +0 -1
  69. package/lib/src/abstract/FormatDateTimePattern.js.map +0 -1
  70. package/lib/src/abstract/FormatDateTimeRange.js.map +0 -1
  71. package/lib/src/abstract/FormatDateTimeRangeToParts.js.map +0 -1
  72. package/lib/src/abstract/FormatDateTimeToParts.js.map +0 -1
  73. package/lib/src/abstract/InitializeDateTimeFormat.js.map +0 -1
  74. package/lib/src/abstract/PartitionDateTimePattern.js.map +0 -1
  75. package/lib/src/abstract/PartitionDateTimeRangePattern.js.map +0 -1
  76. package/lib/src/abstract/ToDateTimeOptions.js.map +0 -1
  77. package/lib/src/abstract/ToLocalTime.js.map +0 -1
  78. package/lib/src/abstract/skeleton.js.map +0 -1
  79. package/lib/src/abstract/utils.js.map +0 -1
  80. package/lib/src/core.js.map +0 -1
  81. package/lib/src/data/all-tz.js.map +0 -1
  82. package/lib/src/data/links.js.map +0 -1
  83. package/lib/src/get_internal_slots.js.map +0 -1
  84. package/lib/src/packer.js.map +0 -1
  85. package/lib/src/to_locale_string.js.map +0 -1
  86. package/lib/src/types.js.map +0 -1
  87. package/lib/supported-locales.generated.js.map +0 -1
  88. package/lib/test262-main.js.map +0 -1
  89. package/polyfill-force.js.map +0 -1
  90. package/polyfill.js.map +0 -1
  91. package/should-polyfill.js.map +0 -1
  92. package/src/abstract/BasicFormatMatcher.js.map +0 -1
  93. package/src/abstract/BestFitFormatMatcher.js.map +0 -1
  94. package/src/abstract/DateTimeStyleFormat.js.map +0 -1
  95. package/src/abstract/FormatDateTime.js.map +0 -1
  96. package/src/abstract/FormatDateTimePattern.js.map +0 -1
  97. package/src/abstract/FormatDateTimeRange.js.map +0 -1
  98. package/src/abstract/FormatDateTimeRangeToParts.js.map +0 -1
  99. package/src/abstract/FormatDateTimeToParts.js.map +0 -1
  100. package/src/abstract/InitializeDateTimeFormat.js.map +0 -1
  101. package/src/abstract/PartitionDateTimePattern.js.map +0 -1
  102. package/src/abstract/PartitionDateTimeRangePattern.js.map +0 -1
  103. package/src/abstract/ToDateTimeOptions.js.map +0 -1
  104. package/src/abstract/ToLocalTime.js.map +0 -1
  105. package/src/abstract/skeleton.js.map +0 -1
  106. package/src/abstract/utils.js.map +0 -1
  107. package/src/core.js.map +0 -1
  108. package/src/data/all-tz.js.map +0 -1
  109. package/src/data/links.js.map +0 -1
  110. package/src/get_internal_slots.js.map +0 -1
  111. package/src/packer.js.map +0 -1
  112. package/src/to_locale_string.js.map +0 -1
  113. package/src/types.js.map +0 -1
  114. package/supported-locales.generated.js.map +0 -1
  115. package/test262-main.js.map +0 -1
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # `intl-datetimeformat`
2
2
 
3
- We've migrated the docs to https://formatjs.io/docs/polyfills/intl-datetimeformat
3
+ We've migrated the docs to https://formatjs.github.io/docs/polyfills/intl-datetimeformat
package/index.js CHANGED
@@ -2,4 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./src/core"), exports);
5
- //# sourceMappingURL=index.js.map
package/lib/index.js CHANGED
@@ -1,2 +1 @@
1
1
  export * from './src/core';
2
- //# sourceMappingURL=index.js.map
@@ -42,4 +42,3 @@ defineProperty(Date.prototype, 'toLocaleTimeString', {
42
42
  }
43
43
  },
44
44
  });
45
- //# sourceMappingURL=polyfill-force.js.map
package/lib/polyfill.js CHANGED
@@ -35,4 +35,3 @@ if (shouldPolyfill()) {
35
35
  },
36
36
  });
37
37
  }
38
- //# sourceMappingURL=polyfill.js.map
@@ -59,4 +59,3 @@ export function shouldPolyfill(locale) {
59
59
  return locale ? match([locale], supportedLocales, 'en') : undefined;
60
60
  }
61
61
  }
62
- //# sourceMappingURL=should-polyfill.js.map
@@ -104,4 +104,3 @@ export function BasicFormatMatcher(options, formats) {
104
104
  }
105
105
  return __assign({}, bestFormat);
106
106
  }
107
- //# sourceMappingURL=BasicFormatMatcher.js.map
@@ -114,4 +114,3 @@ export function BestFitFormatMatcher(options, formats) {
114
114
  patternFormat.rangePatterns12 = skeletonFormat.rangePatterns12;
115
115
  return patternFormat;
116
116
  }
117
- //# sourceMappingURL=BestFitFormatMatcher.js.map
@@ -48,4 +48,3 @@ export function DateTimeStyleFormat(dateStyle, timeStyle, dataLocaleData) {
48
48
  invariant(dateStyle !== undefined, 'dateStyle should not be undefined');
49
49
  return dateFormat;
50
50
  }
51
- //# sourceMappingURL=DateTimeStyleFormat.js.map
@@ -13,4 +13,3 @@ export function FormatDateTime(dtf, x, implDetails) {
13
13
  }
14
14
  return result;
15
15
  }
16
- //# sourceMappingURL=FormatDateTime.js.map
@@ -184,4 +184,3 @@ export function FormatDateTimePattern(dtf, patternParts, x, _a) {
184
184
  }
185
185
  return result;
186
186
  }
187
- //# sourceMappingURL=FormatDateTimePattern.js.map
@@ -8,4 +8,3 @@ export function FormatDateTimeRange(dtf, x, y, implDetails) {
8
8
  }
9
9
  return result;
10
10
  }
11
- //# sourceMappingURL=FormatDateTimeRange.js.map
@@ -12,4 +12,3 @@ export function FormatDateTimeRangeToParts(dtf, x, y, implDetails) {
12
12
  }
13
13
  return result;
14
14
  }
15
- //# sourceMappingURL=FormatDateTimeRangeToParts.js.map
@@ -19,4 +19,3 @@ export function FormatDateTimeToParts(dtf, x, implDetails) {
19
19
  }
20
20
  return result;
21
21
  }
22
- //# sourceMappingURL=FormatDateTimeToParts.js.map
@@ -188,4 +188,3 @@ export function InitializeDateTimeFormat(dtf, locales, opts, _a) {
188
188
  internalSlots.rangePatterns = rangePatterns;
189
189
  return dtf; // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged
190
190
  }
191
- //# sourceMappingURL=InitializeDateTimeFormat.js.map
@@ -17,4 +17,3 @@ export function PartitionDateTimePattern(dtf, x, implDetails) {
17
17
  var pattern = internalSlots.pattern;
18
18
  return FormatDateTimePattern(dtf, PartitionPattern(pattern), x, implDetails);
19
19
  }
20
- //# sourceMappingURL=PartitionDateTimePattern.js.map
@@ -117,4 +117,3 @@ export function PartitionDateTimeRangePattern(dtf, x, y, implDetails) {
117
117
  }
118
118
  return result;
119
119
  }
120
- //# sourceMappingURL=PartitionDateTimeRangePattern.js.map
@@ -61,4 +61,3 @@ export function ToDateTimeOptions(options, required, defaults) {
61
61
  }
62
62
  return options;
63
63
  }
64
- //# sourceMappingURL=ToDateTimeOptions.js.map
@@ -48,4 +48,3 @@ export function ToLocalTime(t, calendar, timeZone, _a) {
48
48
  timeZoneOffset: timeZoneOffset,
49
49
  };
50
50
  }
51
- //# sourceMappingURL=ToLocalTime.js.map
@@ -292,4 +292,3 @@ export function splitRangePattern(pattern) {
292
292
  },
293
293
  ];
294
294
  }
295
- //# sourceMappingURL=skeleton.js.map
@@ -19,4 +19,3 @@ export var longMorePenalty = 6;
19
19
  export var shortLessPenalty = 6;
20
20
  export var shortMorePenalty = 3;
21
21
  export var offsetPenalty = 1;
22
- //# sourceMappingURL=utils.js.map
package/lib/src/core.js CHANGED
@@ -308,4 +308,3 @@ try {
308
308
  catch (e) {
309
309
  // Meta fix so we're test262-compliant, not important
310
310
  }
311
- //# sourceMappingURL=core.js.map
@@ -458,4 +458,3 @@ export default {
458
458
  "Pacific/Wallis|,0,372,0|-100f9dh,0,372,0|-100f9dg,99,192,0|NaN,99,192,0"
459
459
  ]
460
460
  };
461
- //# sourceMappingURL=all-tz.js.map
@@ -258,4 +258,3 @@ export default {
258
258
  "WET": "Europe/Lisbon",
259
259
  "Zulu": "Etc/UTC"
260
260
  };
261
- //# sourceMappingURL=links.js.map
@@ -9,4 +9,3 @@ export default function getInternalSlots(x) {
9
9
  }
10
10
  return internalSlots;
11
11
  }
12
- //# sourceMappingURL=get_internal_slots.js.map
package/lib/src/packer.js CHANGED
@@ -37,4 +37,3 @@ export function unpack(data) {
37
37
  }
38
38
  return zones;
39
39
  }
40
- //# sourceMappingURL=packer.js.map
@@ -17,4 +17,3 @@ export function toLocaleTimeString(x, locales, options) {
17
17
  var dtf = new DateTimeFormat(locales, ToDateTimeOptions(options, 'time', 'time'));
18
18
  return dtf.format(x);
19
19
  }
20
- //# sourceMappingURL=to_locale_string.js.map
package/lib/src/types.js CHANGED
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -1,2 +1 @@
1
1
  export 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"];
2
- //# sourceMappingURL=supported-locales.generated.js.map
@@ -23784,4 +23784,3 @@ Intl.DateTimeFormat.__addLocaleData({
23784
23784
  "locale": "zh"
23785
23785
  });
23786
23786
  Intl.DateTimeFormat.__addTZData(allData);
23787
- //# sourceMappingURL=test262-main.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formatjs/intl-datetimeformat",
3
- "version": "6.16.4",
3
+ "version": "6.16.6",
4
4
  "description": "Intl.DateTimeFormat polyfill",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -23,11 +23,11 @@
23
23
  "homepage": "https://github.com/formatjs/formatjs#readme",
24
24
  "dependencies": {
25
25
  "tslib": "2",
26
- "@formatjs/intl-localematcher": "0.5.7",
27
- "@formatjs/ecma402-abstract": "2.2.3"
26
+ "@formatjs/intl-localematcher": "0.5.8",
27
+ "@formatjs/ecma402-abstract": "2.2.5"
28
28
  },
29
29
  "devDependencies": {
30
- "@formatjs/intl-locale": "4.2.4",
31
- "@formatjs/intl-getcanonicallocales": "2.5.2"
30
+ "@formatjs/intl-getcanonicallocales": "2.5.3",
31
+ "@formatjs/intl-locale": "4.2.6"
32
32
  }
33
33
  }
package/polyfill-force.js CHANGED
@@ -44,4 +44,3 @@ var to_locale_string_1 = require("./src/to_locale_string");
44
44
  }
45
45
  },
46
46
  });
47
- //# sourceMappingURL=polyfill-force.js.map
package/polyfill.iife.js CHANGED
@@ -496,15 +496,21 @@
496
496
  var serializerDefault = function() {
497
497
  return JSON.stringify(arguments);
498
498
  };
499
- function ObjectWithoutPrototypeCache() {
500
- this.cache = /* @__PURE__ */ Object.create(null);
501
- }
502
- ObjectWithoutPrototypeCache.prototype.get = function(key) {
503
- return this.cache[key];
504
- };
505
- ObjectWithoutPrototypeCache.prototype.set = function(key, value) {
506
- this.cache[key] = value;
507
- };
499
+ var ObjectWithoutPrototypeCache = (
500
+ /** @class */
501
+ function() {
502
+ function ObjectWithoutPrototypeCache2() {
503
+ this.cache = /* @__PURE__ */ Object.create(null);
504
+ }
505
+ ObjectWithoutPrototypeCache2.prototype.get = function(key) {
506
+ return this.cache[key];
507
+ };
508
+ ObjectWithoutPrototypeCache2.prototype.set = function(key, value) {
509
+ this.cache[key] = value;
510
+ };
511
+ return ObjectWithoutPrototypeCache2;
512
+ }()
513
+ );
508
514
  var cacheDefault = {
509
515
  create: function create() {
510
516
  return new ObjectWithoutPrototypeCache();
@@ -4732,6 +4738,50 @@
4732
4738
  };
4733
4739
  }
4734
4740
 
4741
+ // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeUValue.js
4742
+ function CanonicalizeUValue(ukey, uvalue) {
4743
+ var lowerValue = uvalue.toLowerCase();
4744
+ invariant2(ukey !== void 0, "ukey must be defined");
4745
+ var canonicalized = lowerValue;
4746
+ return canonicalized;
4747
+ }
4748
+
4749
+ // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeUnicodeLocaleId.js
4750
+ function CanonicalizeUnicodeLocaleId(locale) {
4751
+ return Intl.getCanonicalLocales(locale)[0];
4752
+ }
4753
+
4754
+ // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/InsertUnicodeExtensionAndCanonicalize.js
4755
+ function InsertUnicodeExtensionAndCanonicalize(locale, attributes, keywords) {
4756
+ invariant2(locale.indexOf("-u-") === -1, "Expected locale to not have a Unicode locale extension");
4757
+ var extension = "-u";
4758
+ for (var _i = 0, attributes_1 = attributes; _i < attributes_1.length; _i++) {
4759
+ var attr = attributes_1[_i];
4760
+ extension += "-".concat(attr);
4761
+ }
4762
+ for (var _a = 0, keywords_1 = keywords; _a < keywords_1.length; _a++) {
4763
+ var kw = keywords_1[_a];
4764
+ var key = kw.key, value = kw.value;
4765
+ extension += "-".concat(key);
4766
+ if (value !== "") {
4767
+ extension += "-".concat(value);
4768
+ }
4769
+ }
4770
+ if (extension === "-u") {
4771
+ return CanonicalizeUnicodeLocaleId(locale);
4772
+ }
4773
+ var privateIndex = locale.indexOf("-x-");
4774
+ var newLocale;
4775
+ if (privateIndex === -1) {
4776
+ newLocale = locale + extension;
4777
+ } else {
4778
+ var preExtension = locale.slice(0, privateIndex);
4779
+ var postExtension = locale.slice(privateIndex);
4780
+ newLocale = preExtension + extension + postExtension;
4781
+ }
4782
+ return CanonicalizeUnicodeLocaleId(newLocale);
4783
+ }
4784
+
4735
4785
  // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js
4736
4786
  function BestAvailableLocale(availableLocales, locale) {
4737
4787
  var candidate = locale;
@@ -4769,47 +4819,50 @@
4769
4819
  return result;
4770
4820
  }
4771
4821
 
4772
- // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js
4773
- function UnicodeExtensionValue(extension, key) {
4774
- invariant2(key.length === 2, "key must have 2 elements");
4822
+ // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionComponents.js
4823
+ function UnicodeExtensionComponents(extension) {
4824
+ invariant2(extension === extension.toLowerCase(), "Expected extension to be lowercase");
4825
+ invariant2(extension.slice(0, 3) === "-u-", "Expected extension to be a Unicode locale extension");
4826
+ var attributes = [];
4827
+ var keywords = [];
4828
+ var keyword;
4775
4829
  var size = extension.length;
4776
- var searchValue = "-".concat(key, "-");
4777
- var pos = extension.indexOf(searchValue);
4778
- if (pos !== -1) {
4779
- var start = pos + 4;
4780
- var end = start;
4781
- var k = start;
4782
- var done = false;
4783
- while (!done) {
4784
- var e = extension.indexOf("-", k);
4785
- var len = void 0;
4786
- if (e === -1) {
4787
- len = size - k;
4788
- } else {
4789
- len = e - k;
4830
+ var k = 3;
4831
+ while (k < size) {
4832
+ var e = extension.indexOf("-", k);
4833
+ var len = void 0;
4834
+ if (e === -1) {
4835
+ len = size - k;
4836
+ } else {
4837
+ len = e - k;
4838
+ }
4839
+ var subtag = extension.slice(k, k + len);
4840
+ invariant2(len >= 2, "Expected a subtag to have at least 2 characters");
4841
+ if (keyword === void 0 && len != 2) {
4842
+ if (attributes.indexOf(subtag) === -1) {
4843
+ attributes.push(subtag);
4790
4844
  }
4791
- if (len === 2) {
4792
- done = true;
4793
- } else if (e === -1) {
4794
- end = size;
4795
- done = true;
4796
- } else {
4797
- end = e;
4798
- k = e + 1;
4845
+ } else if (len === 2) {
4846
+ keyword = { key: subtag, value: "" };
4847
+ if (keywords.find(function(k2) {
4848
+ return k2.key === (keyword === null || keyword === void 0 ? void 0 : keyword.key);
4849
+ }) === void 0) {
4850
+ keywords.push(keyword);
4799
4851
  }
4852
+ } else if ((keyword === null || keyword === void 0 ? void 0 : keyword.value) === "") {
4853
+ keyword.value = subtag;
4854
+ } else {
4855
+ invariant2(keyword !== void 0, "Expected keyword to be defined");
4856
+ keyword.value += "-" + subtag;
4800
4857
  }
4801
- return extension.slice(start, end);
4858
+ k += len + 1;
4802
4859
  }
4803
- searchValue = "-".concat(key);
4804
- pos = extension.indexOf(searchValue);
4805
- if (pos !== -1 && pos + 3 === size) {
4806
- return "";
4807
- }
4808
- return void 0;
4860
+ return { attributes, keywords };
4809
4861
  }
4810
4862
 
4811
4863
  // node_modules/.aspect_rules_js/@formatjs+intl-localematcher@0.0.0/node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js
4812
4864
  function ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData, getDefaultLocale) {
4865
+ var _a;
4813
4866
  var matcher = options.localeMatcher;
4814
4867
  var r;
4815
4868
  if (matcher === "lookup") {
@@ -4817,56 +4870,77 @@
4817
4870
  } else {
4818
4871
  r = BestFitMatcher(Array.from(availableLocales), requestedLocales, getDefaultLocale);
4819
4872
  }
4873
+ if (r == null) {
4874
+ r = {
4875
+ locale: getDefaultLocale(),
4876
+ extension: ""
4877
+ };
4878
+ }
4820
4879
  var foundLocale = r.locale;
4821
- var result = { locale: "", dataLocale: foundLocale };
4822
- var supportedExtension = "-u";
4823
- for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
4824
- var key = relevantExtensionKeys_1[_i];
4825
- invariant2(foundLocale in localeData, "Missing locale data for ".concat(foundLocale));
4826
- var foundLocaleData = localeData[foundLocale];
4827
- invariant2(typeof foundLocaleData === "object" && foundLocaleData !== null, "locale data ".concat(key, " must be an object"));
4828
- var keyLocaleData = foundLocaleData[key];
4829
- invariant2(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key, " must be an array"));
4880
+ var foundLocaleData = localeData[foundLocale];
4881
+ var result = { locale: "en", dataLocale: foundLocale };
4882
+ var components;
4883
+ var keywords;
4884
+ if (r.extension) {
4885
+ components = UnicodeExtensionComponents(r.extension);
4886
+ keywords = components.keywords;
4887
+ } else {
4888
+ keywords = [];
4889
+ }
4890
+ var supportedKeywords = [];
4891
+ var _loop_1 = function(key2) {
4892
+ var keyLocaleData = (_a = foundLocaleData === null || foundLocaleData === void 0 ? void 0 : foundLocaleData[key2]) !== null && _a !== void 0 ? _a : [];
4893
+ invariant2(Array.isArray(keyLocaleData), "keyLocaleData for ".concat(key2, " must be an array"));
4830
4894
  var value = keyLocaleData[0];
4831
- invariant2(typeof value === "string" || value === null, "value must be string or null but got ".concat(typeof value, " in key ").concat(key));
4832
- var supportedExtensionAddition = "";
4833
- if (r.extension) {
4834
- var requestedValue = UnicodeExtensionValue(r.extension, key);
4835
- if (requestedValue !== void 0) {
4836
- if (requestedValue !== "") {
4837
- if (~keyLocaleData.indexOf(requestedValue)) {
4838
- value = requestedValue;
4839
- supportedExtensionAddition = "-".concat(key, "-").concat(value);
4840
- }
4841
- } else if (~requestedValue.indexOf("true")) {
4842
- value = "true";
4843
- supportedExtensionAddition = "-".concat(key);
4895
+ invariant2(value === void 0 || typeof value === "string", "value must be a string or undefined");
4896
+ var supportedKeyword = void 0;
4897
+ var entry = keywords.find(function(k) {
4898
+ return k.key === key2;
4899
+ });
4900
+ if (entry) {
4901
+ var requestedValue = entry.value;
4902
+ if (requestedValue !== "") {
4903
+ if (keyLocaleData.indexOf(requestedValue) > -1) {
4904
+ value = requestedValue;
4905
+ supportedKeyword = {
4906
+ key: key2,
4907
+ value
4908
+ };
4844
4909
  }
4910
+ } else if (keyLocaleData.indexOf("true") > -1) {
4911
+ value = "true";
4912
+ supportedKeyword = {
4913
+ key: key2,
4914
+ value
4915
+ };
4845
4916
  }
4846
4917
  }
4847
- if (key in options) {
4848
- var optionsValue = options[key];
4849
- invariant2(typeof optionsValue === "string" || typeof optionsValue === "undefined" || optionsValue === null, "optionsValue must be String, Undefined or Null");
4850
- if (~keyLocaleData.indexOf(optionsValue)) {
4851
- if (optionsValue !== value) {
4852
- value = optionsValue;
4853
- supportedExtensionAddition = "";
4854
- }
4918
+ var optionsValue = options[key2];
4919
+ invariant2(optionsValue == null || typeof optionsValue === "string", "optionsValue must be a string or undefined");
4920
+ if (typeof optionsValue === "string") {
4921
+ var ukey = key2.toLowerCase();
4922
+ optionsValue = CanonicalizeUValue(ukey, optionsValue);
4923
+ if (optionsValue === "") {
4924
+ optionsValue = "true";
4855
4925
  }
4856
4926
  }
4857
- result[key] = value;
4858
- supportedExtension += supportedExtensionAddition;
4859
- }
4860
- if (supportedExtension.length > 2) {
4861
- var privateIndex = foundLocale.indexOf("-x-");
4862
- if (privateIndex === -1) {
4863
- foundLocale = foundLocale + supportedExtension;
4864
- } else {
4865
- var preExtension = foundLocale.slice(0, privateIndex);
4866
- var postExtension = foundLocale.slice(privateIndex, foundLocale.length);
4867
- foundLocale = preExtension + supportedExtension + postExtension;
4927
+ if (optionsValue !== value && keyLocaleData.indexOf(optionsValue) > -1) {
4928
+ value = optionsValue;
4929
+ supportedKeyword = void 0;
4868
4930
  }
4869
- foundLocale = Intl.getCanonicalLocales(foundLocale)[0];
4931
+ if (supportedKeyword) {
4932
+ supportedKeywords.push(supportedKeyword);
4933
+ }
4934
+ result[key2] = value;
4935
+ };
4936
+ for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {
4937
+ var key = relevantExtensionKeys_1[_i];
4938
+ _loop_1(key);
4939
+ }
4940
+ var supportedAttributes = [];
4941
+ if (supportedKeywords.length > 0) {
4942
+ supportedAttributes = [];
4943
+ foundLocale = InsertUnicodeExtensionAndCanonicalize(foundLocale, supportedAttributes, supportedKeywords);
4870
4944
  }
4871
4945
  result.locale = foundLocale;
4872
4946
  return result;
package/polyfill.js CHANGED
@@ -37,4 +37,3 @@ if ((0, should_polyfill_1.shouldPolyfill)()) {
37
37
  },
38
38
  });
39
39
  }
40
- //# sourceMappingURL=polyfill.js.map
@@ -62,4 +62,3 @@ function shouldPolyfill(locale) {
62
62
  return locale ? (0, intl_localematcher_1.match)([locale], supported_locales_generated_1.supportedLocales, 'en') : undefined;
63
63
  }
64
64
  }
65
- //# sourceMappingURL=should-polyfill.js.map
@@ -107,4 +107,3 @@ function BasicFormatMatcher(options, formats) {
107
107
  }
108
108
  return tslib_1.__assign({}, bestFormat);
109
109
  }
110
- //# sourceMappingURL=BasicFormatMatcher.js.map
@@ -118,4 +118,3 @@ function BestFitFormatMatcher(options, formats) {
118
118
  patternFormat.rangePatterns12 = skeletonFormat.rangePatterns12;
119
119
  return patternFormat;
120
120
  }
121
- //# sourceMappingURL=BestFitFormatMatcher.js.map
@@ -51,4 +51,3 @@ function DateTimeStyleFormat(dateStyle, timeStyle, dataLocaleData) {
51
51
  (0, ecma402_abstract_1.invariant)(dateStyle !== undefined, 'dateStyle should not be undefined');
52
52
  return dateFormat;
53
53
  }
54
- //# sourceMappingURL=DateTimeStyleFormat.js.map
@@ -16,4 +16,3 @@ function FormatDateTime(dtf, x, implDetails) {
16
16
  }
17
17
  return result;
18
18
  }
19
- //# sourceMappingURL=FormatDateTime.js.map
@@ -187,4 +187,3 @@ function FormatDateTimePattern(dtf, patternParts, x, _a) {
187
187
  }
188
188
  return result;
189
189
  }
190
- //# sourceMappingURL=FormatDateTimePattern.js.map
@@ -11,4 +11,3 @@ function FormatDateTimeRange(dtf, x, y, implDetails) {
11
11
  }
12
12
  return result;
13
13
  }
14
- //# sourceMappingURL=FormatDateTimeRange.js.map
@@ -15,4 +15,3 @@ function FormatDateTimeRangeToParts(dtf, x, y, implDetails) {
15
15
  }
16
16
  return result;
17
17
  }
18
- //# sourceMappingURL=FormatDateTimeRangeToParts.js.map
@@ -22,4 +22,3 @@ function FormatDateTimeToParts(dtf, x, implDetails) {
22
22
  }
23
23
  return result;
24
24
  }
25
- //# sourceMappingURL=FormatDateTimeToParts.js.map
@@ -191,4 +191,3 @@ function InitializeDateTimeFormat(dtf, locales, opts, _a) {
191
191
  internalSlots.rangePatterns = rangePatterns;
192
192
  return dtf; // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged
193
193
  }
194
- //# sourceMappingURL=InitializeDateTimeFormat.js.map
@@ -20,4 +20,3 @@ function PartitionDateTimePattern(dtf, x, implDetails) {
20
20
  var pattern = internalSlots.pattern;
21
21
  return (0, FormatDateTimePattern_1.FormatDateTimePattern)(dtf, (0, ecma402_abstract_1.PartitionPattern)(pattern), x, implDetails);
22
22
  }
23
- //# sourceMappingURL=PartitionDateTimePattern.js.map
@@ -120,4 +120,3 @@ function PartitionDateTimeRangePattern(dtf, x, y, implDetails) {
120
120
  }
121
121
  return result;
122
122
  }
123
- //# sourceMappingURL=PartitionDateTimeRangePattern.js.map
@@ -64,4 +64,3 @@ function ToDateTimeOptions(options, required, defaults) {
64
64
  }
65
65
  return options;
66
66
  }
67
- //# sourceMappingURL=ToDateTimeOptions.js.map
@@ -51,4 +51,3 @@ function ToLocalTime(t, calendar, timeZone, _a) {
51
51
  timeZoneOffset: timeZoneOffset,
52
52
  };
53
53
  }
54
- //# sourceMappingURL=ToLocalTime.js.map
@@ -298,4 +298,3 @@ function splitRangePattern(pattern) {
298
298
  },
299
299
  ];
300
300
  }
301
- //# sourceMappingURL=skeleton.js.map
@@ -22,4 +22,3 @@ exports.longMorePenalty = 6;
22
22
  exports.shortLessPenalty = 6;
23
23
  exports.shortMorePenalty = 3;
24
24
  exports.offsetPenalty = 1;
25
- //# sourceMappingURL=utils.js.map