intl-tel-input 25.13.0 → 25.13.1

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.
@@ -2435,42 +2435,34 @@ const f2 = (h) => {
2435
2435
  const i = $.iso2.toLowerCase();
2436
2436
  e.i18n[i] && ($.name = e.i18n[i]);
2437
2437
  }
2438
- }, C2 = (h, e) => {
2439
- const $ = /* @__PURE__ */ new Set();
2440
- let i = 0;
2441
- const s = {}, a = (u, f, C) => {
2438
+ }, C2 = (h) => {
2439
+ const e = /* @__PURE__ */ new Set();
2440
+ let $ = 0;
2441
+ const i = {}, s = (u, f) => {
2442
2442
  if (!u || !f)
2443
2443
  return;
2444
- f.length > i && (i = f.length), s.hasOwnProperty(f) || (s[f] = []);
2445
- const y = s[f];
2446
- if (y.includes(u))
2447
- return;
2448
- const _ = C !== void 0 ? C : y.length;
2449
- y[_] = u;
2450
- };
2451
- for (const u of h) {
2452
- $.has(u.dialCode) || $.add(u.dialCode);
2444
+ f.length > $ && ($ = f.length), i.hasOwnProperty(f) || (i[f] = []);
2445
+ const C = i[f];
2446
+ C.includes(u) || C.push(u);
2447
+ }, a = [...h].sort((u, f) => u.priority - f.priority);
2448
+ for (const u of a) {
2449
+ e.has(u.dialCode) || e.add(u.dialCode);
2453
2450
  for (let f = 1; f < u.dialCode.length; f++) {
2454
2451
  const C = u.dialCode.substring(0, f);
2455
- a(u.iso2, C);
2452
+ s(u.iso2, C);
2456
2453
  }
2457
- a(u.iso2, u.dialCode, u.priority);
2458
- }
2459
- (e.onlyCountries.length || e.excludeCountries.length) && $.forEach((u) => {
2460
- s[u] = s[u].filter(Boolean);
2461
- });
2462
- for (const u of h)
2463
- if (u.areaCodes) {
2464
- const f = s[u.dialCode][0];
2454
+ if (s(u.iso2, u.dialCode), u.areaCodes) {
2455
+ const f = i[u.dialCode][0];
2465
2456
  for (const C of u.areaCodes) {
2466
2457
  for (let y = 1; y < C.length; y++) {
2467
2458
  const _ = C.substring(0, y), T = u.dialCode + _;
2468
- a(f, T), a(u.iso2, T);
2459
+ s(f, T), s(u.iso2, T);
2469
2460
  }
2470
- a(u.iso2, u.dialCode + C);
2461
+ s(u.iso2, u.dialCode + C);
2471
2462
  }
2472
2463
  }
2473
- return { dialCodes: $, dialCodeMaxLen: i, dialCodeToIso2Map: s };
2464
+ }
2465
+ return { dialCodes: e, dialCodeMaxLen: $, dialCodeToIso2Map: i };
2474
2466
  }, g2 = (h, e) => {
2475
2467
  e.countryOrder && (e.countryOrder = e.countryOrder.map(
2476
2468
  ($) => $.toLowerCase()
@@ -2542,8 +2534,7 @@ class B1 {
2542
2534
  constructor(e, $ = {}) {
2543
2535
  this.id = E2++, this.options = { ...L0, ...$ }, o2(this.options, b0), this.ui = new h2(e, this.options, this.id), this.isAndroid = B1._getIsAndroid(), this.promise = this._createInitPromises(), this.countries = f2(this.options);
2544
2536
  const { dialCodes: i, dialCodeMaxLen: s, dialCodeToIso2Map: a } = C2(
2545
- this.countries,
2546
- this.options
2537
+ this.countries
2547
2538
  );
2548
2539
  this.dialCodes = i, this.dialCodeMaxLen = s, this.dialCodeToIso2Map = a, this.countryByIso2 = new Map(this.countries.map((u) => [u.iso2, u])), this._init();
2549
2540
  }
@@ -3319,7 +3310,7 @@ const b2 = (h) => {
3319
3310
  attachUtils: b2,
3320
3311
  startedLoadingUtilsScript: !1,
3321
3312
  startedLoadingAutoCountry: !1,
3322
- version: "25.13.0"
3313
+ version: "25.13.1"
3323
3314
  }
3324
3315
  );
3325
3316
  (function() {