intl-tel-input 19.2.7 → 19.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Gruntfile.js +2 -2
- package/README.md +2 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput-jquery.js +6 -3
- package/build/js/intlTelInput-jquery.min.js +3 -3
- package/build/js/intlTelInput.js +6 -3
- package/build/js/intlTelInput.min.js +3 -3
- package/composer.json +1 -1
- package/grunt/shell.js +2 -2
- package/package.json +3 -3
- package/react/build/IntlTelInput.cjs.js +2 -2
- package/react/build/IntlTelInput.cjs.js.map +3 -3
- package/react/build/IntlTelInput.esm.js +2 -2
- package/react/build/IntlTelInput.esm.js.map +3 -3
- package/react/demo/SimpleApp.js +6 -4
- package/react/demo/ValidationApp.js +4 -4
- package/react/demo/simple-bundle.js +130 -124
- package/react/demo/simple.html +3 -2
- package/react/demo/validation-bundle.js +122 -115
- package/react/demo/validation.html +4 -2
- package/react/src/IntlTelInput.js +54 -38
- package/src/js/intlTelInput.js +4 -1
|
@@ -24287,33 +24287,33 @@ var require_prop_types = __commonJS({
|
|
|
24287
24287
|
var require_IntlTelInput_cjs = __commonJS({
|
|
24288
24288
|
"react/build/IntlTelInput.cjs.js"(exports, module2) {
|
|
24289
24289
|
var Q = Object.create;
|
|
24290
|
-
var
|
|
24290
|
+
var N = Object.defineProperty;
|
|
24291
24291
|
var X = Object.getOwnPropertyDescriptor;
|
|
24292
24292
|
var tt = Object.getOwnPropertyNames;
|
|
24293
24293
|
var et = Object.getPrototypeOf;
|
|
24294
24294
|
var it = Object.prototype.hasOwnProperty;
|
|
24295
|
-
var nt = (
|
|
24296
|
-
var ot = (
|
|
24297
|
-
for (var
|
|
24298
|
-
|
|
24295
|
+
var nt = (c, h) => () => (h || c((h = { exports: {} }).exports, h), h.exports);
|
|
24296
|
+
var ot = (c, h) => {
|
|
24297
|
+
for (var v in h)
|
|
24298
|
+
N(c, v, { get: h[v], enumerable: true });
|
|
24299
24299
|
};
|
|
24300
|
-
var
|
|
24300
|
+
var K = (c, h, v, m) => {
|
|
24301
24301
|
if (h && typeof h == "object" || typeof h == "function")
|
|
24302
24302
|
for (let C of tt(h))
|
|
24303
|
-
!it.call(
|
|
24304
|
-
return
|
|
24303
|
+
!it.call(c, C) && C !== v && N(c, C, { get: () => h[C], enumerable: !(m = X(h, C)) || m.enumerable });
|
|
24304
|
+
return c;
|
|
24305
24305
|
};
|
|
24306
|
-
var
|
|
24307
|
-
var rt = (
|
|
24308
|
-
var
|
|
24309
|
-
(function(
|
|
24310
|
-
typeof
|
|
24311
|
-
})(function(
|
|
24306
|
+
var B = (c, h, v) => (v = c != null ? Q(et(c)) : {}, K(h || !c || !c.__esModule ? N(v, "default", { value: c, enumerable: true }) : v, c));
|
|
24307
|
+
var rt = (c) => K(N({}, "__esModule", { value: true }), c);
|
|
24308
|
+
var z = nt((ut, F) => {
|
|
24309
|
+
(function(c) {
|
|
24310
|
+
typeof F == "object" && F.exports ? F.exports = c() : window.intlTelInput = c();
|
|
24311
|
+
})(function(c) {
|
|
24312
24312
|
"use strict";
|
|
24313
24313
|
return function() {
|
|
24314
|
-
for (var h = [["Afghanistan", "af", "93"], ["Albania", "al", "355"], ["Algeria", "dz", "213"], ["American Samoa", "as", "1", 5, ["684"]], ["Andorra", "ad", "376"], ["Angola", "ao", "244"], ["Anguilla", "ai", "1", 6, ["264"]], ["Antigua & Barbuda", "ag", "1", 7, ["268"]], ["Argentina", "ar", "54"], ["Armenia", "am", "374"], ["Aruba", "aw", "297"], ["Ascension Island", "ac", "247"], ["Australia", "au", "61", 0], ["Austria", "at", "43"], ["Azerbaijan", "az", "994"], ["Bahamas", "bs", "1", 8, ["242"]], ["Bahrain", "bh", "973"], ["Bangladesh", "bd", "880"], ["Barbados", "bb", "1", 9, ["246"]], ["Belarus", "by", "375"], ["Belgium", "be", "32"], ["Belize", "bz", "501"], ["Benin", "bj", "229"], ["Bermuda", "bm", "1", 10, ["441"]], ["Bhutan", "bt", "975"], ["Bolivia", "bo", "591"], ["Bosnia & Herzegovina", "ba", "387"], ["Botswana", "bw", "267"], ["Brazil", "br", "55"], ["British Indian Ocean Territory", "io", "246"], ["British Virgin Islands", "vg", "1", 11, ["284"]], ["Brunei", "bn", "673"], ["Bulgaria", "bg", "359"], ["Burkina Faso", "bf", "226"], ["Burundi", "bi", "257"], ["Cambodia", "kh", "855"], ["Cameroon", "cm", "237"], ["Canada", "ca", "1", 1, ["204", "226", "236", "249", "250", "263", "289", "306", "343", "354", "365", "367", "368", "382", "387", "403", "416", "418", "428", "431", "437", "438", "450", "584", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905"]], ["Cape Verde", "cv", "238"], ["Caribbean Netherlands", "bq", "599", 1, ["3", "4", "7"]], ["Cayman Islands", "ky", "1", 12, ["345"]], ["Central African Republic", "cf", "236"], ["Chad", "td", "235"], ["Chile", "cl", "56"], ["China", "cn", "86"], ["Christmas Island", "cx", "61", 2, ["89164"]], ["Cocos (Keeling) Islands", "cc", "61", 1, ["89162"]], ["Colombia", "co", "57"], ["Comoros", "km", "269"], ["Congo - Brazzaville", "cg", "242"], ["Congo - Kinshasa", "cd", "243"], ["Cook Islands", "ck", "682"], ["Costa Rica", "cr", "506"], ["C\xF4te d\u2019Ivoire", "ci", "225"], ["Croatia", "hr", "385"], ["Cuba", "cu", "53"], ["Cura\xE7ao", "cw", "599", 0], ["Cyprus", "cy", "357"], ["Czech Republic", "cz", "420"], ["Denmark", "dk", "45"], ["Djibouti", "dj", "253"], ["Dominica", "dm", "1", 13, ["767"]], ["Dominican Republic", "do", "1", 2, ["809", "829", "849"]], ["Ecuador", "ec", "593"], ["Egypt", "eg", "20"], ["El Salvador", "sv", "503"], ["Equatorial Guinea", "gq", "240"], ["Eritrea", "er", "291"], ["Estonia", "ee", "372"], ["Eswatini", "sz", "268"], ["Ethiopia", "et", "251"], ["Falkland Islands", "fk", "500"], ["Faroe Islands", "fo", "298"], ["Fiji", "fj", "679"], ["Finland", "fi", "358", 0], ["France", "fr", "33"], ["French Guiana", "gf", "594"], ["French Polynesia", "pf", "689"], ["Gabon", "ga", "241"], ["Gambia", "gm", "220"], ["Georgia", "ge", "995"], ["Germany", "de", "49"], ["Ghana", "gh", "233"], ["Gibraltar", "gi", "350"], ["Greece", "gr", "30"], ["Greenland", "gl", "299"], ["Grenada", "gd", "1", 14, ["473"]], ["Guadeloupe", "gp", "590", 0], ["Guam", "gu", "1", 15, ["671"]], ["Guatemala", "gt", "502"], ["Guernsey", "gg", "44", 1, ["1481", "7781", "7839", "7911"]], ["Guinea", "gn", "224"], ["Guinea-Bissau", "gw", "245"], ["Guyana", "gy", "592"], ["Haiti", "ht", "509"], ["Honduras", "hn", "504"], ["Hong Kong", "hk", "852"], ["Hungary", "hu", "36"], ["Iceland", "is", "354"], ["India", "in", "91"], ["Indonesia", "id", "62"], ["Iran", "ir", "98"], ["Iraq", "iq", "964"], ["Ireland", "ie", "353"], ["Isle of Man", "im", "44", 2, ["1624", "74576", "7524", "7924", "7624"]], ["Israel", "il", "972"], ["Italy", "it", "39", 0], ["Jamaica", "jm", "1", 4, ["876", "658"]], ["Japan", "jp", "81"], ["Jersey", "je", "44", 3, ["1534", "7509", "7700", "7797", "7829", "7937"]], ["Jordan", "jo", "962"], ["Kazakhstan", "kz", "7", 1, ["33", "7"]], ["Kenya", "ke", "254"], ["Kiribati", "ki", "686"], ["Kosovo", "xk", "383"], ["Kuwait", "kw", "965"], ["Kyrgyzstan", "kg", "996"], ["Laos", "la", "856"], ["Latvia", "lv", "371"], ["Lebanon", "lb", "961"], ["Lesotho", "ls", "266"], ["Liberia", "lr", "231"], ["Libya", "ly", "218"], ["Liechtenstein", "li", "423"], ["Lithuania", "lt", "370"], ["Luxembourg", "lu", "352"], ["Macau", "mo", "853"], ["Madagascar", "mg", "261"], ["Malawi", "mw", "265"], ["Malaysia", "my", "60"], ["Maldives", "mv", "960"], ["Mali", "ml", "223"], ["Malta", "mt", "356"], ["Marshall Islands", "mh", "692"], ["Martinique", "mq", "596"], ["Mauritania", "mr", "222"], ["Mauritius", "mu", "230"], ["Mayotte", "yt", "262", 1, ["269", "639"]], ["Mexico", "mx", "52"], ["Micronesia", "fm", "691"], ["Moldova", "md", "373"], ["Monaco", "mc", "377"], ["Mongolia", "mn", "976"], ["Montenegro", "me", "382"], ["Montserrat", "ms", "1", 16, ["664"]], ["Morocco", "ma", "212", 0], ["Mozambique", "mz", "258"], ["Myanmar (Burma)", "mm", "95"], ["Namibia", "na", "264"], ["Nauru", "nr", "674"], ["Nepal", "np", "977"], ["Netherlands", "nl", "31"], ["New Caledonia", "nc", "687"], ["New Zealand", "nz", "64"], ["Nicaragua", "ni", "505"], ["Niger", "ne", "227"], ["Nigeria", "ng", "234"], ["Niue", "nu", "683"], ["Norfolk Island", "nf", "672"], ["North Korea", "kp", "850"], ["North Macedonia", "mk", "389"], ["Northern Mariana Islands", "mp", "1", 17, ["670"]], ["Norway", "no", "47", 0], ["Oman", "om", "968"], ["Pakistan", "pk", "92"], ["Palau", "pw", "680"], ["Palestine", "ps", "970"], ["Panama", "pa", "507"], ["Papua New Guinea", "pg", "675"], ["Paraguay", "py", "595"], ["Peru", "pe", "51"], ["Philippines", "ph", "63"], ["Poland", "pl", "48"], ["Portugal", "pt", "351"], ["Puerto Rico", "pr", "1", 3, ["787", "939"]], ["Qatar", "qa", "974"], ["R\xE9union", "re", "262", 0], ["Romania", "ro", "40"], ["Russia", "ru", "7", 0], ["Rwanda", "rw", "250"], ["Samoa", "ws", "685"], ["San Marino", "sm", "378"], ["S\xE3o Tom\xE9 & Pr\xEDncipe", "st", "239"], ["Saudi Arabia", "sa", "966"], ["Senegal", "sn", "221"], ["Serbia", "rs", "381"], ["Seychelles", "sc", "248"], ["Sierra Leone", "sl", "232"], ["Singapore", "sg", "65"], ["Sint Maarten", "sx", "1", 21, ["721"]], ["Slovakia", "sk", "421"], ["Slovenia", "si", "386"], ["Solomon Islands", "sb", "677"], ["Somalia", "so", "252"], ["South Africa", "za", "27"], ["South Korea", "kr", "82"], ["South Sudan", "ss", "211"], ["Spain", "es", "34"], ["Sri Lanka", "lk", "94"], ["St Barth\xE9lemy", "bl", "590", 1], ["St Helena", "sh", "290"], ["St Kitts & Nevis", "kn", "1", 18, ["869"]], ["St Lucia", "lc", "1", 19, ["758"]], ["St Martin", "mf", "590", 2], ["St Pierre & Miquelon", "pm", "508"], ["St Vincent & Grenadines", "vc", "1", 20, ["784"]], ["Sudan", "sd", "249"], ["Suriname", "sr", "597"], ["Svalbard & Jan Mayen", "sj", "47", 1, ["79"]], ["Sweden", "se", "46"], ["Switzerland", "ch", "41"], ["Syria", "sy", "963"], ["Taiwan", "tw", "886"], ["Tajikistan", "tj", "992"], ["Tanzania", "tz", "255"], ["Thailand", "th", "66"], ["Timor-Leste", "tl", "670"], ["Togo", "tg", "228"], ["Tokelau", "tk", "690"], ["Tonga", "to", "676"], ["Trinidad & Tobago", "tt", "1", 22, ["868"]], ["Tunisia", "tn", "216"], ["Turkey", "tr", "90"], ["Turkmenistan", "tm", "993"], ["Turks & Caicos Islands", "tc", "1", 23, ["649"]], ["Tuvalu", "tv", "688"], ["Uganda", "ug", "256"], ["Ukraine", "ua", "380"], ["United Arab Emirates", "ae", "971"], ["United Kingdom", "gb", "44", 0], ["United States", "us", "1", 0], ["Uruguay", "uy", "598"], ["US Virgin Islands", "vi", "1", 24, ["340"]], ["Uzbekistan", "uz", "998"], ["Vanuatu", "vu", "678"], ["Vatican City", "va", "39", 1, ["06698"]], ["Venezuela", "ve", "58"], ["Vietnam", "vn", "84"], ["Wallis & Futuna", "wf", "681"], ["Western Sahara", "eh", "212", 1, ["5288", "5289"]], ["Yemen", "ye", "967"], ["Zambia", "zm", "260"], ["Zimbabwe", "zw", "263"], ["\xC5land Islands", "ax", "358", 1, ["18"]]],
|
|
24315
|
-
var m = h[
|
|
24316
|
-
h[
|
|
24314
|
+
for (var h = [["Afghanistan", "af", "93"], ["Albania", "al", "355"], ["Algeria", "dz", "213"], ["American Samoa", "as", "1", 5, ["684"]], ["Andorra", "ad", "376"], ["Angola", "ao", "244"], ["Anguilla", "ai", "1", 6, ["264"]], ["Antigua & Barbuda", "ag", "1", 7, ["268"]], ["Argentina", "ar", "54"], ["Armenia", "am", "374"], ["Aruba", "aw", "297"], ["Ascension Island", "ac", "247"], ["Australia", "au", "61", 0], ["Austria", "at", "43"], ["Azerbaijan", "az", "994"], ["Bahamas", "bs", "1", 8, ["242"]], ["Bahrain", "bh", "973"], ["Bangladesh", "bd", "880"], ["Barbados", "bb", "1", 9, ["246"]], ["Belarus", "by", "375"], ["Belgium", "be", "32"], ["Belize", "bz", "501"], ["Benin", "bj", "229"], ["Bermuda", "bm", "1", 10, ["441"]], ["Bhutan", "bt", "975"], ["Bolivia", "bo", "591"], ["Bosnia & Herzegovina", "ba", "387"], ["Botswana", "bw", "267"], ["Brazil", "br", "55"], ["British Indian Ocean Territory", "io", "246"], ["British Virgin Islands", "vg", "1", 11, ["284"]], ["Brunei", "bn", "673"], ["Bulgaria", "bg", "359"], ["Burkina Faso", "bf", "226"], ["Burundi", "bi", "257"], ["Cambodia", "kh", "855"], ["Cameroon", "cm", "237"], ["Canada", "ca", "1", 1, ["204", "226", "236", "249", "250", "263", "289", "306", "343", "354", "365", "367", "368", "382", "387", "403", "416", "418", "428", "431", "437", "438", "450", "584", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "902", "905"]], ["Cape Verde", "cv", "238"], ["Caribbean Netherlands", "bq", "599", 1, ["3", "4", "7"]], ["Cayman Islands", "ky", "1", 12, ["345"]], ["Central African Republic", "cf", "236"], ["Chad", "td", "235"], ["Chile", "cl", "56"], ["China", "cn", "86"], ["Christmas Island", "cx", "61", 2, ["89164"]], ["Cocos (Keeling) Islands", "cc", "61", 1, ["89162"]], ["Colombia", "co", "57"], ["Comoros", "km", "269"], ["Congo - Brazzaville", "cg", "242"], ["Congo - Kinshasa", "cd", "243"], ["Cook Islands", "ck", "682"], ["Costa Rica", "cr", "506"], ["C\xF4te d\u2019Ivoire", "ci", "225"], ["Croatia", "hr", "385"], ["Cuba", "cu", "53"], ["Cura\xE7ao", "cw", "599", 0], ["Cyprus", "cy", "357"], ["Czech Republic", "cz", "420"], ["Denmark", "dk", "45"], ["Djibouti", "dj", "253"], ["Dominica", "dm", "1", 13, ["767"]], ["Dominican Republic", "do", "1", 2, ["809", "829", "849"]], ["Ecuador", "ec", "593"], ["Egypt", "eg", "20"], ["El Salvador", "sv", "503"], ["Equatorial Guinea", "gq", "240"], ["Eritrea", "er", "291"], ["Estonia", "ee", "372"], ["Eswatini", "sz", "268"], ["Ethiopia", "et", "251"], ["Falkland Islands", "fk", "500"], ["Faroe Islands", "fo", "298"], ["Fiji", "fj", "679"], ["Finland", "fi", "358", 0], ["France", "fr", "33"], ["French Guiana", "gf", "594"], ["French Polynesia", "pf", "689"], ["Gabon", "ga", "241"], ["Gambia", "gm", "220"], ["Georgia", "ge", "995"], ["Germany", "de", "49"], ["Ghana", "gh", "233"], ["Gibraltar", "gi", "350"], ["Greece", "gr", "30"], ["Greenland", "gl", "299"], ["Grenada", "gd", "1", 14, ["473"]], ["Guadeloupe", "gp", "590", 0], ["Guam", "gu", "1", 15, ["671"]], ["Guatemala", "gt", "502"], ["Guernsey", "gg", "44", 1, ["1481", "7781", "7839", "7911"]], ["Guinea", "gn", "224"], ["Guinea-Bissau", "gw", "245"], ["Guyana", "gy", "592"], ["Haiti", "ht", "509"], ["Honduras", "hn", "504"], ["Hong Kong", "hk", "852"], ["Hungary", "hu", "36"], ["Iceland", "is", "354"], ["India", "in", "91"], ["Indonesia", "id", "62"], ["Iran", "ir", "98"], ["Iraq", "iq", "964"], ["Ireland", "ie", "353"], ["Isle of Man", "im", "44", 2, ["1624", "74576", "7524", "7924", "7624"]], ["Israel", "il", "972"], ["Italy", "it", "39", 0], ["Jamaica", "jm", "1", 4, ["876", "658"]], ["Japan", "jp", "81"], ["Jersey", "je", "44", 3, ["1534", "7509", "7700", "7797", "7829", "7937"]], ["Jordan", "jo", "962"], ["Kazakhstan", "kz", "7", 1, ["33", "7"]], ["Kenya", "ke", "254"], ["Kiribati", "ki", "686"], ["Kosovo", "xk", "383"], ["Kuwait", "kw", "965"], ["Kyrgyzstan", "kg", "996"], ["Laos", "la", "856"], ["Latvia", "lv", "371"], ["Lebanon", "lb", "961"], ["Lesotho", "ls", "266"], ["Liberia", "lr", "231"], ["Libya", "ly", "218"], ["Liechtenstein", "li", "423"], ["Lithuania", "lt", "370"], ["Luxembourg", "lu", "352"], ["Macau", "mo", "853"], ["Madagascar", "mg", "261"], ["Malawi", "mw", "265"], ["Malaysia", "my", "60"], ["Maldives", "mv", "960"], ["Mali", "ml", "223"], ["Malta", "mt", "356"], ["Marshall Islands", "mh", "692"], ["Martinique", "mq", "596"], ["Mauritania", "mr", "222"], ["Mauritius", "mu", "230"], ["Mayotte", "yt", "262", 1, ["269", "639"]], ["Mexico", "mx", "52"], ["Micronesia", "fm", "691"], ["Moldova", "md", "373"], ["Monaco", "mc", "377"], ["Mongolia", "mn", "976"], ["Montenegro", "me", "382"], ["Montserrat", "ms", "1", 16, ["664"]], ["Morocco", "ma", "212", 0], ["Mozambique", "mz", "258"], ["Myanmar (Burma)", "mm", "95"], ["Namibia", "na", "264"], ["Nauru", "nr", "674"], ["Nepal", "np", "977"], ["Netherlands", "nl", "31"], ["New Caledonia", "nc", "687"], ["New Zealand", "nz", "64"], ["Nicaragua", "ni", "505"], ["Niger", "ne", "227"], ["Nigeria", "ng", "234"], ["Niue", "nu", "683"], ["Norfolk Island", "nf", "672"], ["North Korea", "kp", "850"], ["North Macedonia", "mk", "389"], ["Northern Mariana Islands", "mp", "1", 17, ["670"]], ["Norway", "no", "47", 0], ["Oman", "om", "968"], ["Pakistan", "pk", "92"], ["Palau", "pw", "680"], ["Palestine", "ps", "970"], ["Panama", "pa", "507"], ["Papua New Guinea", "pg", "675"], ["Paraguay", "py", "595"], ["Peru", "pe", "51"], ["Philippines", "ph", "63"], ["Poland", "pl", "48"], ["Portugal", "pt", "351"], ["Puerto Rico", "pr", "1", 3, ["787", "939"]], ["Qatar", "qa", "974"], ["R\xE9union", "re", "262", 0], ["Romania", "ro", "40"], ["Russia", "ru", "7", 0], ["Rwanda", "rw", "250"], ["Samoa", "ws", "685"], ["San Marino", "sm", "378"], ["S\xE3o Tom\xE9 & Pr\xEDncipe", "st", "239"], ["Saudi Arabia", "sa", "966"], ["Senegal", "sn", "221"], ["Serbia", "rs", "381"], ["Seychelles", "sc", "248"], ["Sierra Leone", "sl", "232"], ["Singapore", "sg", "65"], ["Sint Maarten", "sx", "1", 21, ["721"]], ["Slovakia", "sk", "421"], ["Slovenia", "si", "386"], ["Solomon Islands", "sb", "677"], ["Somalia", "so", "252"], ["South Africa", "za", "27"], ["South Korea", "kr", "82"], ["South Sudan", "ss", "211"], ["Spain", "es", "34"], ["Sri Lanka", "lk", "94"], ["St Barth\xE9lemy", "bl", "590", 1], ["St Helena", "sh", "290"], ["St Kitts & Nevis", "kn", "1", 18, ["869"]], ["St Lucia", "lc", "1", 19, ["758"]], ["St Martin", "mf", "590", 2], ["St Pierre & Miquelon", "pm", "508"], ["St Vincent & Grenadines", "vc", "1", 20, ["784"]], ["Sudan", "sd", "249"], ["Suriname", "sr", "597"], ["Svalbard & Jan Mayen", "sj", "47", 1, ["79"]], ["Sweden", "se", "46"], ["Switzerland", "ch", "41"], ["Syria", "sy", "963"], ["Taiwan", "tw", "886"], ["Tajikistan", "tj", "992"], ["Tanzania", "tz", "255"], ["Thailand", "th", "66"], ["Timor-Leste", "tl", "670"], ["Togo", "tg", "228"], ["Tokelau", "tk", "690"], ["Tonga", "to", "676"], ["Trinidad & Tobago", "tt", "1", 22, ["868"]], ["Tunisia", "tn", "216"], ["Turkey", "tr", "90"], ["Turkmenistan", "tm", "993"], ["Turks & Caicos Islands", "tc", "1", 23, ["649"]], ["Tuvalu", "tv", "688"], ["Uganda", "ug", "256"], ["Ukraine", "ua", "380"], ["United Arab Emirates", "ae", "971"], ["United Kingdom", "gb", "44", 0], ["United States", "us", "1", 0], ["Uruguay", "uy", "598"], ["US Virgin Islands", "vi", "1", 24, ["340"]], ["Uzbekistan", "uz", "998"], ["Vanuatu", "vu", "678"], ["Vatican City", "va", "39", 1, ["06698"]], ["Venezuela", "ve", "58"], ["Vietnam", "vn", "84"], ["Wallis & Futuna", "wf", "681"], ["Western Sahara", "eh", "212", 1, ["5288", "5289"]], ["Yemen", "ye", "967"], ["Zambia", "zm", "260"], ["Zimbabwe", "zw", "263"], ["\xC5land Islands", "ax", "358", 1, ["18"]]], v = 0; v < h.length; v++) {
|
|
24315
|
+
var m = h[v];
|
|
24316
|
+
h[v] = { name: m[0], iso2: m[1], dialCode: m[2], priority: m[3] || 0, areaCodes: m[4] || null, nodeById: {} };
|
|
24317
24317
|
}
|
|
24318
24318
|
function C(s) {
|
|
24319
24319
|
for (var n = 1; n < arguments.length; n++) {
|
|
@@ -24321,22 +24321,22 @@ var require_IntlTelInput_cjs = __commonJS({
|
|
|
24321
24321
|
typeof Object.getOwnPropertySymbols == "function" && e.push.apply(e, Object.getOwnPropertySymbols(t).filter(function(i) {
|
|
24322
24322
|
return Object.getOwnPropertyDescriptor(t, i).enumerable;
|
|
24323
24323
|
})), e.forEach(function(i) {
|
|
24324
|
-
|
|
24324
|
+
P(s, i, t[i]);
|
|
24325
24325
|
});
|
|
24326
24326
|
}
|
|
24327
24327
|
return s;
|
|
24328
24328
|
}
|
|
24329
|
-
function
|
|
24330
|
-
return n =
|
|
24329
|
+
function P(s, n, t) {
|
|
24330
|
+
return n = D(n), n in s ? Object.defineProperty(s, n, { value: t, enumerable: true, configurable: true, writable: true }) : s[n] = t, s;
|
|
24331
24331
|
}
|
|
24332
|
-
function
|
|
24333
|
-
return
|
|
24332
|
+
function x(s, n) {
|
|
24333
|
+
return _(s) || w(s, n) || U(s, n) || O();
|
|
24334
24334
|
}
|
|
24335
|
-
function
|
|
24335
|
+
function O() {
|
|
24336
24336
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
24337
24337
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
24338
24338
|
}
|
|
24339
|
-
function
|
|
24339
|
+
function U(s, n) {
|
|
24340
24340
|
if (s) {
|
|
24341
24341
|
if (typeof s == "string")
|
|
24342
24342
|
return k(s, n);
|
|
@@ -24353,7 +24353,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24353
24353
|
e[t] = s[t];
|
|
24354
24354
|
return e;
|
|
24355
24355
|
}
|
|
24356
|
-
function
|
|
24356
|
+
function w(s, n) {
|
|
24357
24357
|
var t = s == null ? null : typeof Symbol < "u" && s[Symbol.iterator] || s["@@iterator"];
|
|
24358
24358
|
if (t != null) {
|
|
24359
24359
|
var e, i, o, r, a = [], l = true, u = false;
|
|
@@ -24365,8 +24365,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24365
24365
|
} else
|
|
24366
24366
|
for (; !(l = (e = o.call(t)).done) && (a.push(e.value), a.length !== n); l = true)
|
|
24367
24367
|
;
|
|
24368
|
-
} catch (
|
|
24369
|
-
u = true, i =
|
|
24368
|
+
} catch (p) {
|
|
24369
|
+
u = true, i = p;
|
|
24370
24370
|
} finally {
|
|
24371
24371
|
try {
|
|
24372
24372
|
if (!l && t.return != null && (r = t.return(), Object(r) !== r))
|
|
@@ -24379,24 +24379,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24379
24379
|
return a;
|
|
24380
24380
|
}
|
|
24381
24381
|
}
|
|
24382
|
-
function
|
|
24382
|
+
function _(s) {
|
|
24383
24383
|
if (Array.isArray(s))
|
|
24384
24384
|
return s;
|
|
24385
24385
|
}
|
|
24386
|
-
function
|
|
24386
|
+
function I(s, n) {
|
|
24387
24387
|
if (!(s instanceof n))
|
|
24388
24388
|
throw new TypeError("Cannot call a class as a function");
|
|
24389
24389
|
}
|
|
24390
|
-
function
|
|
24390
|
+
function S(s, n) {
|
|
24391
24391
|
for (var t = 0; t < n.length; t++) {
|
|
24392
24392
|
var e = n[t];
|
|
24393
|
-
e.enumerable = e.enumerable || false, e.configurable = true, "value" in e && (e.writable = true), Object.defineProperty(s,
|
|
24393
|
+
e.enumerable = e.enumerable || false, e.configurable = true, "value" in e && (e.writable = true), Object.defineProperty(s, D(e.key), e);
|
|
24394
24394
|
}
|
|
24395
24395
|
}
|
|
24396
|
-
function
|
|
24397
|
-
return n &&
|
|
24396
|
+
function M(s, n, t) {
|
|
24397
|
+
return n && S(s.prototype, n), t && S(s, t), Object.defineProperty(s, "prototype", { writable: false }), s;
|
|
24398
24398
|
}
|
|
24399
|
-
function
|
|
24399
|
+
function D(s) {
|
|
24400
24400
|
var n = H(s, "string");
|
|
24401
24401
|
return typeof n == "symbol" ? n : String(n);
|
|
24402
24402
|
}
|
|
@@ -24404,7 +24404,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24404
24404
|
if (typeof s != "object" || s === null)
|
|
24405
24405
|
return s;
|
|
24406
24406
|
var t = s[Symbol.toPrimitive];
|
|
24407
|
-
if (t !==
|
|
24407
|
+
if (t !== c) {
|
|
24408
24408
|
var e = t.call(s, n || "default");
|
|
24409
24409
|
if (typeof e != "object")
|
|
24410
24410
|
return e;
|
|
@@ -24419,17 +24419,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24419
24419
|
return document.readyState === "complete";
|
|
24420
24420
|
} };
|
|
24421
24421
|
typeof window == "object" && (window.intlTelInputGlobals = L);
|
|
24422
|
-
var W = 0,
|
|
24422
|
+
var W = 0, G = { allowDropdown: true, autoInsertDialCode: false, autoPlaceholder: "polite", countrySearch: true, containerClass: "", customPlaceholder: null, dropdownContainer: null, excludeCountries: [], fixDropdownWidth: true, formatAsYouType: true, formatOnDisplay: true, geoIpLookup: null, hiddenInput: null, i18n: {}, initialCountry: "", nationalMode: true, onlyCountries: [], placeholderNumberType: "MOBILE", preferredCountries: [], showFlags: true, showSelectedDialCode: false, useFullscreenPopup: typeof navigator < "u" && typeof window < "u" ? /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || window.innerWidth <= 500 : false, utilsScript: "" }, q = ["800", "822", "833", "844", "855", "866", "877", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889"], E = function(n) {
|
|
24423
24423
|
var t = window.intlTelInputGlobals.instances;
|
|
24424
24424
|
Object.values(t).forEach(function(e) {
|
|
24425
24425
|
return e[n]();
|
|
24426
24426
|
});
|
|
24427
24427
|
}, Y = function() {
|
|
24428
24428
|
function s(n) {
|
|
24429
|
-
var t = arguments.length > 1 && arguments[1] !==
|
|
24430
|
-
|
|
24429
|
+
var t = arguments.length > 1 && arguments[1] !== c ? arguments[1] : {};
|
|
24430
|
+
I(this, s), this.id = W++, this.telInput = n, this.activeItem = null, this.highlightedItem = null, this.options = Object.assign({}, G, t), this.hadInitialPlaceholder = !!n.getAttribute("placeholder");
|
|
24431
24431
|
}
|
|
24432
|
-
return
|
|
24432
|
+
return M(s, [{ key: "_init", value: function() {
|
|
24433
24433
|
var t = this;
|
|
24434
24434
|
this.options.useFullscreenPopup && (this.options.fixDropdownWidth = false), this.options.countrySearch && !this.options.useFullscreenPopup && (this.options.fixDropdownWidth = true), this.options.nationalMode && (this.options.autoInsertDialCode = false), this.options.showSelectedDialCode && (this.options.autoInsertDialCode = false);
|
|
24435
24435
|
var e = this.options.allowDropdown && !this.options.showSelectedDialCode;
|
|
@@ -24452,7 +24452,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24452
24452
|
for (var o = 0; o < this.countryCodes[e].length; o++)
|
|
24453
24453
|
if (this.countryCodes[e][o] === t)
|
|
24454
24454
|
return;
|
|
24455
|
-
var r = i !==
|
|
24455
|
+
var r = i !== c ? i : this.countryCodes[e].length;
|
|
24456
24456
|
this.countryCodes[e][r] = t;
|
|
24457
24457
|
} }, { key: "_processAllCountries", value: function() {
|
|
24458
24458
|
if (this.options.onlyCountries.length) {
|
|
@@ -24489,8 +24489,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24489
24489
|
if (o.areaCodes)
|
|
24490
24490
|
for (var r = this.countryCodes[o.dialCode][0], a = 0; a < o.areaCodes.length; a++) {
|
|
24491
24491
|
for (var l = o.areaCodes[a], u = 1; u < l.length; u++) {
|
|
24492
|
-
var
|
|
24493
|
-
this._addCountryCode(r,
|
|
24492
|
+
var p = o.dialCode + l.substr(0, u);
|
|
24493
|
+
this._addCountryCode(r, p), this._addCountryCode(o.iso2, p);
|
|
24494
24494
|
}
|
|
24495
24495
|
this._addCountryCode(o.iso2, o.dialCode + l);
|
|
24496
24496
|
}
|
|
@@ -24504,22 +24504,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24504
24504
|
} }, { key: "_createEl", value: function(t, e, i) {
|
|
24505
24505
|
var o = document.createElement(t);
|
|
24506
24506
|
return e && Object.entries(e).forEach(function(r) {
|
|
24507
|
-
var a =
|
|
24507
|
+
var a = x(r, 2), l = a[0], u = a[1];
|
|
24508
24508
|
return o.setAttribute(l, u);
|
|
24509
24509
|
}), i && i.appendChild(o), o;
|
|
24510
24510
|
} }, { key: "_generateMarkup", value: function() {
|
|
24511
24511
|
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
24512
|
-
var t = this.options, e = t.allowDropdown, i = t.showSelectedDialCode, o = t.showFlags, r = t.containerClass, a = t.hiddenInput, l = t.dropdownContainer, u = t.fixDropdownWidth,
|
|
24513
|
-
e && (
|
|
24514
|
-
var y = this._createEl("div", { class:
|
|
24512
|
+
var t = this.options, e = t.allowDropdown, i = t.showSelectedDialCode, o = t.showFlags, r = t.containerClass, a = t.hiddenInput, l = t.dropdownContainer, u = t.fixDropdownWidth, p = t.useFullscreenPopup, g = t.countrySearch, f = "iti";
|
|
24513
|
+
e && (f += " iti--allow-dropdown"), i && (f += " iti--show-selected-dial-code"), o && (f += " iti--show-flags"), r && (f += " ".concat(r)), p || (f += " iti--inline-dropdown");
|
|
24514
|
+
var y = this._createEl("div", { class: f });
|
|
24515
24515
|
this.telInput.parentNode.insertBefore(y, this.telInput);
|
|
24516
|
-
var
|
|
24517
|
-
if (
|
|
24516
|
+
var A = e || o || i;
|
|
24517
|
+
if (A && (this.flagsContainer = this._createEl("div", { class: "iti__flag-container" }, y)), y.appendChild(this.telInput), A && (this.selectedFlag = this._createEl("div", C({ class: "iti__selected-flag" }, e && { role: "combobox", "aria-haspopup": "listbox", "aria-controls": "iti-".concat(this.id, "__country-listbox"), "aria-expanded": "false", "aria-label": this.options.i18n.selectedCountryAriaLabel || "Selected country" }), this.flagsContainer)), o && (this.selectedFlagInner = this._createEl("div", { class: "iti__flag" }, this.selectedFlag)), this.selectedFlag && this.telInput.disabled && this.selectedFlag.setAttribute("aria-disabled", "true"), i && (this.selectedDialCode = this._createEl("div", { class: "iti__selected-dial-code" }, this.selectedFlag)), e) {
|
|
24518
24518
|
this.telInput.disabled || this.selectedFlag.setAttribute("tabindex", "0"), this.dropdownArrow = this._createEl("div", { class: "iti__arrow" }, this.selectedFlag);
|
|
24519
24519
|
var J = u ? "" : "iti--flexible-dropdown-width";
|
|
24520
|
-
if (this.dropdownContent = this._createEl("div", { class: "iti__dropdown-content iti__hide ".concat(J) }),
|
|
24521
|
-
var
|
|
24522
|
-
|
|
24520
|
+
if (this.dropdownContent = this._createEl("div", { class: "iti__dropdown-content iti__hide ".concat(J) }), g && (this.searchInput = this._createEl("input", { type: "text", class: "iti__search-input", placeholder: this.options.i18n.searchPlaceholder || "Search" }, this.dropdownContent)), this.countryList = this._createEl("ul", { class: "iti__country-list", id: "iti-".concat(this.id, "__country-listbox"), role: "listbox", "aria-label": this.options.i18n.countryListAriaLabel || "List of countries" }, this.dropdownContent), this.preferredCountries.length && !g && (this._appendListItems(this.preferredCountries, "iti__preferred", true), this._createEl("li", { class: "iti__divider", "aria-hidden": "true" }, this.countryList)), this._appendListItems(this.countries, "iti__standard"), l) {
|
|
24521
|
+
var T = "iti iti--container";
|
|
24522
|
+
p ? T += " iti--fullscreen-popup" : T += " iti--inline-dropdown", g && (T += " iti--country-search"), this.dropdown = this._createEl("div", { class: T }), this.dropdown.appendChild(this.dropdownContent);
|
|
24523
24523
|
} else
|
|
24524
24524
|
this.flagsContainer.appendChild(this.dropdownContent);
|
|
24525
24525
|
}
|
|
@@ -24530,17 +24530,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24530
24530
|
} }, { key: "_appendListItems", value: function(t, e, i) {
|
|
24531
24531
|
for (var o = 0; o < t.length; o++) {
|
|
24532
24532
|
var r = t[o], a = i ? "-preferred" : "", l = this._createEl("li", { id: "iti-".concat(this.id, "__item-").concat(r.iso2).concat(a), class: "iti__country ".concat(e), tabindex: "-1", role: "option", "data-dial-code": r.dialCode, "data-country-code": r.iso2, "aria-selected": "false" }, this.countryList);
|
|
24533
|
-
r.
|
|
24533
|
+
r.nodeById[this.id] = l;
|
|
24534
24534
|
var u = "";
|
|
24535
24535
|
this.options.showFlags && (u += "<div class='iti__flag-box'><div class='iti__flag iti__".concat(r.iso2, "'></div></div>")), u += "<span class='iti__country-name'>".concat(r.name, "</span>"), u += "<span class='iti__dial-code'>+".concat(r.dialCode, "</span>"), l.insertAdjacentHTML("beforeend", u);
|
|
24536
24536
|
}
|
|
24537
24537
|
} }, { key: "_setInitialState", value: function() {
|
|
24538
|
-
var t = this.telInput.getAttribute("value"), e = this.telInput.value, i = t && t.charAt(0) === "+" && (!e || e.charAt(0) !== "+"), o = i ? t : e, r = this._getDialCode(o), a = this._isRegionlessNanp(o), l = this.options, u = l.initialCountry,
|
|
24538
|
+
var t = this.telInput.getAttribute("value"), e = this.telInput.value, i = t && t.charAt(0) === "+" && (!e || e.charAt(0) !== "+"), o = i ? t : e, r = this._getDialCode(o), a = this._isRegionlessNanp(o), l = this.options, u = l.initialCountry, p = l.autoInsertDialCode;
|
|
24539
24539
|
if (r && !a)
|
|
24540
24540
|
this._updateFlagFromNumber(o);
|
|
24541
24541
|
else if (u !== "auto") {
|
|
24542
|
-
var
|
|
24543
|
-
|
|
24542
|
+
var g = u && this._getCountryData(u, false, true);
|
|
24543
|
+
g ? this._setFlag(u.toLowerCase()) : r && a ? this._setFlag("us") : (this.defaultCountry = this.preferredCountries.length ? this.preferredCountries[0].iso2 : this.countries[0].iso2, o || this._setFlag(this.defaultCountry)), !o && p && (this.telInput.value = "+".concat(this.selectedCountryData.dialCode));
|
|
24544
24544
|
}
|
|
24545
24545
|
o && this._updateValFromNumber(o);
|
|
24546
24546
|
} }, { key: "_initListeners", value: function() {
|
|
@@ -24570,17 +24570,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24570
24570
|
} }, { key: "_loadAutoCountry", value: function() {
|
|
24571
24571
|
window.intlTelInputGlobals.autoCountry ? this.handleAutoCountry() : window.intlTelInputGlobals.startedLoadingAutoCountry || (window.intlTelInputGlobals.startedLoadingAutoCountry = true, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(function(t) {
|
|
24572
24572
|
window.intlTelInputGlobals.autoCountry = t.toLowerCase(), setTimeout(function() {
|
|
24573
|
-
return
|
|
24573
|
+
return E("handleAutoCountry");
|
|
24574
24574
|
});
|
|
24575
24575
|
}, function() {
|
|
24576
|
-
return
|
|
24576
|
+
return E("rejectAutoCountryPromise");
|
|
24577
24577
|
}));
|
|
24578
24578
|
} }, { key: "_initKeyListeners", value: function() {
|
|
24579
24579
|
var t = this, e = false;
|
|
24580
24580
|
this._handleKeyEvent = function(i) {
|
|
24581
24581
|
if (t._updateFlagFromNumber(t.telInput.value) && t._triggerCountryChange(), i && i.data && /[^+0-9]/.test(i.data) ? e = true : /[^+0-9]/.test(t.telInput.value) || (e = false), t.options.formatAsYouType && !e) {
|
|
24582
|
-
var o = t.telInput.selectionStart, r = t.telInput.value.substring(0, o), a = r.replace(/[^+0-9]/g, "").length, l = i && i.inputType === "deleteContentForward", u = t._formatNumberAsYouType(),
|
|
24583
|
-
t.telInput.value = u, t.telInput.setSelectionRange(
|
|
24582
|
+
var o = t.telInput.selectionStart, r = t.telInput.value.substring(0, o), a = r.replace(/[^+0-9]/g, "").length, l = i && i.inputType === "deleteContentForward", u = t._formatNumberAsYouType(), p = t._translateCursorPosition(a, u, o, l);
|
|
24583
|
+
t.telInput.value = u, t.telInput.setSelectionRange(p, p);
|
|
24584
24584
|
}
|
|
24585
24585
|
}, this.telInput.addEventListener("input", this._handleKeyEvent), this._handleClipboardEvent = function() {
|
|
24586
24586
|
setTimeout(t._handleKeyEvent);
|
|
@@ -24614,7 +24614,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24614
24614
|
var e = new Event(t, { bubbles: true, cancelable: true });
|
|
24615
24615
|
this.telInput.dispatchEvent(e);
|
|
24616
24616
|
} }, { key: "_showDropdown", value: function() {
|
|
24617
|
-
this.options.fixDropdownWidth && (this.dropdownContent.style.width = "".concat(this.telInput.offsetWidth, "px")), this.dropdownContent.classList.remove("iti__hide"), this.selectedFlag.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), this.options.countrySearch
|
|
24617
|
+
if (this.options.fixDropdownWidth && (this.dropdownContent.style.width = "".concat(this.telInput.offsetWidth, "px")), this.dropdownContent.classList.remove("iti__hide"), this.selectedFlag.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), this.options.countrySearch) {
|
|
24618
|
+
var t = this.countryList.firstElementChild;
|
|
24619
|
+
t && this._highlightListItem(t, false), this.searchInput.focus();
|
|
24620
|
+
} else
|
|
24621
|
+
this.activeItem && (this._highlightListItem(this.activeItem, false), this._scrollTo(this.activeItem, true));
|
|
24622
|
+
this._bindDropdownListeners(), this.dropdownArrow.classList.add("iti__arrow--up"), this._trigger("open:countrydropdown");
|
|
24618
24623
|
} }, { key: "_toggleClass", value: function(t, e, i) {
|
|
24619
24624
|
i && !t.classList.contains(e) ? t.classList.add(e) : !i && t.classList.contains(e) && t.classList.remove(e);
|
|
24620
24625
|
} }, { key: "_setDropdownPosition", value: function() {
|
|
@@ -24622,8 +24627,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24622
24627
|
if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) {
|
|
24623
24628
|
var e = this.telInput.getBoundingClientRect(), i = document.documentElement.scrollTop, o = e.top + i, r = this.dropdownContent.offsetHeight, a = o + this.telInput.offsetHeight + r < i + window.innerHeight, l = o - r > i, u = !this.options.countrySearch && !a && l;
|
|
24624
24629
|
if (this._toggleClass(this.dropdownContent, "iti__dropdown-content--dropup", u), this.options.dropdownContainer) {
|
|
24625
|
-
var
|
|
24626
|
-
this.dropdown.style.top = "".concat(o +
|
|
24630
|
+
var p = u ? 0 : this.telInput.offsetHeight;
|
|
24631
|
+
this.dropdown.style.top = "".concat(o + p, "px"), this.dropdown.style.left = "".concat(e.left + document.body.scrollLeft, "px"), this._handleWindowScroll = function() {
|
|
24627
24632
|
return t._closeDropdown();
|
|
24628
24633
|
}, window.addEventListener("scroll", this._handleWindowScroll);
|
|
24629
24634
|
}
|
|
@@ -24660,11 +24665,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24660
24665
|
});
|
|
24661
24666
|
}
|
|
24662
24667
|
} }, { key: "_filterCountries", value: function(t) {
|
|
24663
|
-
var e = arguments.length > 1 && arguments[1] !==
|
|
24668
|
+
var e = arguments.length > 1 && arguments[1] !== c ? arguments[1] : false, i = true;
|
|
24664
24669
|
this.countryList.innerHTML = "";
|
|
24665
24670
|
for (var o = 0; o < this.countries.length; o++) {
|
|
24666
24671
|
var r = this.countries[o], a = r.name.toLowerCase(), l = "+".concat(r.dialCode);
|
|
24667
|
-
(e || a.includes(t) || l.includes(t) || r.iso2.includes(t)) && (this.countryList.appendChild(r.
|
|
24672
|
+
(e || a.includes(t) || l.includes(t) || r.iso2.includes(t)) && (this.countryList.appendChild(r.nodeById[this.id]), i && (this._highlightListItem(r.nodeById[this.id], false), i = false));
|
|
24668
24673
|
}
|
|
24669
24674
|
} }, { key: "_handleUpDownKey", value: function(t) {
|
|
24670
24675
|
var e = t === "ArrowUp" ? this.highlightedItem.previousElementSibling : this.highlightedItem.nextElementSibling;
|
|
@@ -24677,7 +24682,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24677
24682
|
} }, { key: "_searchForCountry", value: function(t) {
|
|
24678
24683
|
for (var e = 0; e < this.countries.length; e++)
|
|
24679
24684
|
if (this._startsWith(this.countries[e].name, t)) {
|
|
24680
|
-
var i = this.countries[e].
|
|
24685
|
+
var i = this.countries[e].nodeById[this.id];
|
|
24681
24686
|
this._highlightListItem(i, false), this._scrollTo(i, true);
|
|
24682
24687
|
break;
|
|
24683
24688
|
}
|
|
@@ -24695,11 +24700,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24695
24700
|
i && r && i.charAt(0) !== "+" && (i.charAt(0) !== "1" && (i = "1".concat(i)), i = "+".concat(i)), this.options.showSelectedDialCode && o && i.charAt(0) !== "+" && (i = "+".concat(o).concat(i));
|
|
24696
24701
|
var a = this._getDialCode(i, true), l = this._getNumeric(i), u = null;
|
|
24697
24702
|
if (a) {
|
|
24698
|
-
var
|
|
24699
|
-
if (!
|
|
24700
|
-
for (var y = 0; y <
|
|
24701
|
-
if (
|
|
24702
|
-
u =
|
|
24703
|
+
var p = this.countryCodes[this._getNumeric(a)], g = p.indexOf(this.selectedCountryData.iso2) !== -1 && l.length <= a.length - 1, f = o === "1" && this._isRegionlessNanp(l);
|
|
24704
|
+
if (!f && !g) {
|
|
24705
|
+
for (var y = 0; y < p.length; y++)
|
|
24706
|
+
if (p[y]) {
|
|
24707
|
+
u = p[y];
|
|
24703
24708
|
break;
|
|
24704
24709
|
}
|
|
24705
24710
|
}
|
|
@@ -24724,21 +24729,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24724
24729
|
return null;
|
|
24725
24730
|
throw new Error("No country data for '".concat(t, "'"));
|
|
24726
24731
|
} }, { key: "_setFlag", value: function(t) {
|
|
24727
|
-
var e = this.options, i = e.allowDropdown, o = e.showSelectedDialCode, r = e.showFlags, a = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
|
|
24732
|
+
var e = this.options, i = e.allowDropdown, o = e.showSelectedDialCode, r = e.showFlags, a = e.countrySearch, l = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
|
|
24728
24733
|
if (this.selectedCountryData = t ? this._getCountryData(t, false, false) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), r && this.selectedFlagInner.setAttribute("class", "iti__flag iti__".concat(t)), this._setSelectedCountryFlagTitleAttribute(t, o), o) {
|
|
24729
|
-
var
|
|
24730
|
-
this.selectedDialCode.innerHTML =
|
|
24731
|
-
var
|
|
24732
|
-
this.isRTL ? this.telInput.style.paddingRight = "".concat(
|
|
24734
|
+
var u = this.selectedCountryData.dialCode ? "+".concat(this.selectedCountryData.dialCode) : "";
|
|
24735
|
+
this.selectedDialCode.innerHTML = u;
|
|
24736
|
+
var p = this.selectedFlag.offsetWidth || this._getHiddenSelectedFlagWidth();
|
|
24737
|
+
this.isRTL ? this.telInput.style.paddingRight = "".concat(p + 6, "px") : this.telInput.style.paddingLeft = "".concat(p + 6, "px");
|
|
24733
24738
|
}
|
|
24734
|
-
if (this._updatePlaceholder(), i) {
|
|
24735
|
-
var
|
|
24736
|
-
if (
|
|
24737
|
-
var
|
|
24738
|
-
|
|
24739
|
+
if (this._updatePlaceholder(), i && !a) {
|
|
24740
|
+
var g = this.activeItem;
|
|
24741
|
+
if (g && (g.classList.remove("iti__active"), g.setAttribute("aria-selected", "false")), t) {
|
|
24742
|
+
var f = this.countryList.querySelector("#iti-".concat(this.id, "__item-").concat(t, "-preferred")) || this.countryList.querySelector("#iti-".concat(this.id, "__item-").concat(t));
|
|
24743
|
+
f.setAttribute("aria-selected", "true"), f.classList.add("iti__active"), this.activeItem = f;
|
|
24739
24744
|
}
|
|
24740
24745
|
}
|
|
24741
|
-
return
|
|
24746
|
+
return l.iso2 !== t;
|
|
24742
24747
|
} }, { key: "_setSelectedCountryFlagTitleAttribute", value: function(t, e) {
|
|
24743
24748
|
if (this.selectedFlag) {
|
|
24744
24749
|
var i;
|
|
@@ -24765,13 +24770,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24765
24770
|
} }, { key: "_closeDropdown", value: function() {
|
|
24766
24771
|
this.dropdownContent.classList.add("iti__hide"), this.selectedFlag.setAttribute("aria-expanded", "false"), this.selectedFlag.removeAttribute("aria-activedescendant"), this.dropdownArrow.classList.remove("iti__arrow--up"), document.removeEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch && this.searchInput.removeEventListener("input", this._handleSearchChange), document.documentElement.removeEventListener("click", this._handleClickOffToClose), this.countryList.removeEventListener("mouseover", this._handleMouseoverCountryList), this.countryList.removeEventListener("click", this._handleClickCountryList), this.options.dropdownContainer && (this.options.useFullscreenPopup || window.removeEventListener("scroll", this._handleWindowScroll), this.dropdown.parentNode && this.dropdown.parentNode.removeChild(this.dropdown)), this._trigger("close:countrydropdown");
|
|
24767
24772
|
} }, { key: "_scrollTo", value: function(t, e) {
|
|
24768
|
-
var i = this.
|
|
24769
|
-
if (
|
|
24770
|
-
e && (
|
|
24771
|
-
else if (
|
|
24772
|
-
e && (
|
|
24773
|
-
var
|
|
24774
|
-
i.scrollTop =
|
|
24773
|
+
var i = this.countryList, o = document.documentElement.scrollTop, r = i.offsetHeight, a = i.getBoundingClientRect().top + o, l = a + r, u = t.offsetHeight, p = t.getBoundingClientRect().top + o, g = p + u, f = p - a + i.scrollTop, y = r / 2 - u / 2;
|
|
24774
|
+
if (p < a)
|
|
24775
|
+
e && (f -= y), i.scrollTop = f;
|
|
24776
|
+
else if (g > l) {
|
|
24777
|
+
e && (f += y);
|
|
24778
|
+
var A = r - u;
|
|
24779
|
+
i.scrollTop = f - A;
|
|
24775
24780
|
}
|
|
24776
24781
|
} }, { key: "_updateDialCode", value: function(t) {
|
|
24777
24782
|
var e = this.telInput.value, i = "+".concat(t), o;
|
|
@@ -24816,8 +24821,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24816
24821
|
} }, { key: "_formatNumberAsYouType", value: function() {
|
|
24817
24822
|
var t = this._getFullNumber().trim(), e = window.intlTelInputUtils ? intlTelInputUtils.formatNumberAsYouType(t, this.selectedCountryData.iso2) : t;
|
|
24818
24823
|
if (this.options.showSelectedDialCode && this.telInput.value.charAt(0) !== "+") {
|
|
24819
|
-
var i = this.selectedCountryData.dialCode;
|
|
24820
|
-
return
|
|
24824
|
+
var i = this.selectedCountryData.dialCode, o = e.split("+".concat(i))[1] || "";
|
|
24825
|
+
return o.trim();
|
|
24821
24826
|
}
|
|
24822
24827
|
return e;
|
|
24823
24828
|
} }, { key: "handleAutoCountry", value: function() {
|
|
@@ -24871,24 +24876,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24871
24876
|
L.getCountryData = function() {
|
|
24872
24877
|
return h;
|
|
24873
24878
|
};
|
|
24874
|
-
var
|
|
24879
|
+
var R = function(n, t, e) {
|
|
24875
24880
|
var i = document.createElement("script");
|
|
24876
24881
|
i.onload = function() {
|
|
24877
|
-
|
|
24882
|
+
E("handleUtils"), t && t();
|
|
24878
24883
|
}, i.onerror = function() {
|
|
24879
|
-
|
|
24884
|
+
E("rejectUtilsScriptPromise"), e && e();
|
|
24880
24885
|
}, i.className = "iti-load-utils", i.async = true, i.src = n, document.body.appendChild(i);
|
|
24881
24886
|
};
|
|
24882
24887
|
return L.loadUtils = function(s) {
|
|
24883
24888
|
if (!window.intlTelInputUtils && !window.intlTelInputGlobals.startedLoadingUtilsScript) {
|
|
24884
24889
|
if (window.intlTelInputGlobals.startedLoadingUtilsScript = true, typeof Promise < "u")
|
|
24885
24890
|
return new Promise(function(n, t) {
|
|
24886
|
-
return
|
|
24891
|
+
return R(s, n, t);
|
|
24887
24892
|
});
|
|
24888
|
-
|
|
24893
|
+
R(s);
|
|
24889
24894
|
}
|
|
24890
24895
|
return null;
|
|
24891
|
-
}, L.defaults =
|
|
24896
|
+
}, L.defaults = G, L.version = "19.2.11", function(s, n) {
|
|
24892
24897
|
var t = new Y(s, n);
|
|
24893
24898
|
return t._init(), s.setAttribute("data-intl-tel-input-id", t.id), window.intlTelInputGlobals.instances[t.id] = t, t;
|
|
24894
24899
|
};
|
|
@@ -24898,30 +24903,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24898
24903
|
var at = {};
|
|
24899
24904
|
ot(at, { default: () => st });
|
|
24900
24905
|
module2.exports = rt(at);
|
|
24901
|
-
var
|
|
24902
|
-
var d =
|
|
24903
|
-
var
|
|
24904
|
-
var
|
|
24905
|
-
let
|
|
24906
|
-
let
|
|
24907
|
-
if (h(
|
|
24906
|
+
var b = B(require_react());
|
|
24907
|
+
var d = B(require_prop_types());
|
|
24908
|
+
var V = B(z());
|
|
24909
|
+
var j = ({ initialValue: c, onChangeNumber: h, onChangeCountry: v, onChangeValidity: m, onChangeErrorCode: C, initOptions: P, className: x, disabled: O, onFocus: U, onBlur: k }) => {
|
|
24910
|
+
let w = (0, b.useRef)(null), _ = (0, b.useRef)(null), I = () => {
|
|
24911
|
+
let S = _.current.getNumber(), M = _.current.getSelectedCountryData().iso2;
|
|
24912
|
+
if (h(S), v(M), _.current.isValidNumber())
|
|
24908
24913
|
m(true), C(null);
|
|
24909
24914
|
else {
|
|
24910
|
-
let
|
|
24911
|
-
m(false), C(
|
|
24915
|
+
let D = _.current.getValidationError();
|
|
24916
|
+
m(false), C(D);
|
|
24912
24917
|
}
|
|
24913
24918
|
};
|
|
24914
|
-
return (0,
|
|
24915
|
-
|
|
24916
|
-
}), []),
|
|
24919
|
+
return (0, b.useEffect)(() => (_.current = (0, V.default)(w.current, P), w.current.addEventListener("countrychange", I), () => {
|
|
24920
|
+
w.current.removeEventListener("countrychange", I), _.current.destroy();
|
|
24921
|
+
}), []), b.default.createElement("input", { type: "tel", ref: w, onInput: I, defaultValue: c, className: x, disabled: O, onFocus: U, onBlur: k });
|
|
24917
24922
|
};
|
|
24918
|
-
|
|
24919
|
-
|
|
24923
|
+
j.propTypes = { initialValue: d.default.string, onChangeNumber: d.default.func, onChangeCountry: d.default.func, onChangeValidity: d.default.func, onChangeErrorCode: d.default.func, initOptions: d.default.shape({ allowDropdown: d.default.bool, autoInsertDialCode: d.default.bool, autoPlaceholder: d.default.string, containerClass: d.default.string, countrySearch: d.default.bool, customPlaceholder: d.default.func, dropdownContainer: d.default.node, excludeCountries: d.default.arrayOf(d.default.string), fixDropdownWidth: d.default.bool, formatAsYouType: d.default.bool, formatOnDisplay: d.default.bool, geoIpLookup: d.default.func, hiddenInput: d.default.func, i18n: d.default.objectOf(d.default.string), initialCountry: d.default.string, nationalMode: d.default.bool, onlyCountries: d.default.arrayOf(d.default.string), placeholderNumberType: d.default.string, preferredCountries: d.default.arrayOf(d.default.string), showFlags: d.default.bool, showSelectedDialCode: d.default.bool, useFullscreenPopup: d.default.bool, utilsScript: d.default.string }), className: d.default.string, disabled: d.default.bool, onFocus: d.default.func, onBlur: d.default.func };
|
|
24924
|
+
j.defaultProps = { initialValue: "", onChangeNumber: () => {
|
|
24920
24925
|
}, onChangeCountry: () => {
|
|
24921
24926
|
}, onChangeValidity: () => {
|
|
24922
24927
|
}, onChangeErrorCode: () => {
|
|
24923
|
-
}, initOptions: {}
|
|
24924
|
-
|
|
24928
|
+
}, initOptions: {}, className: "", disabled: false, onFocus: () => {
|
|
24929
|
+
}, onBlur: () => {
|
|
24930
|
+
} };
|
|
24931
|
+
var st = j;
|
|
24925
24932
|
}
|
|
24926
24933
|
});
|
|
24927
24934
|
|
|
@@ -24936,7 +24943,7 @@ var errorMap = [
|
|
|
24936
24943
|
"Too long",
|
|
24937
24944
|
"Invalid number"
|
|
24938
24945
|
];
|
|
24939
|
-
var
|
|
24946
|
+
var App = () => {
|
|
24940
24947
|
const [isValid, setIsValid] = (0, import_react.useState)(null);
|
|
24941
24948
|
const [number, setNumber] = (0, import_react.useState)(null);
|
|
24942
24949
|
const [errorCode, setErrorCode] = (0, import_react.useState)(null);
|
|
@@ -24946,7 +24953,7 @@ var DemoApp = () => {
|
|
|
24946
24953
|
setNotice(`Valid number: ${number}`);
|
|
24947
24954
|
} else {
|
|
24948
24955
|
const errorMessage = errorMap[errorCode] || "Invalid number";
|
|
24949
|
-
setNotice(errorMessage);
|
|
24956
|
+
setNotice(`Error: ${errorMessage}`);
|
|
24950
24957
|
}
|
|
24951
24958
|
};
|
|
24952
24959
|
return /* @__PURE__ */ import_react.default.createElement("form", null, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -24964,7 +24971,7 @@ var DemoApp = () => {
|
|
|
24964
24971
|
};
|
|
24965
24972
|
var container = document.getElementById("app");
|
|
24966
24973
|
var root = (0, import_client.createRoot)(container);
|
|
24967
|
-
root.render(/* @__PURE__ */ import_react.default.createElement(
|
|
24974
|
+
root.render(/* @__PURE__ */ import_react.default.createElement(App, null));
|
|
24968
24975
|
/*! Bundled license information:
|
|
24969
24976
|
|
|
24970
24977
|
react/cjs/react.development.js:
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<title>
|
|
7
|
+
<title>React App - Validation Demo</title>
|
|
8
8
|
<link rel="stylesheet" href="../../build/css/intlTelInput.css" />
|
|
9
9
|
<link rel="stylesheet" href="../../build/css/demo.css" />
|
|
10
10
|
</head>
|
|
11
11
|
|
|
12
12
|
<body>
|
|
13
|
-
<h1>
|
|
13
|
+
<h1>React App - Validation Demo</h1>
|
|
14
|
+
<p>A simple react app, using the IntlTelInput component to handle phone number entry and validation.</p>
|
|
15
|
+
<p>Enter a phone number below and click "Validate".</p>
|
|
14
16
|
<div id="app"></div>
|
|
15
17
|
<script src="./validation-bundle.js"></script>
|
|
16
18
|
</body>
|