{"version":3,"file":"intl-displaynames.min.js","sources":["../../../intl-utils/lib/invariant.js","../../../intl-utils/lib/polyfill-utils.js","../../../intl-utils/lib/get-canonical-locales.js","../../../intl-utils/lib/resolve-locale.js","../../lib/index.js"],"sourcesContent":["export function invariant(condition, message, Err) {\n if (Err === void 0) { Err = Error; }\n if (!condition) {\n throw new Err(message);\n }\n}\n//# sourceMappingURL=invariant.js.map","import aliases from './aliases';\nimport parentLocales from './parentLocales';\nimport { invariant } from './invariant';\n/**\n * https://tc39.es/ecma262/#sec-toobject\n * @param arg\n */\nexport function toObject(arg) {\n if (arg == null) {\n throw new TypeError('undefined/null cannot be converted to object');\n }\n return Object(arg);\n}\n/**\n * https://tc39.es/ecma262/#sec-tostring\n */\nexport function toString(o) {\n // Only symbol is irregular...\n if (typeof o === 'symbol') {\n throw TypeError('Cannot convert a Symbol value to a string');\n }\n return String(o);\n}\n/**\n * https://tc39.es/ecma402/#sec-getoption\n * @param opts\n * @param prop\n * @param type\n * @param values\n * @param fallback\n */\nexport function getOption(opts, prop, type, values, fallback) {\n // const descriptor = Object.getOwnPropertyDescriptor(opts, prop);\n var value = opts[prop];\n if (value !== undefined) {\n if (type !== 'boolean' && type !== 'string') {\n throw new TypeError('invalid type');\n }\n if (type === 'boolean') {\n value = Boolean(value);\n }\n if (type === 'string') {\n value = toString(value);\n }\n if (values !== undefined && !values.filter(function (val) { return val == value; }).length) {\n throw new RangeError(value + \" is not within \" + values.join(', '));\n }\n return value;\n }\n return fallback;\n}\n/**\n * https://tc39.es/ecma402/#sec-defaultnumberoption\n * @param val\n * @param min\n * @param max\n * @param fallback\n */\nexport function defaultNumberOption(val, min, max, fallback) {\n if (val !== undefined) {\n val = Number(val);\n if (isNaN(val) || val < min || val > max) {\n throw new RangeError(val + \" is outside of range [\" + min + \", \" + max + \"]\");\n }\n return Math.floor(val);\n }\n return fallback;\n}\n/**\n * https://tc39.es/ecma402/#sec-getnumberoption\n * @param options\n * @param property\n * @param min\n * @param max\n * @param fallback\n */\nexport function getNumberOption(options, property, minimum, maximum, fallback) {\n var val = options[property];\n return defaultNumberOption(val, minimum, maximum, fallback);\n}\nexport function getAliasesByLang(lang) {\n return Object.keys(aliases).reduce(function (all, locale) {\n if (locale.split('-')[0] === lang) {\n all[locale] = aliases[locale];\n }\n return all;\n }, {});\n}\nexport function getParentLocalesByLang(lang) {\n return Object.keys(parentLocales).reduce(function (all, locale) {\n if (locale.split('-')[0] === lang) {\n all[locale] = parentLocales[locale];\n }\n return all;\n }, {});\n}\nexport function setInternalSlot(map, pl, field, value) {\n if (!map.get(pl)) {\n map.set(pl, Object.create(null));\n }\n var slots = map.get(pl);\n slots[field] = value;\n}\nexport function setMultiInternalSlots(map, pl, props) {\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\n var k = _a[_i];\n setInternalSlot(map, pl, k, props[k]);\n }\n}\nexport function getInternalSlot(map, pl, field) {\n return getMultiInternalSlots(map, pl, field)[field];\n}\nexport function getMultiInternalSlots(map, pl) {\n var fields = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n fields[_i - 2] = arguments[_i];\n }\n var slots = map.get(pl);\n if (!slots) {\n throw new TypeError(pl + \" InternalSlot has not been initialized\");\n }\n return fields.reduce(function (all, f) {\n all[f] = slots[f];\n return all;\n }, Object.create(null));\n}\nexport function isLiteralPart(patternPart) {\n return patternPart.type === 'literal';\n}\nexport function partitionPattern(pattern) {\n var result = [];\n var beginIndex = pattern.indexOf('{');\n var endIndex = 0;\n var nextIndex = 0;\n var length = pattern.length;\n while (beginIndex < pattern.length && beginIndex > -1) {\n endIndex = pattern.indexOf('}', beginIndex);\n invariant(endIndex > beginIndex, \"Invalid pattern \" + pattern);\n if (beginIndex > nextIndex) {\n result.push({\n type: 'literal',\n value: pattern.substring(nextIndex, beginIndex),\n });\n }\n result.push({\n type: pattern.substring(beginIndex + 1, endIndex),\n value: undefined,\n });\n nextIndex = endIndex + 1;\n beginIndex = pattern.indexOf('{', nextIndex);\n }\n if (nextIndex < length) {\n result.push({\n type: 'literal',\n value: pattern.substring(nextIndex, length),\n });\n }\n return result;\n}\n/**\n * https://tc39.es/ecma402/#sec-setnfdigitoptions\n * https://tc39.es/proposal-unified-intl-numberformat/section11/numberformat_diff_out.html#sec-setnfdigitoptions\n * @param intlObj\n * @param opts\n * @param mnfdDefault\n * @param mxfdDefault\n */\nexport function setNumberFormatDigitOptions(internalSlotMap, intlObj, opts, mnfdDefault, mxfdDefault) {\n var mnid = getNumberOption(opts, 'minimumIntegerDigits', 1, 21, 1);\n var mnfd = opts.minimumFractionDigits;\n var mxfd = opts.maximumFractionDigits;\n var mnsd = opts.minimumSignificantDigits;\n var mxsd = opts.maximumSignificantDigits;\n setInternalSlot(internalSlotMap, intlObj, 'minimumIntegerDigits', mnid);\n if (mnsd !== undefined || mxsd !== undefined) {\n setInternalSlot(internalSlotMap, intlObj, 'roundingType', 'significantDigits');\n mnsd = defaultNumberOption(mnsd, 1, 21, 1);\n mxsd = defaultNumberOption(mxsd, mnsd, 21, 21);\n setInternalSlot(internalSlotMap, intlObj, 'minimumSignificantDigits', mnsd);\n setInternalSlot(internalSlotMap, intlObj, 'maximumSignificantDigits', mxsd);\n }\n else if (mnfd !== undefined || mxfd !== undefined) {\n setInternalSlot(internalSlotMap, intlObj, 'roundingType', 'fractionDigits');\n mnfd = defaultNumberOption(mnfd, 0, 20, mnfdDefault);\n var mxfdActualDefault = Math.max(mnfd, mxfdDefault);\n mxfd = defaultNumberOption(mxfd, mnfd, 20, mxfdActualDefault);\n setInternalSlot(internalSlotMap, intlObj, 'minimumFractionDigits', mnfd);\n setInternalSlot(internalSlotMap, intlObj, 'maximumFractionDigits', mxfd);\n }\n else if (getInternalSlot(internalSlotMap, intlObj, 'notation') === 'compact') {\n setInternalSlot(internalSlotMap, intlObj, 'roundingType', 'compactRounding');\n }\n else {\n setInternalSlot(internalSlotMap, intlObj, 'roundingType', 'fractionDigits');\n setInternalSlot(internalSlotMap, intlObj, 'minimumFractionDigits', mnfdDefault);\n setInternalSlot(internalSlotMap, intlObj, 'maximumFractionDigits', mxfdDefault);\n }\n}\nexport function objectIs(x, y) {\n if (Object.is) {\n return Object.is(x, y);\n }\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n }\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n}\nvar NOT_A_Z_REGEX = /[^A-Z]/;\n/**\n * This follows https://tc39.es/ecma402/#sec-case-sensitivity-and-case-mapping\n * @param str string to convert\n */\nfunction toUpperCase(str) {\n return str.replace(/([a-z])/g, function (_, c) { return c.toUpperCase(); });\n}\n/**\n * https://tc39.es/proposal-unified-intl-numberformat/section6/locales-currencies-tz_proposed_out.html#sec-iswellformedcurrencycode\n * @param currency\n */\nexport function isWellFormedCurrencyCode(currency) {\n currency = toUpperCase(currency);\n if (currency.length !== 3) {\n return false;\n }\n if (NOT_A_Z_REGEX.test(currency)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=polyfill-utils.js.map","/**\n * IE11-safe version of getCanonicalLocales since it's ES2016\n * @param locales locales\n */\nexport function getCanonicalLocales(locales) {\n // IE11\n var getCanonicalLocales = Intl.getCanonicalLocales;\n if (typeof getCanonicalLocales === 'function') {\n return getCanonicalLocales(locales);\n }\n // NOTE: we must NOT call `supportedLocalesOf` of a formatjs polyfill, or their implementation\n // will even eventually call this method recursively. Here we use `Intl.DateTimeFormat` since it\n // is not polyfilled by `@formatjs`.\n // TODO: Fix TypeScript type def for this bc undefined is just fine\n return Intl.DateTimeFormat.supportedLocalesOf(locales);\n}\n//# sourceMappingURL=get-canonical-locales.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { getCanonicalLocales } from './get-canonical-locales';\nimport { invariant } from './invariant';\nimport { toObject, getOption } from './polyfill-utils';\nexport function createResolveLocale(getDefaultLocale) {\n var lookupMatcher = createLookupMatcher(getDefaultLocale);\n var bestFitMatcher = createBestFitMatcher(getDefaultLocale);\n /**\n * https://tc39.es/ecma402/#sec-resolvelocale\n */\n return function resolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData) {\n var matcher = options.localeMatcher;\n var r;\n if (matcher === 'lookup') {\n r = lookupMatcher(availableLocales, requestedLocales);\n }\n else {\n r = bestFitMatcher(availableLocales, requestedLocales);\n }\n var foundLocale = r.locale;\n var result = { locale: '', dataLocale: foundLocale };\n var supportedExtension = '-u';\n for (var _i = 0, relevantExtensionKeys_1 = relevantExtensionKeys; _i < relevantExtensionKeys_1.length; _i++) {\n var key = relevantExtensionKeys_1[_i];\n var foundLocaleData = localeData[foundLocale];\n invariant(typeof foundLocaleData === 'object' && foundLocaleData !== null, \"locale data \" + key + \" must be an object\");\n var keyLocaleData = foundLocaleData[key];\n invariant(Array.isArray(keyLocaleData), \"keyLocaleData for \" + key + \" must be an array\");\n var value = keyLocaleData[0];\n invariant(typeof value === 'string' || value === null, 'value must be string or null');\n var supportedExtensionAddition = '';\n if (r.extension) {\n var requestedValue = unicodeExtensionValue(r.extension, key);\n if (requestedValue !== undefined) {\n if (requestedValue !== '') {\n if (~keyLocaleData.indexOf(requestedValue)) {\n value = requestedValue;\n supportedExtensionAddition = \"-\" + key + \"-\" + value;\n }\n }\n else if (~requestedValue.indexOf('true')) {\n value = 'true';\n supportedExtensionAddition = \"-\" + key;\n }\n }\n }\n if (key in options) {\n var optionsValue = options[key];\n invariant(typeof optionsValue === 'string' ||\n typeof optionsValue === 'undefined' ||\n optionsValue === null, 'optionsValue must be String, Undefined or Null');\n if (~keyLocaleData.indexOf(optionsValue)) {\n if (optionsValue !== value) {\n value = optionsValue;\n supportedExtensionAddition = '';\n }\n }\n }\n result[key] = value;\n supportedExtension += supportedExtensionAddition;\n }\n if (supportedExtension.length > 2) {\n var privateIndex = foundLocale.indexOf('-x-');\n if (privateIndex === -1) {\n foundLocale = foundLocale + supportedExtension;\n }\n else {\n var preExtension = foundLocale.slice(0, privateIndex);\n var postExtension = foundLocale.slice(privateIndex, foundLocale.length);\n foundLocale = preExtension + supportedExtension + postExtension;\n }\n foundLocale = getCanonicalLocales(foundLocale)[0];\n }\n result.locale = foundLocale;\n return result;\n };\n}\n/**\n * https://tc39.es/ecma402/#sec-unicodeextensionvalue\n * @param extension\n * @param key\n */\nfunction unicodeExtensionValue(extension, key) {\n invariant(key.length === 2, 'key must have 2 elements');\n var size = extension.length;\n var searchValue = \"-\" + key + \"-\";\n var pos = extension.indexOf(searchValue);\n if (pos !== -1) {\n var start = pos + 4;\n var end = start;\n var k = start;\n var done = false;\n while (!done) {\n var e = extension.indexOf('-', k);\n var len = void 0;\n if (e === -1) {\n len = size - k;\n }\n else {\n len = e - k;\n }\n if (len === 2) {\n done = true;\n }\n else if (e === -1) {\n end = size;\n done = true;\n }\n else {\n end = e;\n k = e + 1;\n }\n }\n return extension.slice(start, end);\n }\n searchValue = \"-\" + key;\n pos = extension.indexOf(searchValue);\n if (pos !== -1 && pos + 3 === size) {\n return '';\n }\n return undefined;\n}\nvar UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;\n/**\n * https://tc39.es/ecma402/#sec-bestavailablelocale\n * @param availableLocales\n * @param locale\n */\nfunction bestAvailableLocale(availableLocales, locale) {\n var candidate = locale;\n while (true) {\n if (~availableLocales.indexOf(candidate)) {\n return candidate;\n }\n var pos = candidate.lastIndexOf('-');\n if (!~pos) {\n return undefined;\n }\n if (pos >= 2 && candidate[pos - 2] === '-') {\n pos -= 2;\n }\n candidate = candidate.slice(0, pos);\n }\n}\nfunction createLookupMatcher(getDefaultLocale) {\n /**\n * https://tc39.es/ecma402/#sec-lookupmatcher\n */\n return function lookupMatcher(availableLocales, requestedLocales) {\n var result = { locale: '' };\n for (var _i = 0, requestedLocales_1 = requestedLocales; _i < requestedLocales_1.length; _i++) {\n var locale = requestedLocales_1[_i];\n var noExtensionLocale = locale.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');\n var availableLocale = bestAvailableLocale(availableLocales, noExtensionLocale);\n if (availableLocale) {\n result.locale = availableLocale;\n if (locale !== noExtensionLocale) {\n result.extension = locale.slice(noExtensionLocale.length + 1, locale.length);\n }\n return result;\n }\n }\n result.locale = getDefaultLocale();\n return result;\n };\n}\nfunction createBestFitMatcher(getDefaultLocale) {\n return function bestFitMatcher(availableLocales, requestedLocales) {\n var result = { locale: '' };\n for (var _i = 0, requestedLocales_2 = requestedLocales; _i < requestedLocales_2.length; _i++) {\n var locale = requestedLocales_2[_i];\n var noExtensionLocale = locale.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');\n var availableLocale = bestAvailableLocale(availableLocales, noExtensionLocale);\n if (availableLocale) {\n result.locale = availableLocale;\n if (locale !== noExtensionLocale) {\n result.extension = locale.slice(noExtensionLocale.length + 1, locale.length);\n }\n return result;\n }\n }\n result.locale = getDefaultLocale();\n return result;\n };\n}\nexport function getLocaleHierarchy(locale, aliases, parentLocales) {\n var results = [locale];\n if (aliases[locale]) {\n locale = aliases[locale];\n results.push(locale);\n }\n var parentLocale = parentLocales[locale];\n if (parentLocale) {\n results.push(parentLocale);\n }\n var localeParts = locale.split('-');\n for (var i = localeParts.length; i > 1; i--) {\n results.push(localeParts.slice(0, i - 1).join('-'));\n }\n return results;\n}\nfunction lookupSupportedLocales(availableLocales, requestedLocales) {\n var subset = [];\n for (var _i = 0, requestedLocales_3 = requestedLocales; _i < requestedLocales_3.length; _i++) {\n var locale = requestedLocales_3[_i];\n var noExtensionLocale = locale.replace(UNICODE_EXTENSION_SEQUENCE_REGEX, '');\n var availableLocale = bestAvailableLocale(availableLocales, noExtensionLocale);\n if (availableLocale) {\n subset.push(availableLocale);\n }\n }\n return subset;\n}\nexport function supportedLocales(availableLocales, requestedLocales, options) {\n var matcher = 'best fit';\n if (options !== undefined) {\n options = toObject(options);\n matcher = getOption(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit');\n }\n if (matcher === 'best fit') {\n return lookupSupportedLocales(availableLocales, requestedLocales);\n }\n return lookupSupportedLocales(availableLocales, requestedLocales);\n}\nvar MissingLocaleDataError = /** @class */ (function (_super) {\n __extends(MissingLocaleDataError, _super);\n function MissingLocaleDataError() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = 'MISSING_LOCALE_DATA';\n return _this;\n }\n return MissingLocaleDataError;\n}(Error));\nexport function isMissingLocaleDataError(e) {\n return e.type === 'MISSING_LOCALE_DATA';\n}\nexport function unpackData(locale, localeData, \n/** By default shallow merge the dictionaries. */\nreducer) {\n if (reducer === void 0) { reducer = function (all, d) { return (__assign(__assign({}, all), d)); }; }\n var localeHierarchy = getLocaleHierarchy(locale, localeData.aliases, localeData.parentLocales);\n var dataToMerge = localeHierarchy\n .map(function (l) { return localeData.data[l]; })\n .filter(Boolean);\n if (!dataToMerge.length) {\n throw new MissingLocaleDataError(\"Missing locale data for \\\"\" + locale + \"\\\", lookup hierarchy: \" + localeHierarchy.join(', '));\n }\n dataToMerge.reverse();\n return dataToMerge.reduce(reducer, {});\n}\n//# sourceMappingURL=resolve-locale.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { getInternalSlot, setInternalSlot, getOption, getCanonicalLocales, createResolveLocale, invariant, supportedLocales, isWellFormedCurrencyCode, getMultiInternalSlots, unpackData, toString, } from '@formatjs/intl-utils';\nvar DisplayNames = /** @class */ (function () {\n function DisplayNames(locales, options) {\n var _newTarget = this.constructor;\n if (options === void 0) { options = Object.create(null); }\n if (_newTarget === undefined) {\n throw TypeError(\"Constructor Intl.DisplayNames requires 'new'\");\n }\n var requestedLocales = getCanonicalLocales(locales);\n var matcher = getOption(options, 'localeMatcher', 'string', ['lookup', 'best fit'], 'best fit');\n var r = createResolveLocale(DisplayNames.getDefaultLocale)(DisplayNames.availableLocales, requestedLocales, { localeMatcher: matcher }, [], // there is no relevantExtensionKeys\n DisplayNames.localeData);\n var style = getOption(options, 'style', 'string', ['narrow', 'short', 'long'], 'long');\n setSlot(this, 'style', style);\n var type = getOption(options, 'type', 'string', ['language', 'currency', 'region', 'script'], 'language');\n setSlot(this, 'type', type);\n var fallback = getOption(options, 'fallback', 'string', ['code', 'none'], 'code');\n setSlot(this, 'fallback', fallback);\n setSlot(this, 'locale', r.locale);\n var dataLocale = r.dataLocale;\n var dataLocaleData = DisplayNames.localeData[dataLocale];\n invariant(dataLocaleData !== undefined, \"locale data for \" + r.locale + \" does not exist.\");\n setSlot(this, 'localeData', dataLocaleData);\n }\n DisplayNames.supportedLocalesOf = function (locales, options) {\n return supportedLocales(DisplayNames.availableLocales, getCanonicalLocales(locales), options);\n };\n DisplayNames.__addLocaleData = function () {\n var data = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n data[_i] = arguments[_i];\n }\n for (var _a = 0, data_1 = data; _a < data_1.length; _a++) {\n var datum = data_1[_a];\n var availableLocales = Object.keys(__spreadArrays(datum.availableLocales, Object.keys(datum.aliases), Object.keys(datum.parentLocales)).reduce(function (all, k) {\n all[k] = true;\n return all;\n }, {}));\n for (var _b = 0, availableLocales_1 = availableLocales; _b < availableLocales_1.length; _b++) {\n var locale = availableLocales_1[_b];\n try {\n DisplayNames.localeData[locale] = unpackData(locale, datum);\n }\n catch (e) {\n // If we can't unpack this data, ignore the locale\n }\n }\n }\n DisplayNames.availableLocales = Object.keys(DisplayNames.localeData);\n if (!DisplayNames.__defaultLocale) {\n DisplayNames.__defaultLocale = DisplayNames.availableLocales[0];\n }\n };\n DisplayNames.prototype.of = function (code) {\n checkReceiver(this, 'of');\n var type = getSlot(this, 'type');\n var codeAsString = toString(code);\n if (!isValidCodeForDisplayNames(type, codeAsString)) {\n throw RangeError('invalid code for Intl.DisplayNames.prototype.of');\n }\n var _a = getMultiInternalSlots(__INTERNAL_SLOT_MAP__, this, 'localeData', 'style', 'fallback'), localeData = _a.localeData, style = _a.style, fallback = _a.fallback;\n // Canonicalize the case.\n var canonicalCode;\n // This is only used to store extracted language region.\n var regionSubTag;\n switch (type) {\n // Normalize the locale id and remove the region.\n case 'language': {\n canonicalCode = getCanonicalLocales(codeAsString)[0];\n var regionMatch = /-([a-z]{2}|\\d{3})\\b/i.exec(canonicalCode);\n if (regionMatch) {\n // Remove region subtag\n canonicalCode =\n canonicalCode.substring(0, regionMatch.index) +\n canonicalCode.substring(regionMatch.index + regionMatch[0].length);\n regionSubTag = regionMatch[1];\n }\n break;\n }\n // currency code should be all upper-case.\n case 'currency':\n canonicalCode = codeAsString.toUpperCase();\n break;\n // script code should be title case\n case 'script':\n canonicalCode =\n codeAsString[0] + codeAsString.substring(1).toLowerCase();\n break;\n // region shold be all upper-case\n case 'region':\n canonicalCode = codeAsString.toUpperCase();\n break;\n }\n var typesData = localeData.types[type];\n // If the style of choice does not exist, fallback to \"long\".\n var name = typesData[style][canonicalCode] || typesData.long[canonicalCode];\n if (name !== undefined) {\n // If there is a region subtag in the language id, use locale pattern to interpolate the region\n if (regionSubTag) {\n // Retrieve region display names\n var regionsData = localeData.types.region;\n var regionDisplayName = regionsData[style][regionSubTag] || regionsData.long[regionSubTag];\n if (regionDisplayName || fallback === 'code') {\n // Interpolate into locale-specific pattern.\n var pattern = localeData.patterns.locale;\n return pattern\n .replace('{0}', name)\n .replace('{1}', regionDisplayName || regionSubTag);\n }\n }\n else {\n return name;\n }\n }\n if (fallback === 'code') {\n return codeAsString;\n }\n };\n DisplayNames.prototype.resolvedOptions = function () {\n checkReceiver(this, 'resolvedOptions');\n return __assign({}, getMultiInternalSlots(__INTERNAL_SLOT_MAP__, this, 'locale', 'style', 'type', 'fallback'));\n };\n DisplayNames.getDefaultLocale = function () {\n return DisplayNames.__defaultLocale;\n };\n DisplayNames.localeData = {};\n DisplayNames.availableLocales = [];\n DisplayNames.__defaultLocale = 'en';\n DisplayNames.polyfilled = true;\n return DisplayNames;\n}());\nexport { DisplayNames };\n// https://tc39.es/proposal-intl-displaynames/#sec-isvalidcodefordisplaynames\nfunction isValidCodeForDisplayNames(type, code) {\n switch (type) {\n case 'language':\n // subset of unicode_language_id\n // languageCode [\"-\" scriptCode] [\"-\" regionCode] *(\"-\" variant)\n // where:\n // - languageCode is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code.\n // - scriptCode is should be an ISO-15924 four letters script code\n // - regionCode is either an ISO-3166 two letters region code, or a three digits UN M49 Geographic Regions.\n return /^[a-z]{2,3}(-[a-z]{4})?(-([a-z]{2}|\\d{3}))?(-([a-z\\d]{5,8}|\\d[a-z\\d]{3}))*$/i.test(code);\n case 'region':\n // unicode_region_subtag\n return /^([a-z]{2}|\\d{3})$/i.test(code);\n case 'script':\n // unicode_script_subtag\n return /^[a-z]{4}$/i.test(code);\n case 'currency':\n return isWellFormedCurrencyCode(code);\n }\n}\ntry {\n // IE11 does not have Symbol\n if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n Object.defineProperty(DisplayNames.prototype, Symbol.toStringTag, {\n value: 'Intl.DisplayNames',\n configurable: true,\n enumerable: false,\n writable: false,\n });\n }\n Object.defineProperty(DisplayNames, 'length', {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: true,\n });\n}\ncatch (e) {\n // Make test 262 compliant\n}\nvar __INTERNAL_SLOT_MAP__ = new WeakMap();\nfunction getSlot(instance, key) {\n return getInternalSlot(__INTERNAL_SLOT_MAP__, instance, key);\n}\nfunction setSlot(instance, key, value) {\n setInternalSlot(__INTERNAL_SLOT_MAP__, instance, key, value);\n}\nfunction checkReceiver(receiver, methodName) {\n if (!(receiver instanceof DisplayNames)) {\n throw TypeError(\"Method Intl.DisplayNames.prototype.\" + methodName + \" called on incompatible receiver\");\n }\n}\n//# sourceMappingURL=index.js.map"],"names":["invariant","condition","message","Err","Error","toString","o","TypeError","String","getOption","opts","prop","type","values","fallback","value","undefined","Boolean","filter","val","length","RangeError","join","getMultiInternalSlots","map","pl","fields","_i","arguments","slots","get","reduce","all","f","Object","create","NOT_A_Z_REGEX","isWellFormedCurrencyCode","currency","replace","_","c","toUpperCase","test","getCanonicalLocales","locales","Intl","DateTimeFormat","supportedLocalesOf","extendStatics","__extends","d","b","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__","this","constructor","prototype","__assign","assign","t","s","i","n","call","apply","createResolveLocale","getDefaultLocale","lookupMatcher","availableLocales","requestedLocales","result","locale","requestedLocales_1","noExtensionLocale","UNICODE_EXTENSION_SEQUENCE_REGEX","availableLocale","bestAvailableLocale","extension","slice","bestFitMatcher","requestedLocales_2","options","relevantExtensionKeys","localeData","privateIndex","r","localeMatcher","foundLocale","dataLocale","supportedExtension","relevantExtensionKeys_1","key","foundLocaleData","keyLocaleData","isArray","requestedValue","optionsValue","supportedExtensionAddition","unicodeExtensionValue","indexOf","size","searchValue","pos","start","end","k","done","e","candidate","lastIndexOf","lookupSupportedLocales","subset","requestedLocales_3","push","supportedLocales","arg","toObject","_super","MissingLocaleDataError","_this","unpackData","reducer","localeHierarchy","aliases","parentLocales","results","parentLocale","localeParts","split","getLocaleHierarchy","dataToMerge","l","data","reverse","__spreadArrays","il","a","j","jl","DisplayNames","__addLocaleData","_a","data_1","datum","_b","availableLocales_1","keys","__defaultLocale","of","code","checkReceiver","field","getInternalSlot","__INTERNAL_SLOT_MAP__","codeAsString","isValidCodeForDisplayNames","canonicalCode","regionSubTag","style","regionMatch","exec","substring","index","toLowerCase","typesData","types","name","long","regionsData","region","regionDisplayName","patterns","resolvedOptions","polyfilled","_newTarget","matcher","setSlot","dataLocaleData","Symbol","toStringTag","defineProperty","configurable","enumerable","writable","WeakMap","instance","set","receiver","methodName"],"mappings":"6MAAO,SAASA,EAAUC,EAAWC,EAASC,GAE1C,QADY,IAARA,IAAkBA,EAAMC,QACvBH,EACD,MAAM,IAAIE,EAAID,GCaf,SAASG,EAASC,GAErB,GAAiB,iBAANA,EACP,MAAMC,UAAU,6CAEpB,OAAOC,OAAOF,GAUX,SAASG,EAAUC,EAAMC,EAAMC,EAAMC,EAAQC,GAEhD,IAAIC,EAAQL,EAAKC,GACjB,QAAcK,IAAVD,EAeJ,OAAOD,EAdH,GAAa,YAATF,GAA+B,WAATA,EACtB,MAAM,IAAIL,UAAU,gBAQxB,GANa,YAATK,IACAG,EAAQE,QAAQF,IAEP,WAATH,IACAG,EAAQV,EAASU,SAENC,IAAXH,IAAyBA,EAAOK,OAAO,SAAUC,GAAO,OAAOA,GAAOJ,IAAUK,OAChF,MAAM,IAAIC,WAAWN,EAAQ,kBAAoBF,EAAOS,KAAK,OAEjE,OAAOP,EAiER,SAASQ,EAAsBC,EAAKC,GAEvC,IADA,IAAIC,EAAS,GACJC,EAAK,EAAGA,EAAKC,UAAUR,OAAQO,IACpCD,EAAOC,EAAK,GAAKC,UAAUD,GAE/B,IAAIE,EAAQL,EAAIM,IAAIL,GACpB,IAAKI,EACD,MAAM,IAAItB,UAAUkB,EAAK,0CAE7B,OAAOC,EA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