intl-tel-input 26.0.5 → 26.0.6
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.
- package/CHANGELOG.md +1 -0
- package/README.md +11 -32
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +1 -1
- package/angular/build/IntlTelInputWithUtils.js +1 -1
- package/build/css/intlTelInput.css +2 -2
- package/build/css/intlTelInput.min.css +1 -1
- package/build/img/flags.png +0 -0
- package/build/img/flags.webp +0 -0
- package/build/img/flags@2x.png +0 -0
- package/build/img/flags@2x.webp +0 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.js +2 -2
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +2 -2
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/package.json +48 -48
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +1 -1
- package/react/build/IntlTelInput.js +1 -1
- package/react/build/IntlTelInputWithUtils.cjs +1 -1
- package/react/build/IntlTelInputWithUtils.js +1 -1
- package/svelte/README.md +1 -1
- package/svelte/build/IntlTelInput.mjs +613 -630
- package/svelte/build/IntlTelInputWithUtils.mjs +704 -721
- package/vue/README.md +1 -1
- package/vue/build/exports/IntlTelInput.mjs +15 -15
- package/vue/build/exports/IntlTelInputWithUtils.mjs +45 -45
- package/vue/build/{intl-tel-input-D-7G5iQL.mjs → intl-tel-input-zNYByxVM.mjs} +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,7 @@ Or to view a specific version, e.g. v20.0.0, update the URL accordingly, e.g. ht
|
|
|
4
4
|
|
|
5
5
|
## Breaking changes
|
|
6
6
|
|
|
7
|
+
- v26.0.0 https://github.com/jackocnr/intl-tel-input/releases/tag/v26.0.0
|
|
7
8
|
- v25.0.0 https://github.com/jackocnr/intl-tel-input/releases/tag/v25.0.0
|
|
8
9
|
- v24.0.0 https://github.com/jackocnr/intl-tel-input/releases/tag/v24.0.0
|
|
9
10
|
- v23.0.0 https://github.com/jackocnr/intl-tel-input/releases/tag/v23.0.0
|
package/README.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# International Telephone Input [](https://github.com/jackocnr/intl-tel-input/actions/workflows/ci.yml) <img src="https://img.shields.io/github/package-json/v/jackocnr/intl-tel-input.svg" alt="version"/> <img src="https://img.shields.io/npm/dm/intl-tel-input.svg" alt="downloads"/>
|
|
2
2
|
|
|
3
|
-
🗣️ NEWS: [v26.0.
|
|
3
|
+
🗣️ NEWS: [v26.0.0](https://github.com/jackocnr/intl-tel-input/releases/tag/v26.0.0) released, with support for:
|
|
4
4
|
- Autocomplete
|
|
5
5
|
- TypeScript types for the Vue component
|
|
6
6
|
- Country names now generated with `Intl.DisplayNames` (reduced bundle size)
|
|
7
7
|
- A more easily customisable globe icon SVG
|
|
8
8
|
- Modernised CSS
|
|
9
9
|
- More control over number extensions
|
|
10
|
+
- Lots of other fixes and improvements
|
|
10
11
|
|
|
11
12
|
International Telephone Input is a JavaScript plugin for entering and validating international telephone numbers. It takes a regular input field, adds a searchable country dropdown, auto-detects the user's country, displays a relevant placeholder number, formats the number as you type, and provides comprehensive validation methods. [React](https://github.com/jackocnr/intl-tel-input/blob/master/react/README.md), [Vue](https://github.com/jackocnr/intl-tel-input/blob/master/vue/README.md), [Angular](https://github.com/jackocnr/intl-tel-input/blob/master/angular/README.md) and [Svelte (beta)](https://github.com/jackocnr/intl-tel-input/blob/master/svelte/README.md) components are also included.
|
|
12
13
|
|
|
@@ -29,7 +30,6 @@ Use [Twilio's API to build phone verification, SMS 2FA, appointment reminders, m
|
|
|
29
30
|
- [Demo and Examples](#demo-and-examples)
|
|
30
31
|
- [Mobile](#mobile)
|
|
31
32
|
- [Features](#features)
|
|
32
|
-
- [Browser Compatibility](#browser-compatibility)
|
|
33
33
|
- [Getting Started](#getting-started-using-a-cdn)
|
|
34
34
|
- [Recommended Usage](#recommended-usage)
|
|
35
35
|
- [Initialisation Options](#initialisation-options)
|
|
@@ -37,7 +37,6 @@ Use [Twilio's API to build phone verification, SMS 2FA, appointment reminders, m
|
|
|
37
37
|
- [Static Methods](#static-methods)
|
|
38
38
|
- [Events](#events)
|
|
39
39
|
- [Theming / Dark Mode](#theming--dark-mode)
|
|
40
|
-
- [Translations](#translations)
|
|
41
40
|
- [Utilities Script](#utilities-script)
|
|
42
41
|
- [Loading The Utilities Script](#loading-the-utilities-script)
|
|
43
42
|
- [Troubleshooting](#troubleshooting)
|
|
@@ -73,26 +72,19 @@ By default, on mobile devices, we show a fullscreen popup instead of the inline
|
|
|
73
72
|
* Translations provided in over 40 languages, as well as support for RTL layout and alternative numeral sets
|
|
74
73
|
* Lots of initialisation options for customisation, as well as instance methods/events for interaction
|
|
75
74
|
|
|
76
|
-
## Browser Compatibility
|
|
77
|
-
| Chrome | Firefox | Safari | Edge |
|
|
78
|
-
| :----: | :-------: | :----: | :--: |
|
|
79
|
-
| ✓ | ✓ | v14+ | ✓ |
|
|
80
|
-
|
|
81
|
-
_Note: We have now dropped support for all versions of Internet Explorer because it is [no longer supported](https://blogs.windows.com/windowsexperience/2022/06/15/internet-explorer-11-has-retired-and-is-officially-out-of-support-what-you-need-to-know/) by any version of Windows._
|
|
82
|
-
|
|
83
75
|
## Getting Started (Using a CDN)
|
|
84
76
|
1. Add the CSS
|
|
85
77
|
```html
|
|
86
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.
|
|
78
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.6/build/css/intlTelInput.css">
|
|
87
79
|
```
|
|
88
80
|
|
|
89
81
|
2. Add the plugin script and initialise it on your input element
|
|
90
82
|
```html
|
|
91
|
-
<script src="https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.
|
|
83
|
+
<script src="https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.6/build/js/intlTelInput.min.js"></script>
|
|
92
84
|
<script>
|
|
93
85
|
const input = document.querySelector("#phone");
|
|
94
86
|
window.intlTelInput(input, {
|
|
95
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.
|
|
87
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.6/build/js/utils.js"),
|
|
96
88
|
});
|
|
97
89
|
</script>
|
|
98
90
|
```
|
|
@@ -267,9 +259,7 @@ This will generate the following (hidden) elements, which will be automatically
|
|
|
267
259
|
|
|
268
260
|
**i18n**
|
|
269
261
|
Type: `Object` Default: `{}`
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
The easiest way to handle translations is to import one of the [provided translation modules](https://github.com/jackocnr/intl-tel-input/tree/master/src/js/intl-tel-input/i18n) and set the `i18n` initialisation option to that value (see option 1 below). You can also override one or more individual keys this way. Alternatively, you can provide your own custom translations (see option 2 below). If providing your own, please see the required UI strings listed below. [See example](https://intl-tel-input.com/examples/localise-countries.html). If we don't currently support a language you need, it's easy to [contribute this](https://github.com/jackocnr/intl-tel-input/blob/master/.github/CONTRIBUTING.md#adding-a-new-translation) yourself - you only need to provide a handful of UI translation strings. _Note: previously named `localizedCountries`._
|
|
262
|
+
There are two aspects to the internationalisation of this plugin. The first is the country names, which are translated automatically using the native `Intl.DisplayNames` - just specify the locale you want using the `countryNameLocale` option. The second is the user interface strings (including the country search placeholder, search empty state, and various other strings for screen readers). We provide translations for these in <a href="https://github.com/jackocnr/intl-tel-input/tree/master/src/js/intl-tel-input/i18n">over 40 languages</a> - simply import the language module you need and pass it to the plugin using the `i18n` option (see option 1 below). You can also override one or more individual keys this way. Alternatively, you can provide your own custom translations (see option 2 below). If providing your own, please see the required UI strings listed below. [See example](https://intl-tel-input.com/examples/localise-countries.html). If we don't currently support a language you need, it's easy to [contribute this](https://github.com/jackocnr/intl-tel-input/blob/master/.github/CONTRIBUTING.md#adding-a-new-translation) yourself - you only need to provide a handful of UI translation strings. _Note: previously named `localizedCountries`._
|
|
273
263
|
|
|
274
264
|
Option 1: import one of the provided translation modules
|
|
275
265
|
```js
|
|
@@ -324,12 +314,12 @@ Set the initial country selection by specifying its country code, e.g. `"us"` fo
|
|
|
324
314
|
Type: `() => Promise<module>` Default: `null`
|
|
325
315
|
This is one way to lazy load the included utils.js (to enable formatting/validation, etc) - see [Loading The Utilities Script](#loading-the-utilities-script) for more options.
|
|
326
316
|
|
|
327
|
-
The `loadUtils` option takes a function that returns a Promise resolving to the utils module. You can `import` the utils module in different ways (examples below): (A) from a CDN, (B) from your own hosted version of [utils.js](https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.
|
|
317
|
+
The `loadUtils` option takes a function that returns a Promise resolving to the utils module. You can `import` the utils module in different ways (examples below): (A) from a CDN, (B) from your own hosted version of [utils.js](https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.6/build/js/utils.js), or (C) if you use a bundler like Webpack, Vite or Parcel, you can import it directly from the package. _Note: this replaces the `utilsScript` option (now removed)._
|
|
328
318
|
|
|
329
319
|
```js
|
|
330
320
|
// (A) import utils module from a CDN
|
|
331
321
|
intlTelInput(htmlInputElement, {
|
|
332
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.
|
|
322
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@26.0.6/build/js/utils.js"),
|
|
333
323
|
});
|
|
334
324
|
|
|
335
325
|
// (B) import utils module from your own hosted version of utils.js
|
|
@@ -573,15 +563,8 @@ NOTE: this assumes you already have your own dark mode styling in place for gene
|
|
|
573
563
|
Example:
|
|
574
564
|
<img src="https://raw.github.com/jackocnr/intl-tel-input/master/screenshots/vanilla-dark.png" alt="Screenshot" width="263" height="269" />
|
|
575
565
|
|
|
576
|
-
## Translations
|
|
577
|
-
We provide [translations](https://github.com/jackocnr/intl-tel-input/tree/master/src/js/intl-tel-input/i18n) for the 200+ country names, as well as other user interface text (e.g. the placeholder text for the country search input) in over 40 languages. See the `i18n` option for details on how to use them. [See them in action](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--i18n).
|
|
578
|
-
|
|
579
|
-
Supported languages: Arabic, Albanian, Bengali, Bosnian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Lithuanian, Marathi, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Swedish, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese.
|
|
580
|
-
|
|
581
|
-
If we don't currently support a language you need, it's easy to [contribute this](https://github.com/jackocnr/intl-tel-input/blob/master/.github/CONTRIBUTING.md#adding-a-new-translation) yourself - you only need to provide a handful of UI translation strings.
|
|
582
|
-
|
|
583
566
|
## Utilities Script
|
|
584
|
-
The utilities script ([
|
|
567
|
+
The utilities script ([src/js/utils.js](src/js/utils.js)) is a custom build of Google's [libphonenumber](https://github.com/googlei18n/libphonenumber) which enables the following features:
|
|
585
568
|
|
|
586
569
|
* Formatting upon initialisation, as well as with `getNumber` and `setNumber`
|
|
587
570
|
* Validation with `isValidNumber`, `getNumberType` and `getValidationError` methods
|
|
@@ -590,10 +573,7 @@ The utilities script ([build/js/utils.js](build/js/utils.js)) is a custom build
|
|
|
590
573
|
|
|
591
574
|
International number formatting/validation is hard (it varies by country/district, and we currently support ~230 countries). The only comprehensive solution we have found is libphonenumber, from which we have precompiled the relevant parts into a single JavaScript file, included in the build directory. Unfortunately, even after modification, it is still ~260KB. See the section below on the best way to load it.
|
|
592
575
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
## Loading The Utilities Script
|
|
596
|
-
See [v25 discussion](https://github.com/jackocnr/intl-tel-input/discussions/1842).
|
|
576
|
+
## Loading The Utilities Script
|
|
597
577
|
|
|
598
578
|
The utils script provides lots of great functionality (see the above section), but comes at the cost of increased filesize (~260KB). There are two main ways to load the utils script, depending on whether you're concerned about filesize or not.
|
|
599
579
|
|
|
@@ -645,13 +625,12 @@ _Note: there is currently [a bug](https://bugs.webkit.org/show_bug.cgi?id=141822
|
|
|
645
625
|
```
|
|
646
626
|
|
|
647
627
|
## Contributing
|
|
648
|
-
See the [contributing guide](https://github.com/jackocnr/intl-tel-input/blob/master/.github/CONTRIBUTING.md) for instructions on setting up the project and making changes, and also on how to update
|
|
628
|
+
See the [contributing guide](https://github.com/jackocnr/intl-tel-input/blob/master/.github/CONTRIBUTING.md) for instructions on setting up the project and making changes, and also on how to update the flag images, or how to add a new translation.
|
|
649
629
|
|
|
650
630
|
## Attributions
|
|
651
631
|
* Flag images from [flag-icons](https://github.com/lipis/flag-icons)
|
|
652
632
|
* Original country data from mledoze's [World countries in JSON, CSV and XML](https://github.com/mledoze/countries)
|
|
653
633
|
* Formatting/validation/example number code from [libphonenumber](https://github.com/googlei18n/libphonenumber)
|
|
654
|
-
* Feature contributions are listed in the wiki: [Contributions](https://github.com/jackocnr/intl-tel-input/wiki/Contributions)
|
|
655
634
|
|
|
656
635
|
User testing powered by [BrowserStack Open-Source Program](https://www.browserstack.com/open-source)
|
|
657
636
|
|
package/angular/README.md
CHANGED
|
@@ -54,7 +54,7 @@ import "intl-tel-input/styles";
|
|
|
54
54
|
|
|
55
55
|
See the [validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/angular/demo/validation/validation.component.ts) for a more fleshed-out example of how to handle validation, or check out the [form demo](https://github.com/jackocnr/intl-tel-input/blob/master/angular/demo/form/form.component.ts) for an alternative approach using `ReactiveFormsModule`.
|
|
56
56
|
|
|
57
|
-
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 { IntlTelInputComponent } from "intl-tel-input/angularWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/angular"` 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@26.0.
|
|
57
|
+
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 { IntlTelInputComponent } from "intl-tel-input/angularWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/angular"` 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@26.0.6/build/js/utils.js"`.
|
|
58
58
|
|
|
59
59
|
## Props
|
|
60
60
|
|
|
@@ -3639,7 +3639,7 @@ var intlTelInput = Object.assign((input, options) => {
|
|
|
3639
3639
|
attachUtils,
|
|
3640
3640
|
startedLoadingUtilsScript: false,
|
|
3641
3641
|
startedLoadingAutoCountry: false,
|
|
3642
|
-
version: "26.0.
|
|
3642
|
+
version: "26.0.6"
|
|
3643
3643
|
});
|
|
3644
3644
|
var intl_tel_input_default = intlTelInput;
|
|
3645
3645
|
|
|
@@ -3639,7 +3639,7 @@ var intlTelInput = Object.assign((input, options) => {
|
|
|
3639
3639
|
attachUtils,
|
|
3640
3640
|
startedLoadingUtilsScript: false,
|
|
3641
3641
|
startedLoadingAutoCountry: false,
|
|
3642
|
-
version: "26.0.
|
|
3642
|
+
version: "26.0.6"
|
|
3643
3643
|
});
|
|
3644
3644
|
var intl_tel_input_default = intlTelInput;
|
|
3645
3645
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--iti-hover-color:rgba(0, 0, 0, 0.05);--iti-border-color:#ccc;--iti-dialcode-color:#999;--iti-dropdown-bg:white;--iti-icon-color:#555;--iti-spacer-horizontal:8px;--iti-flag-height:12px;--iti-flag-width:16px;--iti-globe-height:16px;--iti-border-width:1px;--iti-arrow-height:4px;--iti-arrow-width:6px;--iti-triangle-border:calc(var(--iti-arrow-width) / 2);--iti-arrow-padding:6px;--iti-flag-sprite-width:3904px;--iti-flag-sprite-height:12px;--iti-mobile-popup-margin:30px}.iti{position:relative;display:inline-block}.iti *{box-sizing:border-box}.iti__a11y-text{width:1px;height:1px;clip:rect(1px,1px,1px,1px);overflow:hidden;position:absolute}.iti input.iti__tel-input,.iti input.iti__tel-input[type=tel],.iti input.iti__tel-input[type=text]{position:relative;z-index:0;margin:0!important}.iti__country-container{position:absolute;top:0;bottom:0;left:0;padding:var(--iti-border-width)}.iti__selected-country{z-index:1;position:relative;display:flex;align-items:center;height:100%;background:0 0;border:0;margin:0;padding:0;font-family:inherit;font-size:inherit;color:inherit;border-radius:0;font-weight:inherit;line-height:inherit;text-decoration:none}.iti__selected-country-primary{display:flex;align-items:center;height:100%;padding:0 var(--iti-arrow-padding) 0 var(--iti-spacer-horizontal)}.iti__arrow{margin-left:var(--iti-arrow-padding);width:0;height:0;border-left:var(--iti-triangle-border) solid transparent;border-right:var(--iti-triangle-border) solid transparent;border-top:var(--iti-arrow-height) solid var(--iti-icon-color)}.iti__arrow--up{border-top:none;border-bottom:var(--iti-arrow-height) solid var(--iti-icon-color)}.iti__dropdown-content{border-radius:3px;background-color:var(--iti-dropdown-bg)}.iti--inline-dropdown .iti__dropdown-content{position:absolute;z-index:2;margin-top:3px;margin-left:calc(var(--iti-border-width) * -1);border:var(--iti-border-width) solid var(--iti-border-color);box-shadow:1px 1px 4px rgba(0,0,0,.2)}.iti__search-input{width:100%;border-width:0;border-radius:3px;padding-left:30px;padding-right:28px}[dir=rtl] .iti__search-input{padding-left:inherit;padding-right:30px;background-position:right 8px center}.iti__search-input+.iti__country-list{border-top:1px solid var(--iti-border-color)}.iti__search-input::-webkit-search-cancel-button{appearance:none}.iti__search-input-wrapper{position:relative;display:flex;align-items:center}.iti__search-icon{position:absolute;left:8px;display:flex;pointer-events:none}[dir=rtl] .iti__search-icon{left:auto;right:8px}.iti__search-icon-svg{stroke:var(--iti-icon-color);fill:none;stroke-width:3}.iti__search-clear{position:absolute;right:4px;background:0 0;border:0;border-radius:3px;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;transition:background-color .15s ease;width:24px;height:24px}.iti__search-clear .iti__search-clear-x{stroke-width:2}.iti__search-clear .iti__search-clear-bg{fill:var(--iti-icon-color)}[dir=rtl] .iti__search-clear{right:auto;left:4px}.iti__search-clear:focus-visible,.iti__search-clear:hover{background:var(--iti-hover-color);outline:0}.iti__no-results{text-align:center;padding:30px 0}.iti__country-list{list-style:none;padding:0;margin:0;cursor:pointer;overflow-y:scroll;-webkit-overflow-scrolling:touch}.iti--inline-dropdown .iti__country-list{max-height:185px}.iti--flexible-dropdown-width .iti__country-list{white-space:nowrap}@media (max-width:500px){.iti--flexible-dropdown-width .iti__country-list{white-space:normal}}.iti__country{display:flex;align-items:center;padding:8px var(--iti-spacer-horizontal);outline:0}.iti__dial-code{color:var(--iti-dialcode-color)}.iti__country.iti__highlight{background-color:var(--iti-hover-color)}.iti__country-list .iti__flag,.iti__country-name{margin-right:var(--iti-spacer-horizontal)}[dir=rtl] .iti__country-list .iti__flag,[dir=rtl] .iti__country-name{margin-right:0;margin-left:var(--iti-spacer-horizontal)}.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) button.iti__selected-country{cursor:pointer}.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country-primary:hover,.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country:has(+ .iti__dropdown-content:hover) .iti__selected-country-primary{background-color:var(--iti-hover-color)}.iti .iti__selected-dial-code{margin-left:4px}.iti--container{position:fixed;top:-1000px;left:-1000px;z-index:1060;padding:var(--iti-border-width)}.iti--container:hover{cursor:pointer}.iti__hide{display:none}.iti__v-hide{visibility:hidden}.iti--fullscreen-popup.iti--container{background-color:rgba(0,0,0,.5);top:0;bottom:0;left:0;right:0;position:fixed;padding:var(--iti-mobile-popup-margin);display:flex;flex-direction:column;justify-content:flex-start}.iti--fullscreen-popup .iti__dropdown-content{display:flex;flex-direction:column;max-height:100%;position:relative}.iti--fullscreen-popup .iti__country{padding:10px 10px;line-height:1.5em}.iti__flag{--iti-flag-offset:100px;height:var(--iti-flag-height);width:var(--iti-flag-width);border-radius:1px;box-shadow:0 0 1px 0 #888;background-image:image-set(var(--iti-path-flags-1x) 1x,var(--iti-path-flags-2x) 2x);background-repeat:no-repeat;background-position:var(--iti-flag-offset) 0;background-size:var(--iti-flag-sprite-width) var(--iti-flag-sprite-height)}.iti__ac{--iti-flag-offset:0px}.iti__ad{--iti-flag-offset:-16px}.iti__ae{--iti-flag-offset:-32px}.iti__af{--iti-flag-offset:-48px}.iti__ag{--iti-flag-offset:-64px}.iti__ai{--iti-flag-offset:-80px}.iti__al{--iti-flag-offset:-96px}.iti__am{--iti-flag-offset:-112px}.iti__ao{--iti-flag-offset:-128px}.iti__ar{--iti-flag-offset:-144px}.iti__as{--iti-flag-offset:-160px}.iti__at{--iti-flag-offset:-176px}.iti__au{--iti-flag-offset:-192px}.iti__aw{--iti-flag-offset:-208px}.iti__ax{--iti-flag-offset:-224px}.iti__az{--iti-flag-offset:-240px}.iti__ba{--iti-flag-offset:-256px}.iti__bb{--iti-flag-offset:-272px}.iti__bd{--iti-flag-offset:-288px}.iti__be{--iti-flag-offset:-304px}.iti__bf{--iti-flag-offset:-320px}.iti__bg{--iti-flag-offset:-336px}.iti__bh{--iti-flag-offset:-352px}.iti__bi{--iti-flag-offset:-368px}.iti__bj{--iti-flag-offset:-384px}.iti__bl{--iti-flag-offset:-400px}.iti__bm{--iti-flag-offset:-416px}.iti__bn{--iti-flag-offset:-432px}.iti__bo{--iti-flag-offset:-448px}.iti__bq{--iti-flag-offset:-464px}.iti__br{--iti-flag-offset:-480px}.iti__bs{--iti-flag-offset:-496px}.iti__bt{--iti-flag-offset:-512px}.iti__bw{--iti-flag-offset:-528px}.iti__by{--iti-flag-offset:-544px}.iti__bz{--iti-flag-offset:-560px}.iti__ca{--iti-flag-offset:-576px}.iti__cc{--iti-flag-offset:-592px}.iti__cd{--iti-flag-offset:-608px}.iti__cf{--iti-flag-offset:-624px}.iti__cg{--iti-flag-offset:-640px}.iti__ch{--iti-flag-offset:-656px}.iti__ci{--iti-flag-offset:-672px}.iti__ck{--iti-flag-offset:-688px}.iti__cl{--iti-flag-offset:-704px}.iti__cm{--iti-flag-offset:-720px}.iti__cn{--iti-flag-offset:-736px}.iti__co{--iti-flag-offset:-752px}.iti__cr{--iti-flag-offset:-768px}.iti__cu{--iti-flag-offset:-784px}.iti__cv{--iti-flag-offset:-800px}.iti__cw{--iti-flag-offset:-816px}.iti__cx{--iti-flag-offset:-832px}.iti__cy{--iti-flag-offset:-848px}.iti__cz{--iti-flag-offset:-864px}.iti__de{--iti-flag-offset:-880px}.iti__dj{--iti-flag-offset:-896px}.iti__dk{--iti-flag-offset:-912px}.iti__dm{--iti-flag-offset:-928px}.iti__do{--iti-flag-offset:-944px}.iti__dz{--iti-flag-offset:-960px}.iti__ec{--iti-flag-offset:-976px}.iti__ee{--iti-flag-offset:-992px}.iti__eg{--iti-flag-offset:-1008px}.iti__eh{--iti-flag-offset:-1024px}.iti__er{--iti-flag-offset:-1040px}.iti__es{--iti-flag-offset:-1056px}.iti__et{--iti-flag-offset:-1072px}.iti__fi{--iti-flag-offset:-1088px}.iti__fj{--iti-flag-offset:-1104px}.iti__fk{--iti-flag-offset:-1120px}.iti__fm{--iti-flag-offset:-1136px}.iti__fo{--iti-flag-offset:-1152px}.iti__fr{--iti-flag-offset:-1168px}.iti__ga{--iti-flag-offset:-1184px}.iti__gb{--iti-flag-offset:-1200px}.iti__gd{--iti-flag-offset:-1216px}.iti__ge{--iti-flag-offset:-1232px}.iti__gf{--iti-flag-offset:-1248px}.iti__gg{--iti-flag-offset:-1264px}.iti__gh{--iti-flag-offset:-1280px}.iti__gi{--iti-flag-offset:-1296px}.iti__gl{--iti-flag-offset:-1312px}.iti__gm{--iti-flag-offset:-1328px}.iti__gn{--iti-flag-offset:-1344px}.iti__gp{--iti-flag-offset:-1360px}.iti__gq{--iti-flag-offset:-1376px}.iti__gr{--iti-flag-offset:-1392px}.iti__gt{--iti-flag-offset:-1408px}.iti__gu{--iti-flag-offset:-1424px}.iti__gw{--iti-flag-offset:-1440px}.iti__gy{--iti-flag-offset:-1456px}.iti__hk{--iti-flag-offset:-1472px}.iti__hn{--iti-flag-offset:-1488px}.iti__hr{--iti-flag-offset:-1504px}.iti__ht{--iti-flag-offset:-1520px}.iti__hu{--iti-flag-offset:-1536px}.iti__id{--iti-flag-offset:-1552px}.iti__ie{--iti-flag-offset:-1568px}.iti__il{--iti-flag-offset:-1584px}.iti__im{--iti-flag-offset:-1600px}.iti__in{--iti-flag-offset:-1616px}.iti__io{--iti-flag-offset:-1632px}.iti__iq{--iti-flag-offset:-1648px}.iti__ir{--iti-flag-offset:-1664px}.iti__is{--iti-flag-offset:-1680px}.iti__it{--iti-flag-offset:-1696px}.iti__je{--iti-flag-offset:-1712px}.iti__jm{--iti-flag-offset:-1728px}.iti__jo{--iti-flag-offset:-1744px}.iti__jp{--iti-flag-offset:-1760px}.iti__ke{--iti-flag-offset:-1776px}.iti__kg{--iti-flag-offset:-1792px}.iti__kh{--iti-flag-offset:-1808px}.iti__ki{--iti-flag-offset:-1824px}.iti__km{--iti-flag-offset:-1840px}.iti__kn{--iti-flag-offset:-1856px}.iti__kp{--iti-flag-offset:-1872px}.iti__kr{--iti-flag-offset:-1888px}.iti__kw{--iti-flag-offset:-1904px}.iti__ky{--iti-flag-offset:-1920px}.iti__kz{--iti-flag-offset:-1936px}.iti__la{--iti-flag-offset:-1952px}.iti__lb{--iti-flag-offset:-1968px}.iti__lc{--iti-flag-offset:-1984px}.iti__li{--iti-flag-offset:-2000px}.iti__lk{--iti-flag-offset:-2016px}.iti__lr{--iti-flag-offset:-2032px}.iti__ls{--iti-flag-offset:-2048px}.iti__lt{--iti-flag-offset:-2064px}.iti__lu{--iti-flag-offset:-2080px}.iti__lv{--iti-flag-offset:-2096px}.iti__ly{--iti-flag-offset:-2112px}.iti__ma{--iti-flag-offset:-2128px}.iti__mc{--iti-flag-offset:-2144px}.iti__md{--iti-flag-offset:-2160px}.iti__me{--iti-flag-offset:-2176px}.iti__mf{--iti-flag-offset:-2192px}.iti__mg{--iti-flag-offset:-2208px}.iti__mh{--iti-flag-offset:-2224px}.iti__mk{--iti-flag-offset:-2240px}.iti__ml{--iti-flag-offset:-2256px}.iti__mm{--iti-flag-offset:-2272px}.iti__mn{--iti-flag-offset:-2288px}.iti__mo{--iti-flag-offset:-2304px}.iti__mp{--iti-flag-offset:-2320px}.iti__mq{--iti-flag-offset:-2336px}.iti__mr{--iti-flag-offset:-2352px}.iti__ms{--iti-flag-offset:-2368px}.iti__mt{--iti-flag-offset:-2384px}.iti__mu{--iti-flag-offset:-2400px}.iti__mv{--iti-flag-offset:-2416px}.iti__mw{--iti-flag-offset:-2432px}.iti__mx{--iti-flag-offset:-2448px}.iti__my{--iti-flag-offset:-2464px}.iti__mz{--iti-flag-offset:-2480px}.iti__na{--iti-flag-offset:-2496px}.iti__nc{--iti-flag-offset:-2512px}.iti__ne{--iti-flag-offset:-2528px}.iti__nf{--iti-flag-offset:-2544px}.iti__ng{--iti-flag-offset:-2560px}.iti__ni{--iti-flag-offset:-2576px}.iti__nl{--iti-flag-offset:-2592px}.iti__no{--iti-flag-offset:-2608px}.iti__np{--iti-flag-offset:-2624px}.iti__nr{--iti-flag-offset:-2640px}.iti__nu{--iti-flag-offset:-2656px}.iti__nz{--iti-flag-offset:-2672px}.iti__om{--iti-flag-offset:-2688px}.iti__pa{--iti-flag-offset:-2704px}.iti__pe{--iti-flag-offset:-2720px}.iti__pf{--iti-flag-offset:-2736px}.iti__pg{--iti-flag-offset:-2752px}.iti__ph{--iti-flag-offset:-2768px}.iti__pk{--iti-flag-offset:-2784px}.iti__pl{--iti-flag-offset:-2800px}.iti__pm{--iti-flag-offset:-2816px}.iti__pr{--iti-flag-offset:-2832px}.iti__ps{--iti-flag-offset:-2848px}.iti__pt{--iti-flag-offset:-2864px}.iti__pw{--iti-flag-offset:-2880px}.iti__py{--iti-flag-offset:-2896px}.iti__qa{--iti-flag-offset:-2912px}.iti__re{--iti-flag-offset:-2928px}.iti__ro{--iti-flag-offset:-2944px}.iti__rs{--iti-flag-offset:-2960px}.iti__ru{--iti-flag-offset:-2976px}.iti__rw{--iti-flag-offset:-2992px}.iti__sa{--iti-flag-offset:-3008px}.iti__sb{--iti-flag-offset:-3024px}.iti__sc{--iti-flag-offset:-3040px}.iti__sd{--iti-flag-offset:-3056px}.iti__se{--iti-flag-offset:-3072px}.iti__sg{--iti-flag-offset:-3088px}.iti__sh{--iti-flag-offset:-3104px}.iti__si{--iti-flag-offset:-3120px}.iti__sj{--iti-flag-offset:-3136px}.iti__sk{--iti-flag-offset:-3152px}.iti__sl{--iti-flag-offset:-3168px}.iti__sm{--iti-flag-offset:-3184px}.iti__sn{--iti-flag-offset:-3200px}.iti__so{--iti-flag-offset:-3216px}.iti__sr{--iti-flag-offset:-3232px}.iti__ss{--iti-flag-offset:-3248px}.iti__st{--iti-flag-offset:-3264px}.iti__sv{--iti-flag-offset:-3280px}.iti__sx{--iti-flag-offset:-3296px}.iti__sy{--iti-flag-offset:-3312px}.iti__sz{--iti-flag-offset:-3328px}.iti__tc{--iti-flag-offset:-3344px}.iti__td{--iti-flag-offset:-3360px}.iti__tg{--iti-flag-offset:-3376px}.iti__th{--iti-flag-offset:-3392px}.iti__tj{--iti-flag-offset:-3408px}.iti__tk{--iti-flag-offset:-3424px}.iti__tl{--iti-flag-offset:-3440px}.iti__tm{--iti-flag-offset:-3456px}.iti__tn{--iti-flag-offset:-3472px}.iti__to{--iti-flag-offset:-3488px}.iti__tr{--iti-flag-offset:-3504px}.iti__tt{--iti-flag-offset:-3520px}.iti__tv{--iti-flag-offset:-3536px}.iti__tw{--iti-flag-offset:-3552px}.iti__tz{--iti-flag-offset:-3568px}.iti__ua{--iti-flag-offset:-3584px}.iti__ug{--iti-flag-offset:-3600px}.iti__us{--iti-flag-offset:-3616px}.iti__uy{--iti-flag-offset:-3632px}.iti__uz{--iti-flag-offset:-3648px}.iti__va{--iti-flag-offset:-3664px}.iti__vc{--iti-flag-offset:-3680px}.iti__ve{--iti-flag-offset:-3696px}.iti__vg{--iti-flag-offset:-3712px}.iti__vi{--iti-flag-offset:-3728px}.iti__vn{--iti-flag-offset:-3744px}.iti__vu{--iti-flag-offset:-3760px}.iti__wf{--iti-flag-offset:-3776px}.iti__ws{--iti-flag-offset:-3792px}.iti__xk{--iti-flag-offset:-3808px}.iti__ye{--iti-flag-offset:-3824px}.iti__yt{--iti-flag-offset:-3840px}.iti__za{--iti-flag-offset:-3856px}.iti__zm{--iti-flag-offset:-3872px}.iti__zw{--iti-flag-offset:-3888px}.iti__globe{background:0 0;box-shadow:none;height:var(--iti-globe-height);display:flex;align-items:center;justify-content:center;padding:0}.iti__globe .iti__globe-svg{width:100%;height:100%;fill:var(--iti-icon-color)}:root{--iti-path-flags-1x:url("../img/flags.webp");--iti-path-flags-2x:url("../img/flags@2x.webp")}
|
|
1
|
+
:root{--iti-hover-color:rgba(0, 0, 0, 0.05);--iti-border-color:#ccc;--iti-dialcode-color:#999;--iti-dropdown-bg:white;--iti-icon-color:#555;--iti-spacer-horizontal:8px;--iti-flag-height:12px;--iti-flag-width:16px;--iti-globe-height:16px;--iti-border-width:1px;--iti-arrow-height:4px;--iti-arrow-width:6px;--iti-triangle-border:calc(var(--iti-arrow-width) / 2);--iti-arrow-padding:6px;--iti-flag-sprite-width:3904px;--iti-flag-sprite-height:12px;--iti-mobile-popup-margin:30px}.iti{position:relative;display:inline-block}.iti *{box-sizing:border-box}.iti__a11y-text{width:1px;height:1px;clip:rect(1px,1px,1px,1px);overflow:hidden;position:absolute}.iti input.iti__tel-input,.iti input.iti__tel-input[type=tel],.iti input.iti__tel-input[type=text]{position:relative;z-index:0;margin:0!important}.iti__country-container{position:absolute;top:0;bottom:0;left:0;padding:var(--iti-border-width)}.iti__selected-country{z-index:1;position:relative;display:flex;align-items:center;height:100%;background:0 0;border:0;margin:0;padding:0;font-family:inherit;font-size:inherit;color:inherit;border-radius:0;font-weight:inherit;line-height:inherit;text-decoration:none}.iti__selected-country-primary{display:flex;align-items:center;height:100%;padding:0 var(--iti-arrow-padding) 0 var(--iti-spacer-horizontal)}.iti__arrow{margin-left:var(--iti-arrow-padding);width:0;height:0;border-left:var(--iti-triangle-border) solid transparent;border-right:var(--iti-triangle-border) solid transparent;border-top:var(--iti-arrow-height) solid var(--iti-icon-color)}.iti__arrow--up{border-top:none;border-bottom:var(--iti-arrow-height) solid var(--iti-icon-color)}.iti__dropdown-content{border-radius:3px;background-color:var(--iti-dropdown-bg)}.iti--inline-dropdown .iti__dropdown-content{position:absolute;z-index:2;margin-top:3px;margin-left:calc(var(--iti-border-width) * -1);border:var(--iti-border-width) solid var(--iti-border-color);box-shadow:1px 1px 4px rgba(0,0,0,.2)}.iti__search-input{width:100%;border-width:0;border-radius:3px;padding-left:30px;padding-right:28px}[dir=rtl] .iti__search-input{padding-left:inherit;padding-right:30px;background-position:right 8px center}.iti__search-input+.iti__country-list{border-top:1px solid var(--iti-border-color)}.iti__search-input::-webkit-search-cancel-button{appearance:none}.iti__search-input-wrapper{position:relative;display:flex;align-items:center}.iti__search-icon{position:absolute;left:8px;display:flex;pointer-events:none}[dir=rtl] .iti__search-icon{left:auto;right:8px}.iti__search-icon-svg{stroke:var(--iti-icon-color);fill:none;stroke-width:3}.iti__search-clear{position:absolute;right:4px;background:0 0;border:0;border-radius:3px;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;transition:background-color .15s ease;width:24px;height:24px}.iti__search-clear .iti__search-clear-x{stroke-width:2}.iti__search-clear .iti__search-clear-bg{fill:var(--iti-icon-color)}[dir=rtl] .iti__search-clear{right:auto;left:4px}.iti__search-clear:focus-visible,.iti__search-clear:hover{background:var(--iti-hover-color);outline:0}.iti__no-results{text-align:center;padding:30px 0}.iti__country-list{list-style:none;padding:0;margin:0;cursor:pointer;overflow-y:scroll;-webkit-overflow-scrolling:touch}.iti--inline-dropdown .iti__country-list{max-height:185px}.iti--flexible-dropdown-width .iti__country-list{white-space:nowrap}@media (max-width:500px){.iti--flexible-dropdown-width .iti__country-list{white-space:normal}}.iti__country{display:flex;align-items:center;padding:8px var(--iti-spacer-horizontal);outline:0}.iti__dial-code{color:var(--iti-dialcode-color)}.iti__country.iti__highlight{background-color:var(--iti-hover-color)}.iti__country-list .iti__flag,.iti__country-name{margin-right:var(--iti-spacer-horizontal)}[dir=rtl] .iti__country-list .iti__flag,[dir=rtl] .iti__country-name{margin-right:0;margin-left:var(--iti-spacer-horizontal)}.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) button.iti__selected-country{cursor:pointer}.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country-primary:hover,.iti--allow-dropdown .iti__country-container:not(:has(+ input[disabled])):not(:has(+ input[readonly])) .iti__selected-country:has(+ .iti__dropdown-content:hover) .iti__selected-country-primary{background-color:var(--iti-hover-color)}.iti .iti__selected-dial-code{margin-left:4px}.iti--container{position:fixed;top:-1000px;left:-1000px;z-index:1060;padding:var(--iti-border-width)}.iti--container:hover{cursor:pointer}.iti__hide{display:none}.iti__v-hide{visibility:hidden}.iti--fullscreen-popup.iti--container{background-color:rgba(0,0,0,.5);top:0;bottom:0;left:0;right:0;position:fixed;padding:var(--iti-mobile-popup-margin);display:flex;flex-direction:column;justify-content:flex-start}.iti--fullscreen-popup .iti__dropdown-content{display:flex;flex-direction:column;max-height:100%;position:relative}.iti--fullscreen-popup .iti__country{padding:10px 10px;line-height:1.5em}.iti__flag{--iti-flag-offset:100px;height:var(--iti-flag-height);width:var(--iti-flag-width);border-radius:1px;box-shadow:0 0 1px 0 #888;background-image:image-set(var(--iti-path-flags-1x) 1x,var(--iti-path-flags-2x) 2x);background-repeat:no-repeat;background-position:var(--iti-flag-offset) 0;background-size:var(--iti-flag-sprite-width) var(--iti-flag-sprite-height)}.iti__ac{--iti-flag-offset:0px}.iti__ad{--iti-flag-offset:-16px}.iti__ae{--iti-flag-offset:-32px}.iti__af{--iti-flag-offset:-48px}.iti__ag{--iti-flag-offset:-64px}.iti__ai{--iti-flag-offset:-80px}.iti__al{--iti-flag-offset:-96px}.iti__am{--iti-flag-offset:-112px}.iti__ao{--iti-flag-offset:-128px}.iti__ar{--iti-flag-offset:-144px}.iti__as{--iti-flag-offset:-160px}.iti__at{--iti-flag-offset:-176px}.iti__au{--iti-flag-offset:-192px}.iti__aw{--iti-flag-offset:-208px}.iti__ax{--iti-flag-offset:-224px}.iti__az{--iti-flag-offset:-240px}.iti__ba{--iti-flag-offset:-256px}.iti__bb{--iti-flag-offset:-272px}.iti__bd{--iti-flag-offset:-288px}.iti__be{--iti-flag-offset:-304px}.iti__bf{--iti-flag-offset:-320px}.iti__bg{--iti-flag-offset:-336px}.iti__bh{--iti-flag-offset:-352px}.iti__bi{--iti-flag-offset:-368px}.iti__bj{--iti-flag-offset:-384px}.iti__bl{--iti-flag-offset:-400px}.iti__bm{--iti-flag-offset:-416px}.iti__bn{--iti-flag-offset:-432px}.iti__bo{--iti-flag-offset:-448px}.iti__bq{--iti-flag-offset:-464px}.iti__br{--iti-flag-offset:-480px}.iti__bs{--iti-flag-offset:-496px}.iti__bt{--iti-flag-offset:-512px}.iti__bw{--iti-flag-offset:-528px}.iti__by{--iti-flag-offset:-544px}.iti__bz{--iti-flag-offset:-560px}.iti__ca{--iti-flag-offset:-576px}.iti__cc{--iti-flag-offset:-592px}.iti__cd{--iti-flag-offset:-608px}.iti__cf{--iti-flag-offset:-624px}.iti__cg{--iti-flag-offset:-640px}.iti__ch{--iti-flag-offset:-656px}.iti__ci{--iti-flag-offset:-672px}.iti__ck{--iti-flag-offset:-688px}.iti__cl{--iti-flag-offset:-704px}.iti__cm{--iti-flag-offset:-720px}.iti__cn{--iti-flag-offset:-736px}.iti__co{--iti-flag-offset:-752px}.iti__cr{--iti-flag-offset:-768px}.iti__cu{--iti-flag-offset:-784px}.iti__cv{--iti-flag-offset:-800px}.iti__cw{--iti-flag-offset:-816px}.iti__cx{--iti-flag-offset:-832px}.iti__cy{--iti-flag-offset:-848px}.iti__cz{--iti-flag-offset:-864px}.iti__de{--iti-flag-offset:-880px}.iti__dj{--iti-flag-offset:-896px}.iti__dk{--iti-flag-offset:-912px}.iti__dm{--iti-flag-offset:-928px}.iti__do{--iti-flag-offset:-944px}.iti__dz{--iti-flag-offset:-960px}.iti__ec{--iti-flag-offset:-976px}.iti__ee{--iti-flag-offset:-992px}.iti__eg{--iti-flag-offset:-1008px}.iti__eh{--iti-flag-offset:-1024px}.iti__er{--iti-flag-offset:-1040px}.iti__es{--iti-flag-offset:-1056px}.iti__et{--iti-flag-offset:-1072px}.iti__fi{--iti-flag-offset:-1088px}.iti__fj{--iti-flag-offset:-1104px}.iti__fk{--iti-flag-offset:-1120px}.iti__fm{--iti-flag-offset:-1136px}.iti__fo{--iti-flag-offset:-1152px}.iti__fr{--iti-flag-offset:-1168px}.iti__ga{--iti-flag-offset:-1184px}.iti__gb{--iti-flag-offset:-1200px}.iti__gd{--iti-flag-offset:-1216px}.iti__ge{--iti-flag-offset:-1232px}.iti__gf{--iti-flag-offset:-1248px}.iti__gg{--iti-flag-offset:-1264px}.iti__gh{--iti-flag-offset:-1280px}.iti__gi{--iti-flag-offset:-1296px}.iti__gl{--iti-flag-offset:-1312px}.iti__gm{--iti-flag-offset:-1328px}.iti__gn{--iti-flag-offset:-1344px}.iti__gp{--iti-flag-offset:-1360px}.iti__gq{--iti-flag-offset:-1376px}.iti__gr{--iti-flag-offset:-1392px}.iti__gt{--iti-flag-offset:-1408px}.iti__gu{--iti-flag-offset:-1424px}.iti__gw{--iti-flag-offset:-1440px}.iti__gy{--iti-flag-offset:-1456px}.iti__hk{--iti-flag-offset:-1472px}.iti__hn{--iti-flag-offset:-1488px}.iti__hr{--iti-flag-offset:-1504px}.iti__ht{--iti-flag-offset:-1520px}.iti__hu{--iti-flag-offset:-1536px}.iti__id{--iti-flag-offset:-1552px}.iti__ie{--iti-flag-offset:-1568px}.iti__il{--iti-flag-offset:-1584px}.iti__im{--iti-flag-offset:-1600px}.iti__in{--iti-flag-offset:-1616px}.iti__io{--iti-flag-offset:-1632px}.iti__iq{--iti-flag-offset:-1648px}.iti__ir{--iti-flag-offset:-1664px}.iti__is{--iti-flag-offset:-1680px}.iti__it{--iti-flag-offset:-1696px}.iti__je{--iti-flag-offset:-1712px}.iti__jm{--iti-flag-offset:-1728px}.iti__jo{--iti-flag-offset:-1744px}.iti__jp{--iti-flag-offset:-1760px}.iti__ke{--iti-flag-offset:-1776px}.iti__kg{--iti-flag-offset:-1792px}.iti__kh{--iti-flag-offset:-1808px}.iti__ki{--iti-flag-offset:-1824px}.iti__km{--iti-flag-offset:-1840px}.iti__kn{--iti-flag-offset:-1856px}.iti__kp{--iti-flag-offset:-1872px}.iti__kr{--iti-flag-offset:-1888px}.iti__kw{--iti-flag-offset:-1904px}.iti__ky{--iti-flag-offset:-1920px}.iti__kz{--iti-flag-offset:-1936px}.iti__la{--iti-flag-offset:-1952px}.iti__lb{--iti-flag-offset:-1968px}.iti__lc{--iti-flag-offset:-1984px}.iti__li{--iti-flag-offset:-2000px}.iti__lk{--iti-flag-offset:-2016px}.iti__lr{--iti-flag-offset:-2032px}.iti__ls{--iti-flag-offset:-2048px}.iti__lt{--iti-flag-offset:-2064px}.iti__lu{--iti-flag-offset:-2080px}.iti__lv{--iti-flag-offset:-2096px}.iti__ly{--iti-flag-offset:-2112px}.iti__ma{--iti-flag-offset:-2128px}.iti__mc{--iti-flag-offset:-2144px}.iti__md{--iti-flag-offset:-2160px}.iti__me{--iti-flag-offset:-2176px}.iti__mf{--iti-flag-offset:-2192px}.iti__mg{--iti-flag-offset:-2208px}.iti__mh{--iti-flag-offset:-2224px}.iti__mk{--iti-flag-offset:-2240px}.iti__ml{--iti-flag-offset:-2256px}.iti__mm{--iti-flag-offset:-2272px}.iti__mn{--iti-flag-offset:-2288px}.iti__mo{--iti-flag-offset:-2304px}.iti__mp{--iti-flag-offset:-2320px}.iti__mq{--iti-flag-offset:-2336px}.iti__mr{--iti-flag-offset:-2352px}.iti__ms{--iti-flag-offset:-2368px}.iti__mt{--iti-flag-offset:-2384px}.iti__mu{--iti-flag-offset:-2400px}.iti__mv{--iti-flag-offset:-2416px}.iti__mw{--iti-flag-offset:-2432px}.iti__mx{--iti-flag-offset:-2448px}.iti__my{--iti-flag-offset:-2464px}.iti__mz{--iti-flag-offset:-2480px}.iti__na{--iti-flag-offset:-2496px}.iti__nc{--iti-flag-offset:-2512px}.iti__ne{--iti-flag-offset:-2528px}.iti__nf{--iti-flag-offset:-2544px}.iti__ng{--iti-flag-offset:-2560px}.iti__ni{--iti-flag-offset:-2576px}.iti__nl{--iti-flag-offset:-2592px}.iti__no{--iti-flag-offset:-2608px}.iti__np{--iti-flag-offset:-2624px}.iti__nr{--iti-flag-offset:-2640px}.iti__nu{--iti-flag-offset:-2656px}.iti__nz{--iti-flag-offset:-2672px}.iti__om{--iti-flag-offset:-2688px}.iti__pa{--iti-flag-offset:-2704px}.iti__pe{--iti-flag-offset:-2720px}.iti__pf{--iti-flag-offset:-2736px}.iti__pg{--iti-flag-offset:-2752px}.iti__ph{--iti-flag-offset:-2768px}.iti__pk{--iti-flag-offset:-2784px}.iti__pl{--iti-flag-offset:-2800px}.iti__pm{--iti-flag-offset:-2816px}.iti__pr{--iti-flag-offset:-2832px}.iti__ps{--iti-flag-offset:-2848px}.iti__pt{--iti-flag-offset:-2864px}.iti__pw{--iti-flag-offset:-2880px}.iti__py{--iti-flag-offset:-2896px}.iti__qa{--iti-flag-offset:-2912px}.iti__re{--iti-flag-offset:-2928px}.iti__ro{--iti-flag-offset:-2944px}.iti__rs{--iti-flag-offset:-2960px}.iti__ru{--iti-flag-offset:-2976px}.iti__rw{--iti-flag-offset:-2992px}.iti__sa{--iti-flag-offset:-3008px}.iti__sb{--iti-flag-offset:-3024px}.iti__sc{--iti-flag-offset:-3040px}.iti__sd{--iti-flag-offset:-3056px}.iti__se{--iti-flag-offset:-3072px}.iti__sg{--iti-flag-offset:-3088px}.iti__sh{--iti-flag-offset:-3104px}.iti__si{--iti-flag-offset:-3120px}.iti__sj{--iti-flag-offset:-3136px}.iti__sk{--iti-flag-offset:-3152px}.iti__sl{--iti-flag-offset:-3168px}.iti__sm{--iti-flag-offset:-3184px}.iti__sn{--iti-flag-offset:-3200px}.iti__so{--iti-flag-offset:-3216px}.iti__sr{--iti-flag-offset:-3232px}.iti__ss{--iti-flag-offset:-3248px}.iti__st{--iti-flag-offset:-3264px}.iti__sv{--iti-flag-offset:-3280px}.iti__sx{--iti-flag-offset:-3296px}.iti__sy{--iti-flag-offset:-3312px}.iti__sz{--iti-flag-offset:-3328px}.iti__tc{--iti-flag-offset:-3344px}.iti__td{--iti-flag-offset:-3360px}.iti__tg{--iti-flag-offset:-3376px}.iti__th{--iti-flag-offset:-3392px}.iti__tj{--iti-flag-offset:-3408px}.iti__tk{--iti-flag-offset:-3424px}.iti__tl{--iti-flag-offset:-3440px}.iti__tm{--iti-flag-offset:-3456px}.iti__tn{--iti-flag-offset:-3472px}.iti__to{--iti-flag-offset:-3488px}.iti__tr{--iti-flag-offset:-3504px}.iti__tt{--iti-flag-offset:-3520px}.iti__tv{--iti-flag-offset:-3536px}.iti__tw{--iti-flag-offset:-3552px}.iti__tz{--iti-flag-offset:-3568px}.iti__ua{--iti-flag-offset:-3584px}.iti__ug{--iti-flag-offset:-3600px}.iti__us{--iti-flag-offset:-3616px}.iti__uy{--iti-flag-offset:-3632px}.iti__uz{--iti-flag-offset:-3648px}.iti__va{--iti-flag-offset:-3664px}.iti__vc{--iti-flag-offset:-3680px}.iti__ve{--iti-flag-offset:-3696px}.iti__vg{--iti-flag-offset:-3712px}.iti__vi{--iti-flag-offset:-3728px}.iti__vn{--iti-flag-offset:-3744px}.iti__vu{--iti-flag-offset:-3760px}.iti__wf{--iti-flag-offset:-3776px}.iti__ws{--iti-flag-offset:-3792px}.iti__xk{--iti-flag-offset:-3808px}.iti__ye{--iti-flag-offset:-3824px}.iti__yt{--iti-flag-offset:-3840px}.iti__za{--iti-flag-offset:-3856px}.iti__zm{--iti-flag-offset:-3872px}.iti__zw{--iti-flag-offset:-3888px}.iti__globe{background:0 0;box-shadow:none;height:var(--iti-globe-height);display:flex;align-items:center;justify-content:center;padding:0}.iti__globe .iti__globe-svg{width:100%;height:100%;fill:var(--iti-icon-color)}:root{--iti-path-flags-1x:url('../img/flags.webp');--iti-path-flags-2x:url('../img/flags@2x.webp')}
|
package/build/img/flags.png
CHANGED
|
Binary file
|
package/build/img/flags.webp
CHANGED
|
Binary file
|
package/build/img/flags@2x.png
CHANGED
|
Binary file
|
package/build/img/flags@2x.webp
CHANGED
|
Binary file
|
package/build/js/data.js
CHANGED
package/build/js/data.min.js
CHANGED
package/build/js/intlTelInput.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input v26.0.
|
|
2
|
+
* International Telephone Input v26.0.6
|
|
3
3
|
* https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -3871,7 +3871,7 @@ var factoryOutput = (() => {
|
|
|
3871
3871
|
attachUtils,
|
|
3872
3872
|
startedLoadingUtilsScript: false,
|
|
3873
3873
|
startedLoadingAutoCountry: false,
|
|
3874
|
-
version: "26.0.
|
|
3874
|
+
version: "26.0.6"
|
|
3875
3875
|
}
|
|
3876
3876
|
);
|
|
3877
3877
|
var intl_tel_input_default = intlTelInput;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input v26.0.
|
|
2
|
+
* International Telephone Input v26.0.6
|
|
3
3
|
* https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -28,7 +28,7 @@ var factoryOutput=(()=>{var F=Object.defineProperty;var Ct=Object.getOwnProperty
|
|
|
28
28
|
<svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">
|
|
29
29
|
<path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>
|
|
30
30
|
<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"/>
|
|
31
|
-
</svg>`;var P=class{constructor(t,e,i){this.highlightedItem=null;this.selectedItem=null;t.dataset.intlTelInputId=i.toString(),this.telInput=t,this.options=e,this.id=i,this.a=!!t.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.o=this.telInput.style.paddingLeft)}generateMarkup(t){this.countries=t,this.telInput.classList.add("iti__tel-input");let e=this._au();this._av(e),e.appendChild(this.telInput),this._ay(),this._az(e)}_au(){let{allowDropdown:t,showFlags:e,containerClass:i,useFullscreenPopup:s}=this.options,n=k({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":e,"iti--inline-dropdown":!s,[i]:!!i}),o=C("div",{class:n});return this.isRTL&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}_av(t){let{allowDropdown:e,separateDialCode:i,showFlags:s}=this.options;if(e||s||i){this.countryContainer=C("div",{class:`iti__country-container ${h.V_HIDE}`},t),e?(this.selectedCountry=C("button",{type:"button",class:"iti__selected-country",[p.EXPANDED]:"false",[p.LABEL]:this.options.i18n.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=C("div",{class:"iti__selected-country"},this.countryContainer);let n=C("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=C("div",{class:h.FLAG},n),e&&(this.dropdownArrow=C("div",{class:"iti__arrow",[p.HIDDEN]:"true"},n)),i&&(this.selectedDialCode=C("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e&&this._aw()}}_aw(){let{fixDropdownWidth:t,useFullscreenPopup:e,countrySearch:i,i18n:s,dropdownContainer:n,containerClass:o}=this.options,l=t?"":"iti--flexible-dropdown-width";if(this.dropdownContent=C("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${h.HIDE} ${l}`,role:"dialog",[p.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),i&&this._ax(),this.countryList=C("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[p.LABEL]:s.countryListAriaLabel},this.dropdownContent),this._ba(),i&&this.updateSearchResultsA11yText(),n){let a=k({iti:!0,"iti--container":!0,"iti--fullscreen-popup":e,"iti--inline-dropdown":!e,[o]:!!o});this.dropdown=C("div",{class:a}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_ax(){let{i18n:t}=this.options,e=C("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=C("span",{class:"iti__search-icon",[p.HIDDEN]:"true"},e),this.searchIcon.innerHTML=nt(),this.searchInput=C("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:t.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:t.searchPlaceholder,[p.CONTROLS]:`iti-${this.id}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},e),this.k=C("button",{type:"button",class:`iti__search-clear ${h.HIDE}`,[p.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},e),this.k.innerHTML=ot(this.id),this.l=C("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=C("div",{class:`iti__no-results ${h.HIDE}`,[p.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=t.searchEmptyState}_ay(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(h.V_HIDE))}_az(t){let{hiddenInput:e}=this.options;if(e){let i=this.telInput.getAttribute("name")||"",s=e(i);if(s.phone){let n=this.telInput.form?.querySelector(`input[name="${s.phone}"]`);n?this.hiddenInput=n:(this.hiddenInput=C("input",{type:"hidden",name:s.phone}),t.appendChild(this.hiddenInput))}if(s.country){let n=this.telInput.form?.querySelector(`input[name="${s.country}"]`);n?this.m=n:(this.m=C("input",{type:"hidden",name:s.country}),t.appendChild(this.m))}}}_ba(){let t=document.createDocumentFragment();for(let e=0;e<this.countries.length;e++){let i=this.countries[e],s=k({[h.COUNTRY_ITEM]:!0}),n=C("li",{id:`iti-${this.id}__item-${i.iso2}`,class:s,tabindex:"-1",role:"option",[p.SELECTED]:"false"});n.dataset.dialCode=i.dialCode,n.dataset.countryCode=i.iso2,i.nodeById[this.id]=n,this.options.showFlags&&C("div",{class:`${h.FLAG} iti__${i.iso2}`},n);let o=C("span",{class:"iti__country-name"},n);o.textContent=i.name;let l=C("span",{class:"iti__dial-code"},n);this.isRTL&&l.setAttribute("dir","ltr"),l.textContent=`+${i.dialCode}`,t.appendChild(n)}this.countryList.appendChild(t)}updateInputPadding(){if(this.selectedCountry){let t=this.options.separateDialCode?x.SANE_SELECTED_WITH_DIAL_WIDTH:x.SANE_SELECTED_NO_DIAL_WIDTH,i=(this.selectedCountry.offsetWidth||this._bb()||t)+x.INPUT_PADDING_EXTRA_LEFT;this.telInput.style.paddingLeft=`${i}px`}}_bb(){if(this.telInput.parentNode){let t;try{t=window.top.document.body}catch{t=document.body}let e=this.telInput.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.countryContainer.cloneNode();e.appendChild(i);let s=this.selectedCountry.cloneNode(!0);i.appendChild(s);let n=s.offsetWidth;return t.removeChild(e),n}return 0}updateSearchResultsA11yText(){let{i18n:t}=this.options,e=this.countryList.childElementCount;this.l.textContent=t.searchSummaryAria(e)}scrollTo(t){let e=this.countryList,i=document.documentElement.scrollTop,s=e.offsetHeight,n=e.getBoundingClientRect().top+i,o=n+s,l=t.offsetHeight,a=t.getBoundingClientRect().top+i,d=a+l,c=a-n+e.scrollTop;if(a<n)e.scrollTop=c;else if(d>o){let m=s-l;e.scrollTop=c-m}}highlightListItem(t,e){let i=this.highlightedItem;if(i&&i.classList.remove(h.HIGHLIGHT),this.highlightedItem=t,this.highlightedItem&&(this.highlightedItem.classList.add(h.HIGHLIGHT),this.options.countrySearch)){let s=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(p.ACTIVE_DESCENDANT,s)}e&&this.highlightedItem.focus()}updateSelectedItem(t){if(this.selectedItem&&this.selectedItem.dataset.countryCode!==t&&(this.selectedItem.setAttribute(p.SELECTED,"false"),this.selectedItem=null),t&&!this.selectedItem){let e=this.countryList.querySelector(`[data-country-code="${t}"]`);e&&(e.setAttribute(p.SELECTED,"true"),this.selectedItem=e)}}filterCountries(t){this.countryList.innerHTML="";let e=!0;for(let i of t){let s=i.nodeById[this.id];s&&(this.countryList.appendChild(s),e&&(this.highlightListItem(s,!1),e=!1))}e?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(h.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(h.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.o);let t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.k=null,this.searchNoResults=null,this.l=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.m=null,this.highlightedItem=null,this.selectedItem=null;for(let e of this.countries)delete e.nodeById[this.id];this.countries=null}};var rt=r=>{let{onlyCountries:t,excludeCountries:e}=r;if(t.length){let i=t.map(s=>s.toLowerCase());return w.filter(s=>i.includes(s.iso2))}else if(e.length){let i=e.map(s=>s.toLowerCase());return w.filter(s=>!i.includes(s.iso2))}return w},lt=(r,t)=>{let{countryNameLocale:e,i18n:i}=t,s;try{typeof Intl<"u"&&typeof Intl.DisplayNames=="function"?s=new Intl.DisplayNames(e,{type:"region"}):s=null}catch(n){console.error(n),s=null}for(let n of r)n.name=i[n.iso2]||s?.of(n.iso2.toUpperCase())||""},at=r=>{let t=new Set,e=0,i={},s=(o,l)=>{if(!o||!l)return;l.length>e&&(e=l.length),i.hasOwnProperty(l)||(i[l]=[]);let a=i[l];a.includes(o)||a.push(o)},n=[...r].sort((o,l)=>o.priority-l.priority);for(let o of n){t.has(o.dialCode)||t.add(o.dialCode);for(let l=1;l<o.dialCode.length;l++){let a=o.dialCode.substring(0,l);s(o.iso2,a)}if(s(o.iso2,o.dialCode),o.areaCodes){let l=i[o.dialCode][0];for(let a of o.areaCodes){for(let d=1;d<a.length;d++){let c=a.substring(0,d),m=o.dialCode+c;s(l,m),s(o.iso2,m)}s(o.iso2,o.dialCode+a)}}}return{dialCodes:t,dialCodeMaxLen:e,dialCodeToIso2Map:i}},ut=(r,t)=>{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),r.sort((e,i)=>{let{countryOrder:s}=t;if(s){let n=s.indexOf(e.iso2),o=s.indexOf(i.iso2),l=n>-1,a=o>-1;if(l||a)return l&&a?n-o:l?-1:1}return e.name.localeCompare(i.name)})},dt=r=>{for(let t of r)t.normalisedName=U(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`};var z=(r,t,e,i)=>{let s=r;if(e&&t){let n=`+${i.dialCode}`,o=s[n.length]===" "||s[n.length]==="-"?n.length+1:n.length;s=s.substring(o)}return s},ct=(r,t,e,i,s)=>{let n=e?e.formatNumberAsYouType(r,i.iso2):r,{dialCode:o}=i;return s&&t.charAt(0)!=="+"&&n.includes(`+${o}`)?(n.split(`+${o}`)[1]||"").trim():n};var ht=(r,t,e,i)=>{if(e===0&&!i)return 0;let s=0;for(let n=0;n<t.length;n++){if(/[+0-9]/.test(t[n])&&s++,s===r&&!i)return n+1;if(i&&s===r+1)return n}return t.length};var Lt=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],X=r=>{let t=T(r);if(t.startsWith(M.NANP)&&t.length>=4){let e=t.substring(1,4);return Lt.includes(e)}return!1};var vt=0,Nt=new Set(w.map(r=>r.iso2)),q=r=>Nt.has(r),B=class r{constructor(t,e={}){this.id=vt++,this.options={...Y,...e},et(this.options),this.ui=new P(t,this.options,this.id),this.i=r._b(),this.promise=this._c(),this.countries=rt(this.options);let{dialCodes:i,dialCodeMaxLen:s,dialCodeToIso2Map:n}=at(this.countries);this.dialCodes=i,this.dialCodeMaxLen=s,this.dialCodeToIso2Map=n,this.j=new Map(this.countries.map(o=>[o.iso2,o])),this._init()}static _b(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_updateNumeralSet(t){/[\u0660-\u0669]/.test(t)?this.userNumeralSet="arabic-indic":/[\u06F0-\u06F9]/.test(t)?this.userNumeralSet="persian":this.userNumeralSet="ascii"}_mapAsciiToUserNumerals(t){if(this.userNumeralSet||this._updateNumeralSet(this.ui.telInput.value),this.userNumeralSet==="ascii")return t;let e=this.userNumeralSet==="arabic-indic"?1632:1776;return t.replace(/[0-9]/g,i=>String.fromCharCode(e+Number(i)))}_normaliseNumerals(t){if(!t)return"";if(this._updateNumeralSet(t),this.userNumeralSet==="ascii")return t;let e=this.userNumeralSet==="arabic-indic"?1632:1776,i=this.userNumeralSet==="arabic-indic"?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return t.replace(i,s=>String.fromCharCode(48+(s.charCodeAt(0)-e)))}_getTelInputValue(){let t=this.ui.telInput.value.trim();return this._normaliseNumerals(t)}_setTelInputValue(t){this.ui.telInput.value=this._mapAsciiToUserNumerals(t)}_c(){let t=new Promise((i,s)=>{this.b=i,this.c=s}),e=new Promise((i,s)=>{this.d=i,this.e=s});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.g=new AbortController,this._a(),this.ui.generateMarkup(this.countries),this._d(),this._e(),this._h()}_a(){lt(this.countries,this.options),ut(this.countries,this.options),dt(this.countries)}_d(t=!1){let e=this.ui.telInput.getAttribute("value"),i=this._normaliseNumerals(e),s=this._getTelInputValue(),o=i&&i.startsWith("+")&&(!s||!s.startsWith("+"))?i:s,l=this._ao(o),a=X(o),{initialCountry:d,geoIpLookup:c}=this.options,m=d===R.AUTO&&c;if(l&&!a)this._ai(o);else if(!m||t){let I=d?d.toLowerCase():"";q(I)?this._aj(I):l&&a?this._aj(J.ISO2):this._aj("")}o&&this._ah(o)}_e(){this._j(),this.options.allowDropdown&&this._g(),(this.ui.hiddenInput||this.ui.m)&&this.ui.telInput.form&&this._f()}_f(){let t=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.m&&(this.ui.m.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",t,{signal:this.g.signal})}_g(){let t=this.g.signal,e=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)?this.ui.telInput.focus():o.preventDefault()},i=this.ui.telInput.closest("label");i&&i.addEventListener("click",e,{signal:t});let s=()=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._l()};this.ui.selectedCountry.addEventListener("click",s,{signal:t});let n=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&[f.ARROW_UP,f.ARROW_DOWN,f.SPACE,f.ENTER].includes(o.key)&&(o.preventDefault(),o.stopPropagation(),this._l()),o.key===f.TAB&&this._am()};this.ui.countryContainer.addEventListener("keydown",n,{signal:t})}_h(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!u.utils){let n=()=>{u.attachUtils(t)?.catch(()=>{})};if(u.documentReady())n();else{let o=()=>{n()};window.addEventListener("load",o,{signal:this.g.signal})}}else this.d();e===R.AUTO&&i&&!this.selectedCountryData.iso2?this._i():this.b()}_i(){u.autoCountry?this.handleAutoCountry():u.startedLoadingAutoCountry||(u.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();q(e)?(u.autoCountry=e,setTimeout(()=>O("handleAutoCountry"))):(this._d(!0),O("rejectAutoCountryPromise"))},()=>{this._d(!0),O("rejectAutoCountryPromise")}))}_m(){this._l(),this.ui.searchInput.value="+",this._ae("")}_j(){this._p(),this._n(),this._o()}_p(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:s,countrySearch:n}=this.options,o=!1;N.ALPHA_UNICODE.test(this._getTelInputValue())&&(o=!0);let l=a=>{let d=this._getTelInputValue();if(this.i&&a?.data==="+"&&i&&s&&n){let g=this.ui.telInput.selectionStart||0,E=d.substring(0,g-1),_=d.substring(g);this._setTelInputValue(E+_),this._m();return}this._ai(d)&&this._ar();let c=a?.data&&N.NON_PLUS_NUMERIC.test(a.data),m=a?.inputType===V.PASTE&&d;c||m&&!t?o=!0:N.NON_PLUS_NUMERIC.test(d)||(o=!1);let I=a?.detail&&a.detail.isSetNumber,D=this.userNumeralSet==="ascii";if(e&&!o&&!I&&D){let g=this.ui.telInput.selectionStart||0,_=d.substring(0,g).replace(N.NON_PLUS_NUMERIC_GLOBAL,"").length,L=a?.inputType===V.DELETE_FWD,y=this._ap(),v=ct(y,d,u.utils,this.selectedCountryData,i),b=ht(_,v,g,L);this._setTelInputValue(v),this.ui.telInput.setSelectionRange(b,b)}if(i&&d.startsWith("+")&&this.selectedCountryData.dialCode){let g=z(d,!0,i,this.selectedCountryData);this._setTelInputValue(g)}};this.ui.telInput.addEventListener("input",l,{signal:this.g.signal})}_n(){let{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:s}=this.options;if(t||e){let n=o=>{if(o.key&&o.key.length===1&&!o.altKey&&!o.ctrlKey&&!o.metaKey){if(e&&i&&s&&o.key==="+"){o.preventDefault(),this._m();return}if(t){let l=this._getTelInputValue(),d=!l.startsWith("+")&&this.ui.telInput.selectionStart===0&&o.key==="+",c=this._normaliseNumerals(o.key),m=/^[0-9]$/.test(c),I=e?m:d||m,D=this.ui.telInput,g=D.selectionStart,E=D.selectionEnd,_=l.slice(0,g),L=l.slice(E),y=_+o.key+L,v=this._ap(y),b=u.utils.getCoreNumber(v,this.selectedCountryData.iso2),W=this.n&&b.length>this.n,pt=this._s(v)!==null;(!I||W&&!pt&&!d)&&o.preventDefault()}}};this.ui.telInput.addEventListener("keydown",n,{signal:this.g.signal})}}_o(){if(this.options.strictMode){let t=e=>{e.preventDefault();let i=this.ui.telInput,s=i.selectionStart,n=i.selectionEnd,o=this._getTelInputValue(),l=o.slice(0,s),a=o.slice(n),d=this.selectedCountryData.iso2,c=e.clipboardData.getData("text"),m=this._normaliseNumerals(c),I=s===0&&n>0,D=!o.startsWith("+")||I,g=m.replace(N.NON_PLUS_NUMERIC_GLOBAL,""),E=g.startsWith("+"),_=g.replace(/\+/g,""),L=E&&D?`+${_}`:_,y=l+L+a;if(y.length>5){let b=u.utils.getCoreNumber(y,d);for(;b.length===0&&y.length>0;)y=y.slice(0,-1),b=u.utils.getCoreNumber(y,d);if(!b)return;if(this.n&&b.length>this.n)if(i.selectionEnd===o.length){let W=b.length-this.n;y=y.slice(0,y.length-W)}else return}this._setTelInputValue(y);let v=s+L.length;i.setSelectionRange(v,v),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.g.signal})}}_k(t){let e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_as(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_l(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.h=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"true"),this._x(),e){let i=this.ui.countryList.firstElementChild;i&&(this.ui.highlightListItem(i,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._y(),this.ui.dropdownArrow.classList.add(h.ARROW_UP),this._as(A.OPEN_COUNTRY_DROPDOWN)}_x(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){let t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;let i=()=>this._am();window.addEventListener("scroll",i,{signal:this.h.signal})}}}_y(){let t=this.h.signal;this._z(t),this._aa(t),this._ab(t),this._ac(t),this.options.countrySearch&&this._ad(t)}_z(t){let e=i=>{let s=i.target?.closest(`.${h.COUNTRY_ITEM}`);s&&this.ui.highlightListItem(s,!1)};this.ui.countryList.addEventListener("mouseover",e,{signal:t})}_aa(t){let e=i=>{let s=i.target?.closest(`.${h.COUNTRY_ITEM}`);s&&this._al(s)};this.ui.countryList.addEventListener("click",e,{signal:t})}_ab(t){let e=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._am()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_ac(t){let e="",i=null,s=n=>{[f.ARROW_UP,f.ARROW_DOWN,f.ENTER,f.ESC].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),n.key===f.ARROW_UP||n.key===f.ARROW_DOWN?this._af(n.key):n.key===f.ENTER?this._ag():n.key===f.ESC&&(this._am(),this.ui.selectedCountry.focus())),!this.options.countrySearch&&N.HIDDEN_SEARCH_CHAR.test(n.key)&&(n.stopPropagation(),i&&clearTimeout(i),e+=n.key.toLowerCase(),this._q(e),i=setTimeout(()=>{e=""},Z.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",s,{signal:t})}_ad(t){let e=()=>{let o=this.ui.searchInput.value.trim();this._ae(o),this.ui.searchInput.value?this.ui.k.classList.remove(h.HIDE):this.ui.k.classList.add(h.HIDE)},i=null,s=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)};this.ui.searchInput.addEventListener("input",s,{signal:t});let n=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()};this.ui.k.addEventListener("click",n,{signal:t})}_q(t){let e=st(this.countries,t);if(e){let i=e.nodeById[this.id];this.ui.highlightListItem(i,!1),this.ui.scrollTo(i)}}_ae(t){let e;t===""?e=this.countries:e=it(this.countries,t),this.ui.filterCountries(e)}_af(t){let e=t===f.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===f.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_ag(){this.ui.highlightedItem&&this._al(this.ui.highlightedItem)}_ah(t){let e=t;if(this.options.formatOnDisplay&&u.utils&&this.selectedCountryData){let i=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:s,INTERNATIONAL:n}=u.utils.numberFormat,o=i?s:n;e=u.utils.formatNumber(e,this.selectedCountryData.iso2,o)}e=this._aq(e),this._setTelInputValue(e)}_ai(t){let e=this._s(t);return e!==null?this._aj(e):!1}_r(t){let{dialCode:e,nationalPrefix:i}=this.selectedCountryData;if(t.startsWith("+")||!e)return t;let o=i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${o}`}_s(t){let e=t.indexOf("+"),i=e?t.substring(e):t,s=this.selectedCountryData.iso2,n=this.selectedCountryData.dialCode;i=this._r(i);let o=this._ao(i,!0),l=T(i);if(o){let a=T(o),d=this.dialCodeToIso2Map[a];if(d.length===1)return d[0]===s?null:d[0];if(!s&&this.f&&d.includes(this.f))return this.f;if(n===M.NANP&&X(l))return null;let{areaCodes:m,priority:I}=this.selectedCountryData;if(m){let L=m.map(y=>`${n}${y}`);for(let y of L)if(l.startsWith(y))return null}let g=m&&!(I===0)&&l.length>a.length,E=s&&d.includes(s)&&!g,_=s===d[0];if(!E&&!_)return d[0]}else if(i.startsWith("+")&&l.length){let a=this.selectedCountryData.dialCode||"";return a&&a.startsWith(l)?null:""}else if((!i||i==="+")&&!s)return this.f;return null}_aj(t){let{separateDialCode:e,showFlags:i,i18n:s,allowDropdown:n}=this.options,o=this.selectedCountryData.iso2||"";if(n&&this.ui.updateSelectedItem(t),this.selectedCountryData=t?this.j.get(t):{},this.selectedCountryData.iso2&&(this.f=this.selectedCountryData.iso2),this.ui.selectedCountry){let l=t&&i?`${h.FLAG} iti__${t}`:`${h.FLAG} ${h.GLOBE}`,a,d,c;if(t){let{name:m,dialCode:I}=this.selectedCountryData;d=m,a=s.selectedCountryAriaLabel.replace("${countryName}",m).replace("${dialCode}",`+${I}`),c=i?"":j()}else d=s.noCountrySelected,a=s.noCountrySelected,c=j();this.ui.selectedCountryInner.className=l,this.ui.selectedCountry.setAttribute("title",d),this.ui.selectedCountry.setAttribute(p.LABEL,a),this.ui.selectedCountryInner.innerHTML=c}if(e){let l=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=l,this.ui.updateInputPadding()}return this._ak(),this._t(),o!==t}_t(){let{strictMode:t,placeholderNumberType:e,allowedNumberTypes:i}=this.options,{iso2:s}=this.selectedCountryData;if(t&&u.utils)if(s){let n=u.utils.numberType[e],o=u.utils.getExampleNumber(s,!1,n,!0),l=o;for(;u.utils.isPossibleNumber(o,s,i);)l=o,o+="0";let a=u.utils.getCoreNumber(l,s);this.n=a.length,s==="by"&&(this.n=a.length+1)}else this.n=null}_ak(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:s}=this.options,n=t===S.AGGRESSIVE||!this.ui.a&&t===S.POLITE;if(u.utils&&n){let o=u.utils.numberType[e],l=this.selectedCountryData.iso2?u.utils.getExampleNumber(this.selectedCountryData.iso2,i,o):"";l=this._aq(l),typeof s=="function"&&(l=s(l,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",l)}}_al(t){let e=t.dataset[K.COUNTRY_CODE],i=this._aj(e);this._am();let s=t.dataset[K.DIAL_CODE];if(this._an(s),this.options.formatOnDisplay){let n=this._getTelInputValue();this._ah(n)}this.ui.telInput.focus(),i&&this._ar()}_am(){this.ui.dropdownContent.classList.contains(h.HIDE)||(this.ui.dropdownContent.classList.add(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"false"),this.options.countrySearch&&(this.ui.searchInput.removeAttribute(p.ACTIVE_DESCENDANT),this.ui.highlightedItem&&(this.ui.highlightedItem.classList.remove(h.HIGHLIGHT),this.ui.highlightedItem=null)),this.ui.dropdownArrow.classList.remove(h.ARROW_UP),this.h.abort(),this.h=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._as(A.CLOSE_COUNTRY_DROPDOWN))}_an(t){let e=this._getTelInputValue(),i=`+${t}`,s;if(e.startsWith("+")){let n=this._ao(e);n?s=e.replace(n,i):s=i,this._setTelInputValue(s)}}_ao(t,e){let i="";if(t.startsWith("+")){let s="",n=!1;for(let o=0;o<t.length;o++){let l=t.charAt(o);if(/[0-9]/.test(l)){if(s+=l,!!!this.dialCodeToIso2Map[s])break;if(this.dialCodes.has(s)){if(i=t.substring(0,o+1),n=!0,!e)break}else e&&n&&(i=t.substring(0,o+1));if(s.length===this.dialCodeMaxLen)break}}}return i}_ap(t){let e=t?this._normaliseNumerals(t):this._getTelInputValue(),{dialCode:i}=this.selectedCountryData,s,n=T(e);return this.options.separateDialCode&&!e.startsWith("+")&&i&&n?s=`+${i}`:s="",s+e}_aq(t){let e=!!this._ao(t),i=z(t,e,this.options.separateDialCode,this.selectedCountryData);return this._k(i)}_ar(){this._as(A.COUNTRY_CHANGE)}handleAutoCountry(){this.options.initialCountry===R.AUTO&&u.autoCountry&&(this.f=u.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(h.GLOBE)||this.setCountry(this.f),this.b())}handleUtils(){if(u.utils){let t=this._getTelInputValue();t&&this._ah(t),this.selectedCountryData.iso2&&(this._ak(),this._t())}this.d()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._am(),this.g.abort(),this.g=null,this.ui.destroy(),u.instances instanceof Map?u.instances.delete(this.id):delete u.instances[this.id])}getExtension(){return u.utils?u.utils.getExtension(this._ap(),this.selectedCountryData.iso2):""}getNumber(t){if(u.utils){let{iso2:e}=this.selectedCountryData,i=this._ap(),s=u.utils.formatNumber(i,e,t);return this._mapAsciiToUserNumerals(s)}return""}getNumberType(){return u.utils?u.utils.getNumberType(this._ap(),this.selectedCountryData.iso2):$.UNKNOWN_NUMBER_TYPE}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(u.utils){let{iso2:t}=this.selectedCountryData;return u.utils.getValidationError(this._ap(),t)}return $.UNKNOWN_VALIDATION_ERROR}isValidNumber(){let{dialCode:t,iso2:e}=this.selectedCountryData;if(t===H.DIAL_CODE&&u.utils){let i=this._ap(),s=u.utils.getCoreNumber(i,e);if(s[0]===H.MOBILE_PREFIX&&s.length!==H.MOBILE_CORE_LENGTH)return!1}return this._v(!1)}isValidNumberPrecise(){return this._v(!0)}_u(t){return u.utils?u.utils.isPossibleNumber(t,this.selectedCountryData.iso2,this.options.allowedNumberTypes):null}_v(t){if(!u.utils)return null;if(!this.selectedCountryData.iso2)return!1;let{allowNumberExtensions:e,allowPhonewords:i}=this.options,s=a=>t?this._w(a):this._u(a),n=this._ap();if(!s(n))return!1;if(n.search(N.ALPHA_UNICODE)>-1){let a=this.selectedCountryData.iso2;return u.utils.getExtension(n,a)?e:i}return!0}_w(t){return u.utils?u.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.allowedNumberTypes):null}setCountry(t){let e=t?.toLowerCase();if(!q(e))throw new Error(`Invalid country code: '${e}'`);let i=this.selectedCountryData.iso2;if(t&&e!==i||!t&&i){if(this._aj(e),this._an(this.selectedCountryData.dialCode),this.options.formatOnDisplay){let n=this._getTelInputValue();this._ah(n)}this._ar()}}setNumber(t){let e=this._normaliseNumerals(t),i=this._ai(e);this._ah(e),i&&this._ar(),this._as(A.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._ak()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},Dt=r=>{if(!u.utils&&!u.startedLoadingUtilsScript){let t;if(typeof r=="function")try{t=Promise.resolve(r())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof r}`));return u.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return u.utils=i,O("handleUtils"),!0}).catch(e=>{throw O("rejectUtilsScriptPromise",e),e})}return null},O=(r,...t)=>{Object.values(u.instances).forEach(e=>{let i=e[r];typeof i=="function"&&i.apply(e,t)})},u=Object.assign((r,t)=>{let e=new B(r,t);return u.instances[e.id]=e,r.iti=e,e},{defaults:Y,documentReady:()=>document.readyState==="complete",getCountryData:()=>w,getInstance:r=>{let t=r.dataset.intlTelInputId;return t?u.instances[t]:null},instances:{},attachUtils:Dt,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"26.0.5"}),wt=u;return It(Tt);})();
|
|
31
|
+
</svg>`;var P=class{constructor(t,e,i){this.highlightedItem=null;this.selectedItem=null;t.dataset.intlTelInputId=i.toString(),this.telInput=t,this.options=e,this.id=i,this.a=!!t.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.o=this.telInput.style.paddingLeft)}generateMarkup(t){this.countries=t,this.telInput.classList.add("iti__tel-input");let e=this._au();this._av(e),e.appendChild(this.telInput),this._ay(),this._az(e)}_au(){let{allowDropdown:t,showFlags:e,containerClass:i,useFullscreenPopup:s}=this.options,n=k({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":e,"iti--inline-dropdown":!s,[i]:!!i}),o=C("div",{class:n});return this.isRTL&&o.setAttribute("dir","ltr"),this.telInput.before(o),o}_av(t){let{allowDropdown:e,separateDialCode:i,showFlags:s}=this.options;if(e||s||i){this.countryContainer=C("div",{class:`iti__country-container ${h.V_HIDE}`},t),e?(this.selectedCountry=C("button",{type:"button",class:"iti__selected-country",[p.EXPANDED]:"false",[p.LABEL]:this.options.i18n.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=C("div",{class:"iti__selected-country"},this.countryContainer);let n=C("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=C("div",{class:h.FLAG},n),e&&(this.dropdownArrow=C("div",{class:"iti__arrow",[p.HIDDEN]:"true"},n)),i&&(this.selectedDialCode=C("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e&&this._aw()}}_aw(){let{fixDropdownWidth:t,useFullscreenPopup:e,countrySearch:i,i18n:s,dropdownContainer:n,containerClass:o}=this.options,l=t?"":"iti--flexible-dropdown-width";if(this.dropdownContent=C("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${h.HIDE} ${l}`,role:"dialog",[p.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),i&&this._ax(),this.countryList=C("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[p.LABEL]:s.countryListAriaLabel},this.dropdownContent),this._ba(),i&&this.updateSearchResultsA11yText(),n){let a=k({iti:!0,"iti--container":!0,"iti--fullscreen-popup":e,"iti--inline-dropdown":!e,[o]:!!o});this.dropdown=C("div",{class:a}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_ax(){let{i18n:t}=this.options,e=C("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=C("span",{class:"iti__search-icon",[p.HIDDEN]:"true"},e),this.searchIcon.innerHTML=nt(),this.searchInput=C("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:t.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:t.searchPlaceholder,[p.CONTROLS]:`iti-${this.id}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},e),this.k=C("button",{type:"button",class:`iti__search-clear ${h.HIDE}`,[p.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},e),this.k.innerHTML=ot(this.id),this.l=C("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=C("div",{class:`iti__no-results ${h.HIDE}`,[p.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=t.searchEmptyState}_ay(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(h.V_HIDE))}_az(t){let{hiddenInput:e}=this.options;if(e){let i=this.telInput.getAttribute("name")||"",s=e(i);if(s.phone){let n=this.telInput.form?.querySelector(`input[name="${s.phone}"]`);n?this.hiddenInput=n:(this.hiddenInput=C("input",{type:"hidden",name:s.phone}),t.appendChild(this.hiddenInput))}if(s.country){let n=this.telInput.form?.querySelector(`input[name="${s.country}"]`);n?this.m=n:(this.m=C("input",{type:"hidden",name:s.country}),t.appendChild(this.m))}}}_ba(){let t=document.createDocumentFragment();for(let e=0;e<this.countries.length;e++){let i=this.countries[e],s=k({[h.COUNTRY_ITEM]:!0}),n=C("li",{id:`iti-${this.id}__item-${i.iso2}`,class:s,tabindex:"-1",role:"option",[p.SELECTED]:"false"});n.dataset.dialCode=i.dialCode,n.dataset.countryCode=i.iso2,i.nodeById[this.id]=n,this.options.showFlags&&C("div",{class:`${h.FLAG} iti__${i.iso2}`},n);let o=C("span",{class:"iti__country-name"},n);o.textContent=i.name;let l=C("span",{class:"iti__dial-code"},n);this.isRTL&&l.setAttribute("dir","ltr"),l.textContent=`+${i.dialCode}`,t.appendChild(n)}this.countryList.appendChild(t)}updateInputPadding(){if(this.selectedCountry){let t=this.options.separateDialCode?x.SANE_SELECTED_WITH_DIAL_WIDTH:x.SANE_SELECTED_NO_DIAL_WIDTH,i=(this.selectedCountry.offsetWidth||this._bb()||t)+x.INPUT_PADDING_EXTRA_LEFT;this.telInput.style.paddingLeft=`${i}px`}}_bb(){if(this.telInput.parentNode){let t;try{t=window.top.document.body}catch{t=document.body}let e=this.telInput.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.countryContainer.cloneNode();e.appendChild(i);let s=this.selectedCountry.cloneNode(!0);i.appendChild(s);let n=s.offsetWidth;return t.removeChild(e),n}return 0}updateSearchResultsA11yText(){let{i18n:t}=this.options,e=this.countryList.childElementCount;this.l.textContent=t.searchSummaryAria(e)}scrollTo(t){let e=this.countryList,i=document.documentElement.scrollTop,s=e.offsetHeight,n=e.getBoundingClientRect().top+i,o=n+s,l=t.offsetHeight,a=t.getBoundingClientRect().top+i,d=a+l,c=a-n+e.scrollTop;if(a<n)e.scrollTop=c;else if(d>o){let m=s-l;e.scrollTop=c-m}}highlightListItem(t,e){let i=this.highlightedItem;if(i&&i.classList.remove(h.HIGHLIGHT),this.highlightedItem=t,this.highlightedItem&&(this.highlightedItem.classList.add(h.HIGHLIGHT),this.options.countrySearch)){let s=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(p.ACTIVE_DESCENDANT,s)}e&&this.highlightedItem.focus()}updateSelectedItem(t){if(this.selectedItem&&this.selectedItem.dataset.countryCode!==t&&(this.selectedItem.setAttribute(p.SELECTED,"false"),this.selectedItem=null),t&&!this.selectedItem){let e=this.countryList.querySelector(`[data-country-code="${t}"]`);e&&(e.setAttribute(p.SELECTED,"true"),this.selectedItem=e)}}filterCountries(t){this.countryList.innerHTML="";let e=!0;for(let i of t){let s=i.nodeById[this.id];s&&(this.countryList.appendChild(s),e&&(this.highlightListItem(s,!1),e=!1))}e?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(h.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(h.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.o);let t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.k=null,this.searchNoResults=null,this.l=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.m=null,this.highlightedItem=null,this.selectedItem=null;for(let e of this.countries)delete e.nodeById[this.id];this.countries=null}};var rt=r=>{let{onlyCountries:t,excludeCountries:e}=r;if(t.length){let i=t.map(s=>s.toLowerCase());return w.filter(s=>i.includes(s.iso2))}else if(e.length){let i=e.map(s=>s.toLowerCase());return w.filter(s=>!i.includes(s.iso2))}return w},lt=(r,t)=>{let{countryNameLocale:e,i18n:i}=t,s;try{typeof Intl<"u"&&typeof Intl.DisplayNames=="function"?s=new Intl.DisplayNames(e,{type:"region"}):s=null}catch(n){console.error(n),s=null}for(let n of r)n.name=i[n.iso2]||s?.of(n.iso2.toUpperCase())||""},at=r=>{let t=new Set,e=0,i={},s=(o,l)=>{if(!o||!l)return;l.length>e&&(e=l.length),i.hasOwnProperty(l)||(i[l]=[]);let a=i[l];a.includes(o)||a.push(o)},n=[...r].sort((o,l)=>o.priority-l.priority);for(let o of n){t.has(o.dialCode)||t.add(o.dialCode);for(let l=1;l<o.dialCode.length;l++){let a=o.dialCode.substring(0,l);s(o.iso2,a)}if(s(o.iso2,o.dialCode),o.areaCodes){let l=i[o.dialCode][0];for(let a of o.areaCodes){for(let d=1;d<a.length;d++){let c=a.substring(0,d),m=o.dialCode+c;s(l,m),s(o.iso2,m)}s(o.iso2,o.dialCode+a)}}}return{dialCodes:t,dialCodeMaxLen:e,dialCodeToIso2Map:i}},ut=(r,t)=>{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),r.sort((e,i)=>{let{countryOrder:s}=t;if(s){let n=s.indexOf(e.iso2),o=s.indexOf(i.iso2),l=n>-1,a=o>-1;if(l||a)return l&&a?n-o:l?-1:1}return e.name.localeCompare(i.name)})},dt=r=>{for(let t of r)t.normalisedName=U(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`};var z=(r,t,e,i)=>{let s=r;if(e&&t){let n=`+${i.dialCode}`,o=s[n.length]===" "||s[n.length]==="-"?n.length+1:n.length;s=s.substring(o)}return s},ct=(r,t,e,i,s)=>{let n=e?e.formatNumberAsYouType(r,i.iso2):r,{dialCode:o}=i;return s&&t.charAt(0)!=="+"&&n.includes(`+${o}`)?(n.split(`+${o}`)[1]||"").trim():n};var ht=(r,t,e,i)=>{if(e===0&&!i)return 0;let s=0;for(let n=0;n<t.length;n++){if(/[+0-9]/.test(t[n])&&s++,s===r&&!i)return n+1;if(i&&s===r+1)return n}return t.length};var Lt=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],X=r=>{let t=T(r);if(t.startsWith(M.NANP)&&t.length>=4){let e=t.substring(1,4);return Lt.includes(e)}return!1};var vt=0,Nt=new Set(w.map(r=>r.iso2)),q=r=>Nt.has(r),B=class r{constructor(t,e={}){this.id=vt++,this.options={...Y,...e},et(this.options),this.ui=new P(t,this.options,this.id),this.i=r._b(),this.promise=this._c(),this.countries=rt(this.options);let{dialCodes:i,dialCodeMaxLen:s,dialCodeToIso2Map:n}=at(this.countries);this.dialCodes=i,this.dialCodeMaxLen=s,this.dialCodeToIso2Map=n,this.j=new Map(this.countries.map(o=>[o.iso2,o])),this._init()}static _b(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_updateNumeralSet(t){/[\u0660-\u0669]/.test(t)?this.userNumeralSet="arabic-indic":/[\u06F0-\u06F9]/.test(t)?this.userNumeralSet="persian":this.userNumeralSet="ascii"}_mapAsciiToUserNumerals(t){if(this.userNumeralSet||this._updateNumeralSet(this.ui.telInput.value),this.userNumeralSet==="ascii")return t;let e=this.userNumeralSet==="arabic-indic"?1632:1776;return t.replace(/[0-9]/g,i=>String.fromCharCode(e+Number(i)))}_normaliseNumerals(t){if(!t)return"";if(this._updateNumeralSet(t),this.userNumeralSet==="ascii")return t;let e=this.userNumeralSet==="arabic-indic"?1632:1776,i=this.userNumeralSet==="arabic-indic"?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return t.replace(i,s=>String.fromCharCode(48+(s.charCodeAt(0)-e)))}_getTelInputValue(){let t=this.ui.telInput.value.trim();return this._normaliseNumerals(t)}_setTelInputValue(t){this.ui.telInput.value=this._mapAsciiToUserNumerals(t)}_c(){let t=new Promise((i,s)=>{this.b=i,this.c=s}),e=new Promise((i,s)=>{this.d=i,this.e=s});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.g=new AbortController,this._a(),this.ui.generateMarkup(this.countries),this._d(),this._e(),this._h()}_a(){lt(this.countries,this.options),ut(this.countries,this.options),dt(this.countries)}_d(t=!1){let e=this.ui.telInput.getAttribute("value"),i=this._normaliseNumerals(e),s=this._getTelInputValue(),o=i&&i.startsWith("+")&&(!s||!s.startsWith("+"))?i:s,l=this._ao(o),a=X(o),{initialCountry:d,geoIpLookup:c}=this.options,m=d===R.AUTO&&c;if(l&&!a)this._ai(o);else if(!m||t){let I=d?d.toLowerCase():"";q(I)?this._aj(I):l&&a?this._aj(J.ISO2):this._aj("")}o&&this._ah(o)}_e(){this._j(),this.options.allowDropdown&&this._g(),(this.ui.hiddenInput||this.ui.m)&&this.ui.telInput.form&&this._f()}_f(){let t=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.m&&(this.ui.m.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",t,{signal:this.g.signal})}_g(){let t=this.g.signal,e=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)?this.ui.telInput.focus():o.preventDefault()},i=this.ui.telInput.closest("label");i&&i.addEventListener("click",e,{signal:t});let s=()=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._l()};this.ui.selectedCountry.addEventListener("click",s,{signal:t});let n=o=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&[f.ARROW_UP,f.ARROW_DOWN,f.SPACE,f.ENTER].includes(o.key)&&(o.preventDefault(),o.stopPropagation(),this._l()),o.key===f.TAB&&this._am()};this.ui.countryContainer.addEventListener("keydown",n,{signal:t})}_h(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!u.utils){let n=()=>{u.attachUtils(t)?.catch(()=>{})};if(u.documentReady())n();else{let o=()=>{n()};window.addEventListener("load",o,{signal:this.g.signal})}}else this.d();e===R.AUTO&&i&&!this.selectedCountryData.iso2?this._i():this.b()}_i(){u.autoCountry?this.handleAutoCountry():u.startedLoadingAutoCountry||(u.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();q(e)?(u.autoCountry=e,setTimeout(()=>O("handleAutoCountry"))):(this._d(!0),O("rejectAutoCountryPromise"))},()=>{this._d(!0),O("rejectAutoCountryPromise")}))}_m(){this._l(),this.ui.searchInput.value="+",this._ae("")}_j(){this._p(),this._n(),this._o()}_p(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:s,countrySearch:n}=this.options,o=!1;N.ALPHA_UNICODE.test(this._getTelInputValue())&&(o=!0);let l=a=>{let d=this._getTelInputValue();if(this.i&&a?.data==="+"&&i&&s&&n){let g=this.ui.telInput.selectionStart||0,E=d.substring(0,g-1),_=d.substring(g);this._setTelInputValue(E+_),this._m();return}this._ai(d)&&this._ar();let c=a?.data&&N.NON_PLUS_NUMERIC.test(a.data),m=a?.inputType===V.PASTE&&d;c||m&&!t?o=!0:N.NON_PLUS_NUMERIC.test(d)||(o=!1);let I=a?.detail&&a.detail.isSetNumber,D=this.userNumeralSet==="ascii";if(e&&!o&&!I&&D){let g=this.ui.telInput.selectionStart||0,_=d.substring(0,g).replace(N.NON_PLUS_NUMERIC_GLOBAL,"").length,L=a?.inputType===V.DELETE_FWD,y=this._ap(),v=ct(y,d,u.utils,this.selectedCountryData,i),b=ht(_,v,g,L);this._setTelInputValue(v),this.ui.telInput.setSelectionRange(b,b)}if(i&&d.startsWith("+")&&this.selectedCountryData.dialCode){let g=z(d,!0,i,this.selectedCountryData);this._setTelInputValue(g)}};this.ui.telInput.addEventListener("input",l,{signal:this.g.signal})}_n(){let{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:s}=this.options;if(t||e){let n=o=>{if(o.key&&o.key.length===1&&!o.altKey&&!o.ctrlKey&&!o.metaKey){if(e&&i&&s&&o.key==="+"){o.preventDefault(),this._m();return}if(t){let l=this._getTelInputValue(),d=!l.startsWith("+")&&this.ui.telInput.selectionStart===0&&o.key==="+",c=this._normaliseNumerals(o.key),m=/^[0-9]$/.test(c),I=e?m:d||m,D=this.ui.telInput,g=D.selectionStart,E=D.selectionEnd,_=l.slice(0,g),L=l.slice(E),y=_+o.key+L,v=this._ap(y),b=u.utils.getCoreNumber(v,this.selectedCountryData.iso2),W=this.n&&b.length>this.n,pt=this._s(v)!==null;(!I||W&&!pt&&!d)&&o.preventDefault()}}};this.ui.telInput.addEventListener("keydown",n,{signal:this.g.signal})}}_o(){if(this.options.strictMode){let t=e=>{e.preventDefault();let i=this.ui.telInput,s=i.selectionStart,n=i.selectionEnd,o=this._getTelInputValue(),l=o.slice(0,s),a=o.slice(n),d=this.selectedCountryData.iso2,c=e.clipboardData.getData("text"),m=this._normaliseNumerals(c),I=s===0&&n>0,D=!o.startsWith("+")||I,g=m.replace(N.NON_PLUS_NUMERIC_GLOBAL,""),E=g.startsWith("+"),_=g.replace(/\+/g,""),L=E&&D?`+${_}`:_,y=l+L+a;if(y.length>5){let b=u.utils.getCoreNumber(y,d);for(;b.length===0&&y.length>0;)y=y.slice(0,-1),b=u.utils.getCoreNumber(y,d);if(!b)return;if(this.n&&b.length>this.n)if(i.selectionEnd===o.length){let W=b.length-this.n;y=y.slice(0,y.length-W)}else return}this._setTelInputValue(y);let v=s+L.length;i.setSelectionRange(v,v),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.g.signal})}}_k(t){let e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_as(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_l(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.h=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"true"),this._x(),e){let i=this.ui.countryList.firstElementChild;i&&(this.ui.highlightListItem(i,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._y(),this.ui.dropdownArrow.classList.add(h.ARROW_UP),this._as(A.OPEN_COUNTRY_DROPDOWN)}_x(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){let t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;let i=()=>this._am();window.addEventListener("scroll",i,{signal:this.h.signal})}}}_y(){let t=this.h.signal;this._z(t),this._aa(t),this._ab(t),this._ac(t),this.options.countrySearch&&this._ad(t)}_z(t){let e=i=>{let s=i.target?.closest(`.${h.COUNTRY_ITEM}`);s&&this.ui.highlightListItem(s,!1)};this.ui.countryList.addEventListener("mouseover",e,{signal:t})}_aa(t){let e=i=>{let s=i.target?.closest(`.${h.COUNTRY_ITEM}`);s&&this._al(s)};this.ui.countryList.addEventListener("click",e,{signal:t})}_ab(t){let e=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._am()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_ac(t){let e="",i=null,s=n=>{[f.ARROW_UP,f.ARROW_DOWN,f.ENTER,f.ESC].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),n.key===f.ARROW_UP||n.key===f.ARROW_DOWN?this._af(n.key):n.key===f.ENTER?this._ag():n.key===f.ESC&&(this._am(),this.ui.selectedCountry.focus())),!this.options.countrySearch&&N.HIDDEN_SEARCH_CHAR.test(n.key)&&(n.stopPropagation(),i&&clearTimeout(i),e+=n.key.toLowerCase(),this._q(e),i=setTimeout(()=>{e=""},Z.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",s,{signal:t})}_ad(t){let e=()=>{let o=this.ui.searchInput.value.trim();this._ae(o),this.ui.searchInput.value?this.ui.k.classList.remove(h.HIDE):this.ui.k.classList.add(h.HIDE)},i=null,s=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)};this.ui.searchInput.addEventListener("input",s,{signal:t});let n=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()};this.ui.k.addEventListener("click",n,{signal:t})}_q(t){let e=st(this.countries,t);if(e){let i=e.nodeById[this.id];this.ui.highlightListItem(i,!1),this.ui.scrollTo(i)}}_ae(t){let e;t===""?e=this.countries:e=it(this.countries,t),this.ui.filterCountries(e)}_af(t){let e=t===f.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===f.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_ag(){this.ui.highlightedItem&&this._al(this.ui.highlightedItem)}_ah(t){let e=t;if(this.options.formatOnDisplay&&u.utils&&this.selectedCountryData){let i=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:s,INTERNATIONAL:n}=u.utils.numberFormat,o=i?s:n;e=u.utils.formatNumber(e,this.selectedCountryData.iso2,o)}e=this._aq(e),this._setTelInputValue(e)}_ai(t){let e=this._s(t);return e!==null?this._aj(e):!1}_r(t){let{dialCode:e,nationalPrefix:i}=this.selectedCountryData;if(t.startsWith("+")||!e)return t;let o=i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${o}`}_s(t){let e=t.indexOf("+"),i=e?t.substring(e):t,s=this.selectedCountryData.iso2,n=this.selectedCountryData.dialCode;i=this._r(i);let o=this._ao(i,!0),l=T(i);if(o){let a=T(o),d=this.dialCodeToIso2Map[a];if(d.length===1)return d[0]===s?null:d[0];if(!s&&this.f&&d.includes(this.f))return this.f;if(n===M.NANP&&X(l))return null;let{areaCodes:m,priority:I}=this.selectedCountryData;if(m){let L=m.map(y=>`${n}${y}`);for(let y of L)if(l.startsWith(y))return null}let g=m&&!(I===0)&&l.length>a.length,E=s&&d.includes(s)&&!g,_=s===d[0];if(!E&&!_)return d[0]}else if(i.startsWith("+")&&l.length){let a=this.selectedCountryData.dialCode||"";return a&&a.startsWith(l)?null:""}else if((!i||i==="+")&&!s)return this.f;return null}_aj(t){let{separateDialCode:e,showFlags:i,i18n:s,allowDropdown:n}=this.options,o=this.selectedCountryData.iso2||"";if(n&&this.ui.updateSelectedItem(t),this.selectedCountryData=t?this.j.get(t):{},this.selectedCountryData.iso2&&(this.f=this.selectedCountryData.iso2),this.ui.selectedCountry){let l=t&&i?`${h.FLAG} iti__${t}`:`${h.FLAG} ${h.GLOBE}`,a,d,c;if(t){let{name:m,dialCode:I}=this.selectedCountryData;d=m,a=s.selectedCountryAriaLabel.replace("${countryName}",m).replace("${dialCode}",`+${I}`),c=i?"":j()}else d=s.noCountrySelected,a=s.noCountrySelected,c=j();this.ui.selectedCountryInner.className=l,this.ui.selectedCountry.setAttribute("title",d),this.ui.selectedCountry.setAttribute(p.LABEL,a),this.ui.selectedCountryInner.innerHTML=c}if(e){let l=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=l,this.ui.updateInputPadding()}return this._ak(),this._t(),o!==t}_t(){let{strictMode:t,placeholderNumberType:e,allowedNumberTypes:i}=this.options,{iso2:s}=this.selectedCountryData;if(t&&u.utils)if(s){let n=u.utils.numberType[e],o=u.utils.getExampleNumber(s,!1,n,!0),l=o;for(;u.utils.isPossibleNumber(o,s,i);)l=o,o+="0";let a=u.utils.getCoreNumber(l,s);this.n=a.length,s==="by"&&(this.n=a.length+1)}else this.n=null}_ak(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:s}=this.options,n=t===S.AGGRESSIVE||!this.ui.a&&t===S.POLITE;if(u.utils&&n){let o=u.utils.numberType[e],l=this.selectedCountryData.iso2?u.utils.getExampleNumber(this.selectedCountryData.iso2,i,o):"";l=this._aq(l),typeof s=="function"&&(l=s(l,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",l)}}_al(t){let e=t.dataset[K.COUNTRY_CODE],i=this._aj(e);this._am();let s=t.dataset[K.DIAL_CODE];if(this._an(s),this.options.formatOnDisplay){let n=this._getTelInputValue();this._ah(n)}this.ui.telInput.focus(),i&&this._ar()}_am(){this.ui.dropdownContent.classList.contains(h.HIDE)||(this.ui.dropdownContent.classList.add(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"false"),this.options.countrySearch&&(this.ui.searchInput.removeAttribute(p.ACTIVE_DESCENDANT),this.ui.highlightedItem&&(this.ui.highlightedItem.classList.remove(h.HIGHLIGHT),this.ui.highlightedItem=null)),this.ui.dropdownArrow.classList.remove(h.ARROW_UP),this.h.abort(),this.h=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._as(A.CLOSE_COUNTRY_DROPDOWN))}_an(t){let e=this._getTelInputValue(),i=`+${t}`,s;if(e.startsWith("+")){let n=this._ao(e);n?s=e.replace(n,i):s=i,this._setTelInputValue(s)}}_ao(t,e){let i="";if(t.startsWith("+")){let s="",n=!1;for(let o=0;o<t.length;o++){let l=t.charAt(o);if(/[0-9]/.test(l)){if(s+=l,!!!this.dialCodeToIso2Map[s])break;if(this.dialCodes.has(s)){if(i=t.substring(0,o+1),n=!0,!e)break}else e&&n&&(i=t.substring(0,o+1));if(s.length===this.dialCodeMaxLen)break}}}return i}_ap(t){let e=t?this._normaliseNumerals(t):this._getTelInputValue(),{dialCode:i}=this.selectedCountryData,s,n=T(e);return this.options.separateDialCode&&!e.startsWith("+")&&i&&n?s=`+${i}`:s="",s+e}_aq(t){let e=!!this._ao(t),i=z(t,e,this.options.separateDialCode,this.selectedCountryData);return this._k(i)}_ar(){this._as(A.COUNTRY_CHANGE)}handleAutoCountry(){this.options.initialCountry===R.AUTO&&u.autoCountry&&(this.f=u.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(h.GLOBE)||this.setCountry(this.f),this.b())}handleUtils(){if(u.utils){let t=this._getTelInputValue();t&&this._ah(t),this.selectedCountryData.iso2&&(this._ak(),this._t())}this.d()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._am(),this.g.abort(),this.g=null,this.ui.destroy(),u.instances instanceof Map?u.instances.delete(this.id):delete u.instances[this.id])}getExtension(){return u.utils?u.utils.getExtension(this._ap(),this.selectedCountryData.iso2):""}getNumber(t){if(u.utils){let{iso2:e}=this.selectedCountryData,i=this._ap(),s=u.utils.formatNumber(i,e,t);return this._mapAsciiToUserNumerals(s)}return""}getNumberType(){return u.utils?u.utils.getNumberType(this._ap(),this.selectedCountryData.iso2):$.UNKNOWN_NUMBER_TYPE}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(u.utils){let{iso2:t}=this.selectedCountryData;return u.utils.getValidationError(this._ap(),t)}return $.UNKNOWN_VALIDATION_ERROR}isValidNumber(){let{dialCode:t,iso2:e}=this.selectedCountryData;if(t===H.DIAL_CODE&&u.utils){let i=this._ap(),s=u.utils.getCoreNumber(i,e);if(s[0]===H.MOBILE_PREFIX&&s.length!==H.MOBILE_CORE_LENGTH)return!1}return this._v(!1)}isValidNumberPrecise(){return this._v(!0)}_u(t){return u.utils?u.utils.isPossibleNumber(t,this.selectedCountryData.iso2,this.options.allowedNumberTypes):null}_v(t){if(!u.utils)return null;if(!this.selectedCountryData.iso2)return!1;let{allowNumberExtensions:e,allowPhonewords:i}=this.options,s=a=>t?this._w(a):this._u(a),n=this._ap();if(!s(n))return!1;if(n.search(N.ALPHA_UNICODE)>-1){let a=this.selectedCountryData.iso2;return u.utils.getExtension(n,a)?e:i}return!0}_w(t){return u.utils?u.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.allowedNumberTypes):null}setCountry(t){let e=t?.toLowerCase();if(!q(e))throw new Error(`Invalid country code: '${e}'`);let i=this.selectedCountryData.iso2;if(t&&e!==i||!t&&i){if(this._aj(e),this._an(this.selectedCountryData.dialCode),this.options.formatOnDisplay){let n=this._getTelInputValue();this._ah(n)}this._ar()}}setNumber(t){let e=this._normaliseNumerals(t),i=this._ai(e);this._ah(e),i&&this._ar(),this._as(A.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._ak()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},Dt=r=>{if(!u.utils&&!u.startedLoadingUtilsScript){let t;if(typeof r=="function")try{t=Promise.resolve(r())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof r}`));return u.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return u.utils=i,O("handleUtils"),!0}).catch(e=>{throw O("rejectUtilsScriptPromise",e),e})}return null},O=(r,...t)=>{Object.values(u.instances).forEach(e=>{let i=e[r];typeof i=="function"&&i.apply(e,t)})},u=Object.assign((r,t)=>{let e=new B(r,t);return u.instances[e.id]=e,r.iti=e,e},{defaults:Y,documentReady:()=>document.readyState==="complete",getCountryData:()=>w,getInstance:r=>{let t=r.dataset.intlTelInputId;return t?u.instances[t]:null},instances:{},attachUtils:Dt,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"26.0.6"}),wt=u;return It(Tt);})();
|
|
32
32
|
|
|
33
33
|
// UMD
|
|
34
34
|
return factoryOutput.default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input v26.0.
|
|
2
|
+
* International Telephone Input v26.0.6
|
|
3
3
|
* https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -3870,7 +3870,7 @@ var factoryOutput = (() => {
|
|
|
3870
3870
|
attachUtils,
|
|
3871
3871
|
startedLoadingUtilsScript: false,
|
|
3872
3872
|
startedLoadingAutoCountry: false,
|
|
3873
|
-
version: "26.0.
|
|
3873
|
+
version: "26.0.6"
|
|
3874
3874
|
}
|
|
3875
3875
|
);
|
|
3876
3876
|
var intl_tel_input_default = intlTelInput;
|