intl-tel-input 25.10.5 → 25.10.7

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.
@@ -1262,6 +1262,13 @@ var rawCountryData = [
1262
1262
  // Tuvalu
1263
1263
  "688"
1264
1264
  ],
1265
+ [
1266
+ "vi",
1267
+ // U.S. Virgin Islands
1268
+ "1",
1269
+ 24,
1270
+ ["340"]
1271
+ ],
1265
1272
  [
1266
1273
  "ug",
1267
1274
  // Uganda
@@ -1296,13 +1303,6 @@ var rawCountryData = [
1296
1303
  // Uruguay
1297
1304
  "598"
1298
1305
  ],
1299
- [
1300
- "vi",
1301
- // U.S. Virgin Islands
1302
- "1",
1303
- 24,
1304
- ["340"]
1305
- ],
1306
1306
  [
1307
1307
  "uz",
1308
1308
  // Uzbekistan
@@ -1878,6 +1878,9 @@ var Iti = class _Iti {
1878
1878
  }
1879
1879
  //* Add a dial code to this.dialCodeToIso2Map.
1880
1880
  _addToDialCodeMap(iso2, dialCode, priority) {
1881
+ if (!iso2 || !dialCode) {
1882
+ return;
1883
+ }
1881
1884
  if (dialCode.length > this.dialCodeMaxLen) {
1882
1885
  this.dialCodeMaxLen = dialCode.length;
1883
1886
  }
@@ -1932,6 +1935,11 @@ var Iti = class _Iti {
1932
1935
  }
1933
1936
  this._addToDialCodeMap(c.iso2, c.dialCode, c.priority);
1934
1937
  }
1938
+ if (this.options.onlyCountries.length || this.options.excludeCountries.length) {
1939
+ this.dialCodes.forEach((dialCode) => {
1940
+ this.dialCodeToIso2Map[dialCode] = this.dialCodeToIso2Map[dialCode].filter(Boolean);
1941
+ });
1942
+ }
1935
1943
  for (const c of this.countries) {
1936
1944
  if (c.areaCodes) {
1937
1945
  const rootIso2Code = this.dialCodeToIso2Map[c.dialCode][0];
@@ -2350,7 +2358,7 @@ var Iti = class _Iti {
2350
2358
  _openDropdownWithPlus() {
2351
2359
  this._openDropdown();
2352
2360
  this.searchInput.value = "+";
2353
- this._filterCountries("", true);
2361
+ this._filterCountries("");
2354
2362
  }
2355
2363
  //* Initialize the tel input listeners.
2356
2364
  _initTelInputListeners() {
@@ -2419,6 +2427,36 @@ var Iti = class _Iti {
2419
2427
  };
2420
2428
  this.telInput.addEventListener("keydown", this._handleKeydownEvent);
2421
2429
  }
2430
+ if (strictMode) {
2431
+ this._handlePasteEvent = (e) => {
2432
+ e.preventDefault();
2433
+ const input = this.telInput;
2434
+ const selStart = input.selectionStart;
2435
+ const selEnd = input.selectionEnd;
2436
+ const pasted = e.clipboardData.getData("text");
2437
+ const initialCharSelected = selStart === 0 && selEnd > 0;
2438
+ const allowLeadingPlus = !input.value.startsWith("+") || initialCharSelected;
2439
+ const allowedChars = pasted.replace(/[^0-9+]/g, "");
2440
+ const hasLeadingPlus = allowedChars.startsWith("+");
2441
+ const numerics = allowedChars.replace(/\+/g, "");
2442
+ const sanitised = hasLeadingPlus && allowLeadingPlus ? `+${numerics}` : numerics;
2443
+ let newVal = input.value.slice(0, selStart) + sanitised + input.value.slice(selEnd);
2444
+ const coreNumber = intlTelInput.utils.getCoreNumber(newVal, this.selectedCountryData.iso2);
2445
+ if (this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength) {
2446
+ if (input.selectionEnd === input.value.length) {
2447
+ const trimLength = coreNumber.length - this.maxCoreNumberLength;
2448
+ newVal = newVal.slice(0, newVal.length - trimLength);
2449
+ } else {
2450
+ return;
2451
+ }
2452
+ }
2453
+ input.value = newVal;
2454
+ const caretPos = selStart + sanitised.length;
2455
+ input.setSelectionRange(caretPos, caretPos);
2456
+ input.dispatchEvent(new InputEvent("input", { bubbles: true }));
2457
+ };
2458
+ this.telInput.addEventListener("paste", this._handlePasteEvent);
2459
+ }
2422
2460
  }
2423
2461
  //* Adhere to the input's maxlength attr.
2424
2462
  _cap(number) {
@@ -2533,11 +2571,7 @@ var Iti = class _Iti {
2533
2571
  if (this.options.countrySearch) {
2534
2572
  const doFilter = () => {
2535
2573
  const inputQuery = this.searchInput.value.trim();
2536
- if (inputQuery) {
2537
- this._filterCountries(inputQuery);
2538
- } else {
2539
- this._filterCountries("", true);
2540
- }
2574
+ this._filterCountries(inputQuery);
2541
2575
  if (this.searchInput.value) {
2542
2576
  this.searchClearButton.classList.remove("iti__hide");
2543
2577
  } else {
@@ -2576,42 +2610,44 @@ var Iti = class _Iti {
2576
2610
  }
2577
2611
  }
2578
2612
  //* Country search enabled: Filter the countries according to the search query.
2579
- _filterCountries(query, isReset = false) {
2613
+ _filterCountries(query) {
2580
2614
  let noCountriesAddedYet = true;
2581
2615
  this.countryList.innerHTML = "";
2582
2616
  const normalisedQuery = normaliseString(query);
2583
- const queryLength = normalisedQuery.length;
2584
- const iso2Matches = [];
2585
- const nameStartWith = [];
2586
- const nameContains = [];
2587
- const dialCodeMatches = [];
2588
- const dialCodeContains = [];
2589
- const initialsMatches = [];
2590
- for (const c of this.countries) {
2591
- if (isReset || queryLength === 0) {
2592
- nameContains.push(c);
2593
- } else if (c.iso2 === normalisedQuery) {
2594
- iso2Matches.push(c);
2595
- } else if (c.normalisedName.startsWith(normalisedQuery)) {
2596
- nameStartWith.push(c);
2597
- } else if (c.normalisedName.includes(normalisedQuery)) {
2598
- nameContains.push(c);
2599
- } else if (normalisedQuery === c.dialCode || normalisedQuery === c.dialCodePlus) {
2600
- dialCodeMatches.push(c);
2601
- } else if (c.dialCodePlus.includes(normalisedQuery)) {
2602
- dialCodeContains.push(c);
2603
- } else if (c.initials.includes(normalisedQuery)) {
2604
- initialsMatches.push(c);
2617
+ let matchedCountries;
2618
+ if (query === "") {
2619
+ matchedCountries = this.countries;
2620
+ } else {
2621
+ const iso2Matches = [];
2622
+ const nameStartWith = [];
2623
+ const nameContains = [];
2624
+ const dialCodeMatches = [];
2625
+ const dialCodeContains = [];
2626
+ const initialsMatches = [];
2627
+ for (const c of this.countries) {
2628
+ if (c.iso2 === normalisedQuery) {
2629
+ iso2Matches.push(c);
2630
+ } else if (c.normalisedName.startsWith(normalisedQuery)) {
2631
+ nameStartWith.push(c);
2632
+ } else if (c.normalisedName.includes(normalisedQuery)) {
2633
+ nameContains.push(c);
2634
+ } else if (normalisedQuery === c.dialCode || normalisedQuery === c.dialCodePlus) {
2635
+ dialCodeMatches.push(c);
2636
+ } else if (c.dialCodePlus.includes(normalisedQuery)) {
2637
+ dialCodeContains.push(c);
2638
+ } else if (c.initials.includes(normalisedQuery)) {
2639
+ initialsMatches.push(c);
2640
+ }
2605
2641
  }
2642
+ matchedCountries = [
2643
+ ...iso2Matches.sort((a, b) => a.priority - b.priority),
2644
+ ...nameStartWith.sort((a, b) => a.priority - b.priority),
2645
+ ...nameContains.sort((a, b) => a.priority - b.priority),
2646
+ ...dialCodeMatches.sort((a, b) => a.priority - b.priority),
2647
+ ...dialCodeContains.sort((a, b) => a.priority - b.priority),
2648
+ ...initialsMatches.sort((a, b) => a.priority - b.priority)
2649
+ ];
2606
2650
  }
2607
- const matchedCountries = [
2608
- ...iso2Matches.sort((a, b) => a.priority - b.priority),
2609
- ...nameStartWith.sort((a, b) => a.priority - b.priority),
2610
- ...nameContains.sort((a, b) => a.priority - b.priority),
2611
- ...dialCodeMatches.sort((a, b) => a.priority - b.priority),
2612
- ...dialCodeContains.sort((a, b) => a.priority - b.priority),
2613
- ...initialsMatches.sort((a, b) => a.priority - b.priority)
2614
- ];
2615
2651
  for (const c of matchedCountries) {
2616
2652
  const listItem = c.nodeById[this.id];
2617
2653
  if (listItem) {
@@ -2718,22 +2754,27 @@ var Iti = class _Iti {
2718
2754
  if (dialCodeMatch) {
2719
2755
  const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
2720
2756
  const iso2Codes = this.dialCodeToIso2Map[dialCodeMatchNumeric];
2757
+ if (iso2Codes.length === 1) {
2758
+ if (iso2Codes[0] === selectedIso2) {
2759
+ return null;
2760
+ }
2761
+ return iso2Codes[0];
2762
+ }
2721
2763
  if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
2722
2764
  return this.defaultCountry;
2723
2765
  }
2766
+ const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
2767
+ if (isRegionlessNanpNumber) {
2768
+ return null;
2769
+ }
2724
2770
  const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
2725
2771
  const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
2726
- const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
2727
- if (!isRegionlessNanpNumber && !alreadySelected) {
2728
- for (const iso2 of iso2Codes) {
2729
- if (iso2) {
2730
- return iso2;
2731
- }
2732
- }
2772
+ if (!alreadySelected) {
2773
+ return iso2Codes[0];
2733
2774
  }
2734
2775
  } else if (number.charAt(0) === "+" && numeric.length) {
2735
2776
  return "";
2736
- } else if ((!number || number === "+") && !this.selectedCountryData.iso2) {
2777
+ } else if ((!number || number === "+") && !selectedIso2) {
2737
2778
  return this.defaultCountry;
2738
2779
  }
2739
2780
  return null;
@@ -3104,6 +3145,9 @@ var Iti = class _Iti {
3104
3145
  if (this._handleKeydownEvent) {
3105
3146
  this.telInput.removeEventListener("keydown", this._handleKeydownEvent);
3106
3147
  }
3148
+ if (this._handlePasteEvent) {
3149
+ this.telInput.removeEventListener("paste", this._handlePasteEvent);
3150
+ }
3107
3151
  this.telInput.removeAttribute("data-intl-tel-input-id");
3108
3152
  if (separateDialCode) {
3109
3153
  if (this.isRTL) {
@@ -3282,7 +3326,7 @@ var intlTelInput = Object.assign(
3282
3326
  attachUtils,
3283
3327
  startedLoadingUtilsScript: false,
3284
3328
  startedLoadingAutoCountry: false,
3285
- version: "25.10.5"
3329
+ version: "25.10.7"
3286
3330
  }
3287
3331
  );
3288
3332
  var intl_tel_input_default = intlTelInput;
@@ -1226,6 +1226,13 @@ var rawCountryData = [
1226
1226
  // Tuvalu
1227
1227
  "688"
1228
1228
  ],
1229
+ [
1230
+ "vi",
1231
+ // U.S. Virgin Islands
1232
+ "1",
1233
+ 24,
1234
+ ["340"]
1235
+ ],
1229
1236
  [
1230
1237
  "ug",
1231
1238
  // Uganda
@@ -1260,13 +1267,6 @@ var rawCountryData = [
1260
1267
  // Uruguay
1261
1268
  "598"
1262
1269
  ],
1263
- [
1264
- "vi",
1265
- // U.S. Virgin Islands
1266
- "1",
1267
- 24,
1268
- ["340"]
1269
- ],
1270
1270
  [
1271
1271
  "uz",
1272
1272
  // Uzbekistan
@@ -1842,6 +1842,9 @@ var Iti = class _Iti {
1842
1842
  }
1843
1843
  //* Add a dial code to this.dialCodeToIso2Map.
1844
1844
  _addToDialCodeMap(iso2, dialCode, priority) {
1845
+ if (!iso2 || !dialCode) {
1846
+ return;
1847
+ }
1845
1848
  if (dialCode.length > this.dialCodeMaxLen) {
1846
1849
  this.dialCodeMaxLen = dialCode.length;
1847
1850
  }
@@ -1896,6 +1899,11 @@ var Iti = class _Iti {
1896
1899
  }
1897
1900
  this._addToDialCodeMap(c.iso2, c.dialCode, c.priority);
1898
1901
  }
1902
+ if (this.options.onlyCountries.length || this.options.excludeCountries.length) {
1903
+ this.dialCodes.forEach((dialCode) => {
1904
+ this.dialCodeToIso2Map[dialCode] = this.dialCodeToIso2Map[dialCode].filter(Boolean);
1905
+ });
1906
+ }
1899
1907
  for (const c of this.countries) {
1900
1908
  if (c.areaCodes) {
1901
1909
  const rootIso2Code = this.dialCodeToIso2Map[c.dialCode][0];
@@ -2314,7 +2322,7 @@ var Iti = class _Iti {
2314
2322
  _openDropdownWithPlus() {
2315
2323
  this._openDropdown();
2316
2324
  this.searchInput.value = "+";
2317
- this._filterCountries("", true);
2325
+ this._filterCountries("");
2318
2326
  }
2319
2327
  //* Initialize the tel input listeners.
2320
2328
  _initTelInputListeners() {
@@ -2383,6 +2391,36 @@ var Iti = class _Iti {
2383
2391
  };
2384
2392
  this.telInput.addEventListener("keydown", this._handleKeydownEvent);
2385
2393
  }
2394
+ if (strictMode) {
2395
+ this._handlePasteEvent = (e) => {
2396
+ e.preventDefault();
2397
+ const input = this.telInput;
2398
+ const selStart = input.selectionStart;
2399
+ const selEnd = input.selectionEnd;
2400
+ const pasted = e.clipboardData.getData("text");
2401
+ const initialCharSelected = selStart === 0 && selEnd > 0;
2402
+ const allowLeadingPlus = !input.value.startsWith("+") || initialCharSelected;
2403
+ const allowedChars = pasted.replace(/[^0-9+]/g, "");
2404
+ const hasLeadingPlus = allowedChars.startsWith("+");
2405
+ const numerics = allowedChars.replace(/\+/g, "");
2406
+ const sanitised = hasLeadingPlus && allowLeadingPlus ? `+${numerics}` : numerics;
2407
+ let newVal = input.value.slice(0, selStart) + sanitised + input.value.slice(selEnd);
2408
+ const coreNumber = intlTelInput.utils.getCoreNumber(newVal, this.selectedCountryData.iso2);
2409
+ if (this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength) {
2410
+ if (input.selectionEnd === input.value.length) {
2411
+ const trimLength = coreNumber.length - this.maxCoreNumberLength;
2412
+ newVal = newVal.slice(0, newVal.length - trimLength);
2413
+ } else {
2414
+ return;
2415
+ }
2416
+ }
2417
+ input.value = newVal;
2418
+ const caretPos = selStart + sanitised.length;
2419
+ input.setSelectionRange(caretPos, caretPos);
2420
+ input.dispatchEvent(new InputEvent("input", { bubbles: true }));
2421
+ };
2422
+ this.telInput.addEventListener("paste", this._handlePasteEvent);
2423
+ }
2386
2424
  }
2387
2425
  //* Adhere to the input's maxlength attr.
2388
2426
  _cap(number) {
@@ -2497,11 +2535,7 @@ var Iti = class _Iti {
2497
2535
  if (this.options.countrySearch) {
2498
2536
  const doFilter = () => {
2499
2537
  const inputQuery = this.searchInput.value.trim();
2500
- if (inputQuery) {
2501
- this._filterCountries(inputQuery);
2502
- } else {
2503
- this._filterCountries("", true);
2504
- }
2538
+ this._filterCountries(inputQuery);
2505
2539
  if (this.searchInput.value) {
2506
2540
  this.searchClearButton.classList.remove("iti__hide");
2507
2541
  } else {
@@ -2540,42 +2574,44 @@ var Iti = class _Iti {
2540
2574
  }
2541
2575
  }
2542
2576
  //* Country search enabled: Filter the countries according to the search query.
2543
- _filterCountries(query, isReset = false) {
2577
+ _filterCountries(query) {
2544
2578
  let noCountriesAddedYet = true;
2545
2579
  this.countryList.innerHTML = "";
2546
2580
  const normalisedQuery = normaliseString(query);
2547
- const queryLength = normalisedQuery.length;
2548
- const iso2Matches = [];
2549
- const nameStartWith = [];
2550
- const nameContains = [];
2551
- const dialCodeMatches = [];
2552
- const dialCodeContains = [];
2553
- const initialsMatches = [];
2554
- for (const c of this.countries) {
2555
- if (isReset || queryLength === 0) {
2556
- nameContains.push(c);
2557
- } else if (c.iso2 === normalisedQuery) {
2558
- iso2Matches.push(c);
2559
- } else if (c.normalisedName.startsWith(normalisedQuery)) {
2560
- nameStartWith.push(c);
2561
- } else if (c.normalisedName.includes(normalisedQuery)) {
2562
- nameContains.push(c);
2563
- } else if (normalisedQuery === c.dialCode || normalisedQuery === c.dialCodePlus) {
2564
- dialCodeMatches.push(c);
2565
- } else if (c.dialCodePlus.includes(normalisedQuery)) {
2566
- dialCodeContains.push(c);
2567
- } else if (c.initials.includes(normalisedQuery)) {
2568
- initialsMatches.push(c);
2581
+ let matchedCountries;
2582
+ if (query === "") {
2583
+ matchedCountries = this.countries;
2584
+ } else {
2585
+ const iso2Matches = [];
2586
+ const nameStartWith = [];
2587
+ const nameContains = [];
2588
+ const dialCodeMatches = [];
2589
+ const dialCodeContains = [];
2590
+ const initialsMatches = [];
2591
+ for (const c of this.countries) {
2592
+ if (c.iso2 === normalisedQuery) {
2593
+ iso2Matches.push(c);
2594
+ } else if (c.normalisedName.startsWith(normalisedQuery)) {
2595
+ nameStartWith.push(c);
2596
+ } else if (c.normalisedName.includes(normalisedQuery)) {
2597
+ nameContains.push(c);
2598
+ } else if (normalisedQuery === c.dialCode || normalisedQuery === c.dialCodePlus) {
2599
+ dialCodeMatches.push(c);
2600
+ } else if (c.dialCodePlus.includes(normalisedQuery)) {
2601
+ dialCodeContains.push(c);
2602
+ } else if (c.initials.includes(normalisedQuery)) {
2603
+ initialsMatches.push(c);
2604
+ }
2569
2605
  }
2606
+ matchedCountries = [
2607
+ ...iso2Matches.sort((a, b) => a.priority - b.priority),
2608
+ ...nameStartWith.sort((a, b) => a.priority - b.priority),
2609
+ ...nameContains.sort((a, b) => a.priority - b.priority),
2610
+ ...dialCodeMatches.sort((a, b) => a.priority - b.priority),
2611
+ ...dialCodeContains.sort((a, b) => a.priority - b.priority),
2612
+ ...initialsMatches.sort((a, b) => a.priority - b.priority)
2613
+ ];
2570
2614
  }
2571
- const matchedCountries = [
2572
- ...iso2Matches.sort((a, b) => a.priority - b.priority),
2573
- ...nameStartWith.sort((a, b) => a.priority - b.priority),
2574
- ...nameContains.sort((a, b) => a.priority - b.priority),
2575
- ...dialCodeMatches.sort((a, b) => a.priority - b.priority),
2576
- ...dialCodeContains.sort((a, b) => a.priority - b.priority),
2577
- ...initialsMatches.sort((a, b) => a.priority - b.priority)
2578
- ];
2579
2615
  for (const c of matchedCountries) {
2580
2616
  const listItem = c.nodeById[this.id];
2581
2617
  if (listItem) {
@@ -2682,22 +2718,27 @@ var Iti = class _Iti {
2682
2718
  if (dialCodeMatch) {
2683
2719
  const dialCodeMatchNumeric = getNumeric(dialCodeMatch);
2684
2720
  const iso2Codes = this.dialCodeToIso2Map[dialCodeMatchNumeric];
2721
+ if (iso2Codes.length === 1) {
2722
+ if (iso2Codes[0] === selectedIso2) {
2723
+ return null;
2724
+ }
2725
+ return iso2Codes[0];
2726
+ }
2685
2727
  if (!selectedIso2 && this.defaultCountry && iso2Codes.includes(this.defaultCountry)) {
2686
2728
  return this.defaultCountry;
2687
2729
  }
2730
+ const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
2731
+ if (isRegionlessNanpNumber) {
2732
+ return null;
2733
+ }
2688
2734
  const hasAreaCodesButNoneMatched = this.selectedCountryData.areaCodes && numeric.length > dialCodeMatchNumeric.length;
2689
2735
  const alreadySelected = selectedIso2 && iso2Codes.includes(selectedIso2) && !hasAreaCodesButNoneMatched;
2690
- const isRegionlessNanpNumber = selectedDialCode === "1" && isRegionlessNanp(numeric);
2691
- if (!isRegionlessNanpNumber && !alreadySelected) {
2692
- for (const iso2 of iso2Codes) {
2693
- if (iso2) {
2694
- return iso2;
2695
- }
2696
- }
2736
+ if (!alreadySelected) {
2737
+ return iso2Codes[0];
2697
2738
  }
2698
2739
  } else if (number.charAt(0) === "+" && numeric.length) {
2699
2740
  return "";
2700
- } else if ((!number || number === "+") && !this.selectedCountryData.iso2) {
2741
+ } else if ((!number || number === "+") && !selectedIso2) {
2701
2742
  return this.defaultCountry;
2702
2743
  }
2703
2744
  return null;
@@ -3068,6 +3109,9 @@ var Iti = class _Iti {
3068
3109
  if (this._handleKeydownEvent) {
3069
3110
  this.telInput.removeEventListener("keydown", this._handleKeydownEvent);
3070
3111
  }
3112
+ if (this._handlePasteEvent) {
3113
+ this.telInput.removeEventListener("paste", this._handlePasteEvent);
3114
+ }
3071
3115
  this.telInput.removeAttribute("data-intl-tel-input-id");
3072
3116
  if (separateDialCode) {
3073
3117
  if (this.isRTL) {
@@ -3246,7 +3290,7 @@ var intlTelInput = Object.assign(
3246
3290
  attachUtils,
3247
3291
  startedLoadingUtilsScript: false,
3248
3292
  startedLoadingAutoCountry: false,
3249
- version: "25.10.5"
3293
+ version: "25.10.7"
3250
3294
  }
3251
3295
  );
3252
3296
  var intl_tel_input_default = intlTelInput;
package/vue/README.md CHANGED
@@ -34,7 +34,7 @@ See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master
34
34
  "vue:demo": "vite --config vue/demo/[demo variant]/vite.config.js"
35
35
  ```
36
36
 
37
- A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.5/build/js/utils.js"`.
37
+ A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.7/build/js/utils.js"`.
38
38
 
39
39
  ## Props
40
40
  Here's a list of all of the current props you can pass to the IntlTelInput Vue component.