intl-tel-input 25.12.1 → 25.12.3

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.
@@ -3548,6 +3548,10 @@ var Iti = class _Iti {
3548
3548
  return iso2Codes[0];
3549
3549
  }
3550
3550
  } else if (number.startsWith("+") && numeric.length) {
3551
+ const currentDial = this.selectedCountryData.dialCode || "";
3552
+ if (currentDial && currentDial.startsWith(numeric)) {
3553
+ return null;
3554
+ }
3551
3555
  return "";
3552
3556
  } else if ((!number || number === "+") && !selectedIso2) {
3553
3557
  return this.defaultCountry;
@@ -3700,19 +3704,23 @@ var Iti = class _Iti {
3700
3704
  let dialCode = "";
3701
3705
  if (number.startsWith("+")) {
3702
3706
  let numericChars = "";
3707
+ let foundBaseDialCode = false;
3703
3708
  for (let i = 0; i < number.length; i++) {
3704
3709
  const c = number.charAt(i);
3705
3710
  if (/[0-9]/.test(c)) {
3706
3711
  numericChars += c;
3707
- const isMatch = Boolean(this.dialCodeToIso2Map[numericChars]);
3708
- if (!isMatch) {
3712
+ const hasMapEntry = Boolean(this.dialCodeToIso2Map[numericChars]);
3713
+ if (!hasMapEntry) {
3709
3714
  break;
3710
3715
  }
3711
- if (includeAreaCode) {
3716
+ if (this.dialCodes.has(numericChars)) {
3712
3717
  dialCode = number.substring(0, i + 1);
3713
- } else if (this.dialCodes.has(numericChars)) {
3718
+ foundBaseDialCode = true;
3719
+ if (!includeAreaCode) {
3720
+ break;
3721
+ }
3722
+ } else if (includeAreaCode && foundBaseDialCode) {
3714
3723
  dialCode = number.substring(0, i + 1);
3715
- break;
3716
3724
  }
3717
3725
  if (numericChars.length === this.dialCodeMaxLen) {
3718
3726
  break;
@@ -3996,7 +4004,7 @@ var intlTelInput = Object.assign(
3996
4004
  attachUtils,
3997
4005
  startedLoadingUtilsScript: false,
3998
4006
  startedLoadingAutoCountry: false,
3999
- version: "25.12.1"
4007
+ version: "25.12.3"
4000
4008
  }
4001
4009
  );
4002
4010
  var intl_tel_input_default = intlTelInput;
@@ -4939,7 +4947,7 @@ var intl_tel_input_default = intlTelInput;
4939
4947
  [9],
4940
4948
  [8]
4941
4949
  ],
4942
- [, , "4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}", , , , "412345678", , , [9]],
4950
+ [, , "4(?:79[01]|83[0-36-9])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", , , , "412345678", , , [9]],
4943
4951
  [, , "180(?:0\\d{3}|2)\\d{3}", , , , "1800123456", , , [7, 10]],
4944
4952
  [, , "190[0-26]\\d{6}", , , , "1900123456", , , [10]],
4945
4953
  [, , "13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", , , , "1300123456", , , [6, 8, 10, 12]],
@@ -4955,12 +4963,7 @@ var intl_tel_input_default = intlTelInput;
4955
4963
  ,
4956
4964
  "0011",
4957
4965
  ,
4958
- [[, "(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], [, "(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["13"]], [, "(\\d{3})(\\d{3})", "$1 $2", ["19"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["180", "1802"]], [, "(\\d{4})(\\d{3,4})", "$1 $2", ["19"]], [, "(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)", "$CC ($1)"], [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]], [
4959
- ,
4960
- "(\\d{4})(\\d{4})(\\d{4})",
4961
- "$1 $2 $3",
4962
- ["130"]
4963
- ]],
4966
+ [[, "(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], [, "(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["13"]], [, "(\\d{3})(\\d{3})", "$1 $2", ["19"]], [, "(\\d{3})(\\d{4})", "$1 $2", ["180", "1802"]], [, "(\\d{4})(\\d{3,4})", "$1 $2", ["19"]], [, "(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)", "$CC ($1)"], [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]], [, "(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["130"]]],
4964
4967
  [[, "(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], [, "(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], [, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)", "$CC ($1)"], [, "(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]]],
4965
4968
  [, , "163\\d{2,6}", , , , "1631234", , , [5, 6, 7, 8, 9]],
4966
4969
  1,
@@ -4971,18 +4974,37 @@ var intl_tel_input_default = intlTelInput;
4971
4974
  ,
4972
4975
  [, , , , , , , , , [-1]]
4973
4976
  ],
4974
- AW: [, [
4977
+ AW: [
4978
+ ,
4979
+ [, , "(?:[25-79]\\d\\d|800)\\d{4}", , , , , , , [7]],
4980
+ [, , "5(?:2\\d|8[1-9])\\d{4}", , , , "5212345"],
4981
+ [, , "(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}", , , , "5601234"],
4982
+ [, , "800\\d{4}", , , , "8001234"],
4983
+ [, , "900\\d{4}", , , , "9001234"],
4984
+ [, , , , , , , , , [-1]],
4985
+ [, , , , , , , , , [-1]],
4986
+ [, , "(?:28\\d|501)\\d{4}", , , , "5011234"],
4987
+ "AW",
4988
+ 297,
4989
+ "00",
4975
4990
  ,
4976
4991
  ,
4977
- "(?:[25-79]\\d\\d|800)\\d{4}",
4978
4992
  ,
4979
4993
  ,
4980
4994
  ,
4981
4995
  ,
4982
4996
  ,
4997
+ [[, "(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]],
4983
4998
  ,
4984
- [7]
4985
- ], [, , "5(?:2\\d|8[1-9])\\d{4}", , , , "5212345"], [, , "(?:290|5[69]\\d|6(?:[03]0|22|4[0-2]|[69]\\d)|7(?:[34]\\d|7[07])|9(?:6[45]|9[4-8]))\\d{4}", , , , "5601234"], [, , "800\\d{4}", , , , "8001234"], [, , "900\\d{4}", , , , "9001234"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "(?:28\\d|501)\\d{4}", , , , "5011234"], "AW", 297, "00", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
4999
+ [, , , , , , , , , [-1]],
5000
+ ,
5001
+ ,
5002
+ [, , , , , , , , , [-1]],
5003
+ [, , , , , , , , , [-1]],
5004
+ ,
5005
+ ,
5006
+ [, , , , , , , , , [-1]]
5007
+ ],
4986
5008
  AX: [, [
4987
5009
  ,
4988
5010
  ,
@@ -5423,7 +5445,7 @@ var intl_tel_input_default = intlTelInput;
5423
5445
  CC: [, [, , "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", , , , , , , [6, 7, 8, 9, 10, 12]], [, , "8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", , , , "891621234", , , [9], [8]], [
5424
5446
  ,
5425
5447
  ,
5426
- "4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",
5448
+ "4(?:79[01]|83[0-36-9])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",
5427
5449
  ,
5428
5450
  ,
5429
5451
  ,
@@ -5713,7 +5735,7 @@ var intl_tel_input_default = intlTelInput;
5713
5735
  CX: [, [, , "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", , , , , , , [6, 7, 8, 9, 10, 12]], [, , "8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}", , , , "891641234", , , [9], [8]], [
5714
5736
  ,
5715
5737
  ,
5716
- "4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-9])\\d{6}",
5738
+ "4(?:79[01]|83[0-36-9])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}",
5717
5739
  ,
5718
5740
  ,
5719
5741
  ,
@@ -6257,7 +6279,7 @@ var intl_tel_input_default = intlTelInput;
6257
6279
  GB: [, [, , "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", , , , , , , [7, 9, 10], [4, 5, 6, 8]], [
6258
6280
  ,
6259
6281
  ,
6260
- "(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",
6282
+ "(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",
6261
6283
  ,
6262
6284
  ,
6263
6285
  ,
@@ -7312,7 +7334,7 @@ var intl_tel_input_default = intlTelInput;
7312
7334
  ,
7313
7335
  ,
7314
7336
  [7, 8]
7315
- ], [, , "7(?:62|8[0-6]|9[04-9])\\d{4}|(?:[14-69]\\d|2(?:[14-69]\\d|[78][1-9])|7[2-57]|8[02-9])\\d{5}", , , , "1123456"], [, , "(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[7-9]|9[1-3]))\\d{5}", , , , "71123456"], [, , , , , , , , , [-1]], [, , "9[01]\\d{6}", , , , "90123456", , , [8]], [, , "80\\d{6}", , , , "80123456", , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "LB", 961, "00", "0", , , "0", , , , [[, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"], "0$1"], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], , [
7337
+ ], [, , "7(?:62|8[0-6]|9[04-9])\\d{4}|(?:[14-69]\\d|2(?:[14-69]\\d|[78][1-9])|7[2-57]|8[02-9])\\d{5}", , , , "1123456"], [, , "(?:(?:3|81)\\d|7(?:[01]\\d|6[013-9]|8[7-9]|9[0-3]))\\d{5}", , , , "71123456"], [, , , , , , , , , [-1]], [, , "9[01]\\d{6}", , , , "90123456", , , [8]], [, , "80\\d{6}", , , , "80123456", , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "LB", 961, "00", "0", , , "0", , , , [[, "(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"], "0$1"], [, "(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], , [
7316
7338
  ,
7317
7339
  ,
7318
7340
  ,
@@ -7556,7 +7578,7 @@ var intl_tel_input_default = intlTelInput;
7556
7578
  ,
7557
7579
  ,
7558
7580
  [7]
7559
- ], [, , "3[2-47-9]\\d{7}", , , , "321234567"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "22\\d{7}", , , , "221234567"], "MG", 261, "00", "0", , , "([24-9]\\d{6})$|0", "20$1", , , [[, "(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
7581
+ ], [, , "3[2-46-9]\\d{7}", , , , "321234567"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "22\\d{7}", , , , "221234567"], "MG", 261, "00", "0", , , "([24-9]\\d{6})$|0", "20$1", , , [[, "(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
7560
7582
  MH: [
7561
7583
  ,
7562
7584
  [, , "329\\d{4}|(?:[256]\\d|45)\\d{5}", , , , , , , [7]],
@@ -8747,15 +8769,15 @@ var intl_tel_input_default = intlTelInput;
8747
8769
  ,
8748
8770
  [, , , , , , , , , [-1]]
8749
8771
  ],
8750
- SN: [, [, , "(?:[378]\\d|93)\\d{7}", , , , , , , [9]], [, , "3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}", , , , "301012345"], [
8772
+ SN: [, [, , "(?:[378]\\d|93)\\d{7}", , , , , , , [9]], [, , "3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}", , , , "301012345"], [, , "7(?:[05-8]\\d|[19]0|21)\\d{6}", , , , "701234567"], [
8751
8773
  ,
8752
8774
  ,
8753
- "7(?:(?:[06-8]\\d|[19]0|21)\\d|5(?:0[01]|[19]0|2[25]|3[356]|[4-7]\\d|8[35]))\\d{5}",
8775
+ "800\\d{6}",
8754
8776
  ,
8755
8777
  ,
8756
8778
  ,
8757
- "701234567"
8758
- ], [, , "800\\d{6}", , , , "800123456"], [, , "88[4689]\\d{6}", , , , "884123456"], [, , "81[02468]\\d{6}", , , , "810123456"], [, , , , , , , , , [-1]], [, , "(?:3(?:392|9[01]\\d)\\d|93(?:3[13]0|929))\\d{4}", , , , "933301234"], "SN", 221, "00", , , , , , , , [[, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], [, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8779
+ "800123456"
8780
+ ], [, , "88[4689]\\d{6}", , , , "884123456"], [, , "81[02468]\\d{6}", , , , "810123456"], [, , , , , , , , , [-1]], [, , "(?:3(?:392|9[01]\\d)\\d|93(?:3[13]0|929))\\d{4}", , , , "933301234"], "SN", 221, "00", , , , , , , , [[, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], [, "(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8759
8781
  SO: [, [, , "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", , , , , , , [6, 7, 8, 9]], [
8760
8782
  ,
8761
8783
  ,
@@ -8767,32 +8789,32 @@ var intl_tel_input_default = intlTelInput;
8767
8789
  ,
8768
8790
  ,
8769
8791
  [6, 7]
8770
- ], [, , "(?:(?:15|(?:3[59]|4[89]|6\\d|7[679]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}", , , , "71123456", , , [7, 8, 9]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "SO", 252, "00", "0", , , "0", , , , [[, "(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], [, "(\\d{6})", "$1", ["[134]"]], [, "(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], [
8771
- ,
8772
- "(\\d)(\\d{7})",
8773
- "$1 $2",
8774
- ["(?:2|90)4|[67]"]
8775
- ], [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]], [, "(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|7[67]|9[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8776
- SR: [, [, , "(?:[2-5]|[6-8]\\d|90)\\d{5}", , , , , , , [6, 7]], [, , "(?:2[1-3]|3[0-7]|4\\d|5[2-58])\\d{4}", , , , "211234", , , [6]], [, , "(?:6[08]|7[124-7]|8[1-9])\\d{5}", , , , "7412345", , , [7]], [, , "80\\d{5}", , , , "8012345", , , [7]], [, , "90\\d{5}", , , , "9012345", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [
8792
+ ], [, , "(?:(?:15|(?:3[59]|4[89]|6\\d|7[679]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}", , , , "71123456", , , [7, 8, 9]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "SO", 252, "00", "0", , , "0", , , , [
8793
+ [, "(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]],
8794
+ [, "(\\d{6})", "$1", ["[134]"]],
8795
+ [, "(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],
8796
+ [, "(\\d)(\\d{7})", "$1 $2", ["(?:2|90)4|[67]"]],
8797
+ [, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[348]|64|79|90"]],
8798
+ [, "(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|6[0-35-9]|7[67]|9[2-9]"]]
8799
+ ], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8800
+ SR: [, [, , "(?:[2-5]|[6-8]\\d|90)\\d{5}", , , , , , , [6, 7]], [, , "(?:2[1-3]|3[0-7]|4\\d|5[2-58])\\d{4}", , , , "211234", , , [6]], [, , "(?:6[08]|7[124-7]|8[1-9])\\d{5}", , , , "7412345", , , [7]], [, , "80\\d{5}", , , , "8012345", , , [7]], [, , "90\\d{5}", , , , "9012345", , , [7]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "56\\d{4}", , , , "561234", , , [6]], "SR", 597, "00", , , , , , , , [
8801
+ [, "(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]],
8802
+ [, "(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]],
8803
+ [, "(\\d{3})(\\d{4})", "$1-$2", ["[6-9]"]]
8804
+ ], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8805
+ SS: [, [, , "[19]\\d{8}", , , , , , , [9]], [, , "1[89]\\d{7}", , , , "181234567"], [, , "(?:12|9[1257-9])\\d{7}", , , , "977123456"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "SS", 211, "00", "0", , , "0", , , , [[, "(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8806
+ ST: [, [
8777
8807
  ,
8778
8808
  ,
8779
- "56\\d{4}",
8809
+ "(?:22|9\\d)\\d{5}",
8780
8810
  ,
8781
8811
  ,
8782
8812
  ,
8783
- "561234",
8784
8813
  ,
8785
8814
  ,
8786
- [6]
8787
- ], "SR", 597, "00", , , , , , , , [[, "(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], [, "(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], [, "(\\d{3})(\\d{4})", "$1-$2", ["[6-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8788
- SS: [, [, , "[19]\\d{8}", , , , , , , [9]], [, , "1[89]\\d{7}", , , , "181234567"], [, , "(?:12|9[1257-9])\\d{7}", , , , "977123456"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "SS", 211, "00", "0", , , "0", , , , [[
8789
8815
  ,
8790
- "(\\d{3})(\\d{3})(\\d{3})",
8791
- "$1 $2 $3",
8792
- ["[19]"],
8793
- "0$1"
8794
- ]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8795
- ST: [, [, , "(?:22|9\\d)\\d{5}", , , , , , , [7]], [, , "22\\d{5}", , , , "2221234"], [, , "900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}", , , , "9812345"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "ST", 239, "00", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8816
+ [7]
8817
+ ], [, , "22\\d{5}", , , , "2221234"], [, , "900[5-9]\\d{3}|9(?:0[1-9]|[89]\\d)\\d{4}", , , , "9812345"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "ST", 239, "00", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
8796
8818
  SV: [, [, , "[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", , , , , , , [7, 8, 11]], [
8797
8819
  ,
8798
8820
  ,
package/vue/README.md CHANGED
@@ -34,7 +34,7 @@ See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master
34
34
  "vue:demo": "vite --config vue/demo/[demo variant]/vite.config.js"
35
35
  ```
36
36
 
37
- A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.12.1/build/js/utils.js"`.
37
+ A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.12.3/build/js/utils.js"`.
38
38
 
39
39
  ## Props
40
40
  Here's a list of all of the current props you can pass to the IntlTelInput Vue component.
@@ -1974,7 +1974,7 @@ const nt = {
1974
1974
  }, H = {
1975
1975
  PASTE: "insertFromPaste",
1976
1976
  DELETE_FWD: "deleteContentForward"
1977
- }, D = {
1977
+ }, N = {
1978
1978
  ALPHA_UNICODE: new RegExp("\\p{L}", "u"),
1979
1979
  // any kind of letter from any language
1980
1980
  NON_PLUS_NUMERIC: /[^+0-9]/,
@@ -2508,7 +2508,7 @@ const mt = (l) => {
2508
2508
  return o;
2509
2509
  }
2510
2510
  return t.length;
2511
- }, Nt = [
2511
+ }, Dt = [
2512
2512
  "800",
2513
2513
  "822",
2514
2514
  "833",
@@ -2530,17 +2530,17 @@ const mt = (l) => {
2530
2530
  const t = v(l);
2531
2531
  if (t.startsWith(G.NANP) && t.length >= 4) {
2532
2532
  const e = t.substring(1, 4);
2533
- return Nt.includes(e);
2533
+ return Dt.includes(e);
2534
2534
  }
2535
2535
  return !1;
2536
2536
  };
2537
2537
  for (const l of E)
2538
2538
  l.name = $[l.iso2];
2539
- let Dt = 0;
2539
+ let Nt = 0;
2540
2540
  const Et = new Set(E.map((l) => l.iso2)), M = (l) => Et.has(l);
2541
2541
  class U {
2542
2542
  constructor(t, e = {}) {
2543
- this.id = Dt++, this.options = { ...z, ...e }, ut(this.options, $), this.ui = new Ct(t, this.options, this.id), this.isAndroid = U._getIsAndroid(), this.promise = this._createInitPromises(), this.countries = mt(this.options);
2543
+ this.id = Nt++, this.options = { ...z, ...e }, ut(this.options, $), this.ui = new Ct(t, this.options, this.id), this.isAndroid = U._getIsAndroid(), this.promise = this._createInitPromises(), this.countries = mt(this.options);
2544
2544
  const { dialCodes: i, dialCodeMaxLen: s, dialCodeToIso2Map: o } = yt(
2545
2545
  this.countries,
2546
2546
  this.options
@@ -2676,7 +2676,7 @@ class U {
2676
2676
  countrySearch: o
2677
2677
  } = this.options;
2678
2678
  let n = !1;
2679
- D.ALPHA_UNICODE.test(this.ui.telInput.value) && (n = !0);
2679
+ N.ALPHA_UNICODE.test(this.ui.telInput.value) && (n = !0);
2680
2680
  const r = (a) => {
2681
2681
  if (this.isAndroid && (a == null ? void 0 : a.data) === "+" && i && s && o) {
2682
2682
  const b = this.ui.telInput.selectionStart || 0, p = this.ui.telInput.value.substring(
@@ -2687,15 +2687,15 @@ class U {
2687
2687
  return;
2688
2688
  }
2689
2689
  this._updateCountryFromNumber(this.ui.telInput.value) && this._triggerCountryChange();
2690
- const d = (a == null ? void 0 : a.data) && D.NON_PLUS_NUMERIC.test(a.data), c = (a == null ? void 0 : a.inputType) === H.PASTE && this.ui.telInput.value;
2691
- d || c && !t ? n = !0 : D.NON_PLUS_NUMERIC.test(this.ui.telInput.value) || (n = !1);
2690
+ const d = (a == null ? void 0 : a.data) && N.NON_PLUS_NUMERIC.test(a.data), c = (a == null ? void 0 : a.inputType) === H.PASTE && this.ui.telInput.value;
2691
+ d || c && !t ? n = !0 : N.NON_PLUS_NUMERIC.test(this.ui.telInput.value) || (n = !1);
2692
2692
  const f = (a == null ? void 0 : a.detail) && a.detail.isSetNumber;
2693
2693
  if (e && !n && !f) {
2694
2694
  const b = this.ui.telInput.selectionStart || 0, y = this.ui.telInput.value.substring(
2695
2695
  0,
2696
2696
  b
2697
2697
  ).replace(
2698
- D.NON_PLUS_NUMERIC_GLOBAL,
2698
+ N.NON_PLUS_NUMERIC_GLOBAL,
2699
2699
  ""
2700
2700
  ).length, w = (a == null ? void 0 : a.inputType) === H.DELETE_FWD, I = this._getFullNumber(), _ = _t(
2701
2701
  I,
@@ -2703,13 +2703,13 @@ class U {
2703
2703
  u.utils,
2704
2704
  this.selectedCountryData,
2705
2705
  this.options.separateDialCode
2706
- ), N = wt(
2706
+ ), D = wt(
2707
2707
  y,
2708
2708
  _,
2709
2709
  b,
2710
2710
  w
2711
2711
  );
2712
- this.ui.telInput.value = _, this.ui.telInput.setSelectionRange(N, N);
2712
+ this.ui.telInput.value = _, this.ui.telInput.setSelectionRange(D, D);
2713
2713
  }
2714
2714
  };
2715
2715
  this.ui.telInput.addEventListener(
@@ -2747,7 +2747,7 @@ class U {
2747
2747
  if (this.options.strictMode) {
2748
2748
  const t = (e) => {
2749
2749
  e.preventDefault();
2750
- const i = this.ui.telInput, s = i.selectionStart, o = i.selectionEnd, n = i.value.slice(0, s), r = i.value.slice(o), a = this.selectedCountryData.iso2, d = e.clipboardData.getData("text"), c = s === 0 && o > 0, f = !i.value.startsWith("+") || c, b = d.replace(D.NON_PLUS_NUMERIC_GLOBAL, ""), p = b.startsWith("+"), y = b.replace(/\+/g, ""), w = p && f ? `+${y}` : y;
2750
+ const i = this.ui.telInput, s = i.selectionStart, o = i.selectionEnd, n = i.value.slice(0, s), r = i.value.slice(o), a = this.selectedCountryData.iso2, d = e.clipboardData.getData("text"), c = s === 0 && o > 0, f = !i.value.startsWith("+") || c, b = d.replace(N.NON_PLUS_NUMERIC_GLOBAL, ""), p = b.startsWith("+"), y = b.replace(/\+/g, ""), w = p && f ? `+${y}` : y;
2751
2751
  let I = n + w + r, _ = u.utils.getCoreNumber(I, a);
2752
2752
  for (; _.length === 0 && I.length > 0; )
2753
2753
  I = I.slice(0, -1), _ = u.utils.getCoreNumber(I, a);
@@ -2760,8 +2760,8 @@ class U {
2760
2760
  } else
2761
2761
  return;
2762
2762
  i.value = I;
2763
- const N = s + w.length;
2764
- i.setSelectionRange(N, N), i.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2763
+ const D = s + w.length;
2764
+ i.setSelectionRange(D, D), i.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
2765
2765
  };
2766
2766
  this.ui.telInput.addEventListener("paste", t, {
2767
2767
  signal: this.abortController.signal
@@ -2868,7 +2868,7 @@ class U {
2868
2868
  g.ARROW_DOWN,
2869
2869
  g.ENTER,
2870
2870
  g.ESC
2871
- ].includes(o.key) && (o.preventDefault(), o.stopPropagation(), o.key === g.ARROW_UP || o.key === g.ARROW_DOWN ? this._handleUpDownKey(o.key) : o.key === g.ENTER ? this._handleEnterKey() : o.key === g.ESC && this._closeDropdown()), !this.options.countrySearch && D.HIDDEN_SEARCH_CHAR.test(o.key) && (o.stopPropagation(), i && clearTimeout(i), e += o.key.toLowerCase(), this._searchForCountry(e), i = setTimeout(() => {
2871
+ ].includes(o.key) && (o.preventDefault(), o.stopPropagation(), o.key === g.ARROW_UP || o.key === g.ARROW_DOWN ? this._handleUpDownKey(o.key) : o.key === g.ENTER ? this._handleEnterKey() : o.key === g.ESC && this._closeDropdown()), !this.options.countrySearch && N.HIDDEN_SEARCH_CHAR.test(o.key) && (o.stopPropagation(), i && clearTimeout(i), e += o.key.toLowerCase(), this._searchForCountry(e), i = setTimeout(() => {
2872
2872
  e = "";
2873
2873
  }, lt.HIDDEN_SEARCH_RESET_MS));
2874
2874
  };
@@ -2967,21 +2967,20 @@ class U {
2967
2967
  const { areaCodes: f, priority: b } = this.selectedCountryData;
2968
2968
  if (f) {
2969
2969
  const _ = f.map(
2970
- (N) => `${o}${N}`
2970
+ (D) => `${o}${D}`
2971
2971
  );
2972
- for (const N of _)
2973
- if (r.startsWith(N))
2972
+ for (const D of _)
2973
+ if (r.startsWith(D))
2974
2974
  return null;
2975
2975
  }
2976
2976
  const y = f && !(b === 0) && r.length > a.length, w = s && d.includes(s) && !y, I = s === d[0];
2977
2977
  if (!w && !I)
2978
2978
  return d[0];
2979
- } else {
2980
- if (i.startsWith("+") && r.length)
2981
- return "";
2982
- if ((!i || i === "+") && !s)
2983
- return this.defaultCountry;
2984
- }
2979
+ } else if (i.startsWith("+") && r.length) {
2980
+ const a = this.selectedCountryData.dialCode || "";
2981
+ return a && a.startsWith(r) ? null : "";
2982
+ } else if ((!i || i === "+") && !s)
2983
+ return this.defaultCountry;
2985
2984
  return null;
2986
2985
  }
2987
2986
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
@@ -3071,18 +3070,16 @@ class U {
3071
3070
  _getDialCode(t, e) {
3072
3071
  let i = "";
3073
3072
  if (t.startsWith("+")) {
3074
- let s = "";
3075
- for (let o = 0; o < t.length; o++) {
3076
- const n = t.charAt(o);
3077
- if (/[0-9]/.test(n)) {
3078
- if (s += n, !!!this.dialCodeToIso2Map[s])
3073
+ let s = "", o = !1;
3074
+ for (let n = 0; n < t.length; n++) {
3075
+ const r = t.charAt(n);
3076
+ if (/[0-9]/.test(r)) {
3077
+ if (s += r, !!!this.dialCodeToIso2Map[s])
3079
3078
  break;
3080
- if (e)
3081
- i = t.substring(0, o + 1);
3082
- else if (this.dialCodes.has(s)) {
3083
- i = t.substring(0, o + 1);
3084
- break;
3085
- }
3079
+ if (this.dialCodes.has(s)) {
3080
+ if (i = t.substring(0, n + 1), o = !0, !e)
3081
+ break;
3082
+ } else e && o && (i = t.substring(0, n + 1));
3086
3083
  if (s.length === this.dialCodeMaxLen)
3087
3084
  break;
3088
3085
  }
@@ -3194,7 +3191,7 @@ class U {
3194
3191
  return null;
3195
3192
  if (!this.selectedCountryData.iso2)
3196
3193
  return !1;
3197
- const e = (n) => t ? this._utilsIsValidNumber(n) : this._utilsIsPossibleNumber(n), i = this._getFullNumber(), s = i.search(D.ALPHA_UNICODE);
3194
+ const e = (n) => t ? this._utilsIsValidNumber(n) : this._utilsIsPossibleNumber(n), i = this._getFullNumber(), s = i.search(N.ALPHA_UNICODE);
3198
3195
  if (s > -1 && !this.options.allowPhonewords) {
3199
3196
  const n = i.substring(0, s), r = e(n), a = e(i);
3200
3197
  return r && a;
@@ -3282,7 +3279,7 @@ const Lt = (l) => {
3282
3279
  attachUtils: Lt,
3283
3280
  startedLoadingUtilsScript: !1,
3284
3281
  startedLoadingAutoCountry: !1,
3285
- version: "25.12.1"
3282
+ version: "25.12.3"
3286
3283
  }
3287
3284
  ), vt = {
3288
3285
  __name: "IntlTelInput",