intl-tel-input 27.3.0 → 28.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/css/intlTelInput-no-assets.css +2 -2
  2. package/dist/css/intlTelInput.css +3 -3
  3. package/dist/js/data.d.ts +1 -4
  4. package/dist/js/data.js +3 -9
  5. package/dist/js/data.min.js +2 -2
  6. package/dist/js/data.mjs +2 -8
  7. package/dist/js/i18n.d.ts +1 -1592
  8. package/dist/js/intlTelInput.d.ts +62 -49
  9. package/dist/js/intlTelInput.js +221 -182
  10. package/dist/js/intlTelInput.min.js +6 -6
  11. package/dist/js/intlTelInput.mjs +219 -180
  12. package/dist/js/intlTelInputWithUtils.js +622 -568
  13. package/dist/js/intlTelInputWithUtils.min.js +6 -6
  14. package/dist/js/intlTelInputWithUtils.mjs +620 -566
  15. package/dist/js/utils.js +56 -55
  16. package/package.json +14 -181
  17. package/CHANGELOG.md +0 -33
  18. package/angular/README.md +0 -13
  19. package/angular/dist/IntlTelInput.d.ts +0 -110
  20. package/angular/dist/IntlTelInput.js +0 -5096
  21. package/angular/dist/IntlTelInputWithUtils.d.ts +0 -3
  22. package/angular/dist/IntlTelInputWithUtils.js +0 -11435
  23. package/react/README.md +0 -13
  24. package/react/dist/IntlTelInput.d.ts +0 -25
  25. package/react/dist/IntlTelInput.js +0 -4788
  26. package/react/dist/IntlTelInputWithUtils.d.ts +0 -4
  27. package/react/dist/IntlTelInputWithUtils.js +0 -11127
  28. package/svelte/README.md +0 -14
  29. package/svelte/src/IntlTelInput.svelte +0 -233
  30. package/svelte/src/IntlTelInput.svelte.d.ts +0 -36
  31. package/svelte/src/IntlTelInputWithUtils.svelte +0 -24
  32. package/vue/README.md +0 -14
  33. package/vue/dist/IntlTelInput-jw1tkqdD.js +0 -2657
  34. package/vue/dist/IntlTelInput.js +0 -5
  35. package/vue/dist/IntlTelInput.vue.d.ts +0 -43
  36. package/vue/dist/IntlTelInputWithUtils.js +0 -49403
  37. package/vue/dist/index.d.ts +0 -4
  38. package/vue/dist/indexWithUtils.d.ts +0 -3
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v27.3.0
2
+ * International Telephone Input v28.0.0
3
3
  * git+https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -23,13 +23,13 @@ var _factory = (() => {
23
23
  };
24
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
25
 
26
- // src/js/intlTelInputWithUtils.ts
26
+ // packages/core/src/js/intlTelInputWithUtils.ts
27
27
  var intlTelInputWithUtils_exports = {};
28
28
  __export(intlTelInputWithUtils_exports, {
29
29
  default: () => intlTelInputWithUtils_default
30
30
  });
31
31
 
32
- // src/js/data.ts
32
+ // packages/core/src/js/data.ts
33
33
  var rawCountryData = [
34
34
  [
35
35
  "af",
@@ -1774,20 +1774,14 @@ var _factory = (() => {
1774
1774
  dialCode: c[1],
1775
1775
  priority: c[2] || 0,
1776
1776
  areaCodes: c[3] || null,
1777
- nationalPrefix: c[4] || null,
1778
- normalisedName: "",
1779
- // populated in the plugin
1780
- initials: "",
1781
- // populated in the plugin
1782
- dialCodePlus: ""
1783
- // populated in the plugin
1777
+ nationalPrefix: c[4] || null
1784
1778
  });
1785
1779
  }
1786
1780
  var iso2Set = new Set(allCountries.map((c) => c.iso2));
1787
1781
  var isIso2 = (val) => iso2Set.has(val);
1788
1782
  var data_default = allCountries;
1789
1783
 
1790
- // src/js/constants.ts
1784
+ // packages/core/src/js/constants.ts
1791
1785
  var EVENTS = {
1792
1786
  OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
1793
1787
  CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
@@ -1833,10 +1827,6 @@ var _factory = (() => {
1833
1827
  HIDDEN_SEARCH_RESET_MS: 1e3,
1834
1828
  NEXT_TICK: 0
1835
1829
  };
1836
- var SENTINELS = {
1837
- UNKNOWN_NUMBER_TYPE: -99,
1838
- UNKNOWN_VALIDATION_ERROR: -99
1839
- };
1840
1830
  var LAYOUT = {
1841
1831
  NARROW_VIEWPORT_WIDTH: 500,
1842
1832
  // keep in sync with .iti__country-list CSS media query
@@ -1878,6 +1868,12 @@ var _factory = (() => {
1878
1868
  var INITIAL_COUNTRY = {
1879
1869
  AUTO: "auto"
1880
1870
  };
1871
+ var NUMBER_FORMATS = [
1872
+ "E164",
1873
+ "INTERNATIONAL",
1874
+ "NATIONAL",
1875
+ "RFC3966"
1876
+ ];
1881
1877
  var NUMBER_TYPES = [
1882
1878
  "FIXED_LINE",
1883
1879
  "MOBILE",
@@ -1892,11 +1888,21 @@ var _factory = (() => {
1892
1888
  "VOICEMAIL",
1893
1889
  "UNKNOWN"
1894
1890
  ];
1895
- var NUMBER_TYPE_SET = new Set(NUMBER_TYPES);
1891
+ var VALIDATION_ERRORS = [
1892
+ "IS_POSSIBLE",
1893
+ "INVALID_COUNTRY_CODE",
1894
+ "TOO_SHORT",
1895
+ "TOO_LONG",
1896
+ "IS_POSSIBLE_LOCAL_ONLY",
1897
+ "INVALID_LENGTH"
1898
+ ];
1899
+ var toEnumObject = (arr) => Object.fromEntries(arr.map((v) => [v, v]));
1900
+ var NUMBER_FORMAT = toEnumObject(NUMBER_FORMATS);
1901
+ var NUMBER_TYPE = toEnumObject(NUMBER_TYPES);
1902
+ var VALIDATION_ERROR = toEnumObject(VALIDATION_ERRORS);
1896
1903
  var DATA_KEYS = {
1897
- // e.g. <li data-country-code="us"> for country items in dropdown
1898
- // in the future, the value should be changed to "iso2", but this is a breaking change for another day
1899
- ISO2: "countryCode",
1904
+ // e.g. <li data-iso2="us"> for country items in dropdown
1905
+ ISO2: "iso2",
1900
1906
  DIAL_CODE: "dialCode",
1901
1907
  // e.g. <input data-intl-tel-input-id="0"> on the input element
1902
1908
  INSTANCE_ID: "intlTelInputId"
@@ -1913,7 +1919,7 @@ var _factory = (() => {
1913
1919
  MODAL: "aria-modal"
1914
1920
  };
1915
1921
 
1916
- // src/js/i18n/en.ts
1922
+ // packages/core/src/js/i18n/en.ts
1917
1923
  var interfaceTranslations = {
1918
1924
  selectedCountryAriaLabel: "Change country for phone number, currently selected ${countryName} (${dialCode})",
1919
1925
  noCountrySelected: "Select country for phone number",
@@ -1933,7 +1939,7 @@ var _factory = (() => {
1933
1939
  };
1934
1940
  var en_default = interfaceTranslations;
1935
1941
 
1936
- // src/js/core/options.ts
1942
+ // packages/core/src/js/core/options.ts
1937
1943
  var mediaQuery = (q) => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(q).matches;
1938
1944
  var isNarrowViewport = () => mediaQuery(`(max-width: ${LAYOUT.NARROW_VIEWPORT_WIDTH}px)`);
1939
1945
  var computeDefaultUseFullscreenPopup = () => {
@@ -1948,7 +1954,7 @@ var _factory = (() => {
1948
1954
  //* Whether or not to allow the dropdown.
1949
1955
  allowDropdown: true,
1950
1956
  //* The number type to enforce during validation.
1951
- allowedNumberTypes: ["MOBILE", "FIXED_LINE"],
1957
+ allowedNumberTypes: [NUMBER_TYPE.MOBILE, NUMBER_TYPE.FIXED_LINE],
1952
1958
  //* Whether or not to allow extensions after the main number.
1953
1959
  allowNumberExtensions: false,
1954
1960
  // Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
@@ -1959,6 +1965,8 @@ var _factory = (() => {
1959
1965
  containerClass: "",
1960
1966
  //* Locale for localising country names via Intl.DisplayNames.
1961
1967
  countryNameLocale: "en",
1968
+ //* Override individual country names by iso2 code.
1969
+ countryNameOverrides: {},
1962
1970
  //* The order of the countries in the dropdown. Defaults to alphabetical.
1963
1971
  countryOrder: null,
1964
1972
  //* Add a country search input at the top of the dropdown.
@@ -1992,17 +2000,17 @@ var _factory = (() => {
1992
2000
  //* Display only these countries.
1993
2001
  onlyCountries: null,
1994
2002
  //* Number type to use for placeholders.
1995
- placeholderNumberType: "MOBILE",
2003
+ placeholderNumberType: NUMBER_TYPE.MOBILE,
1996
2004
  //* Add custom classes to the search input element.
1997
2005
  searchInputClass: "",
1998
2006
  //* Display the international dial code next to the selected flag.
1999
- separateDialCode: false,
2007
+ separateDialCode: true,
2000
2008
  //* When strictMode rejects a key (etc), play a short feedback animation
2001
- strictRejectAnimation: false,
2009
+ strictRejectAnimation: true,
2002
2010
  //* Show flags - for both the selected country, and in the country dropdown
2003
2011
  showFlags: true,
2004
2012
  //* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
2005
- strictMode: false,
2013
+ strictMode: true,
2006
2014
  //* Use full screen popup instead of dropdown for country list.
2007
2015
  useFullscreenPopup: computeDefaultUseFullscreenPopup()
2008
2016
  };
@@ -2146,6 +2154,13 @@ var _factory = (() => {
2146
2154
  }
2147
2155
  validatedOptions[key] = value;
2148
2156
  break;
2157
+ case "countryNameOverrides":
2158
+ if (value && !isPlainObject(value)) {
2159
+ warnOption("countryNameOverrides", "an object", value);
2160
+ break;
2161
+ }
2162
+ validatedOptions[key] = value;
2163
+ break;
2149
2164
  case "initialCountry": {
2150
2165
  if (typeof value !== "string") {
2151
2166
  warnOption("initialCountry", "a string", value);
@@ -2164,8 +2179,8 @@ var _factory = (() => {
2164
2179
  break;
2165
2180
  }
2166
2181
  case "placeholderNumberType":
2167
- if (typeof value !== "string" || !NUMBER_TYPE_SET.has(value)) {
2168
- const validTypes = Array.from(NUMBER_TYPE_SET).join(", ");
2182
+ if (typeof value !== "string" || !NUMBER_TYPES.includes(value)) {
2183
+ const validTypes = NUMBER_TYPES.join(", ");
2169
2184
  warnOption("placeholderNumberType", `one of ${validTypes}`, value);
2170
2185
  break;
2171
2186
  }
@@ -2183,8 +2198,8 @@ var _factory = (() => {
2183
2198
  }
2184
2199
  let allValid = true;
2185
2200
  for (const v of value) {
2186
- if (typeof v !== "string" || !NUMBER_TYPE_SET.has(v)) {
2187
- const validTypes = Array.from(NUMBER_TYPE_SET).join(", ");
2201
+ if (typeof v !== "string" || !NUMBER_TYPES.includes(v)) {
2202
+ const validTypes = NUMBER_TYPES.join(", ");
2188
2203
  warnOption(
2189
2204
  "allowedNumberTypes",
2190
2205
  `an array of valid number types (${validTypes})`,
@@ -2246,11 +2261,11 @@ var _factory = (() => {
2246
2261
  o.i18n = { ...en_default, ...o.i18n };
2247
2262
  };
2248
2263
 
2249
- // src/js/helpers/string.ts
2264
+ // packages/core/src/js/helpers/string.ts
2250
2265
  var getNumeric = (s) => s.replace(/\D/g, "");
2251
2266
  var normaliseString = (s = "") => s.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
2252
2267
 
2253
- // src/js/helpers/dom.ts
2268
+ // packages/core/src/js/helpers/dom.ts
2254
2269
  var buildClassNames = (flags) => Object.keys(flags).filter((k) => Boolean(flags[k])).join(" ");
2255
2270
  var createEl = (tagName, attrs, container) => {
2256
2271
  const el = document.createElement(tagName);
@@ -2265,7 +2280,7 @@ var _factory = (() => {
2265
2280
  return el;
2266
2281
  };
2267
2282
 
2268
- // src/js/core/icons.ts
2283
+ // packages/core/src/js/core/icons.ts
2269
2284
  var buildSearchIcon = () => `
2270
2285
  <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${ARIA.HIDDEN}="true">
2271
2286
  <circle cx="11" cy="11" r="7" />
@@ -2292,8 +2307,21 @@ var _factory = (() => {
2292
2307
  <path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>
2293
2308
  </svg>`;
2294
2309
 
2295
- // src/js/core/countrySearch.ts
2296
- var getMatchedCountries = (countries, query) => {
2310
+ // packages/core/src/js/core/countrySearch.ts
2311
+ var buildSearchTokens = (countries) => {
2312
+ const tokens = /* @__PURE__ */ new Map();
2313
+ for (const c of countries) {
2314
+ const normalisedName = normaliseString(c.name);
2315
+ const initials = normalisedName.split(/[^a-z]/).map((word) => word[0]).join("");
2316
+ tokens.set(c.iso2, {
2317
+ normalisedName,
2318
+ initials,
2319
+ dialCodePlus: `+${c.dialCode}`
2320
+ });
2321
+ }
2322
+ return tokens;
2323
+ };
2324
+ var getMatchedCountries = (countries, searchTokens, query) => {
2297
2325
  const normalisedQuery = normaliseString(query);
2298
2326
  const iso2Matches = [];
2299
2327
  const nameStartsWith = [];
@@ -2302,17 +2330,18 @@ var _factory = (() => {
2302
2330
  const dialCodeContains = [];
2303
2331
  const initialsMatches = [];
2304
2332
  for (const c of countries) {
2333
+ const t = searchTokens.get(c.iso2);
2305
2334
  if (c.iso2 === normalisedQuery) {
2306
2335
  iso2Matches.push(c);
2307
- } else if (c.normalisedName.startsWith(normalisedQuery)) {
2336
+ } else if (t.normalisedName.startsWith(normalisedQuery)) {
2308
2337
  nameStartsWith.push(c);
2309
- } else if (c.normalisedName.includes(normalisedQuery)) {
2338
+ } else if (t.normalisedName.includes(normalisedQuery)) {
2310
2339
  nameContains.push(c);
2311
- } else if (normalisedQuery === c.dialCode || normalisedQuery === c.dialCodePlus) {
2340
+ } else if (normalisedQuery === c.dialCode || normalisedQuery === t.dialCodePlus) {
2312
2341
  dialCodeMatches.push(c);
2313
- } else if (c.dialCodePlus.includes(normalisedQuery)) {
2342
+ } else if (t.dialCodePlus.includes(normalisedQuery)) {
2314
2343
  dialCodeContains.push(c);
2315
- } else if (c.initials.includes(normalisedQuery)) {
2344
+ } else if (t.initials.includes(normalisedQuery)) {
2316
2345
  initialsMatches.push(c);
2317
2346
  }
2318
2347
  }
@@ -2327,17 +2356,76 @@ var _factory = (() => {
2327
2356
  ...initialsMatches
2328
2357
  ];
2329
2358
  };
2330
- var findFirstCountryStartingWith = (countries, query) => {
2359
+ var findFirstCountryStartingWith = (countries, searchTokens, query) => {
2331
2360
  const normalisedQuery = normaliseString(query);
2332
2361
  for (const c of countries) {
2333
- if (c.normalisedName.startsWith(normalisedQuery)) {
2362
+ const { normalisedName } = searchTokens.get(c.iso2);
2363
+ if (normalisedName.startsWith(normalisedQuery)) {
2334
2364
  return c;
2335
2365
  }
2336
2366
  }
2337
2367
  return null;
2338
2368
  };
2339
2369
 
2340
- // src/js/core/ui.ts
2370
+ // packages/core/src/js/core/numerals.ts
2371
+ var Numerals = class _Numerals {
2372
+ #userNumeralSet;
2373
+ //* Stateless conversion of any Arabic-Indic / Persian digits to ASCII 0-9.
2374
+ //* Use this when you need to normalise digits without affecting any instance's tracked numeral set (e.g. for the country-search query).
2375
+ static toAscii(str) {
2376
+ if (!str) {
2377
+ return "";
2378
+ }
2379
+ return str.replace(
2380
+ /[٠-٩]/g,
2381
+ (ch) => String.fromCharCode(48 + (ch.charCodeAt(0) - 1632))
2382
+ ).replace(
2383
+ /[۰-۹]/g,
2384
+ (ch) => String.fromCharCode(48 + (ch.charCodeAt(0) - 1776))
2385
+ );
2386
+ }
2387
+ constructor(initialValue) {
2388
+ if (initialValue) {
2389
+ this.#updateNumeralSet(initialValue);
2390
+ }
2391
+ }
2392
+ // If any Arabic-Indic digits, then label it as that set. Same for Persian. Otherwise assume ASCII.
2393
+ #updateNumeralSet(str) {
2394
+ if (/[٠-٩]/.test(str)) {
2395
+ this.#userNumeralSet = "arabic-indic";
2396
+ } else if (/[۰-۹]/.test(str)) {
2397
+ this.#userNumeralSet = "persian";
2398
+ } else {
2399
+ this.#userNumeralSet = "ascii";
2400
+ }
2401
+ }
2402
+ // Denormalise ASCII 0-9 to the user's numeral set. If not yet known, return as-is.
2403
+ // NOTE: normalise is always called before this, so it should be impossible for the numeral set to be unknown at this point.
2404
+ denormalise(str) {
2405
+ if (!this.#userNumeralSet || this.#userNumeralSet === "ascii") {
2406
+ return str;
2407
+ }
2408
+ const base = this.#userNumeralSet === "arabic-indic" ? 1632 : 1776;
2409
+ return str.replace(/[0-9]/g, (d) => String.fromCharCode(base + Number(d)));
2410
+ }
2411
+ // Normalize Eastern Arabic (U+0660-0669) and Persian/Extended Arabic-Indic (U+06F0-06F9) numerals to ASCII 0-9.
2412
+ // Tracks the user's numeral set as a side effect so denormalise can mirror it back.
2413
+ normalise(str) {
2414
+ if (!str) {
2415
+ return "";
2416
+ }
2417
+ this.#updateNumeralSet(str);
2418
+ if (this.#userNumeralSet === "ascii") {
2419
+ return str;
2420
+ }
2421
+ return _Numerals.toAscii(str);
2422
+ }
2423
+ isAscii() {
2424
+ return !this.#userNumeralSet || this.#userNumeralSet === "ascii";
2425
+ }
2426
+ };
2427
+
2428
+ // packages/core/src/js/core/ui.ts
2341
2429
  var UI = class _UI {
2342
2430
  // private
2343
2431
  #options;
@@ -2345,6 +2433,7 @@ var _factory = (() => {
2345
2433
  #isRTL;
2346
2434
  #originalPaddingLeft = "";
2347
2435
  #countries;
2436
+ #searchTokens;
2348
2437
  #searchDebounceTimer = null;
2349
2438
  #inlineDropdownHeight;
2350
2439
  #countryContainerEl;
@@ -2390,8 +2479,9 @@ var _factory = (() => {
2390
2479
  }
2391
2480
  }
2392
2481
  //* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
2393
- buildMarkup(countries) {
2482
+ buildMarkup(countries, searchTokens) {
2394
2483
  this.#countries = countries;
2484
+ this.#searchTokens = searchTokens;
2395
2485
  this.telInputEl.classList.add("iti__tel-input");
2396
2486
  if (!this.telInputEl.hasAttribute("type")) {
2397
2487
  this.telInputEl.setAttribute("type", "tel");
@@ -2759,7 +2849,12 @@ var _factory = (() => {
2759
2849
  if (query === "") {
2760
2850
  matchedCountries = this.#countries;
2761
2851
  } else {
2762
- matchedCountries = getMatchedCountries(this.#countries, query);
2852
+ const normalisedQuery = Numerals.toAscii(query);
2853
+ matchedCountries = getMatchedCountries(
2854
+ this.#countries,
2855
+ this.#searchTokens,
2856
+ normalisedQuery
2857
+ );
2763
2858
  }
2764
2859
  this.#showFilteredCountries(matchedCountries);
2765
2860
  }
@@ -3054,7 +3149,11 @@ var _factory = (() => {
3054
3149
  }
3055
3150
  //* Hidden search (countrySearch disabled): jump to the first list item whose name starts with the query.
3056
3151
  #searchForCountry(query) {
3057
- const match = findFirstCountryStartingWith(this.#countries, query);
3152
+ const match = findFirstCountryStartingWith(
3153
+ this.#countries,
3154
+ this.#searchTokens,
3155
+ query
3156
+ );
3058
3157
  if (match) {
3059
3158
  const listItem = this.#listItemByIso2.get(match.iso2);
3060
3159
  this.#highlightListItem(listItem);
@@ -3079,7 +3178,7 @@ var _factory = (() => {
3079
3178
  }
3080
3179
  if (iso2 && !this.#selectedListItemEl) {
3081
3180
  const newListItem = this.#countryListEl.querySelector(
3082
- `[data-country-code="${iso2}"]`
3181
+ `[data-iso2="${iso2}"]`
3083
3182
  );
3084
3183
  if (newListItem) {
3085
3184
  newListItem.setAttribute(ARIA.SELECTED, "true");
@@ -3267,7 +3366,7 @@ var _factory = (() => {
3267
3366
  }
3268
3367
  };
3269
3368
 
3270
- // src/js/data/country-data.ts
3369
+ // packages/core/src/js/data/country-data.ts
3271
3370
  var processAllCountries = (options) => {
3272
3371
  const { onlyCountries, excludeCountries } = options;
3273
3372
  if (onlyCountries?.length) {
@@ -3282,7 +3381,7 @@ var _factory = (() => {
3282
3381
  return [...data_default];
3283
3382
  };
3284
3383
  var generateCountryNames = (countries, options) => {
3285
- const { countryNameLocale, i18n } = options;
3384
+ const { countryNameLocale, countryNameOverrides } = options;
3286
3385
  let displayNames;
3287
3386
  try {
3288
3387
  const hasDisplayNames = typeof Intl !== "undefined" && typeof Intl.DisplayNames === "function";
@@ -3298,7 +3397,7 @@ var _factory = (() => {
3298
3397
  displayNames = null;
3299
3398
  }
3300
3399
  for (const c of countries) {
3301
- c.name = i18n[c.iso2] || displayNames?.of(c.iso2.toUpperCase()) || "";
3400
+ c.name = countryNameOverrides[c.iso2] || displayNames?.of(c.iso2.toUpperCase()) || "";
3302
3401
  }
3303
3402
  };
3304
3403
  var processDialCodes = (countries) => {
@@ -3366,15 +3465,8 @@ var _factory = (() => {
3366
3465
  return a.name.localeCompare(b.name);
3367
3466
  });
3368
3467
  };
3369
- var cacheSearchTokens = (countries) => {
3370
- for (const c of countries) {
3371
- c.normalisedName = normaliseString(c.name);
3372
- c.initials = c.normalisedName.split(/[^a-z]/).map((word) => word[0]).join("");
3373
- c.dialCodePlus = `+${c.dialCode}`;
3374
- }
3375
- };
3376
3468
 
3377
- // src/js/data/intl-regionless.ts
3469
+ // packages/core/src/js/data/intl-regionless.ts
3378
3470
  var regionlessDialCodes = /* @__PURE__ */ new Set([
3379
3471
  "800",
3380
3472
  "808",
@@ -3390,7 +3482,7 @@ var _factory = (() => {
3390
3482
  return number.startsWith("+") && regionlessDialCodes.has(dialCode);
3391
3483
  };
3392
3484
 
3393
- // src/js/format/formatting.ts
3485
+ // packages/core/src/js/format/formatting.ts
3394
3486
  var stripSeparateDialCode = (fullNumber, hasValidDialCode, separateDialCode, selectedCountryData) => {
3395
3487
  if (!separateDialCode || !hasValidDialCode) {
3396
3488
  return fullNumber;
@@ -3409,7 +3501,7 @@ var _factory = (() => {
3409
3501
  return result;
3410
3502
  };
3411
3503
 
3412
- // src/js/format/caret.ts
3504
+ // packages/core/src/js/format/caret.ts
3413
3505
  var computeNewCaretPosition = (relevantChars, formattedValue, prevCaretPos, isDeleteForwards) => {
3414
3506
  if (prevCaretPos === 0 && !isDeleteForwards) {
3415
3507
  return 0;
@@ -3429,7 +3521,7 @@ var _factory = (() => {
3429
3521
  return formattedValue.length;
3430
3522
  };
3431
3523
 
3432
- // src/js/data/nanp-regionless.ts
3524
+ // packages/core/src/js/data/nanp-regionless.ts
3433
3525
  var regionlessNanpAreaCodes = /* @__PURE__ */ new Set([
3434
3526
  "800",
3435
3527
  "822",
@@ -3458,55 +3550,7 @@ var _factory = (() => {
3458
3550
  return false;
3459
3551
  };
3460
3552
 
3461
- // src/js/core/numerals.ts
3462
- var Numerals = class {
3463
- #userNumeralSet;
3464
- constructor(initialValue) {
3465
- if (initialValue) {
3466
- this.#updateNumeralSet(initialValue);
3467
- }
3468
- }
3469
- // If any Arabic-Indic digits, then label it as that set. Same for Persian. Otherwise assume ASCII.
3470
- #updateNumeralSet(str) {
3471
- if (/[\u0660-\u0669]/.test(str)) {
3472
- this.#userNumeralSet = "arabic-indic";
3473
- } else if (/[\u06F0-\u06F9]/.test(str)) {
3474
- this.#userNumeralSet = "persian";
3475
- } else {
3476
- this.#userNumeralSet = "ascii";
3477
- }
3478
- }
3479
- // Denormalise ASCII 0-9 to the user's numeral set. If not yet known, return as-is.
3480
- // NOTE: normalise is always called before this, so it should be impossible for the numeral set to be unknown at this point.
3481
- denormalise(str) {
3482
- if (!this.#userNumeralSet || this.#userNumeralSet === "ascii") {
3483
- return str;
3484
- }
3485
- const base = this.#userNumeralSet === "arabic-indic" ? 1632 : 1776;
3486
- return str.replace(/[0-9]/g, (d) => String.fromCharCode(base + Number(d)));
3487
- }
3488
- // Normalize Eastern Arabic (U+0660-0669) and Persian/Extended Arabic-Indic (U+06F0-06F9) numerals to ASCII 0-9
3489
- normalise(str) {
3490
- if (!str) {
3491
- return "";
3492
- }
3493
- this.#updateNumeralSet(str);
3494
- if (this.#userNumeralSet === "ascii") {
3495
- return str;
3496
- }
3497
- const base = this.#userNumeralSet === "arabic-indic" ? 1632 : 1776;
3498
- const regex = this.#userNumeralSet === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
3499
- return str.replace(
3500
- regex,
3501
- (ch) => String.fromCharCode(48 + (ch.charCodeAt(0) - base))
3502
- );
3503
- }
3504
- isAscii() {
3505
- return !this.#userNumeralSet || this.#userNumeralSet === "ascii";
3506
- }
3507
- };
3508
-
3509
- // src/js/intlTelInput.ts
3553
+ // packages/core/src/js/intlTelInput.ts
3510
3554
  var nextId = 0;
3511
3555
  var ensureUtils = (methodName) => {
3512
3556
  if (!intlTelInput.utils) {
@@ -3540,6 +3584,7 @@ var _factory = (() => {
3540
3584
  #dialCodeToIso2Map;
3541
3585
  #dialCodes;
3542
3586
  #countryByIso2;
3587
+ #searchTokens;
3543
3588
  #selectedCountry = null;
3544
3589
  #maxCoreNumberLength = null;
3545
3590
  #fallbackCountryIso2;
@@ -3596,7 +3641,7 @@ var _factory = (() => {
3596
3641
  #init() {
3597
3642
  this.#abortController = new AbortController();
3598
3643
  this.#processCountryData();
3599
- this.#ui.buildMarkup(this.#countries);
3644
+ this.#ui.buildMarkup(this.#countries, this.#searchTokens);
3600
3645
  this.#setInitialState();
3601
3646
  this.#initListeners();
3602
3647
  this.#startAsyncLoads();
@@ -3611,7 +3656,7 @@ var _factory = (() => {
3611
3656
  #processCountryData() {
3612
3657
  generateCountryNames(this.#countries, this.#options);
3613
3658
  sortCountries(this.#countries, this.#options);
3614
- cacheSearchTokens(this.#countries);
3659
+ this.#searchTokens = buildSearchTokens(this.#countries);
3615
3660
  }
3616
3661
  //* Set the initial state of the input value and the selected country by:
3617
3662
  //* 1. Extracting a dial code from the given number
@@ -3672,7 +3717,7 @@ var _factory = (() => {
3672
3717
  if (this.#utilsDeferred) {
3673
3718
  const { loadUtils } = this.#options;
3674
3719
  const doAttachUtils = () => {
3675
- intlTelInput.attachUtils(loadUtils)?.catch(() => {
3720
+ intlTelInput.attachUtils(loadUtils).catch(() => {
3676
3721
  });
3677
3722
  };
3678
3723
  if (intlTelInput.documentReady()) {
@@ -3692,7 +3737,7 @@ var _factory = (() => {
3692
3737
  }
3693
3738
  }
3694
3739
  //* Perform the geo ip lookup.
3695
- #loadAutoCountry() {
3740
+ async #loadAutoCountry() {
3696
3741
  if (intlTelInput.autoCountry) {
3697
3742
  this.#handleAutoCountryLoaded();
3698
3743
  return;
@@ -3703,19 +3748,18 @@ var _factory = (() => {
3703
3748
  }
3704
3749
  intlTelInput.startedLoadingAutoCountry = true;
3705
3750
  if (typeof this.#options.geoIpLookup === "function") {
3706
- const successCallback = (iso2 = "") => {
3707
- const iso2Lower = iso2.toLowerCase();
3708
- if (isIso2(iso2Lower)) {
3709
- intlTelInput.autoCountry = iso2Lower;
3710
- setTimeout(() => _Iti.forEachInstance("handleAutoCountryLoaded"));
3711
- } else {
3751
+ try {
3752
+ const iso2 = await this.#options.geoIpLookup();
3753
+ const iso2Lower = typeof iso2 === "string" ? iso2.toLowerCase() : "";
3754
+ if (!isIso2(iso2Lower)) {
3712
3755
  _Iti.forEachInstance("handleAutoCountryFailure");
3756
+ return;
3713
3757
  }
3714
- };
3715
- const failureCallback = () => {
3758
+ intlTelInput.autoCountry = iso2Lower;
3759
+ setTimeout(() => _Iti.forEachInstance("handleAutoCountryLoaded"));
3760
+ } catch {
3716
3761
  _Iti.forEachInstance("handleAutoCountryFailure");
3717
- };
3718
- this.#options.geoIpLookup(successCallback, failureCallback);
3762
+ }
3719
3763
  }
3720
3764
  }
3721
3765
  #openDropdownWithPlus() {
@@ -3734,7 +3778,7 @@ var _factory = (() => {
3734
3778
  #bindAllTelInputListeners() {
3735
3779
  this.#bindInputListener();
3736
3780
  this.#bindKeydownListener();
3737
- this.#bindPasteListener();
3781
+ this.#bindStrictPasteListener();
3738
3782
  }
3739
3783
  //* Android workaround for handling plus when separateDialCode enabled (as impossible to handle with keydown/keyup, for which e.key always returns "Unidentified", see https://stackoverflow.com/q/59584061/217866)
3740
3784
  #handleAndroidPlusKey(inputValue) {
@@ -3902,15 +3946,16 @@ var _factory = (() => {
3902
3946
  e.preventDefault();
3903
3947
  }
3904
3948
  };
3905
- #bindPasteListener() {
3949
+ #bindStrictPasteListener() {
3906
3950
  if (!this.#options.strictMode) {
3907
3951
  return;
3908
3952
  }
3909
- this.#ui.telInputEl.addEventListener("paste", this.#handlePasteEvent, {
3953
+ this.#ui.telInputEl.addEventListener("paste", this.#handleStrictPasteEvent, {
3910
3954
  signal: this.#abortController.signal
3911
3955
  });
3912
3956
  }
3913
- #handlePasteEvent = (e) => {
3957
+ // Handle paste events when strictMode is enabled by sanitising the pasted content before it's inserted into the input, and rejecting it entirely if it would result in an invalid number
3958
+ #handleStrictPasteEvent = (e) => {
3914
3959
  e.preventDefault();
3915
3960
  const input = this.#ui.telInputEl;
3916
3961
  const selStart = input.selectionStart;
@@ -3929,6 +3974,15 @@ var _factory = (() => {
3929
3974
  const sanitised = hasLeadingPlus && allowLeadingPlus ? `+${numerics}` : numerics;
3930
3975
  let newValue = before + sanitised + after;
3931
3976
  let rejectReason = sanitised !== pasted ? "invalid" : null;
3977
+ if (newValue.length > 30) {
3978
+ this.#playStrictRejectAnimation();
3979
+ this.#dispatchEvent(EVENTS.STRICT_REJECT, {
3980
+ source: "paste",
3981
+ rejectedInput: pastedRaw,
3982
+ reason: "max-length"
3983
+ });
3984
+ return;
3985
+ }
3932
3986
  if (newValue.length > 5 && intlTelInput.utils) {
3933
3987
  let coreNumber = intlTelInput.utils.getCoreNumber(newValue, iso2);
3934
3988
  while (coreNumber.length === 0 && newValue.length > 0) {
@@ -4020,8 +4074,7 @@ var _factory = (() => {
4020
4074
  if (formatOnDisplay && intlTelInput.utils && this.#selectedCountry) {
4021
4075
  const isRegionless = hasRegionlessDialCode(fullNumber);
4022
4076
  const useNational = nationalMode && !isRegionless || !number.startsWith("+") && !separateDialCode;
4023
- const { NATIONAL, INTERNATIONAL } = intlTelInput.utils.numberFormat;
4024
- const format = useNational ? NATIONAL : INTERNATIONAL;
4077
+ const format = useNational ? NUMBER_FORMAT.NATIONAL : NUMBER_FORMAT.INTERNATIONAL;
4025
4078
  number = intlTelInput.utils.formatNumber(
4026
4079
  number,
4027
4080
  this.#selectedCountry?.iso2,
@@ -4141,11 +4194,10 @@ var _factory = (() => {
4141
4194
  this.#maxCoreNumberLength = null;
4142
4195
  return;
4143
4196
  }
4144
- const numberType = intlTelInput.utils.numberType[placeholderNumberType];
4145
4197
  let exampleNumber = intlTelInput.utils.getExampleNumber(
4146
4198
  iso2,
4147
4199
  false,
4148
- numberType,
4200
+ placeholderNumberType,
4149
4201
  true
4150
4202
  );
4151
4203
  let validNumber = exampleNumber;
@@ -4175,11 +4227,10 @@ var _factory = (() => {
4175
4227
  if (!intlTelInput.utils || !shouldSetPlaceholder) {
4176
4228
  return;
4177
4229
  }
4178
- const numberType = intlTelInput.utils.numberType[placeholderNumberType];
4179
4230
  let placeholder = this.#selectedCountry ? intlTelInput.utils.getExampleNumber(
4180
4231
  this.#selectedCountry.iso2,
4181
4232
  nationalMode,
4182
- numberType
4233
+ placeholderNumberType
4183
4234
  ) : "";
4184
4235
  placeholder = this.#prepareNumberForInput(placeholder);
4185
4236
  if (typeof customPlaceholder === "function") {
@@ -4289,19 +4340,9 @@ var _factory = (() => {
4289
4340
  );
4290
4341
  return this.#truncateToMaxLength(number);
4291
4342
  }
4292
- //* Return only the public-facing subset of the selected country data.
4293
- #getPublicCountryData() {
4294
- const d = this.#selectedCountry;
4295
- if (!d) {
4296
- return null;
4297
- }
4298
- const { iso2, dialCode, name } = d;
4299
- return { iso2, dialCode, name };
4300
- }
4301
4343
  //* Dispatch the 'countrychange' event.
4302
4344
  #dispatchCountryChangeEvent() {
4303
- const countryData = this.#getPublicCountryData();
4304
- this.#dispatchEvent(EVENTS.COUNTRY_CHANGE, countryData);
4345
+ this.#dispatchEvent(EVENTS.COUNTRY_CHANGE, this.#selectedCountry ?? null);
4305
4346
  }
4306
4347
  //**************************
4307
4348
  //* INTERNAL METHODS
@@ -4392,7 +4433,7 @@ var _factory = (() => {
4392
4433
  this.#selectedCountry?.iso2
4393
4434
  );
4394
4435
  }
4395
- //* Format the number to the given format.
4436
+ //* Format the number to the given format (defaults to "E164").
4396
4437
  getNumber(format) {
4397
4438
  if (!this.#isActive) {
4398
4439
  return "";
@@ -4407,10 +4448,10 @@ var _factory = (() => {
4407
4448
  );
4408
4449
  return this.#numerals.denormalise(formattedNumber);
4409
4450
  }
4410
- //* Get the type of the entered number e.g. landline/mobile.
4451
+ //* Get the type of the entered number e.g. "FIXED_LINE" / "MOBILE", or null if it can't be determined / instance is destroyed.
4411
4452
  getNumberType() {
4412
4453
  if (!this.#isActive) {
4413
- return SENTINELS.UNKNOWN_NUMBER_TYPE;
4454
+ return null;
4414
4455
  }
4415
4456
  ensureUtils("getNumberType");
4416
4457
  return intlTelInput.utils.getNumberType(
@@ -4420,12 +4461,12 @@ var _factory = (() => {
4420
4461
  }
4421
4462
  //* Get the country data for the currently selected country.
4422
4463
  getSelectedCountryData() {
4423
- return this.#getPublicCountryData();
4464
+ return this.#selectedCountry ?? null;
4424
4465
  }
4425
- //* Get the validation error.
4466
+ //* Get the validation error e.g. "TOO_SHORT" / "TOO_LONG", or null if it can't be determined / instance is destroyed.
4426
4467
  getValidationError() {
4427
4468
  if (!this.#isActive) {
4428
- return SENTINELS.UNKNOWN_VALIDATION_ERROR;
4469
+ return null;
4429
4470
  }
4430
4471
  ensureUtils("getValidationError");
4431
4472
  const iso2 = this.#selectedCountry?.iso2;
@@ -4574,39 +4615,31 @@ var _factory = (() => {
4574
4615
  });
4575
4616
  }
4576
4617
  };
4577
- var attachUtils = (source) => {
4578
- if (!intlTelInput.utils && !intlTelInput.startedLoadingUtils) {
4579
- let loadCall;
4580
- if (typeof source === "function") {
4581
- try {
4582
- loadCall = Promise.resolve(source());
4583
- } catch (error) {
4584
- return Promise.reject(error);
4585
- }
4586
- } else {
4587
- return Promise.reject(
4588
- new TypeError(
4589
- `The argument passed to attachUtils must be a function that returns a promise for the utils module, not ${typeof source}`
4590
- )
4618
+ var attachUtils = async (source) => {
4619
+ if (intlTelInput.utils || intlTelInput.startedLoadingUtils) {
4620
+ return null;
4621
+ }
4622
+ if (typeof source !== "function") {
4623
+ throw new TypeError(
4624
+ `The argument passed to attachUtils must be a function that returns a promise for the utils module, not ${typeof source}`
4625
+ );
4626
+ }
4627
+ intlTelInput.startedLoadingUtils = true;
4628
+ try {
4629
+ const module = await source();
4630
+ const utils = module?.default;
4631
+ if (!utils || typeof utils !== "object") {
4632
+ throw new TypeError(
4633
+ "The loader function passed to attachUtils did not resolve to a module object with utils as its default export."
4591
4634
  );
4592
4635
  }
4593
- intlTelInput.startedLoadingUtils = true;
4594
- return loadCall.then((module) => {
4595
- const utils = module?.default;
4596
- if (!utils || typeof utils !== "object") {
4597
- throw new TypeError(
4598
- "The loader function passed to attachUtils did not resolve to a module object with utils as its default export."
4599
- );
4600
- }
4601
- intlTelInput.utils = utils;
4602
- Iti.forEachInstance("handleUtilsLoaded");
4603
- return true;
4604
- }).catch((error) => {
4605
- Iti.forEachInstance("handleUtilsFailure", error);
4606
- throw error;
4607
- });
4636
+ intlTelInput.utils = utils;
4637
+ Iti.forEachInstance("handleUtilsLoaded");
4638
+ return true;
4639
+ } catch (error) {
4640
+ Iti.forEachInstance("handleUtilsFailure", error);
4641
+ throw error;
4608
4642
  }
4609
- return null;
4610
4643
  };
4611
4644
  var intlTelInput = Object.assign(
4612
4645
  (input, options) => {
@@ -4631,22 +4664,25 @@ var _factory = (() => {
4631
4664
  attachUtils,
4632
4665
  startedLoadingUtils: false,
4633
4666
  startedLoadingAutoCountry: false,
4634
- version: "27.3.0"
4667
+ version: "28.0.0",
4668
+ NUMBER_FORMAT,
4669
+ NUMBER_TYPE,
4670
+ VALIDATION_ERROR
4635
4671
  }
4636
4672
  );
4637
4673
  var intlTelInput_default = intlTelInput;
4638
4674
 
4639
- // dist/js/utils.js
4675
+ // packages/core/dist/js/utils.js
4640
4676
  var _scope = {};
4641
4677
  (function() {
4642
- var k = this || self;
4643
- function m(a, b) {
4678
+ var aa = this || self;
4679
+ function k(a, b) {
4644
4680
  a = a.split(".");
4645
- var c = k;
4681
+ var c = aa;
4646
4682
  a[0] in c || typeof c.execScript == "undefined" || c.execScript("var " + a[0]);
4647
4683
  for (var d; a.length && (d = a.shift()); ) a.length || b === void 0 ? c[d] && c[d] !== Object.prototype[d] ? c = c[d] : c = c[d] = {} : c[d] = b;
4648
4684
  }
4649
- function n(a, b) {
4685
+ function m(a, b) {
4650
4686
  function c() {
4651
4687
  }
4652
4688
  c.prototype = b.prototype;
@@ -4659,7 +4695,7 @@ var _factory = (() => {
4659
4695
  };
4660
4696
  }
4661
4697
  ;
4662
- function aa(a) {
4698
+ function ba(a) {
4663
4699
  const b = [];
4664
4700
  let c = 0;
4665
4701
  for (const d in a) b[c++] = a[d];
@@ -4668,13 +4704,13 @@ var _factory = (() => {
4668
4704
  ;
4669
4705
  var da = class {
4670
4706
  constructor(a) {
4671
- if (ba !== ba) throw Error("SafeUrl is not meant to be built directly");
4707
+ if (ca !== ca) throw Error("SafeUrl is not meant to be built directly");
4672
4708
  this.g = a;
4673
4709
  }
4674
4710
  toString() {
4675
4711
  return this.g.toString();
4676
4712
  }
4677
- }, ba = {};
4713
+ }, ca = {};
4678
4714
  new da("about:invalid#zClosurez");
4679
4715
  new da("about:blank");
4680
4716
  const ea = {};
@@ -4700,7 +4736,7 @@ var _factory = (() => {
4700
4736
  const ja = {};
4701
4737
  class ka {
4702
4738
  constructor() {
4703
- var a = k.trustedTypes && k.trustedTypes.emptyHTML || "";
4739
+ var a = aa.trustedTypes && aa.trustedTypes.emptyHTML || "";
4704
4740
  if (ja !== ja) throw Error("SafeHtml is not meant to be built directly");
4705
4741
  this.g = a;
4706
4742
  }
@@ -4737,38 +4773,38 @@ var _factory = (() => {
4737
4773
  }
4738
4774
  }
4739
4775
  function ua(a) {
4740
- a = aa(a.g);
4776
+ a = ba(a.g);
4741
4777
  a.sort(function(b, c) {
4742
4778
  return b.g - c.g;
4743
4779
  });
4744
4780
  return a;
4745
4781
  }
4746
4782
  ;
4747
- function p() {
4783
+ function n() {
4748
4784
  this.h = {};
4749
4785
  this.j = this.m().g;
4750
4786
  this.g = this.l = null;
4751
4787
  }
4752
- p.prototype.has = function(a) {
4753
- return q(this, a.g);
4788
+ n.prototype.has = function(a) {
4789
+ return p(this, a.g);
4754
4790
  };
4755
- p.prototype.get = function(a, b) {
4756
- return r(this, a.g, b);
4791
+ n.prototype.get = function(a, b) {
4792
+ return q(this, a.g, b);
4757
4793
  };
4758
- p.prototype.set = function(a, b) {
4759
- t(this, a.g, b);
4794
+ n.prototype.set = function(a, b) {
4795
+ r(this, a.g, b);
4760
4796
  };
4761
- p.prototype.add = function(a, b) {
4797
+ n.prototype.add = function(a, b) {
4762
4798
  va(this, a.g, b);
4763
4799
  };
4764
- p.prototype.equals = function(a) {
4800
+ n.prototype.equals = function(a) {
4765
4801
  if (!a || this.constructor != a.constructor) return false;
4766
4802
  for (var b = ua(this.m()), c = 0; c < b.length; c++) {
4767
4803
  var d = b[c], e = d.g;
4768
- if (q(this, e) != q(a, e)) return false;
4769
- if (q(this, e)) {
4770
- var f = d.h == 11 || d.h == 10, g = u(this, e);
4771
- e = u(a, e);
4804
+ if (p(this, e) != p(a, e)) return false;
4805
+ if (p(this, e)) {
4806
+ var f = d.h == 11 || d.h == 10, g = t(this, e);
4807
+ e = t(a, e);
4772
4808
  if (d.l) {
4773
4809
  if (g.length != e.length) return false;
4774
4810
  for (d = 0; d < g.length; d++) {
@@ -4783,25 +4819,25 @@ var _factory = (() => {
4783
4819
  function wa(a, b) {
4784
4820
  for (var c = ua(a.m()), d = 0; d < c.length; d++) {
4785
4821
  var e = c[d], f = e.g;
4786
- if (q(b, f)) {
4822
+ if (p(b, f)) {
4787
4823
  a.g && delete a.g[e.g];
4788
4824
  var g = e.h == 11 || e.h == 10;
4789
4825
  if (e.l) {
4790
- e = u(b, f) || [];
4826
+ e = t(b, f) || [];
4791
4827
  for (var h = 0; h < e.length; h++) va(a, f, g ? e[h].clone() : e[h]);
4792
- } else e = u(b, f), g ? (g = u(a, f)) ? wa(g, e) : t(a, f, e.clone()) : t(a, f, e);
4828
+ } else e = t(b, f), g ? (g = t(a, f)) ? wa(g, e) : r(a, f, e.clone()) : r(a, f, e);
4793
4829
  }
4794
4830
  }
4795
4831
  }
4796
- p.prototype.clone = function() {
4832
+ n.prototype.clone = function() {
4797
4833
  var a = new this.constructor();
4798
4834
  a != this && (a.h = {}, a.g && (a.g = {}), wa(a, this));
4799
4835
  return a;
4800
4836
  };
4801
- function q(a, b) {
4837
+ function p(a, b) {
4802
4838
  return a.h[b] != null;
4803
4839
  }
4804
- function u(a, b) {
4840
+ function t(a, b) {
4805
4841
  var c = a.h[b];
4806
4842
  if (c == null) return null;
4807
4843
  if (a.l) {
@@ -4817,12 +4853,12 @@ var _factory = (() => {
4817
4853
  }
4818
4854
  return c;
4819
4855
  }
4820
- function r(a, b, c) {
4821
- var d = u(a, b);
4856
+ function q(a, b, c) {
4857
+ var d = t(a, b);
4822
4858
  return a.j[b].l ? d[c || 0] : d;
4823
4859
  }
4824
- function v(a, b) {
4825
- if (q(a, b)) a = r(a, b);
4860
+ function u(a, b) {
4861
+ if (p(a, b)) a = q(a, b);
4826
4862
  else a: {
4827
4863
  a = a.j[b];
4828
4864
  if (a.j === void 0) if (b = a.u, b === Boolean) a.j = false;
@@ -4836,10 +4872,10 @@ var _factory = (() => {
4836
4872
  }
4837
4873
  return a;
4838
4874
  }
4839
- function w(a, b) {
4840
- return a.j[b].l ? q(a, b) ? a.h[b].length : 0 : q(a, b) ? 1 : 0;
4875
+ function v(a, b) {
4876
+ return a.j[b].l ? p(a, b) ? a.h[b].length : 0 : p(a, b) ? 1 : 0;
4841
4877
  }
4842
- function t(a, b, c) {
4878
+ function r(a, b, c) {
4843
4879
  a.h[b] = c;
4844
4880
  a.g && (a.g[b] = c);
4845
4881
  }
@@ -4848,20 +4884,20 @@ var _factory = (() => {
4848
4884
  a.h[b].push(c);
4849
4885
  a.g && delete a.g[b];
4850
4886
  }
4851
- function x(a, b) {
4887
+ function w(a, b) {
4852
4888
  var c = [], d;
4853
4889
  for (d in b) d != 0 && c.push(new la(d, b[d]));
4854
4890
  return new ta(a, c);
4855
4891
  }
4856
4892
  ;
4857
- function y() {
4893
+ function x() {
4858
4894
  }
4859
- y.prototype.g = function(a) {
4895
+ x.prototype.g = function(a) {
4860
4896
  new a.h();
4861
4897
  throw Error("Unimplemented");
4862
4898
  };
4863
- y.prototype.h = function(a, b) {
4864
- if (a.h == 11 || a.h == 10) return b instanceof p ? b : this.g(a.u.prototype.m(), b);
4899
+ x.prototype.h = function(a, b) {
4900
+ if (a.h == 11 || a.h == 10) return b instanceof n ? b : this.g(a.u.prototype.m(), b);
4865
4901
  if (a.h == 14) return typeof b === "string" && xa.test(b) && (a = Number(b), a > 0) ? a : b;
4866
4902
  if (!a.o) return b;
4867
4903
  a = a.u;
@@ -4871,94 +4907,94 @@ var _factory = (() => {
4871
4907
  return b;
4872
4908
  };
4873
4909
  var xa = /^-?[0-9]+$/;
4874
- function z() {
4910
+ function ya() {
4875
4911
  }
4876
- n(z, y);
4877
- z.prototype.g = function(a, b) {
4912
+ m(ya, x);
4913
+ ya.prototype.g = function(a, b) {
4878
4914
  a = new a.h();
4879
4915
  a.l = this;
4880
4916
  a.h = b;
4881
4917
  a.g = {};
4882
4918
  return a;
4883
4919
  };
4884
- function B() {
4920
+ function z() {
4885
4921
  }
4886
- n(B, z);
4887
- B.prototype.h = function(a, b) {
4888
- return a.h == 8 ? !!b : y.prototype.h.apply(this, arguments);
4922
+ m(z, ya);
4923
+ z.prototype.h = function(a, b) {
4924
+ return a.h == 8 ? !!b : x.prototype.h.apply(this, arguments);
4889
4925
  };
4890
- B.prototype.g = function(a, b) {
4891
- return B.na.g.call(this, a, b);
4926
+ z.prototype.g = function(a, b) {
4927
+ return z.na.g.call(this, a, b);
4892
4928
  };
4893
- function C(a, b) {
4929
+ function A(a, b) {
4894
4930
  a != null && this.g.apply(this, arguments);
4895
4931
  }
4896
- C.prototype.h = "";
4897
- C.prototype.set = function(a) {
4932
+ A.prototype.h = "";
4933
+ A.prototype.set = function(a) {
4898
4934
  this.h = "" + a;
4899
4935
  };
4900
- C.prototype.g = function(a, b, c) {
4936
+ A.prototype.g = function(a, b, c) {
4901
4937
  this.h += String(a);
4902
4938
  if (b != null) for (let d = 1; d < arguments.length; d++) this.h += arguments[d];
4903
4939
  return this;
4904
4940
  };
4905
- function D(a) {
4941
+ function B(a) {
4906
4942
  a.h = "";
4907
4943
  }
4908
- C.prototype.toString = function() {
4944
+ A.prototype.toString = function() {
4909
4945
  return this.h;
4910
4946
  };
4911
- function E() {
4912
- p.call(this);
4947
+ function C() {
4948
+ n.call(this);
4913
4949
  }
4914
- n(E, p);
4915
- var ya = null;
4916
- function F() {
4917
- p.call(this);
4918
- }
4919
- n(F, p);
4950
+ m(C, n);
4920
4951
  var za = null;
4921
- function G(a) {
4922
- return u(a, 9) || [];
4923
- }
4924
- function H() {
4925
- p.call(this);
4952
+ function D() {
4953
+ n.call(this);
4926
4954
  }
4927
- n(H, p);
4955
+ m(D, n);
4928
4956
  var Aa = null;
4929
- E.prototype.m = function() {
4930
- var a = ya;
4931
- a || (ya = a = x(E, { 0: { name: "NumberFormat", ja: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: true, i: 9, type: String }, 2: { name: "format", required: true, i: 9, type: String }, 3: { name: "leading_digits_pattern", ca: true, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: false, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } }));
4932
- return a;
4933
- };
4934
- E.m = E.prototype.m;
4935
- F.prototype.m = function() {
4957
+ function E(a) {
4958
+ return t(a, 9) || [];
4959
+ }
4960
+ function F() {
4961
+ n.call(this);
4962
+ }
4963
+ m(F, n);
4964
+ var Ba = null;
4965
+ C.prototype.m = function() {
4936
4966
  var a = za;
4937
- a || (za = a = x(F, { 0: { name: "PhoneNumberDesc", ja: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", ca: true, i: 5, type: Number }, 10: { name: "possible_length_local_only", ca: true, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } }));
4967
+ a || (za = a = w(C, { 0: { name: "NumberFormat", ja: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: true, i: 9, type: String }, 2: { name: "format", required: true, i: 9, type: String }, 3: { name: "leading_digits_pattern", ca: true, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: false, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } }));
4938
4968
  return a;
4939
4969
  };
4940
- F.m = F.prototype.m;
4941
- H.prototype.m = function() {
4970
+ C.m = C.prototype.m;
4971
+ D.prototype.m = function() {
4942
4972
  var a = Aa;
4943
- a || (Aa = a = x(H, {
4973
+ a || (Aa = a = w(D, { 0: { name: "PhoneNumberDesc", ja: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", ca: true, i: 5, type: Number }, 10: { name: "possible_length_local_only", ca: true, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } }));
4974
+ return a;
4975
+ };
4976
+ D.m = D.prototype.m;
4977
+ F.prototype.m = function() {
4978
+ var a = Ba;
4979
+ a || (Ba = a = w(F, {
4944
4980
  0: { name: "PhoneMetadata", ja: "i18n.phonenumbers.PhoneMetadata" },
4945
- 1: { name: "general_desc", i: 11, type: F },
4946
- 2: { name: "fixed_line", i: 11, type: F },
4947
- 3: { name: "mobile", i: 11, type: F },
4948
- 4: { name: "toll_free", i: 11, type: F },
4949
- 5: { name: "premium_rate", i: 11, type: F },
4950
- 6: { name: "shared_cost", i: 11, type: F },
4951
- 7: { name: "personal_number", i: 11, type: F },
4952
- 8: { name: "voip", i: 11, type: F },
4953
- 21: { name: "pager", i: 11, type: F },
4954
- 25: { name: "uan", i: 11, type: F },
4955
- 27: { name: "emergency", i: 11, type: F },
4956
- 28: { name: "voicemail", i: 11, type: F },
4957
- 29: { name: "short_code", i: 11, type: F },
4958
- 30: { name: "standard_rate", i: 11, type: F },
4959
- 31: { name: "carrier_specific", i: 11, type: F },
4960
- 33: { name: "sms_services", i: 11, type: F },
4961
- 24: { name: "no_international_dialling", i: 11, type: F },
4981
+ 1: { name: "general_desc", i: 11, type: D },
4982
+ 2: { name: "fixed_line", i: 11, type: D },
4983
+ 3: { name: "mobile", i: 11, type: D },
4984
+ 4: { name: "toll_free", i: 11, type: D },
4985
+ 5: { name: "premium_rate", i: 11, type: D },
4986
+ 6: { name: "shared_cost", i: 11, type: D },
4987
+ 7: { name: "personal_number", i: 11, type: D },
4988
+ 8: { name: "voip", i: 11, type: D },
4989
+ 21: { name: "pager", i: 11, type: D },
4990
+ 25: { name: "uan", i: 11, type: D },
4991
+ 27: { name: "emergency", i: 11, type: D },
4992
+ 28: { name: "voicemail", i: 11, type: D },
4993
+ 29: { name: "short_code", i: 11, type: D },
4994
+ 30: { name: "standard_rate", i: 11, type: D },
4995
+ 31: { name: "carrier_specific", i: 11, type: D },
4996
+ 33: { name: "sms_services", i: 11, type: D },
4997
+ 24: { name: "no_international_dialling", i: 11, type: D },
4962
4998
  9: { name: "id", required: true, i: 9, type: String },
4963
4999
  10: { name: "country_code", i: 5, type: Number },
4964
5000
  11: { name: "international_prefix", i: 9, type: String },
@@ -4972,31 +5008,31 @@ var _factory = (() => {
4972
5008
  },
4973
5009
  16: { name: "national_prefix_transform_rule", i: 9, type: String },
4974
5010
  18: { name: "same_mobile_and_fixed_line_pattern", i: 8, defaultValue: false, type: Boolean },
4975
- 19: { name: "number_format", ca: true, i: 11, type: E },
4976
- 20: { name: "intl_number_format", ca: true, i: 11, type: E },
5011
+ 19: { name: "number_format", ca: true, i: 11, type: C },
5012
+ 20: { name: "intl_number_format", ca: true, i: 11, type: C },
4977
5013
  22: { name: "main_country_for_code", i: 8, defaultValue: false, type: Boolean },
4978
5014
  23: { name: "leading_digits", i: 9, type: String }
4979
5015
  }));
4980
5016
  return a;
4981
5017
  };
4982
- H.m = H.prototype.m;
4983
- function I() {
4984
- p.call(this);
4985
- }
4986
- n(I, p);
4987
- var Ba = null, Ca = { sa: 0, ra: 1, qa: 5, pa: 10, oa: 20 };
4988
- I.prototype.m = function() {
4989
- var a = Ba;
4990
- a || (Ba = a = x(I, { 0: { name: "PhoneNumber", ja: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: true, i: 5, type: Number }, 2: { name: "national_number", required: true, 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: Ca }, 7: {
5018
+ F.m = F.prototype.m;
5019
+ function G() {
5020
+ n.call(this);
5021
+ }
5022
+ m(G, n);
5023
+ var Ca = null, Da = { sa: 0, ra: 1, qa: 5, pa: 10, oa: 20 };
5024
+ G.prototype.m = function() {
5025
+ var a = Ca;
5026
+ a || (Ca = a = w(G, { 0: { name: "PhoneNumber", ja: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: true, i: 5, type: Number }, 2: { name: "national_number", required: true, 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: Da }, 7: {
4991
5027
  name: "preferred_domestic_carrier_code",
4992
5028
  i: 9,
4993
5029
  type: String
4994
5030
  } }));
4995
5031
  return a;
4996
5032
  };
4997
- I.ctor = I;
4998
- I.ctor.m = I.prototype.m;
4999
- var J = {
5033
+ G.ctor = G;
5034
+ G.ctor.m = G.prototype.m;
5035
+ var H = {
5000
5036
  1: "US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),
5001
5037
  7: ["RU", "KZ"],
5002
5038
  20: ["EG"],
@@ -5212,7 +5248,7 @@ var _factory = (() => {
5212
5248
  995: ["GE"],
5213
5249
  996: ["KG"],
5214
5250
  998: ["UZ"]
5215
- }, Da = {
5251
+ }, Ea = {
5216
5252
  AC: [, [
5217
5253
  ,
5218
5254
  ,
@@ -10284,14 +10320,14 @@ var _factory = (() => {
10284
10320
  ], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
10285
10321
  979: [, [, , "[1359]\\d{8}", , , , , , , [9], [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "[1359]\\d{8}", , , , "123456789", , , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 979, , , , , , , , 1, [[, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]]
10286
10322
  };
10287
- function K() {
10323
+ function I() {
10288
10324
  this.g = {};
10289
10325
  }
10290
- K.h = void 0;
10291
- K.g = function() {
10292
- return K.h ? K.h : K.h = new K();
10326
+ I.h = void 0;
10327
+ I.g = function() {
10328
+ return I.h ? I.h : I.h = new I();
10293
10329
  };
10294
- var Ea = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "\uFF10": "0", "\uFF11": "1", "\uFF12": "2", "\uFF13": "3", "\uFF14": "4", "\uFF15": "5", "\uFF16": "6", "\uFF17": "7", "\uFF18": "8", "\uFF19": "9", "\u0660": "0", "\u0661": "1", "\u0662": "2", "\u0663": "3", "\u0664": "4", "\u0665": "5", "\u0666": "6", "\u0667": "7", "\u0668": "8", "\u0669": "9", "\u06F0": "0", "\u06F1": "1", "\u06F2": "2", "\u06F3": "3", "\u06F4": "4", "\u06F5": "5", "\u06F6": "6", "\u06F7": "7", "\u06F8": "8", "\u06F9": "9" }, Fa = {
10330
+ var Fa = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "\uFF10": "0", "\uFF11": "1", "\uFF12": "2", "\uFF13": "3", "\uFF14": "4", "\uFF15": "5", "\uFF16": "6", "\uFF17": "7", "\uFF18": "8", "\uFF19": "9", "\u0660": "0", "\u0661": "1", "\u0662": "2", "\u0663": "3", "\u0664": "4", "\u0665": "5", "\u0666": "6", "\u0667": "7", "\u0668": "8", "\u0669": "9", "\u06F0": "0", "\u06F1": "1", "\u06F2": "2", "\u06F3": "3", "\u06F4": "4", "\u06F5": "5", "\u06F6": "6", "\u06F7": "7", "\u06F8": "8", "\u06F9": "9" }, Ga = {
10295
10331
  0: "0",
10296
10332
  1: "1",
10297
10333
  2: "2",
@@ -10305,7 +10341,7 @@ var _factory = (() => {
10305
10341
  "+": "+",
10306
10342
  "*": "*",
10307
10343
  "#": "#"
10308
- }, Ga = {
10344
+ }, Ha = {
10309
10345
  0: "0",
10310
10346
  1: "1",
10311
10347
  2: "2",
@@ -10372,56 +10408,56 @@ var _factory = (() => {
10372
10408
  X: "9",
10373
10409
  Y: "9",
10374
10410
  Z: "9"
10375
- }, Ha = RegExp("[+\uFF0B]+"), L = RegExp("^[+\uFF0B]+"), Ia = RegExp("([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])"), Ja = RegExp("[+\uFF0B0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]"), Ka = /[\\\/] *x/, La = RegExp("[^0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9A-Za-z#]+$"), Ma = /(?:.*?[A-Za-z]){3}.*/, Na = RegExp("^\\+([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]|[\\-\\.\\(\\)]?)*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]|[\\-\\.\\(\\)]?)*$"), Oa = RegExp("^([A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]+((\\-)*[A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])*\\.?$");
10376
- function M(a) {
10411
+ }, Ia = RegExp("[+\uFF0B]+"), J = RegExp("^[+\uFF0B]+"), Ja = RegExp("([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])"), Ka = RegExp("[+\uFF0B0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]"), La = /[\\\/] *x/, Ma = RegExp("[^0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9A-Za-z#]+$"), Na = /(?:.*?[A-Za-z]){3}.*/, Oa = RegExp("^\\+([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]|[\\-\\.\\(\\)]?)*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]|[\\-\\.\\(\\)]?)*$"), Pa = RegExp("^([A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]+((\\-)*[A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])*\\.?$");
10412
+ function K(a) {
10377
10413
  return "([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]{1," + a + "})";
10378
10414
  }
10379
- function Pa() {
10380
- return ";ext=" + M("20") + "|[ \xA0\\t,]*(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)[:\\.\uFF0E]?[ \xA0\\t,-]*" + (M("20") + "#?|[ \xA0\\t,]*(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)[:\\.\uFF0E]?[ \xA0\\t,-]*") + (M("9") + "#?|[- ]+") + (M("6") + "#|[ \xA0\\t]*(?:,{2}|;)[:\\.\uFF0E]?[ \xA0\\t,-]*") + (M("15") + "#?|[ \xA0\\t]*(?:,)+[:\\.\uFF0E]?[ \xA0\\t,-]*") + (M("9") + "#?");
10381
- }
10382
- var Qa = new RegExp("(?:" + Pa() + ")$", "i"), Ra = new RegExp("^[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]{2}$|^[+\uFF0B]*(?:[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*]*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]){3,}[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]*(?:" + Pa() + ")?$", "i"), Sa = /(\$\d)/, Ta = /^\(?\$1\)?$/;
10383
- function Ua(a) {
10384
- return a.length < 2 ? false : N(Ra, a);
10415
+ function Qa() {
10416
+ return ";ext=" + K("20") + "|[ \xA0\\t,]*(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)[:\\.\uFF0E]?[ \xA0\\t,-]*" + (K("20") + "#?|[ \xA0\\t,]*(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)[:\\.\uFF0E]?[ \xA0\\t,-]*") + (K("9") + "#?|[- ]+") + (K("6") + "#|[ \xA0\\t]*(?:,{2}|;)[:\\.\uFF0E]?[ \xA0\\t,-]*") + (K("15") + "#?|[ \xA0\\t]*(?:,)+[:\\.\uFF0E]?[ \xA0\\t,-]*") + (K("9") + "#?");
10385
10417
  }
10418
+ var Ra = new RegExp("(?:" + Qa() + ")$", "i"), Sa = new RegExp("^[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]{2}$|^[+\uFF0B]*(?:[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*]*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]){3,}[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]*(?:" + Qa() + ")?$", "i"), Ta = /(\$\d)/, Ua = /^\(?\$1\)?$/;
10386
10419
  function Va(a) {
10387
- return N(Ma, a) ? O(a, Ga) : O(a, Ea);
10420
+ return a.length < 2 ? false : L(Sa, a);
10388
10421
  }
10389
10422
  function Wa(a) {
10390
- var b = Va(a.toString());
10391
- D(a);
10392
- a.g(b);
10423
+ return L(Na, a) ? M(a, Ha) : M(a, Fa);
10393
10424
  }
10394
10425
  function Xa(a) {
10395
- return a != null && (w(a, 9) != 1 || G(a)[0] != -1);
10426
+ var b = Wa(a.toString());
10427
+ B(a);
10428
+ a.g(b);
10396
10429
  }
10397
- function O(a, b) {
10398
- for (var c = new C(), d, e = a.length, f = 0; f < e; ++f) d = a.charAt(f), d = b[d.toUpperCase()], d != null && c.g(d);
10430
+ function Ya(a) {
10431
+ return a != null && (v(a, 9) != 1 || E(a)[0] != -1);
10432
+ }
10433
+ function M(a, b) {
10434
+ for (var c = new A(), d, e = a.length, f = 0; f < e; ++f) d = a.charAt(f), d = b[d.toUpperCase()], d != null && c.g(d);
10399
10435
  return c.toString();
10400
10436
  }
10401
- function Ya(a) {
10402
- return a.length == 0 || Ta.test(a);
10437
+ function Za(a) {
10438
+ return a.length == 0 || Ua.test(a);
10403
10439
  }
10404
- function P(a) {
10405
- return a != null && isNaN(a) && a.toUpperCase() in Da;
10440
+ function N(a) {
10441
+ return a != null && isNaN(a) && a.toUpperCase() in Ea;
10406
10442
  }
10407
- K.prototype.format = function(a, b) {
10408
- if (r(a, 2) == 0 && q(a, 5)) {
10409
- var c = v(a, 5);
10443
+ I.prototype.format = function(a, b) {
10444
+ if (q(a, 2) == 0 && p(a, 5)) {
10445
+ var c = u(a, 5);
10410
10446
  if (c.length > 0) return c;
10411
10447
  }
10412
- c = v(a, 1);
10413
- var d = Q(a);
10414
- if (b == 0) return Za(c, 0, d, "");
10415
- if (!(c in J)) return d;
10416
- var e = R(this, c, S(c));
10417
- a = q(a, 3) && r(a, 3).length != 0 ? b == 3 ? ";ext=" + r(a, 3) : q(e, 13) ? r(e, 13) + v(a, 3) : " ext. " + v(a, 3) : "";
10448
+ c = u(a, 1);
10449
+ var d = O(a);
10450
+ if (b == 0) return $a(c, 0, d, "");
10451
+ if (!(c in H)) return d;
10452
+ var e = P(this, c, Q(c));
10453
+ a = p(a, 3) && q(a, 3).length != 0 ? b == 3 ? ";ext=" + q(a, 3) : p(e, 13) ? q(e, 13) + u(a, 3) : " ext. " + u(a, 3) : "";
10418
10454
  a: {
10419
- e = (u(e, 20) || []).length == 0 || b == 2 ? u(e, 19) || [] : u(e, 20) || [];
10455
+ e = (t(e, 20) || []).length == 0 || b == 2 ? t(e, 19) || [] : t(e, 20) || [];
10420
10456
  for (var f, g = e.length, h = 0; h < g; ++h) {
10421
10457
  f = e[h];
10422
- var l = w(f, 3);
10423
- if (l == 0 || d.search(r(f, 3, l - 1)) == 0) {
10424
- if (l = new RegExp(r(f, 1)), N(l, d)) {
10458
+ var l = v(f, 3);
10459
+ if (l == 0 || d.search(q(f, 3, l - 1)) == 0) {
10460
+ if (l = new RegExp(q(f, 1)), L(l, d)) {
10425
10461
  e = f;
10426
10462
  break a;
10427
10463
  }
@@ -10429,21 +10465,21 @@ var _factory = (() => {
10429
10465
  }
10430
10466
  e = null;
10431
10467
  }
10432
- e != null && (g = e, e = v(g, 2), f = new RegExp(r(
10468
+ e != null && (g = e, e = u(g, 2), f = new RegExp(q(
10433
10469
  g,
10434
10470
  1
10435
- )), v(g, 5), g = v(g, 4), d = b == 2 && g != null && g.length > 0 ? d.replace(f, e.replace(Sa, g)) : d.replace(f, e), b == 3 && (d = d.replace(RegExp("^[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+"), ""), d = d.replace(RegExp("[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+", "g"), "-")));
10436
- return Za(c, b, d, a);
10471
+ )), u(g, 5), g = u(g, 4), d = b == 2 && g != null && g.length > 0 ? d.replace(f, e.replace(Ta, g)) : d.replace(f, e), b == 3 && (d = d.replace(RegExp("^[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+"), ""), d = d.replace(RegExp("[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+", "g"), "-")));
10472
+ return $a(c, b, d, a);
10437
10473
  };
10438
- function R(a, b, c) {
10439
- return "001" == c ? T(a, "" + b) : T(a, c);
10474
+ function P(a, b, c) {
10475
+ return "001" == c ? R(a, "" + b) : R(a, c);
10440
10476
  }
10441
- function Q(a) {
10442
- if (!q(a, 2)) return "";
10443
- var b = "" + r(a, 2);
10444
- return q(a, 4) && r(a, 4) && v(a, 8) > 0 ? Array(v(a, 8) + 1).join("0") + b : b;
10477
+ function O(a) {
10478
+ if (!p(a, 2)) return "";
10479
+ var b = "" + q(a, 2);
10480
+ return p(a, 4) && q(a, 4) && u(a, 8) > 0 ? Array(u(a, 8) + 1).join("0") + b : b;
10445
10481
  }
10446
- function Za(a, b, c, d) {
10482
+ function $a(a, b, c, d) {
10447
10483
  switch (b) {
10448
10484
  case 0:
10449
10485
  return "+" + a + c + d;
@@ -10455,83 +10491,83 @@ var _factory = (() => {
10455
10491
  return c + d;
10456
10492
  }
10457
10493
  }
10458
- function U(a, b) {
10494
+ function S(a, b) {
10459
10495
  switch (b) {
10460
10496
  case 4:
10461
- return r(a, 5);
10497
+ return q(a, 5);
10462
10498
  case 3:
10463
- return r(a, 4);
10499
+ return q(a, 4);
10464
10500
  case 1:
10465
- return r(a, 3);
10501
+ return q(a, 3);
10466
10502
  case 0:
10467
10503
  case 2:
10468
- return r(a, 2);
10504
+ return q(a, 2);
10469
10505
  case 5:
10470
- return r(a, 6);
10506
+ return q(a, 6);
10471
10507
  case 6:
10472
- return r(a, 8);
10508
+ return q(a, 8);
10473
10509
  case 7:
10474
- return r(a, 7);
10510
+ return q(a, 7);
10475
10511
  case 8:
10476
- return r(a, 21);
10512
+ return q(a, 21);
10477
10513
  case 9:
10478
- return r(a, 25);
10514
+ return q(a, 25);
10479
10515
  case 10:
10480
- return r(a, 28);
10516
+ return q(a, 28);
10481
10517
  default:
10482
- return r(a, 1);
10518
+ return q(a, 1);
10483
10519
  }
10484
10520
  }
10485
- function $a(a, b) {
10486
- var c = ab(a, b);
10487
- a = R(a, v(b, 1), c);
10521
+ function ab(a, b) {
10522
+ var c = bb(a, b);
10523
+ a = P(a, u(b, 1), c);
10488
10524
  if (a == null) return -1;
10489
- b = Q(b);
10490
- return bb(b, a);
10525
+ b = O(b);
10526
+ return cb(b, a);
10491
10527
  }
10492
- function bb(a, b) {
10493
- return V(a, r(b, 1)) ? V(a, r(b, 5)) ? 4 : V(a, r(b, 4)) ? 3 : V(a, r(b, 6)) ? 5 : V(a, r(b, 8)) ? 6 : V(a, r(b, 7)) ? 7 : V(a, r(b, 21)) ? 8 : V(a, r(b, 25)) ? 9 : V(a, r(b, 28)) ? 10 : V(a, r(b, 2)) ? r(b, 18) || V(a, r(b, 3)) ? 2 : 0 : !r(b, 18) && V(a, r(b, 3)) ? 1 : -1 : -1;
10528
+ function cb(a, b) {
10529
+ return T(a, q(b, 1)) ? T(a, q(b, 5)) ? 4 : T(a, q(b, 4)) ? 3 : T(a, q(b, 6)) ? 5 : T(a, q(b, 8)) ? 6 : T(a, q(b, 7)) ? 7 : T(a, q(b, 21)) ? 8 : T(a, q(b, 25)) ? 9 : T(a, q(b, 28)) ? 10 : T(a, q(b, 2)) ? q(b, 18) || T(a, q(b, 3)) ? 2 : 0 : !q(b, 18) && T(a, q(b, 3)) ? 1 : -1 : -1;
10494
10530
  }
10495
- function T(a, b) {
10531
+ function R(a, b) {
10496
10532
  if (b == null) return null;
10497
10533
  b = b.toUpperCase();
10498
10534
  var c = a.g[b];
10499
10535
  if (c == null) {
10500
- c = Da[b];
10536
+ c = Ea[b];
10501
10537
  if (c == null) return null;
10502
- c = new B().g(H.m(), c);
10538
+ c = new z().g(F.m(), c);
10503
10539
  a.g[b] = c;
10504
10540
  }
10505
10541
  return c;
10506
10542
  }
10507
- function V(a, b) {
10543
+ function T(a, b) {
10508
10544
  var c = a.length;
10509
- return w(b, 9) > 0 && G(b).indexOf(c) == -1 ? false : N(v(b, 2), a);
10545
+ return v(b, 9) > 0 && E(b).indexOf(c) == -1 ? false : L(u(b, 2), a);
10510
10546
  }
10511
- function cb(a, b) {
10512
- var c = ab(a, b);
10513
- var d = v(b, 1);
10514
- var e = R(a, d, c);
10515
- e == null || "001" != c && d != db(a, c) ? e = false : (a = Q(b), e = bb(a, e) != -1);
10547
+ function db(a, b) {
10548
+ var c = bb(a, b);
10549
+ var d = u(b, 1);
10550
+ var e = P(a, d, c);
10551
+ e == null || "001" != c && d != eb(a, c) ? e = false : (a = O(b), e = cb(a, e) != -1);
10516
10552
  return e;
10517
10553
  }
10518
- function ab(a, b) {
10554
+ function bb(a, b) {
10519
10555
  if (b == null) return null;
10520
- var c = v(b, 1);
10521
- c = J[c];
10556
+ var c = u(b, 1);
10557
+ c = H[c];
10522
10558
  if (c == null) a = null;
10523
10559
  else if (c.length == 1) a = c[0];
10524
10560
  else a: {
10525
- b = Q(b);
10561
+ b = O(b);
10526
10562
  for (var d, e = c.length, f = 0; f < e; f++) {
10527
10563
  d = c[f];
10528
- var g = T(a, d);
10529
- if (q(g, 23)) {
10530
- if (b.search(r(g, 23)) == 0) {
10564
+ var g = R(a, d);
10565
+ if (p(g, 23)) {
10566
+ if (b.search(q(g, 23)) == 0) {
10531
10567
  a = d;
10532
10568
  break a;
10533
10569
  }
10534
- } else if (bb(b, g) != -1) {
10570
+ } else if (cb(b, g) != -1) {
10535
10571
  a = d;
10536
10572
  break a;
10537
10573
  }
@@ -10540,93 +10576,93 @@ var _factory = (() => {
10540
10576
  }
10541
10577
  return a;
10542
10578
  }
10543
- function S(a) {
10544
- a = J[a];
10579
+ function Q(a) {
10580
+ a = H[a];
10545
10581
  return a == null ? "ZZ" : a[0];
10546
10582
  }
10547
- function db(a, b) {
10548
- a = T(a, b);
10583
+ function eb(a, b) {
10584
+ a = R(a, b);
10549
10585
  if (a == null) throw Error("Invalid region code: " + b);
10550
- return v(a, 10);
10586
+ return u(a, 10);
10551
10587
  }
10552
- function W(a, b, c, d) {
10553
- var e = U(c, d), f = w(e, 9) == 0 ? G(r(c, 1)) : G(e);
10554
- e = u(e, 10) || [];
10555
- if (d == 2) if (Xa(U(c, 0))) a = U(c, 1), Xa(a) && (f = f.concat(w(a, 9) == 0 ? G(r(c, 1)) : G(a)), f.sort(), e.length == 0 ? e = u(a, 10) || [] : (e = e.concat(u(a, 10) || []), e.sort()));
10556
- else return W(a, b, c, 1);
10588
+ function U(a, b, c, d) {
10589
+ var e = S(c, d), f = v(e, 9) == 0 ? E(q(c, 1)) : E(e);
10590
+ e = t(e, 10) || [];
10591
+ if (d == 2) if (Ya(S(c, 0))) a = S(c, 1), Ya(a) && (f = f.concat(v(a, 9) == 0 ? E(q(c, 1)) : E(a)), f.sort(), e.length == 0 ? e = t(a, 10) || [] : (e = e.concat(t(a, 10) || []), e.sort()));
10592
+ else return U(a, b, c, 1);
10557
10593
  if (f[0] == -1) return 5;
10558
10594
  b = b.length;
10559
10595
  if (e.indexOf(b) > -1) return 4;
10560
10596
  c = f[0];
10561
10597
  return c == b ? 0 : c > b ? 2 : f[f.length - 1] < b ? 3 : f.indexOf(b, 1) > -1 ? 0 : 5;
10562
10598
  }
10563
- function X(a, b, c) {
10564
- var d = Q(b);
10565
- b = v(b, 1);
10566
- if (!(b in J)) return 1;
10567
- b = R(a, b, S(b));
10568
- return W(a, d, b, c);
10599
+ function V(a, b, c) {
10600
+ var d = O(b);
10601
+ b = u(b, 1);
10602
+ if (!(b in H)) return 1;
10603
+ b = P(a, b, Q(b));
10604
+ return U(a, d, b, c);
10569
10605
  }
10570
- function eb(a, b) {
10606
+ function fb(a, b) {
10571
10607
  a = a.toString();
10572
10608
  if (a.length == 0 || a.charAt(0) == "0") return 0;
10573
- for (var c, d = a.length, e = 1; e <= 3 && e <= d; ++e) if (c = parseInt(a.substring(0, e), 10), c in J) return b.g(a.substring(e)), c;
10609
+ for (var c, d = a.length, e = 1; e <= 3 && e <= d; ++e) if (c = parseInt(a.substring(0, e), 10), c in H) return b.g(a.substring(e)), c;
10574
10610
  return 0;
10575
10611
  }
10576
- function fb(a, b, c, d, e, f) {
10612
+ function gb(a, b, c, d, e, f) {
10577
10613
  if (b.length == 0) return 0;
10578
- b = new C(b);
10614
+ b = new A(b);
10579
10615
  var g;
10580
- c != null && (g = r(c, 11));
10616
+ c != null && (g = q(c, 11));
10581
10617
  g == null && (g = "NonMatch");
10582
10618
  var h = b.toString();
10583
10619
  if (h.length == 0) g = 20;
10584
- else if (L.test(h)) h = h.replace(L, ""), D(b), b.g(Va(h)), g = 1;
10620
+ else if (J.test(h)) h = h.replace(J, ""), B(b), b.g(Wa(h)), g = 1;
10585
10621
  else {
10586
10622
  h = new RegExp(g);
10587
- Wa(b);
10623
+ Xa(b);
10588
10624
  g = b.toString();
10589
10625
  if (g.search(h) == 0) {
10590
10626
  h = g.match(h)[0].length;
10591
- var l = g.substring(h).match(Ia);
10592
- l && l[1] != null && l[1].length > 0 && O(l[1], Ea) == "0" ? g = false : (D(b), b.g(g.substring(h)), g = true);
10627
+ var l = g.substring(h).match(Ja);
10628
+ l && l[1] != null && l[1].length > 0 && M(l[1], Fa) == "0" ? g = false : (B(b), b.g(g.substring(h)), g = true);
10593
10629
  } else g = false;
10594
10630
  g = g ? 5 : 20;
10595
10631
  }
10596
- e && t(f, 6, g);
10632
+ e && r(f, 6, g);
10597
10633
  if (g != 20) {
10598
10634
  if (b.h.length <= 2) throw Error("Phone number too short after IDD");
10599
- a = eb(b, d);
10600
- if (a != 0) return t(f, 1, a), a;
10635
+ a = fb(b, d);
10636
+ if (a != 0) return r(f, 1, a), a;
10601
10637
  throw Error("Invalid country calling code");
10602
10638
  }
10603
- if (c != null && (g = v(c, 10), h = "" + g, l = b.toString(), l.lastIndexOf(h, 0) == 0 && (h = new C(l.substring(h.length)), l = r(c, 1), l = new RegExp(v(l, 2)), gb(h, c, null), h = h.toString(), !N(l, b.toString()) && N(l, h) || W(a, b.toString(), c, -1) == 3))) return d.g(h), e && t(f, 6, 10), t(f, 1, g), g;
10604
- t(f, 1, 0);
10639
+ if (c != null && (g = u(c, 10), h = "" + g, l = b.toString(), l.lastIndexOf(h, 0) == 0 && (h = new A(l.substring(h.length)), l = q(c, 1), l = new RegExp(u(l, 2)), hb(h, c, null), h = h.toString(), !L(l, b.toString()) && L(l, h) || U(a, b.toString(), c, -1) == 3))) return d.g(h), e && r(f, 6, 10), r(f, 1, g), g;
10640
+ r(f, 1, 0);
10605
10641
  return 0;
10606
10642
  }
10607
- function gb(a, b, c) {
10608
- var d = a.toString(), e = d.length, f = r(b, 15);
10643
+ function hb(a, b, c) {
10644
+ var d = a.toString(), e = d.length, f = q(b, 15);
10609
10645
  if (e != 0 && f != null && f.length != 0 && (f = new RegExp("^(?:" + f + ")"), e = f.exec(d))) {
10610
10646
  var g = RegExp;
10611
- var h = r(b, 1);
10612
- h = v(h, 2);
10647
+ var h = q(b, 1);
10648
+ h = u(h, 2);
10613
10649
  g = new g(h);
10614
- h = N(g, d);
10650
+ h = L(g, d);
10615
10651
  var l = e.length - 1;
10616
- b = r(b, 16);
10652
+ b = q(b, 16);
10617
10653
  if (b == null || b.length == 0 || e[l] == null || e[l].length == 0) {
10618
- if (!h || N(g, d.substring(e[0].length))) c != null && l > 0 && e[l] != null && c.g(e[1]), a.set(d.substring(e[0].length));
10619
- } else if (d = d.replace(f, b), !h || N(g, d)) c != null && l > 0 && c.g(e[1]), a.set(d);
10654
+ if (!h || L(g, d.substring(e[0].length))) c != null && l > 0 && e[l] != null && c.g(e[1]), a.set(d.substring(e[0].length));
10655
+ } else if (d = d.replace(f, b), !h || L(g, d)) c != null && l > 0 && c.g(e[1]), a.set(d);
10620
10656
  }
10621
10657
  }
10622
- function Y(a, b, c) {
10623
- if (!P(c) && b.length > 0 && b.charAt(0) != "+") throw Error("Invalid country calling code");
10624
- return hb(a, b, c, true);
10658
+ function W(a, b, c) {
10659
+ if (!N(c) && b.length > 0 && b.charAt(0) != "+") throw Error("Invalid country calling code");
10660
+ return ib(a, b, c, true);
10625
10661
  }
10626
- function hb(a, b, c, d) {
10662
+ function ib(a, b, c, d) {
10627
10663
  if (b == null) throw Error("The string supplied did not seem to be a phone number");
10628
10664
  if (b.length > 250) throw Error("The string supplied is too long to be a phone number");
10629
- var e = new C();
10665
+ var e = new A();
10630
10666
  var f = b.indexOf(";phone-context=");
10631
10667
  if (f === -1) f = null;
10632
10668
  else if (f += 15, f >= b.length) f = "";
@@ -10635,126 +10671,126 @@ var _factory = (() => {
10635
10671
  f = g !== -1 ? b.substring(f, g) : b.substring(f);
10636
10672
  }
10637
10673
  var h = f;
10638
- h == null ? g = true : h.length === 0 ? g = false : (g = Na.exec(h), h = Oa.exec(h), g = g !== null || h !== null);
10674
+ h == null ? g = true : h.length === 0 ? g = false : (g = Oa.exec(h), h = Pa.exec(h), g = g !== null || h !== null);
10639
10675
  if (!g) throw Error("The string supplied did not seem to be a phone number");
10640
- f != null ? (f.charAt(0) === "+" && e.g(f), f = b.indexOf("tel:"), e.g(b.substring(f >= 0 ? f + 4 : 0, b.indexOf(";phone-context=")))) : (f = e.g, g = b ?? "", h = g.search(Ja), h >= 0 ? (g = g.substring(h), g = g.replace(La, ""), h = g.search(Ka), h >= 0 && (g = g.substring(0, h))) : g = "", f.call(e, g));
10676
+ f != null ? (f.charAt(0) === "+" && e.g(f), f = b.indexOf("tel:"), e.g(b.substring(f >= 0 ? f + 4 : 0, b.indexOf(";phone-context=")))) : (f = e.g, g = b ?? "", h = g.search(Ka), h >= 0 ? (g = g.substring(h), g = g.replace(Ma, ""), h = g.search(La), h >= 0 && (g = g.substring(0, h))) : g = "", f.call(e, g));
10641
10677
  f = e.toString();
10642
10678
  g = f.indexOf(";isub=");
10643
- g > 0 && (D(e), e.g(f.substring(0, g)));
10644
- if (!Ua(e.toString())) throw Error("The string supplied did not seem to be a phone number");
10679
+ g > 0 && (B(e), e.g(f.substring(0, g)));
10680
+ if (!Va(e.toString())) throw Error("The string supplied did not seem to be a phone number");
10645
10681
  f = e.toString();
10646
- if (!(P(c) || f != null && f.length > 0 && L.test(f))) throw Error("Invalid country calling code");
10647
- f = new I();
10648
- d && t(f, 5, b);
10682
+ if (!(N(c) || f != null && f.length > 0 && J.test(f))) throw Error("Invalid country calling code");
10683
+ f = new G();
10684
+ d && r(f, 5, b);
10649
10685
  a: {
10650
10686
  b = e.toString();
10651
- g = b.search(Qa);
10652
- if (g >= 0 && Ua(b.substring(0, g))) {
10653
- h = b.match(Qa);
10654
- for (var l = h.length, A = 1; A < l; ++A) if (h[A] != null && h[A].length > 0) {
10655
- D(e);
10687
+ g = b.search(Ra);
10688
+ if (g >= 0 && Va(b.substring(0, g))) {
10689
+ h = b.match(Ra);
10690
+ for (var l = h.length, y = 1; y < l; ++y) if (h[y] != null && h[y].length > 0) {
10691
+ B(e);
10656
10692
  e.g(b.substring(0, g));
10657
- b = h[A];
10693
+ b = h[y];
10658
10694
  break a;
10659
10695
  }
10660
10696
  }
10661
10697
  b = "";
10662
10698
  }
10663
- b.length > 0 && t(f, 3, b);
10664
- g = T(a, c);
10665
- b = new C();
10699
+ b.length > 0 && r(f, 3, b);
10700
+ g = R(a, c);
10701
+ b = new A();
10666
10702
  h = 0;
10667
10703
  l = e.toString();
10668
10704
  try {
10669
- h = fb(a, l, g, b, d, f);
10670
- } catch (ca) {
10671
- if (ca.message == "Invalid country calling code" && L.test(l)) {
10672
- if (l = l.replace(L, ""), h = fb(a, l, g, b, d, f), h == 0) throw ca;
10673
- } else throw ca;
10705
+ h = gb(a, l, g, b, d, f);
10706
+ } catch (Y) {
10707
+ if (Y.message == "Invalid country calling code" && J.test(l)) {
10708
+ if (l = l.replace(J, ""), h = gb(a, l, g, b, d, f), h == 0) throw Y;
10709
+ } else throw Y;
10674
10710
  }
10675
- h != 0 ? (e = S(h), e != c && (g = R(a, h, e))) : (Wa(e), b.g(e.toString()), c != null ? (h = v(g, 10), t(
10711
+ h != 0 ? (e = Q(h), e != c && (g = P(a, h, e))) : (Xa(e), b.g(e.toString()), c != null ? (h = u(g, 10), r(
10676
10712
  f,
10677
10713
  1,
10678
10714
  h
10679
10715
  )) : d && (delete f.h[6], f.g && delete f.g[6]));
10680
10716
  if (b.h.length < 2) throw Error("The string supplied is too short to be a phone number");
10681
- g != null && (c = new C(), e = new C(b.toString()), gb(e, g, c), a = W(a, e.toString(), g, -1), a != 2 && a != 4 && a != 5 && (b = e, d && c.toString().length > 0 && t(f, 7, c.toString())));
10717
+ g != null && (c = new A(), e = new A(b.toString()), hb(e, g, c), a = U(a, e.toString(), g, -1), a != 2 && a != 4 && a != 5 && (b = e, d && c.toString().length > 0 && r(f, 7, c.toString())));
10682
10718
  d = b.toString();
10683
10719
  a = d.length;
10684
10720
  if (a < 2) throw Error("The string supplied is too short to be a phone number");
10685
10721
  if (a > 17) throw Error("The string supplied is too long to be a phone number");
10686
10722
  if (d.length > 1 && d.charAt(0) == "0") {
10687
- t(f, 4, true);
10723
+ r(f, 4, true);
10688
10724
  for (a = 1; a < d.length - 1 && d.charAt(a) == "0"; ) a++;
10689
- a != 1 && t(f, 8, a);
10725
+ a != 1 && r(f, 8, a);
10690
10726
  }
10691
- t(f, 2, parseInt(d, 10));
10727
+ r(f, 2, parseInt(d, 10));
10692
10728
  return f;
10693
10729
  }
10694
- function N(a, b) {
10730
+ function L(a, b) {
10695
10731
  return (a = b.match(new RegExp("^(?:" + (typeof a == "string" ? a : a.source) + ")$", "i"))) && a[0].length == b.length ? true : false;
10696
10732
  }
10697
10733
  ;
10698
- function ib(a) {
10734
+ function jb(a) {
10699
10735
  this.ga = RegExp("\u2008");
10700
10736
  this.ka = "";
10701
- this.$ = new C();
10737
+ this.$ = new A();
10702
10738
  this.ea = "";
10703
- this.u = new C();
10704
- this.da = new C();
10739
+ this.u = new A();
10740
+ this.da = new A();
10705
10741
  this.v = true;
10706
10742
  this.fa = this.aa = this.ma = false;
10707
- this.ha = K.g();
10743
+ this.ha = I.g();
10708
10744
  this.ba = 0;
10709
- this.h = new C();
10745
+ this.h = new A();
10710
10746
  this.ia = false;
10711
10747
  this.o = "";
10712
- this.g = new C();
10748
+ this.g = new A();
10713
10749
  this.j = [];
10714
10750
  this.la = a;
10715
- this.l = jb(this, this.la);
10751
+ this.l = kb(this, this.la);
10716
10752
  }
10717
- var kb = new H();
10718
- t(kb, 11, "NA");
10719
- var lb = RegExp("^[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*\\$1[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*(\\$\\d[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*)*$"), mb = /[- ]/;
10720
- function jb(a, b) {
10753
+ var lb = new F();
10754
+ r(lb, 11, "NA");
10755
+ var mb = RegExp("^[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*\\$1[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*(\\$\\d[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*)*$"), nb = /[- ]/;
10756
+ function kb(a, b) {
10721
10757
  var c = a.ha;
10722
- b = P(b) ? db(c, b) : 0;
10723
- a = T(a.ha, S(b));
10724
- return a != null ? a : kb;
10758
+ b = N(b) ? eb(c, b) : 0;
10759
+ a = R(a.ha, Q(b));
10760
+ return a != null ? a : lb;
10725
10761
  }
10726
- function nb(a) {
10762
+ function ob(a) {
10727
10763
  for (var b = a.j.length, c = 0; c < b; ++c) {
10728
- var d = a.j[c], e = v(d, 1);
10764
+ var d = a.j[c], e = u(d, 1);
10729
10765
  if (a.ea == e) return false;
10730
10766
  var f = a;
10731
- var g = d, h = v(g, 1);
10732
- D(f.$);
10767
+ var g = d, h = u(g, 1);
10768
+ B(f.$);
10733
10769
  var l = f;
10734
- g = v(g, 2);
10735
- var A = "999999999999999".match(h)[0];
10736
- A.length < l.g.h.length ? l = "" : (l = A.replace(new RegExp(h, "g"), g), l = l.replace(RegExp("9", "g"), "\u2008"));
10770
+ g = u(g, 2);
10771
+ var y = "999999999999999".match(h)[0];
10772
+ y.length < l.g.h.length ? l = "" : (l = y.replace(new RegExp(h, "g"), g), l = l.replace(RegExp("9", "g"), "\u2008"));
10737
10773
  l.length > 0 ? (f.$.g(l), f = true) : f = false;
10738
- if (f) return a.ea = e, a.ia = mb.test(r(d, 4)), a.ba = 0, true;
10774
+ if (f) return a.ea = e, a.ia = nb.test(q(d, 4)), a.ba = 0, true;
10739
10775
  }
10740
10776
  return a.v = false;
10741
10777
  }
10742
- function ob(a, b) {
10778
+ function pb(a, b) {
10743
10779
  for (var c = [], d = b.length - 3, e = a.j.length, f = 0; f < e; ++f) {
10744
10780
  var g = a.j[f];
10745
- w(g, 3) == 0 ? c.push(a.j[f]) : (g = r(g, 3, Math.min(d, w(g, 3) - 1)), b.search(g) == 0 && c.push(a.j[f]));
10781
+ v(g, 3) == 0 ? c.push(a.j[f]) : (g = q(g, 3, Math.min(d, v(g, 3) - 1)), b.search(g) == 0 && c.push(a.j[f]));
10746
10782
  }
10747
10783
  a.j = c;
10748
10784
  }
10749
- function pb(a, b) {
10785
+ function qb(a, b) {
10750
10786
  a.u.g(b);
10751
10787
  var c = b;
10752
- Ia.test(c) || a.u.h.length == 1 && Ha.test(c) ? (b == "+" ? (c = b, a.da.g(b)) : (c = Ea[b], a.da.g(c), a.g.g(c)), b = c) : (a.v = false, a.ma = true);
10788
+ Ja.test(c) || a.u.h.length == 1 && Ia.test(c) ? (b == "+" ? (c = b, a.da.g(b)) : (c = Fa[b], a.da.g(c), a.g.g(c)), b = c) : (a.v = false, a.ma = true);
10753
10789
  if (!a.v) {
10754
10790
  if (!a.ma) {
10755
- if (qb(a)) {
10756
- if (rb(a)) return sb(a);
10757
- } else if (a.o.length > 0 && (b = a.g.toString(), D(a.g), a.g.g(a.o), a.g.g(b), b = a.h.toString(), c = b.lastIndexOf(a.o), D(a.h), a.h.g(b.substring(0, c))), a.o != tb(a)) return a.h.g(" "), sb(a);
10791
+ if (rb(a)) {
10792
+ if (sb(a)) return tb(a);
10793
+ } else if (a.o.length > 0 && (b = a.g.toString(), B(a.g), a.g.g(a.o), a.g.g(b), b = a.h.toString(), c = b.lastIndexOf(a.o), B(a.h), a.h.g(b.substring(0, c))), a.o != ub(a)) return a.h.g(" "), tb(a);
10758
10794
  }
10759
10795
  return a.u.toString();
10760
10796
  }
@@ -10764,93 +10800,93 @@ var _factory = (() => {
10764
10800
  case 2:
10765
10801
  return a.u.toString();
10766
10802
  case 3:
10767
- if (qb(a)) a.fa = true;
10768
- else return a.o = tb(a), ub(a);
10803
+ if (rb(a)) a.fa = true;
10804
+ else return a.o = ub(a), vb(a);
10769
10805
  default:
10770
- if (a.fa) return rb(a) && (a.fa = false), a.h.toString() + a.g.toString();
10806
+ if (a.fa) return sb(a) && (a.fa = false), a.h.toString() + a.g.toString();
10771
10807
  if (a.j.length > 0) {
10772
- b = vb(a, b);
10773
- c = wb(a);
10808
+ b = wb(a, b);
10809
+ c = xb(a);
10774
10810
  if (c.length > 0) return c;
10775
- ob(a, a.g.toString());
10776
- return nb(a) ? xb(a) : a.v ? Z(a, b) : a.u.toString();
10811
+ pb(a, a.g.toString());
10812
+ return ob(a) ? yb(a) : a.v ? X(a, b) : a.u.toString();
10777
10813
  }
10778
- return ub(a);
10814
+ return vb(a);
10779
10815
  }
10780
10816
  }
10781
- function sb(a) {
10817
+ function tb(a) {
10782
10818
  a.v = true;
10783
10819
  a.fa = false;
10784
10820
  a.j = [];
10785
10821
  a.ba = 0;
10786
- D(a.$);
10822
+ B(a.$);
10787
10823
  a.ea = "";
10788
- return ub(a);
10824
+ return vb(a);
10789
10825
  }
10790
- function wb(a) {
10826
+ function xb(a) {
10791
10827
  for (var b = a.g.toString(), c = a.j.length, d = 0; d < c; ++d) {
10792
- var e = a.j[d], f = v(e, 1);
10793
- if (new RegExp("^(?:" + f + ")$").test(b) && (a.ia = mb.test(r(e, 4)), e = b.replace(new RegExp(f, "g"), r(e, 2)), e = Z(a, e), O(e, Fa) == a.da)) return e;
10828
+ var e = a.j[d], f = u(e, 1);
10829
+ if (new RegExp("^(?:" + f + ")$").test(b) && (a.ia = nb.test(q(e, 4)), e = b.replace(new RegExp(f, "g"), q(e, 2)), e = X(a, e), M(e, Ga) == a.da)) return e;
10794
10830
  }
10795
10831
  return "";
10796
10832
  }
10797
- function Z(a, b) {
10833
+ function X(a, b) {
10798
10834
  var c = a.h.h.length;
10799
10835
  return a.ia && c > 0 && a.h.toString().charAt(c - 1) != " " ? a.h + " " + b : a.h + b;
10800
10836
  }
10801
- function ub(a) {
10837
+ function vb(a) {
10802
10838
  var b = a.g.toString();
10803
10839
  if (b.length >= 3) {
10804
- for (var c = a.aa && a.o.length == 0 && w(a.l, 20) > 0 ? u(a.l, 20) || [] : u(a.l, 19) || [], d = c.length, e = 0; e < d; ++e) {
10840
+ for (var c = a.aa && a.o.length == 0 && v(a.l, 20) > 0 ? t(a.l, 20) || [] : t(a.l, 19) || [], d = c.length, e = 0; e < d; ++e) {
10805
10841
  var f = c[e];
10806
- a.o.length > 0 && Ya(v(f, 4)) && !r(f, 6) && !q(f, 5) || (a.o.length != 0 || a.aa || Ya(v(f, 4)) || r(f, 6)) && lb.test(v(f, 2)) && a.j.push(f);
10842
+ a.o.length > 0 && Za(u(f, 4)) && !q(f, 6) && !p(f, 5) || (a.o.length != 0 || a.aa || Za(u(f, 4)) || q(f, 6)) && mb.test(u(f, 2)) && a.j.push(f);
10807
10843
  }
10808
- ob(a, b);
10809
- b = wb(a);
10810
- return b.length > 0 ? b : nb(a) ? xb(a) : a.u.toString();
10844
+ pb(a, b);
10845
+ b = xb(a);
10846
+ return b.length > 0 ? b : ob(a) ? yb(a) : a.u.toString();
10811
10847
  }
10812
- return Z(a, b);
10848
+ return X(a, b);
10813
10849
  }
10814
- function xb(a) {
10850
+ function yb(a) {
10815
10851
  var b = a.g.toString(), c = b.length;
10816
10852
  if (c > 0) {
10817
- for (var d = "", e = 0; e < c; e++) d = vb(a, b.charAt(e));
10818
- return a.v ? Z(a, d) : a.u.toString();
10853
+ for (var d = "", e = 0; e < c; e++) d = wb(a, b.charAt(e));
10854
+ return a.v ? X(a, d) : a.u.toString();
10819
10855
  }
10820
10856
  return a.h.toString();
10821
10857
  }
10822
- function tb(a) {
10858
+ function ub(a) {
10823
10859
  var b = a.g.toString(), c = 0;
10824
- if (r(a.l, 10) != 1) var d = false;
10860
+ if (q(a.l, 10) != 1) var d = false;
10825
10861
  else d = a.g.toString(), d = d.charAt(0) == "1" && d.charAt(1) != "0" && d.charAt(1) != "1";
10826
- d ? (c = 1, a.h.g("1").g(" "), a.aa = true) : q(a.l, 15) && (d = new RegExp("^(?:" + r(a.l, 15) + ")"), d = b.match(d), d != null && d[0] != null && d[0].length > 0 && (a.aa = true, c = d[0].length, a.h.g(b.substring(0, c))));
10827
- D(a.g);
10862
+ d ? (c = 1, a.h.g("1").g(" "), a.aa = true) : p(a.l, 15) && (d = new RegExp("^(?:" + q(a.l, 15) + ")"), d = b.match(d), d != null && d[0] != null && d[0].length > 0 && (a.aa = true, c = d[0].length, a.h.g(b.substring(0, c))));
10863
+ B(a.g);
10828
10864
  a.g.g(b.substring(c));
10829
10865
  return b.substring(0, c);
10830
10866
  }
10831
- function qb(a) {
10832
- var b = a.da.toString(), c = new RegExp("^(?:\\+|" + r(a.l, 11) + ")");
10867
+ function rb(a) {
10868
+ var b = a.da.toString(), c = new RegExp("^(?:\\+|" + q(a.l, 11) + ")");
10833
10869
  c = b.match(c);
10834
- return c != null && c[0] != null && c[0].length > 0 ? (a.aa = true, c = c[0].length, D(a.g), a.g.g(b.substring(c)), D(a.h), a.h.g(b.substring(0, c)), b.charAt(0) != "+" && a.h.g(" "), true) : false;
10870
+ return c != null && c[0] != null && c[0].length > 0 ? (a.aa = true, c = c[0].length, B(a.g), a.g.g(b.substring(c)), B(a.h), a.h.g(b.substring(0, c)), b.charAt(0) != "+" && a.h.g(" "), true) : false;
10835
10871
  }
10836
- function rb(a) {
10872
+ function sb(a) {
10837
10873
  if (a.g.h.length == 0) return false;
10838
- var b = new C(), c = eb(a.g, b);
10874
+ var b = new A(), c = fb(a.g, b);
10839
10875
  if (c == 0) return false;
10840
- D(a.g);
10876
+ B(a.g);
10841
10877
  a.g.g(b.toString());
10842
- b = S(c);
10843
- "001" == b ? a.l = T(a.ha, "" + c) : b != a.la && (a.l = jb(a, b));
10878
+ b = Q(c);
10879
+ "001" == b ? a.l = R(a.ha, "" + c) : b != a.la && (a.l = kb(a, b));
10844
10880
  a.h.g("" + c).g(" ");
10845
10881
  a.o = "";
10846
10882
  return true;
10847
10883
  }
10848
- function vb(a, b) {
10884
+ function wb(a, b) {
10849
10885
  var c = a.$.toString();
10850
10886
  if (c.substring(a.ba).search(a.ga) >= 0) {
10851
10887
  var d = c.search(a.ga);
10852
10888
  b = c.replace(a.ga, b);
10853
- D(a.$);
10889
+ B(a.$);
10854
10890
  a.$.g(b);
10855
10891
  a.ba = d;
10856
10892
  return b.substring(0, a.ba + 1);
@@ -10860,119 +10896,137 @@ var _factory = (() => {
10860
10896
  return a.u.toString();
10861
10897
  }
10862
10898
  ;
10863
- const yb = (a) => {
10899
+ const zb = {};
10900
+ ["E164", "INTERNATIONAL", "NATIONAL", "RFC3966"].forEach((a, b) => {
10901
+ zb[a] = b;
10902
+ });
10903
+ const Z = {};
10904
+ "FIXED_LINE MOBILE FIXED_LINE_OR_MOBILE TOLL_FREE PREMIUM_RATE SHARED_COST VOIP PERSONAL_NUMBER PAGER UAN VOICEMAIL UNKNOWN".split(" ").forEach((a, b) => {
10905
+ Z[a] = b;
10906
+ });
10907
+ Z.UNKNOWN = -1;
10908
+ const Ab = {};
10909
+ "IS_POSSIBLE INVALID_COUNTRY_CODE TOO_SHORT TOO_LONG IS_POSSIBLE_LOCAL_ONLY INVALID_LENGTH".split(" ").forEach((a, b) => {
10910
+ Ab[a] = b;
10911
+ });
10912
+ const Bb = {};
10913
+ Object.keys(Z).forEach((a) => {
10914
+ Bb[Z[a]] = a;
10915
+ });
10916
+ const Cb = {};
10917
+ Object.keys(Ab).forEach((a) => {
10918
+ Cb[Ab[a]] = a;
10919
+ });
10920
+ const Db = (a) => {
10864
10921
  const b = [];
10865
10922
  a.includes("FIXED_LINE_OR_MOBILE") ? (a.includes("MOBILE") || b.push("MOBILE"), a.includes("FIXED_LINE") || b.push("FIXED_LINE")) : (a.includes("MOBILE") || a.includes("FIXED_LINE")) && b.push("FIXED_LINE_OR_MOBILE");
10866
10923
  return a.concat(b);
10867
- }, zb = { 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 };
10868
- m("utils", {});
10869
- m("utils.formatNumberAsYouType", (a, b) => {
10924
+ };
10925
+ k("utils", {});
10926
+ k("utils.formatNumberAsYouType", (a, b) => {
10870
10927
  try {
10871
- const c = a.replace(/[^+0-9]/g, ""), d = new ib(b);
10928
+ const c = a.replace(/[^+0-9]/g, ""), d = new jb(b);
10872
10929
  b = "";
10873
- for (let e = 0; e < c.length; e++) d.ka = pb(d, c.charAt(e)), b = d.ka;
10930
+ for (let e = 0; e < c.length; e++) d.ka = qb(d, c.charAt(e)), b = d.ka;
10874
10931
  return b;
10875
10932
  } catch {
10876
10933
  return a;
10877
10934
  }
10878
10935
  });
10879
- m("utils.formatNumber", (a, b, c) => {
10936
+ k("utils.formatNumber", (a, b, c) => {
10880
10937
  try {
10881
- const e = K.g(), f = Y(e, a, b);
10882
- var d = X(e, f, -1);
10883
- return d == 0 || d == 4 ? e.format(f, typeof c === "undefined" ? 0 : c) : a;
10938
+ const e = I.g(), f = W(e, a, b);
10939
+ var d = V(e, f, -1);
10940
+ return d == 0 || d == 4 ? e.format(f, typeof c === "undefined" ? 0 : zb[c]) : a;
10884
10941
  } catch {
10885
10942
  return a;
10886
10943
  }
10887
10944
  });
10888
- m("utils.getExampleNumber", (a, b, c, d) => {
10945
+ k("utils.getExampleNumber", (a, b, c, d) => {
10889
10946
  try {
10890
- const l = K.g();
10947
+ const y = I.g();
10891
10948
  a: {
10892
- var e = l;
10893
- if (P(a)) {
10894
- var f = U(T(e, a), c);
10949
+ var e = y, f = Z[c];
10950
+ if (N(a)) {
10951
+ var g = S(R(e, a), f);
10895
10952
  try {
10896
- if (q(f, 6)) {
10897
- var g = r(f, 6);
10898
- var h = hb(e, g, a, false);
10953
+ if (p(g, 6)) {
10954
+ var h = q(g, 6);
10955
+ var l = ib(e, h, a, false);
10899
10956
  break a;
10900
10957
  }
10901
- } catch (A) {
10958
+ } catch (Y) {
10902
10959
  }
10903
10960
  }
10904
- h = null;
10961
+ l = null;
10905
10962
  }
10906
- return l.format(h, d ? 0 : b ? 2 : 1);
10963
+ return y.format(l, d ? 0 : b ? 2 : 1);
10907
10964
  } catch {
10908
10965
  return "";
10909
10966
  }
10910
10967
  });
10911
- m("utils.getExtension", (a, b) => {
10968
+ k("utils.getExtension", (a, b) => {
10912
10969
  try {
10913
- var c = Y(K.g(), a, b);
10914
- return r(c, 3);
10970
+ var c = W(I.g(), a, b);
10971
+ return q(c, 3);
10915
10972
  } catch {
10916
10973
  return "";
10917
10974
  }
10918
10975
  });
10919
- m("utils.getNumberType", (a, b) => {
10976
+ k("utils.getNumberType", (a, b) => {
10920
10977
  try {
10921
- const c = K.g(), d = Y(c, a, b);
10922
- return $a(c, d);
10978
+ const c = I.g(), d = W(c, a, b), e = ab(c, d);
10979
+ return Bb[e] || null;
10923
10980
  } catch {
10924
- return -99;
10981
+ return null;
10925
10982
  }
10926
10983
  });
10927
- m("utils.getValidationError", (a, b) => {
10928
- if (!b) return 1;
10984
+ k("utils.getValidationError", (a, b) => {
10985
+ if (!b) return "INVALID_COUNTRY_CODE";
10929
10986
  try {
10930
- const c = K.g(), d = Y(c, a, b);
10931
- return X(c, d, -1);
10987
+ const c = I.g(), d = W(c, a, b), e = V(c, d, -1);
10988
+ return Cb[e] || null;
10932
10989
  } catch (c) {
10933
- return c.message === "Invalid country calling code" ? 1 : a.length <= 3 || c.message === "Phone number too short after IDD" || c.message === "The string supplied is too short to be a phone number" ? 2 : c.message === "The string supplied is too long to be a phone number" ? 3 : -99;
10990
+ return c.message === "Invalid country calling code" ? "INVALID_COUNTRY_CODE" : a.length <= 3 || c.message === "Phone number too short after IDD" || c.message === "The string supplied is too short to be a phone number" ? "TOO_SHORT" : c.message === "The string supplied is too long to be a phone number" ? "TOO_LONG" : null;
10934
10991
  }
10935
10992
  });
10936
- m("utils.isValidNumber", (a, b, c) => {
10993
+ k("utils.isValidNumber", (a, b, c) => {
10937
10994
  try {
10938
- const d = K.g(), e = Y(d, a, b), f = cb(d, e);
10995
+ const d = I.g(), e = W(d, a, b), f = db(d, e);
10939
10996
  if (c) {
10940
- const g = yb(c).map((h) => zb[h]);
10941
- return f && g.includes($a(d, e));
10997
+ const g = Db(c).map((h) => Z[h]);
10998
+ return f && g.includes(ab(d, e));
10942
10999
  }
10943
11000
  return f;
10944
11001
  } catch {
10945
11002
  return false;
10946
11003
  }
10947
11004
  });
10948
- m("utils.isPossibleNumber", (a, b, c) => {
11005
+ k("utils.isPossibleNumber", (a, b, c) => {
10949
11006
  try {
10950
- const d = K.g(), e = Y(d, a, b);
11007
+ const d = I.g(), e = W(d, a, b);
10951
11008
  if (c) {
10952
- const f = yb(c);
10953
- for (let g of f) if (X(d, e, zb[g]) === 0) return true;
11009
+ const f = Db(c);
11010
+ for (let g of f) if (V(d, e, Z[g]) === 0) return true;
10954
11011
  return false;
10955
11012
  }
10956
- return X(d, e, -1) === 0;
11013
+ return V(d, e, -1) === 0;
10957
11014
  } catch {
10958
11015
  return false;
10959
11016
  }
10960
11017
  });
10961
- m("utils.getCoreNumber", (a, b) => {
11018
+ k("utils.getCoreNumber", (a, b) => {
10962
11019
  try {
10963
- var c = Y(K.g(), a, b);
10964
- return r(c, 2).toString();
11020
+ var c = W(I.g(), a, b);
11021
+ return q(c, 2).toString();
10965
11022
  } catch {
10966
11023
  return "";
10967
11024
  }
10968
11025
  });
10969
- m("utils.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 });
10970
- m("utils.numberType", zb);
10971
- m("utils.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
10972
11026
  }).call(_scope);
10973
11027
  var utils_default = _scope.utils;
10974
11028
 
10975
- // src/js/intlTelInputWithUtils.ts
11029
+ // packages/core/src/js/intlTelInputWithUtils.ts
10976
11030
  intlTelInput_default.utils = utils_default;
10977
11031
  var intlTelInputWithUtils_default = intlTelInput_default;
10978
11032
  return __toCommonJS(intlTelInputWithUtils_exports);