function CanonicalizeLocaleList(locales) {
        if (locales === undefined) {
            return [];
        }
        var seen = [];
        if (typeof locales === 'string') {
            locales = [locales];
        }
        for (var _i = 0, locales_1 = locales; _i < locales_1.length; _i++) {
            var locale = locales_1[_i];
            var canonicalizedTag = emitter.emitUnicodeLocaleId(canonicalizer.canonicalizeUnicodeLocaleId(parser.parseUnicodeLocaleId(locale)));
            if (seen.indexOf(canonicalizedTag) < 0) {
                seen.push(canonicalizedTag);
            }
        }
        return seen;
    }
https://tc39.es/ecma402/#sec-canonicalizelocalelist
@param locales