import { LookupSupportedLocales, ResolveLocale, match } from "@formatjs/intl-localematcher";
//#region packages/ecma262-abstract/ToString.js
/**
* https://tc39.es/ecma262/#sec-tostring
*/
function ToString(o) {
	if (typeof o === "symbol") throw TypeError("Cannot convert a Symbol value to a string");
	return String(o);
}
//#endregion
//#region packages/ecma402-abstract/CanonicalizeLocaleList.js
/**
* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist
* @param locales
*/
function CanonicalizeLocaleList(locales) {
	return Intl.getCanonicalLocales(locales);
}
//#endregion
//#region packages/ecma402-abstract/GetOption.js
/**
* https://tc39.es/ecma402/#sec-getoption
* @param opts
* @param prop
* @param type
* @param values
* @param fallback
*/
function GetOption(opts, prop, type, values, fallback) {
	if (typeof opts !== "object") throw new TypeError("Options must be an object");
	let value = opts[prop];
	if (value !== void 0) {
		if (type !== "boolean" && type !== "string") throw new TypeError("invalid type");
		if (type === "boolean") value = Boolean(value);
		if (type === "string") value = ToString(value);
		if (values !== void 0 && !values.filter((val) => val == value).length) throw new RangeError(`${value} is not within ${values.join(", ")}`);
		return value;
	}
	return fallback;
}
//#endregion
//#region packages/ecma402-abstract/GetOptionsObject.js
/**
* https://tc39.es/ecma402/#sec-getoptionsobject
* @param options
* @returns
*/
function GetOptionsObject(options) {
	if (typeof options === "undefined") return Object.create(null);
	if (typeof options === "object") return options;
	throw new TypeError("Options must be an object");
}
//#endregion
//#region packages/ecma402-abstract/IsWellFormedCurrencyCode.js
/**
* This follows https://tc39.es/ecma402/#sec-case-sensitivity-and-case-mapping
* @param str string to convert
*/
function toUpperCase(str) {
	return str.replace(/([a-z])/g, (_, c) => c.toUpperCase());
}
const NOT_A_Z_REGEX = /[^A-Z]/;
/**
* https://tc39.es/ecma402/#sec-iswellformedcurrencycode
*/
function IsWellFormedCurrencyCode(currency) {
	currency = toUpperCase(currency);
	if (currency.length !== 3) return false;
	if (NOT_A_Z_REGEX.test(currency)) return false;
	return true;
}
//#endregion
//#region packages/ecma262-abstract/ToObject.js
/**
* https://tc39.es/ecma262/#sec-toobject
*/
function ToObject(arg) {
	if (arg == null) throw new TypeError("undefined/null cannot be converted to object");
	return Object(arg);
}
//#endregion
//#region packages/ecma402-abstract/SupportedLocales.js
/**
* https://tc39.es/ecma402/#sec-supportedlocales
* @param availableLocales
* @param requestedLocales
* @param options
*/
function SupportedLocales(availableLocales, requestedLocales, options) {
	let matcher = "best fit";
	if (options !== void 0) {
		options = ToObject(options);
		matcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
	}
	if (matcher === "best fit") return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
	return LookupSupportedLocales(Array.from(availableLocales), requestedLocales);
}
//#endregion
//#region node_modules/.aspect_rules_js/@formatjs+fast-memoize@0.0.0/node_modules/@formatjs/fast-memoize/index.js
function memoize(fn, options) {
	const cache = options && options.cache ? options.cache : cacheDefault;
	const serializer = options && options.serializer ? options.serializer : serializerDefault;
	return (options && options.strategy ? options.strategy : strategyDefault)(fn, {
		cache,
		serializer
	});
}
function isPrimitive(value) {
	return value == null || typeof value === "number" || typeof value === "boolean";
}
function monadic(fn, cache, serializer, arg) {
	const cacheKey = isPrimitive(arg) ? arg : serializer(arg);
	let computedValue = cache.get(cacheKey);
	if (typeof computedValue === "undefined") {
		computedValue = fn.call(this, arg);
		cache.set(cacheKey, computedValue);
	}
	return computedValue;
}
function variadic(fn, cache, serializer) {
	const args = Array.prototype.slice.call(arguments, 3);
	const cacheKey = serializer(args);
	let computedValue = cache.get(cacheKey);
	if (typeof computedValue === "undefined") {
		computedValue = fn.apply(this, args);
		cache.set(cacheKey, computedValue);
	}
	return computedValue;
}
function assemble(fn, context, strategy, cache, serialize) {
	return strategy.bind(context, fn, cache, serialize);
}
function strategyDefault(fn, options) {
	const strategy = fn.length === 1 ? monadic : variadic;
	return assemble(fn, this, strategy, options.cache.create(), options.serializer);
}
function strategyVariadic(fn, options) {
	return assemble(fn, this, variadic, options.cache.create(), options.serializer);
}
function strategyMonadic(fn, options) {
	return assemble(fn, this, monadic, options.cache.create(), options.serializer);
}
const serializerDefault = function() {
	return JSON.stringify(arguments);
};
var ObjectWithoutPrototypeCache = class {
	constructor() {
		this.cache = Object.create(null);
	}
	get(key) {
		return this.cache[key];
	}
	set(key, value) {
		this.cache[key] = value;
	}
};
const cacheDefault = { create: function create() {
	return new ObjectWithoutPrototypeCache();
} };
const strategies = {
	variadic: strategyVariadic,
	monadic: strategyMonadic
};
//#endregion
//#region packages/ecma402-abstract/utils.js
function setInternalSlot(map, pl, field, value) {
	if (!map.get(pl)) map.set(pl, Object.create(null));
	const slots = map.get(pl);
	slots[field] = value;
}
function getInternalSlot(map, pl, field) {
	return getMultiInternalSlots(map, pl, field)[field];
}
function getMultiInternalSlots(map, pl, ...fields) {
	const slots = map.get(pl);
	if (!slots) throw new TypeError(`${pl} InternalSlot has not been initialized`);
	return fields.reduce((all, f) => {
		all[f] = slots[f];
		return all;
	}, Object.create(null));
}
function invariant(condition, message, Err = Error) {
	if (!condition) throw new Err(message);
}
memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });
memoize((...args) => new Intl.Locale(...args), { strategy: strategies.variadic });
memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });
//#endregion
//#region packages/ecma402-abstract/DisplayNames/IsValidDateTimeFieldCode.js
const CODES_FOR_DATE_TIME_FIELD = [
	"era",
	"year",
	"quarter",
	"month",
	"weekOfYear",
	"weekday",
	"day",
	"dayPeriod",
	"hour",
	"minute",
	"second",
	"timeZoneName"
];
function IsValidDateTimeFieldCode(field) {
	return CODES_FOR_DATE_TIME_FIELD.indexOf(field) >= 0;
}
//#endregion
//#region packages/ecma402-abstract/DisplayNames/CanonicalCodeForDisplayNames.js
const UNICODE_REGION_SUBTAG_REGEX = /^([a-z]{2}|[0-9]{3})$/i;
const ALPHA_4 = /^[a-z]{4}$/i;
const UNICODE_TYPE_REGEX = /^[a-z0-9]{3,8}([-_][a-z0-9]{3,8})*$/i;
function isUnicodeRegionSubtag(region) {
	return UNICODE_REGION_SUBTAG_REGEX.test(region);
}
function isUnicodeScriptSubtag(script) {
	return ALPHA_4.test(script);
}
function isUnicodeLocaleIdentifierType(code) {
	return UNICODE_TYPE_REGEX.test(code);
}
function CanonicalCodeForDisplayNames(type, code) {
	if (type === "language") return CanonicalizeLocaleList([code])[0];
	if (type === "region") {
		if (!isUnicodeRegionSubtag(code)) throw RangeError("invalid region");
		return code.toUpperCase();
	}
	if (type === "script") {
		if (!isUnicodeScriptSubtag(code)) throw RangeError("invalid script");
		return `${code[0].toUpperCase()}${code.slice(1).toLowerCase()}`;
	}
	if (type === "calendar") {
		if (!isUnicodeLocaleIdentifierType(code)) throw RangeError("invalid calendar");
		return code.toLowerCase();
	}
	if (type === "dateTimeField") {
		if (!IsValidDateTimeFieldCode(code)) throw RangeError("invalid dateTimeField");
		return code;
	}
	invariant(type === "currency", "invalid type");
	if (!IsWellFormedCurrencyCode(code)) throw RangeError("invalid currency");
	return code.toUpperCase();
}
//#endregion
//#region packages/intl-displaynames/index.ts
var DisplayNames = class DisplayNames {
	constructor(locales, options) {
		if (new.target === void 0) throw TypeError(`Constructor Intl.DisplayNames requires 'new'`);
		const requestedLocales = CanonicalizeLocaleList(locales);
		options = GetOptionsObject(options);
		const opt = Object.create(null);
		const { localeData } = DisplayNames;
		opt.localeMatcher = GetOption(options, "localeMatcher", "string", ["lookup", "best fit"], "best fit");
		const r = ResolveLocale(Array.from(DisplayNames.availableLocales), requestedLocales, opt, [], DisplayNames.localeData, DisplayNames.getDefaultLocale);
		const style = GetOption(options, "style", "string", [
			"narrow",
			"short",
			"long"
		], "long");
		setSlot(this, "style", style);
		const type = GetOption(options, "type", "string", [
			"language",
			"region",
			"script",
			"currency",
			"calendar",
			"dateTimeField"
		], void 0);
		if (type === void 0) throw TypeError(`Intl.DisplayNames constructor requires "type" option`);
		setSlot(this, "type", type);
		const fallback = GetOption(options, "fallback", "string", ["code", "none"], "code");
		setSlot(this, "fallback", fallback);
		setSlot(this, "locale", r.locale);
		const { dataLocale } = r;
		const dataLocaleData = localeData[dataLocale];
		invariant(!!dataLocaleData, `Missing locale data for ${dataLocale}`);
		setSlot(this, "localeData", dataLocaleData);
		invariant(dataLocaleData !== void 0, `locale data for ${r.locale} does not exist.`);
		const { types } = dataLocaleData;
		invariant(typeof types === "object" && types != null, "invalid types data");
		const typeFields = types[type];
		invariant(typeof typeFields === "object" && typeFields != null, "invalid typeFields data");
		const languageDisplay = GetOption(options, "languageDisplay", "string", ["dialect", "standard"], "dialect");
		if (type === "language") {
			setSlot(this, "languageDisplay", languageDisplay);
			const typeFields = types[type][languageDisplay];
			invariant(typeof typeFields === "object" && typeFields != null, "invalid language typeFields data");
		}
		const styleFields = type === "language" ? types[type][languageDisplay][style] : types[type][style];
		invariant(typeof styleFields === "object" && styleFields != null, "invalid styleFields data");
		setSlot(this, "fields", styleFields);
	}
	static supportedLocalesOf(locales, options) {
		return SupportedLocales(DisplayNames.availableLocales, CanonicalizeLocaleList(locales), options);
	}
	static __addLocaleData(...data) {
		for (const { data: d, locale } of data) {
			const minimizedLocale = new Intl.Locale(locale).minimize().toString();
			DisplayNames.localeData[locale] = DisplayNames.localeData[minimizedLocale] = d;
			DisplayNames.availableLocales.add(minimizedLocale);
			DisplayNames.availableLocales.add(locale);
			if (!DisplayNames.__defaultLocale) DisplayNames.__defaultLocale = minimizedLocale;
		}
	}
	of(code) {
		checkReceiver(this, "of");
		const type = getSlot(this, "type");
		const codeAsString = ToString(code);
		if (!isValidCodeForDisplayNames(type, codeAsString)) throw RangeError("invalid code for Intl.DisplayNames.prototype.of");
		const { localeData, style, fallback } = getMultiInternalSlots(__INTERNAL_SLOT_MAP__, this, "localeData", "style", "fallback");
		let canonicalCode = CanonicalCodeForDisplayNames(type, codeAsString);
		let name;
		if (type === "language") name = getNameForTypeLanguage(getSlot(this, "languageDisplay"), localeData, style, canonicalCode, fallback);
		else {
			const typesData = localeData.types[type];
			name = typesData[style][canonicalCode] || typesData.long[canonicalCode];
		}
		if (name !== void 0) return name;
		if (fallback === "code") return codeAsString;
	}
	resolvedOptions() {
		checkReceiver(this, "resolvedOptions");
		return { ...getMultiInternalSlots(__INTERNAL_SLOT_MAP__, this, "locale", "style", "type", "fallback", "languageDisplay") };
	}
	static {
		this.localeData = {};
	}
	static {
		this.availableLocales = /* @__PURE__ */ new Set();
	}
	static {
		this.__defaultLocale = "";
	}
	static getDefaultLocale() {
		return DisplayNames.__defaultLocale;
	}
	static {
		this.polyfilled = true;
	}
};
function isValidCodeForDisplayNames(type, code) {
	switch (type) {
		case "language": 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);
		case "region": return /^([a-z]{2}|\d{3})$/i.test(code);
		case "script": return /^[a-z]{4}$/i.test(code);
		case "currency": return IsWellFormedCurrencyCode(code);
		case "calendar": return /^[a-z0-9]{3,8}([-_][a-z0-9]{3,8})*$/i.test(code);
		case "dateTimeField": return IsValidDateTimeFieldCode(code);
	}
}
try {
	if (typeof Symbol !== "undefined" && Symbol.toStringTag) Object.defineProperty(DisplayNames.prototype, Symbol.toStringTag, {
		value: "Intl.DisplayNames",
		configurable: true,
		enumerable: false,
		writable: false
	});
	Object.defineProperty(DisplayNames, "length", {
		value: 2,
		writable: false,
		enumerable: false,
		configurable: true
	});
} catch {}
const __INTERNAL_SLOT_MAP__ = /* @__PURE__ */ new WeakMap();
function getSlot(instance, key) {
	return getInternalSlot(__INTERNAL_SLOT_MAP__, instance, key);
}
function setSlot(instance, key, value) {
	setInternalSlot(__INTERNAL_SLOT_MAP__, instance, key, value);
}
function checkReceiver(receiver, methodName) {
	if (!(receiver instanceof DisplayNames)) throw TypeError(`Method Intl.DisplayNames.prototype.${methodName} called on incompatible receiver`);
}
function getNameForTypeLanguage(languageDisplay, localeData, style, canonicalCode, fallback) {
	const typesData = localeData.types.language[languageDisplay];
	const name = typesData[style][canonicalCode] || typesData.long[canonicalCode];
	if (name === void 0) {
		const regionMatch = /-([a-z]{2}|\d{3})\b/i.exec(canonicalCode);
		if (regionMatch) {
			const languageSubTag = canonicalCode.substring(0, regionMatch.index) + canonicalCode.substring(regionMatch.index + regionMatch[0].length);
			const regionSubTag = regionMatch[1];
			const name = typesData[style][languageSubTag] || typesData.long[languageSubTag];
			if (name !== void 0 && regionSubTag) {
				const regionsData = localeData.types.region;
				const regionDisplayName = regionsData[style][regionSubTag] || regionsData.long[regionSubTag];
				if (regionDisplayName || fallback === "code") return localeData.patterns.locale.replace("{0}", name).replace("{1}", regionDisplayName || regionSubTag);
			} else return name;
		}
	} else return name;
}
//#endregion
//#region node_modules/.aspect_rules_js/@formatjs_generated+cldr.supported-locales@0.0.0/node_modules/@formatjs_generated/cldr.supported-locales/intl-displaynames.js
const 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"
];
//#endregion
//#region packages/intl-displaynames/should-polyfill.ts
/**
* https://bugs.chromium.org/p/chromium/issues/detail?id=1097432
*/
function hasMissingICUBug() {
	const DisplayNames = Intl.DisplayNames;
	if (DisplayNames && !DisplayNames.polyfilled) return new DisplayNames(["en"], { type: "region" }).of("CA") === "CA";
	return false;
}
/**
* https://bugs.chromium.org/p/chromium/issues/detail?id=1176979
* https://github.com/formatjs/formatjs/issues/5889
*
* Tests if the implementation properly canonicalizes script codes per ECMA-402 spec.
* The spec requires CanonicalCodeForDisplayNames to convert lowercase 'arab' to title-case 'Arab'
* before lookup. This test uses lowercase input to verify canonicalization happens.
*
* - Correct implementations: canonicalize 'arab' → 'Arab', look up → return 'Arabic'
* - Buggy implementations (old Node.js): don't canonicalize, look up 'arab' literally → return 'arab'
*
* See ECMA-402 section 12.5.1: CanonicalCodeForDisplayNames
*/
function hasScriptBug() {
	const DisplayNames = Intl.DisplayNames;
	if (DisplayNames && !DisplayNames.polyfilled) return new DisplayNames(["en"], { type: "script" }).of("arab") !== "Arabic";
	return false;
}
function supportedLocalesOf(locale) {
	if (!locale) return true;
	const locales = Array.isArray(locale) ? locale : [locale];
	return Intl.DisplayNames.supportedLocalesOf(locales).length === locales.length;
}
function _shouldPolyfillWithoutLocale() {
	return !Intl.DisplayNames || hasMissingICUBug() || hasScriptBug();
}
function shouldPolyfill(locale = "en") {
	try {
		if (_shouldPolyfillWithoutLocale() || !supportedLocalesOf(locale)) return match([locale], supportedLocales, "en");
	} catch {
		return true;
	}
}
//#endregion
//#region packages/intl-displaynames/polyfill.ts
if (shouldPolyfill()) {
	Object.defineProperty(Intl, "DisplayNames", {
		value: DisplayNames,
		enumerable: false,
		writable: true,
		configurable: true
	});
	const buf = globalThis.__FORMATJS_DISPLAYNAMES_DATA__;
	if (buf) {
		for (const d of buf) DisplayNames.__addLocaleData(d);
		delete globalThis.__FORMATJS_DISPLAYNAMES_DATA__;
	}
}
//#endregion

//# sourceMappingURL=polyfill.js.map