try {
	let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
	n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "2d83ff7d-b0a8-4575-9cfe-337c5f16ae31", e._sentryDebugIdIdentifier = "sentry-dbid-2d83ff7d-b0a8-4575-9cfe-337c5f16ae31");
} catch (e) {}
var normalizedDatasets = {};
var datasets = {};
var createDatasetKey = (identifier, locale) => `${identifier}_${locale}`.toLowerCase();
var getNormalizeDataset = (datasetKey) => {
	if (!normalizedDatasets[datasetKey]) {
		normalizedDatasets[datasetKey] = {};
		datasets[datasetKey].forEach(({ id, name }) => {
			normalizedDatasets[datasetKey][id] = name;
		});
	}
	return normalizedDatasets[datasetKey];
};
var getDataName = (datasetKey, key) => {
	if (datasets[datasetKey]) return getNormalizeDataset(datasetKey)[key];
	return null;
};
var datasetIdentifier = {
	country: "countries",
	state: (countryCode) => `states/${countryCode}`
};
function datasetUtilities(locale) {
	return {
		getCountryName: (countryCode) => {
			if (!countryCode) return null;
			return getDataName(createDatasetKey(datasetIdentifier.country, locale), countryCode);
		},
		getStateName: (stateCode, countryCode) => {
			return getDataName(createDatasetKey(datasetIdentifier.state(countryCode), locale), stateCode);
		},
		setDataset: (identifier, dataset) => {
			const datasetKey = createDatasetKey(identifier, locale);
			datasets[datasetKey] = dataset;
		},
		getDataset: (identifier) => {
			return datasets[createDatasetKey(identifier, locale)];
		},
		getDatasetKey: (identifier) => createDatasetKey(identifier, locale)
	};
}
//#endregion
export { datasetUtilities as n, datasetIdentifier as t };
