Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
24 KiB

import { MOUNT_CLASS_TO } from "./lib/mtproto/mtproto_config";
export type Country = {
phoneCode: string,
code: string,
name: string,
pattern: string,
emoji: string
};
const Countries: Country[] = [{"phoneCode":"7 840","code":"AB","name":"Abkhazia","pattern":"","emoji":""},{"phoneCode":"93","code":"AF","name":"Afghanistan","pattern":"93 XXX XXX XXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ซ"},{"phoneCode":"358 18","code":"AX","name":"Aland Islands","pattern":"","emoji":"๐Ÿ‡ฆ๐Ÿ‡ฝ"},{"phoneCode":"355","code":"AL","name":"Albania","pattern":"355 XX XXX XXXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ฑ"},{"phoneCode":"213","code":"DZ","name":"Algeria","pattern":"213 XXX XX XX XX","emoji":"๐Ÿ‡ฉ๐Ÿ‡ฟ"},{"phoneCode":"1 684","code":"AS","name":"American Samoa","pattern":"1684 XXX XXXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ธ"},{"phoneCode":"376","code":"AD","name":"Andorra","pattern":"376 XX XX XX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ฉ"},{"phoneCode":"244","code":"AO","name":"Angola","pattern":"244 XXX XXX XXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ด"},{"phoneCode":"1 264","code":"AI","name":"Anguilla","pattern":"1264 XXX XXXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ฎ"},{"phoneCode":"1 268","code":"AG","name":"Antigua & Barbuda","pattern":"1268 XXX XXXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ฌ"},{"phoneCode":"54","code":"AR","name":"Argentina","pattern":"","emoji":"๐Ÿ‡ฆ๐Ÿ‡ท"},{"phoneCode":"374","code":"AM","name":"Armenia","pattern":"374 XX XXX XXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ฒ"},{"phoneCode":"297","code":"AW","name":"Aruba","pattern":"297 XXX XXXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ผ"},{"phoneCode":"247","code":"SH","name":"Ascension","pattern":"290 XX XXX","emoji":"๐Ÿ‡ธ๐Ÿ‡ญ"},{"phoneCode":"61","code":"AU","name":"Australia","pattern":"61 XXX XXX XXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡บ"},{"phoneCode":"672","code":"AU","name":"Australian External Territories","pattern":"61 XXX XXX XXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡บ"},{"phoneCode":"43","code":"AT","name":"Austria","pattern":"","emoji":"๐Ÿ‡ฆ๐Ÿ‡น"},{"phoneCode":"994","code":"AZ","name":"Azerbaijan","pattern":"994 XX XXX XX XX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ฟ"},{"phoneCode":"1 242","code":"BS","name":"Bahamas","pattern":"1242 XXX XXXX","emoji":"๐Ÿ‡ง๐Ÿ‡ธ"},{"phoneCode":"973","code":"BH","name":"Bahrain","pattern":"973 XXXX XXXX","emoji":"๐Ÿ‡ง๐Ÿ‡ญ"},{"phoneCode":"880","code":"BD","name":"Bangladesh","pattern":"","emoji":"๐Ÿ‡ง๐Ÿ‡ฉ"},{"phoneCode":"1 246","code":"BB","name":"Barbados","pattern":"1246 XXX XXXX","emoji":"๐Ÿ‡ง๐Ÿ‡ง"},{"phoneCode":"1 268","code":"AG","name":"Barbuda","pattern":"1268 XXX XXXX","emoji":"๐Ÿ‡ฆ๐Ÿ‡ฌ"},{"phoneCode":"375","code":"BY","name":"Belarus","pattern":"375 XX XXX XXXX","emoji":"๐Ÿ‡ง๐Ÿ‡พ"},{"phoneCode":"32","code":"BE","name":"Belgium","pattern":"32 XXX XX XX XX","emoji":"๐Ÿ‡ง๐Ÿ‡ช"},{"phoneCode":"501","code":"BZ","name":"Belize","pattern":"","emoji":"๐Ÿ‡ง๐Ÿ‡ฟ"},{"phoneCode":"229","code":"BJ","name":"Benin","pattern":"229 XX XXX XXX","emoji":"๐Ÿ‡ง๐Ÿ‡ฏ"},{"phoneCode":"1 441","code":"BM","name":"Bermuda","pattern":"1441 XXX XXXX","emoji":"๐Ÿ‡ง๐Ÿ‡ฒ"},{"phoneCode":"975","code":"BT","name":"Bhutan","pattern":"","emoji":"๐Ÿ‡ง๐Ÿ‡น"},{"phoneCode":"591","code":"BO","name":"Bolivia","pattern":"591 X XXX XXXX","emoji":"๐Ÿ‡ง๐Ÿ‡ด"},{"phoneCode":"599 7","code":"BQ","name":"Caribbean Netherlands","pattern":"","emoji":"๐Ÿ‡ง๐Ÿ‡ถ"},{"phoneCode":"387","code":"BA","name":"Bosnia & Herzegovina","pattern":"","emoji":"๐Ÿ‡ง๐Ÿ‡ฆ"},{"phoneCode":"267","code":"BW","name":"Botswana","pattern":"267 XX XXX XXX","emoji":"๐Ÿ‡ง๐Ÿ‡ผ"},{"phoneCode":"55","code":"BR","name":"Brazil","pattern":"55 XX XXXXX XXXX","emoji":"๐Ÿ‡ง๐Ÿ‡ท"},{"phoneCode":"246","code":"IO","name":"British Indian Ocean Territory","pattern":"246 XXX XXXX","emoji":"๐Ÿ‡ฎ๐Ÿ‡ด"},{"phoneCode":"1 284","code":"VG","name":"British Virgin Islands","pattern":"1284 XXX XXXX","emoji":"๐Ÿ‡ป๐Ÿ‡ฌ"},{"phoneCode":"673","code":"BN","name":"Brunei","pattern":"673 XXX XXXX","emoji":"๐Ÿ‡ง๐Ÿ‡ณ"},{"phoneCode":"359","code":"BG","name":"Bulgaria","pattern":"","emoji":"๐Ÿ‡ง๐Ÿ‡ฌ"},{"phoneCode":"226","code":"BF","name":"Burkina Faso","pattern":"226 XX XX XX XX","emoji":"๐Ÿ‡ง๐Ÿ‡ซ"},{"phoneCode":"95","code":"MM","name":"Myanmar (Burma)","pattern":"","emoji":"๐Ÿ‡ฒ๐Ÿ‡ฒ"},{"phoneCode":"257","code":"BI","name":"Burundi","pattern":"257 XX XX XXXX","emoji":"๐Ÿ‡ง๐Ÿ‡ฎ"},{"phoneCode":"855","code":"KH","name":"Cambodia","pattern":"","emoji":"๐Ÿ‡ฐ๐Ÿ‡ญ"},{"phoneCode":"237","code":"CM","name":"Cameroon","pattern":"237 XXXX XXXX","emoji":"๐Ÿ‡จ๐Ÿ‡ฒ"},{"phoneCode"
const PhoneCodesMain: {[phoneCode: string]: Country} = {
'1': Countries.find(c => c.name == 'United States'),
'44': Countries.find(c => c.name == 'United Kingdom'),
'61': Countries.find(c => c.name == 'Australia'),
'64': Countries.find(c => c.name == 'New Zealand'),
'246': Countries.find(c => c.name == 'Diego Garcia'),
'255': Countries.find(c => c.name == 'Tanzania'),
'262': Countries.find(c => c.name == 'Reunion'),
'500': Countries.find(c => c.name == 'Falkland Islands'),
'590': Countries.find(c => c.name == 'Guadeloupe'),
'672': Countries.find(c => c.name == 'Norfolk Island'),
'1 268': Countries.find(c => c.name == 'Antigua & Barbuda'),
};
/*
const toInt = (str) => {
return parseInt(str.replace(/ /g, ''));
};
var arr = window.Countries.sort((a, b) => toInt(a.phoneCode) - toInt(b.phoneCode));
arr.forEach((el, idx) => {
if(idx == (arr.length - 1)) {
return;
}
if(toInt(arr[idx + 1].phoneCode) == toInt(el.phoneCode)) {
console.log('duplicate', el, arr[idx + 1]);
}
});
*/
MOUNT_CLASS_TO && (MOUNT_CLASS_TO.Countries = Countries);
export default Countries;
export {PhoneCodesMain};