'use strict';

require('./index-da3b86cd.js');
var Locale = require('./Locale-fbe01177.js');

// https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
const MAPPED_LOCALE = {
    [Locale.LOCALE.Vietnam]: 'VN',
    [Locale.LOCALE.Cambodia]: 'KH',
    [Locale.LOCALE.Indonesia]: 'ID',
    [Locale.LOCALE.Malaysia]: 'MY',
    [Locale.LOCALE.PhilippinesEnglish]: 'PH',
    [Locale.LOCALE.PhilippinesTagalog]: 'PH',
    [Locale.LOCALE.Taiwan]: 'TW',
    [Locale.LOCALE.Thailand]: 'TH',
    [Locale.LOCALE.Myanmar]: 'MM',
};
const hiddenEmailChar = (str = '') => {
    const domainIndex = str.indexOf('@');
    const leftSide = str.substring(0, domainIndex);
    const startMask = leftSide.length > 3 ? 3 : leftSide.length;
    return str.replace(str.substring(startMask, domainIndex), str.slice(startMask, domainIndex).replace(/./g, 'x'));
};

exports.MAPPED_LOCALE = MAPPED_LOCALE;
exports.hiddenEmailChar = hiddenEmailChar;
