intl-tel-input 25.0.2 → 25.1.0

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.
@@ -1,4 +1,4 @@
1
- import { mergeModels as i2, useModel as T2, ref as I1, onMounted as E2, watch as D2, onUnmounted as M2, withDirectives as P2, openBlock as x2, createElementBlock as R2, mergeProps as B2, vModelText as k2 } from "vue";
1
+ import { mergeModels as i2, useModel as A2, ref as I1, onMounted as E2, watch as D2, onUnmounted as M2, withDirectives as P2, openBlock as x2, createElementBlock as R2, mergeProps as B2, vModelText as k2 } from "vue";
2
2
  const r2 = [
3
3
  [
4
4
  "af",
@@ -76,7 +76,9 @@ const r2 = [
76
76
  "au",
77
77
  // Australia
78
78
  "61",
79
- 0
79
+ 0,
80
+ null,
81
+ "0"
80
82
  ],
81
83
  [
82
84
  "at",
@@ -257,14 +259,16 @@ const r2 = [
257
259
  // Christmas Island
258
260
  "61",
259
261
  2,
260
- ["89164"]
262
+ ["89164"],
263
+ "0"
261
264
  ],
262
265
  [
263
266
  "cc",
264
267
  // Cocos (Keeling) Islands
265
268
  "61",
266
269
  1,
267
- ["89162"]
270
+ ["89162"],
271
+ "0"
268
272
  ],
269
273
  [
270
274
  "co",
@@ -497,7 +501,8 @@ const r2 = [
497
501
  // Guernsey
498
502
  "44",
499
503
  1,
500
- ["1481", "7781", "7839", "7911"]
504
+ ["1481", "7781", "7839", "7911"],
505
+ "0"
501
506
  ],
502
507
  [
503
508
  "gn",
@@ -569,7 +574,8 @@ const r2 = [
569
574
  // Isle of Man
570
575
  "44",
571
576
  2,
572
- ["1624", "74576", "7524", "7924", "7624"]
577
+ ["1624", "74576", "7524", "7924", "7624"],
578
+ "0"
573
579
  ],
574
580
  [
575
581
  "il",
@@ -599,7 +605,8 @@ const r2 = [
599
605
  // Jersey
600
606
  "44",
601
607
  3,
602
- ["1534", "7509", "7700", "7797", "7829", "7937"]
608
+ ["1534", "7509", "7700", "7797", "7829", "7937"],
609
+ "0"
603
610
  ],
604
611
  [
605
612
  "jo",
@@ -611,7 +618,8 @@ const r2 = [
611
618
  // Kazakhstan
612
619
  "7",
613
620
  1,
614
- ["33", "7"]
621
+ ["33", "7"],
622
+ "8"
615
623
  ],
616
624
  [
617
625
  "ke",
@@ -743,7 +751,8 @@ const r2 = [
743
751
  // Mayotte
744
752
  "262",
745
753
  1,
746
- ["269", "639"]
754
+ ["269", "639"],
755
+ "0"
747
756
  ],
748
757
  [
749
758
  "mx",
@@ -786,7 +795,9 @@ const r2 = [
786
795
  "ma",
787
796
  // Morocco
788
797
  "212",
789
- 0
798
+ 0,
799
+ null,
800
+ "0"
790
801
  ],
791
802
  [
792
803
  "mz",
@@ -947,7 +958,9 @@ const r2 = [
947
958
  "re",
948
959
  // Réunion
949
960
  "262",
950
- 0
961
+ 0,
962
+ null,
963
+ "0"
951
964
  ],
952
965
  [
953
966
  "ro",
@@ -958,7 +971,9 @@ const r2 = [
958
971
  "ru",
959
972
  // Russia
960
973
  "7",
961
- 0
974
+ 0,
975
+ null,
976
+ "8"
962
977
  ],
963
978
  [
964
979
  "rw",
@@ -1230,7 +1245,9 @@ const r2 = [
1230
1245
  "gb",
1231
1246
  // United Kingdom
1232
1247
  "44",
1233
- 0
1248
+ 0,
1249
+ null,
1250
+ "0"
1234
1251
  ],
1235
1252
  [
1236
1253
  "us",
@@ -1287,7 +1304,8 @@ const r2 = [
1287
1304
  // Western Sahara
1288
1305
  "212",
1289
1306
  1,
1290
- ["5288", "5289"]
1307
+ ["5288", "5289"],
1308
+ "0"
1291
1309
  ],
1292
1310
  [
1293
1311
  "ye",
@@ -1306,16 +1324,16 @@ const r2 = [
1306
1324
  ]
1307
1325
  ], W = [];
1308
1326
  for (let y = 0; y < r2.length; y++) {
1309
- const $ = r2[y];
1327
+ const e = r2[y];
1310
1328
  W[y] = {
1311
1329
  name: "",
1312
1330
  // this is now populated in the plugin
1313
- iso2: $[0],
1314
- dialCode: $[1],
1315
- priority: $[2] || 0,
1316
- areaCodes: $[3] || null,
1317
- partialAreaCodes: null,
1318
- nodeById: {}
1331
+ iso2: e[0],
1332
+ dialCode: e[1],
1333
+ priority: e[2] || 0,
1334
+ areaCodes: e[3] || null,
1335
+ nodeById: {},
1336
+ nationalPrefix: e[4] || null
1319
1337
  };
1320
1338
  }
1321
1339
  const O2 = {
@@ -1576,7 +1594,7 @@ const O2 = {
1576
1594
  for (let y = 0; y < W.length; y++)
1577
1595
  W[y].name = u2[W[y].iso2];
1578
1596
  let F2 = 0;
1579
- const a2 = {
1597
+ const l2 = {
1580
1598
  //* Whether or not to allow the dropdown.
1581
1599
  allowDropdown: !0,
1582
1600
  //* Add a placeholder in the input with an example number for the selected country.
@@ -1650,45 +1668,45 @@ const a2 = {
1650
1668
  "888",
1651
1669
  "889"
1652
1670
  ], c1 = (y) => y.replace(/\D/g, ""), s2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), o2 = (y) => {
1653
- const $ = c1(y);
1654
- if ($.charAt(0) === "1") {
1655
- const n = $.substr(1, 3);
1671
+ const e = c1(y);
1672
+ if (e.charAt(0) === "1") {
1673
+ const n = e.substr(1, 3);
1656
1674
  return U2.indexOf(n) !== -1;
1657
1675
  }
1658
1676
  return !1;
1659
- }, V2 = (y, $, n, i) => {
1660
- if (n === 0 && !i)
1677
+ }, V2 = (y, e, n, r) => {
1678
+ if (n === 0 && !r)
1661
1679
  return 0;
1662
1680
  let o = 0;
1663
- for (let l = 0; l < $.length; l++) {
1664
- if (/[+0-9]/.test($[l]) && o++, o === y && !i)
1665
- return l + 1;
1666
- if (i && o === y + 1)
1667
- return l;
1668
- }
1669
- return $.length;
1670
- }, N = (y, $, n) => {
1671
- const i = document.createElement(y);
1672
- return $ && Object.entries($).forEach(([o, l]) => i.setAttribute(o, l)), n && n.appendChild(i), i;
1673
- }, $1 = (y, ...$) => {
1681
+ for (let a = 0; a < e.length; a++) {
1682
+ if (/[+0-9]/.test(e[a]) && o++, o === y && !r)
1683
+ return a + 1;
1684
+ if (r && o === y + 1)
1685
+ return a;
1686
+ }
1687
+ return e.length;
1688
+ }, T = (y, e, n) => {
1689
+ const r = document.createElement(y);
1690
+ return e && Object.entries(e).forEach(([o, a]) => r.setAttribute(o, a)), n && n.appendChild(r), r;
1691
+ }, $1 = (y, ...e) => {
1674
1692
  const { instances: n } = C;
1675
- Object.values(n).forEach((i) => i[y](...$));
1693
+ Object.values(n).forEach((r) => r[y](...e));
1676
1694
  };
1677
1695
  class K2 {
1678
- constructor($, n = {}) {
1679
- this.id = F2++, this.telInput = $, this.highlightedItem = null, this.options = Object.assign({}, a2, n), this.hadInitialPlaceholder = !!$.getAttribute("placeholder");
1696
+ constructor(e, n = {}) {
1697
+ this.id = F2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, l2, n), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1680
1698
  }
1681
1699
  //* Can't be private as it's called from intlTelInput convenience wrapper.
1682
1700
  _init() {
1683
1701
  this.options.useFullscreenPopup && (this.options.fixDropdownWidth = !1), this.options.onlyCountries.length === 1 && (this.options.initialCountry = this.options.onlyCountries[0]), this.options.separateDialCode && (this.options.nationalMode = !1), this.options.allowDropdown && !this.options.showFlags && !this.options.separateDialCode && (this.options.nationalMode = !1), this.options.useFullscreenPopup && !this.options.dropdownContainer && (this.options.dropdownContainer = document.body), this.isAndroid = typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, this.isRTL = !!this.telInput.closest("[dir=rtl]");
1684
- const $ = this.options.allowDropdown || this.options.separateDialCode;
1685
- this.showSelectedCountryOnLeft = this.isRTL ? !$ : $, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { ...u2, ...this.options.i18n };
1686
- const n = new Promise((o, l) => {
1687
- this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = l;
1688
- }), i = new Promise((o, l) => {
1689
- this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise = l;
1702
+ const e = this.options.allowDropdown || this.options.separateDialCode;
1703
+ this.showSelectedCountryOnLeft = this.isRTL ? !e : e, this.options.separateDialCode && (this.isRTL ? this.originalPaddingRight = this.telInput.style.paddingRight : this.originalPaddingLeft = this.telInput.style.paddingLeft), this.options.i18n = { ...u2, ...this.options.i18n };
1704
+ const n = new Promise((o, a) => {
1705
+ this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = a;
1706
+ }), r = new Promise((o, a) => {
1707
+ this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise = a;
1690
1708
  });
1691
- this.promise = Promise.all([n, i]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1709
+ this.promise = Promise.all([n, r]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1692
1710
  }
1693
1711
  //********************
1694
1712
  //* PRIVATE METHODS
@@ -1699,99 +1717,99 @@ class K2 {
1699
1717
  }
1700
1718
  //* Sort countries by countryOrder option (if present), then name.
1701
1719
  _sortCountries() {
1702
- this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map(($) => $.toLowerCase())), this.countries.sort(($, n) => {
1703
- const { countryOrder: i } = this.options;
1704
- if (i) {
1705
- const o = i.indexOf($.iso2), l = i.indexOf(n.iso2), c = o > -1, f = l > -1;
1706
- if (c || f)
1707
- return c && f ? o - l : c ? -1 : 1;
1720
+ this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, n) => {
1721
+ const { countryOrder: r } = this.options;
1722
+ if (r) {
1723
+ const o = r.indexOf(e.iso2), a = r.indexOf(n.iso2), c = o > -1, g = a > -1;
1724
+ if (c || g)
1725
+ return c && g ? o - a : c ? -1 : 1;
1708
1726
  }
1709
- return $.name.localeCompare(n.name);
1727
+ return e.name.localeCompare(n.name);
1710
1728
  });
1711
1729
  }
1712
1730
  //* Add a dial code to this.dialCodeToIso2Map.
1713
- _addToDialCodeMap($, n, i) {
1731
+ _addToDialCodeMap(e, n, r) {
1714
1732
  n.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = n.length), this.dialCodeToIso2Map.hasOwnProperty(n) || (this.dialCodeToIso2Map[n] = []);
1715
- for (let l = 0; l < this.dialCodeToIso2Map[n].length; l++)
1716
- if (this.dialCodeToIso2Map[n][l] === $)
1733
+ for (let a = 0; a < this.dialCodeToIso2Map[n].length; a++)
1734
+ if (this.dialCodeToIso2Map[n][a] === e)
1717
1735
  return;
1718
- const o = i !== void 0 ? i : this.dialCodeToIso2Map[n].length;
1719
- this.dialCodeToIso2Map[n][o] = $;
1736
+ const o = r !== void 0 ? r : this.dialCodeToIso2Map[n].length;
1737
+ this.dialCodeToIso2Map[n][o] = e;
1720
1738
  }
1721
1739
  //* Process onlyCountries or excludeCountries array if present.
1722
1740
  _processAllCountries() {
1723
- const { onlyCountries: $, excludeCountries: n } = this.options;
1724
- if ($.length) {
1725
- const i = $.map(
1741
+ const { onlyCountries: e, excludeCountries: n } = this.options;
1742
+ if (e.length) {
1743
+ const r = e.map(
1726
1744
  (o) => o.toLowerCase()
1727
1745
  );
1728
1746
  this.countries = W.filter(
1729
- (o) => i.indexOf(o.iso2) > -1
1747
+ (o) => r.indexOf(o.iso2) > -1
1730
1748
  );
1731
1749
  } else if (n.length) {
1732
- const i = n.map(
1750
+ const r = n.map(
1733
1751
  (o) => o.toLowerCase()
1734
1752
  );
1735
1753
  this.countries = W.filter(
1736
- (o) => i.indexOf(o.iso2) === -1
1754
+ (o) => r.indexOf(o.iso2) === -1
1737
1755
  );
1738
1756
  } else
1739
1757
  this.countries = W;
1740
1758
  }
1741
1759
  //* Translate Countries by object literal provided on config.
1742
1760
  _translateCountryNames() {
1743
- for (let $ = 0; $ < this.countries.length; $++) {
1744
- const n = this.countries[$].iso2.toLowerCase();
1745
- this.options.i18n.hasOwnProperty(n) && (this.countries[$].name = this.options.i18n[n]);
1761
+ for (let e = 0; e < this.countries.length; e++) {
1762
+ const n = this.countries[e].iso2.toLowerCase();
1763
+ this.options.i18n.hasOwnProperty(n) && (this.countries[e].name = this.options.i18n[n]);
1746
1764
  }
1747
1765
  }
1748
- //* Generate this.dialCodes and this.dialCodeToIso2Map and country.partialAreaCodes.
1766
+ //* Generate this.dialCodes and this.dialCodeToIso2Map.
1749
1767
  _processDialCodes() {
1750
1768
  this.dialCodes = {}, this.dialCodeMaxLen = 0, this.dialCodeToIso2Map = {};
1751
- for (let $ = 0; $ < this.countries.length; $++) {
1752
- const n = this.countries[$];
1769
+ for (let e = 0; e < this.countries.length; e++) {
1770
+ const n = this.countries[e];
1753
1771
  this.dialCodes[n.dialCode] || (this.dialCodes[n.dialCode] = !0), this._addToDialCodeMap(n.iso2, n.dialCode, n.priority);
1754
1772
  }
1755
- for (let $ = 0; $ < this.countries.length; $++) {
1756
- const n = this.countries[$];
1773
+ for (let e = 0; e < this.countries.length; e++) {
1774
+ const n = this.countries[e];
1757
1775
  if (n.areaCodes) {
1758
- const i = this.dialCodeToIso2Map[n.dialCode][0];
1776
+ const r = this.dialCodeToIso2Map[n.dialCode][0];
1759
1777
  for (let o = 0; o < n.areaCodes.length; o++) {
1760
- const l = n.areaCodes[o];
1761
- for (let c = 1; c < l.length; c++) {
1762
- const f = l.substr(0, c), p = n.dialCode + f;
1763
- this._addToDialCodeMap(i, p), this._addToDialCodeMap(n.iso2, p), n.partialAreaCodes || (n.partialAreaCodes = []), n.partialAreaCodes.includes(f) || n.partialAreaCodes.push(f);
1778
+ const a = n.areaCodes[o];
1779
+ for (let c = 1; c < a.length; c++) {
1780
+ const g = a.substr(0, c), f = n.dialCode + g;
1781
+ this._addToDialCodeMap(r, f), this._addToDialCodeMap(n.iso2, f);
1764
1782
  }
1765
- this._addToDialCodeMap(n.iso2, n.dialCode + l);
1783
+ this._addToDialCodeMap(n.iso2, n.dialCode + a);
1766
1784
  }
1767
1785
  }
1768
1786
  }
1769
1787
  }
1770
1788
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1771
1789
  _generateMarkup() {
1772
- var _, T, G;
1790
+ var I, A, G;
1773
1791
  this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !(this.telInput.form && this.telInput.form.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
1774
1792
  const {
1775
- allowDropdown: $,
1793
+ allowDropdown: e,
1776
1794
  separateDialCode: n,
1777
- showFlags: i,
1795
+ showFlags: r,
1778
1796
  containerClass: o,
1779
- hiddenInput: l,
1797
+ hiddenInput: a,
1780
1798
  dropdownContainer: c,
1781
- fixDropdownWidth: f,
1782
- useFullscreenPopup: p,
1783
- countrySearch: w,
1784
- i18n: I
1799
+ fixDropdownWidth: g,
1800
+ useFullscreenPopup: f,
1801
+ countrySearch: S,
1802
+ i18n: _
1785
1803
  } = this.options;
1786
- let S = "iti";
1787
- $ && (S += " iti--allow-dropdown"), i && (S += " iti--show-flags"), o && (S += ` ${o}`), p || (S += " iti--inline-dropdown");
1788
- const A = N("div", { class: S });
1789
- if ((_ = this.telInput.parentNode) == null || _.insertBefore(A, this.telInput), $ || i || n) {
1790
- this.countryContainer = N(
1804
+ let b = "iti";
1805
+ e && (b += " iti--allow-dropdown"), r && (b += " iti--show-flags"), o && (b += ` ${o}`), f || (b += " iti--inline-dropdown");
1806
+ const w = T("div", { class: b });
1807
+ if ((I = this.telInput.parentNode) == null || I.insertBefore(w, this.telInput), e || r || n) {
1808
+ this.countryContainer = T(
1791
1809
  "div",
1792
1810
  { class: "iti__country-container" },
1793
- A
1794
- ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", $ ? (this.selectedCountry = N(
1811
+ w
1812
+ ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = T(
1795
1813
  "button",
1796
1814
  {
1797
1815
  type: "button",
@@ -1803,89 +1821,89 @@ class K2 {
1803
1821
  role: "combobox"
1804
1822
  },
1805
1823
  this.countryContainer
1806
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = N(
1824
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
1807
1825
  "div",
1808
1826
  { class: "iti__selected-country" },
1809
1827
  this.countryContainer
1810
1828
  );
1811
- const F = N("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1812
- if (this.selectedCountryInner = N("div", { class: "iti__flag" }, F), this.selectedCountryA11yText = N(
1829
+ const F = T("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1830
+ if (this.selectedCountryInner = T("div", { class: "iti__flag" }, F), this.selectedCountryA11yText = T(
1813
1831
  "span",
1814
1832
  { class: "iti__a11y-text" },
1815
1833
  this.selectedCountryInner
1816
- ), $ && (this.dropdownArrow = N(
1834
+ ), e && (this.dropdownArrow = T(
1817
1835
  "div",
1818
1836
  { class: "iti__arrow", "aria-hidden": "true" },
1819
1837
  F
1820
- )), n && (this.selectedDialCode = N(
1838
+ )), n && (this.selectedDialCode = T(
1821
1839
  "div",
1822
1840
  { class: "iti__selected-dial-code" },
1823
1841
  this.selectedCountry
1824
- )), $) {
1825
- const M = f ? "" : "iti--flexible-dropdown-width";
1826
- if (this.dropdownContent = N("div", {
1842
+ )), e) {
1843
+ const M = g ? "" : "iti--flexible-dropdown-width";
1844
+ if (this.dropdownContent = T("div", {
1827
1845
  id: `iti-${this.id}__dropdown-content`,
1828
1846
  class: `iti__dropdown-content iti__hide ${M}`
1829
- }), w && (this.searchInput = N(
1847
+ }), S && (this.searchInput = T(
1830
1848
  "input",
1831
1849
  {
1832
1850
  type: "text",
1833
1851
  class: "iti__search-input",
1834
- placeholder: I.searchPlaceholder,
1852
+ placeholder: _.searchPlaceholder,
1835
1853
  role: "combobox",
1836
1854
  "aria-expanded": "true",
1837
- "aria-label": I.searchPlaceholder,
1855
+ "aria-label": _.searchPlaceholder,
1838
1856
  "aria-controls": `iti-${this.id}__country-listbox`,
1839
1857
  "aria-autocomplete": "list",
1840
1858
  autocomplete: "off"
1841
1859
  },
1842
1860
  this.dropdownContent
1843
- ), this.searchResultsA11yText = N(
1861
+ ), this.searchResultsA11yText = T(
1844
1862
  "span",
1845
1863
  { class: "iti__a11y-text" },
1846
1864
  this.dropdownContent
1847
- )), this.countryList = N(
1865
+ )), this.countryList = T(
1848
1866
  "ul",
1849
1867
  {
1850
1868
  class: "iti__country-list",
1851
1869
  id: `iti-${this.id}__country-listbox`,
1852
1870
  role: "listbox",
1853
- "aria-label": I.countryListAriaLabel
1871
+ "aria-label": _.countryListAriaLabel
1854
1872
  },
1855
1873
  this.dropdownContent
1856
- ), this._appendListItems(), w && this._updateSearchResultsText(), c) {
1874
+ ), this._appendListItems(), S && this._updateSearchResultsText(), c) {
1857
1875
  let x = "iti iti--container";
1858
- p ? x += " iti--fullscreen-popup" : x += " iti--inline-dropdown", this.dropdown = N("div", { class: x }), this.dropdown.appendChild(this.dropdownContent);
1876
+ f ? x += " iti--fullscreen-popup" : x += " iti--inline-dropdown", this.dropdown = T("div", { class: x }), this.dropdown.appendChild(this.dropdownContent);
1859
1877
  } else
1860
1878
  this.countryContainer.appendChild(this.dropdownContent);
1861
1879
  }
1862
1880
  }
1863
- if (A.appendChild(this.telInput), this._updateInputPadding(), l) {
1864
- const F = this.telInput.getAttribute("name") || "", M = l(F);
1881
+ if (w.appendChild(this.telInput), this._updateInputPadding(), a) {
1882
+ const F = this.telInput.getAttribute("name") || "", M = a(F);
1865
1883
  if (M.phone) {
1866
- const x = (T = this.telInput.form) == null ? void 0 : T.querySelector(`input[name="${M.phone}"]`);
1867
- x ? this.hiddenInput = x : (this.hiddenInput = N("input", {
1884
+ const x = (A = this.telInput.form) == null ? void 0 : A.querySelector(`input[name="${M.phone}"]`);
1885
+ x ? this.hiddenInput = x : (this.hiddenInput = T("input", {
1868
1886
  type: "hidden",
1869
1887
  name: M.phone
1870
- }), A.appendChild(this.hiddenInput));
1888
+ }), w.appendChild(this.hiddenInput));
1871
1889
  }
1872
1890
  if (M.country) {
1873
1891
  const x = (G = this.telInput.form) == null ? void 0 : G.querySelector(`input[name="${M.country}"]`);
1874
- x ? this.hiddenInputCountry = x : (this.hiddenInputCountry = N("input", {
1892
+ x ? this.hiddenInputCountry = x : (this.hiddenInputCountry = T("input", {
1875
1893
  type: "hidden",
1876
1894
  name: M.country
1877
- }), A.appendChild(this.hiddenInputCountry));
1895
+ }), w.appendChild(this.hiddenInputCountry));
1878
1896
  }
1879
1897
  }
1880
1898
  }
1881
1899
  //* For each country: add a country list item <li> to the countryList <ul> container.
1882
1900
  _appendListItems() {
1883
- for (let $ = 0; $ < this.countries.length; $++) {
1884
- const n = this.countries[$], i = $ === 0 ? "iti__highlight" : "", o = N(
1901
+ for (let e = 0; e < this.countries.length; e++) {
1902
+ const n = this.countries[e], r = e === 0 ? "iti__highlight" : "", o = T(
1885
1903
  "li",
1886
1904
  {
1887
1905
  id: `iti-${this.id}__item-${n.iso2}`,
1888
- class: `iti__country ${i}`,
1906
+ class: `iti__country ${r}`,
1889
1907
  tabindex: "-1",
1890
1908
  role: "option",
1891
1909
  "data-dial-code": n.dialCode,
@@ -1895,22 +1913,22 @@ class K2 {
1895
1913
  this.countryList
1896
1914
  );
1897
1915
  n.nodeById[this.id] = o;
1898
- let l = "";
1899
- this.options.showFlags && (l += `<div class='iti__flag iti__${n.iso2}'></div>`), l += `<span class='iti__country-name'>${n.name}</span>`, l += `<span class='iti__dial-code'>+${n.dialCode}</span>`, o.insertAdjacentHTML("beforeend", l);
1916
+ let a = "";
1917
+ this.options.showFlags && (a += `<div class='iti__flag iti__${n.iso2}'></div>`), a += `<span class='iti__country-name'>${n.name}</span>`, a += `<span class='iti__dial-code'>+${n.dialCode}</span>`, o.insertAdjacentHTML("beforeend", a);
1900
1918
  }
1901
1919
  }
1902
1920
  //* Set the initial state of the input value and the selected country by:
1903
1921
  //* 1. Extracting a dial code from the given number
1904
1922
  //* 2. Using explicit initialCountry
1905
- _setInitialState($ = !1) {
1906
- const n = this.telInput.getAttribute("value"), i = this.telInput.value, l = n && n.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? n : i, c = this._getDialCode(l), f = o2(l), { initialCountry: p, geoIpLookup: w } = this.options, I = p === "auto" && w;
1907
- if (c && !f)
1908
- this._updateCountryFromNumber(l);
1909
- else if (!I || $) {
1910
- const S = p ? p.toLowerCase() : "";
1911
- S && this._getCountryData(S, !0) ? this._setCountry(S) : c && f ? this._setCountry("us") : this._setCountry();
1923
+ _setInitialState(e = !1) {
1924
+ const n = this.telInput.getAttribute("value"), r = this.telInput.value, a = n && n.charAt(0) === "+" && (!r || r.charAt(0) !== "+") ? n : r, c = this._getDialCode(a), g = o2(a), { initialCountry: f, geoIpLookup: S } = this.options, _ = f === "auto" && S;
1925
+ if (c && !g)
1926
+ this._updateCountryFromNumber(a);
1927
+ else if (!_ || e) {
1928
+ const b = f ? f.toLowerCase() : "";
1929
+ b && this._getCountryData(b, !0) ? this._setCountry(b) : c && g ? this._setCountry("us") : this._setCountry();
1912
1930
  }
1913
- l && this._updateValFromNumber(l);
1931
+ a && this._updateValFromNumber(a);
1914
1932
  }
1915
1933
  //* Initialise the main event listeners: input keyup, and click selected country.
1916
1934
  _initListeners() {
@@ -1918,10 +1936,10 @@ class K2 {
1918
1936
  }
1919
1937
  //* Update hidden input on form submit.
1920
1938
  _initHiddenInputListener() {
1921
- var $;
1939
+ var e;
1922
1940
  this._handleHiddenInputSubmit = () => {
1923
1941
  this.hiddenInput && (this.hiddenInput.value = this.getNumber()), this.hiddenInputCountry && (this.hiddenInputCountry.value = this.getSelectedCountryData().iso2 || "");
1924
- }, ($ = this.telInput.form) == null || $.addEventListener(
1942
+ }, (e = this.telInput.form) == null || e.addEventListener(
1925
1943
  "submit",
1926
1944
  this._handleHiddenInputSubmit
1927
1945
  );
@@ -1931,8 +1949,8 @@ class K2 {
1931
1949
  this._handleLabelClick = (n) => {
1932
1950
  this.dropdownContent.classList.contains("iti__hide") ? this.telInput.focus() : n.preventDefault();
1933
1951
  };
1934
- const $ = this.telInput.closest("label");
1935
- $ && $.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => {
1952
+ const e = this.telInput.closest("label");
1953
+ e && e.addEventListener("click", this._handleLabelClick), this._handleClickSelectedCountry = () => {
1936
1954
  this.dropdownContent.classList.contains("iti__hide") && !this.telInput.disabled && !this.telInput.readOnly && this._openDropdown();
1937
1955
  }, this.selectedCountry.addEventListener("click", this._handleClickSelectedCountry), this._handleCountryContainerKeydown = (n) => {
1938
1956
  this.dropdownContent.classList.contains("iti__hide") && ["ArrowUp", "ArrowDown", " ", "Enter"].includes(n.key) && (n.preventDefault(), n.stopPropagation(), this._openDropdown()), n.key === "Tab" && this._closeDropdown();
@@ -1943,18 +1961,18 @@ class K2 {
1943
1961
  }
1944
1962
  //* Init many requests: utils script / geo ip lookup.
1945
1963
  _initRequests() {
1946
- let { loadUtils: $, initialCountry: n, geoIpLookup: i } = this.options;
1947
- $ && !C.utils ? (this._handlePageLoad = () => {
1948
- var l;
1949
- window.removeEventListener("load", this._handlePageLoad), (l = C.attachUtils($)) == null || l.catch(() => {
1964
+ let { loadUtils: e, initialCountry: n, geoIpLookup: r } = this.options;
1965
+ e && !C.utils ? (this._handlePageLoad = () => {
1966
+ var a;
1967
+ window.removeEventListener("load", this._handlePageLoad), (a = C.attachUtils(e)) == null || a.catch(() => {
1950
1968
  });
1951
- }, C.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), n === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1969
+ }, C.documentReady() ? this._handlePageLoad() : window.addEventListener("load", this._handlePageLoad)) : this.resolveUtilsScriptPromise(), n === "auto" && r && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1952
1970
  }
1953
1971
  //* Perform the geo ip lookup.
1954
1972
  _loadAutoCountry() {
1955
1973
  C.autoCountry ? this.handleAutoCountry() : C.startedLoadingAutoCountry || (C.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
1956
- ($ = "") => {
1957
- const n = $.toLowerCase();
1974
+ (e = "") => {
1975
+ const n = e.toLowerCase();
1958
1976
  n && this._getCountryData(n, !0) ? (C.autoCountry = n, setTimeout(() => $1("handleAutoCountry"))) : (this._setInitialState(!0), $1("rejectAutoCountryPromise"));
1959
1977
  },
1960
1978
  () => {
@@ -1967,94 +1985,94 @@ class K2 {
1967
1985
  }
1968
1986
  //* Initialize the tel input listeners.
1969
1987
  _initTelInputListeners() {
1970
- const { strictMode: $, formatAsYouType: n, separateDialCode: i, formatOnDisplay: o, allowDropdown: l, countrySearch: c } = this.options;
1971
- let f = !1;
1972
- new RegExp("\\p{L}", "u").test(this.telInput.value) && (f = !0), this._handleInputEvent = (p) => {
1973
- if (this.isAndroid && (p == null ? void 0 : p.data) === "+" && i && l && c) {
1974
- const A = this.telInput.selectionStart || 0, _ = this.telInput.value.substring(0, A - 1), T = this.telInput.value.substring(A);
1975
- this.telInput.value = _ + T, this._openDropdownWithPlus();
1988
+ const { strictMode: e, formatAsYouType: n, separateDialCode: r, formatOnDisplay: o, allowDropdown: a, countrySearch: c } = this.options;
1989
+ let g = !1;
1990
+ new RegExp("\\p{L}", "u").test(this.telInput.value) && (g = !0), this._handleInputEvent = (f) => {
1991
+ if (this.isAndroid && (f == null ? void 0 : f.data) === "+" && r && a && c) {
1992
+ const w = this.telInput.selectionStart || 0, I = this.telInput.value.substring(0, w - 1), A = this.telInput.value.substring(w);
1993
+ this.telInput.value = I + A, this._openDropdownWithPlus();
1976
1994
  return;
1977
1995
  }
1978
1996
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
1979
- const w = (p == null ? void 0 : p.data) && /[^+0-9]/.test(p.data), I = (p == null ? void 0 : p.inputType) === "insertFromPaste" && this.telInput.value;
1980
- w || I && !$ ? f = !0 : /[^+0-9]/.test(this.telInput.value) || (f = !1);
1981
- const S = (p == null ? void 0 : p.detail) && p.detail.isSetNumber && !o;
1982
- if (n && !f && !S) {
1983
- const A = this.telInput.selectionStart || 0, T = this.telInput.value.substring(0, A).replace(/[^+0-9]/g, "").length, G = (p == null ? void 0 : p.inputType) === "deleteContentForward", F = this._formatNumberAsYouType(), M = V2(T, F, A, G);
1997
+ const S = (f == null ? void 0 : f.data) && /[^+0-9]/.test(f.data), _ = (f == null ? void 0 : f.inputType) === "insertFromPaste" && this.telInput.value;
1998
+ S || _ && !e ? g = !0 : /[^+0-9]/.test(this.telInput.value) || (g = !1);
1999
+ const b = (f == null ? void 0 : f.detail) && f.detail.isSetNumber && !o;
2000
+ if (n && !g && !b) {
2001
+ const w = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, w).replace(/[^+0-9]/g, "").length, G = (f == null ? void 0 : f.inputType) === "deleteContentForward", F = this._formatNumberAsYouType(), M = V2(A, F, w, G);
1984
2002
  this.telInput.value = F, this.telInput.setSelectionRange(M, M);
1985
2003
  }
1986
- }, this.telInput.addEventListener("input", this._handleInputEvent), ($ || i) && (this._handleKeydownEvent = (p) => {
1987
- if (p.key && p.key.length === 1 && !p.altKey && !p.ctrlKey && !p.metaKey) {
1988
- if (i && l && c && p.key === "+") {
1989
- p.preventDefault(), this._openDropdownWithPlus();
2004
+ }, this.telInput.addEventListener("input", this._handleInputEvent), (e || r) && (this._handleKeydownEvent = (f) => {
2005
+ if (f.key && f.key.length === 1 && !f.altKey && !f.ctrlKey && !f.metaKey) {
2006
+ if (r && a && c && f.key === "+") {
2007
+ f.preventDefault(), this._openDropdownWithPlus();
1990
2008
  return;
1991
2009
  }
1992
- if ($) {
1993
- const w = this.telInput.value, I = w.charAt(0) === "+", S = !I && this.telInput.selectionStart === 0 && p.key === "+", A = /^[0-9]$/.test(p.key), _ = i ? A : S || A, T = w.slice(0, this.telInput.selectionStart) + p.key + w.slice(this.telInput.selectionEnd), G = this._getFullNumber(T), F = C.utils.getCoreNumber(G, this.selectedCountryData.iso2), M = this.maxCoreNumberLength && F.length > this.maxCoreNumberLength;
2010
+ if (e) {
2011
+ const S = this.telInput.value, _ = S.charAt(0) === "+", b = !_ && this.telInput.selectionStart === 0 && f.key === "+", w = /^[0-9]$/.test(f.key), I = r ? w : b || w, A = S.slice(0, this.telInput.selectionStart) + f.key + S.slice(this.telInput.selectionEnd), G = this._getFullNumber(A), F = C.utils.getCoreNumber(G, this.selectedCountryData.iso2), M = this.maxCoreNumberLength && F.length > this.maxCoreNumberLength;
1994
2012
  let x = !1;
1995
- if (I) {
2013
+ if (_) {
1996
2014
  const f1 = this.selectedCountryData.iso2;
1997
2015
  x = this._getCountryFromNumber(G) !== f1;
1998
2016
  }
1999
- (!_ || M && !x && !S) && p.preventDefault();
2017
+ (!I || M && !x && !b) && f.preventDefault();
2000
2018
  }
2001
2019
  }
2002
2020
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
2003
2021
  }
2004
2022
  //* Adhere to the input's maxlength attr.
2005
- _cap($) {
2023
+ _cap(e) {
2006
2024
  const n = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
2007
- return n && $.length > n ? $.substr(0, n) : $;
2025
+ return n && e.length > n ? e.substr(0, n) : e;
2008
2026
  }
2009
2027
  //* Trigger a custom event on the input.
2010
- _trigger($, n = {}) {
2011
- const i = new CustomEvent($, {
2028
+ _trigger(e, n = {}) {
2029
+ const r = new CustomEvent(e, {
2012
2030
  bubbles: !0,
2013
2031
  cancelable: !0,
2014
2032
  detail: n
2015
2033
  });
2016
- this.telInput.dispatchEvent(i);
2034
+ this.telInput.dispatchEvent(r);
2017
2035
  }
2018
2036
  //* Open the dropdown.
2019
2037
  _openDropdown() {
2020
- const { fixDropdownWidth: $, countrySearch: n } = this.options;
2021
- if ($ && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), n) {
2022
- const i = this.countryList.firstElementChild;
2023
- i && (this._highlightListItem(i, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2038
+ const { fixDropdownWidth: e, countrySearch: n } = this.options;
2039
+ if (e && (this.dropdownContent.style.width = `${this.telInput.offsetWidth}px`), this.dropdownContent.classList.remove("iti__hide"), this.selectedCountry.setAttribute("aria-expanded", "true"), this._setDropdownPosition(), n) {
2040
+ const r = this.countryList.firstElementChild;
2041
+ r && (this._highlightListItem(r, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2024
2042
  }
2025
2043
  this._bindDropdownListeners(), this.dropdownArrow.classList.add("iti__arrow--up"), this._trigger("open:countrydropdown");
2026
2044
  }
2027
2045
  //* Set the dropdown position
2028
2046
  _setDropdownPosition() {
2029
2047
  if (this.options.dropdownContainer && this.options.dropdownContainer.appendChild(this.dropdown), !this.options.useFullscreenPopup) {
2030
- const $ = this.telInput.getBoundingClientRect(), n = this.telInput.offsetHeight;
2031
- this.options.dropdownContainer && (this.dropdown.style.top = `${$.top + n}px`, this.dropdown.style.left = `${$.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2048
+ const e = this.telInput.getBoundingClientRect(), n = this.telInput.offsetHeight;
2049
+ this.options.dropdownContainer && (this.dropdown.style.top = `${e.top + n}px`, this.dropdown.style.left = `${e.left}px`, this._handleWindowScroll = () => this._closeDropdown(), window.addEventListener("scroll", this._handleWindowScroll));
2032
2050
  }
2033
2051
  }
2034
2052
  //* We only bind dropdown listeners when the dropdown is open.
2035
2053
  _bindDropdownListeners() {
2036
2054
  this._handleMouseoverCountryList = (o) => {
2037
2055
  var c;
2038
- const l = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2039
- l && this._highlightListItem(l, !1);
2056
+ const a = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2057
+ a && this._highlightListItem(a, !1);
2040
2058
  }, this.countryList.addEventListener(
2041
2059
  "mouseover",
2042
2060
  this._handleMouseoverCountryList
2043
2061
  ), this._handleClickCountryList = (o) => {
2044
2062
  var c;
2045
- const l = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2046
- l && this._selectListItem(l);
2063
+ const a = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2064
+ a && this._selectListItem(a);
2047
2065
  }, this.countryList.addEventListener("click", this._handleClickCountryList);
2048
- let $ = !0;
2066
+ let e = !0;
2049
2067
  this._handleClickOffToClose = () => {
2050
- $ || this._closeDropdown(), $ = !1;
2068
+ e || this._closeDropdown(), e = !1;
2051
2069
  }, document.documentElement.addEventListener(
2052
2070
  "click",
2053
2071
  this._handleClickOffToClose
2054
2072
  );
2055
- let n = "", i = null;
2073
+ let n = "", r = null;
2056
2074
  if (this._handleKeydownOnDropdown = (o) => {
2057
- ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(o.key) && (o.preventDefault(), o.stopPropagation(), o.key === "ArrowUp" || o.key === "ArrowDown" ? this._handleUpDownKey(o.key) : o.key === "Enter" ? this._handleEnterKey() : o.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(o.key) && (o.stopPropagation(), i && clearTimeout(i), n += o.key.toLowerCase(), this._searchForCountry(n), i = setTimeout(() => {
2075
+ ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(o.key) && (o.preventDefault(), o.stopPropagation(), o.key === "ArrowUp" || o.key === "ArrowDown" ? this._handleUpDownKey(o.key) : o.key === "Enter" ? this._handleEnterKey() : o.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(o.key) && (o.stopPropagation(), r && clearTimeout(r), n += o.key.toLowerCase(), this._searchForCountry(n), r = setTimeout(() => {
2058
2076
  n = "";
2059
2077
  }, 1e3));
2060
2078
  }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
@@ -2062,50 +2080,50 @@ class K2 {
2062
2080
  const c = this.searchInput.value.trim();
2063
2081
  c ? this._filterCountries(c) : this._filterCountries("", !0);
2064
2082
  };
2065
- let l = null;
2083
+ let a = null;
2066
2084
  this._handleSearchChange = () => {
2067
- l && clearTimeout(l), l = setTimeout(() => {
2068
- o(), l = null;
2085
+ a && clearTimeout(a), a = setTimeout(() => {
2086
+ o(), a = null;
2069
2087
  }, 100);
2070
2088
  }, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", (c) => c.stopPropagation());
2071
2089
  }
2072
2090
  }
2073
2091
  //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
2074
- _searchForCountry($) {
2092
+ _searchForCountry(e) {
2075
2093
  for (let n = 0; n < this.countries.length; n++) {
2076
- const i = this.countries[n];
2077
- if (i.name.substr(0, $.length).toLowerCase() === $) {
2078
- const l = i.nodeById[this.id];
2079
- this._highlightListItem(l, !1), this._scrollTo(l);
2094
+ const r = this.countries[n];
2095
+ if (r.name.substr(0, e.length).toLowerCase() === e) {
2096
+ const a = r.nodeById[this.id];
2097
+ this._highlightListItem(a, !1), this._scrollTo(a);
2080
2098
  break;
2081
2099
  }
2082
2100
  }
2083
2101
  }
2084
2102
  //* Country search enabled: Filter the countries according to the search query.
2085
- _filterCountries($, n = !1) {
2086
- let i = !0;
2103
+ _filterCountries(e, n = !1) {
2104
+ let r = !0;
2087
2105
  this.countryList.innerHTML = "";
2088
- const o = s2($);
2089
- for (let l = 0; l < this.countries.length; l++) {
2090
- const c = this.countries[l], f = s2(c.name), p = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((I) => I[0]).join("").toLowerCase(), w = `+${c.dialCode}`;
2091
- if (n || f.includes(o) || w.includes(o) || c.iso2.includes(o) || p.includes(o)) {
2092
- const I = c.nodeById[this.id];
2093
- I && this.countryList.appendChild(I), i && (this._highlightListItem(I, !1), i = !1);
2106
+ const o = s2(e);
2107
+ for (let a = 0; a < this.countries.length; a++) {
2108
+ const c = this.countries[a], g = s2(c.name), f = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((_) => _[0]).join("").toLowerCase(), S = `+${c.dialCode}`;
2109
+ if (n || g.includes(o) || S.includes(o) || c.iso2.includes(o) || f.includes(o)) {
2110
+ const _ = c.nodeById[this.id];
2111
+ _ && this.countryList.appendChild(_), r && (this._highlightListItem(_, !1), r = !1);
2094
2112
  }
2095
2113
  }
2096
- i && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2114
+ r && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2097
2115
  }
2098
2116
  //* Update search results text (for a11y).
2099
2117
  _updateSearchResultsText() {
2100
- const { i18n: $ } = this.options, n = this.countryList.childElementCount;
2101
- let i;
2102
- n === 0 ? i = $.zeroSearchResults : n === 1 ? i = $.oneSearchResult : i = $.multipleSearchResults.replace("${count}", n.toString()), this.searchResultsA11yText.textContent = i;
2118
+ const { i18n: e } = this.options, n = this.countryList.childElementCount;
2119
+ let r;
2120
+ n === 0 ? r = e.zeroSearchResults : n === 1 ? r = e.oneSearchResult : r = e.multipleSearchResults.replace("${count}", n.toString()), this.searchResultsA11yText.textContent = r;
2103
2121
  }
2104
2122
  //* Highlight the next/prev item in the list (and ensure it is visible).
2105
- _handleUpDownKey($) {
2106
- var i, o;
2107
- let n = $ === "ArrowUp" ? (i = this.highlightedItem) == null ? void 0 : i.previousElementSibling : (o = this.highlightedItem) == null ? void 0 : o.nextElementSibling;
2108
- !n && this.countryList.childElementCount > 1 && (n = $ === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), n && (this._scrollTo(n), this._highlightListItem(n, !1));
2123
+ _handleUpDownKey(e) {
2124
+ var r, o;
2125
+ let n = e === "ArrowUp" ? (r = this.highlightedItem) == null ? void 0 : r.previousElementSibling : (o = this.highlightedItem) == null ? void 0 : o.nextElementSibling;
2126
+ !n && this.countryList.childElementCount > 1 && (n = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), n && (this._scrollTo(n), this._highlightListItem(n, !1));
2109
2127
  }
2110
2128
  //* Select the currently highlighted item.
2111
2129
  _handleEnterKey() {
@@ -2113,10 +2131,10 @@ class K2 {
2113
2131
  }
2114
2132
  //* Update the input's value to the given val (format first if possible)
2115
2133
  //* NOTE: this is called from _setInitialState, handleUtils and setNumber.
2116
- _updateValFromNumber($) {
2117
- let n = $;
2134
+ _updateValFromNumber(e) {
2135
+ let n = e;
2118
2136
  if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
2119
- const i = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: l } = C.utils.numberFormat, c = i ? o : l;
2137
+ const r = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: a } = C.utils.numberFormat, c = r ? o : a;
2120
2138
  n = C.utils.formatNumber(
2121
2139
  n,
2122
2140
  this.selectedCountryData.iso2,
@@ -2127,41 +2145,49 @@ class K2 {
2127
2145
  }
2128
2146
  //* Check if need to select a new country based on the given number
2129
2147
  //* Note: called from _setInitialState, keyup handler, setNumber.
2130
- _updateCountryFromNumber($) {
2131
- const n = this._getCountryFromNumber($);
2148
+ _updateCountryFromNumber(e) {
2149
+ const n = this._getCountryFromNumber(e);
2132
2150
  return n !== null ? this._setCountry(n) : !1;
2133
2151
  }
2134
- //* Check if the given number matches an area code from the selected country.
2135
- _isAreaCodeMatch($, n) {
2136
- const { areaCodes: i, partialAreaCodes: o, dialCode: l } = this.selectedCountryData, c = $.substring(l.length), f = n.substring(l.length);
2137
- return !!(i.includes(f) || o.includes(c));
2138
- }
2139
- _getCountryFromNumber($) {
2140
- const n = $.indexOf("+");
2141
- let i = n ? $.substring(n) : $;
2142
- const o = this.selectedCountryData.dialCode;
2143
- i && o === "1" && i.charAt(0) !== "+" && (i.charAt(0) !== "1" && (i = `1${i}`), i = `+${i}`), this.options.separateDialCode && o && i.charAt(0) !== "+" && (i = `+${o}${i}`);
2144
- const c = this._getDialCode(i, !0), f = c1(i);
2152
+ _ensureHasDialCode(e) {
2153
+ const { dialCode: n, nationalPrefix: r } = this.selectedCountryData;
2154
+ if (e.charAt(0) === "+" || !n)
2155
+ return e;
2156
+ const c = r && e.charAt(0) === r && !this.options.separateDialCode ? e.substring(1) : e;
2157
+ return `+${n}${c}`;
2158
+ }
2159
+ _getCountryFromNumber(e) {
2160
+ const n = e.indexOf("+");
2161
+ let r = n ? e.substring(n) : e;
2162
+ const o = this.selectedCountryData.iso2, a = this.selectedCountryData.dialCode;
2163
+ r = this._ensureHasDialCode(r);
2164
+ const c = this._getDialCode(r, !0);
2165
+ if (c && c === this.prevDialCodeMatch)
2166
+ return null;
2167
+ this.prevDialCodeMatch = c;
2168
+ const g = c1(r);
2145
2169
  if (c) {
2146
- const p = c1(c), w = this.dialCodeToIso2Map[p], I = this.selectedCountryData.iso2 && w.includes(this.selectedCountryData.iso2);
2147
- let S = !1;
2148
- if (I && (this.selectedCountryData.areaCodes && f.length > o.length ? S = this._isAreaCodeMatch(f, p) : S = !0), !(o === "1" && o2(f)) && (!I || !S)) {
2149
- for (let _ = 0; _ < w.length; _++)
2150
- if (w[_])
2151
- return w[_];
2170
+ const f = c1(c), S = this.dialCodeToIso2Map[f];
2171
+ if (!o && this.defaultCountry && S.includes(this.defaultCountry))
2172
+ return this.defaultCountry;
2173
+ const _ = o && S.includes(o) && g.length === f.length;
2174
+ if (!(a === "1" && o2(g)) && !_) {
2175
+ for (let w = 0; w < S.length; w++)
2176
+ if (S[w])
2177
+ return S[w];
2152
2178
  }
2153
2179
  } else {
2154
- if (i.charAt(0) === "+" && f.length)
2180
+ if (r.charAt(0) === "+" && g.length)
2155
2181
  return "";
2156
- if ((!i || i === "+") && !this.selectedCountryData.iso2)
2182
+ if ((!r || r === "+") && !this.selectedCountryData.iso2)
2157
2183
  return this.defaultCountry;
2158
2184
  }
2159
2185
  return null;
2160
2186
  }
2161
2187
  //* Remove highlighting from other list items and highlight the given item.
2162
- _highlightListItem($, n) {
2163
- const i = this.highlightedItem;
2164
- if (i && (i.classList.remove("iti__highlight"), i.setAttribute("aria-selected", "false")), this.highlightedItem = $, this.highlightedItem) {
2188
+ _highlightListItem(e, n) {
2189
+ const r = this.highlightedItem;
2190
+ if (r && (r.classList.remove("iti__highlight"), r.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem) {
2165
2191
  this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true");
2166
2192
  const o = this.highlightedItem.getAttribute("id") || "";
2167
2193
  this.selectedCountry.setAttribute("aria-activedescendant", o), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", o);
@@ -2170,27 +2196,27 @@ class K2 {
2170
2196
  }
2171
2197
  //* Find the country data for the given iso2 code
2172
2198
  //* the ignoreOnlyCountriesOption is only used during init() while parsing the onlyCountries array
2173
- _getCountryData($, n) {
2174
- for (let i = 0; i < this.countries.length; i++)
2175
- if (this.countries[i].iso2 === $)
2176
- return this.countries[i];
2199
+ _getCountryData(e, n) {
2200
+ for (let r = 0; r < this.countries.length; r++)
2201
+ if (this.countries[r].iso2 === e)
2202
+ return this.countries[r];
2177
2203
  if (n)
2178
2204
  return null;
2179
- throw new Error(`No country data for '${$}'`);
2205
+ throw new Error(`No country data for '${e}'`);
2180
2206
  }
2181
2207
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
2182
2208
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2183
- _setCountry($) {
2184
- const { separateDialCode: n, showFlags: i, i18n: o } = this.options, l = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2185
- if (this.selectedCountryData = $ ? this._getCountryData($, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
2186
- let c = "", f = "";
2187
- $ && i ? (c = `iti__flag iti__${$}`, f = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", f = o.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = f;
2209
+ _setCountry(e) {
2210
+ const { separateDialCode: n, showFlags: r, i18n: o } = this.options, a = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2211
+ if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
2212
+ let c = "", g = "";
2213
+ e && r ? (c = `iti__flag iti__${e}`, g = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", g = o.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = g;
2188
2214
  }
2189
- if (this._setSelectedCountryTitleAttribute($, n), n) {
2215
+ if (this._setSelectedCountryTitleAttribute(e, n), n) {
2190
2216
  const c = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
2191
2217
  this.selectedDialCode.innerHTML = c, this._updateInputPadding();
2192
2218
  }
2193
- return this._updatePlaceholder(), this._updateMaxLength(), l.iso2 !== $;
2219
+ return this._updatePlaceholder(), this._updateMaxLength(), a.iso2 !== e;
2194
2220
  }
2195
2221
  //* Update the input padding to make space for the selected country/dial code.
2196
2222
  _updateInputPadding() {
@@ -2201,28 +2227,28 @@ class K2 {
2201
2227
  }
2202
2228
  //* Update the maximum valid number length for the currently selected country.
2203
2229
  _updateMaxLength() {
2204
- const { strictMode: $, placeholderNumberType: n, validationNumberTypes: i } = this.options, { iso2: o } = this.selectedCountryData;
2205
- if ($ && C.utils)
2230
+ const { strictMode: e, placeholderNumberType: n, validationNumberTypes: r } = this.options, { iso2: o } = this.selectedCountryData;
2231
+ if (e && C.utils)
2206
2232
  if (o) {
2207
- const l = C.utils.numberType[n];
2233
+ const a = C.utils.numberType[n];
2208
2234
  let c = C.utils.getExampleNumber(
2209
2235
  o,
2210
2236
  !1,
2211
- l,
2237
+ a,
2212
2238
  !0
2213
- ), f = c;
2214
- for (; C.utils.isPossibleNumber(c, o, i); )
2215
- f = c, c += "0";
2216
- const p = C.utils.getCoreNumber(f, o);
2217
- this.maxCoreNumberLength = p.length, o === "by" && (this.maxCoreNumberLength = p.length + 1);
2239
+ ), g = c;
2240
+ for (; C.utils.isPossibleNumber(c, o, r); )
2241
+ g = c, c += "0";
2242
+ const f = C.utils.getCoreNumber(g, o);
2243
+ this.maxCoreNumberLength = f.length, o === "by" && (this.maxCoreNumberLength = f.length + 1);
2218
2244
  } else
2219
2245
  this.maxCoreNumberLength = null;
2220
2246
  }
2221
- _setSelectedCountryTitleAttribute($ = null, n) {
2247
+ _setSelectedCountryTitleAttribute(e = null, n) {
2222
2248
  if (!this.selectedCountry)
2223
2249
  return;
2224
- let i;
2225
- $ && !n ? i = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : $ ? i = this.selectedCountryData.name : i = "Unknown", this.selectedCountry.setAttribute("title", i);
2250
+ let r;
2251
+ e && !n ? r = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? r = this.selectedCountryData.name : r = "Unknown", this.selectedCountry.setAttribute("title", r);
2226
2252
  }
2227
2253
  //* When the input is in a hidden container during initialisation, we must inject some markup
2228
2254
  //* into the end of the DOM to calculate the correct offsetWidth.
@@ -2230,41 +2256,41 @@ class K2 {
2230
2256
  //* will definitely exist.
2231
2257
  _getHiddenSelectedCountryWidth() {
2232
2258
  if (this.telInput.parentNode) {
2233
- const $ = this.telInput.parentNode.cloneNode(!1);
2234
- $.style.visibility = "hidden", document.body.appendChild($);
2259
+ const e = this.telInput.parentNode.cloneNode(!1);
2260
+ e.style.visibility = "hidden", document.body.appendChild(e);
2235
2261
  const n = this.countryContainer.cloneNode();
2236
- $.appendChild(n);
2237
- const i = this.selectedCountry.cloneNode(!0);
2238
- n.appendChild(i);
2239
- const o = i.offsetWidth;
2240
- return document.body.removeChild($), o;
2262
+ e.appendChild(n);
2263
+ const r = this.selectedCountry.cloneNode(!0);
2264
+ n.appendChild(r);
2265
+ const o = r.offsetWidth;
2266
+ return document.body.removeChild(e), o;
2241
2267
  }
2242
2268
  return 0;
2243
2269
  }
2244
2270
  //* Update the input placeholder to an example number from the currently selected country.
2245
2271
  _updatePlaceholder() {
2246
2272
  const {
2247
- autoPlaceholder: $,
2273
+ autoPlaceholder: e,
2248
2274
  placeholderNumberType: n,
2249
- nationalMode: i,
2275
+ nationalMode: r,
2250
2276
  customPlaceholder: o
2251
- } = this.options, l = $ === "aggressive" || !this.hadInitialPlaceholder && $ === "polite";
2252
- if (C.utils && l) {
2277
+ } = this.options, a = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2278
+ if (C.utils && a) {
2253
2279
  const c = C.utils.numberType[n];
2254
- let f = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
2280
+ let g = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
2255
2281
  this.selectedCountryData.iso2,
2256
- i,
2282
+ r,
2257
2283
  c
2258
2284
  ) : "";
2259
- f = this._beforeSetNumber(f), typeof o == "function" && (f = o(f, this.selectedCountryData)), this.telInput.setAttribute("placeholder", f);
2285
+ g = this._beforeSetNumber(g), typeof o == "function" && (g = o(g, this.selectedCountryData)), this.telInput.setAttribute("placeholder", g);
2260
2286
  }
2261
2287
  }
2262
2288
  //* Called when the user selects a list item from the dropdown.
2263
- _selectListItem($) {
2289
+ _selectListItem(e) {
2264
2290
  const n = this._setCountry(
2265
- $.getAttribute("data-country-code")
2291
+ e.getAttribute("data-country-code")
2266
2292
  );
2267
- this._closeDropdown(), this._updateDialCode($.getAttribute("data-dial-code")), this.telInput.focus(), n && this._triggerCountryChange();
2293
+ this._closeDropdown(), this._updateDialCode(e.getAttribute("data-dial-code")), this.telInput.focus(), n && this._triggerCountryChange();
2268
2294
  }
2269
2295
  //* Close the dropdown and unbind any listeners.
2270
2296
  _closeDropdown() {
@@ -2277,38 +2303,38 @@ class K2 {
2277
2303
  ), 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._handlePageLoad && window.removeEventListener("load", this._handlePageLoad), this._trigger("close:countrydropdown");
2278
2304
  }
2279
2305
  //* Check if an element is visible within it's container, else scroll until it is.
2280
- _scrollTo($) {
2281
- const n = this.countryList, i = document.documentElement.scrollTop, o = n.offsetHeight, l = n.getBoundingClientRect().top + i, c = l + o, f = $.offsetHeight, p = $.getBoundingClientRect().top + i, w = p + f, I = p - l + n.scrollTop;
2282
- if (p < l)
2283
- n.scrollTop = I;
2284
- else if (w > c) {
2285
- const S = o - f;
2286
- n.scrollTop = I - S;
2306
+ _scrollTo(e) {
2307
+ const n = this.countryList, r = document.documentElement.scrollTop, o = n.offsetHeight, a = n.getBoundingClientRect().top + r, c = a + o, g = e.offsetHeight, f = e.getBoundingClientRect().top + r, S = f + g, _ = f - a + n.scrollTop;
2308
+ if (f < a)
2309
+ n.scrollTop = _;
2310
+ else if (S > c) {
2311
+ const b = o - g;
2312
+ n.scrollTop = _ - b;
2287
2313
  }
2288
2314
  }
2289
2315
  //* Replace any existing dial code with the new one
2290
2316
  //* Note: called from _selectListItem and setCountry
2291
- _updateDialCode($) {
2292
- const n = this.telInput.value, i = `+${$}`;
2317
+ _updateDialCode(e) {
2318
+ const n = this.telInput.value, r = `+${e}`;
2293
2319
  let o;
2294
2320
  if (n.charAt(0) === "+") {
2295
- const l = this._getDialCode(n);
2296
- l ? o = n.replace(l, i) : o = i, this.telInput.value = o;
2321
+ const a = this._getDialCode(n);
2322
+ a ? o = n.replace(a, r) : o = r, this.telInput.value = o;
2297
2323
  }
2298
2324
  }
2299
2325
  //* Try and extract a valid international dial code from a full telephone number.
2300
2326
  //* Note: returns the raw string inc plus character and any whitespace/dots etc.
2301
- _getDialCode($, n) {
2302
- let i = "";
2303
- if ($.charAt(0) === "+") {
2327
+ _getDialCode(e, n) {
2328
+ let r = "";
2329
+ if (e.charAt(0) === "+") {
2304
2330
  let o = "";
2305
- for (let l = 0; l < $.length; l++) {
2306
- const c = $.charAt(l);
2331
+ for (let a = 0; a < e.length; a++) {
2332
+ const c = e.charAt(a);
2307
2333
  if (!isNaN(parseInt(c, 10))) {
2308
2334
  if (o += c, n)
2309
- this.dialCodeToIso2Map[o] && (i = $.substr(0, l + 1));
2335
+ this.dialCodeToIso2Map[o] && (r = e.substr(0, a + 1));
2310
2336
  else if (this.dialCodes[o]) {
2311
- i = $.substr(0, l + 1);
2337
+ r = e.substr(0, a + 1);
2312
2338
  break;
2313
2339
  }
2314
2340
  if (o.length === this.dialCodeMaxLen)
@@ -2316,23 +2342,23 @@ class K2 {
2316
2342
  }
2317
2343
  }
2318
2344
  }
2319
- return i;
2345
+ return r;
2320
2346
  }
2321
2347
  //* Get the input val, adding the dial code if separateDialCode is enabled.
2322
- _getFullNumber($) {
2323
- const n = $ || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
2348
+ _getFullNumber(e) {
2349
+ const n = e || this.telInput.value.trim(), { dialCode: r } = this.selectedCountryData;
2324
2350
  let o;
2325
- const l = c1(n);
2326
- return this.options.separateDialCode && n.charAt(0) !== "+" && i && l ? o = `+${i}` : o = "", o + n;
2351
+ const a = c1(n);
2352
+ return this.options.separateDialCode && n.charAt(0) !== "+" && r && a ? o = `+${r}` : o = "", o + n;
2327
2353
  }
2328
2354
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
2329
- _beforeSetNumber($) {
2330
- let n = $;
2355
+ _beforeSetNumber(e) {
2356
+ let n = e;
2331
2357
  if (this.options.separateDialCode) {
2332
- let i = this._getDialCode(n);
2333
- if (i) {
2334
- i = `+${this.selectedCountryData.dialCode}`;
2335
- const o = n[i.length] === " " || n[i.length] === "-" ? i.length + 1 : i.length;
2358
+ let r = this._getDialCode(n);
2359
+ if (r) {
2360
+ r = `+${this.selectedCountryData.dialCode}`;
2361
+ const o = n[r.length] === " " || n[r.length] === "-" ? r.length + 1 : r.length;
2336
2362
  n = n.substr(o);
2337
2363
  }
2338
2364
  }
@@ -2344,8 +2370,8 @@ class K2 {
2344
2370
  }
2345
2371
  //* Format the number as the user types.
2346
2372
  _formatNumberAsYouType() {
2347
- const $ = this._getFullNumber(), n = C.utils ? C.utils.formatNumberAsYouType($, this.selectedCountryData.iso2) : $, { dialCode: i } = this.selectedCountryData;
2348
- return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && n.includes(`+${i}`) ? (n.split(`+${i}`)[1] || "").trim() : n;
2373
+ const e = this._getFullNumber(), n = C.utils ? C.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: r } = this.selectedCountryData;
2374
+ return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && n.includes(`+${r}`) ? (n.split(`+${r}`)[1] || "").trim() : n;
2349
2375
  }
2350
2376
  //**************************
2351
2377
  //* SECRET PUBLIC METHODS
@@ -2363,9 +2389,9 @@ class K2 {
2363
2389
  //********************
2364
2390
  //* Remove plugin.
2365
2391
  destroy() {
2366
- var l, c;
2367
- const { allowDropdown: $, separateDialCode: n } = this.options;
2368
- if ($) {
2392
+ var a, c;
2393
+ const { allowDropdown: e, separateDialCode: n } = this.options;
2394
+ if (e) {
2369
2395
  this._closeDropdown(), this.selectedCountry.removeEventListener(
2370
2396
  "click",
2371
2397
  this._handleClickSelectedCountry
@@ -2373,13 +2399,13 @@ class K2 {
2373
2399
  "keydown",
2374
2400
  this._handleCountryContainerKeydown
2375
2401
  );
2376
- const f = this.telInput.closest("label");
2377
- f && f.removeEventListener("click", this._handleLabelClick);
2402
+ const g = this.telInput.closest("label");
2403
+ g && g.removeEventListener("click", this._handleLabelClick);
2378
2404
  }
2379
- const { form: i } = this.telInput;
2380
- this._handleHiddenInputSubmit && i && i.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), n && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2405
+ const { form: r } = this.telInput;
2406
+ this._handleHiddenInputSubmit && r && r.removeEventListener("submit", this._handleHiddenInputSubmit), this.telInput.removeEventListener("input", this._handleInputEvent), this._handleKeydownEvent && this.telInput.removeEventListener("keydown", this._handleKeydownEvent), this.telInput.removeAttribute("data-intl-tel-input-id"), n && (this.isRTL ? this.telInput.style.paddingRight = this.originalPaddingRight : this.telInput.style.paddingLeft = this.originalPaddingLeft);
2381
2407
  const o = this.telInput.parentNode;
2382
- (l = o == null ? void 0 : o.parentNode) == null || l.insertBefore(this.telInput, o), (c = o == null ? void 0 : o.parentNode) == null || c.removeChild(o), delete C.instances[this.id];
2408
+ (a = o == null ? void 0 : o.parentNode) == null || a.insertBefore(this.telInput, o), (c = o == null ? void 0 : o.parentNode) == null || c.removeChild(o), delete C.instances[this.id];
2383
2409
  }
2384
2410
  //* Get the extension from the current number.
2385
2411
  getExtension() {
@@ -2389,13 +2415,13 @@ class K2 {
2389
2415
  ) : "";
2390
2416
  }
2391
2417
  //* Format the number to the given format.
2392
- getNumber($) {
2418
+ getNumber(e) {
2393
2419
  if (C.utils) {
2394
2420
  const { iso2: n } = this.selectedCountryData;
2395
2421
  return C.utils.formatNumber(
2396
2422
  this._getFullNumber(),
2397
2423
  n,
2398
- $
2424
+ e
2399
2425
  );
2400
2426
  }
2401
2427
  return "";
@@ -2414,8 +2440,8 @@ class K2 {
2414
2440
  //* Get the validation error.
2415
2441
  getValidationError() {
2416
2442
  if (C.utils) {
2417
- const { iso2: $ } = this.selectedCountryData;
2418
- return C.utils.getValidationError(this._getFullNumber(), $);
2443
+ const { iso2: e } = this.selectedCountryData;
2444
+ return C.utils.getValidationError(this._getFullNumber(), e);
2419
2445
  }
2420
2446
  return -99;
2421
2447
  }
@@ -2423,127 +2449,127 @@ class K2 {
2423
2449
  isValidNumber() {
2424
2450
  if (!this.selectedCountryData.iso2)
2425
2451
  return !1;
2426
- const $ = this._getFullNumber(), n = $.search(new RegExp("\\p{L}", "u"));
2452
+ const e = this._getFullNumber(), n = e.search(new RegExp("\\p{L}", "u"));
2427
2453
  if (n > -1) {
2428
- const i = $.substring(0, n), o = this._utilsIsPossibleNumber(i), l = this._utilsIsPossibleNumber($);
2429
- return o && l;
2454
+ const r = e.substring(0, n), o = this._utilsIsPossibleNumber(r), a = this._utilsIsPossibleNumber(e);
2455
+ return o && a;
2430
2456
  }
2431
- return this._utilsIsPossibleNumber($);
2457
+ return this._utilsIsPossibleNumber(e);
2432
2458
  }
2433
- _utilsIsPossibleNumber($) {
2434
- return C.utils ? C.utils.isPossibleNumber($, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2459
+ _utilsIsPossibleNumber(e) {
2460
+ return C.utils ? C.utils.isPossibleNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2435
2461
  }
2436
2462
  //* Validate the input val (precise)
2437
2463
  isValidNumberPrecise() {
2438
2464
  if (!this.selectedCountryData.iso2)
2439
2465
  return !1;
2440
- const $ = this._getFullNumber(), n = $.search(new RegExp("\\p{L}", "u"));
2466
+ const e = this._getFullNumber(), n = e.search(new RegExp("\\p{L}", "u"));
2441
2467
  if (n > -1) {
2442
- const i = $.substring(0, n), o = this._utilsIsValidNumber(i), l = this._utilsIsValidNumber($);
2443
- return o && l;
2468
+ const r = e.substring(0, n), o = this._utilsIsValidNumber(r), a = this._utilsIsValidNumber(e);
2469
+ return o && a;
2444
2470
  }
2445
- return this._utilsIsValidNumber($);
2471
+ return this._utilsIsValidNumber(e);
2446
2472
  }
2447
- _utilsIsValidNumber($) {
2448
- return C.utils ? C.utils.isValidNumber($, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2473
+ _utilsIsValidNumber(e) {
2474
+ return C.utils ? C.utils.isValidNumber(e, this.selectedCountryData.iso2, this.options.validationNumberTypes) : null;
2449
2475
  }
2450
2476
  //* Update the selected country, and update the input val accordingly.
2451
- setCountry($) {
2452
- const n = $ == null ? void 0 : $.toLowerCase(), i = this.selectedCountryData.iso2;
2453
- ($ && n !== i || !$ && i) && (this._setCountry(n), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2477
+ setCountry(e) {
2478
+ const n = e == null ? void 0 : e.toLowerCase(), r = this.selectedCountryData.iso2;
2479
+ (e && n !== r || !e && r) && (this._setCountry(n), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2454
2480
  }
2455
2481
  //* Set the input value and update the country.
2456
- setNumber($) {
2457
- const n = this._updateCountryFromNumber($);
2458
- this._updateValFromNumber($), n && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2482
+ setNumber(e) {
2483
+ const n = this._updateCountryFromNumber(e);
2484
+ this._updateValFromNumber(e), n && this._triggerCountryChange(), this._trigger("input", { isSetNumber: !0 });
2459
2485
  }
2460
2486
  //* Set the placeholder number typ
2461
- setPlaceholderNumberType($) {
2462
- this.options.placeholderNumberType = $, this._updatePlaceholder();
2487
+ setPlaceholderNumberType(e) {
2488
+ this.options.placeholderNumberType = e, this._updatePlaceholder();
2463
2489
  }
2464
- setDisabled($) {
2465
- this.telInput.disabled = $, $ ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2490
+ setDisabled(e) {
2491
+ this.telInput.disabled = e, e ? this.selectedCountry.setAttribute("disabled", "true") : this.selectedCountry.removeAttribute("disabled");
2466
2492
  }
2467
2493
  }
2468
2494
  const H2 = (y) => {
2469
2495
  if (!C.utils && !C.startedLoadingUtilsScript) {
2470
- let $;
2496
+ let e;
2471
2497
  if (typeof y == "function")
2472
2498
  try {
2473
- $ = Promise.resolve(y());
2499
+ e = Promise.resolve(y());
2474
2500
  } catch (n) {
2475
2501
  return Promise.reject(n);
2476
2502
  }
2477
2503
  else
2478
2504
  return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof y}`));
2479
- return C.startedLoadingUtilsScript = !0, $.then((n) => {
2480
- const i = n == null ? void 0 : n.default;
2481
- if (!i || typeof i != "object")
2505
+ return C.startedLoadingUtilsScript = !0, e.then((n) => {
2506
+ const r = n == null ? void 0 : n.default;
2507
+ if (!r || typeof r != "object")
2482
2508
  throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");
2483
- return C.utils = i, $1("handleUtils"), !0;
2509
+ return C.utils = r, $1("handleUtils"), !0;
2484
2510
  }).catch((n) => {
2485
2511
  throw $1("rejectUtilsScriptPromise", n), n;
2486
2512
  });
2487
2513
  }
2488
2514
  return null;
2489
2515
  }, C = Object.assign(
2490
- (y, $) => {
2491
- const n = new K2(y, $);
2516
+ (y, e) => {
2517
+ const n = new K2(y, e);
2492
2518
  return n._init(), y.setAttribute("data-intl-tel-input-id", n.id.toString()), C.instances[n.id] = n, n;
2493
2519
  },
2494
2520
  {
2495
- defaults: a2,
2521
+ defaults: l2,
2496
2522
  //* Using a static var like this allows us to mock it in the tests.
2497
2523
  documentReady: () => document.readyState === "complete",
2498
2524
  //* Get the country data object.
2499
2525
  getCountryData: () => W,
2500
2526
  //* A getter for the plugin instance.
2501
2527
  getInstance: (y) => {
2502
- const $ = y.getAttribute("data-intl-tel-input-id");
2503
- return $ ? C.instances[$] : null;
2528
+ const e = y.getAttribute("data-intl-tel-input-id");
2529
+ return e ? C.instances[e] : null;
2504
2530
  },
2505
2531
  //* A map from instance ID to instance object.
2506
2532
  instances: {},
2507
2533
  attachUtils: H2,
2508
2534
  startedLoadingUtilsScript: !1,
2509
2535
  startedLoadingAutoCountry: !1,
2510
- version: "25.0.2"
2536
+ version: "25.1.0"
2511
2537
  }
2512
2538
  );
2513
2539
  (function() {
2514
2540
  var y = this || self;
2515
- function $(d, t) {
2541
+ function e(d, t) {
2516
2542
  d = d.split(".");
2517
- var e = y;
2518
- d[0] in e || typeof e.execScript > "u" || e.execScript("var " + d[0]);
2519
- for (var r; d.length && (r = d.shift()); ) d.length || t === void 0 ? e[r] && e[r] !== Object.prototype[r] ? e = e[r] : e = e[r] = {} : e[r] = t;
2543
+ var $ = y;
2544
+ d[0] in $ || typeof $.execScript > "u" || $.execScript("var " + d[0]);
2545
+ for (var i; d.length && (i = d.shift()); ) d.length || t === void 0 ? $[i] && $[i] !== Object.prototype[i] ? $ = $[i] : $ = $[i] = {} : $[i] = t;
2520
2546
  }
2521
2547
  function n(d, t) {
2522
- function e() {
2548
+ function $() {
2523
2549
  }
2524
- e.prototype = t.prototype, d.ma = t.prototype, d.prototype = new e(), d.prototype.constructor = d, d.sa = function(r, s, u) {
2525
- for (var a = Array(arguments.length - 2), h = 2; h < arguments.length; h++) a[h - 2] = arguments[h];
2526
- return t.prototype[s].apply(r, a);
2550
+ $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(i, s, u) {
2551
+ for (var l = Array(arguments.length - 2), h = 2; h < arguments.length; h++) l[h - 2] = arguments[h];
2552
+ return t.prototype[s].apply(i, l);
2527
2553
  };
2528
2554
  }
2529
- function i(d) {
2555
+ function r(d) {
2530
2556
  const t = [];
2531
- let e = 0;
2532
- for (const r in d) t[e++] = d[r];
2557
+ let $ = 0;
2558
+ for (const i in d) t[$++] = d[i];
2533
2559
  return t;
2534
2560
  }
2535
2561
  var o = class {
2536
2562
  constructor(d) {
2537
- if (l !== l) throw Error("SafeUrl is not meant to be built directly");
2563
+ if (a !== a) throw Error("SafeUrl is not meant to be built directly");
2538
2564
  this.g = d;
2539
2565
  }
2540
2566
  toString() {
2541
2567
  return this.g.toString();
2542
2568
  }
2543
- }, l = {};
2569
+ }, a = {};
2544
2570
  new o("about:invalid#zClosurez"), new o("about:blank");
2545
2571
  const c = {};
2546
- class f {
2572
+ class g {
2547
2573
  constructor() {
2548
2574
  if (c !== c) throw Error("SafeStyle is not meant to be built directly");
2549
2575
  }
@@ -2551,52 +2577,52 @@ const H2 = (y) => {
2551
2577
  return "";
2552
2578
  }
2553
2579
  }
2554
- new f();
2555
- const p = {};
2556
- class w {
2580
+ new g();
2581
+ const f = {};
2582
+ class S {
2557
2583
  constructor() {
2558
- if (p !== p) throw Error("SafeStyleSheet is not meant to be built directly");
2584
+ if (f !== f) throw Error("SafeStyleSheet is not meant to be built directly");
2559
2585
  }
2560
2586
  toString() {
2561
2587
  return "";
2562
2588
  }
2563
2589
  }
2564
- new w();
2565
- const I = {};
2566
- class S {
2590
+ new S();
2591
+ const _ = {};
2592
+ class b {
2567
2593
  constructor() {
2568
2594
  var t = y.trustedTypes && y.trustedTypes.emptyHTML || "";
2569
- if (I !== I) throw Error("SafeHtml is not meant to be built directly");
2595
+ if (_ !== _) throw Error("SafeHtml is not meant to be built directly");
2570
2596
  this.g = t;
2571
2597
  }
2572
2598
  toString() {
2573
2599
  return this.g.toString();
2574
2600
  }
2575
2601
  }
2576
- new S();
2577
- function A(d, t) {
2602
+ new b();
2603
+ function w(d, t) {
2578
2604
  switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
2579
2605
  case G:
2580
2606
  case F:
2581
2607
  case M:
2582
2608
  case x:
2583
2609
  case f1:
2584
- case T:
2585
- case _:
2610
+ case A:
2611
+ case I:
2586
2612
  this.o = !0;
2587
2613
  }
2588
2614
  this.j = t.defaultValue;
2589
2615
  }
2590
- var _ = 1, T = 2, G = 3, F = 4, M = 6, x = 16, f1 = 18;
2616
+ var I = 1, A = 2, G = 3, F = 4, M = 6, x = 16, f1 = 18;
2591
2617
  function v1(d, t) {
2592
2618
  for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
2593
- var e = t[d];
2594
- this.g[e.g] = e;
2619
+ var $ = t[d];
2620
+ this.g[$.g] = $;
2595
2621
  }
2596
2622
  }
2597
- function l2(d) {
2598
- return d = i(d.g), d.sort(function(t, e) {
2599
- return t.g - e.g;
2623
+ function a2(d) {
2624
+ return d = r(d.g), d.sort(function(t, $) {
2625
+ return t.g - $.g;
2600
2626
  }), d;
2601
2627
  }
2602
2628
  function R() {
@@ -2605,22 +2631,22 @@ const H2 = (y) => {
2605
2631
  R.prototype.has = function(d) {
2606
2632
  return B(this, d.g);
2607
2633
  }, R.prototype.get = function(d, t) {
2608
- return g(this, d.g, t);
2634
+ return p(this, d.g, t);
2609
2635
  }, R.prototype.set = function(d, t) {
2610
2636
  E(this, d.g, t);
2611
2637
  }, R.prototype.add = function(d, t) {
2612
2638
  w1(this, d.g, t);
2613
2639
  };
2614
2640
  function S1(d, t) {
2615
- for (var e = l2(d.m()), r = 0; r < e.length; r++) {
2616
- var s = e[r], u = s.g;
2641
+ for (var $ = a2(d.m()), i = 0; i < $.length; i++) {
2642
+ var s = $[i], u = s.g;
2617
2643
  if (B(t, u)) {
2618
2644
  d.g && delete d.g[s.g];
2619
- var a = s.h == 11 || s.h == 10;
2645
+ var l = s.h == 11 || s.h == 10;
2620
2646
  if (s.l) {
2621
2647
  s = P(t, u);
2622
- for (var h = 0; h < s.length; h++) w1(d, u, a ? s[h].clone() : s[h]);
2623
- } else s = n1(t, u), a ? (a = n1(d, u)) ? S1(a, s) : E(d, u, s.clone()) : E(d, u, s);
2648
+ for (var h = 0; h < s.length; h++) w1(d, u, l ? s[h].clone() : s[h]);
2649
+ } else s = n1(t, u), l ? (l = n1(d, u)) ? S1(l, s) : E(d, u, s.clone()) : E(d, u, s);
2624
2650
  }
2625
2651
  }
2626
2652
  }
@@ -2632,27 +2658,27 @@ const H2 = (y) => {
2632
2658
  return d.h[t] != null;
2633
2659
  }
2634
2660
  function n1(d, t) {
2635
- var e = d.h[t];
2636
- if (e == null) return null;
2661
+ var $ = d.h[t];
2662
+ if ($ == null) return null;
2637
2663
  if (d.l) {
2638
2664
  if (!(t in d.g)) {
2639
- var r = d.l, s = d.j[t];
2640
- if (e != null) if (s.l) {
2641
- for (var u = [], a = 0; a < e.length; a++) u[a] = r.h(s, e[a]);
2642
- e = u;
2643
- } else e = r.h(s, e);
2644
- return d.g[t] = e;
2665
+ var i = d.l, s = d.j[t];
2666
+ if ($ != null) if (s.l) {
2667
+ for (var u = [], l = 0; l < $.length; l++) u[l] = i.h(s, $[l]);
2668
+ $ = u;
2669
+ } else $ = i.h(s, $);
2670
+ return d.g[t] = $;
2645
2671
  }
2646
2672
  return d.g[t];
2647
2673
  }
2648
- return e;
2674
+ return $;
2649
2675
  }
2650
- function g(d, t, e) {
2651
- var r = n1(d, t);
2652
- return d.j[t].l ? r[e || 0] : r;
2676
+ function p(d, t, $) {
2677
+ var i = n1(d, t);
2678
+ return d.j[t].l ? i[$ || 0] : i;
2653
2679
  }
2654
2680
  function v(d, t) {
2655
- if (B(d, t)) d = g(d, t);
2681
+ if (B(d, t)) d = p(d, t);
2656
2682
  else d: {
2657
2683
  if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
2658
2684
  else if (t === Number) d.j = 0;
@@ -2671,16 +2697,16 @@ const H2 = (y) => {
2671
2697
  function K(d, t) {
2672
2698
  return d.j[t].l ? B(d, t) ? d.h[t].length : 0 : B(d, t) ? 1 : 0;
2673
2699
  }
2674
- function E(d, t, e) {
2675
- d.h[t] = e, d.g && (d.g[t] = e);
2700
+ function E(d, t, $) {
2701
+ d.h[t] = $, d.g && (d.g[t] = $);
2676
2702
  }
2677
- function w1(d, t, e) {
2678
- d.h[t] || (d.h[t] = []), d.h[t].push(e), d.g && delete d.g[t];
2703
+ function w1(d, t, $) {
2704
+ d.h[t] || (d.h[t] = []), d.h[t].push($), d.g && delete d.g[t];
2679
2705
  }
2680
2706
  function i1(d, t) {
2681
- var e = [], r;
2682
- for (r in t) r != 0 && e.push(new A(r, t[r]));
2683
- return new v1(d, e);
2707
+ var $ = [], i;
2708
+ for (i in t) i != 0 && $.push(new w(i, t[i]));
2709
+ return new v1(d, $);
2684
2710
  }
2685
2711
  function r1() {
2686
2712
  }
@@ -2708,63 +2734,63 @@ const H2 = (y) => {
2708
2734
  }, q.prototype.g = function(d, t) {
2709
2735
  return q.ma.g.call(this, d, t);
2710
2736
  };
2711
- function L(d, t) {
2737
+ function N(d, t) {
2712
2738
  d != null && this.g.apply(this, arguments);
2713
2739
  }
2714
- L.prototype.h = "", L.prototype.set = function(d) {
2740
+ N.prototype.h = "", N.prototype.set = function(d) {
2715
2741
  this.h = "" + d;
2716
- }, L.prototype.g = function(d, t, e) {
2717
- if (this.h += String(d), t != null) for (let r = 1; r < arguments.length; r++) this.h += arguments[r];
2742
+ }, N.prototype.g = function(d, t, $) {
2743
+ if (this.h += String(d), t != null) for (let i = 1; i < arguments.length; i++) this.h += arguments[i];
2718
2744
  return this;
2719
2745
  };
2720
2746
  function k(d) {
2721
2747
  d.h = "";
2722
2748
  }
2723
- L.prototype.toString = function() {
2749
+ N.prototype.toString = function() {
2724
2750
  return this.h;
2725
2751
  };
2726
2752
  function z() {
2727
2753
  R.call(this);
2728
2754
  }
2729
2755
  n(z, R);
2730
- var A1 = null;
2731
- function b() {
2756
+ var L1 = null;
2757
+ function L() {
2732
2758
  R.call(this);
2733
2759
  }
2734
- n(b, R);
2735
- var L1 = null;
2760
+ n(L, R);
2761
+ var N1 = null;
2736
2762
  function Z() {
2737
2763
  R.call(this);
2738
2764
  }
2739
2765
  n(Z, R);
2740
- var N1 = null;
2766
+ var T1 = null;
2741
2767
  z.prototype.m = function() {
2742
- var d = A1;
2743
- return d || (A1 = d = i1(z, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
2744
- }, z.m = z.prototype.m, b.prototype.m = function() {
2745
2768
  var d = L1;
2746
- return d || (L1 = d = i1(b, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
2747
- }, b.m = b.prototype.m, Z.prototype.m = function() {
2769
+ return d || (L1 = d = i1(z, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
2770
+ }, z.m = z.prototype.m, L.prototype.m = function() {
2748
2771
  var d = N1;
2749
- return d || (N1 = d = i1(Z, {
2772
+ return d || (N1 = d = i1(L, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
2773
+ }, L.m = L.prototype.m, Z.prototype.m = function() {
2774
+ var d = T1;
2775
+ return d || (T1 = d = i1(Z, {
2750
2776
  0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
2751
- 1: { name: "general_desc", i: 11, type: b },
2752
- 2: { name: "fixed_line", i: 11, type: b },
2753
- 3: { name: "mobile", i: 11, type: b },
2754
- 4: { name: "toll_free", i: 11, type: b },
2755
- 5: { name: "premium_rate", i: 11, type: b },
2756
- 6: { name: "shared_cost", i: 11, type: b },
2757
- 7: { name: "personal_number", i: 11, type: b },
2758
- 8: { name: "voip", i: 11, type: b },
2759
- 21: { name: "pager", i: 11, type: b },
2760
- 25: { name: "uan", i: 11, type: b },
2761
- 27: { name: "emergency", i: 11, type: b },
2762
- 28: { name: "voicemail", i: 11, type: b },
2763
- 29: { name: "short_code", i: 11, type: b },
2764
- 30: { name: "standard_rate", i: 11, type: b },
2765
- 31: { name: "carrier_specific", i: 11, type: b },
2766
- 33: { name: "sms_services", i: 11, type: b },
2767
- 24: { name: "no_international_dialling", i: 11, type: b },
2777
+ 1: { name: "general_desc", i: 11, type: L },
2778
+ 2: { name: "fixed_line", i: 11, type: L },
2779
+ 3: { name: "mobile", i: 11, type: L },
2780
+ 4: { name: "toll_free", i: 11, type: L },
2781
+ 5: { name: "premium_rate", i: 11, type: L },
2782
+ 6: { name: "shared_cost", i: 11, type: L },
2783
+ 7: { name: "personal_number", i: 11, type: L },
2784
+ 8: { name: "voip", i: 11, type: L },
2785
+ 21: { name: "pager", i: 11, type: L },
2786
+ 25: { name: "uan", i: 11, type: L },
2787
+ 27: { name: "emergency", i: 11, type: L },
2788
+ 28: { name: "voicemail", i: 11, type: L },
2789
+ 29: { name: "short_code", i: 11, type: L },
2790
+ 30: { name: "standard_rate", i: 11, type: L },
2791
+ 31: { name: "carrier_specific", i: 11, type: L },
2792
+ 33: { name: "sms_services", i: 11, type: L },
2793
+ 24: { name: "no_international_dialling", i: 11, type: L },
2768
2794
  9: { name: "id", required: !0, i: 9, type: String },
2769
2795
  10: { name: "country_code", i: 5, type: Number },
2770
2796
  11: { name: "international_prefix", i: 9, type: String },
@@ -2788,10 +2814,10 @@ const H2 = (y) => {
2788
2814
  R.call(this);
2789
2815
  }
2790
2816
  n(H, R);
2791
- var T1 = null, h2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2817
+ var A1 = null, h2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2792
2818
  H.prototype.m = function() {
2793
- var d = T1;
2794
- return d || (T1 = d = i1(H, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: h2 }, 7: {
2819
+ var d = A1;
2820
+ return d || (A1 = d = i1(H, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: h2 }, 7: {
2795
2821
  name: "preferred_domestic_carrier_code",
2796
2822
  i: 9,
2797
2823
  type: String
@@ -7987,8 +8013,8 @@ const H2 = (y) => {
7987
8013
  return d != null && (K(d, 9) != 1 || P(d, 9)[0] != -1);
7988
8014
  }
7989
8015
  function s1(d, t) {
7990
- for (var e = new L(), r, s = d.length, u = 0; u < s; ++u) r = d.charAt(u), r = t[r.toUpperCase()], r != null && e.g(r);
7991
- return e.toString();
8016
+ for (var $ = new N(), i, s = d.length, u = 0; u < s; ++u) i = d.charAt(u), i = t[i.toUpperCase()], i != null && $.g(i);
8017
+ return $.toString();
7992
8018
  }
7993
8019
  function O1(d) {
7994
8020
  return d.length == 0 || w2.test(d);
@@ -7997,122 +8023,122 @@ const H2 = (y) => {
7997
8023
  return d != null && isNaN(d) && d.toUpperCase() in E1;
7998
8024
  }
7999
8025
  D.prototype.format = function(d, t) {
8000
- if (g(d, 2) == 0 && B(d, 5)) {
8001
- var e = v(d, 5);
8002
- if (0 < e.length) return e;
8026
+ if (p(d, 2) == 0 && B(d, 5)) {
8027
+ var $ = v(d, 5);
8028
+ if (0 < $.length) return $;
8003
8029
  }
8004
- e = v(d, 1);
8005
- var r = t1(d);
8006
- if (t == 0) return G1(e, 0, r, "");
8007
- if (!(e in X)) return r;
8008
- var s = d1(this, e, e1(e));
8009
- d = B(d, 3) && g(d, 3).length != 0 ? t == 3 ? ";ext=" + g(d, 3) : B(s, 13) ? g(s, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
8030
+ $ = v(d, 1);
8031
+ var i = t1(d);
8032
+ if (t == 0) return G1($, 0, i, "");
8033
+ if (!($ in X)) return i;
8034
+ var s = d1(this, $, e1($));
8035
+ d = B(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : B(s, 13) ? p(s, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
8010
8036
  d: {
8011
8037
  s = P(s, 20).length == 0 || t == 2 ? P(s, 19) : P(s, 20);
8012
- for (var u, a = s.length, h = 0; h < a; ++h) {
8038
+ for (var u, l = s.length, h = 0; h < l; ++h) {
8013
8039
  u = s[h];
8014
8040
  var m = K(u, 3);
8015
- if ((m == 0 || r.search(g(u, 3, m - 1)) == 0) && (m = new RegExp(g(u, 1)), U(m, r))) {
8041
+ if ((m == 0 || i.search(p(u, 3, m - 1)) == 0) && (m = new RegExp(p(u, 1)), U(m, i))) {
8016
8042
  s = u;
8017
8043
  break d;
8018
8044
  }
8019
8045
  }
8020
8046
  s = null;
8021
8047
  }
8022
- return s != null && (a = s, s = v(a, 2), u = new RegExp(g(a, 1)), v(
8023
- a,
8048
+ return s != null && (l = s, s = v(l, 2), u = new RegExp(p(l, 1)), v(
8049
+ l,
8024
8050
  5
8025
- ), a = v(a, 4), r = t == 2 && a != null && 0 < a.length ? r.replace(u, s.replace(S2, a)) : r.replace(u, s), t == 3 && (r = r.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), r = r.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1(e, t, r, d);
8051
+ ), l = v(l, 4), i = t == 2 && l != null && 0 < l.length ? i.replace(u, s.replace(S2, l)) : i.replace(u, s), t == 3 && (i = i.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), i = i.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1($, t, i, d);
8026
8052
  };
8027
- function d1(d, t, e) {
8028
- return e == "001" ? j(d, "" + t) : j(d, e);
8053
+ function d1(d, t, $) {
8054
+ return $ == "001" ? j(d, "" + t) : j(d, $);
8029
8055
  }
8030
8056
  function t1(d) {
8031
8057
  if (!B(d, 2)) return "";
8032
- var t = "" + g(d, 2);
8033
- return B(d, 4) && g(d, 4) && 0 < v(d, 8) ? Array(v(d, 8) + 1).join("0") + t : t;
8058
+ var t = "" + p(d, 2);
8059
+ return B(d, 4) && p(d, 4) && 0 < v(d, 8) ? Array(v(d, 8) + 1).join("0") + t : t;
8034
8060
  }
8035
- function G1(d, t, e, r) {
8061
+ function G1(d, t, $, i) {
8036
8062
  switch (t) {
8037
8063
  case 0:
8038
- return "+" + d + e + r;
8064
+ return "+" + d + $ + i;
8039
8065
  case 1:
8040
- return "+" + d + " " + e + r;
8066
+ return "+" + d + " " + $ + i;
8041
8067
  case 3:
8042
- return "tel:+" + d + "-" + e + r;
8068
+ return "tel:+" + d + "-" + $ + i;
8043
8069
  default:
8044
- return e + r;
8070
+ return $ + i;
8045
8071
  }
8046
8072
  }
8047
8073
  function u1(d, t) {
8048
8074
  switch (t) {
8049
8075
  case 4:
8050
- return g(d, 5);
8076
+ return p(d, 5);
8051
8077
  case 3:
8052
- return g(d, 4);
8078
+ return p(d, 4);
8053
8079
  case 1:
8054
- return g(d, 3);
8080
+ return p(d, 3);
8055
8081
  case 0:
8056
8082
  case 2:
8057
- return g(d, 2);
8083
+ return p(d, 2);
8058
8084
  case 5:
8059
- return g(d, 6);
8085
+ return p(d, 6);
8060
8086
  case 6:
8061
- return g(d, 8);
8087
+ return p(d, 8);
8062
8088
  case 7:
8063
- return g(d, 7);
8089
+ return p(d, 7);
8064
8090
  case 8:
8065
- return g(d, 21);
8091
+ return p(d, 21);
8066
8092
  case 9:
8067
- return g(d, 25);
8093
+ return p(d, 25);
8068
8094
  case 10:
8069
- return g(d, 28);
8095
+ return p(d, 28);
8070
8096
  default:
8071
- return g(d, 1);
8097
+ return p(d, 1);
8072
8098
  }
8073
8099
  }
8074
8100
  function F1(d, t) {
8075
- var e = U1(d, t);
8076
- return d = d1(d, v(t, 1), e), d == null ? -1 : (t = t1(t), C1(t, d));
8101
+ var $ = U1(d, t);
8102
+ return d = d1(d, v(t, 1), $), d == null ? -1 : (t = t1(t), C1(t, d));
8077
8103
  }
8078
8104
  function C1(d, t) {
8079
- return O(d, g(t, 1)) ? O(d, g(t, 5)) ? 4 : O(d, g(t, 4)) ? 3 : O(d, g(t, 6)) ? 5 : O(d, g(t, 8)) ? 6 : O(d, g(t, 7)) ? 7 : O(d, g(t, 21)) ? 8 : O(d, g(t, 25)) ? 9 : O(d, g(t, 28)) ? 10 : O(d, g(t, 2)) ? g(t, 18) || O(d, g(t, 3)) ? 2 : 0 : !g(t, 18) && O(d, g(t, 3)) ? 1 : -1 : -1;
8105
+ return O(d, p(t, 1)) ? O(d, p(t, 5)) ? 4 : O(d, p(t, 4)) ? 3 : O(d, p(t, 6)) ? 5 : O(d, p(t, 8)) ? 6 : O(d, p(t, 7)) ? 7 : O(d, p(t, 21)) ? 8 : O(d, p(t, 25)) ? 9 : O(d, p(t, 28)) ? 10 : O(d, p(t, 2)) ? p(t, 18) || O(d, p(t, 3)) ? 2 : 0 : !p(t, 18) && O(d, p(t, 3)) ? 1 : -1 : -1;
8080
8106
  }
8081
8107
  function j(d, t) {
8082
8108
  if (t == null) return null;
8083
8109
  t = t.toUpperCase();
8084
- var e = d.g[t];
8085
- if (e == null) {
8086
- if (e = E1[t], e == null) return null;
8087
- e = new q().g(Z.m(), e), d.g[t] = e;
8110
+ var $ = d.g[t];
8111
+ if ($ == null) {
8112
+ if ($ = E1[t], $ == null) return null;
8113
+ $ = new q().g(Z.m(), $), d.g[t] = $;
8088
8114
  }
8089
- return e;
8115
+ return $;
8090
8116
  }
8091
8117
  function O(d, t) {
8092
- var e = d.length;
8093
- return 0 < K(t, 9) && P(t, 9).indexOf(e) == -1 ? !1 : U(v(t, 2), d);
8118
+ var $ = d.length;
8119
+ return 0 < K(t, 9) && P(t, 9).indexOf($) == -1 ? !1 : U(v(t, 2), d);
8094
8120
  }
8095
8121
  function b2(d, t) {
8096
- var e = U1(d, t), r = v(t, 1), s = d1(d, r, e);
8097
- return s == null || e != "001" && r != V1(d, e) ? s = !1 : (d = t1(t), s = C1(d, s) != -1), s;
8122
+ var $ = U1(d, t), i = v(t, 1), s = d1(d, i, $);
8123
+ return s == null || $ != "001" && i != V1(d, $) ? s = !1 : (d = t1(t), s = C1(d, s) != -1), s;
8098
8124
  }
8099
8125
  function U1(d, t) {
8100
8126
  if (t == null) return null;
8101
- var e = v(t, 1);
8102
- if (e = X[e], e == null) d = null;
8103
- else if (e.length == 1) d = e[0];
8127
+ var $ = v(t, 1);
8128
+ if ($ = X[$], $ == null) d = null;
8129
+ else if ($.length == 1) d = $[0];
8104
8130
  else d: {
8105
8131
  t = t1(t);
8106
- for (var r, s = e.length, u = 0; u < s; u++) {
8107
- r = e[u];
8108
- var a = j(d, r);
8109
- if (B(a, 23)) {
8110
- if (t.search(g(a, 23)) == 0) {
8111
- d = r;
8132
+ for (var i, s = $.length, u = 0; u < s; u++) {
8133
+ i = $[u];
8134
+ var l = j(d, i);
8135
+ if (B(l, 23)) {
8136
+ if (t.search(p(l, 23)) == 0) {
8137
+ d = i;
8112
8138
  break d;
8113
8139
  }
8114
- } else if (C1(t, a) != -1) {
8115
- d = r;
8140
+ } else if (C1(t, l) != -1) {
8141
+ d = i;
8116
8142
  break d;
8117
8143
  }
8118
8144
  }
@@ -8127,144 +8153,144 @@ const H2 = (y) => {
8127
8153
  if (d = j(d, t), d == null) throw Error("Invalid region code: " + t);
8128
8154
  return v(d, 10);
8129
8155
  }
8130
- function a1(d, t, e, r) {
8131
- var s = u1(e, r), u = K(s, 9) == 0 ? P(g(e, 1), 9) : P(s, 9);
8132
- if (s = P(s, 10), r == 2) if (k1(u1(e, 0))) d = u1(e, 1), k1(d) && (u = u.concat(K(d, 9) == 0 ? P(g(e, 1), 9) : P(d, 9)), u.sort(), s.length == 0 ? s = P(d, 10) : (s = s.concat(P(d, 10)), s.sort()));
8133
- else return a1(d, t, e, 1);
8134
- return u[0] == -1 ? 5 : (t = t.length, -1 < s.indexOf(t) ? 4 : (e = u[0], e == t ? 0 : e > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
8156
+ function l1(d, t, $, i) {
8157
+ var s = u1($, i), u = K(s, 9) == 0 ? P(p($, 1), 9) : P(s, 9);
8158
+ if (s = P(s, 10), i == 2) if (k1(u1($, 0))) d = u1($, 1), k1(d) && (u = u.concat(K(d, 9) == 0 ? P(p($, 1), 9) : P(d, 9)), u.sort(), s.length == 0 ? s = P(d, 10) : (s = s.concat(P(d, 10)), s.sort()));
8159
+ else return l1(d, t, $, 1);
8160
+ return u[0] == -1 ? 5 : (t = t.length, -1 < s.indexOf(t) ? 4 : ($ = u[0], $ == t ? 0 : $ > t ? 2 : u[u.length - 1] < t ? 3 : -1 < u.indexOf(t, 1) ? 0 : 5));
8135
8161
  }
8136
- function l1(d, t, e) {
8137
- var r = t1(t);
8138
- return t = v(t, 1), t in X ? (t = d1(d, t, e1(t)), a1(d, r, t, e)) : 1;
8162
+ function a1(d, t, $) {
8163
+ var i = t1(t);
8164
+ return t = v(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, i, t, $)) : 1;
8139
8165
  }
8140
8166
  function K1(d, t) {
8141
8167
  if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
8142
- for (var e, r = d.length, s = 1; 3 >= s && s <= r; ++s) if (e = parseInt(d.substring(0, s), 10), e in X) return t.g(d.substring(s)), e;
8168
+ for (var $, i = d.length, s = 1; 3 >= s && s <= i; ++s) if ($ = parseInt(d.substring(0, s), 10), $ in X) return t.g(d.substring(s)), $;
8143
8169
  return 0;
8144
8170
  }
8145
- function H1(d, t, e, r, s, u) {
8171
+ function H1(d, t, $, i, s, u) {
8146
8172
  if (t.length == 0) return 0;
8147
- t = new L(t);
8148
- var a;
8149
- e != null && (a = g(e, 11)), a == null && (a = "NonMatch");
8173
+ t = new N(t);
8174
+ var l;
8175
+ $ != null && (l = p($, 11)), l == null && (l = "NonMatch");
8150
8176
  var h = t.toString();
8151
- if (h.length == 0) a = 20;
8152
- else if (Q.test(h)) h = h.replace(Q, ""), k(t), t.g(R1(h)), a = 1;
8177
+ if (h.length == 0) l = 20;
8178
+ else if (Q.test(h)) h = h.replace(Q, ""), k(t), t.g(R1(h)), l = 1;
8153
8179
  else {
8154
- if (h = new RegExp(a), B1(t), a = t.toString(), a.search(h) == 0) {
8155
- h = a.match(h)[0].length;
8156
- var m = a.substring(h).match(D1);
8157
- m && m[1] != null && 0 < m[1].length && s1(m[1], g1) == "0" ? a = !1 : (k(t), t.g(a.substring(h)), a = !0);
8158
- } else a = !1;
8159
- a = a ? 5 : 20;
8180
+ if (h = new RegExp(l), B1(t), l = t.toString(), l.search(h) == 0) {
8181
+ h = l.match(h)[0].length;
8182
+ var m = l.substring(h).match(D1);
8183
+ m && m[1] != null && 0 < m[1].length && s1(m[1], g1) == "0" ? l = !1 : (k(t), t.g(l.substring(h)), l = !0);
8184
+ } else l = !1;
8185
+ l = l ? 5 : 20;
8160
8186
  }
8161
- if (s && E(u, 6, a), a != 20) {
8187
+ if (s && E(u, 6, l), l != 20) {
8162
8188
  if (2 >= t.h.length) throw Error("Phone number too short after IDD");
8163
- if (d = K1(t, r), d != 0) return E(u, 1, d), d;
8189
+ if (d = K1(t, i), d != 0) return E(u, 1, d), d;
8164
8190
  throw Error("Invalid country calling code");
8165
8191
  }
8166
- return e != null && (a = v(e, 10), h = "" + a, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new L(m.substring(h.length)), m = g(e, 1), m = new RegExp(v(m, 2)), j1(h, e, null), h = h.toString(), !U(m, t.toString()) && U(m, h) || a1(d, t.toString(), e, -1) == 3)) ? (r.g(h), s && E(u, 6, 10), E(u, 1, a), a) : (E(u, 1, 0), 0);
8192
+ return $ != null && (l = v($, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new N(m.substring(h.length)), m = p($, 1), m = new RegExp(v(m, 2)), j1(h, $, null), h = h.toString(), !U(m, t.toString()) && U(m, h) || l1(d, t.toString(), $, -1) == 3)) ? (i.g(h), s && E(u, 6, 10), E(u, 1, l), l) : (E(u, 1, 0), 0);
8167
8193
  }
8168
- function j1(d, t, e) {
8169
- var r = d.toString(), s = r.length, u = g(t, 15);
8194
+ function j1(d, t, $) {
8195
+ var i = d.toString(), s = i.length, u = p(t, 15);
8170
8196
  if (s != 0 && u != null && u.length != 0) {
8171
- var a = new RegExp("^(?:" + u + ")");
8172
- if (s = a.exec(r)) {
8173
- u = new RegExp(v(g(t, 1), 2));
8174
- var h = U(u, r), m = s.length - 1;
8175
- t = g(t, 16), t == null || t.length == 0 || s[m] == null || s[m].length == 0 ? (!h || U(u, r.substring(s[0].length))) && (e != null && 0 < m && s[m] != null && e.g(s[1]), d.set(r.substring(s[0].length))) : (r = r.replace(a, t), (!h || U(u, r)) && (e != null && 0 < m && e.g(s[1]), d.set(r)));
8197
+ var l = new RegExp("^(?:" + u + ")");
8198
+ if (s = l.exec(i)) {
8199
+ u = new RegExp(v(p(t, 1), 2));
8200
+ var h = U(u, i), m = s.length - 1;
8201
+ t = p(t, 16), t == null || t.length == 0 || s[m] == null || s[m].length == 0 ? (!h || U(u, i.substring(s[0].length))) && ($ != null && 0 < m && s[m] != null && $.g(s[1]), d.set(i.substring(s[0].length))) : (i = i.replace(l, t), (!h || U(u, i)) && ($ != null && 0 < m && $.g(s[1]), d.set(i)));
8176
8202
  }
8177
8203
  }
8178
8204
  }
8179
- function Y(d, t, e) {
8180
- if (!o1(e) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8181
- return W1(d, t, e, !0);
8205
+ function Y(d, t, $) {
8206
+ if (!o1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8207
+ return W1(d, t, $, !0);
8182
8208
  }
8183
- function W1(d, t, e, r) {
8209
+ function W1(d, t, $, i) {
8184
8210
  if (t == null) throw Error("The string supplied did not seem to be a phone number");
8185
8211
  if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
8186
- var s = new L(), u = t.indexOf(";phone-context=");
8212
+ var s = new N(), u = t.indexOf(";phone-context=");
8187
8213
  if (u === -1) u = null;
8188
8214
  else if (u += 15, u >= t.length) u = "";
8189
8215
  else {
8190
- var a = t.indexOf(";", u);
8191
- u = a !== -1 ? t.substring(u, a) : t.substring(u);
8216
+ var l = t.indexOf(";", u);
8217
+ u = l !== -1 ? t.substring(u, l) : t.substring(u);
8192
8218
  }
8193
8219
  var h = u;
8194
- if (h == null ? a = !0 : h.length === 0 ? a = !1 : (a = _2.exec(h), h = I2.exec(h), a = a !== null || h !== null), !a || (u != null ? (u.charAt(0) === "+" && s.g(u), u = t.indexOf("tel:"), s.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = s.g, a = t ?? "", h = a.search(g2), 0 <= h ? (a = a.substring(h), a = a.replace(m2, ""), h = a.search(C2), 0 <= h && (a = a.substring(0, h))) : a = "", u.call(s, a)), u = s.toString(), a = u.indexOf(";isub="), 0 < a && (k(s), s.g(u.substring(0, a))), !x1(s.toString()))) throw Error("The string supplied did not seem to be a phone number");
8195
- if (u = s.toString(), !(o1(e) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
8196
- u = new H(), r && E(u, 5, t);
8220
+ if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = _2.exec(h), h = I2.exec(h), l = l !== null || h !== null), !l || (u != null ? (u.charAt(0) === "+" && s.g(u), u = t.indexOf("tel:"), s.g(t.substring(0 <= u ? u + 4 : 0, t.indexOf(";phone-context=")))) : (u = s.g, l = t ?? "", h = l.search(g2), 0 <= h ? (l = l.substring(h), l = l.replace(m2, ""), h = l.search(C2), 0 <= h && (l = l.substring(0, h))) : l = "", u.call(s, l)), u = s.toString(), l = u.indexOf(";isub="), 0 < l && (k(s), s.g(u.substring(0, l))), !x1(s.toString()))) throw Error("The string supplied did not seem to be a phone number");
8221
+ if (u = s.toString(), !(o1($) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
8222
+ u = new H(), i && E(u, 5, t);
8197
8223
  d: {
8198
- if (t = s.toString(), a = t.search(P1), 0 <= a && x1(t.substring(0, a))) {
8224
+ if (t = s.toString(), l = t.search(P1), 0 <= l && x1(t.substring(0, l))) {
8199
8225
  h = t.match(P1);
8200
8226
  for (var m = h.length, V = 1; V < m; ++V) if (h[V] != null && 0 < h[V].length) {
8201
- k(s), s.g(t.substring(0, a)), t = h[V];
8227
+ k(s), s.g(t.substring(0, l)), t = h[V];
8202
8228
  break d;
8203
8229
  }
8204
8230
  }
8205
8231
  t = "";
8206
8232
  }
8207
- 0 < t.length && E(u, 3, t), a = j(d, e), t = new L(), h = 0, m = s.toString();
8233
+ 0 < t.length && E(u, 3, t), l = j(d, $), t = new N(), h = 0, m = s.toString();
8208
8234
  try {
8209
- h = H1(d, m, a, t, r, u);
8235
+ h = H1(d, m, l, t, i, u);
8210
8236
  } catch (_1) {
8211
8237
  if (_1.message == "Invalid country calling code" && Q.test(m)) {
8212
- if (m = m.replace(Q, ""), h = H1(d, m, a, t, r, u), h == 0) throw _1;
8238
+ if (m = m.replace(Q, ""), h = H1(d, m, l, t, i, u), h == 0) throw _1;
8213
8239
  } else throw _1;
8214
8240
  }
8215
- if (h != 0 ? (s = e1(h), s != e && (a = d1(d, h, s))) : (B1(s), t.g(s.toString()), e != null ? (h = v(a, 10), E(
8241
+ if (h != 0 ? (s = e1(h), s != $ && (l = d1(d, h, s))) : (B1(s), t.g(s.toString()), $ != null ? (h = v(l, 10), E(
8216
8242
  u,
8217
8243
  1,
8218
8244
  h
8219
- )) : r && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (a != null && (e = new L(), s = new L(t.toString()), j1(s, a, e), d = a1(d, s.toString(), a, -1), d != 2 && d != 4 && d != 5 && (t = s, r && 0 < e.toString().length && E(u, 7, e.toString()))), r = t.toString(), d = r.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8245
+ )) : i && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (l != null && ($ = new N(), s = new N(t.toString()), j1(s, l, $), d = l1(d, s.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = s, i && 0 < $.toString().length && E(u, 7, $.toString()))), i = t.toString(), d = i.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8220
8246
  if (17 < d) throw Error("The string supplied is too long to be a phone number");
8221
- if (1 < r.length && r.charAt(0) == "0") {
8222
- for (E(u, 4, !0), d = 1; d < r.length - 1 && r.charAt(d) == "0"; ) d++;
8247
+ if (1 < i.length && i.charAt(0) == "0") {
8248
+ for (E(u, 4, !0), d = 1; d < i.length - 1 && i.charAt(d) == "0"; ) d++;
8223
8249
  d != 1 && E(u, 8, d);
8224
8250
  }
8225
- return E(u, 2, parseInt(r, 10)), u;
8251
+ return E(u, 2, parseInt(i, 10)), u;
8226
8252
  }
8227
8253
  function U(d, t) {
8228
8254
  return !!((d = typeof d == "string" ? t.match("^(?:" + d + ")$") : t.match(d)) && d[0].length == t.length);
8229
8255
  }
8230
- function A2(d) {
8231
- this.fa = RegExp(" "), this.ja = "", this.v = new L(), this.da = "", this.s = new L(), this.ba = new L(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new L(), this.ha = !1, this.o = "", this.g = new L(), this.j = [], this.ka = d, this.l = Y1(this, this.ka);
8256
+ function L2(d) {
8257
+ this.fa = RegExp(" "), this.ja = "", this.v = new N(), this.da = "", this.s = new N(), this.ba = new N(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new N(), this.ha = !1, this.o = "", this.g = new N(), this.j = [], this.ka = d, this.l = Y1(this, this.ka);
8232
8258
  }
8233
8259
  var z1 = new Z();
8234
8260
  E(z1, 11, "NA");
8235
- var L2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), Z1 = /[- ]/;
8261
+ var N2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), Z1 = /[- ]/;
8236
8262
  function Y1(d, t) {
8237
- var e = d.ga;
8238
- return t = o1(t) ? V1(e, t) : 0, d = j(d.ga, e1(t)), d ?? z1;
8263
+ var $ = d.ga;
8264
+ return t = o1(t) ? V1($, t) : 0, d = j(d.ga, e1(t)), d ?? z1;
8239
8265
  }
8240
8266
  function J1(d) {
8241
- for (var t = d.j.length, e = 0; e < t; ++e) {
8242
- var r = d.j[e], s = v(r, 1);
8267
+ for (var t = d.j.length, $ = 0; $ < t; ++$) {
8268
+ var i = d.j[$], s = v(i, 1);
8243
8269
  if (d.da == s) return !1;
8244
- var u = d, a = r, h = v(a, 1);
8270
+ var u = d, l = i, h = v(l, 1);
8245
8271
  k(u.v);
8246
8272
  var m = u;
8247
- a = v(a, 2);
8273
+ l = v(l, 2);
8248
8274
  var V = "999999999999999".match(h)[0];
8249
- if (V.length < m.g.h.length ? m = "" : (m = V.replace(new RegExp(h, "g"), a), m = m.replace(RegExp("9", "g"), " ")), 0 < m.length ? (u.v.g(m), u = !0) : u = !1, u) return d.da = s, d.ha = Z1.test(g(r, 4)), d.$ = 0, !0;
8275
+ if (V.length < m.g.h.length ? m = "" : (m = V.replace(new RegExp(h, "g"), l), m = m.replace(RegExp("9", "g"), " ")), 0 < m.length ? (u.v.g(m), u = !0) : u = !1, u) return d.da = s, d.ha = Z1.test(p(i, 4)), d.$ = 0, !0;
8250
8276
  }
8251
8277
  return d.u = !1;
8252
8278
  }
8253
8279
  function q1(d, t) {
8254
- for (var e = [], r = t.length - 3, s = d.j.length, u = 0; u < s; ++u) {
8255
- var a = d.j[u];
8256
- K(a, 3) == 0 ? e.push(d.j[u]) : (a = g(a, 3, Math.min(r, K(a, 3) - 1)), t.search(a) == 0 && e.push(d.j[u]));
8280
+ for (var $ = [], i = t.length - 3, s = d.j.length, u = 0; u < s; ++u) {
8281
+ var l = d.j[u];
8282
+ K(l, 3) == 0 ? $.push(d.j[u]) : (l = p(l, 3, Math.min(i, K(l, 3) - 1)), t.search(l) == 0 && $.push(d.j[u]));
8257
8283
  }
8258
- d.j = e;
8284
+ d.j = $;
8259
8285
  }
8260
- function N2(d, t) {
8286
+ function T2(d, t) {
8261
8287
  d.s.g(t);
8262
- var e = t;
8263
- if (D1.test(e) || d.s.h.length == 1 && p2.test(e) ? (t == "+" ? (e = t, d.ba.g(t)) : (e = g1[t], d.ba.g(e), d.g.g(e)), t = e) : (d.u = !1, d.la = !0), !d.u) {
8288
+ var $ = t;
8289
+ if (D1.test($) || d.s.h.length == 1 && p2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = g1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
8264
8290
  if (!d.la) {
8265
8291
  if (e2(d)) {
8266
8292
  if ($2(d)) return X1(d);
8267
- } else if (0 < d.o.length && (t = d.g.toString(), k(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), e = t.lastIndexOf(d.o), k(d.h), d.h.g(t.substring(0, e))), d.o != t2(d)) return d.h.g(" "), X1(d);
8293
+ } else if (0 < d.o.length && (t = d.g.toString(), k(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), k(d.h), d.h.g(t.substring(0, $))), d.o != t2(d)) return d.h.g(" "), X1(d);
8268
8294
  }
8269
8295
  return d.s.toString();
8270
8296
  }
@@ -8277,93 +8303,93 @@ const H2 = (y) => {
8277
8303
  if (e2(d)) d.ea = !0;
8278
8304
  else return d.o = t2(d), m1(d);
8279
8305
  default:
8280
- return d.ea ? ($2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = n2(d, t), e = Q1(d), 0 < e.length ? e : (q1(d, d.g.toString()), J1(d) ? d2(d) : d.u ? h1(d, t) : d.s.toString())) : m1(d);
8306
+ return d.ea ? ($2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = n2(d, t), $ = Q1(d), 0 < $.length ? $ : (q1(d, d.g.toString()), J1(d) ? d2(d) : d.u ? h1(d, t) : d.s.toString())) : m1(d);
8281
8307
  }
8282
8308
  }
8283
8309
  function X1(d) {
8284
8310
  return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, k(d.v), d.da = "", m1(d);
8285
8311
  }
8286
8312
  function Q1(d) {
8287
- for (var t = d.g.toString(), e = d.j.length, r = 0; r < e; ++r) {
8288
- var s = d.j[r], u = v(s, 1);
8289
- if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = Z1.test(g(s, 4)), s = t.replace(new RegExp(u, "g"), g(s, 2)), s = h1(d, s), s1(s, c2) == d.ba)) return s;
8313
+ for (var t = d.g.toString(), $ = d.j.length, i = 0; i < $; ++i) {
8314
+ var s = d.j[i], u = v(s, 1);
8315
+ if (new RegExp("^(?:" + u + ")$").test(t) && (d.ha = Z1.test(p(s, 4)), s = t.replace(new RegExp(u, "g"), p(s, 2)), s = h1(d, s), s1(s, c2) == d.ba)) return s;
8290
8316
  }
8291
8317
  return "";
8292
8318
  }
8293
8319
  function h1(d, t) {
8294
- var e = d.h.h.length;
8295
- return d.ha && 0 < e && d.h.toString().charAt(e - 1) != " " ? d.h + " " + t : d.h + t;
8320
+ var $ = d.h.h.length;
8321
+ return d.ha && 0 < $ && d.h.toString().charAt($ - 1) != " " ? d.h + " " + t : d.h + t;
8296
8322
  }
8297
8323
  function m1(d) {
8298
8324
  var t = d.g.toString();
8299
8325
  if (3 <= t.length) {
8300
- for (var e = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), r = e.length, s = 0; s < r; ++s) {
8301
- var u = e[s];
8302
- 0 < d.o.length && O1(v(u, 4)) && !g(u, 6) && !B(u, 5) || (d.o.length != 0 || d.ca || O1(v(u, 4)) || g(u, 6)) && L2.test(v(u, 2)) && d.j.push(u);
8326
+ for (var $ = d.ca && d.o.length == 0 && 0 < K(d.l, 20) ? P(d.l, 20) : P(d.l, 19), i = $.length, s = 0; s < i; ++s) {
8327
+ var u = $[s];
8328
+ 0 < d.o.length && O1(v(u, 4)) && !p(u, 6) && !B(u, 5) || (d.o.length != 0 || d.ca || O1(v(u, 4)) || p(u, 6)) && N2.test(v(u, 2)) && d.j.push(u);
8303
8329
  }
8304
8330
  return q1(d, t), t = Q1(d), 0 < t.length ? t : J1(d) ? d2(d) : d.s.toString();
8305
8331
  }
8306
8332
  return h1(d, t);
8307
8333
  }
8308
8334
  function d2(d) {
8309
- var t = d.g.toString(), e = t.length;
8310
- if (0 < e) {
8311
- for (var r = "", s = 0; s < e; s++) r = n2(d, t.charAt(s));
8312
- return d.u ? h1(d, r) : d.s.toString();
8335
+ var t = d.g.toString(), $ = t.length;
8336
+ if (0 < $) {
8337
+ for (var i = "", s = 0; s < $; s++) i = n2(d, t.charAt(s));
8338
+ return d.u ? h1(d, i) : d.s.toString();
8313
8339
  }
8314
8340
  return d.h.toString();
8315
8341
  }
8316
8342
  function t2(d) {
8317
- var t = d.g.toString(), e = 0;
8318
- if (g(d.l, 10) != 1) var r = !1;
8319
- else r = d.g.toString(), r = r.charAt(0) == "1" && r.charAt(1) != "0" && r.charAt(1) != "1";
8320
- return r ? (e = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (r = new RegExp("^(?:" + g(d.l, 15) + ")"), r = t.match(r), r != null && r[0] != null && 0 < r[0].length && (d.ca = !0, e = r[0].length, d.h.g(t.substring(0, e)))), k(d.g), d.g.g(t.substring(e)), t.substring(0, e);
8343
+ var t = d.g.toString(), $ = 0;
8344
+ if (p(d.l, 10) != 1) var i = !1;
8345
+ else i = d.g.toString(), i = i.charAt(0) == "1" && i.charAt(1) != "0" && i.charAt(1) != "1";
8346
+ return i ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : B(d.l, 15) && (i = new RegExp("^(?:" + p(d.l, 15) + ")"), i = t.match(i), i != null && i[0] != null && 0 < i[0].length && (d.ca = !0, $ = i[0].length, d.h.g(t.substring(0, $)))), k(d.g), d.g.g(t.substring($)), t.substring(0, $);
8321
8347
  }
8322
8348
  function e2(d) {
8323
- var t = d.ba.toString(), e = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
8324
- return e = t.match(e), e != null && e[0] != null && 0 < e[0].length ? (d.ca = !0, e = e[0].length, k(d.g), d.g.g(t.substring(e)), k(d.h), d.h.g(t.substring(0, e)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8349
+ var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + p(d.l, 11) + ")");
8350
+ return $ = t.match($), $ != null && $[0] != null && 0 < $[0].length ? (d.ca = !0, $ = $[0].length, k(d.g), d.g.g(t.substring($)), k(d.h), d.h.g(t.substring(0, $)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8325
8351
  }
8326
8352
  function $2(d) {
8327
8353
  if (d.g.h.length == 0) return !1;
8328
- var t = new L(), e = K1(d.g, t);
8329
- return e == 0 ? !1 : (k(d.g), d.g.g(t.toString()), t = e1(e), t == "001" ? d.l = j(d.ga, "" + e) : t != d.ka && (d.l = Y1(d, t)), d.h.g("" + e).g(" "), d.o = "", !0);
8354
+ var t = new N(), $ = K1(d.g, t);
8355
+ return $ == 0 ? !1 : (k(d.g), d.g.g(t.toString()), t = e1($), t == "001" ? d.l = j(d.ga, "" + $) : t != d.ka && (d.l = Y1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
8330
8356
  }
8331
8357
  function n2(d, t) {
8332
- var e = d.v.toString();
8333
- if (0 <= e.substring(d.$).search(d.fa)) {
8334
- var r = e.search(d.fa);
8335
- return t = e.replace(d.fa, t), k(d.v), d.v.g(t), d.$ = r, t.substring(0, d.$ + 1);
8358
+ var $ = d.v.toString();
8359
+ if (0 <= $.substring(d.$).search(d.fa)) {
8360
+ var i = $.search(d.fa);
8361
+ return t = $.replace(d.fa, t), k(d.v), d.v.g(t), d.$ = i, t.substring(0, d.$ + 1);
8336
8362
  }
8337
8363
  return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
8338
8364
  }
8339
8365
  const y1 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
8340
- $("intlTelInputUtilsTemp", {}), $("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
8366
+ e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
8341
8367
  try {
8342
- const e = d.replace(/[^+0-9]/g, ""), r = new A2(t);
8368
+ const $ = d.replace(/[^+0-9]/g, ""), i = new L2(t);
8343
8369
  t = "";
8344
- for (let s = 0; s < e.length; s++) r.ja = N2(r, e.charAt(s)), t = r.ja;
8370
+ for (let s = 0; s < $.length; s++) i.ja = T2(i, $.charAt(s)), t = i.ja;
8345
8371
  return t;
8346
8372
  } catch {
8347
8373
  return d;
8348
8374
  }
8349
- }), $("intlTelInputUtilsTemp.formatNumber", (d, t, e) => {
8375
+ }), e("intlTelInputUtilsTemp.formatNumber", (d, t, $) => {
8350
8376
  try {
8351
8377
  const s = D.g(), u = Y(s, d, t);
8352
- var r = l1(s, u, -1);
8353
- return r == 0 || r == 4 ? s.format(u, typeof e > "u" ? 0 : e) : d;
8378
+ var i = a1(s, u, -1);
8379
+ return i == 0 || i == 4 ? s.format(u, typeof $ > "u" ? 0 : $) : d;
8354
8380
  } catch {
8355
8381
  return d;
8356
8382
  }
8357
- }), $("intlTelInputUtilsTemp.getExampleNumber", (d, t, e, r) => {
8383
+ }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, i) => {
8358
8384
  try {
8359
8385
  const m = D.g();
8360
8386
  d: {
8361
8387
  var s = m;
8362
8388
  if (o1(d)) {
8363
- var u = u1(j(s, d), e);
8389
+ var u = u1(j(s, d), $);
8364
8390
  try {
8365
8391
  if (B(u, 6)) {
8366
- var a = g(u, 6), h = W1(s, a, d, !1);
8392
+ var l = p(u, 6), h = W1(s, l, d, !1);
8367
8393
  break d;
8368
8394
  }
8369
8395
  } catch {
@@ -8371,61 +8397,61 @@ const H2 = (y) => {
8371
8397
  }
8372
8398
  h = null;
8373
8399
  }
8374
- return m.format(h, r ? 0 : t ? 2 : 1);
8400
+ return m.format(h, i ? 0 : t ? 2 : 1);
8375
8401
  } catch {
8376
8402
  return "";
8377
8403
  }
8378
- }), $("intlTelInputUtilsTemp.getExtension", (d, t) => {
8404
+ }), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
8379
8405
  try {
8380
- return g(Y(D.g(), d, t), 3);
8406
+ return p(Y(D.g(), d, t), 3);
8381
8407
  } catch {
8382
8408
  return "";
8383
8409
  }
8384
- }), $("intlTelInputUtilsTemp.getNumberType", (d, t) => {
8410
+ }), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
8385
8411
  try {
8386
- const e = D.g(), r = Y(e, d, t);
8387
- return F1(e, r);
8412
+ const $ = D.g(), i = Y($, d, t);
8413
+ return F1($, i);
8388
8414
  } catch {
8389
8415
  return -99;
8390
8416
  }
8391
- }), $("intlTelInputUtilsTemp.getValidationError", (d, t) => {
8417
+ }), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
8392
8418
  if (!t) return 1;
8393
8419
  try {
8394
- const e = D.g(), r = Y(e, d, t);
8395
- return l1(e, r, -1);
8396
- } catch (e) {
8397
- return e.message === "Invalid country calling code" ? 1 : 3 >= d.length || e.message === "Phone number too short after IDD" || e.message === "The string supplied is too short to be a phone number" ? 2 : e.message === "The string supplied is too long to be a phone number" ? 3 : -99;
8420
+ const $ = D.g(), i = Y($, d, t);
8421
+ return a1($, i, -1);
8422
+ } catch ($) {
8423
+ return $.message === "Invalid country calling code" ? 1 : 3 >= d.length || $.message === "Phone number too short after IDD" || $.message === "The string supplied is too short to be a phone number" ? 2 : $.message === "The string supplied is too long to be a phone number" ? 3 : -99;
8398
8424
  }
8399
- }), $("intlTelInputUtilsTemp.isValidNumber", (d, t, e) => {
8425
+ }), e("intlTelInputUtilsTemp.isValidNumber", (d, t, $) => {
8400
8426
  try {
8401
- const r = D.g(), s = Y(r, d, t), u = b2(r, s);
8402
- if (e) {
8403
- const a = e.map((h) => y1[h]);
8404
- return u && a.includes(F1(r, s));
8427
+ const i = D.g(), s = Y(i, d, t), u = b2(i, s);
8428
+ if ($) {
8429
+ const l = $.map((h) => y1[h]);
8430
+ return u && l.includes(F1(i, s));
8405
8431
  }
8406
8432
  return u;
8407
8433
  } catch {
8408
8434
  return !1;
8409
8435
  }
8410
- }), $("intlTelInputUtilsTemp.isPossibleNumber", (d, t, e) => {
8436
+ }), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, $) => {
8411
8437
  try {
8412
- const r = D.g(), s = Y(r, d, t);
8413
- if (e) {
8414
- e.includes("FIXED_LINE_OR_MOBILE") && (e.includes("MOBILE") || e.push("MOBILE"), e.includes("FIXED_LINE") || e.push("FIXED_LINE"));
8415
- for (let u of e) if (l1(r, s, y1[u]) === 0) return !0;
8438
+ const i = D.g(), s = Y(i, d, t);
8439
+ if ($) {
8440
+ $.includes("FIXED_LINE_OR_MOBILE") && ($.includes("MOBILE") || $.push("MOBILE"), $.includes("FIXED_LINE") || $.push("FIXED_LINE"));
8441
+ for (let u of $) if (a1(i, s, y1[u]) === 0) return !0;
8416
8442
  return !1;
8417
8443
  }
8418
- return l1(r, s, -1) === 0;
8444
+ return a1(i, s, -1) === 0;
8419
8445
  } catch {
8420
8446
  return !1;
8421
8447
  }
8422
- }), $("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
8448
+ }), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
8423
8449
  try {
8424
- return g(Y(D.g(), d, t), 2).toString();
8450
+ return p(Y(D.g(), d, t), 2).toString();
8425
8451
  } catch {
8426
8452
  return "";
8427
8453
  }
8428
- }), $("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), $("intlTelInputUtilsTemp.numberType", y1), $("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
8454
+ }), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", y1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
8429
8455
  })();
8430
8456
  const j2 = window.intlTelInputUtilsTemp;
8431
8457
  delete window.intlTelInputUtilsTemp;
@@ -8462,40 +8488,40 @@ const z2 = {
8462
8488
  "changeValidity",
8463
8489
  "changeErrorCode"
8464
8490
  ], ["update:modelValue"]),
8465
- setup(y, { expose: $, emit: n }) {
8466
- const i = T2(y, "modelValue"), o = y, l = n, c = I1(), f = I1(), p = I1(!1), w = () => f.value ? o.options.strictMode ? f.value.isValidNumberPrecise() : f.value.isValidNumber() : null, I = () => {
8467
- let _ = w();
8468
- p.value !== _ && (p.value = _, l("changeValidity", !!_), l(
8491
+ setup(y, { expose: e, emit: n }) {
8492
+ const r = A2(y, "modelValue"), o = y, a = n, c = I1(), g = I1(), f = I1(!1), S = () => g.value ? o.options.strictMode ? g.value.isValidNumberPrecise() : g.value.isValidNumber() : null, _ = () => {
8493
+ let I = S();
8494
+ f.value !== I && (f.value = I, a("changeValidity", !!I), a(
8469
8495
  "changeErrorCode",
8470
- _ ? null : f.value.getValidationError()
8496
+ I ? null : g.value.getValidationError()
8471
8497
  ));
8472
- }, S = () => {
8473
- var _;
8474
- l("changeNumber", ((_ = f.value) == null ? void 0 : _.getNumber()) ?? ""), I();
8475
- }, A = () => {
8476
- var _;
8477
- l("changeCountry", ((_ = f.value) == null ? void 0 : _.getSelectedCountryData().iso2) ?? ""), S(), I();
8498
+ }, b = () => {
8499
+ var I;
8500
+ a("changeNumber", ((I = g.value) == null ? void 0 : I.getNumber()) ?? ""), _();
8501
+ }, w = () => {
8502
+ var I;
8503
+ a("changeCountry", ((I = g.value) == null ? void 0 : I.getSelectedCountryData().iso2) ?? ""), b(), _();
8478
8504
  };
8479
8505
  return E2(() => {
8480
- c.value && (f.value = C(c.value, o.options), o.value && f.value.setNumber(o.value), o.disabled && f.value.setDisabled(o.disabled));
8506
+ c.value && (g.value = C(c.value, o.options), o.value && g.value.setNumber(o.value), o.disabled && g.value.setDisabled(o.disabled));
8481
8507
  }), D2(
8482
8508
  () => o.disabled,
8483
- (_) => {
8484
- var T;
8485
- return (T = f.value) == null ? void 0 : T.setDisabled(_);
8509
+ (I) => {
8510
+ var A;
8511
+ return (A = g.value) == null ? void 0 : A.setDisabled(I);
8486
8512
  }
8487
8513
  ), M2(() => {
8488
- var _;
8489
- return (_ = f.value) == null ? void 0 : _.destroy();
8490
- }), $({ instance: f, input: c }), (_, T) => P2((x2(), R2("input", B2({
8514
+ var I;
8515
+ return (I = g.value) == null ? void 0 : I.destroy();
8516
+ }), e({ instance: g, input: c }), (I, A) => P2((x2(), R2("input", B2({
8491
8517
  ref_key: "input",
8492
8518
  ref: c,
8493
- "onUpdate:modelValue": T[0] || (T[0] = (G) => i.value = G),
8519
+ "onUpdate:modelValue": A[0] || (A[0] = (G) => r.value = G),
8494
8520
  type: "tel",
8495
- onCountrychange: A,
8496
- onInput: S
8521
+ onCountrychange: w,
8522
+ onInput: b
8497
8523
  }, y.inputProps), null, 16)), [
8498
- [k2, i.value]
8524
+ [k2, r.value]
8499
8525
  ]);
8500
8526
  }
8501
8527
  };