"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.commaDecimal = exports.dotDecimal = exports.bengaliLocales = exports.farsiLocales = exports.arabicLocales = exports.englishLocales = exports.decimal = exports.alphanumeric = exports.alpha = void 0; var alpha = { 'en-US': /^[A-Z]+$/i, 'az-AZ': /^[A-VXYZÇƏĞİıÖŞÜ]+$/i, 'bg-BG': /^[А-Я]+$/i, 'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, 'da-DK': /^[A-ZÆØÅ]+$/i, 'de-DE': /^[A-ZÄÖÜß]+$/i, 'el-GR': /^[Α-ώ]+$/i, 'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i, 'fa-IR': /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i, 'fi-FI': /^[A-ZÅÄÖ]+$/i, 'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, 'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i, 'ja-JP': /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, 'nb-NO': /^[A-ZÆØÅ]+$/i, 'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i, 'nn-NO': /^[A-ZÆØÅ]+$/i, 'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, 'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, 'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, 'ru-RU': /^[А-ЯЁ]+$/i, 'kk-KZ': /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, 'sl-SI': /^[A-ZČĆĐŠŽ]+$/i, 'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, 'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i, 'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i, 'sv-SE': /^[A-ZÅÄÖ]+$/i, 'th-TH': /^[ก-๐\s]+$/i, 'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i, 'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i, 'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, 'ko-KR': /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/, 'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, he: /^[א-ת]+$/, fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i, bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, 'hi-IN': /^[\u0900-\u0961]+[\u0972-\u097F]*$/i, 'si-LK': /^[\u0D80-\u0DFF]+$/ }; exports.alpha = alpha; var alphanumeric = { 'en-US': /^[0-9A-Z]+$/i, 'az-AZ': /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i, 'bg-BG': /^[0-9А-Я]+$/i, 'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, 'da-DK': /^[0-9A-ZÆØÅ]+$/i, 'de-DE': /^[0-9A-ZÄÖÜß]+$/i, 'el-GR': /^[0-9Α-ω]+$/i, 'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, 'fi-FI': /^[0-9A-ZÅÄÖ]+$/i, 'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, 'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i, 'ja-JP': /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, 'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, 'nb-NO': /^[0-9A-ZÆØÅ]+$/i, 'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i, 'nn-NO': /^[0-9A-ZÆØÅ]+$/i, 'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, 'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, 'ru-RU': /^[0-9А-ЯЁ]+$/i, 'kk-KZ': /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, 'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i, 'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, 'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i, 'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, 'sv-SE': /^[0-9A-ZÅÄÖ]+$/i, 'th-TH': /^[ก-๙\s]+$/i, 'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i, 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i, 'ko-KR': /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/, 'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, 'vi-VN': /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, he: /^[0-9א-ת]+$/, fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i, bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, 'hi-IN': /^[\u0900-\u0963]+[\u0966-\u097F]*$/i, 'si-LK': /^[0-9\u0D80-\u0DFF]+$/ }; exports.alphanumeric = alphanumeric; var decimal = { 'en-US': '.', ar: '٫' }; exports.decimal = decimal; var englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM']; exports.englishLocales = englishLocales; for (var locale, i = 0; i < englishLocales.length; i++) { locale = "en-".concat(englishLocales[i]); alpha[locale] = alpha['en-US']; alphanumeric[locale] = alphanumeric['en-US']; decimal[locale] = decimal['en-US']; } // Source: http://www.localeplanet.com/java/ var arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE']; exports.arabicLocales = arabicLocales; for (var _locale, _i = 0; _i < arabicLocales.length; _i++) { _locale = "ar-".concat(arabicLocales[_i]); alpha[_locale] = alpha.ar; alphanumeric[_locale] = alphanumeric.ar; decimal[_locale] = decimal.ar; } var farsiLocales = ['IR', 'AF']; exports.farsiLocales = farsiLocales; for (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) { _locale2 = "fa-".concat(farsiLocales[_i2]); alphanumeric[_locale2] = alphanumeric.fa; decimal[_locale2] = decimal.ar; } var bengaliLocales = ['BD', 'IN']; exports.bengaliLocales = bengaliLocales; for (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) { _locale3 = "bn-".concat(bengaliLocales[_i3]); alpha[_locale3] = alpha.bn; alphanumeric[_locale3] = alphanumeric.bn; decimal[_locale3] = decimal['en-US']; } // Source: https://en.wikipedia.org/wiki/Decimal_mark var dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY']; exports.dotDecimal = dotDecimal; var commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'es-ES', 'fr-CA', 'fr-FR', 'id-ID', 'it-IT', 'ku-IQ', 'hi-IN', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'kk-KZ', 'si-LK', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN']; exports.commaDecimal = commaDecimal; for (var _i4 = 0; _i4 < dotDecimal.length; _i4++) { decimal[dotDecimal[_i4]] = decimal['en-US']; } for (var _i5 = 0; _i5 < commaDecimal.length; _i5++) { decimal[commaDecimal[_i5]] = ','; } alpha['fr-CA'] = alpha['fr-FR']; alphanumeric['fr-CA'] = alphanumeric['fr-FR']; alpha['pt-BR'] = alpha['pt-PT']; alphanumeric['pt-BR'] = alphanumeric['pt-PT']; decimal['pt-BR'] = decimal['pt-PT']; // see #862 alpha['pl-Pl'] = alpha['pl-PL']; alphanumeric['pl-Pl'] = alphanumeric['pl-PL']; decimal['pl-Pl'] = decimal['pl-PL']; // see #1455 alpha['fa-AF'] = alpha.fa;