intl-tel-input 24.5.1 → 24.5.2

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,5 +1,5 @@
1
- import { mergeModels as $2, useModel as A2, ref as I1, onMounted as T2, watch as L2, onUnmounted as E2, withDirectives as D2, openBlock as M2, createElementBlock as P2, mergeProps as x2, vModelText as R2 } from "vue";
2
- const n2 = [
1
+ import { mergeModels as n2, useModel as A2, ref as I1, onMounted as L2, watch as T2, onUnmounted as E2, withDirectives as D2, openBlock as M2, createElementBlock as x2, mergeProps as P2, vModelText as R2 } from "vue";
2
+ const i2 = [
3
3
  [
4
4
  "af",
5
5
  // Afghanistan
@@ -1306,8 +1306,8 @@ const n2 = [
1306
1306
  "263"
1307
1307
  ]
1308
1308
  ], H = [];
1309
- for (let y = 0; y < n2.length; y++) {
1310
- const e = n2[y];
1309
+ for (let y = 0; y < i2.length; y++) {
1310
+ const e = i2[y];
1311
1311
  H[y] = {
1312
1312
  name: "",
1313
1313
  // this is now populated in the plugin
@@ -1572,11 +1572,11 @@ const B2 = {
1572
1572
  // additional countries (not supported by country-list library)
1573
1573
  ac: "Ascension Island",
1574
1574
  xk: "Kosovo"
1575
- }, r2 = { ...B2, ...k2 };
1575
+ }, o2 = { ...B2, ...k2 };
1576
1576
  for (let y = 0; y < H.length; y++)
1577
- H[y].name = r2[H[y].iso2];
1577
+ H[y].name = o2[H[y].iso2];
1578
1578
  let O2 = 0;
1579
- const o2 = {
1579
+ const u2 = {
1580
1580
  //* Whether or not to allow the dropdown.
1581
1581
  allowDropdown: !0,
1582
1582
  //* Add a placeholder in the input with an example number for the selected country.
@@ -1649,46 +1649,46 @@ const o2 = {
1649
1649
  "887",
1650
1650
  "888",
1651
1651
  "889"
1652
- ], c1 = (y) => y.replace(/\D/g, ""), i2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), s2 = (y) => {
1653
- const e = c1(y);
1652
+ ], f1 = (y) => y.replace(/\D/g, ""), r2 = (y = "") => y.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), s2 = (y) => {
1653
+ const e = f1(y);
1654
1654
  if (e.charAt(0) === "1") {
1655
1655
  const n = e.substr(1, 3);
1656
1656
  return G2.indexOf(n) !== -1;
1657
1657
  }
1658
1658
  return !1;
1659
- }, F2 = (y, e, n, i) => {
1660
- if (n === 0 && !i)
1659
+ }, F2 = (y, e, n, r) => {
1660
+ if (n === 0 && !r)
1661
1661
  return 0;
1662
- let u = 0;
1662
+ let o = 0;
1663
1663
  for (let a = 0; a < e.length; a++) {
1664
- if (/[+0-9]/.test(e[a]) && u++, u === y && !i)
1664
+ if (/[+0-9]/.test(e[a]) && o++, o === y && !r)
1665
1665
  return a + 1;
1666
- if (i && u === y + 1)
1666
+ if (r && o === y + 1)
1667
1667
  return a;
1668
1668
  }
1669
1669
  return e.length;
1670
- }, L = (y, e, n) => {
1671
- const i = document.createElement(y);
1672
- return e && Object.entries(e).forEach(([u, a]) => i.setAttribute(u, a)), n && n.appendChild(i), i;
1670
+ }, T = (y, e, n) => {
1671
+ const r = document.createElement(y);
1672
+ return e && Object.entries(e).forEach(([o, a]) => r.setAttribute(o, a)), n && n.appendChild(r), r;
1673
1673
  }, $1 = (y) => {
1674
1674
  const { instances: e } = C;
1675
1675
  Object.values(e).forEach((n) => n[y]());
1676
1676
  };
1677
1677
  class U2 {
1678
1678
  constructor(e, n = {}) {
1679
- this.id = O2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, o2, n), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1679
+ this.id = O2++, this.telInput = e, this.highlightedItem = null, this.options = Object.assign({}, u2, n), this.hadInitialPlaceholder = !!e.getAttribute("placeholder");
1680
1680
  }
1681
1681
  //* Can't be private as it's called from intlTelInput convenience wrapper.
1682
1682
  _init() {
1683
1683
  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
1684
  const e = this.options.allowDropdown || this.options.separateDialCode;
1685
- 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 = { ...r2, ...this.options.i18n };
1686
- const n = new Promise((u, a) => {
1687
- this.resolveAutoCountryPromise = u, this.rejectAutoCountryPromise = a;
1688
- }), i = new Promise((u, a) => {
1689
- this.resolveUtilsScriptPromise = u, this.rejectUtilsScriptPromise = a;
1685
+ 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 = { ...o2, ...this.options.i18n };
1686
+ const n = new Promise((o, a) => {
1687
+ this.resolveAutoCountryPromise = o, this.rejectAutoCountryPromise = a;
1688
+ }), r = new Promise((o, a) => {
1689
+ this.resolveUtilsScriptPromise = o, this.rejectUtilsScriptPromise = a;
1690
1690
  });
1691
- this.promise = Promise.all([n, i]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1691
+ this.promise = Promise.all([n, r]), this.selectedCountryData = {}, this._processCountryData(), this._generateMarkup(), this._setInitialState(), this._initListeners(), this._initRequests();
1692
1692
  }
1693
1693
  //********************
1694
1694
  //* PRIVATE METHODS
@@ -1700,40 +1700,40 @@ class U2 {
1700
1700
  //* Sort countries by countryOrder option (if present), then name.
1701
1701
  _sortCountries() {
1702
1702
  this.options.countryOrder && (this.options.countryOrder = this.options.countryOrder.map((e) => e.toLowerCase())), this.countries.sort((e, n) => {
1703
- const { countryOrder: i } = this.options;
1704
- if (i) {
1705
- const u = i.indexOf(e.iso2), a = i.indexOf(n.iso2), c = u > -1, p = a > -1;
1706
- if (c || p)
1707
- return c && p ? u - a : c ? -1 : 1;
1703
+ const { countryOrder: r } = this.options;
1704
+ if (r) {
1705
+ const o = r.indexOf(e.iso2), a = r.indexOf(n.iso2), c = o > -1, g = a > -1;
1706
+ if (c || g)
1707
+ return c && g ? o - a : c ? -1 : 1;
1708
1708
  }
1709
1709
  return e.name.localeCompare(n.name);
1710
1710
  });
1711
1711
  }
1712
1712
  //* Add a dial code to this.dialCodeToIso2Map.
1713
- _addToDialCodeMap(e, n, i) {
1713
+ _addToDialCodeMap(e, n, r) {
1714
1714
  n.length > this.dialCodeMaxLen && (this.dialCodeMaxLen = n.length), this.dialCodeToIso2Map.hasOwnProperty(n) || (this.dialCodeToIso2Map[n] = []);
1715
1715
  for (let a = 0; a < this.dialCodeToIso2Map[n].length; a++)
1716
1716
  if (this.dialCodeToIso2Map[n][a] === e)
1717
1717
  return;
1718
- const u = i !== void 0 ? i : this.dialCodeToIso2Map[n].length;
1719
- this.dialCodeToIso2Map[n][u] = e;
1718
+ const o = r !== void 0 ? r : this.dialCodeToIso2Map[n].length;
1719
+ this.dialCodeToIso2Map[n][o] = e;
1720
1720
  }
1721
1721
  //* Process onlyCountries or excludeCountries array if present.
1722
1722
  _processAllCountries() {
1723
1723
  const { onlyCountries: e, excludeCountries: n } = this.options;
1724
1724
  if (e.length) {
1725
- const i = e.map(
1726
- (u) => u.toLowerCase()
1725
+ const r = e.map(
1726
+ (o) => o.toLowerCase()
1727
1727
  );
1728
1728
  this.countries = H.filter(
1729
- (u) => i.indexOf(u.iso2) > -1
1729
+ (o) => r.indexOf(o.iso2) > -1
1730
1730
  );
1731
1731
  } else if (n.length) {
1732
- const i = n.map(
1733
- (u) => u.toLowerCase()
1732
+ const r = n.map(
1733
+ (o) => o.toLowerCase()
1734
1734
  );
1735
1735
  this.countries = H.filter(
1736
- (u) => i.indexOf(u.iso2) === -1
1736
+ (o) => r.indexOf(o.iso2) === -1
1737
1737
  );
1738
1738
  } else
1739
1739
  this.countries = H;
@@ -1755,12 +1755,12 @@ class U2 {
1755
1755
  for (let e = 0; e < this.countries.length; e++) {
1756
1756
  const n = this.countries[e];
1757
1757
  if (n.areaCodes) {
1758
- const i = this.dialCodeToIso2Map[n.dialCode][0];
1759
- for (let u = 0; u < n.areaCodes.length; u++) {
1760
- const a = n.areaCodes[u];
1758
+ const r = this.dialCodeToIso2Map[n.dialCode][0];
1759
+ for (let o = 0; o < n.areaCodes.length; o++) {
1760
+ const a = n.areaCodes[o];
1761
1761
  for (let c = 1; c < a.length; c++) {
1762
- const p = n.dialCode + a.substr(0, c);
1763
- this._addToDialCodeMap(i, p), this._addToDialCodeMap(n.iso2, p);
1762
+ const g = n.dialCode + a.substr(0, c);
1763
+ this._addToDialCodeMap(r, g), this._addToDialCodeMap(n.iso2, g);
1764
1764
  }
1765
1765
  this._addToDialCodeMap(n.iso2, n.dialCode + a);
1766
1766
  }
@@ -1769,29 +1769,29 @@ class U2 {
1769
1769
  }
1770
1770
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
1771
1771
  _generateMarkup() {
1772
- var I;
1772
+ var v;
1773
1773
  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
1774
  const {
1775
1775
  allowDropdown: e,
1776
1776
  separateDialCode: n,
1777
- showFlags: i,
1778
- containerClass: u,
1777
+ showFlags: r,
1778
+ containerClass: o,
1779
1779
  hiddenInput: a,
1780
1780
  dropdownContainer: c,
1781
- fixDropdownWidth: p,
1782
- useFullscreenPopup: g,
1781
+ fixDropdownWidth: g,
1782
+ useFullscreenPopup: f,
1783
1783
  countrySearch: b,
1784
- i18n: S
1784
+ i18n: _
1785
1785
  } = this.options;
1786
- let _ = "iti";
1787
- e && (_ += " iti--allow-dropdown"), i && (_ += " iti--show-flags"), u && (_ += ` ${u}`), g || (_ += " iti--inline-dropdown");
1788
- const N = L("div", { class: _ });
1789
- if ((I = this.telInput.parentNode) == null || I.insertBefore(N, this.telInput), e || i || n) {
1790
- this.countryContainer = L(
1786
+ let I = "iti";
1787
+ e && (I += " iti--allow-dropdown"), r && (I += " iti--show-flags"), o && (I += ` ${o}`), f || (I += " iti--inline-dropdown");
1788
+ const N = T("div", { class: I });
1789
+ if ((v = this.telInput.parentNode) == null || v.insertBefore(N, this.telInput), e || r || n) {
1790
+ this.countryContainer = T(
1791
1791
  "div",
1792
1792
  { class: "iti__country-container" },
1793
1793
  N
1794
- ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = L(
1794
+ ), this.showSelectedCountryOnLeft ? this.countryContainer.style.left = "0px" : this.countryContainer.style.right = "0px", e ? (this.selectedCountry = T(
1795
1795
  "button",
1796
1796
  {
1797
1797
  type: "button",
@@ -1803,82 +1803,82 @@ class U2 {
1803
1803
  role: "combobox"
1804
1804
  },
1805
1805
  this.countryContainer
1806
- ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = L(
1806
+ ), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = T(
1807
1807
  "div",
1808
1808
  { class: "iti__selected-country" },
1809
1809
  this.countryContainer
1810
1810
  );
1811
- const A = L("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1812
- if (this.selectedCountryInner = L("div", { class: "iti__flag" }, A), this.selectedCountryA11yText = L(
1811
+ const A = T("div", { class: "iti__selected-country-primary" }, this.selectedCountry);
1812
+ if (this.selectedCountryInner = T("div", { class: "iti__flag" }, A), this.selectedCountryA11yText = T(
1813
1813
  "span",
1814
1814
  { class: "iti__a11y-text" },
1815
1815
  this.selectedCountryInner
1816
- ), e && (this.dropdownArrow = L(
1816
+ ), e && (this.dropdownArrow = T(
1817
1817
  "div",
1818
1818
  { class: "iti__arrow", "aria-hidden": "true" },
1819
1819
  A
1820
- )), n && (this.selectedDialCode = L(
1820
+ )), n && (this.selectedDialCode = T(
1821
1821
  "div",
1822
1822
  { class: "iti__selected-dial-code" },
1823
1823
  this.selectedCountry
1824
1824
  )), e) {
1825
- const P = p ? "" : "iti--flexible-dropdown-width";
1826
- if (this.dropdownContent = L("div", {
1825
+ const M = g ? "" : "iti--flexible-dropdown-width";
1826
+ if (this.dropdownContent = T("div", {
1827
1827
  id: `iti-${this.id}__dropdown-content`,
1828
- class: `iti__dropdown-content iti__hide ${P}`
1829
- }), b && (this.searchInput = L(
1828
+ class: `iti__dropdown-content iti__hide ${M}`
1829
+ }), b && (this.searchInput = T(
1830
1830
  "input",
1831
1831
  {
1832
1832
  type: "text",
1833
1833
  class: "iti__search-input",
1834
- placeholder: S.searchPlaceholder,
1834
+ placeholder: _.searchPlaceholder,
1835
1835
  role: "combobox",
1836
1836
  "aria-expanded": "true",
1837
- "aria-label": S.searchPlaceholder,
1837
+ "aria-label": _.searchPlaceholder,
1838
1838
  "aria-controls": `iti-${this.id}__country-listbox`,
1839
1839
  "aria-autocomplete": "list",
1840
1840
  autocomplete: "off"
1841
1841
  },
1842
1842
  this.dropdownContent
1843
- ), this.searchResultsA11yText = L(
1843
+ ), this.searchResultsA11yText = T(
1844
1844
  "span",
1845
1845
  { class: "iti__a11y-text" },
1846
1846
  this.dropdownContent
1847
- )), this.countryList = L(
1847
+ )), this.countryList = T(
1848
1848
  "ul",
1849
1849
  {
1850
1850
  class: "iti__country-list",
1851
1851
  id: `iti-${this.id}__country-listbox`,
1852
1852
  role: "listbox",
1853
- "aria-label": S.countryListAriaLabel
1853
+ "aria-label": _.countryListAriaLabel
1854
1854
  },
1855
1855
  this.dropdownContent
1856
1856
  ), this._appendListItems(), b && this._updateSearchResultsText(), c) {
1857
1857
  let O = "iti iti--container";
1858
- g ? O += " iti--fullscreen-popup" : O += " iti--inline-dropdown", this.dropdown = L("div", { class: O }), this.dropdown.appendChild(this.dropdownContent);
1858
+ f ? O += " iti--fullscreen-popup" : O += " iti--inline-dropdown", this.dropdown = T("div", { class: O }), this.dropdown.appendChild(this.dropdownContent);
1859
1859
  } else
1860
1860
  this.countryContainer.appendChild(this.dropdownContent);
1861
1861
  }
1862
1862
  }
1863
1863
  if (N.appendChild(this.telInput), this._updateInputPadding(), a) {
1864
- const A = this.telInput.getAttribute("name") || "", P = a(A);
1865
- P.phone && (this.hiddenInput = L("input", {
1864
+ const A = this.telInput.getAttribute("name") || "", M = a(A);
1865
+ M.phone && (this.hiddenInput = T("input", {
1866
1866
  type: "hidden",
1867
- name: P.phone
1868
- }), N.appendChild(this.hiddenInput)), P.country && (this.hiddenInputCountry = L("input", {
1867
+ name: M.phone
1868
+ }), N.appendChild(this.hiddenInput)), M.country && (this.hiddenInputCountry = T("input", {
1869
1869
  type: "hidden",
1870
- name: P.country
1870
+ name: M.country
1871
1871
  }), N.appendChild(this.hiddenInputCountry));
1872
1872
  }
1873
1873
  }
1874
1874
  //* For each country: add a country list item <li> to the countryList <ul> container.
1875
1875
  _appendListItems() {
1876
1876
  for (let e = 0; e < this.countries.length; e++) {
1877
- const n = this.countries[e], i = e === 0 ? "iti__highlight" : "", u = L(
1877
+ const n = this.countries[e], r = e === 0 ? "iti__highlight" : "", o = T(
1878
1878
  "li",
1879
1879
  {
1880
1880
  id: `iti-${this.id}__item-${n.iso2}`,
1881
- class: `iti__country ${i}`,
1881
+ class: `iti__country ${r}`,
1882
1882
  tabindex: "-1",
1883
1883
  role: "option",
1884
1884
  "data-dial-code": n.dialCode,
@@ -1887,21 +1887,21 @@ class U2 {
1887
1887
  },
1888
1888
  this.countryList
1889
1889
  );
1890
- n.nodeById[this.id] = u;
1890
+ n.nodeById[this.id] = o;
1891
1891
  let a = "";
1892
- 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>`, u.insertAdjacentHTML("beforeend", a);
1892
+ 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);
1893
1893
  }
1894
1894
  }
1895
1895
  //* Set the initial state of the input value and the selected country by:
1896
1896
  //* 1. Extracting a dial code from the given number
1897
1897
  //* 2. Using explicit initialCountry
1898
1898
  _setInitialState(e = !1) {
1899
- const n = this.telInput.getAttribute("value"), i = this.telInput.value, a = n && n.charAt(0) === "+" && (!i || i.charAt(0) !== "+") ? n : i, c = this._getDialCode(a), p = s2(a), { initialCountry: g, geoIpLookup: b } = this.options, S = g === "auto" && b;
1900
- if (c && !p)
1899
+ 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 = s2(a), { initialCountry: f, geoIpLookup: b } = this.options, _ = f === "auto" && b;
1900
+ if (c && !g)
1901
1901
  this._updateCountryFromNumber(a);
1902
- else if (!S || e) {
1903
- const _ = g ? g.toLowerCase() : "";
1904
- _ && this._getCountryData(_, !0) ? this._setCountry(_) : c && p ? this._setCountry("us") : this._setCountry();
1902
+ else if (!_ || e) {
1903
+ const I = f ? f.toLowerCase() : "";
1904
+ I && this._getCountryData(I, !0) ? this._setCountry(I) : c && g ? this._setCountry("us") : this._setCountry();
1905
1905
  }
1906
1906
  a && this._updateValFromNumber(a);
1907
1907
  }
@@ -1936,10 +1936,10 @@ class U2 {
1936
1936
  }
1937
1937
  //* Init many requests: utils script / geo ip lookup.
1938
1938
  _initRequests() {
1939
- const { utilsScript: e, initialCountry: n, geoIpLookup: i } = this.options;
1939
+ const { utilsScript: e, initialCountry: n, geoIpLookup: r } = this.options;
1940
1940
  e && !C.utils ? C.documentReady() ? C.loadUtils(e) : window.addEventListener("load", () => {
1941
1941
  C.loadUtils(e);
1942
- }) : this.resolveUtilsScriptPromise(), n === "auto" && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1942
+ }) : this.resolveUtilsScriptPromise(), n === "auto" && r && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
1943
1943
  }
1944
1944
  //* Perform the geo ip lookup.
1945
1945
  _loadAutoCountry() {
@@ -1958,43 +1958,40 @@ class U2 {
1958
1958
  }
1959
1959
  //* Initialize the tel input listeners.
1960
1960
  _initTelInputListeners() {
1961
- const { strictMode: e, formatAsYouType: n, separateDialCode: i, formatOnDisplay: u, allowDropdown: a, countrySearch: c } = this.options;
1962
- let p = !1;
1963
- new RegExp("\\p{L}", "u").test(this.telInput.value) && (p = !0), this._handleInputEvent = (g) => {
1964
- if (this.isAndroid && (g == null ? void 0 : g.data) === "+" && i && a && c) {
1965
- const N = this.telInput.selectionStart || 0, I = this.telInput.value.substring(0, N - 1), A = this.telInput.value.substring(N);
1966
- this.telInput.value = I + A, this._openDropdownWithPlus();
1961
+ const { strictMode: e, formatAsYouType: n, separateDialCode: r, formatOnDisplay: o, allowDropdown: a, countrySearch: c } = this.options;
1962
+ let g = !1;
1963
+ new RegExp("\\p{L}", "u").test(this.telInput.value) && (g = !0), this._handleInputEvent = (f) => {
1964
+ if (this.isAndroid && (f == null ? void 0 : f.data) === "+" && r && a && c) {
1965
+ const N = this.telInput.selectionStart || 0, v = this.telInput.value.substring(0, N - 1), A = this.telInput.value.substring(N);
1966
+ this.telInput.value = v + A, this._openDropdownWithPlus();
1967
1967
  return;
1968
1968
  }
1969
1969
  this._updateCountryFromNumber(this.telInput.value) && this._triggerCountryChange();
1970
- const b = (g == null ? void 0 : g.data) && /[^+0-9]/.test(g.data), S = (g == null ? void 0 : g.inputType) === "insertFromPaste" && this.telInput.value;
1971
- b || S && !e ? p = !0 : /[^+0-9]/.test(this.telInput.value) || (p = !1);
1972
- const _ = (g == null ? void 0 : g.detail) && g.detail.isSetNumber && !u;
1973
- if (n && !p && !_) {
1974
- const N = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, N).replace(/[^+0-9]/g, "").length, P = (g == null ? void 0 : g.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), Z = F2(A, O, N, P);
1970
+ const b = (f == null ? void 0 : f.data) && /[^+0-9]/.test(f.data), _ = (f == null ? void 0 : f.inputType) === "insertFromPaste" && this.telInput.value;
1971
+ b || _ && !e ? g = !0 : /[^+0-9]/.test(this.telInput.value) || (g = !1);
1972
+ const I = (f == null ? void 0 : f.detail) && f.detail.isSetNumber && !o;
1973
+ if (n && !g && !I) {
1974
+ const N = this.telInput.selectionStart || 0, A = this.telInput.value.substring(0, N).replace(/[^+0-9]/g, "").length, M = (f == null ? void 0 : f.inputType) === "deleteContentForward", O = this._formatNumberAsYouType(), Z = F2(A, O, N, M);
1975
1975
  this.telInput.value = O, this.telInput.setSelectionRange(Z, Z);
1976
1976
  }
1977
- }, this.telInput.addEventListener("input", this._handleInputEvent), (e || i) && (this._handleKeydownEvent = (g) => {
1978
- if (g.key && g.key.length === 1 && !g.altKey && !g.ctrlKey && !g.metaKey) {
1979
- if (i && a && c && g.key === "+") {
1980
- g.preventDefault(), this._openDropdownWithPlus();
1977
+ }, this.telInput.addEventListener("input", this._handleInputEvent), (e || r) && (this._handleKeydownEvent = (f) => {
1978
+ if (f.key && f.key.length === 1 && !f.altKey && !f.ctrlKey && !f.metaKey) {
1979
+ if (r && a && c && f.key === "+") {
1980
+ f.preventDefault(), this._openDropdownWithPlus();
1981
1981
  return;
1982
1982
  }
1983
1983
  if (e) {
1984
- const b = this.telInput.value, _ = !(b.charAt(0) === "+") && this.telInput.selectionStart === 0 && g.key === "+", N = /^[0-9]$/.test(g.key), I = i ? N : _ || N, A = this._getFullNumber(), P = C.utils.getCoreNumber(A, this.selectedCountryData.iso2), O = this.maxCoreNumberLength && P.length >= this.maxCoreNumberLength, Z = b.substring(this.telInput.selectionStart, this.telInput.selectionEnd), f1 = /\d/.test(Z), p1 = _ ? !0 : this._isChangingDialCode(g.key);
1985
- (!I || O && !f1 && !p1) && g.preventDefault();
1984
+ const b = this.telInput.value, _ = b.charAt(0) === "+", I = !_ && this.telInput.selectionStart === 0 && f.key === "+", N = /^[0-9]$/.test(f.key), v = r ? N : I || N, A = b.slice(0, this.telInput.selectionStart) + f.key + b.slice(this.telInput.selectionEnd), M = this._getFullNumber(A), O = C.utils.getCoreNumber(M, this.selectedCountryData.iso2), Z = this.maxCoreNumberLength && O.length > this.maxCoreNumberLength;
1985
+ let n1 = !1;
1986
+ if (_) {
1987
+ const p1 = this.selectedCountryData.iso2;
1988
+ n1 = this._getCountryFromNumber(M) !== p1;
1989
+ }
1990
+ (!v || Z && !n1 && !I) && f.preventDefault();
1986
1991
  }
1987
1992
  }
1988
1993
  }, this.telInput.addEventListener("keydown", this._handleKeydownEvent));
1989
1994
  }
1990
- _isChangingDialCode(e) {
1991
- const n = this.telInput.value;
1992
- if (n.charAt(0) === "+") {
1993
- const i = this.selectedCountryData.iso2, u = n.slice(0, this.telInput.selectionStart) + e + n.slice(this.telInput.selectionEnd), a = this._getFullNumber(u);
1994
- return this._getCountryFromNumber(a) !== i;
1995
- }
1996
- return !1;
1997
- }
1998
1995
  //* Adhere to the input's maxlength attr.
1999
1996
  _cap(e) {
2000
1997
  const n = parseInt(this.telInput.getAttribute("maxlength") || "", 10);
@@ -2002,19 +1999,19 @@ class U2 {
2002
1999
  }
2003
2000
  //* Trigger a custom event on the input.
2004
2001
  _trigger(e, n = {}) {
2005
- const i = new CustomEvent(e, {
2002
+ const r = new CustomEvent(e, {
2006
2003
  bubbles: !0,
2007
2004
  cancelable: !0,
2008
2005
  detail: n
2009
2006
  });
2010
- this.telInput.dispatchEvent(i);
2007
+ this.telInput.dispatchEvent(r);
2011
2008
  }
2012
2009
  //* Open the dropdown.
2013
2010
  _openDropdown() {
2014
2011
  const { fixDropdownWidth: e, countrySearch: n } = this.options;
2015
2012
  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) {
2016
- const i = this.countryList.firstElementChild;
2017
- i && (this._highlightListItem(i, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2013
+ const r = this.countryList.firstElementChild;
2014
+ r && (this._highlightListItem(r, !1), this.countryList.scrollTop = 0), this.searchInput.focus();
2018
2015
  }
2019
2016
  this._bindDropdownListeners(), this.dropdownArrow.classList.add("iti__arrow--up"), this._trigger("open:countrydropdown");
2020
2017
  }
@@ -2027,16 +2024,16 @@ class U2 {
2027
2024
  }
2028
2025
  //* We only bind dropdown listeners when the dropdown is open.
2029
2026
  _bindDropdownListeners() {
2030
- this._handleMouseoverCountryList = (u) => {
2027
+ this._handleMouseoverCountryList = (o) => {
2031
2028
  var c;
2032
- const a = (c = u.target) == null ? void 0 : c.closest(".iti__country");
2029
+ const a = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2033
2030
  a && this._highlightListItem(a, !1);
2034
2031
  }, this.countryList.addEventListener(
2035
2032
  "mouseover",
2036
2033
  this._handleMouseoverCountryList
2037
- ), this._handleClickCountryList = (u) => {
2034
+ ), this._handleClickCountryList = (o) => {
2038
2035
  var c;
2039
- const a = (c = u.target) == null ? void 0 : c.closest(".iti__country");
2036
+ const a = (c = o.target) == null ? void 0 : c.closest(".iti__country");
2040
2037
  a && this._selectListItem(a);
2041
2038
  }, this.countryList.addEventListener("click", this._handleClickCountryList);
2042
2039
  let e = !0;
@@ -2046,20 +2043,20 @@ class U2 {
2046
2043
  "click",
2047
2044
  this._handleClickOffToClose
2048
2045
  );
2049
- let n = "", i = null;
2050
- if (this._handleKeydownOnDropdown = (u) => {
2051
- ["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(u.key) && (u.preventDefault(), u.stopPropagation(), u.key === "ArrowUp" || u.key === "ArrowDown" ? this._handleUpDownKey(u.key) : u.key === "Enter" ? this._handleEnterKey() : u.key === "Escape" && this._closeDropdown()), !this.options.countrySearch && /^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(u.key) && (u.stopPropagation(), i && clearTimeout(i), n += u.key.toLowerCase(), this._searchForCountry(n), i = setTimeout(() => {
2046
+ let n = "", r = null;
2047
+ if (this._handleKeydownOnDropdown = (o) => {
2048
+ ["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(() => {
2052
2049
  n = "";
2053
2050
  }, 1e3));
2054
2051
  }, document.addEventListener("keydown", this._handleKeydownOnDropdown), this.options.countrySearch) {
2055
- const u = () => {
2052
+ const o = () => {
2056
2053
  const c = this.searchInput.value.trim();
2057
2054
  c ? this._filterCountries(c) : this._filterCountries("", !0);
2058
2055
  };
2059
2056
  let a = null;
2060
2057
  this._handleSearchChange = () => {
2061
2058
  a && clearTimeout(a), a = setTimeout(() => {
2062
- u(), a = null;
2059
+ o(), a = null;
2063
2060
  }, 100);
2064
2061
  }, this.searchInput.addEventListener("input", this._handleSearchChange), this.searchInput.addEventListener("click", (c) => c.stopPropagation());
2065
2062
  }
@@ -2067,9 +2064,9 @@ class U2 {
2067
2064
  //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
2068
2065
  _searchForCountry(e) {
2069
2066
  for (let n = 0; n < this.countries.length; n++) {
2070
- const i = this.countries[n];
2071
- if (i.name.substr(0, e.length).toLowerCase() === e) {
2072
- const a = i.nodeById[this.id];
2067
+ const r = this.countries[n];
2068
+ if (r.name.substr(0, e.length).toLowerCase() === e) {
2069
+ const a = r.nodeById[this.id];
2073
2070
  this._highlightListItem(a, !1), this._scrollTo(a);
2074
2071
  break;
2075
2072
  }
@@ -2077,28 +2074,28 @@ class U2 {
2077
2074
  }
2078
2075
  //* Country search enabled: Filter the countries according to the search query.
2079
2076
  _filterCountries(e, n = !1) {
2080
- let i = !0;
2077
+ let r = !0;
2081
2078
  this.countryList.innerHTML = "";
2082
- const u = i2(e);
2079
+ const o = r2(e);
2083
2080
  for (let a = 0; a < this.countries.length; a++) {
2084
- const c = this.countries[a], p = i2(c.name), g = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((S) => S[0]).join("").toLowerCase(), b = `+${c.dialCode}`;
2085
- if (n || p.includes(u) || b.includes(u) || c.iso2.includes(u) || g.includes(u)) {
2086
- const S = c.nodeById[this.id];
2087
- S && this.countryList.appendChild(S), i && (this._highlightListItem(S, !1), i = !1);
2081
+ const c = this.countries[a], g = r2(c.name), f = c.name.split(/[^a-zA-ZÀ-ÿа-яА-Я]/).map((_) => _[0]).join("").toLowerCase(), b = `+${c.dialCode}`;
2082
+ if (n || g.includes(o) || b.includes(o) || c.iso2.includes(o) || f.includes(o)) {
2083
+ const _ = c.nodeById[this.id];
2084
+ _ && this.countryList.appendChild(_), r && (this._highlightListItem(_, !1), r = !1);
2088
2085
  }
2089
2086
  }
2090
- i && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2087
+ r && this._highlightListItem(null, !1), this.countryList.scrollTop = 0, this._updateSearchResultsText();
2091
2088
  }
2092
2089
  //* Update search results text (for a11y).
2093
2090
  _updateSearchResultsText() {
2094
2091
  const { i18n: e } = this.options, n = this.countryList.childElementCount;
2095
- let i;
2096
- n === 0 ? i = e.zeroSearchResults : n === 1 ? i = e.oneSearchResult : i = e.multipleSearchResults.replace("${count}", n.toString()), this.searchResultsA11yText.textContent = i;
2092
+ let r;
2093
+ n === 0 ? r = e.zeroSearchResults : n === 1 ? r = e.oneSearchResult : r = e.multipleSearchResults.replace("${count}", n.toString()), this.searchResultsA11yText.textContent = r;
2097
2094
  }
2098
2095
  //* Highlight the next/prev item in the list (and ensure it is visible).
2099
2096
  _handleUpDownKey(e) {
2100
- var i, u;
2101
- let n = e === "ArrowUp" ? (i = this.highlightedItem) == null ? void 0 : i.previousElementSibling : (u = this.highlightedItem) == null ? void 0 : u.nextElementSibling;
2097
+ var r, o;
2098
+ let n = e === "ArrowUp" ? (r = this.highlightedItem) == null ? void 0 : r.previousElementSibling : (o = this.highlightedItem) == null ? void 0 : o.nextElementSibling;
2102
2099
  !n && this.countryList.childElementCount > 1 && (n = e === "ArrowUp" ? this.countryList.lastElementChild : this.countryList.firstElementChild), n && (this._scrollTo(n), this._highlightListItem(n, !1));
2103
2100
  }
2104
2101
  //* Select the currently highlighted item.
@@ -2110,7 +2107,7 @@ class U2 {
2110
2107
  _updateValFromNumber(e) {
2111
2108
  let n = e;
2112
2109
  if (this.options.formatOnDisplay && C.utils && this.selectedCountryData) {
2113
- const i = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: u, INTERNATIONAL: a } = C.utils.numberFormat, c = i ? u : a;
2110
+ const r = this.options.nationalMode || n.charAt(0) !== "+" && !this.options.separateDialCode, { NATIONAL: o, INTERNATIONAL: a } = C.utils.numberFormat, c = r ? o : a;
2114
2111
  n = C.utils.formatNumber(
2115
2112
  n,
2116
2113
  this.selectedCountryData.iso2,
@@ -2127,41 +2124,41 @@ class U2 {
2127
2124
  }
2128
2125
  _getCountryFromNumber(e) {
2129
2126
  const n = e.indexOf("+");
2130
- let i = n ? e.substring(n) : e;
2131
- const u = this.selectedCountryData.dialCode;
2132
- i && u === "1" && i.charAt(0) !== "+" && (i.charAt(0) !== "1" && (i = `1${i}`), i = `+${i}`), this.options.separateDialCode && u && i.charAt(0) !== "+" && (i = `+${u}${i}`);
2133
- const c = this._getDialCode(i, !0), p = c1(i);
2127
+ let r = n ? e.substring(n) : e;
2128
+ const o = this.selectedCountryData.dialCode;
2129
+ r && o === "1" && r.charAt(0) !== "+" && (r.charAt(0) !== "1" && (r = `1${r}`), r = `+${r}`), this.options.separateDialCode && o && r.charAt(0) !== "+" && (r = `+${o}${r}`);
2130
+ const c = this._getDialCode(r, !0), g = f1(r);
2134
2131
  if (c) {
2135
- const g = this.dialCodeToIso2Map[c1(c)], b = g.indexOf(this.selectedCountryData.iso2) !== -1 && p.length <= c.length - 1;
2136
- if (!(u === "1" && s2(p)) && !b) {
2137
- for (let _ = 0; _ < g.length; _++)
2138
- if (g[_])
2139
- return g[_];
2132
+ const f = this.dialCodeToIso2Map[f1(c)], b = f.indexOf(this.selectedCountryData.iso2) !== -1 && g.length <= c.length - 1;
2133
+ if (!(o === "1" && s2(g)) && !b) {
2134
+ for (let I = 0; I < f.length; I++)
2135
+ if (f[I])
2136
+ return f[I];
2140
2137
  }
2141
2138
  } else {
2142
- if (i.charAt(0) === "+" && p.length)
2139
+ if (r.charAt(0) === "+" && g.length)
2143
2140
  return "";
2144
- if ((!i || i === "+") && !this.selectedCountryData.iso2)
2141
+ if ((!r || r === "+") && !this.selectedCountryData.iso2)
2145
2142
  return this.defaultCountry;
2146
2143
  }
2147
2144
  return null;
2148
2145
  }
2149
2146
  //* Remove highlighting from other list items and highlight the given item.
2150
2147
  _highlightListItem(e, n) {
2151
- const i = this.highlightedItem;
2152
- if (i && (i.classList.remove("iti__highlight"), i.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem) {
2148
+ const r = this.highlightedItem;
2149
+ if (r && (r.classList.remove("iti__highlight"), r.setAttribute("aria-selected", "false")), this.highlightedItem = e, this.highlightedItem) {
2153
2150
  this.highlightedItem.classList.add("iti__highlight"), this.highlightedItem.setAttribute("aria-selected", "true");
2154
- const u = this.highlightedItem.getAttribute("id") || "";
2155
- this.selectedCountry.setAttribute("aria-activedescendant", u), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", u);
2151
+ const o = this.highlightedItem.getAttribute("id") || "";
2152
+ this.selectedCountry.setAttribute("aria-activedescendant", o), this.options.countrySearch && this.searchInput.setAttribute("aria-activedescendant", o);
2156
2153
  }
2157
2154
  n && this.highlightedItem.focus();
2158
2155
  }
2159
2156
  //* Find the country data for the given iso2 code
2160
2157
  //* the ignoreOnlyCountriesOption is only used during init() while parsing the onlyCountries array
2161
2158
  _getCountryData(e, n) {
2162
- for (let i = 0; i < this.countries.length; i++)
2163
- if (this.countries[i].iso2 === e)
2164
- return this.countries[i];
2159
+ for (let r = 0; r < this.countries.length; r++)
2160
+ if (this.countries[r].iso2 === e)
2161
+ return this.countries[r];
2165
2162
  if (n)
2166
2163
  return null;
2167
2164
  throw new Error(`No country data for '${e}'`);
@@ -2169,10 +2166,10 @@ class U2 {
2169
2166
  //* Update the selected country, dial code (if separateDialCode), placeholder, title, and active list item.
2170
2167
  //* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
2171
2168
  _setCountry(e) {
2172
- const { separateDialCode: n, showFlags: i, i18n: u } = this.options, a = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2169
+ const { separateDialCode: n, showFlags: r, i18n: o } = this.options, a = this.selectedCountryData.iso2 ? this.selectedCountryData : {};
2173
2170
  if (this.selectedCountryData = e ? this._getCountryData(e, !1) || {} : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.selectedCountryInner) {
2174
- let c = "", p = "";
2175
- e && i ? (c = `iti__flag iti__${e}`, p = `${this.selectedCountryData.name} +${this.selectedCountryData.dialCode}`) : (c = "iti__flag iti__globe", p = u.noCountrySelected), this.selectedCountryInner.className = c, this.selectedCountryA11yText.textContent = p;
2171
+ let c = "", g = "";
2172
+ 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;
2176
2173
  }
2177
2174
  if (this._setSelectedCountryTitleAttribute(e, n), n) {
2178
2175
  const c = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
@@ -2189,28 +2186,28 @@ class U2 {
2189
2186
  }
2190
2187
  //* Update the maximum valid number length for the currently selected country.
2191
2188
  _updateMaxLength() {
2192
- const { strictMode: e, placeholderNumberType: n, validationNumberType: i } = this.options;
2189
+ const { strictMode: e, placeholderNumberType: n, validationNumberType: r } = this.options, { iso2: o } = this.selectedCountryData;
2193
2190
  if (e && C.utils)
2194
- if (this.selectedCountryData.iso2) {
2195
- const u = C.utils.numberType[n];
2196
- let a = C.utils.getExampleNumber(
2197
- this.selectedCountryData.iso2,
2191
+ if (o) {
2192
+ const a = C.utils.numberType[n];
2193
+ let c = C.utils.getExampleNumber(
2194
+ o,
2198
2195
  !1,
2199
- u,
2196
+ a,
2200
2197
  !0
2201
- ), c = a;
2202
- for (; C.utils.isPossibleNumber(a, this.selectedCountryData.iso2, i); )
2203
- c = a, a += "0";
2204
- const p = C.utils.getCoreNumber(c, this.selectedCountryData.iso2);
2205
- this.maxCoreNumberLength = p.length;
2198
+ ), g = c;
2199
+ for (; C.utils.isPossibleNumber(c, o, r); )
2200
+ g = c, c += "0";
2201
+ const f = C.utils.getCoreNumber(g, o);
2202
+ this.maxCoreNumberLength = f.length, o === "by" && (this.maxCoreNumberLength = f.length + 1);
2206
2203
  } else
2207
2204
  this.maxCoreNumberLength = null;
2208
2205
  }
2209
2206
  _setSelectedCountryTitleAttribute(e = null, n) {
2210
2207
  if (!this.selectedCountry)
2211
2208
  return;
2212
- let i;
2213
- e && !n ? i = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? i = this.selectedCountryData.name : i = "Unknown", this.selectedCountry.setAttribute("title", i);
2209
+ let r;
2210
+ e && !n ? r = `${this.selectedCountryData.name}: +${this.selectedCountryData.dialCode}` : e ? r = this.selectedCountryData.name : r = "Unknown", this.selectedCountry.setAttribute("title", r);
2214
2211
  }
2215
2212
  //* When the input is in a hidden container during initialisation, we must inject some markup
2216
2213
  //* into the end of the DOM to calculate the correct offsetWidth.
@@ -2222,10 +2219,10 @@ class U2 {
2222
2219
  e.style.visibility = "hidden", document.body.appendChild(e);
2223
2220
  const n = this.countryContainer.cloneNode();
2224
2221
  e.appendChild(n);
2225
- const i = this.selectedCountry.cloneNode(!0);
2226
- n.appendChild(i);
2227
- const u = i.offsetWidth;
2228
- return document.body.removeChild(e), u;
2222
+ const r = this.selectedCountry.cloneNode(!0);
2223
+ n.appendChild(r);
2224
+ const o = r.offsetWidth;
2225
+ return document.body.removeChild(e), o;
2229
2226
  }
2230
2227
  return 0;
2231
2228
  }
@@ -2234,17 +2231,17 @@ class U2 {
2234
2231
  const {
2235
2232
  autoPlaceholder: e,
2236
2233
  placeholderNumberType: n,
2237
- nationalMode: i,
2238
- customPlaceholder: u
2234
+ nationalMode: r,
2235
+ customPlaceholder: o
2239
2236
  } = this.options, a = e === "aggressive" || !this.hadInitialPlaceholder && e === "polite";
2240
2237
  if (C.utils && a) {
2241
2238
  const c = C.utils.numberType[n];
2242
- let p = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
2239
+ let g = this.selectedCountryData.iso2 ? C.utils.getExampleNumber(
2243
2240
  this.selectedCountryData.iso2,
2244
- i,
2241
+ r,
2245
2242
  c
2246
2243
  ) : "";
2247
- p = this._beforeSetNumber(p), typeof u == "function" && (p = u(p, this.selectedCountryData)), this.telInput.setAttribute("placeholder", p);
2244
+ g = this._beforeSetNumber(g), typeof o == "function" && (g = o(g, this.selectedCountryData)), this.telInput.setAttribute("placeholder", g);
2248
2245
  }
2249
2246
  }
2250
2247
  //* Called when the user selects a list item from the dropdown.
@@ -2266,62 +2263,62 @@ class U2 {
2266
2263
  }
2267
2264
  //* Check if an element is visible within it's container, else scroll until it is.
2268
2265
  _scrollTo(e) {
2269
- const n = this.countryList, i = document.documentElement.scrollTop, u = n.offsetHeight, a = n.getBoundingClientRect().top + i, c = a + u, p = e.offsetHeight, g = e.getBoundingClientRect().top + i, b = g + p, S = g - a + n.scrollTop;
2270
- if (g < a)
2271
- n.scrollTop = S;
2266
+ 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, b = f + g, _ = f - a + n.scrollTop;
2267
+ if (f < a)
2268
+ n.scrollTop = _;
2272
2269
  else if (b > c) {
2273
- const _ = u - p;
2274
- n.scrollTop = S - _;
2270
+ const I = o - g;
2271
+ n.scrollTop = _ - I;
2275
2272
  }
2276
2273
  }
2277
2274
  //* Replace any existing dial code with the new one
2278
2275
  //* Note: called from _selectListItem and setCountry
2279
2276
  _updateDialCode(e) {
2280
- const n = this.telInput.value, i = `+${e}`;
2281
- let u;
2277
+ const n = this.telInput.value, r = `+${e}`;
2278
+ let o;
2282
2279
  if (n.charAt(0) === "+") {
2283
2280
  const a = this._getDialCode(n);
2284
- a ? u = n.replace(a, i) : u = i, this.telInput.value = u;
2281
+ a ? o = n.replace(a, r) : o = r, this.telInput.value = o;
2285
2282
  }
2286
2283
  }
2287
2284
  //* Try and extract a valid international dial code from a full telephone number.
2288
2285
  //* Note: returns the raw string inc plus character and any whitespace/dots etc.
2289
2286
  _getDialCode(e, n) {
2290
- let i = "";
2287
+ let r = "";
2291
2288
  if (e.charAt(0) === "+") {
2292
- let u = "";
2289
+ let o = "";
2293
2290
  for (let a = 0; a < e.length; a++) {
2294
2291
  const c = e.charAt(a);
2295
2292
  if (!isNaN(parseInt(c, 10))) {
2296
- if (u += c, n)
2297
- this.dialCodeToIso2Map[u] && (i = e.substr(0, a + 1));
2298
- else if (this.dialCodes[u]) {
2299
- i = e.substr(0, a + 1);
2293
+ if (o += c, n)
2294
+ this.dialCodeToIso2Map[o] && (r = e.substr(0, a + 1));
2295
+ else if (this.dialCodes[o]) {
2296
+ r = e.substr(0, a + 1);
2300
2297
  break;
2301
2298
  }
2302
- if (u.length === this.dialCodeMaxLen)
2299
+ if (o.length === this.dialCodeMaxLen)
2303
2300
  break;
2304
2301
  }
2305
2302
  }
2306
2303
  }
2307
- return i;
2304
+ return r;
2308
2305
  }
2309
2306
  //* Get the input val, adding the dial code if separateDialCode is enabled.
2310
2307
  _getFullNumber(e) {
2311
- const n = e || this.telInput.value.trim(), { dialCode: i } = this.selectedCountryData;
2312
- let u;
2313
- const a = c1(n);
2314
- return this.options.separateDialCode && n.charAt(0) !== "+" && i && a ? u = `+${i}` : u = "", u + n;
2308
+ const n = e || this.telInput.value.trim(), { dialCode: r } = this.selectedCountryData;
2309
+ let o;
2310
+ const a = f1(n);
2311
+ return this.options.separateDialCode && n.charAt(0) !== "+" && r && a ? o = `+${r}` : o = "", o + n;
2315
2312
  }
2316
2313
  //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
2317
2314
  _beforeSetNumber(e) {
2318
2315
  let n = e;
2319
2316
  if (this.options.separateDialCode) {
2320
- let i = this._getDialCode(n);
2321
- if (i) {
2322
- i = `+${this.selectedCountryData.dialCode}`;
2323
- const u = n[i.length] === " " || n[i.length] === "-" ? i.length + 1 : i.length;
2324
- n = n.substr(u);
2317
+ let r = this._getDialCode(n);
2318
+ if (r) {
2319
+ r = `+${this.selectedCountryData.dialCode}`;
2320
+ const o = n[r.length] === " " || n[r.length] === "-" ? r.length + 1 : r.length;
2321
+ n = n.substr(o);
2325
2322
  }
2326
2323
  }
2327
2324
  return this._cap(n);
@@ -2332,8 +2329,8 @@ class U2 {
2332
2329
  }
2333
2330
  //* Format the number as the user types.
2334
2331
  _formatNumberAsYouType() {
2335
- const e = this._getFullNumber(), n = C.utils ? C.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: i } = this.selectedCountryData;
2336
- return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && n.includes(`+${i}`) ? (n.split(`+${i}`)[1] || "").trim() : n;
2332
+ const e = this._getFullNumber(), n = C.utils ? C.utils.formatNumberAsYouType(e, this.selectedCountryData.iso2) : e, { dialCode: r } = this.selectedCountryData;
2333
+ return this.options.separateDialCode && this.telInput.value.charAt(0) !== "+" && n.includes(`+${r}`) ? (n.split(`+${r}`)[1] || "").trim() : n;
2337
2334
  }
2338
2335
  //**************************
2339
2336
  //* SECRET PUBLIC METHODS
@@ -2361,13 +2358,13 @@ class U2 {
2361
2358
  "keydown",
2362
2359
  this._handleCountryContainerKeydown
2363
2360
  );
2364
- const p = this.telInput.closest("label");
2365
- p && p.removeEventListener("click", this._handleLabelClick);
2361
+ const g = this.telInput.closest("label");
2362
+ g && g.removeEventListener("click", this._handleLabelClick);
2366
2363
  }
2367
- const { form: i } = this.telInput;
2368
- 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);
2369
- const u = this.telInput.parentNode;
2370
- (a = u == null ? void 0 : u.parentNode) == null || a.insertBefore(this.telInput, u), (c = u == null ? void 0 : u.parentNode) == null || c.removeChild(u), delete C.instances[this.id];
2364
+ const { form: r } = this.telInput;
2365
+ 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);
2366
+ const o = this.telInput.parentNode;
2367
+ (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];
2371
2368
  }
2372
2369
  //* Get the extension from the current number.
2373
2370
  getExtension() {
@@ -2413,8 +2410,8 @@ class U2 {
2413
2410
  return !1;
2414
2411
  const e = this._getFullNumber(), n = e.search(new RegExp("\\p{L}", "u"));
2415
2412
  if (n > -1) {
2416
- const i = e.substring(0, n), u = this._utilsIsPossibleNumber(i), a = this._utilsIsPossibleNumber(e);
2417
- return u && a;
2413
+ const r = e.substring(0, n), o = this._utilsIsPossibleNumber(r), a = this._utilsIsPossibleNumber(e);
2414
+ return o && a;
2418
2415
  }
2419
2416
  return this._utilsIsPossibleNumber(e);
2420
2417
  }
@@ -2427,8 +2424,8 @@ class U2 {
2427
2424
  return !1;
2428
2425
  const e = this._getFullNumber(), n = e.search(new RegExp("\\p{L}", "u"));
2429
2426
  if (n > -1) {
2430
- const i = e.substring(0, n), u = this._utilsIsValidNumber(i), a = this._utilsIsValidNumber(e);
2431
- return u && a;
2427
+ const r = e.substring(0, n), o = this._utilsIsValidNumber(r), a = this._utilsIsValidNumber(e);
2428
+ return o && a;
2432
2429
  }
2433
2430
  return this._utilsIsValidNumber(e);
2434
2431
  }
@@ -2437,8 +2434,8 @@ class U2 {
2437
2434
  }
2438
2435
  //* Update the selected country, and update the input val accordingly.
2439
2436
  setCountry(e) {
2440
- const n = e == null ? void 0 : e.toLowerCase(), i = this.selectedCountryData.iso2;
2441
- (e && n !== i || !e && i) && (this._setCountry(n), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2437
+ const n = e == null ? void 0 : e.toLowerCase(), r = this.selectedCountryData.iso2;
2438
+ (e && n !== r || !e && r) && (this._setCountry(n), this._updateDialCode(this.selectedCountryData.dialCode), this._triggerCountryChange());
2442
2439
  }
2443
2440
  //* Set the input value and update the country.
2444
2441
  setNumber(e) {
@@ -2458,8 +2455,8 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2458
2455
  /* webpackIgnore: true */
2459
2456
  /* @vite-ignore */
2460
2457
  y
2461
- ).then(({ default: i }) => {
2462
- C.utils = i, $1("handleUtils"), e(!0);
2458
+ ).then(({ default: r }) => {
2459
+ C.utils = r, $1("handleUtils"), e(!0);
2463
2460
  }).catch(() => {
2464
2461
  $1("rejectUtilsScriptPromise"), n();
2465
2462
  });
@@ -2469,7 +2466,7 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2469
2466
  return n._init(), y.setAttribute("data-intl-tel-input-id", n.id.toString()), C.instances[n.id] = n, n;
2470
2467
  },
2471
2468
  {
2472
- defaults: o2,
2469
+ defaults: u2,
2473
2470
  //* Using a static var like this allows us to mock it in the tests.
2474
2471
  documentReady: () => document.readyState === "complete",
2475
2472
  //* Get the country data object.
@@ -2482,7 +2479,7 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2482
2479
  //* A map from instance ID to instance object.
2483
2480
  instances: {},
2484
2481
  loadUtils: V2,
2485
- version: "24.5.1"
2482
+ version: "24.5.2"
2486
2483
  }
2487
2484
  );
2488
2485
  (function() {
@@ -2491,23 +2488,23 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2491
2488
  d = d.split(".");
2492
2489
  var $ = y;
2493
2490
  d[0] in $ || typeof $.execScript > "u" || $.execScript("var " + d[0]);
2494
- for (var s; d.length && (s = d.shift()); ) d.length || t === void 0 ? $[s] && $[s] !== Object.prototype[s] ? $ = $[s] : $ = $[s] = {} : $[s] = t;
2491
+ for (var i; d.length && (i = d.shift()); ) d.length || t === void 0 ? $[i] && $[i] !== Object.prototype[i] ? $ = $[i] : $ = $[i] = {} : $[i] = t;
2495
2492
  }
2496
2493
  function n(d, t) {
2497
2494
  function $() {
2498
2495
  }
2499
- $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(s, r, o) {
2496
+ $.prototype = t.prototype, d.ma = t.prototype, d.prototype = new $(), d.prototype.constructor = d, d.sa = function(i, s, u) {
2500
2497
  for (var l = Array(arguments.length - 2), h = 2; h < arguments.length; h++) l[h - 2] = arguments[h];
2501
- return t.prototype[r].apply(s, l);
2498
+ return t.prototype[s].apply(i, l);
2502
2499
  };
2503
2500
  }
2504
- function i(d) {
2501
+ function r(d) {
2505
2502
  const t = [];
2506
2503
  let $ = 0;
2507
- for (const s in d) t[$++] = d[s];
2504
+ for (const i in d) t[$++] = d[i];
2508
2505
  return t;
2509
2506
  }
2510
- var u = class {
2507
+ var o = class {
2511
2508
  constructor(d) {
2512
2509
  if (a !== a) throw Error("SafeUrl is not meant to be built directly");
2513
2510
  this.g = d;
@@ -2516,9 +2513,9 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2516
2513
  return this.g.toString();
2517
2514
  }
2518
2515
  }, a = {};
2519
- new u("about:invalid#zClosurez"), new u("about:blank");
2516
+ new o("about:invalid#zClosurez"), new o("about:blank");
2520
2517
  const c = {};
2521
- class p {
2518
+ class g {
2522
2519
  constructor() {
2523
2520
  if (c !== c) throw Error("SafeStyle is not meant to be built directly");
2524
2521
  }
@@ -2526,108 +2523,108 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2526
2523
  return "";
2527
2524
  }
2528
2525
  }
2529
- new p();
2530
- const g = {};
2526
+ new g();
2527
+ const f = {};
2531
2528
  class b {
2532
2529
  constructor() {
2533
- if (g !== g) throw Error("SafeStyleSheet is not meant to be built directly");
2530
+ if (f !== f) throw Error("SafeStyleSheet is not meant to be built directly");
2534
2531
  }
2535
2532
  toString() {
2536
2533
  return "";
2537
2534
  }
2538
2535
  }
2539
2536
  new b();
2540
- const S = {};
2541
- class _ {
2537
+ const _ = {};
2538
+ class I {
2542
2539
  constructor() {
2543
2540
  var t = y.trustedTypes && y.trustedTypes.emptyHTML || "";
2544
- if (S !== S) throw Error("SafeHtml is not meant to be built directly");
2541
+ if (_ !== _) throw Error("SafeHtml is not meant to be built directly");
2545
2542
  this.g = t;
2546
2543
  }
2547
2544
  toString() {
2548
2545
  return this.g.toString();
2549
2546
  }
2550
2547
  }
2551
- new _();
2548
+ new I();
2552
2549
  function N(d, t) {
2553
2550
  switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
2554
- case P:
2551
+ case M:
2555
2552
  case O:
2556
2553
  case Z:
2557
- case f1:
2554
+ case n1:
2558
2555
  case p1:
2559
2556
  case A:
2560
- case I:
2557
+ case v:
2561
2558
  this.o = !0;
2562
2559
  }
2563
2560
  this.j = t.defaultValue;
2564
2561
  }
2565
- var I = 1, A = 2, P = 3, O = 4, Z = 6, f1 = 16, p1 = 18;
2566
- function u2(d, t) {
2562
+ var v = 1, A = 2, M = 3, O = 4, Z = 6, n1 = 16, p1 = 18;
2563
+ function v1(d, t) {
2567
2564
  for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
2568
2565
  var $ = t[d];
2569
2566
  this.g[$.g] = $;
2570
2567
  }
2571
2568
  }
2572
2569
  function l2(d) {
2573
- return d = i(d.g), d.sort(function(t, $) {
2570
+ return d = r(d.g), d.sort(function(t, $) {
2574
2571
  return t.g - $.g;
2575
2572
  }), d;
2576
2573
  }
2577
- function x() {
2574
+ function P() {
2578
2575
  this.h = {}, this.j = this.m().g, this.g = this.l = null;
2579
2576
  }
2580
- x.prototype.has = function(d) {
2577
+ P.prototype.has = function(d) {
2581
2578
  return R(this, d.g);
2582
- }, x.prototype.get = function(d, t) {
2583
- return f(this, d.g, t);
2584
- }, x.prototype.set = function(d, t) {
2579
+ }, P.prototype.get = function(d, t) {
2580
+ return p(this, d.g, t);
2581
+ }, P.prototype.set = function(d, t) {
2585
2582
  E(this, d.g, t);
2586
- }, x.prototype.add = function(d, t) {
2587
- S1(this, d.g, t);
2583
+ }, P.prototype.add = function(d, t) {
2584
+ w1(this, d.g, t);
2588
2585
  };
2589
- function v1(d, t) {
2590
- for (var $ = l2(d.m()), s = 0; s < $.length; s++) {
2591
- var r = $[s], o = r.g;
2592
- if (R(t, o)) {
2593
- d.g && delete d.g[r.g];
2594
- var l = r.h == 11 || r.h == 10;
2595
- if (r.l) {
2596
- r = M(t, o);
2597
- for (var h = 0; h < r.length; h++) S1(d, o, l ? r[h].clone() : r[h]);
2598
- } else r = n1(t, o), l ? (l = n1(d, o)) ? v1(l, r) : E(d, o, r.clone()) : E(d, o, r);
2586
+ function S1(d, t) {
2587
+ for (var $ = l2(d.m()), i = 0; i < $.length; i++) {
2588
+ var s = $[i], u = s.g;
2589
+ if (R(t, u)) {
2590
+ d.g && delete d.g[s.g];
2591
+ var l = s.h == 11 || s.h == 10;
2592
+ if (s.l) {
2593
+ s = x(t, u);
2594
+ for (var h = 0; h < s.length; h++) w1(d, u, l ? s[h].clone() : s[h]);
2595
+ } else s = i1(t, u), l ? (l = i1(d, u)) ? S1(l, s) : E(d, u, s.clone()) : E(d, u, s);
2599
2596
  }
2600
2597
  }
2601
2598
  }
2602
- x.prototype.clone = function() {
2599
+ P.prototype.clone = function() {
2603
2600
  var d = new this.constructor();
2604
- return d != this && (d.h = {}, d.g && (d.g = {}), v1(d, this)), d;
2601
+ return d != this && (d.h = {}, d.g && (d.g = {}), S1(d, this)), d;
2605
2602
  };
2606
2603
  function R(d, t) {
2607
2604
  return d.h[t] != null;
2608
2605
  }
2609
- function n1(d, t) {
2606
+ function i1(d, t) {
2610
2607
  var $ = d.h[t];
2611
2608
  if ($ == null) return null;
2612
2609
  if (d.l) {
2613
2610
  if (!(t in d.g)) {
2614
- var s = d.l, r = d.j[t];
2615
- if ($ != null) if (r.l) {
2616
- for (var o = [], l = 0; l < $.length; l++) o[l] = s.h(r, $[l]);
2617
- $ = o;
2618
- } else $ = s.h(r, $);
2611
+ var i = d.l, s = d.j[t];
2612
+ if ($ != null) if (s.l) {
2613
+ for (var u = [], l = 0; l < $.length; l++) u[l] = i.h(s, $[l]);
2614
+ $ = u;
2615
+ } else $ = i.h(s, $);
2619
2616
  return d.g[t] = $;
2620
2617
  }
2621
2618
  return d.g[t];
2622
2619
  }
2623
2620
  return $;
2624
2621
  }
2625
- function f(d, t, $) {
2626
- var s = n1(d, t);
2627
- return d.j[t].l ? s[$ || 0] : s;
2622
+ function p(d, t, $) {
2623
+ var i = i1(d, t);
2624
+ return d.j[t].l ? i[$ || 0] : i;
2628
2625
  }
2629
- function v(d, t) {
2630
- if (R(d, t)) d = f(d, t);
2626
+ function S(d, t) {
2627
+ if (R(d, t)) d = p(d, t);
2631
2628
  else d: {
2632
2629
  if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
2633
2630
  else if (t === Number) d.j = 0;
@@ -2640,8 +2637,8 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2640
2637
  }
2641
2638
  return d;
2642
2639
  }
2643
- function M(d, t) {
2644
- return n1(d, t) || [];
2640
+ function x(d, t) {
2641
+ return i1(d, t) || [];
2645
2642
  }
2646
2643
  function U(d, t) {
2647
2644
  return d.j[t].l ? R(d, t) ? d.h[t].length : 0 : R(d, t) ? 1 : 0;
@@ -2649,28 +2646,28 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2649
2646
  function E(d, t, $) {
2650
2647
  d.h[t] = $, d.g && (d.g[t] = $);
2651
2648
  }
2652
- function S1(d, t, $) {
2649
+ function w1(d, t, $) {
2653
2650
  d.h[t] || (d.h[t] = []), d.h[t].push($), d.g && delete d.g[t];
2654
2651
  }
2655
- function i1(d, t) {
2656
- var $ = [], s;
2657
- for (s in t) s != 0 && $.push(new N(s, t[s]));
2658
- return new u2(d, $);
2652
+ function r1(d, t) {
2653
+ var $ = [], i;
2654
+ for (i in t) i != 0 && $.push(new N(i, t[i]));
2655
+ return new v1(d, $);
2659
2656
  }
2660
2657
  function s1() {
2661
2658
  }
2662
2659
  s1.prototype.g = function(d) {
2663
2660
  throw new d.h(), Error("Unimplemented");
2664
2661
  }, s1.prototype.h = function(d, t) {
2665
- if (d.h == 11 || d.h == 10) return t instanceof x ? t : this.g(d.s.prototype.m(), t);
2666
- if (d.h == 14) return typeof t == "string" && w1.test(t) && (d = Number(t), 0 < d) ? d : t;
2662
+ if (d.h == 11 || d.h == 10) return t instanceof P ? t : this.g(d.s.prototype.m(), t);
2663
+ if (d.h == 14) return typeof t == "string" && b1.test(t) && (d = Number(t), 0 < d) ? d : t;
2667
2664
  if (!d.o) return t;
2668
2665
  if (d = d.s, d === String) {
2669
2666
  if (typeof t == "number") return String(t);
2670
- } else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || w1.test(t))) return Number(t);
2667
+ } else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || b1.test(t))) return Number(t);
2671
2668
  return t;
2672
2669
  };
2673
- var w1 = /^-?[0-9]+$/;
2670
+ var b1 = /^-?[0-9]+$/;
2674
2671
  function g1() {
2675
2672
  }
2676
2673
  n(g1, s1), g1.prototype.g = function(d, t) {
@@ -2683,45 +2680,45 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2683
2680
  }, q.prototype.g = function(d, t) {
2684
2681
  return q.ma.g.call(this, d, t);
2685
2682
  };
2686
- function T(d, t) {
2683
+ function L(d, t) {
2687
2684
  d != null && this.g.apply(this, arguments);
2688
2685
  }
2689
- T.prototype.h = "", T.prototype.set = function(d) {
2686
+ L.prototype.h = "", L.prototype.set = function(d) {
2690
2687
  this.h = "" + d;
2691
- }, T.prototype.g = function(d, t, $) {
2692
- if (this.h += String(d), t != null) for (let s = 1; s < arguments.length; s++) this.h += arguments[s];
2688
+ }, L.prototype.g = function(d, t, $) {
2689
+ if (this.h += String(d), t != null) for (let i = 1; i < arguments.length; i++) this.h += arguments[i];
2693
2690
  return this;
2694
2691
  };
2695
2692
  function B(d) {
2696
2693
  d.h = "";
2697
2694
  }
2698
- T.prototype.toString = function() {
2695
+ L.prototype.toString = function() {
2699
2696
  return this.h;
2700
2697
  };
2701
2698
  function j() {
2702
- x.call(this);
2699
+ P.call(this);
2703
2700
  }
2704
- n(j, x);
2705
- var b1 = null;
2701
+ n(j, P);
2702
+ var N1 = null;
2706
2703
  function w() {
2707
- x.call(this);
2704
+ P.call(this);
2708
2705
  }
2709
- n(w, x);
2710
- var N1 = null;
2706
+ n(w, P);
2707
+ var A1 = null;
2711
2708
  function W() {
2712
- x.call(this);
2709
+ P.call(this);
2713
2710
  }
2714
- n(W, x);
2715
- var A1 = null;
2711
+ n(W, P);
2712
+ var L1 = null;
2716
2713
  j.prototype.m = function() {
2717
- var d = b1;
2718
- return d || (b1 = d = i1(j, { 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;
2719
- }, j.m = j.prototype.m, w.prototype.m = function() {
2720
2714
  var d = N1;
2721
- return d || (N1 = d = i1(w, { 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;
2722
- }, w.m = w.prototype.m, W.prototype.m = function() {
2715
+ return d || (N1 = d = r1(j, { 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;
2716
+ }, j.m = j.prototype.m, w.prototype.m = function() {
2723
2717
  var d = A1;
2724
- return d || (A1 = d = i1(W, {
2718
+ return d || (A1 = d = r1(w, { 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;
2719
+ }, w.m = w.prototype.m, W.prototype.m = function() {
2720
+ var d = L1;
2721
+ return d || (L1 = d = r1(W, {
2725
2722
  0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
2726
2723
  1: { name: "general_desc", i: 11, type: w },
2727
2724
  2: { name: "fixed_line", i: 11, type: w },
@@ -2760,13 +2757,13 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2760
2757
  })), d;
2761
2758
  }, W.m = W.prototype.m;
2762
2759
  function V() {
2763
- x.call(this);
2760
+ P.call(this);
2764
2761
  }
2765
- n(V, x);
2762
+ n(V, P);
2766
2763
  var T1 = null, a2 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
2767
2764
  V.prototype.m = function() {
2768
2765
  var d = T1;
2769
- return d || (T1 = d = i1(V, { 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: a2 }, 7: {
2766
+ return d || (T1 = d = r1(V, { 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: a2 }, 7: {
2770
2767
  name: "preferred_domestic_carrier_code",
2771
2768
  i: 9,
2772
2769
  type: String
@@ -2988,7 +2985,7 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
2988
2985
  995: ["GE"],
2989
2986
  996: ["KG"],
2990
2987
  998: ["UZ"]
2991
- }, L1 = {
2988
+ }, E1 = {
2992
2989
  AC: [, [
2993
2990
  ,
2994
2991
  ,
@@ -8011,146 +8008,146 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8011
8008
  X: "9",
8012
8009
  Y: "9",
8013
8010
  Z: "9"
8014
- }, f2 = RegExp("[++]+"), Q = RegExp("^[++]+"), E1 = RegExp("([0-90-9٠-٩۰-۹])"), p2 = RegExp("[++0-90-9٠-٩۰-۹]"), g2 = /[\\\/] *x/, C2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), m2 = /(?:.*?[A-Za-z]){3}.*/, y2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), _2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
8011
+ }, f2 = RegExp("[++]+"), Q = RegExp("^[++]+"), D1 = RegExp("([0-90-9٠-٩۰-۹])"), p2 = RegExp("[++0-90-9٠-٩۰-۹]"), g2 = /[\\\/] *x/, C2 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), m2 = /(?:.*?[A-Za-z]){3}.*/, y2 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), _2 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
8015
8012
  function Y(d) {
8016
8013
  return "([0-90-9٠-٩۰-۹]{1," + d + "})";
8017
8014
  }
8018
- function D1() {
8015
+ function M1() {
8019
8016
  return ";ext=" + Y("20") + "|[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*" + (Y("20") + "#?|[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*") + (Y("9") + "#?|[- ]+") + (Y("6") + "#|[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*") + (Y("15") + "#?|[  \\t]*(?:,)+[:\\..]?[  \\t,-]*") + (Y("9") + "#?");
8020
8017
  }
8021
- var M1 = new RegExp("(?:" + D1() + ")$", "i"), I2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + D1() + ")?$", "i"), v2 = /(\$\d)/, S2 = /^\(?\$1\)?$/;
8018
+ var x1 = new RegExp("(?:" + M1() + ")$", "i"), I2 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + M1() + ")?$", "i"), v2 = /(\$\d)/, S2 = /^\(?\$1\)?$/;
8022
8019
  function P1(d) {
8023
8020
  return 2 > d.length ? !1 : G(I2, d);
8024
8021
  }
8025
- function x1(d) {
8026
- return G(m2, d) ? r1(d, c2) : r1(d, C1);
8027
- }
8028
8022
  function R1(d) {
8029
- var t = x1(d.toString());
8030
- B(d), d.g(t);
8023
+ return G(m2, d) ? o1(d, c2) : o1(d, C1);
8031
8024
  }
8032
8025
  function B1(d) {
8033
- return d != null && (U(d, 9) != 1 || M(d, 9)[0] != -1);
8026
+ var t = R1(d.toString());
8027
+ B(d), d.g(t);
8034
8028
  }
8035
- function r1(d, t) {
8036
- for (var $ = new T(), s, r = d.length, o = 0; o < r; ++o) s = d.charAt(o), s = t[s.toUpperCase()], s != null && $.g(s);
8029
+ function k1(d) {
8030
+ return d != null && (U(d, 9) != 1 || x(d, 9)[0] != -1);
8031
+ }
8032
+ function o1(d, t) {
8033
+ for (var $ = new L(), i, s = d.length, u = 0; u < s; ++u) i = d.charAt(u), i = t[i.toUpperCase()], i != null && $.g(i);
8037
8034
  return $.toString();
8038
8035
  }
8039
- function k1(d) {
8036
+ function O1(d) {
8040
8037
  return d.length == 0 || S2.test(d);
8041
8038
  }
8042
- function o1(d) {
8043
- return d != null && isNaN(d) && d.toUpperCase() in L1;
8039
+ function u1(d) {
8040
+ return d != null && isNaN(d) && d.toUpperCase() in E1;
8044
8041
  }
8045
8042
  D.prototype.format = function(d, t) {
8046
- if (f(d, 2) == 0 && R(d, 5)) {
8047
- var $ = v(d, 5);
8043
+ if (p(d, 2) == 0 && R(d, 5)) {
8044
+ var $ = S(d, 5);
8048
8045
  if (0 < $.length) return $;
8049
8046
  }
8050
- $ = v(d, 1);
8051
- var s = t1(d);
8052
- if (t == 0) return O1($, 0, s, "");
8053
- if (!($ in X)) return s;
8054
- var r = d1(this, $, e1($));
8055
- d = R(d, 3) && f(d, 3).length != 0 ? t == 3 ? ";ext=" + f(d, 3) : R(r, 13) ? f(r, 13) + v(d, 3) : " ext. " + v(d, 3) : "";
8047
+ $ = S(d, 1);
8048
+ var i = t1(d);
8049
+ if (t == 0) return G1($, 0, i, "");
8050
+ if (!($ in X)) return i;
8051
+ var s = d1(this, $, e1($));
8052
+ d = R(d, 3) && p(d, 3).length != 0 ? t == 3 ? ";ext=" + p(d, 3) : R(s, 13) ? p(s, 13) + S(d, 3) : " ext. " + S(d, 3) : "";
8056
8053
  d: {
8057
- r = M(r, 20).length == 0 || t == 2 ? M(r, 19) : M(r, 20);
8058
- for (var o, l = r.length, h = 0; h < l; ++h) {
8059
- o = r[h];
8060
- var m = U(o, 3);
8061
- if ((m == 0 || s.search(f(o, 3, m - 1)) == 0) && (m = new RegExp(f(o, 1)), G(m, s))) {
8062
- r = o;
8054
+ s = x(s, 20).length == 0 || t == 2 ? x(s, 19) : x(s, 20);
8055
+ for (var u, l = s.length, h = 0; h < l; ++h) {
8056
+ u = s[h];
8057
+ var m = U(u, 3);
8058
+ if ((m == 0 || i.search(p(u, 3, m - 1)) == 0) && (m = new RegExp(p(u, 1)), G(m, i))) {
8059
+ s = u;
8063
8060
  break d;
8064
8061
  }
8065
8062
  }
8066
- r = null;
8063
+ s = null;
8067
8064
  }
8068
- return r != null && (l = r, r = v(l, 2), o = new RegExp(f(l, 1)), v(
8065
+ return s != null && (l = s, s = S(l, 2), u = new RegExp(p(l, 1)), S(
8069
8066
  l,
8070
8067
  5
8071
- ), l = v(l, 4), s = t == 2 && l != null && 0 < l.length ? s.replace(o, r.replace(v2, l)) : s.replace(o, r), t == 3 && (s = s.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), s = s.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), O1($, t, s, d);
8068
+ ), l = S(l, 4), i = t == 2 && l != null && 0 < l.length ? i.replace(u, s.replace(v2, l)) : i.replace(u, s), t == 3 && (i = i.replace(RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+"), ""), i = i.replace(RegExp("[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), G1($, t, i, d);
8072
8069
  };
8073
8070
  function d1(d, t, $) {
8074
8071
  return $ == "001" ? K(d, "" + t) : K(d, $);
8075
8072
  }
8076
8073
  function t1(d) {
8077
8074
  if (!R(d, 2)) return "";
8078
- var t = "" + f(d, 2);
8079
- return R(d, 4) && f(d, 4) && 0 < v(d, 8) ? Array(v(d, 8) + 1).join("0") + t : t;
8075
+ var t = "" + p(d, 2);
8076
+ return R(d, 4) && p(d, 4) && 0 < S(d, 8) ? Array(S(d, 8) + 1).join("0") + t : t;
8080
8077
  }
8081
- function O1(d, t, $, s) {
8078
+ function G1(d, t, $, i) {
8082
8079
  switch (t) {
8083
8080
  case 0:
8084
- return "+" + d + $ + s;
8081
+ return "+" + d + $ + i;
8085
8082
  case 1:
8086
- return "+" + d + " " + $ + s;
8083
+ return "+" + d + " " + $ + i;
8087
8084
  case 3:
8088
- return "tel:+" + d + "-" + $ + s;
8085
+ return "tel:+" + d + "-" + $ + i;
8089
8086
  default:
8090
- return $ + s;
8087
+ return $ + i;
8091
8088
  }
8092
8089
  }
8093
- function u1(d, t) {
8090
+ function l1(d, t) {
8094
8091
  switch (t) {
8095
8092
  case 4:
8096
- return f(d, 5);
8093
+ return p(d, 5);
8097
8094
  case 3:
8098
- return f(d, 4);
8095
+ return p(d, 4);
8099
8096
  case 1:
8100
- return f(d, 3);
8097
+ return p(d, 3);
8101
8098
  case 0:
8102
8099
  case 2:
8103
- return f(d, 2);
8100
+ return p(d, 2);
8104
8101
  case 5:
8105
- return f(d, 6);
8102
+ return p(d, 6);
8106
8103
  case 6:
8107
- return f(d, 8);
8104
+ return p(d, 8);
8108
8105
  case 7:
8109
- return f(d, 7);
8106
+ return p(d, 7);
8110
8107
  case 8:
8111
- return f(d, 21);
8108
+ return p(d, 21);
8112
8109
  case 9:
8113
- return f(d, 25);
8110
+ return p(d, 25);
8114
8111
  case 10:
8115
- return f(d, 28);
8112
+ return p(d, 28);
8116
8113
  default:
8117
- return f(d, 1);
8114
+ return p(d, 1);
8118
8115
  }
8119
8116
  }
8120
8117
  function m1(d, t) {
8121
- return k(d, f(t, 1)) ? k(d, f(t, 5)) ? 4 : k(d, f(t, 4)) ? 3 : k(d, f(t, 6)) ? 5 : k(d, f(t, 8)) ? 6 : k(d, f(t, 7)) ? 7 : k(d, f(t, 21)) ? 8 : k(d, f(t, 25)) ? 9 : k(d, f(t, 28)) ? 10 : k(d, f(t, 2)) ? f(t, 18) || k(d, f(t, 3)) ? 2 : 0 : !f(t, 18) && k(d, f(t, 3)) ? 1 : -1 : -1;
8118
+ return k(d, p(t, 1)) ? k(d, p(t, 5)) ? 4 : k(d, p(t, 4)) ? 3 : k(d, p(t, 6)) ? 5 : k(d, p(t, 8)) ? 6 : k(d, p(t, 7)) ? 7 : k(d, p(t, 21)) ? 8 : k(d, p(t, 25)) ? 9 : k(d, p(t, 28)) ? 10 : k(d, p(t, 2)) ? p(t, 18) || k(d, p(t, 3)) ? 2 : 0 : !p(t, 18) && k(d, p(t, 3)) ? 1 : -1 : -1;
8122
8119
  }
8123
8120
  function K(d, t) {
8124
8121
  if (t == null) return null;
8125
8122
  t = t.toUpperCase();
8126
8123
  var $ = d.g[t];
8127
8124
  if ($ == null) {
8128
- if ($ = L1[t], $ == null) return null;
8125
+ if ($ = E1[t], $ == null) return null;
8129
8126
  $ = new q().g(W.m(), $), d.g[t] = $;
8130
8127
  }
8131
8128
  return $;
8132
8129
  }
8133
8130
  function k(d, t) {
8134
8131
  var $ = d.length;
8135
- return 0 < U(t, 9) && M(t, 9).indexOf($) == -1 ? !1 : G(v(t, 2), d);
8132
+ return 0 < U(t, 9) && x(t, 9).indexOf($) == -1 ? !1 : G(S(t, 2), d);
8136
8133
  }
8137
- function G1(d, t) {
8134
+ function F1(d, t) {
8138
8135
  if (t == null) return null;
8139
- var $ = v(t, 1);
8136
+ var $ = S(t, 1);
8140
8137
  if ($ = X[$], $ == null) d = null;
8141
8138
  else if ($.length == 1) d = $[0];
8142
8139
  else d: {
8143
8140
  t = t1(t);
8144
- for (var s, r = $.length, o = 0; o < r; o++) {
8145
- s = $[o];
8146
- var l = K(d, s);
8141
+ for (var i, s = $.length, u = 0; u < s; u++) {
8142
+ i = $[u];
8143
+ var l = K(d, i);
8147
8144
  if (R(l, 23)) {
8148
- if (t.search(f(l, 23)) == 0) {
8149
- d = s;
8145
+ if (t.search(p(l, 23)) == 0) {
8146
+ d = i;
8150
8147
  break d;
8151
8148
  }
8152
8149
  } else if (m1(t, l) != -1) {
8153
- d = s;
8150
+ d = i;
8154
8151
  break d;
8155
8152
  }
8156
8153
  }
@@ -8161,148 +8158,148 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8161
8158
  function e1(d) {
8162
8159
  return d = X[d], d == null ? "ZZ" : d[0];
8163
8160
  }
8164
- function F1(d, t) {
8161
+ function U1(d, t) {
8165
8162
  if (d = K(d, t), d == null) throw Error("Invalid region code: " + t);
8166
- return v(d, 10);
8163
+ return S(d, 10);
8167
8164
  }
8168
- function l1(d, t, $, s) {
8169
- var r = u1($, s), o = U(r, 9) == 0 ? M(f($, 1), 9) : M(r, 9);
8170
- if (r = M(r, 10), s == 2) if (B1(u1($, 0))) d = u1($, 1), B1(d) && (o = o.concat(U(d, 9) == 0 ? M(f($, 1), 9) : M(d, 9)), o.sort(), r.length == 0 ? r = M(d, 10) : (r = r.concat(M(d, 10)), r.sort()));
8171
- else return l1(d, t, $, 1);
8172
- return o[0] == -1 ? 5 : (t = t.length, -1 < r.indexOf(t) ? 4 : ($ = o[0], $ == t ? 0 : $ > t ? 2 : o[o.length - 1] < t ? 3 : -1 < o.indexOf(t, 1) ? 0 : 5));
8165
+ function a1(d, t, $, i) {
8166
+ var s = l1($, i), u = U(s, 9) == 0 ? x(p($, 1), 9) : x(s, 9);
8167
+ if (s = x(s, 10), i == 2) if (k1(l1($, 0))) d = l1($, 1), k1(d) && (u = u.concat(U(d, 9) == 0 ? x(p($, 1), 9) : x(d, 9)), u.sort(), s.length == 0 ? s = x(d, 10) : (s = s.concat(x(d, 10)), s.sort()));
8168
+ else return a1(d, t, $, 1);
8169
+ 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));
8173
8170
  }
8174
8171
  function J(d, t, $) {
8175
- var s = t1(t);
8176
- return t = v(t, 1), t in X ? (t = d1(d, t, e1(t)), l1(d, s, t, $)) : 1;
8172
+ var i = t1(t);
8173
+ return t = S(t, 1), t in X ? (t = d1(d, t, e1(t)), a1(d, i, t, $)) : 1;
8177
8174
  }
8178
- function U1(d, t) {
8175
+ function V1(d, t) {
8179
8176
  if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
8180
- for (var $, s = d.length, r = 1; 3 >= r && r <= s; ++r) if ($ = parseInt(d.substring(0, r), 10), $ in X) return t.g(d.substring(r)), $;
8177
+ 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)), $;
8181
8178
  return 0;
8182
8179
  }
8183
- function V1(d, t, $, s, r, o) {
8180
+ function K1(d, t, $, i, s, u) {
8184
8181
  if (t.length == 0) return 0;
8185
- t = new T(t);
8182
+ t = new L(t);
8186
8183
  var l;
8187
- $ != null && (l = f($, 11)), l == null && (l = "NonMatch");
8184
+ $ != null && (l = p($, 11)), l == null && (l = "NonMatch");
8188
8185
  var h = t.toString();
8189
8186
  if (h.length == 0) l = 20;
8190
- else if (Q.test(h)) h = h.replace(Q, ""), B(t), t.g(x1(h)), l = 1;
8187
+ else if (Q.test(h)) h = h.replace(Q, ""), B(t), t.g(R1(h)), l = 1;
8191
8188
  else {
8192
- if (h = new RegExp(l), R1(t), l = t.toString(), l.search(h) == 0) {
8189
+ if (h = new RegExp(l), B1(t), l = t.toString(), l.search(h) == 0) {
8193
8190
  h = l.match(h)[0].length;
8194
- var m = l.substring(h).match(E1);
8195
- m && m[1] != null && 0 < m[1].length && r1(m[1], C1) == "0" ? l = !1 : (B(t), t.g(l.substring(h)), l = !0);
8191
+ var m = l.substring(h).match(D1);
8192
+ m && m[1] != null && 0 < m[1].length && o1(m[1], C1) == "0" ? l = !1 : (B(t), t.g(l.substring(h)), l = !0);
8196
8193
  } else l = !1;
8197
8194
  l = l ? 5 : 20;
8198
8195
  }
8199
- if (r && E(o, 6, l), l != 20) {
8196
+ if (s && E(u, 6, l), l != 20) {
8200
8197
  if (2 >= t.h.length) throw Error("Phone number too short after IDD");
8201
- if (d = U1(t, s), d != 0) return E(o, 1, d), d;
8198
+ if (d = V1(t, i), d != 0) return E(u, 1, d), d;
8202
8199
  throw Error("Invalid country calling code");
8203
8200
  }
8204
- return $ != null && (l = v($, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new T(m.substring(h.length)), m = f($, 1), m = new RegExp(v(m, 2)), K1(h, $, null), h = h.toString(), !G(m, t.toString()) && G(m, h) || l1(d, t.toString(), $, -1) == 3)) ? (s.g(h), r && E(o, 6, 10), E(o, 1, l), l) : (E(o, 1, 0), 0);
8205
- }
8206
- function K1(d, t, $) {
8207
- var s = d.toString(), r = s.length, o = f(t, 15);
8208
- if (r != 0 && o != null && o.length != 0) {
8209
- var l = new RegExp("^(?:" + o + ")");
8210
- if (r = l.exec(s)) {
8211
- o = new RegExp(v(f(t, 1), 2));
8212
- var h = G(o, s), m = r.length - 1;
8213
- t = f(t, 16), t == null || t.length == 0 || r[m] == null || r[m].length == 0 ? (!h || G(o, s.substring(r[0].length))) && ($ != null && 0 < m && r[m] != null && $.g(r[1]), d.set(s.substring(r[0].length))) : (s = s.replace(l, t), (!h || G(o, s)) && ($ != null && 0 < m && $.g(r[1]), d.set(s)));
8201
+ return $ != null && (l = S($, 10), h = "" + l, m = t.toString(), m.lastIndexOf(h, 0) == 0 && (h = new L(m.substring(h.length)), m = p($, 1), m = new RegExp(S(m, 2)), H1(h, $, null), h = h.toString(), !G(m, t.toString()) && G(m, h) || a1(d, t.toString(), $, -1) == 3)) ? (i.g(h), s && E(u, 6, 10), E(u, 1, l), l) : (E(u, 1, 0), 0);
8202
+ }
8203
+ function H1(d, t, $) {
8204
+ var i = d.toString(), s = i.length, u = p(t, 15);
8205
+ if (s != 0 && u != null && u.length != 0) {
8206
+ var l = new RegExp("^(?:" + u + ")");
8207
+ if (s = l.exec(i)) {
8208
+ u = new RegExp(S(p(t, 1), 2));
8209
+ var h = G(u, i), m = s.length - 1;
8210
+ t = p(t, 16), t == null || t.length == 0 || s[m] == null || s[m].length == 0 ? (!h || G(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 || G(u, i)) && ($ != null && 0 < m && $.g(s[1]), d.set(i)));
8214
8211
  }
8215
8212
  }
8216
8213
  }
8217
8214
  function z(d, t, $) {
8218
- if (!o1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8219
- return H1(d, t, $, !0);
8215
+ if (!u1($) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
8216
+ return j1(d, t, $, !0);
8220
8217
  }
8221
- function H1(d, t, $, s) {
8218
+ function j1(d, t, $, i) {
8222
8219
  if (t == null) throw Error("The string supplied did not seem to be a phone number");
8223
8220
  if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
8224
- var r = new T(), o = t.indexOf(";phone-context=");
8225
- if (o === -1) o = null;
8226
- else if (o += 15, o >= t.length) o = "";
8221
+ var s = new L(), u = t.indexOf(";phone-context=");
8222
+ if (u === -1) u = null;
8223
+ else if (u += 15, u >= t.length) u = "";
8227
8224
  else {
8228
- var l = t.indexOf(";", o);
8229
- o = l !== -1 ? t.substring(o, l) : t.substring(o);
8225
+ var l = t.indexOf(";", u);
8226
+ u = l !== -1 ? t.substring(u, l) : t.substring(u);
8230
8227
  }
8231
- var h = o;
8232
- if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = y2.exec(h), h = _2.exec(h), l = l !== null || h !== null), !l || (o != null ? (o.charAt(0) === "+" && r.g(o), o = t.indexOf("tel:"), r.g(t.substring(0 <= o ? o + 4 : 0, t.indexOf(";phone-context=")))) : (o = r.g, l = t ?? "", h = l.search(p2), 0 <= h ? (l = l.substring(h), l = l.replace(C2, ""), h = l.search(g2), 0 <= h && (l = l.substring(0, h))) : l = "", o.call(r, l)), o = r.toString(), l = o.indexOf(";isub="), 0 < l && (B(r), r.g(o.substring(0, l))), !P1(r.toString()))) throw Error("The string supplied did not seem to be a phone number");
8233
- if (o = r.toString(), !(o1($) || o != null && 0 < o.length && Q.test(o))) throw Error("Invalid country calling code");
8234
- o = new V(), s && E(o, 5, t);
8228
+ var h = u;
8229
+ if (h == null ? l = !0 : h.length === 0 ? l = !1 : (l = y2.exec(h), h = _2.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(p2), 0 <= h ? (l = l.substring(h), l = l.replace(C2, ""), h = l.search(g2), 0 <= h && (l = l.substring(0, h))) : l = "", u.call(s, l)), u = s.toString(), l = u.indexOf(";isub="), 0 < l && (B(s), s.g(u.substring(0, l))), !P1(s.toString()))) throw Error("The string supplied did not seem to be a phone number");
8230
+ if (u = s.toString(), !(u1($) || u != null && 0 < u.length && Q.test(u))) throw Error("Invalid country calling code");
8231
+ u = new V(), i && E(u, 5, t);
8235
8232
  d: {
8236
- if (t = r.toString(), l = t.search(M1), 0 <= l && P1(t.substring(0, l))) {
8237
- h = t.match(M1);
8233
+ if (t = s.toString(), l = t.search(x1), 0 <= l && P1(t.substring(0, l))) {
8234
+ h = t.match(x1);
8238
8235
  for (var m = h.length, F = 1; F < m; ++F) if (h[F] != null && 0 < h[F].length) {
8239
- B(r), r.g(t.substring(0, l)), t = h[F];
8236
+ B(s), s.g(t.substring(0, l)), t = h[F];
8240
8237
  break d;
8241
8238
  }
8242
8239
  }
8243
8240
  t = "";
8244
8241
  }
8245
- 0 < t.length && E(o, 3, t), l = K(d, $), t = new T(), h = 0, m = r.toString();
8242
+ 0 < t.length && E(u, 3, t), l = K(d, $), t = new L(), h = 0, m = s.toString();
8246
8243
  try {
8247
- h = V1(d, m, l, t, s, o);
8244
+ h = K1(d, m, l, t, i, u);
8248
8245
  } catch (_1) {
8249
8246
  if (_1.message == "Invalid country calling code" && Q.test(m)) {
8250
- if (m = m.replace(Q, ""), h = V1(d, m, l, t, s, o), h == 0) throw _1;
8247
+ if (m = m.replace(Q, ""), h = K1(d, m, l, t, i, u), h == 0) throw _1;
8251
8248
  } else throw _1;
8252
8249
  }
8253
- if (h != 0 ? (r = e1(h), r != $ && (l = d1(d, h, r))) : (R1(r), t.g(r.toString()), $ != null ? (h = v(l, 10), E(
8254
- o,
8250
+ if (h != 0 ? (s = e1(h), s != $ && (l = d1(d, h, s))) : (B1(s), t.g(s.toString()), $ != null ? (h = S(l, 10), E(
8251
+ u,
8255
8252
  1,
8256
8253
  h
8257
- )) : s && (delete o.h[6], o.g && delete o.g[6])), 2 > t.h.length || (l != null && ($ = new T(), r = new T(t.toString()), K1(r, l, $), d = l1(d, r.toString(), l, -1), d != 2 && d != 4 && d != 5 && (t = r, s && 0 < $.toString().length && E(o, 7, $.toString()))), s = t.toString(), d = s.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
8254
+ )) : i && (delete u.h[6], u.g && delete u.g[6])), 2 > t.h.length || (l != null && ($ = new L(), s = new L(t.toString()), H1(s, l, $), d = a1(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");
8258
8255
  if (17 < d) throw Error("The string supplied is too long to be a phone number");
8259
- if (1 < s.length && s.charAt(0) == "0") {
8260
- for (E(o, 4, !0), d = 1; d < s.length - 1 && s.charAt(d) == "0"; ) d++;
8261
- d != 1 && E(o, 8, d);
8256
+ if (1 < i.length && i.charAt(0) == "0") {
8257
+ for (E(u, 4, !0), d = 1; d < i.length - 1 && i.charAt(d) == "0"; ) d++;
8258
+ d != 1 && E(u, 8, d);
8262
8259
  }
8263
- return E(o, 2, parseInt(s, 10)), o;
8260
+ return E(u, 2, parseInt(i, 10)), u;
8264
8261
  }
8265
8262
  function G(d, t) {
8266
8263
  return !!((d = typeof d == "string" ? t.match("^(?:" + d + ")$") : t.match(d)) && d[0].length == t.length);
8267
8264
  }
8268
8265
  function w2(d) {
8269
- this.fa = RegExp(" "), this.ja = "", this.v = new T(), this.da = "", this.s = new T(), this.ba = new T(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = D.g(), this.$ = 0, this.h = new T(), this.ha = !1, this.o = "", this.g = new T(), this.j = [], this.ka = d, this.l = z1(this, this.ka);
8266
+ 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 = Z1(this, this.ka);
8270
8267
  }
8271
- var j1 = new W();
8272
- E(j1, 11, "NA");
8273
- var b2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), W1 = /[- ]/;
8274
- function z1(d, t) {
8268
+ var W1 = new W();
8269
+ E(W1, 11, "NA");
8270
+ var b2 = RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)*$"), z1 = /[- ]/;
8271
+ function Z1(d, t) {
8275
8272
  var $ = d.ga;
8276
- return t = o1(t) ? F1($, t) : 0, d = K(d.ga, e1(t)), d ?? j1;
8273
+ return t = u1(t) ? U1($, t) : 0, d = K(d.ga, e1(t)), d ?? W1;
8277
8274
  }
8278
- function Z1(d) {
8275
+ function Y1(d) {
8279
8276
  for (var t = d.j.length, $ = 0; $ < t; ++$) {
8280
- var s = d.j[$], r = v(s, 1);
8281
- if (d.da == r) return !1;
8282
- var o = d, l = s, h = v(l, 1);
8283
- B(o.v);
8284
- var m = o;
8285
- l = v(l, 2);
8277
+ var i = d.j[$], s = S(i, 1);
8278
+ if (d.da == s) return !1;
8279
+ var u = d, l = i, h = S(l, 1);
8280
+ B(u.v);
8281
+ var m = u;
8282
+ l = S(l, 2);
8286
8283
  var F = "999999999999999".match(h)[0];
8287
- if (F.length < m.g.h.length ? m = "" : (m = F.replace(new RegExp(h, "g"), l), m = m.replace(RegExp("9", "g"), " ")), 0 < m.length ? (o.v.g(m), o = !0) : o = !1, o) return d.da = r, d.ha = W1.test(f(s, 4)), d.$ = 0, !0;
8284
+ if (F.length < m.g.h.length ? m = "" : (m = F.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;
8288
8285
  }
8289
8286
  return d.u = !1;
8290
8287
  }
8291
- function Y1(d, t) {
8292
- for (var $ = [], s = t.length - 3, r = d.j.length, o = 0; o < r; ++o) {
8293
- var l = d.j[o];
8294
- U(l, 3) == 0 ? $.push(d.j[o]) : (l = f(l, 3, Math.min(s, U(l, 3) - 1)), t.search(l) == 0 && $.push(d.j[o]));
8288
+ function J1(d, t) {
8289
+ for (var $ = [], i = t.length - 3, s = d.j.length, u = 0; u < s; ++u) {
8290
+ var l = d.j[u];
8291
+ U(l, 3) == 0 ? $.push(d.j[u]) : (l = p(l, 3, Math.min(i, U(l, 3) - 1)), t.search(l) == 0 && $.push(d.j[u]));
8295
8292
  }
8296
8293
  d.j = $;
8297
8294
  }
8298
8295
  function N2(d, t) {
8299
8296
  d.s.g(t);
8300
8297
  var $ = t;
8301
- if (E1.test($) || d.s.h.length == 1 && f2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = C1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
8298
+ if (D1.test($) || d.s.h.length == 1 && f2.test($) ? (t == "+" ? ($ = t, d.ba.g(t)) : ($ = C1[t], d.ba.g($), d.g.g($)), t = $) : (d.u = !1, d.la = !0), !d.u) {
8302
8299
  if (!d.la) {
8303
- if (d2(d)) {
8304
- if (t2(d)) return J1(d);
8305
- } else if (0 < d.o.length && (t = d.g.toString(), B(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), B(d.h), d.h.g(t.substring(0, $))), d.o != Q1(d)) return d.h.g(" "), J1(d);
8300
+ if (t2(d)) {
8301
+ if (e2(d)) return q1(d);
8302
+ } else if (0 < d.o.length && (t = d.g.toString(), B(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), $ = t.lastIndexOf(d.o), B(d.h), d.h.g(t.substring(0, $))), d.o != d2(d)) return d.h.g(" "), q1(d);
8306
8303
  }
8307
8304
  return d.s.toString();
8308
8305
  }
@@ -8312,96 +8309,96 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8312
8309
  case 2:
8313
8310
  return d.s.toString();
8314
8311
  case 3:
8315
- if (d2(d)) d.ea = !0;
8316
- else return d.o = Q1(d), y1(d);
8312
+ if (t2(d)) d.ea = !0;
8313
+ else return d.o = d2(d), y1(d);
8317
8314
  default:
8318
- return d.ea ? (t2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = e2(d, t), $ = q1(d), 0 < $.length ? $ : (Y1(d, d.g.toString()), Z1(d) ? X1(d) : d.u ? a1(d, t) : d.s.toString())) : y1(d);
8315
+ return d.ea ? (e2(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = $2(d, t), $ = X1(d), 0 < $.length ? $ : (J1(d, d.g.toString()), Y1(d) ? Q1(d) : d.u ? h1(d, t) : d.s.toString())) : y1(d);
8319
8316
  }
8320
8317
  }
8321
- function J1(d) {
8318
+ function q1(d) {
8322
8319
  return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, B(d.v), d.da = "", y1(d);
8323
8320
  }
8324
- function q1(d) {
8325
- for (var t = d.g.toString(), $ = d.j.length, s = 0; s < $; ++s) {
8326
- var r = d.j[s], o = v(r, 1);
8327
- if (new RegExp("^(?:" + o + ")$").test(t) && (d.ha = W1.test(f(r, 4)), r = t.replace(new RegExp(o, "g"), f(r, 2)), r = a1(d, r), r1(r, h2) == d.ba)) return r;
8321
+ function X1(d) {
8322
+ for (var t = d.g.toString(), $ = d.j.length, i = 0; i < $; ++i) {
8323
+ var s = d.j[i], u = S(s, 1);
8324
+ 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), o1(s, h2) == d.ba)) return s;
8328
8325
  }
8329
8326
  return "";
8330
8327
  }
8331
- function a1(d, t) {
8328
+ function h1(d, t) {
8332
8329
  var $ = d.h.h.length;
8333
8330
  return d.ha && 0 < $ && d.h.toString().charAt($ - 1) != " " ? d.h + " " + t : d.h + t;
8334
8331
  }
8335
8332
  function y1(d) {
8336
8333
  var t = d.g.toString();
8337
8334
  if (3 <= t.length) {
8338
- for (var $ = d.ca && d.o.length == 0 && 0 < U(d.l, 20) ? M(d.l, 20) : M(d.l, 19), s = $.length, r = 0; r < s; ++r) {
8339
- var o = $[r];
8340
- 0 < d.o.length && k1(v(o, 4)) && !f(o, 6) && !R(o, 5) || (d.o.length != 0 || d.ca || k1(v(o, 4)) || f(o, 6)) && b2.test(v(o, 2)) && d.j.push(o);
8335
+ for (var $ = d.ca && d.o.length == 0 && 0 < U(d.l, 20) ? x(d.l, 20) : x(d.l, 19), i = $.length, s = 0; s < i; ++s) {
8336
+ var u = $[s];
8337
+ 0 < d.o.length && O1(S(u, 4)) && !p(u, 6) && !R(u, 5) || (d.o.length != 0 || d.ca || O1(S(u, 4)) || p(u, 6)) && b2.test(S(u, 2)) && d.j.push(u);
8341
8338
  }
8342
- return Y1(d, t), t = q1(d), 0 < t.length ? t : Z1(d) ? X1(d) : d.s.toString();
8339
+ return J1(d, t), t = X1(d), 0 < t.length ? t : Y1(d) ? Q1(d) : d.s.toString();
8343
8340
  }
8344
- return a1(d, t);
8341
+ return h1(d, t);
8345
8342
  }
8346
- function X1(d) {
8343
+ function Q1(d) {
8347
8344
  var t = d.g.toString(), $ = t.length;
8348
8345
  if (0 < $) {
8349
- for (var s = "", r = 0; r < $; r++) s = e2(d, t.charAt(r));
8350
- return d.u ? a1(d, s) : d.s.toString();
8346
+ for (var i = "", s = 0; s < $; s++) i = $2(d, t.charAt(s));
8347
+ return d.u ? h1(d, i) : d.s.toString();
8351
8348
  }
8352
8349
  return d.h.toString();
8353
8350
  }
8354
- function Q1(d) {
8351
+ function d2(d) {
8355
8352
  var t = d.g.toString(), $ = 0;
8356
- if (f(d.l, 10) != 1) var s = !1;
8357
- else s = d.g.toString(), s = s.charAt(0) == "1" && s.charAt(1) != "0" && s.charAt(1) != "1";
8358
- return s ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(d.l, 15) && (s = new RegExp("^(?:" + f(d.l, 15) + ")"), s = t.match(s), s != null && s[0] != null && 0 < s[0].length && (d.ca = !0, $ = s[0].length, d.h.g(t.substring(0, $)))), B(d.g), d.g.g(t.substring($)), t.substring(0, $);
8353
+ if (p(d.l, 10) != 1) var i = !1;
8354
+ else i = d.g.toString(), i = i.charAt(0) == "1" && i.charAt(1) != "0" && i.charAt(1) != "1";
8355
+ return i ? ($ = 1, d.h.g("1").g(" "), d.ca = !0) : R(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, $)))), B(d.g), d.g.g(t.substring($)), t.substring(0, $);
8359
8356
  }
8360
- function d2(d) {
8361
- var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + f(d.l, 11) + ")");
8357
+ function t2(d) {
8358
+ var t = d.ba.toString(), $ = new RegExp("^(?:\\+|" + p(d.l, 11) + ")");
8362
8359
  return $ = t.match($), $ != null && $[0] != null && 0 < $[0].length ? (d.ca = !0, $ = $[0].length, B(d.g), d.g.g(t.substring($)), B(d.h), d.h.g(t.substring(0, $)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
8363
8360
  }
8364
- function t2(d) {
8361
+ function e2(d) {
8365
8362
  if (d.g.h.length == 0) return !1;
8366
- var t = new T(), $ = U1(d.g, t);
8367
- return $ == 0 ? !1 : (B(d.g), d.g.g(t.toString()), t = e1($), t == "001" ? d.l = K(d.ga, "" + $) : t != d.ka && (d.l = z1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
8363
+ var t = new L(), $ = V1(d.g, t);
8364
+ return $ == 0 ? !1 : (B(d.g), d.g.g(t.toString()), t = e1($), t == "001" ? d.l = K(d.ga, "" + $) : t != d.ka && (d.l = Z1(d, t)), d.h.g("" + $).g(" "), d.o = "", !0);
8368
8365
  }
8369
- function e2(d, t) {
8366
+ function $2(d, t) {
8370
8367
  var $ = d.v.toString();
8371
8368
  if (0 <= $.substring(d.$).search(d.fa)) {
8372
- var s = $.search(d.fa);
8373
- return t = $.replace(d.fa, t), B(d.v), d.v.g(t), d.$ = s, t.substring(0, d.$ + 1);
8369
+ var i = $.search(d.fa);
8370
+ return t = $.replace(d.fa, t), B(d.v), d.v.g(t), d.$ = i, t.substring(0, d.$ + 1);
8374
8371
  }
8375
8372
  return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
8376
8373
  }
8377
- const h1 = { 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 };
8374
+ const c1 = { 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 };
8378
8375
  e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
8379
8376
  try {
8380
- const $ = d.replace(/[^+0-9]/g, ""), s = new w2(t);
8377
+ const $ = d.replace(/[^+0-9]/g, ""), i = new w2(t);
8381
8378
  t = "";
8382
- for (let r = 0; r < $.length; r++) s.ja = N2(s, $.charAt(r)), t = s.ja;
8379
+ for (let s = 0; s < $.length; s++) i.ja = N2(i, $.charAt(s)), t = i.ja;
8383
8380
  return t;
8384
8381
  } catch {
8385
8382
  return d;
8386
8383
  }
8387
8384
  }), e("intlTelInputUtilsTemp.formatNumber", (d, t, $) => {
8388
8385
  try {
8389
- const r = D.g(), o = z(r, d, t);
8390
- var s = J(r, o, -1);
8391
- return s == 0 || s == 4 ? r.format(o, typeof $ > "u" ? 0 : $) : d;
8386
+ const s = D.g(), u = z(s, d, t);
8387
+ var i = J(s, u, -1);
8388
+ return i == 0 || i == 4 ? s.format(u, typeof $ > "u" ? 0 : $) : d;
8392
8389
  } catch {
8393
8390
  return d;
8394
8391
  }
8395
- }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, s) => {
8392
+ }), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, $, i) => {
8396
8393
  try {
8397
8394
  const m = D.g();
8398
8395
  d: {
8399
- var r = m;
8400
- if (o1(d)) {
8401
- var o = u1(K(r, d), $);
8396
+ var s = m;
8397
+ if (u1(d)) {
8398
+ var u = l1(K(s, d), $);
8402
8399
  try {
8403
- if (R(o, 6)) {
8404
- var l = f(o, 6), h = H1(r, l, d, !1);
8400
+ if (R(u, 6)) {
8401
+ var l = p(u, 6), h = j1(s, l, d, !1);
8405
8402
  break d;
8406
8403
  }
8407
8404
  } catch {
@@ -8409,47 +8406,47 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8409
8406
  }
8410
8407
  h = null;
8411
8408
  }
8412
- return m.format(h, s ? 0 : t ? 2 : 1);
8409
+ return m.format(h, i ? 0 : t ? 2 : 1);
8413
8410
  } catch {
8414
8411
  return "";
8415
8412
  }
8416
8413
  }), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
8417
8414
  try {
8418
- return f(z(D.g(), d, t), 3);
8415
+ return p(z(D.g(), d, t), 3);
8419
8416
  } catch {
8420
8417
  return "";
8421
8418
  }
8422
8419
  }), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
8423
8420
  try {
8424
8421
  const l = D.g(), h = z(l, d, t);
8425
- var $ = G1(l, h), s = d1(l, v(h, 1), $);
8426
- if (s == null) var r = -1;
8422
+ var $ = F1(l, h), i = d1(l, S(h, 1), $);
8423
+ if (i == null) var s = -1;
8427
8424
  else {
8428
- var o = t1(h);
8429
- r = m1(o, s);
8425
+ var u = t1(h);
8426
+ s = m1(u, i);
8430
8427
  }
8431
- return r;
8428
+ return s;
8432
8429
  } catch {
8433
8430
  return -99;
8434
8431
  }
8435
8432
  }), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
8436
8433
  if (!t) return 1;
8437
8434
  try {
8438
- const $ = D.g(), s = z($, d, t);
8439
- return J($, s, -1);
8435
+ const $ = D.g(), i = z($, d, t);
8436
+ return J($, i, -1);
8440
8437
  } catch ($) {
8441
8438
  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;
8442
8439
  }
8443
8440
  }), e("intlTelInputUtilsTemp.isValidNumber", (d, t) => {
8444
8441
  try {
8445
8442
  const m = D.g();
8446
- var $ = z(m, d, t), s = G1(m, $);
8443
+ var $ = z(m, d, t), i = F1(m, $);
8447
8444
  d = m;
8448
- var r = v($, 1), o = d1(d, r, s);
8449
- if (o == null || s != "001" && r != F1(d, s)) var l = !1;
8445
+ var s = S($, 1), u = d1(d, s, i);
8446
+ if (u == null || i != "001" && s != U1(d, i)) var l = !1;
8450
8447
  else {
8451
8448
  var h = t1($);
8452
- l = m1(h, o) != -1;
8449
+ l = m1(h, u) != -1;
8453
8450
  }
8454
8451
  return l;
8455
8452
  } catch {
@@ -8457,33 +8454,33 @@ const V2 = (y) => !C.utils && !C.startedLoadingUtilsScript ? (C.startedLoadingUt
8457
8454
  }
8458
8455
  }), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, $) => {
8459
8456
  try {
8460
- const s = D.g(), r = z(s, d, t);
8457
+ const i = D.g(), s = z(i, d, t);
8461
8458
  if ($) {
8462
- const o = J(s, r, h1[$]) === 0;
8459
+ const u = J(i, s, c1[$]) === 0;
8463
8460
  if ($ === "FIXED_LINE_OR_MOBILE") {
8464
- const l = J(s, r, h1.MOBILE) === 0, h = J(s, r, h1.FIXED_LINE) === 0;
8465
- return l || h || o;
8461
+ const l = J(i, s, c1.MOBILE) === 0, h = J(i, s, c1.FIXED_LINE) === 0;
8462
+ return l || h || u;
8466
8463
  }
8467
- return o;
8464
+ return u;
8468
8465
  }
8469
- return J(s, r, -1) === 0;
8466
+ return J(i, s, -1) === 0;
8470
8467
  } catch {
8471
8468
  return !1;
8472
8469
  }
8473
8470
  }), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
8474
8471
  try {
8475
- return f(z(D.g(), d, t), 2).toString();
8472
+ return p(z(D.g(), d, t), 2).toString();
8476
8473
  } catch {
8477
8474
  return "";
8478
8475
  }
8479
- }), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", h1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
8476
+ }), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", c1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
8480
8477
  })();
8481
8478
  const K2 = window.intlTelInputUtilsTemp;
8482
8479
  delete window.intlTelInputUtilsTemp;
8483
8480
  C.utils = K2;
8484
8481
  const j2 = {
8485
8482
  __name: "IntlTelInputWithUtils",
8486
- props: /* @__PURE__ */ $2({
8483
+ props: /* @__PURE__ */ n2({
8487
8484
  disabled: {
8488
8485
  type: Boolean,
8489
8486
  default: !1
@@ -8507,46 +8504,46 @@ const j2 = {
8507
8504
  },
8508
8505
  modelModifiers: {}
8509
8506
  }),
8510
- emits: /* @__PURE__ */ $2([
8507
+ emits: /* @__PURE__ */ n2([
8511
8508
  "changeNumber",
8512
8509
  "changeCountry",
8513
8510
  "changeValidity",
8514
8511
  "changeErrorCode"
8515
8512
  ], ["update:modelValue"]),
8516
8513
  setup(y, { expose: e, emit: n }) {
8517
- const i = A2(y, "modelValue"), u = y, a = n, c = I1(), p = I1(), g = I1(!1), b = () => p.value ? u.options.strictMode ? p.value.isValidNumberPrecise() : p.value.isValidNumber() : null, S = () => {
8518
- let I = b();
8519
- g.value !== I && (g.value = I, a("changeValidity", !!I), a(
8514
+ const r = A2(y, "modelValue"), o = y, a = n, c = I1(), g = I1(), f = I1(!1), b = () => g.value ? o.options.strictMode ? g.value.isValidNumberPrecise() : g.value.isValidNumber() : null, _ = () => {
8515
+ let v = b();
8516
+ f.value !== v && (f.value = v, a("changeValidity", !!v), a(
8520
8517
  "changeErrorCode",
8521
- I ? null : p.value.getValidationError()
8518
+ v ? null : g.value.getValidationError()
8522
8519
  ));
8523
- }, _ = () => {
8524
- var I;
8525
- a("changeNumber", ((I = p.value) == null ? void 0 : I.getNumber()) ?? ""), S();
8520
+ }, I = () => {
8521
+ var v;
8522
+ a("changeNumber", ((v = g.value) == null ? void 0 : v.getNumber()) ?? ""), _();
8526
8523
  }, N = () => {
8527
- var I;
8528
- a("changeCountry", ((I = p.value) == null ? void 0 : I.getSelectedCountryData().iso2) ?? ""), _(), S();
8524
+ var v;
8525
+ a("changeCountry", ((v = g.value) == null ? void 0 : v.getSelectedCountryData().iso2) ?? ""), I(), _();
8529
8526
  };
8530
- return T2(() => {
8531
- c.value && (p.value = C(c.value, u.options), u.value && p.value.setNumber(u.value), u.disabled && p.value.setDisabled(u.disabled));
8532
- }), L2(
8533
- () => u.disabled,
8534
- (I) => {
8527
+ return L2(() => {
8528
+ c.value && (g.value = C(c.value, o.options), o.value && g.value.setNumber(o.value), o.disabled && g.value.setDisabled(o.disabled));
8529
+ }), T2(
8530
+ () => o.disabled,
8531
+ (v) => {
8535
8532
  var A;
8536
- return (A = p.value) == null ? void 0 : A.setDisabled(I);
8533
+ return (A = g.value) == null ? void 0 : A.setDisabled(v);
8537
8534
  }
8538
8535
  ), E2(() => {
8539
- var I;
8540
- return (I = p.value) == null ? void 0 : I.destroy();
8541
- }), e({ instance: p, input: c }), (I, A) => D2((M2(), P2("input", x2({
8536
+ var v;
8537
+ return (v = g.value) == null ? void 0 : v.destroy();
8538
+ }), e({ instance: g, input: c }), (v, A) => D2((M2(), x2("input", P2({
8542
8539
  ref_key: "input",
8543
8540
  ref: c,
8544
- "onUpdate:modelValue": A[0] || (A[0] = (P) => i.value = P),
8541
+ "onUpdate:modelValue": A[0] || (A[0] = (M) => r.value = M),
8545
8542
  type: "tel",
8546
8543
  onCountrychange: N,
8547
- onInput: _
8544
+ onInput: I
8548
8545
  }, y.inputProps), null, 16)), [
8549
- [R2, i.value]
8546
+ [R2, r.value]
8550
8547
  ]);
8551
8548
  }
8552
8549
  };