intl-tel-input 26.9.2 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/angular/README.md +1 -1
- package/angular/dist/IntlTelInput.d.ts +97 -0
- package/angular/dist/IntlTelInput.js +4812 -0
- package/angular/dist/IntlTelInputWithUtils.d.ts +3 -0
- package/angular/{build → dist}/IntlTelInputWithUtils.js +2342 -2096
- package/{build → dist}/css/demo.css +1 -1
- package/dist/css/intlTelInput-no-assets.css +1 -0
- package/dist/css/intlTelInput-no-assets.min.css +1 -0
- package/dist/css/intlTelInput.css +1 -0
- package/dist/css/intlTelInput.min.css +1 -0
- package/dist/img/flags.png +0 -0
- package/dist/img/flags.webp +0 -0
- package/dist/img/flags@2x.png +0 -0
- package/dist/img/flags@2x.webp +0 -0
- package/dist/js/data.d.ts +1616 -0
- package/{build → dist}/js/data.js +5 -17
- package/dist/js/data.min.js +7 -0
- package/dist/js/data.mjs +1708 -0
- package/{build/js/i18n/ar/index.js → dist/js/i18n/ar.js} +1 -0
- package/{build/js/i18n/bg/index.js → dist/js/i18n/bg.js} +1 -0
- package/{build/js/i18n/bn/index.js → dist/js/i18n/bn.js} +1 -0
- package/{build/js/i18n/bs/index.js → dist/js/i18n/bs.js} +1 -0
- package/{build/js/i18n/ca/index.js → dist/js/i18n/ca.js} +1 -0
- package/{build/js/i18n/cs/index.js → dist/js/i18n/cs.js} +1 -0
- package/{build/js/i18n/da/index.js → dist/js/i18n/da.js} +1 -0
- package/{build/js/i18n/de/index.js → dist/js/i18n/de.js} +1 -0
- package/{build/js/i18n/el/index.js → dist/js/i18n/el.js} +1 -0
- package/{build/js/i18n/en/index.js → dist/js/i18n/en.js} +3 -2
- package/{build/js/i18n/es/index.js → dist/js/i18n/es.js} +1 -0
- package/{build/js/i18n/et/index.js → dist/js/i18n/et.js} +1 -0
- package/{build/js/i18n/fa/index.js → dist/js/i18n/fa.js} +1 -0
- package/{build/js/i18n/fi/index.js → dist/js/i18n/fi.js} +1 -0
- package/{build/js/i18n/fr/index.js → dist/js/i18n/fr.js} +1 -0
- package/{build/js/i18n/hi/index.js → dist/js/i18n/hi.js} +1 -0
- package/{build/js/i18n/hr/index.js → dist/js/i18n/hr.js} +1 -0
- package/{build/js/i18n/hu/index.js → dist/js/i18n/hu.js} +1 -0
- package/{build/js/i18n/id/index.js → dist/js/i18n/id.js} +1 -0
- package/{build → dist}/js/i18n/index.js +1 -0
- package/{build/js/i18n/it/index.js → dist/js/i18n/it.js} +1 -0
- package/{build/js/i18n/ja/index.js → dist/js/i18n/ja.js} +1 -0
- package/{build/js/i18n/kn/index.js → dist/js/i18n/kn.js} +1 -0
- package/{build/js/i18n/ko/index.js → dist/js/i18n/ko.js} +1 -0
- package/{build/js/i18n/lt/index.js → dist/js/i18n/lt.js} +1 -0
- package/{build/js/i18n/mr/index.js → dist/js/i18n/mr.js} +1 -0
- package/{build/js/i18n/nl/index.js → dist/js/i18n/nl.js} +1 -0
- package/{build/js/i18n/no/index.js → dist/js/i18n/no.js} +1 -0
- package/{build/js/i18n/pl/index.js → dist/js/i18n/pl.js} +1 -0
- package/{build/js/i18n/pt/index.js → dist/js/i18n/pt.js} +1 -0
- package/{build/js/i18n/ro/index.js → dist/js/i18n/ro.js} +1 -0
- package/{build/js/i18n/ru/index.js → dist/js/i18n/ru.js} +1 -0
- package/{build/js/i18n/sk/index.js → dist/js/i18n/sk.js} +1 -0
- package/{build/js/i18n/sl/index.js → dist/js/i18n/sl.js} +1 -0
- package/{build/js/i18n/sq/index.js → dist/js/i18n/sq.js} +1 -0
- package/{build/js/i18n/sr/index.js → dist/js/i18n/sr.js} +1 -0
- package/{build/js/i18n/sv/index.js → dist/js/i18n/sv.js} +1 -0
- package/{build/js/i18n/te/index.js → dist/js/i18n/te.js} +1 -0
- package/{build/js/i18n/th/index.js → dist/js/i18n/th.js} +1 -0
- package/{build/js/i18n/tr/index.js → dist/js/i18n/tr.js} +1 -0
- package/dist/js/i18n/types.js +1 -0
- package/{build/js/i18n/uk/index.js → dist/js/i18n/uk.js} +1 -0
- package/{build/js/i18n/ur/index.js → dist/js/i18n/ur.js} +1 -0
- package/{build/js/i18n/uz/index.js → dist/js/i18n/uz.js} +1 -0
- package/{build/js/i18n/vi/index.js → dist/js/i18n/vi.js} +1 -0
- package/{build/js/i18n/zh-hk/index.js → dist/js/i18n/zh-hk.js} +1 -0
- package/{build/js/i18n/zh/index.js → dist/js/i18n/zh.js} +1 -0
- package/dist/js/i18n.d.ts +1697 -0
- package/dist/js/intlTelInput.d.ts +1773 -0
- package/{build → dist}/js/intlTelInput.js +228 -215
- package/dist/js/intlTelInput.min.js +25 -0
- package/{react/build/IntlTelInput.cjs → dist/js/intlTelInput.mjs} +230 -340
- package/{build → dist}/js/intlTelInputWithUtils.js +531 -498
- package/dist/js/intlTelInputWithUtils.min.js +25 -0
- package/{react/build/IntlTelInputWithUtils.cjs → dist/js/intlTelInputWithUtils.mjs} +530 -621
- package/{build → dist}/js/utils.js +46 -47
- package/package.json +122 -122
- package/react/README.md +1 -1
- package/react/dist/IntlTelInput.d.ts +20 -0
- package/react/{build → dist}/IntlTelInput.js +274 -255
- package/react/dist/IntlTelInputWithUtils.d.ts +4 -0
- package/react/{build → dist}/IntlTelInputWithUtils.js +580 -542
- package/svelte/README.md +1 -1
- package/svelte/src/IntlTelInput.svelte +199 -0
- package/svelte/src/IntlTelInputWithUtils.svelte +15 -0
- package/svelte/src/shims.d.ts +4 -0
- package/vue/README.md +1 -1
- package/vue/dist/IntlTelInput-D7r449B2.js +2577 -0
- package/vue/dist/IntlTelInput.js +5 -0
- package/vue/dist/IntlTelInputWithUtils.js +49385 -0
- package/vue/dist/src/IntlTelInput.vue.d.ts +35 -0
- package/vue/dist/src/index.d.ts +4 -0
- package/vue/dist/src/indexWithUtils.d.ts +3 -0
- package/angular/build/IntlTelInput.js +0 -4501
- package/angular/build/types/intl-tel-input/angular.d.ts +0 -65
- package/angular/build/types/intl-tel-input/angularWithUtils.d.ts +0 -65
- package/angular/build/types/intl-tel-input/data.d.ts +0 -20
- package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/et/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/index.d.ts +0 -45
- package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/kn/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/lt/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sl/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sq/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/types.d.ts +0 -10
- package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/zh-hk/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/intlTelInputWithUtils.d.ts +0 -2
- package/angular/build/types/intl-tel-input/utils.d.ts +0 -2
- package/angular/build/types/intl-tel-input.d.ts +0 -46
- package/angular/build/types/modules/constants.d.ts +0 -94
- package/angular/build/types/modules/core/countrySearch.d.ts +0 -17
- package/angular/build/types/modules/core/icons.d.ts +0 -11
- package/angular/build/types/modules/core/numerals.d.ts +0 -7
- package/angular/build/types/modules/core/options.d.ts +0 -8
- package/angular/build/types/modules/core/ui.d.ts +0 -30
- package/angular/build/types/modules/data/country-data.d.ts +0 -12
- package/angular/build/types/modules/data/intl-regionless.d.ts +0 -2
- package/angular/build/types/modules/data/nanp-regionless.d.ts +0 -2
- package/angular/build/types/modules/format/caret.d.ts +0 -1
- package/angular/build/types/modules/format/formatting.d.ts +0 -3
- package/angular/build/types/modules/types/events.d.ts +0 -10
- package/angular/build/types/modules/types/forEachInstanceArgsMap.d.ts +0 -6
- package/angular/build/types/modules/types/public-api.d.ts +0 -65
- package/angular/build/types/modules/utils/dom.d.ts +0 -6
- package/angular/build/types/modules/utils/isAndroid.d.ts +0 -1
- package/angular/build/types/modules/utils/string.d.ts +0 -2
- package/build/css/intlTelInput-no-assets.css +0 -1323
- package/build/css/intlTelInput-no-assets.min.css +0 -1
- package/build/css/intlTelInput.css +0 -1327
- package/build/css/intlTelInput.min.css +0 -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.min.js +0 -20
- package/build/js/i18n/types.js +0 -0
- package/build/js/intlTelInput.d.ts +0 -671
- package/build/js/intlTelInput.min.js +0 -38
- package/build/js/intlTelInputWithUtils.min.js +0 -38
- package/index.js +0 -1
- package/react/build/IntlTelInput.d.ts +0 -721
- package/svelte/build/IntlTelInput.mjs +0 -5294
- package/svelte/build/IntlTelInputWithUtils.mjs +0 -11381
- package/vue/build/IntlTelInput.vue.d.ts +0 -34
- package/vue/build/IntlTelInputWithUtils.vue.d.ts +0 -34
- package/vue/build/exports/IntlTelInput.d.ts +0 -3
- package/vue/build/exports/IntlTelInput.mjs +0 -86
- package/vue/build/exports/IntlTelInputWithUtils.d.ts +0 -3
- package/vue/build/exports/IntlTelInputWithUtils.mjs +0 -6173
- package/vue/build/intl-tel-input/data.d.ts +0 -20
- package/vue/build/intl-tel-input/i18n/ar/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/bg/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/bn/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/bs/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ca/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/cs/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/da/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/de/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/el/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/en/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/es/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/et/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/fa/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/fi/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/fr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/hi/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/hr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/hu/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/id/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/index.d.ts +0 -45
- package/vue/build/intl-tel-input/i18n/it/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ja/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/kn/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ko/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/lt/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/mr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/nl/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/no/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/pl/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/pt/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ro/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ru/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sk/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sl/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sq/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sv/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/te/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/th/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/tr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/types.d.ts +0 -10
- package/vue/build/intl-tel-input/i18n/uk/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ur/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/uz/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/vi/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/zh/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/zh-hk/index.d.ts +0 -3
- package/vue/build/intl-tel-input/intlTelInputWithUtils.d.ts +0 -2
- package/vue/build/intl-tel-input-MeSkUgHd.mjs +0 -3438
- package/vue/build/intl-tel-input.d.ts +0 -46
- package/vue/build/modules/constants.d.ts +0 -94
- package/vue/build/modules/core/countrySearch.d.ts +0 -17
- package/vue/build/modules/core/icons.d.ts +0 -11
- package/vue/build/modules/core/numerals.d.ts +0 -7
- package/vue/build/modules/core/options.d.ts +0 -8
- package/vue/build/modules/core/ui.d.ts +0 -30
- package/vue/build/modules/data/country-data.d.ts +0 -12
- package/vue/build/modules/data/intl-regionless.d.ts +0 -2
- package/vue/build/modules/data/nanp-regionless.d.ts +0 -2
- package/vue/build/modules/format/caret.d.ts +0 -1
- package/vue/build/modules/format/formatting.d.ts +0 -3
- package/vue/build/modules/types/events.d.ts +0 -10
- package/vue/build/modules/types/forEachInstanceArgsMap.d.ts +0 -6
- package/vue/build/modules/types/public-api.d.ts +0 -65
- package/vue/build/modules/utils/dom.d.ts +0 -6
- package/vue/build/modules/utils/isAndroid.d.ts +0 -1
- package/vue/build/modules/utils/string.d.ts +0 -2
|
@@ -1,3438 +0,0 @@
|
|
|
1
|
-
var pe = (r) => {
|
|
2
|
-
throw TypeError(r);
|
|
3
|
-
};
|
|
4
|
-
var Vt = (r, t, s) => t.has(r) || pe("Cannot " + s);
|
|
5
|
-
var e = (r, t, s) => (Vt(r, t, "read from private field"), s ? s.call(r) : t.get(r)), I = (r, t, s) => t.has(r) ? pe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, s), p = (r, t, s, i) => (Vt(r, t, "write to private field"), i ? i.call(r, s) : t.set(r, s), s), a = (r, t, s) => (Vt(r, t, "access private method"), s);
|
|
6
|
-
const ps = [
|
|
7
|
-
[
|
|
8
|
-
"af",
|
|
9
|
-
// Afghanistan
|
|
10
|
-
"93",
|
|
11
|
-
0,
|
|
12
|
-
null,
|
|
13
|
-
"0"
|
|
14
|
-
],
|
|
15
|
-
[
|
|
16
|
-
"ax",
|
|
17
|
-
// Åland Islands
|
|
18
|
-
"358",
|
|
19
|
-
1,
|
|
20
|
-
["18", "4"],
|
|
21
|
-
// (4 is a mobile range shared with FI)
|
|
22
|
-
"0"
|
|
23
|
-
],
|
|
24
|
-
[
|
|
25
|
-
"al",
|
|
26
|
-
// Albania
|
|
27
|
-
"355",
|
|
28
|
-
0,
|
|
29
|
-
null,
|
|
30
|
-
"0"
|
|
31
|
-
],
|
|
32
|
-
[
|
|
33
|
-
"dz",
|
|
34
|
-
// Algeria
|
|
35
|
-
"213",
|
|
36
|
-
0,
|
|
37
|
-
null,
|
|
38
|
-
"0"
|
|
39
|
-
],
|
|
40
|
-
[
|
|
41
|
-
"as",
|
|
42
|
-
// American Samoa
|
|
43
|
-
"1",
|
|
44
|
-
5,
|
|
45
|
-
["684"],
|
|
46
|
-
"1"
|
|
47
|
-
],
|
|
48
|
-
[
|
|
49
|
-
"ad",
|
|
50
|
-
// Andorra
|
|
51
|
-
"376"
|
|
52
|
-
],
|
|
53
|
-
[
|
|
54
|
-
"ao",
|
|
55
|
-
// Angola
|
|
56
|
-
"244"
|
|
57
|
-
],
|
|
58
|
-
[
|
|
59
|
-
"ai",
|
|
60
|
-
// Anguilla
|
|
61
|
-
"1",
|
|
62
|
-
6,
|
|
63
|
-
["264"],
|
|
64
|
-
"1"
|
|
65
|
-
],
|
|
66
|
-
[
|
|
67
|
-
"ag",
|
|
68
|
-
// Antigua and Barbuda
|
|
69
|
-
"1",
|
|
70
|
-
7,
|
|
71
|
-
["268"],
|
|
72
|
-
"1"
|
|
73
|
-
],
|
|
74
|
-
[
|
|
75
|
-
"ar",
|
|
76
|
-
// Argentina
|
|
77
|
-
"54",
|
|
78
|
-
0,
|
|
79
|
-
null,
|
|
80
|
-
"0"
|
|
81
|
-
],
|
|
82
|
-
[
|
|
83
|
-
"am",
|
|
84
|
-
// Armenia
|
|
85
|
-
"374",
|
|
86
|
-
0,
|
|
87
|
-
null,
|
|
88
|
-
"0"
|
|
89
|
-
],
|
|
90
|
-
[
|
|
91
|
-
"aw",
|
|
92
|
-
// Aruba
|
|
93
|
-
"297"
|
|
94
|
-
],
|
|
95
|
-
[
|
|
96
|
-
"ac",
|
|
97
|
-
// Ascension Island
|
|
98
|
-
"247"
|
|
99
|
-
],
|
|
100
|
-
[
|
|
101
|
-
"au",
|
|
102
|
-
// Australia
|
|
103
|
-
"61",
|
|
104
|
-
0,
|
|
105
|
-
["4"],
|
|
106
|
-
// (mobile range shared with CX and CC)
|
|
107
|
-
"0"
|
|
108
|
-
],
|
|
109
|
-
[
|
|
110
|
-
"at",
|
|
111
|
-
// Austria
|
|
112
|
-
"43",
|
|
113
|
-
0,
|
|
114
|
-
null,
|
|
115
|
-
"0"
|
|
116
|
-
],
|
|
117
|
-
[
|
|
118
|
-
"az",
|
|
119
|
-
// Azerbaijan
|
|
120
|
-
"994",
|
|
121
|
-
0,
|
|
122
|
-
null,
|
|
123
|
-
"0"
|
|
124
|
-
],
|
|
125
|
-
[
|
|
126
|
-
"bs",
|
|
127
|
-
// Bahamas
|
|
128
|
-
"1",
|
|
129
|
-
8,
|
|
130
|
-
["242"],
|
|
131
|
-
"1"
|
|
132
|
-
],
|
|
133
|
-
[
|
|
134
|
-
"bh",
|
|
135
|
-
// Bahrain
|
|
136
|
-
"973"
|
|
137
|
-
],
|
|
138
|
-
[
|
|
139
|
-
"bd",
|
|
140
|
-
// Bangladesh
|
|
141
|
-
"880",
|
|
142
|
-
0,
|
|
143
|
-
null,
|
|
144
|
-
"0"
|
|
145
|
-
],
|
|
146
|
-
[
|
|
147
|
-
"bb",
|
|
148
|
-
// Barbados
|
|
149
|
-
"1",
|
|
150
|
-
9,
|
|
151
|
-
["246"],
|
|
152
|
-
"1"
|
|
153
|
-
],
|
|
154
|
-
[
|
|
155
|
-
"by",
|
|
156
|
-
// Belarus
|
|
157
|
-
"375",
|
|
158
|
-
0,
|
|
159
|
-
null,
|
|
160
|
-
"8"
|
|
161
|
-
],
|
|
162
|
-
[
|
|
163
|
-
"be",
|
|
164
|
-
// Belgium
|
|
165
|
-
"32",
|
|
166
|
-
0,
|
|
167
|
-
null,
|
|
168
|
-
"0"
|
|
169
|
-
],
|
|
170
|
-
[
|
|
171
|
-
"bz",
|
|
172
|
-
// Belize
|
|
173
|
-
"501"
|
|
174
|
-
],
|
|
175
|
-
[
|
|
176
|
-
"bj",
|
|
177
|
-
// Benin
|
|
178
|
-
"229"
|
|
179
|
-
],
|
|
180
|
-
[
|
|
181
|
-
"bm",
|
|
182
|
-
// Bermuda
|
|
183
|
-
"1",
|
|
184
|
-
10,
|
|
185
|
-
["441"],
|
|
186
|
-
"1"
|
|
187
|
-
],
|
|
188
|
-
[
|
|
189
|
-
"bt",
|
|
190
|
-
// Bhutan
|
|
191
|
-
"975"
|
|
192
|
-
],
|
|
193
|
-
[
|
|
194
|
-
"bo",
|
|
195
|
-
// Bolivia
|
|
196
|
-
"591",
|
|
197
|
-
0,
|
|
198
|
-
null,
|
|
199
|
-
"0"
|
|
200
|
-
],
|
|
201
|
-
[
|
|
202
|
-
"ba",
|
|
203
|
-
// Bosnia and Herzegovina
|
|
204
|
-
"387",
|
|
205
|
-
0,
|
|
206
|
-
null,
|
|
207
|
-
"0"
|
|
208
|
-
],
|
|
209
|
-
[
|
|
210
|
-
"bw",
|
|
211
|
-
// Botswana
|
|
212
|
-
"267"
|
|
213
|
-
],
|
|
214
|
-
[
|
|
215
|
-
"br",
|
|
216
|
-
// Brazil
|
|
217
|
-
"55",
|
|
218
|
-
0,
|
|
219
|
-
null,
|
|
220
|
-
"0"
|
|
221
|
-
],
|
|
222
|
-
[
|
|
223
|
-
"io",
|
|
224
|
-
// British Indian Ocean Territory
|
|
225
|
-
"246"
|
|
226
|
-
],
|
|
227
|
-
[
|
|
228
|
-
"vg",
|
|
229
|
-
// British Virgin Islands
|
|
230
|
-
"1",
|
|
231
|
-
11,
|
|
232
|
-
["284"],
|
|
233
|
-
"1"
|
|
234
|
-
],
|
|
235
|
-
[
|
|
236
|
-
"bn",
|
|
237
|
-
// Brunei
|
|
238
|
-
"673"
|
|
239
|
-
],
|
|
240
|
-
[
|
|
241
|
-
"bg",
|
|
242
|
-
// Bulgaria
|
|
243
|
-
"359",
|
|
244
|
-
0,
|
|
245
|
-
null,
|
|
246
|
-
"0"
|
|
247
|
-
],
|
|
248
|
-
[
|
|
249
|
-
"bf",
|
|
250
|
-
// Burkina Faso
|
|
251
|
-
"226"
|
|
252
|
-
],
|
|
253
|
-
[
|
|
254
|
-
"bi",
|
|
255
|
-
// Burundi
|
|
256
|
-
"257"
|
|
257
|
-
],
|
|
258
|
-
[
|
|
259
|
-
"kh",
|
|
260
|
-
// Cambodia
|
|
261
|
-
"855",
|
|
262
|
-
0,
|
|
263
|
-
null,
|
|
264
|
-
"0"
|
|
265
|
-
],
|
|
266
|
-
[
|
|
267
|
-
"cm",
|
|
268
|
-
// Cameroon
|
|
269
|
-
"237"
|
|
270
|
-
],
|
|
271
|
-
[
|
|
272
|
-
"ca",
|
|
273
|
-
// Canada
|
|
274
|
-
"1",
|
|
275
|
-
1,
|
|
276
|
-
["204", "226", "236", "249", "250", "257", "263", "289", "306", "343", "354", "365", "367", "368", "382", "403", "416", "418", "428", "431", "437", "438", "450", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "879", "902", "905", "942"],
|
|
277
|
-
"1"
|
|
278
|
-
],
|
|
279
|
-
[
|
|
280
|
-
"cv",
|
|
281
|
-
// Cape Verde
|
|
282
|
-
"238"
|
|
283
|
-
],
|
|
284
|
-
[
|
|
285
|
-
"bq",
|
|
286
|
-
// Caribbean Netherlands
|
|
287
|
-
"599",
|
|
288
|
-
1,
|
|
289
|
-
["3", "4", "7"]
|
|
290
|
-
],
|
|
291
|
-
[
|
|
292
|
-
"ky",
|
|
293
|
-
// Cayman Islands
|
|
294
|
-
"1",
|
|
295
|
-
12,
|
|
296
|
-
["345"],
|
|
297
|
-
"1"
|
|
298
|
-
],
|
|
299
|
-
[
|
|
300
|
-
"cf",
|
|
301
|
-
// Central African Republic
|
|
302
|
-
"236"
|
|
303
|
-
],
|
|
304
|
-
[
|
|
305
|
-
"td",
|
|
306
|
-
// Chad
|
|
307
|
-
"235"
|
|
308
|
-
],
|
|
309
|
-
[
|
|
310
|
-
"cl",
|
|
311
|
-
// Chile
|
|
312
|
-
"56"
|
|
313
|
-
],
|
|
314
|
-
[
|
|
315
|
-
"cn",
|
|
316
|
-
// China
|
|
317
|
-
"86",
|
|
318
|
-
0,
|
|
319
|
-
null,
|
|
320
|
-
"0"
|
|
321
|
-
],
|
|
322
|
-
[
|
|
323
|
-
"cx",
|
|
324
|
-
// Christmas Island
|
|
325
|
-
"61",
|
|
326
|
-
2,
|
|
327
|
-
["4", "89164"],
|
|
328
|
-
// (4 is a mobile range shared with AU and CC)
|
|
329
|
-
"0"
|
|
330
|
-
],
|
|
331
|
-
[
|
|
332
|
-
"cc",
|
|
333
|
-
// Cocos (Keeling) Islands
|
|
334
|
-
"61",
|
|
335
|
-
1,
|
|
336
|
-
["4", "89162"],
|
|
337
|
-
// (4 is a mobile range shared with AU and CX)
|
|
338
|
-
"0"
|
|
339
|
-
],
|
|
340
|
-
[
|
|
341
|
-
"co",
|
|
342
|
-
// Colombia
|
|
343
|
-
"57",
|
|
344
|
-
0,
|
|
345
|
-
null,
|
|
346
|
-
"0"
|
|
347
|
-
],
|
|
348
|
-
[
|
|
349
|
-
"km",
|
|
350
|
-
// Comoros
|
|
351
|
-
"269"
|
|
352
|
-
],
|
|
353
|
-
[
|
|
354
|
-
"cg",
|
|
355
|
-
// Congo (Brazzaville)
|
|
356
|
-
"242"
|
|
357
|
-
],
|
|
358
|
-
[
|
|
359
|
-
"cd",
|
|
360
|
-
// Congo (Kinshasa)
|
|
361
|
-
"243",
|
|
362
|
-
0,
|
|
363
|
-
null,
|
|
364
|
-
"0"
|
|
365
|
-
],
|
|
366
|
-
[
|
|
367
|
-
"ck",
|
|
368
|
-
// Cook Islands
|
|
369
|
-
"682"
|
|
370
|
-
],
|
|
371
|
-
[
|
|
372
|
-
"cr",
|
|
373
|
-
// Costa Rica
|
|
374
|
-
"506"
|
|
375
|
-
],
|
|
376
|
-
[
|
|
377
|
-
"ci",
|
|
378
|
-
// Côte d'Ivoire
|
|
379
|
-
"225"
|
|
380
|
-
],
|
|
381
|
-
[
|
|
382
|
-
"hr",
|
|
383
|
-
// Croatia
|
|
384
|
-
"385",
|
|
385
|
-
0,
|
|
386
|
-
null,
|
|
387
|
-
"0"
|
|
388
|
-
],
|
|
389
|
-
[
|
|
390
|
-
"cu",
|
|
391
|
-
// Cuba
|
|
392
|
-
"53",
|
|
393
|
-
0,
|
|
394
|
-
null,
|
|
395
|
-
"0"
|
|
396
|
-
],
|
|
397
|
-
[
|
|
398
|
-
"cw",
|
|
399
|
-
// Curaçao
|
|
400
|
-
"599",
|
|
401
|
-
0
|
|
402
|
-
],
|
|
403
|
-
[
|
|
404
|
-
"cy",
|
|
405
|
-
// Cyprus
|
|
406
|
-
"357"
|
|
407
|
-
],
|
|
408
|
-
[
|
|
409
|
-
"cz",
|
|
410
|
-
// Czech Republic
|
|
411
|
-
"420"
|
|
412
|
-
],
|
|
413
|
-
[
|
|
414
|
-
"dk",
|
|
415
|
-
// Denmark
|
|
416
|
-
"45"
|
|
417
|
-
],
|
|
418
|
-
[
|
|
419
|
-
"dj",
|
|
420
|
-
// Djibouti
|
|
421
|
-
"253"
|
|
422
|
-
],
|
|
423
|
-
[
|
|
424
|
-
"dm",
|
|
425
|
-
// Dominica
|
|
426
|
-
"1",
|
|
427
|
-
13,
|
|
428
|
-
["767"],
|
|
429
|
-
"1"
|
|
430
|
-
],
|
|
431
|
-
[
|
|
432
|
-
"do",
|
|
433
|
-
// Dominican Republic
|
|
434
|
-
"1",
|
|
435
|
-
2,
|
|
436
|
-
["809", "829", "849"],
|
|
437
|
-
"1"
|
|
438
|
-
],
|
|
439
|
-
[
|
|
440
|
-
"ec",
|
|
441
|
-
// Ecuador
|
|
442
|
-
"593",
|
|
443
|
-
0,
|
|
444
|
-
null,
|
|
445
|
-
"0"
|
|
446
|
-
],
|
|
447
|
-
[
|
|
448
|
-
"eg",
|
|
449
|
-
// Egypt
|
|
450
|
-
"20",
|
|
451
|
-
0,
|
|
452
|
-
null,
|
|
453
|
-
"0"
|
|
454
|
-
],
|
|
455
|
-
[
|
|
456
|
-
"sv",
|
|
457
|
-
// El Salvador
|
|
458
|
-
"503"
|
|
459
|
-
],
|
|
460
|
-
[
|
|
461
|
-
"gq",
|
|
462
|
-
// Equatorial Guinea
|
|
463
|
-
"240"
|
|
464
|
-
],
|
|
465
|
-
[
|
|
466
|
-
"er",
|
|
467
|
-
// Eritrea
|
|
468
|
-
"291",
|
|
469
|
-
0,
|
|
470
|
-
null,
|
|
471
|
-
"0"
|
|
472
|
-
],
|
|
473
|
-
[
|
|
474
|
-
"ee",
|
|
475
|
-
// Estonia
|
|
476
|
-
"372"
|
|
477
|
-
],
|
|
478
|
-
[
|
|
479
|
-
"sz",
|
|
480
|
-
// Eswatini
|
|
481
|
-
"268"
|
|
482
|
-
],
|
|
483
|
-
[
|
|
484
|
-
"et",
|
|
485
|
-
// Ethiopia
|
|
486
|
-
"251",
|
|
487
|
-
0,
|
|
488
|
-
null,
|
|
489
|
-
"0"
|
|
490
|
-
],
|
|
491
|
-
[
|
|
492
|
-
"fk",
|
|
493
|
-
// Falkland Islands (Malvinas)
|
|
494
|
-
"500"
|
|
495
|
-
],
|
|
496
|
-
[
|
|
497
|
-
"fo",
|
|
498
|
-
// Faroe Islands
|
|
499
|
-
"298"
|
|
500
|
-
],
|
|
501
|
-
[
|
|
502
|
-
"fj",
|
|
503
|
-
// Fiji
|
|
504
|
-
"679"
|
|
505
|
-
],
|
|
506
|
-
[
|
|
507
|
-
"fi",
|
|
508
|
-
// Finland
|
|
509
|
-
"358",
|
|
510
|
-
0,
|
|
511
|
-
["4"],
|
|
512
|
-
// (mobile range shared with AX)
|
|
513
|
-
"0"
|
|
514
|
-
],
|
|
515
|
-
[
|
|
516
|
-
"fr",
|
|
517
|
-
// France
|
|
518
|
-
"33",
|
|
519
|
-
0,
|
|
520
|
-
null,
|
|
521
|
-
"0"
|
|
522
|
-
],
|
|
523
|
-
[
|
|
524
|
-
"gf",
|
|
525
|
-
// French Guiana
|
|
526
|
-
"594",
|
|
527
|
-
0,
|
|
528
|
-
null,
|
|
529
|
-
"0"
|
|
530
|
-
],
|
|
531
|
-
[
|
|
532
|
-
"pf",
|
|
533
|
-
// French Polynesia
|
|
534
|
-
"689"
|
|
535
|
-
],
|
|
536
|
-
[
|
|
537
|
-
"ga",
|
|
538
|
-
// Gabon
|
|
539
|
-
"241"
|
|
540
|
-
],
|
|
541
|
-
[
|
|
542
|
-
"gm",
|
|
543
|
-
// Gambia
|
|
544
|
-
"220"
|
|
545
|
-
],
|
|
546
|
-
[
|
|
547
|
-
"ge",
|
|
548
|
-
// Georgia
|
|
549
|
-
"995",
|
|
550
|
-
0,
|
|
551
|
-
null,
|
|
552
|
-
"0"
|
|
553
|
-
],
|
|
554
|
-
[
|
|
555
|
-
"de",
|
|
556
|
-
// Germany
|
|
557
|
-
"49",
|
|
558
|
-
0,
|
|
559
|
-
null,
|
|
560
|
-
"0"
|
|
561
|
-
],
|
|
562
|
-
[
|
|
563
|
-
"gh",
|
|
564
|
-
// Ghana
|
|
565
|
-
"233",
|
|
566
|
-
0,
|
|
567
|
-
null,
|
|
568
|
-
"0"
|
|
569
|
-
],
|
|
570
|
-
[
|
|
571
|
-
"gi",
|
|
572
|
-
// Gibraltar
|
|
573
|
-
"350"
|
|
574
|
-
],
|
|
575
|
-
[
|
|
576
|
-
"gr",
|
|
577
|
-
// Greece
|
|
578
|
-
"30"
|
|
579
|
-
],
|
|
580
|
-
[
|
|
581
|
-
"gl",
|
|
582
|
-
// Greenland
|
|
583
|
-
"299"
|
|
584
|
-
],
|
|
585
|
-
[
|
|
586
|
-
"gd",
|
|
587
|
-
// Grenada
|
|
588
|
-
"1",
|
|
589
|
-
14,
|
|
590
|
-
["473"],
|
|
591
|
-
"1"
|
|
592
|
-
],
|
|
593
|
-
[
|
|
594
|
-
"gp",
|
|
595
|
-
// Guadeloupe
|
|
596
|
-
"590",
|
|
597
|
-
0,
|
|
598
|
-
null,
|
|
599
|
-
"0"
|
|
600
|
-
],
|
|
601
|
-
[
|
|
602
|
-
"gu",
|
|
603
|
-
// Guam
|
|
604
|
-
"1",
|
|
605
|
-
15,
|
|
606
|
-
["671"],
|
|
607
|
-
"1"
|
|
608
|
-
],
|
|
609
|
-
[
|
|
610
|
-
"gt",
|
|
611
|
-
// Guatemala
|
|
612
|
-
"502"
|
|
613
|
-
],
|
|
614
|
-
[
|
|
615
|
-
"gg",
|
|
616
|
-
// Guernsey
|
|
617
|
-
"44",
|
|
618
|
-
1,
|
|
619
|
-
["1481", "7781", "7839", "7911"],
|
|
620
|
-
"0"
|
|
621
|
-
],
|
|
622
|
-
[
|
|
623
|
-
"gn",
|
|
624
|
-
// Guinea
|
|
625
|
-
"224"
|
|
626
|
-
],
|
|
627
|
-
[
|
|
628
|
-
"gw",
|
|
629
|
-
// Guinea-Bissau
|
|
630
|
-
"245"
|
|
631
|
-
],
|
|
632
|
-
[
|
|
633
|
-
"gy",
|
|
634
|
-
// Guyana
|
|
635
|
-
"592"
|
|
636
|
-
],
|
|
637
|
-
[
|
|
638
|
-
"ht",
|
|
639
|
-
// Haiti
|
|
640
|
-
"509"
|
|
641
|
-
],
|
|
642
|
-
[
|
|
643
|
-
"hn",
|
|
644
|
-
// Honduras
|
|
645
|
-
"504"
|
|
646
|
-
],
|
|
647
|
-
[
|
|
648
|
-
"hk",
|
|
649
|
-
// Hong Kong SAR China
|
|
650
|
-
"852"
|
|
651
|
-
],
|
|
652
|
-
[
|
|
653
|
-
"hu",
|
|
654
|
-
// Hungary
|
|
655
|
-
"36",
|
|
656
|
-
0,
|
|
657
|
-
null,
|
|
658
|
-
"06"
|
|
659
|
-
],
|
|
660
|
-
[
|
|
661
|
-
"is",
|
|
662
|
-
// Iceland
|
|
663
|
-
"354"
|
|
664
|
-
],
|
|
665
|
-
[
|
|
666
|
-
"in",
|
|
667
|
-
// India
|
|
668
|
-
"91",
|
|
669
|
-
0,
|
|
670
|
-
null,
|
|
671
|
-
"0"
|
|
672
|
-
],
|
|
673
|
-
[
|
|
674
|
-
"id",
|
|
675
|
-
// Indonesia
|
|
676
|
-
"62",
|
|
677
|
-
0,
|
|
678
|
-
null,
|
|
679
|
-
"0"
|
|
680
|
-
],
|
|
681
|
-
[
|
|
682
|
-
"ir",
|
|
683
|
-
// Iran
|
|
684
|
-
"98",
|
|
685
|
-
0,
|
|
686
|
-
null,
|
|
687
|
-
"0"
|
|
688
|
-
],
|
|
689
|
-
[
|
|
690
|
-
"iq",
|
|
691
|
-
// Iraq
|
|
692
|
-
"964",
|
|
693
|
-
0,
|
|
694
|
-
null,
|
|
695
|
-
"0"
|
|
696
|
-
],
|
|
697
|
-
[
|
|
698
|
-
"ie",
|
|
699
|
-
// Ireland
|
|
700
|
-
"353",
|
|
701
|
-
0,
|
|
702
|
-
null,
|
|
703
|
-
"0"
|
|
704
|
-
],
|
|
705
|
-
[
|
|
706
|
-
"im",
|
|
707
|
-
// Isle of Man
|
|
708
|
-
"44",
|
|
709
|
-
2,
|
|
710
|
-
["1624", "74576", "7524", "7624", "7924"],
|
|
711
|
-
"0"
|
|
712
|
-
],
|
|
713
|
-
[
|
|
714
|
-
"il",
|
|
715
|
-
// Israel
|
|
716
|
-
"972",
|
|
717
|
-
0,
|
|
718
|
-
null,
|
|
719
|
-
"0"
|
|
720
|
-
],
|
|
721
|
-
[
|
|
722
|
-
"it",
|
|
723
|
-
// Italy
|
|
724
|
-
"39",
|
|
725
|
-
0,
|
|
726
|
-
["3"]
|
|
727
|
-
// (mobile range shared with VA)
|
|
728
|
-
],
|
|
729
|
-
[
|
|
730
|
-
"jm",
|
|
731
|
-
// Jamaica
|
|
732
|
-
"1",
|
|
733
|
-
4,
|
|
734
|
-
["658", "876"],
|
|
735
|
-
"1"
|
|
736
|
-
],
|
|
737
|
-
[
|
|
738
|
-
"jp",
|
|
739
|
-
// Japan
|
|
740
|
-
"81",
|
|
741
|
-
0,
|
|
742
|
-
null,
|
|
743
|
-
"0"
|
|
744
|
-
],
|
|
745
|
-
[
|
|
746
|
-
"je",
|
|
747
|
-
// Jersey
|
|
748
|
-
"44",
|
|
749
|
-
3,
|
|
750
|
-
["1534", "7509", "7700", "7797", "7829", "7937"],
|
|
751
|
-
"0"
|
|
752
|
-
],
|
|
753
|
-
[
|
|
754
|
-
"jo",
|
|
755
|
-
// Jordan
|
|
756
|
-
"962",
|
|
757
|
-
0,
|
|
758
|
-
null,
|
|
759
|
-
"0"
|
|
760
|
-
],
|
|
761
|
-
[
|
|
762
|
-
"kz",
|
|
763
|
-
// Kazakhstan
|
|
764
|
-
"7",
|
|
765
|
-
1,
|
|
766
|
-
["33", "7"],
|
|
767
|
-
// (33 is shared with RU)
|
|
768
|
-
"8"
|
|
769
|
-
],
|
|
770
|
-
[
|
|
771
|
-
"ke",
|
|
772
|
-
// Kenya
|
|
773
|
-
"254",
|
|
774
|
-
0,
|
|
775
|
-
null,
|
|
776
|
-
"0"
|
|
777
|
-
],
|
|
778
|
-
[
|
|
779
|
-
"ki",
|
|
780
|
-
// Kiribati
|
|
781
|
-
"686",
|
|
782
|
-
0,
|
|
783
|
-
null,
|
|
784
|
-
"0"
|
|
785
|
-
],
|
|
786
|
-
[
|
|
787
|
-
"xk",
|
|
788
|
-
// Kosovo
|
|
789
|
-
"383",
|
|
790
|
-
0,
|
|
791
|
-
null,
|
|
792
|
-
"0"
|
|
793
|
-
],
|
|
794
|
-
[
|
|
795
|
-
"kw",
|
|
796
|
-
// Kuwait
|
|
797
|
-
"965"
|
|
798
|
-
],
|
|
799
|
-
[
|
|
800
|
-
"kg",
|
|
801
|
-
// Kyrgyzstan
|
|
802
|
-
"996",
|
|
803
|
-
0,
|
|
804
|
-
null,
|
|
805
|
-
"0"
|
|
806
|
-
],
|
|
807
|
-
[
|
|
808
|
-
"la",
|
|
809
|
-
// Laos
|
|
810
|
-
"856",
|
|
811
|
-
0,
|
|
812
|
-
null,
|
|
813
|
-
"0"
|
|
814
|
-
],
|
|
815
|
-
[
|
|
816
|
-
"lv",
|
|
817
|
-
// Latvia
|
|
818
|
-
"371"
|
|
819
|
-
],
|
|
820
|
-
[
|
|
821
|
-
"lb",
|
|
822
|
-
// Lebanon
|
|
823
|
-
"961",
|
|
824
|
-
0,
|
|
825
|
-
null,
|
|
826
|
-
"0"
|
|
827
|
-
],
|
|
828
|
-
[
|
|
829
|
-
"ls",
|
|
830
|
-
// Lesotho
|
|
831
|
-
"266"
|
|
832
|
-
],
|
|
833
|
-
[
|
|
834
|
-
"lr",
|
|
835
|
-
// Liberia
|
|
836
|
-
"231",
|
|
837
|
-
0,
|
|
838
|
-
null,
|
|
839
|
-
"0"
|
|
840
|
-
],
|
|
841
|
-
[
|
|
842
|
-
"ly",
|
|
843
|
-
// Libya
|
|
844
|
-
"218",
|
|
845
|
-
0,
|
|
846
|
-
null,
|
|
847
|
-
"0"
|
|
848
|
-
],
|
|
849
|
-
[
|
|
850
|
-
"li",
|
|
851
|
-
// Liechtenstein
|
|
852
|
-
"423",
|
|
853
|
-
0,
|
|
854
|
-
null,
|
|
855
|
-
"0"
|
|
856
|
-
],
|
|
857
|
-
[
|
|
858
|
-
"lt",
|
|
859
|
-
// Lithuania
|
|
860
|
-
"370",
|
|
861
|
-
0,
|
|
862
|
-
null,
|
|
863
|
-
"0"
|
|
864
|
-
],
|
|
865
|
-
[
|
|
866
|
-
"lu",
|
|
867
|
-
// Luxembourg
|
|
868
|
-
"352"
|
|
869
|
-
],
|
|
870
|
-
[
|
|
871
|
-
"mo",
|
|
872
|
-
// Macao SAR China
|
|
873
|
-
"853"
|
|
874
|
-
],
|
|
875
|
-
[
|
|
876
|
-
"mg",
|
|
877
|
-
// Madagascar
|
|
878
|
-
"261",
|
|
879
|
-
0,
|
|
880
|
-
null,
|
|
881
|
-
"0"
|
|
882
|
-
],
|
|
883
|
-
[
|
|
884
|
-
"mw",
|
|
885
|
-
// Malawi
|
|
886
|
-
"265",
|
|
887
|
-
0,
|
|
888
|
-
null,
|
|
889
|
-
"0"
|
|
890
|
-
],
|
|
891
|
-
[
|
|
892
|
-
"my",
|
|
893
|
-
// Malaysia
|
|
894
|
-
"60",
|
|
895
|
-
0,
|
|
896
|
-
null,
|
|
897
|
-
"0"
|
|
898
|
-
],
|
|
899
|
-
[
|
|
900
|
-
"mv",
|
|
901
|
-
// Maldives
|
|
902
|
-
"960"
|
|
903
|
-
],
|
|
904
|
-
[
|
|
905
|
-
"ml",
|
|
906
|
-
// Mali
|
|
907
|
-
"223"
|
|
908
|
-
],
|
|
909
|
-
[
|
|
910
|
-
"mt",
|
|
911
|
-
// Malta
|
|
912
|
-
"356"
|
|
913
|
-
],
|
|
914
|
-
[
|
|
915
|
-
"mh",
|
|
916
|
-
// Marshall Islands
|
|
917
|
-
"692",
|
|
918
|
-
0,
|
|
919
|
-
null,
|
|
920
|
-
"1"
|
|
921
|
-
],
|
|
922
|
-
[
|
|
923
|
-
"mq",
|
|
924
|
-
// Martinique
|
|
925
|
-
"596",
|
|
926
|
-
0,
|
|
927
|
-
null,
|
|
928
|
-
"0"
|
|
929
|
-
],
|
|
930
|
-
[
|
|
931
|
-
"mr",
|
|
932
|
-
// Mauritania
|
|
933
|
-
"222"
|
|
934
|
-
],
|
|
935
|
-
[
|
|
936
|
-
"mu",
|
|
937
|
-
// Mauritius
|
|
938
|
-
"230"
|
|
939
|
-
],
|
|
940
|
-
[
|
|
941
|
-
"yt",
|
|
942
|
-
// Mayotte
|
|
943
|
-
"262",
|
|
944
|
-
1,
|
|
945
|
-
["269", "639"],
|
|
946
|
-
"0"
|
|
947
|
-
],
|
|
948
|
-
[
|
|
949
|
-
"mx",
|
|
950
|
-
// Mexico
|
|
951
|
-
"52"
|
|
952
|
-
],
|
|
953
|
-
[
|
|
954
|
-
"fm",
|
|
955
|
-
// Micronesia
|
|
956
|
-
"691"
|
|
957
|
-
],
|
|
958
|
-
[
|
|
959
|
-
"md",
|
|
960
|
-
// Moldova
|
|
961
|
-
"373",
|
|
962
|
-
0,
|
|
963
|
-
null,
|
|
964
|
-
"0"
|
|
965
|
-
],
|
|
966
|
-
[
|
|
967
|
-
"mc",
|
|
968
|
-
// Monaco
|
|
969
|
-
"377",
|
|
970
|
-
0,
|
|
971
|
-
null,
|
|
972
|
-
"0"
|
|
973
|
-
],
|
|
974
|
-
[
|
|
975
|
-
"mn",
|
|
976
|
-
// Mongolia
|
|
977
|
-
"976",
|
|
978
|
-
0,
|
|
979
|
-
null,
|
|
980
|
-
"0"
|
|
981
|
-
],
|
|
982
|
-
[
|
|
983
|
-
"me",
|
|
984
|
-
// Montenegro
|
|
985
|
-
"382",
|
|
986
|
-
0,
|
|
987
|
-
null,
|
|
988
|
-
"0"
|
|
989
|
-
],
|
|
990
|
-
[
|
|
991
|
-
"ms",
|
|
992
|
-
// Montserrat
|
|
993
|
-
"1",
|
|
994
|
-
16,
|
|
995
|
-
["664"],
|
|
996
|
-
"1"
|
|
997
|
-
],
|
|
998
|
-
[
|
|
999
|
-
"ma",
|
|
1000
|
-
// Morocco
|
|
1001
|
-
"212",
|
|
1002
|
-
0,
|
|
1003
|
-
["6", "7"],
|
|
1004
|
-
// (mobile ranges shared with EH)
|
|
1005
|
-
"0"
|
|
1006
|
-
],
|
|
1007
|
-
[
|
|
1008
|
-
"mz",
|
|
1009
|
-
// Mozambique
|
|
1010
|
-
"258"
|
|
1011
|
-
],
|
|
1012
|
-
[
|
|
1013
|
-
"mm",
|
|
1014
|
-
// Myanmar (Burma)
|
|
1015
|
-
"95",
|
|
1016
|
-
0,
|
|
1017
|
-
null,
|
|
1018
|
-
"0"
|
|
1019
|
-
],
|
|
1020
|
-
[
|
|
1021
|
-
"na",
|
|
1022
|
-
// Namibia
|
|
1023
|
-
"264",
|
|
1024
|
-
0,
|
|
1025
|
-
null,
|
|
1026
|
-
"0"
|
|
1027
|
-
],
|
|
1028
|
-
[
|
|
1029
|
-
"nr",
|
|
1030
|
-
// Nauru
|
|
1031
|
-
"674"
|
|
1032
|
-
],
|
|
1033
|
-
[
|
|
1034
|
-
"np",
|
|
1035
|
-
// Nepal
|
|
1036
|
-
"977",
|
|
1037
|
-
0,
|
|
1038
|
-
null,
|
|
1039
|
-
"0"
|
|
1040
|
-
],
|
|
1041
|
-
[
|
|
1042
|
-
"nl",
|
|
1043
|
-
// Netherlands
|
|
1044
|
-
"31",
|
|
1045
|
-
0,
|
|
1046
|
-
null,
|
|
1047
|
-
"0"
|
|
1048
|
-
],
|
|
1049
|
-
[
|
|
1050
|
-
"nc",
|
|
1051
|
-
// New Caledonia
|
|
1052
|
-
"687"
|
|
1053
|
-
],
|
|
1054
|
-
[
|
|
1055
|
-
"nz",
|
|
1056
|
-
// New Zealand
|
|
1057
|
-
"64",
|
|
1058
|
-
0,
|
|
1059
|
-
null,
|
|
1060
|
-
"0"
|
|
1061
|
-
],
|
|
1062
|
-
[
|
|
1063
|
-
"ni",
|
|
1064
|
-
// Nicaragua
|
|
1065
|
-
"505"
|
|
1066
|
-
],
|
|
1067
|
-
[
|
|
1068
|
-
"ne",
|
|
1069
|
-
// Niger
|
|
1070
|
-
"227"
|
|
1071
|
-
],
|
|
1072
|
-
[
|
|
1073
|
-
"ng",
|
|
1074
|
-
// Nigeria
|
|
1075
|
-
"234",
|
|
1076
|
-
0,
|
|
1077
|
-
null,
|
|
1078
|
-
"0"
|
|
1079
|
-
],
|
|
1080
|
-
[
|
|
1081
|
-
"nu",
|
|
1082
|
-
// Niue
|
|
1083
|
-
"683"
|
|
1084
|
-
],
|
|
1085
|
-
[
|
|
1086
|
-
"nf",
|
|
1087
|
-
// Norfolk Island
|
|
1088
|
-
"672"
|
|
1089
|
-
],
|
|
1090
|
-
[
|
|
1091
|
-
"kp",
|
|
1092
|
-
// North Korea
|
|
1093
|
-
"850",
|
|
1094
|
-
0,
|
|
1095
|
-
null,
|
|
1096
|
-
"0"
|
|
1097
|
-
],
|
|
1098
|
-
[
|
|
1099
|
-
"mk",
|
|
1100
|
-
// North Macedonia
|
|
1101
|
-
"389",
|
|
1102
|
-
0,
|
|
1103
|
-
null,
|
|
1104
|
-
"0"
|
|
1105
|
-
],
|
|
1106
|
-
[
|
|
1107
|
-
"mp",
|
|
1108
|
-
// Northern Mariana Islands
|
|
1109
|
-
"1",
|
|
1110
|
-
17,
|
|
1111
|
-
["670"],
|
|
1112
|
-
"1"
|
|
1113
|
-
],
|
|
1114
|
-
[
|
|
1115
|
-
"no",
|
|
1116
|
-
// Norway
|
|
1117
|
-
"47",
|
|
1118
|
-
0,
|
|
1119
|
-
["4", "9"]
|
|
1120
|
-
// (mobile ranges shared with SJ)
|
|
1121
|
-
],
|
|
1122
|
-
[
|
|
1123
|
-
"om",
|
|
1124
|
-
// Oman
|
|
1125
|
-
"968"
|
|
1126
|
-
],
|
|
1127
|
-
[
|
|
1128
|
-
"pk",
|
|
1129
|
-
// Pakistan
|
|
1130
|
-
"92",
|
|
1131
|
-
0,
|
|
1132
|
-
null,
|
|
1133
|
-
"0"
|
|
1134
|
-
],
|
|
1135
|
-
[
|
|
1136
|
-
"pw",
|
|
1137
|
-
// Palau
|
|
1138
|
-
"680"
|
|
1139
|
-
],
|
|
1140
|
-
[
|
|
1141
|
-
"ps",
|
|
1142
|
-
// Palestinian Territories
|
|
1143
|
-
"970",
|
|
1144
|
-
0,
|
|
1145
|
-
null,
|
|
1146
|
-
"0"
|
|
1147
|
-
],
|
|
1148
|
-
[
|
|
1149
|
-
"pa",
|
|
1150
|
-
// Panama
|
|
1151
|
-
"507"
|
|
1152
|
-
],
|
|
1153
|
-
[
|
|
1154
|
-
"pg",
|
|
1155
|
-
// Papua New Guinea
|
|
1156
|
-
"675"
|
|
1157
|
-
],
|
|
1158
|
-
[
|
|
1159
|
-
"py",
|
|
1160
|
-
// Paraguay
|
|
1161
|
-
"595",
|
|
1162
|
-
0,
|
|
1163
|
-
null,
|
|
1164
|
-
"0"
|
|
1165
|
-
],
|
|
1166
|
-
[
|
|
1167
|
-
"pe",
|
|
1168
|
-
// Peru
|
|
1169
|
-
"51",
|
|
1170
|
-
0,
|
|
1171
|
-
null,
|
|
1172
|
-
"0"
|
|
1173
|
-
],
|
|
1174
|
-
[
|
|
1175
|
-
"ph",
|
|
1176
|
-
// Philippines
|
|
1177
|
-
"63",
|
|
1178
|
-
0,
|
|
1179
|
-
null,
|
|
1180
|
-
"0"
|
|
1181
|
-
],
|
|
1182
|
-
[
|
|
1183
|
-
"pl",
|
|
1184
|
-
// Poland
|
|
1185
|
-
"48"
|
|
1186
|
-
],
|
|
1187
|
-
[
|
|
1188
|
-
"pt",
|
|
1189
|
-
// Portugal
|
|
1190
|
-
"351"
|
|
1191
|
-
],
|
|
1192
|
-
[
|
|
1193
|
-
"pr",
|
|
1194
|
-
// Puerto Rico
|
|
1195
|
-
"1",
|
|
1196
|
-
3,
|
|
1197
|
-
["787", "939"],
|
|
1198
|
-
"1"
|
|
1199
|
-
],
|
|
1200
|
-
[
|
|
1201
|
-
"qa",
|
|
1202
|
-
// Qatar
|
|
1203
|
-
"974"
|
|
1204
|
-
],
|
|
1205
|
-
[
|
|
1206
|
-
"re",
|
|
1207
|
-
// Réunion
|
|
1208
|
-
"262",
|
|
1209
|
-
0,
|
|
1210
|
-
null,
|
|
1211
|
-
"0"
|
|
1212
|
-
],
|
|
1213
|
-
[
|
|
1214
|
-
"ro",
|
|
1215
|
-
// Romania
|
|
1216
|
-
"40",
|
|
1217
|
-
0,
|
|
1218
|
-
null,
|
|
1219
|
-
"0"
|
|
1220
|
-
],
|
|
1221
|
-
[
|
|
1222
|
-
"ru",
|
|
1223
|
-
// Russia
|
|
1224
|
-
"7",
|
|
1225
|
-
0,
|
|
1226
|
-
["33"],
|
|
1227
|
-
// (shared with KZ)
|
|
1228
|
-
"8"
|
|
1229
|
-
],
|
|
1230
|
-
[
|
|
1231
|
-
"rw",
|
|
1232
|
-
// Rwanda
|
|
1233
|
-
"250",
|
|
1234
|
-
0,
|
|
1235
|
-
null,
|
|
1236
|
-
"0"
|
|
1237
|
-
],
|
|
1238
|
-
[
|
|
1239
|
-
"ws",
|
|
1240
|
-
// Samoa
|
|
1241
|
-
"685"
|
|
1242
|
-
],
|
|
1243
|
-
[
|
|
1244
|
-
"sm",
|
|
1245
|
-
// San Marino
|
|
1246
|
-
"378"
|
|
1247
|
-
],
|
|
1248
|
-
[
|
|
1249
|
-
"st",
|
|
1250
|
-
// São Tomé & Príncipe
|
|
1251
|
-
"239"
|
|
1252
|
-
],
|
|
1253
|
-
[
|
|
1254
|
-
"sa",
|
|
1255
|
-
// Saudi Arabia
|
|
1256
|
-
"966",
|
|
1257
|
-
0,
|
|
1258
|
-
null,
|
|
1259
|
-
"0"
|
|
1260
|
-
],
|
|
1261
|
-
[
|
|
1262
|
-
"sn",
|
|
1263
|
-
// Senegal
|
|
1264
|
-
"221"
|
|
1265
|
-
],
|
|
1266
|
-
[
|
|
1267
|
-
"rs",
|
|
1268
|
-
// Serbia
|
|
1269
|
-
"381",
|
|
1270
|
-
0,
|
|
1271
|
-
null,
|
|
1272
|
-
"0"
|
|
1273
|
-
],
|
|
1274
|
-
[
|
|
1275
|
-
"sc",
|
|
1276
|
-
// Seychelles
|
|
1277
|
-
"248"
|
|
1278
|
-
],
|
|
1279
|
-
[
|
|
1280
|
-
"sl",
|
|
1281
|
-
// Sierra Leone
|
|
1282
|
-
"232",
|
|
1283
|
-
0,
|
|
1284
|
-
null,
|
|
1285
|
-
"0"
|
|
1286
|
-
],
|
|
1287
|
-
[
|
|
1288
|
-
"sg",
|
|
1289
|
-
// Singapore
|
|
1290
|
-
"65"
|
|
1291
|
-
],
|
|
1292
|
-
[
|
|
1293
|
-
"sx",
|
|
1294
|
-
// Sint Maarten
|
|
1295
|
-
"1",
|
|
1296
|
-
21,
|
|
1297
|
-
["721"],
|
|
1298
|
-
"1"
|
|
1299
|
-
],
|
|
1300
|
-
[
|
|
1301
|
-
"sk",
|
|
1302
|
-
// Slovakia
|
|
1303
|
-
"421",
|
|
1304
|
-
0,
|
|
1305
|
-
null,
|
|
1306
|
-
"0"
|
|
1307
|
-
],
|
|
1308
|
-
[
|
|
1309
|
-
"si",
|
|
1310
|
-
// Slovenia
|
|
1311
|
-
"386",
|
|
1312
|
-
0,
|
|
1313
|
-
null,
|
|
1314
|
-
"0"
|
|
1315
|
-
],
|
|
1316
|
-
[
|
|
1317
|
-
"sb",
|
|
1318
|
-
// Solomon Islands
|
|
1319
|
-
"677"
|
|
1320
|
-
],
|
|
1321
|
-
[
|
|
1322
|
-
"so",
|
|
1323
|
-
// Somalia
|
|
1324
|
-
"252",
|
|
1325
|
-
0,
|
|
1326
|
-
null,
|
|
1327
|
-
"0"
|
|
1328
|
-
],
|
|
1329
|
-
[
|
|
1330
|
-
"za",
|
|
1331
|
-
// South Africa
|
|
1332
|
-
"27",
|
|
1333
|
-
0,
|
|
1334
|
-
null,
|
|
1335
|
-
"0"
|
|
1336
|
-
],
|
|
1337
|
-
[
|
|
1338
|
-
"kr",
|
|
1339
|
-
// South Korea
|
|
1340
|
-
"82",
|
|
1341
|
-
0,
|
|
1342
|
-
null,
|
|
1343
|
-
"0"
|
|
1344
|
-
],
|
|
1345
|
-
[
|
|
1346
|
-
"ss",
|
|
1347
|
-
// South Sudan
|
|
1348
|
-
"211",
|
|
1349
|
-
0,
|
|
1350
|
-
null,
|
|
1351
|
-
"0"
|
|
1352
|
-
],
|
|
1353
|
-
[
|
|
1354
|
-
"es",
|
|
1355
|
-
// Spain
|
|
1356
|
-
"34"
|
|
1357
|
-
],
|
|
1358
|
-
[
|
|
1359
|
-
"lk",
|
|
1360
|
-
// Sri Lanka
|
|
1361
|
-
"94",
|
|
1362
|
-
0,
|
|
1363
|
-
null,
|
|
1364
|
-
"0"
|
|
1365
|
-
],
|
|
1366
|
-
[
|
|
1367
|
-
"bl",
|
|
1368
|
-
// St. Barthélemy
|
|
1369
|
-
"590",
|
|
1370
|
-
1,
|
|
1371
|
-
null,
|
|
1372
|
-
"0"
|
|
1373
|
-
],
|
|
1374
|
-
[
|
|
1375
|
-
"sh",
|
|
1376
|
-
// St. Helena
|
|
1377
|
-
"290"
|
|
1378
|
-
],
|
|
1379
|
-
[
|
|
1380
|
-
"kn",
|
|
1381
|
-
// St. Kitts & Nevis
|
|
1382
|
-
"1",
|
|
1383
|
-
18,
|
|
1384
|
-
["869"],
|
|
1385
|
-
"1"
|
|
1386
|
-
],
|
|
1387
|
-
[
|
|
1388
|
-
"lc",
|
|
1389
|
-
// St. Lucia
|
|
1390
|
-
"1",
|
|
1391
|
-
19,
|
|
1392
|
-
["758"],
|
|
1393
|
-
"1"
|
|
1394
|
-
],
|
|
1395
|
-
[
|
|
1396
|
-
"mf",
|
|
1397
|
-
// St. Martin
|
|
1398
|
-
"590",
|
|
1399
|
-
2,
|
|
1400
|
-
null,
|
|
1401
|
-
"0"
|
|
1402
|
-
],
|
|
1403
|
-
[
|
|
1404
|
-
"pm",
|
|
1405
|
-
// St. Pierre & Miquelon
|
|
1406
|
-
"508",
|
|
1407
|
-
0,
|
|
1408
|
-
null,
|
|
1409
|
-
"0"
|
|
1410
|
-
],
|
|
1411
|
-
[
|
|
1412
|
-
"vc",
|
|
1413
|
-
// St. Vincent & Grenadines
|
|
1414
|
-
"1",
|
|
1415
|
-
20,
|
|
1416
|
-
["784"],
|
|
1417
|
-
"1"
|
|
1418
|
-
],
|
|
1419
|
-
[
|
|
1420
|
-
"sd",
|
|
1421
|
-
// Sudan
|
|
1422
|
-
"249",
|
|
1423
|
-
0,
|
|
1424
|
-
null,
|
|
1425
|
-
"0"
|
|
1426
|
-
],
|
|
1427
|
-
[
|
|
1428
|
-
"sr",
|
|
1429
|
-
// Suriname
|
|
1430
|
-
"597"
|
|
1431
|
-
],
|
|
1432
|
-
[
|
|
1433
|
-
"sj",
|
|
1434
|
-
// Svalbard & Jan Mayen
|
|
1435
|
-
"47",
|
|
1436
|
-
1,
|
|
1437
|
-
["4", "79", "9"]
|
|
1438
|
-
// (4 and 9 are mobile ranges shared with NO)
|
|
1439
|
-
],
|
|
1440
|
-
[
|
|
1441
|
-
"se",
|
|
1442
|
-
// Sweden
|
|
1443
|
-
"46",
|
|
1444
|
-
0,
|
|
1445
|
-
null,
|
|
1446
|
-
"0"
|
|
1447
|
-
],
|
|
1448
|
-
[
|
|
1449
|
-
"ch",
|
|
1450
|
-
// Switzerland
|
|
1451
|
-
"41",
|
|
1452
|
-
0,
|
|
1453
|
-
null,
|
|
1454
|
-
"0"
|
|
1455
|
-
],
|
|
1456
|
-
[
|
|
1457
|
-
"sy",
|
|
1458
|
-
// Syria
|
|
1459
|
-
"963",
|
|
1460
|
-
0,
|
|
1461
|
-
null,
|
|
1462
|
-
"0"
|
|
1463
|
-
],
|
|
1464
|
-
[
|
|
1465
|
-
"tw",
|
|
1466
|
-
// Taiwan
|
|
1467
|
-
"886",
|
|
1468
|
-
0,
|
|
1469
|
-
null,
|
|
1470
|
-
"0"
|
|
1471
|
-
],
|
|
1472
|
-
[
|
|
1473
|
-
"tj",
|
|
1474
|
-
// Tajikistan
|
|
1475
|
-
"992"
|
|
1476
|
-
],
|
|
1477
|
-
[
|
|
1478
|
-
"tz",
|
|
1479
|
-
// Tanzania
|
|
1480
|
-
"255",
|
|
1481
|
-
0,
|
|
1482
|
-
null,
|
|
1483
|
-
"0"
|
|
1484
|
-
],
|
|
1485
|
-
[
|
|
1486
|
-
"th",
|
|
1487
|
-
// Thailand
|
|
1488
|
-
"66",
|
|
1489
|
-
0,
|
|
1490
|
-
null,
|
|
1491
|
-
"0"
|
|
1492
|
-
],
|
|
1493
|
-
[
|
|
1494
|
-
"tl",
|
|
1495
|
-
// Timor-Leste
|
|
1496
|
-
"670"
|
|
1497
|
-
],
|
|
1498
|
-
[
|
|
1499
|
-
"tg",
|
|
1500
|
-
// Togo
|
|
1501
|
-
"228"
|
|
1502
|
-
],
|
|
1503
|
-
[
|
|
1504
|
-
"tk",
|
|
1505
|
-
// Tokelau
|
|
1506
|
-
"690"
|
|
1507
|
-
],
|
|
1508
|
-
[
|
|
1509
|
-
"to",
|
|
1510
|
-
// Tonga
|
|
1511
|
-
"676"
|
|
1512
|
-
],
|
|
1513
|
-
[
|
|
1514
|
-
"tt",
|
|
1515
|
-
// Trinidad & Tobago
|
|
1516
|
-
"1",
|
|
1517
|
-
22,
|
|
1518
|
-
["868"],
|
|
1519
|
-
"1"
|
|
1520
|
-
],
|
|
1521
|
-
[
|
|
1522
|
-
"tn",
|
|
1523
|
-
// Tunisia
|
|
1524
|
-
"216"
|
|
1525
|
-
],
|
|
1526
|
-
[
|
|
1527
|
-
"tr",
|
|
1528
|
-
// Turkey
|
|
1529
|
-
"90",
|
|
1530
|
-
0,
|
|
1531
|
-
null,
|
|
1532
|
-
"0"
|
|
1533
|
-
],
|
|
1534
|
-
[
|
|
1535
|
-
"tm",
|
|
1536
|
-
// Turkmenistan
|
|
1537
|
-
"993",
|
|
1538
|
-
0,
|
|
1539
|
-
null,
|
|
1540
|
-
"8"
|
|
1541
|
-
],
|
|
1542
|
-
[
|
|
1543
|
-
"tc",
|
|
1544
|
-
// Turks & Caicos Islands
|
|
1545
|
-
"1",
|
|
1546
|
-
23,
|
|
1547
|
-
["649"],
|
|
1548
|
-
"1"
|
|
1549
|
-
],
|
|
1550
|
-
[
|
|
1551
|
-
"tv",
|
|
1552
|
-
// Tuvalu
|
|
1553
|
-
"688"
|
|
1554
|
-
],
|
|
1555
|
-
[
|
|
1556
|
-
"vi",
|
|
1557
|
-
// U.S. Virgin Islands
|
|
1558
|
-
"1",
|
|
1559
|
-
24,
|
|
1560
|
-
["340"],
|
|
1561
|
-
"1"
|
|
1562
|
-
],
|
|
1563
|
-
[
|
|
1564
|
-
"ug",
|
|
1565
|
-
// Uganda
|
|
1566
|
-
"256",
|
|
1567
|
-
0,
|
|
1568
|
-
null,
|
|
1569
|
-
"0"
|
|
1570
|
-
],
|
|
1571
|
-
[
|
|
1572
|
-
"ua",
|
|
1573
|
-
// Ukraine
|
|
1574
|
-
"380",
|
|
1575
|
-
0,
|
|
1576
|
-
null,
|
|
1577
|
-
"0"
|
|
1578
|
-
],
|
|
1579
|
-
[
|
|
1580
|
-
"ae",
|
|
1581
|
-
// United Arab Emirates
|
|
1582
|
-
"971",
|
|
1583
|
-
0,
|
|
1584
|
-
null,
|
|
1585
|
-
"0"
|
|
1586
|
-
],
|
|
1587
|
-
[
|
|
1588
|
-
"gb",
|
|
1589
|
-
// United Kingdom
|
|
1590
|
-
"44",
|
|
1591
|
-
0,
|
|
1592
|
-
null,
|
|
1593
|
-
"0"
|
|
1594
|
-
],
|
|
1595
|
-
[
|
|
1596
|
-
"us",
|
|
1597
|
-
// United States
|
|
1598
|
-
"1",
|
|
1599
|
-
0,
|
|
1600
|
-
null,
|
|
1601
|
-
"1"
|
|
1602
|
-
],
|
|
1603
|
-
[
|
|
1604
|
-
"uy",
|
|
1605
|
-
// Uruguay
|
|
1606
|
-
"598",
|
|
1607
|
-
0,
|
|
1608
|
-
null,
|
|
1609
|
-
"0"
|
|
1610
|
-
],
|
|
1611
|
-
[
|
|
1612
|
-
"uz",
|
|
1613
|
-
// Uzbekistan
|
|
1614
|
-
"998"
|
|
1615
|
-
],
|
|
1616
|
-
[
|
|
1617
|
-
"vu",
|
|
1618
|
-
// Vanuatu
|
|
1619
|
-
"678"
|
|
1620
|
-
],
|
|
1621
|
-
[
|
|
1622
|
-
"va",
|
|
1623
|
-
// Vatican City
|
|
1624
|
-
"39",
|
|
1625
|
-
1,
|
|
1626
|
-
["06698", "3"]
|
|
1627
|
-
// (3 is a mobile range shared with IT)
|
|
1628
|
-
],
|
|
1629
|
-
[
|
|
1630
|
-
"ve",
|
|
1631
|
-
// Venezuela
|
|
1632
|
-
"58",
|
|
1633
|
-
0,
|
|
1634
|
-
null,
|
|
1635
|
-
"0"
|
|
1636
|
-
],
|
|
1637
|
-
[
|
|
1638
|
-
"vn",
|
|
1639
|
-
// Vietnam
|
|
1640
|
-
"84",
|
|
1641
|
-
0,
|
|
1642
|
-
null,
|
|
1643
|
-
"0"
|
|
1644
|
-
],
|
|
1645
|
-
[
|
|
1646
|
-
"wf",
|
|
1647
|
-
// Wallis & Futuna
|
|
1648
|
-
"681"
|
|
1649
|
-
],
|
|
1650
|
-
[
|
|
1651
|
-
"eh",
|
|
1652
|
-
// Western Sahara
|
|
1653
|
-
"212",
|
|
1654
|
-
1,
|
|
1655
|
-
["5288", "5289", "6", "7"],
|
|
1656
|
-
// (6 and 7 are mobile ranges shared with MA)
|
|
1657
|
-
"0"
|
|
1658
|
-
],
|
|
1659
|
-
[
|
|
1660
|
-
"ye",
|
|
1661
|
-
// Yemen
|
|
1662
|
-
"967",
|
|
1663
|
-
0,
|
|
1664
|
-
null,
|
|
1665
|
-
"0"
|
|
1666
|
-
],
|
|
1667
|
-
[
|
|
1668
|
-
"zm",
|
|
1669
|
-
// Zambia
|
|
1670
|
-
"260",
|
|
1671
|
-
0,
|
|
1672
|
-
null,
|
|
1673
|
-
"0"
|
|
1674
|
-
],
|
|
1675
|
-
[
|
|
1676
|
-
"zw",
|
|
1677
|
-
// Zimbabwe
|
|
1678
|
-
"263",
|
|
1679
|
-
0,
|
|
1680
|
-
null,
|
|
1681
|
-
"0"
|
|
1682
|
-
]
|
|
1683
|
-
], Ct = [];
|
|
1684
|
-
for (const r of ps)
|
|
1685
|
-
Ct.push({
|
|
1686
|
-
name: "",
|
|
1687
|
-
// populated in the plugin
|
|
1688
|
-
iso2: r[0],
|
|
1689
|
-
dialCode: r[1],
|
|
1690
|
-
priority: r[2] || 0,
|
|
1691
|
-
areaCodes: r[3] || null,
|
|
1692
|
-
nodeById: {},
|
|
1693
|
-
// populated by the plugin
|
|
1694
|
-
nationalPrefix: r[4] || null,
|
|
1695
|
-
normalisedName: "",
|
|
1696
|
-
// populated in the plugin
|
|
1697
|
-
initials: "",
|
|
1698
|
-
// populated in the plugin
|
|
1699
|
-
dialCodePlus: ""
|
|
1700
|
-
// populated in the plugin
|
|
1701
|
-
});
|
|
1702
|
-
const fs = new Set(Ct.map((r) => r.iso2)), At = (r) => fs.has(r), Ht = {
|
|
1703
|
-
OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
|
|
1704
|
-
CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
|
|
1705
|
-
COUNTRY_CHANGE: "countrychange",
|
|
1706
|
-
INPUT: "input"
|
|
1707
|
-
// used for synthetic input trigger
|
|
1708
|
-
}, b = {
|
|
1709
|
-
HIDE: "iti__hide",
|
|
1710
|
-
V_HIDE: "iti__v-hide",
|
|
1711
|
-
ARROW_UP: "iti__arrow--up",
|
|
1712
|
-
GLOBE: "iti__globe",
|
|
1713
|
-
FLAG: "iti__flag",
|
|
1714
|
-
LOADING: "iti__loading",
|
|
1715
|
-
COUNTRY_ITEM: "iti__country",
|
|
1716
|
-
HIGHLIGHT: "iti__highlight"
|
|
1717
|
-
}, S = {
|
|
1718
|
-
ARROW_UP: "ArrowUp",
|
|
1719
|
-
ARROW_DOWN: "ArrowDown",
|
|
1720
|
-
SPACE: " ",
|
|
1721
|
-
ENTER: "Enter",
|
|
1722
|
-
ESC: "Escape",
|
|
1723
|
-
TAB: "Tab"
|
|
1724
|
-
}, fe = {
|
|
1725
|
-
PASTE: "insertFromPaste",
|
|
1726
|
-
DELETE_FWD: "deleteContentForward"
|
|
1727
|
-
}, Z = {
|
|
1728
|
-
ALPHA_UNICODE: new RegExp("\\p{L}", "u"),
|
|
1729
|
-
// any kind of letter from any language
|
|
1730
|
-
NON_PLUS_NUMERIC: /[^+0-9]/,
|
|
1731
|
-
// chars that are NOT + or digit
|
|
1732
|
-
NON_PLUS_NUMERIC_GLOBAL: /[^+0-9]/g,
|
|
1733
|
-
// chars that are NOT + or digit (global)
|
|
1734
|
-
HIDDEN_SEARCH_CHAR: /^[a-zA-ZÀ-ÿа-яА-Я ]$/
|
|
1735
|
-
// single acceptable hidden-search char
|
|
1736
|
-
}, De = {
|
|
1737
|
-
SEARCH_DEBOUNCE_MS: 100,
|
|
1738
|
-
HIDDEN_SEARCH_RESET_MS: 1e3
|
|
1739
|
-
}, Ce = {
|
|
1740
|
-
UNKNOWN_NUMBER_TYPE: -99,
|
|
1741
|
-
UNKNOWN_VALIDATION_ERROR: -99
|
|
1742
|
-
}, q = {
|
|
1743
|
-
NARROW_VIEWPORT_WIDTH: 500,
|
|
1744
|
-
// keep in sync with .iti__country-list CSS media query
|
|
1745
|
-
SANE_SELECTED_WITH_DIAL_WIDTH: 78,
|
|
1746
|
-
// px width fallback when separateDialCode enabled
|
|
1747
|
-
SANE_SELECTED_NO_DIAL_WIDTH: 42,
|
|
1748
|
-
// px width fallback when no separate dial code
|
|
1749
|
-
INPUT_PADDING_EXTRA_LEFT: 6,
|
|
1750
|
-
// px gap between selected country container and input text
|
|
1751
|
-
DROPDOWN_MARGIN: 3,
|
|
1752
|
-
// px margin between dropdown and tel input
|
|
1753
|
-
SANE_DROPDOWN_HEIGHT: 200
|
|
1754
|
-
// px height fallback for dropdown
|
|
1755
|
-
}, Le = {
|
|
1756
|
-
NANP: "1"
|
|
1757
|
-
// North American Numbering Plan
|
|
1758
|
-
}, jt = {
|
|
1759
|
-
DIAL_CODE: "44",
|
|
1760
|
-
// +44 United Kingdom
|
|
1761
|
-
MOBILE_PREFIX: "7",
|
|
1762
|
-
// UK mobile numbers start with 7 after national trunk (0) or core section
|
|
1763
|
-
MOBILE_CORE_LENGTH: 10
|
|
1764
|
-
// core number length (excluding dial code / national prefix) for mobiles
|
|
1765
|
-
}, Cs = {
|
|
1766
|
-
ISO2: "us"
|
|
1767
|
-
}, $t = {
|
|
1768
|
-
AGGRESSIVE: "aggressive",
|
|
1769
|
-
POLITE: "polite",
|
|
1770
|
-
OFF: "off"
|
|
1771
|
-
}, bt = {
|
|
1772
|
-
AUTO: "auto"
|
|
1773
|
-
}, ys = [
|
|
1774
|
-
"FIXED_LINE",
|
|
1775
|
-
"MOBILE",
|
|
1776
|
-
"FIXED_LINE_OR_MOBILE",
|
|
1777
|
-
"TOLL_FREE",
|
|
1778
|
-
"PREMIUM_RATE",
|
|
1779
|
-
"SHARED_COST",
|
|
1780
|
-
"VOIP",
|
|
1781
|
-
"PERSONAL_NUMBER",
|
|
1782
|
-
"PAGER",
|
|
1783
|
-
"UAN",
|
|
1784
|
-
"VOICEMAIL",
|
|
1785
|
-
"UNKNOWN"
|
|
1786
|
-
], Mt = new Set(ys), ye = {
|
|
1787
|
-
COUNTRY_CODE: "countryCode",
|
|
1788
|
-
DIAL_CODE: "dialCode"
|
|
1789
|
-
}, N = {
|
|
1790
|
-
EXPANDED: "aria-expanded",
|
|
1791
|
-
LABEL: "aria-label",
|
|
1792
|
-
SELECTED: "aria-selected",
|
|
1793
|
-
ACTIVE_DESCENDANT: "aria-activedescendant",
|
|
1794
|
-
HASPOPUP: "aria-haspopup",
|
|
1795
|
-
CONTROLS: "aria-controls",
|
|
1796
|
-
HIDDEN: "aria-hidden",
|
|
1797
|
-
AUTOCOMPLETE: "aria-autocomplete",
|
|
1798
|
-
MODAL: "aria-modal"
|
|
1799
|
-
}, ms = {
|
|
1800
|
-
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
1801
|
-
noCountrySelected: "Select country",
|
|
1802
|
-
countryListAriaLabel: "List of countries",
|
|
1803
|
-
searchPlaceholder: "Search",
|
|
1804
|
-
clearSearchAriaLabel: "Clear search",
|
|
1805
|
-
searchEmptyState: "No results found",
|
|
1806
|
-
searchSummaryAria(r) {
|
|
1807
|
-
return r === 0 ? "No results found" : r === 1 ? "1 result found" : `${r} results found`;
|
|
1808
|
-
}
|
|
1809
|
-
}, Kt = (r) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(r).matches, Ae = () => Kt(`(max-width: ${q.NARROW_VIEWPORT_WIDTH}px)`), gs = () => {
|
|
1810
|
-
if (typeof navigator < "u" && typeof window < "u") {
|
|
1811
|
-
const r = Kt("(max-height: 600px)"), t = Kt("(pointer: coarse)");
|
|
1812
|
-
return Ae() || t && r;
|
|
1813
|
-
}
|
|
1814
|
-
return !1;
|
|
1815
|
-
}, ce = {
|
|
1816
|
-
//* Whether or not to allow the dropdown.
|
|
1817
|
-
allowDropdown: !0,
|
|
1818
|
-
//* The number type to enforce during validation.
|
|
1819
|
-
allowedNumberTypes: ["MOBILE", "FIXED_LINE"],
|
|
1820
|
-
//* Whether or not to allow extensions after the main number.
|
|
1821
|
-
allowNumberExtensions: !1,
|
|
1822
|
-
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
1823
|
-
allowPhonewords: !1,
|
|
1824
|
-
//* Add a placeholder in the input with an example number for the selected country.
|
|
1825
|
-
autoPlaceholder: $t.POLITE,
|
|
1826
|
-
//* Add a custom class to the (injected) container element.
|
|
1827
|
-
containerClass: "",
|
|
1828
|
-
//* Locale for localising country names via Intl.DisplayNames.
|
|
1829
|
-
countryNameLocale: "en",
|
|
1830
|
-
//* The order of the countries in the dropdown. Defaults to alphabetical.
|
|
1831
|
-
countryOrder: null,
|
|
1832
|
-
//* Add a country search input at the top of the dropdown.
|
|
1833
|
-
countrySearch: !0,
|
|
1834
|
-
//* Modify the auto placeholder.
|
|
1835
|
-
customPlaceholder: null,
|
|
1836
|
-
//* Always show the dropdown
|
|
1837
|
-
dropdownAlwaysOpen: !1,
|
|
1838
|
-
//* Append menu to specified element.
|
|
1839
|
-
dropdownContainer: null,
|
|
1840
|
-
//* Don't display these countries.
|
|
1841
|
-
excludeCountries: [],
|
|
1842
|
-
//* Fix the dropdown width to the input width (rather than being as wide as the longest country name).
|
|
1843
|
-
fixDropdownWidth: !0,
|
|
1844
|
-
//* Format the number as the user types
|
|
1845
|
-
formatAsYouType: !0,
|
|
1846
|
-
//* Format the input value during initialisation and on setNumber.
|
|
1847
|
-
formatOnDisplay: !0,
|
|
1848
|
-
//* geoIp lookup function.
|
|
1849
|
-
geoIpLookup: null,
|
|
1850
|
-
//* Inject a hidden input with the name returned from this function, and on submit, populate it with the result of getNumber.
|
|
1851
|
-
hiddenInput: null,
|
|
1852
|
-
//* Internationalise the plugin text e.g. search input placeholder, country names.
|
|
1853
|
-
i18n: {},
|
|
1854
|
-
//* Initial country.
|
|
1855
|
-
initialCountry: "",
|
|
1856
|
-
//* A function to load the utils script.
|
|
1857
|
-
loadUtils: null,
|
|
1858
|
-
//* National vs international formatting for numbers e.g. placeholders and displaying existing numbers.
|
|
1859
|
-
nationalMode: !0,
|
|
1860
|
-
//* Display only these countries.
|
|
1861
|
-
onlyCountries: [],
|
|
1862
|
-
//* Number type to use for placeholders.
|
|
1863
|
-
placeholderNumberType: "MOBILE",
|
|
1864
|
-
//* Add custom classes to the search input element.
|
|
1865
|
-
searchInputClass: "",
|
|
1866
|
-
//* Display the international dial code next to the selected flag.
|
|
1867
|
-
separateDialCode: !1,
|
|
1868
|
-
//* Show flags - for both the selected country, and in the country dropdown
|
|
1869
|
-
showFlags: !0,
|
|
1870
|
-
//* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
|
|
1871
|
-
strictMode: !1,
|
|
1872
|
-
//* Use full screen popup instead of dropdown for country list.
|
|
1873
|
-
useFullscreenPopup: gs()
|
|
1874
|
-
}, _e = (r) => JSON.stringify(r), me = (r) => !!r && typeof r == "object" && !Array.isArray(r), Is = (r) => typeof r == "function", Es = (r) => {
|
|
1875
|
-
if (!r || typeof r != "object") return !1;
|
|
1876
|
-
const t = r;
|
|
1877
|
-
return t.nodeType === 1 && typeof t.tagName == "string" && typeof t.appendChild == "function";
|
|
1878
|
-
}, ge = new Set(Object.values($t)), Ft = (r) => {
|
|
1879
|
-
console.warn(`[intl-tel-input] ${r}`);
|
|
1880
|
-
}, x = (r, t, s) => {
|
|
1881
|
-
Ft(`Option '${r}' must be ${t}; got ${_e(s)}. Ignoring.`);
|
|
1882
|
-
}, bs = (r, t) => Object.prototype.hasOwnProperty.call(r, t), Ie = (r, t) => {
|
|
1883
|
-
const s = "an array of ISO2 country code strings";
|
|
1884
|
-
if (!Array.isArray(t))
|
|
1885
|
-
return x(r, s, t), !1;
|
|
1886
|
-
const i = [];
|
|
1887
|
-
for (const n of t) {
|
|
1888
|
-
if (typeof n != "string")
|
|
1889
|
-
return x(r, s, t), !1;
|
|
1890
|
-
const l = n.toLowerCase();
|
|
1891
|
-
At(l) ? i.push(n) : Ft(`Invalid country code in '${r}': '${n}'. Skipping.`);
|
|
1892
|
-
}
|
|
1893
|
-
return i;
|
|
1894
|
-
}, Ns = (r) => {
|
|
1895
|
-
if (r === void 0)
|
|
1896
|
-
return {};
|
|
1897
|
-
if (!me(r)) {
|
|
1898
|
-
const s = `The second argument must be an options object; got ${_e(r)}. Using defaults.`;
|
|
1899
|
-
return Ft(s), {};
|
|
1900
|
-
}
|
|
1901
|
-
const t = {};
|
|
1902
|
-
for (const [s, i] of Object.entries(r)) {
|
|
1903
|
-
if (!bs(ce, s)) {
|
|
1904
|
-
Ft(`Unknown option '${s}'. Ignoring.`);
|
|
1905
|
-
continue;
|
|
1906
|
-
}
|
|
1907
|
-
switch (s) {
|
|
1908
|
-
case "allowDropdown":
|
|
1909
|
-
case "allowNumberExtensions":
|
|
1910
|
-
case "allowPhonewords":
|
|
1911
|
-
case "countrySearch":
|
|
1912
|
-
case "dropdownAlwaysOpen":
|
|
1913
|
-
case "fixDropdownWidth":
|
|
1914
|
-
case "formatAsYouType":
|
|
1915
|
-
case "formatOnDisplay":
|
|
1916
|
-
case "nationalMode":
|
|
1917
|
-
case "showFlags":
|
|
1918
|
-
case "separateDialCode":
|
|
1919
|
-
case "strictMode":
|
|
1920
|
-
case "useFullscreenPopup":
|
|
1921
|
-
if (typeof i != "boolean") {
|
|
1922
|
-
x(s, "a boolean", i);
|
|
1923
|
-
break;
|
|
1924
|
-
}
|
|
1925
|
-
t[s] = i;
|
|
1926
|
-
break;
|
|
1927
|
-
case "autoPlaceholder":
|
|
1928
|
-
if (typeof i != "string" || !ge.has(i)) {
|
|
1929
|
-
const n = Array.from(ge).join(", ");
|
|
1930
|
-
x("autoPlaceholder", `one of ${n}`, i);
|
|
1931
|
-
break;
|
|
1932
|
-
}
|
|
1933
|
-
t[s] = i;
|
|
1934
|
-
break;
|
|
1935
|
-
case "containerClass":
|
|
1936
|
-
case "searchInputClass":
|
|
1937
|
-
case "countryNameLocale":
|
|
1938
|
-
if (typeof i != "string") {
|
|
1939
|
-
x(s, "a string", i);
|
|
1940
|
-
break;
|
|
1941
|
-
}
|
|
1942
|
-
t[s] = i;
|
|
1943
|
-
break;
|
|
1944
|
-
case "countryOrder": {
|
|
1945
|
-
if (i === null)
|
|
1946
|
-
t[s] = i;
|
|
1947
|
-
else {
|
|
1948
|
-
const n = Ie(s, i);
|
|
1949
|
-
n !== !1 && (t[s] = n);
|
|
1950
|
-
}
|
|
1951
|
-
break;
|
|
1952
|
-
}
|
|
1953
|
-
case "customPlaceholder":
|
|
1954
|
-
case "geoIpLookup":
|
|
1955
|
-
case "hiddenInput":
|
|
1956
|
-
case "loadUtils":
|
|
1957
|
-
if (i !== null && !Is(i)) {
|
|
1958
|
-
x(s, "a function or null", i);
|
|
1959
|
-
break;
|
|
1960
|
-
}
|
|
1961
|
-
t[s] = i;
|
|
1962
|
-
break;
|
|
1963
|
-
case "dropdownContainer":
|
|
1964
|
-
if (i !== null && !Es(i)) {
|
|
1965
|
-
x("dropdownContainer", "an HTMLElement or null", i);
|
|
1966
|
-
break;
|
|
1967
|
-
}
|
|
1968
|
-
t[s] = i;
|
|
1969
|
-
break;
|
|
1970
|
-
case "excludeCountries":
|
|
1971
|
-
case "onlyCountries": {
|
|
1972
|
-
const n = Ie(s, i);
|
|
1973
|
-
n !== !1 && (t[s] = n);
|
|
1974
|
-
break;
|
|
1975
|
-
}
|
|
1976
|
-
case "i18n":
|
|
1977
|
-
if (i && !me(i)) {
|
|
1978
|
-
x("i18n", "an object", i);
|
|
1979
|
-
break;
|
|
1980
|
-
}
|
|
1981
|
-
t[s] = i;
|
|
1982
|
-
break;
|
|
1983
|
-
case "initialCountry": {
|
|
1984
|
-
if (typeof i != "string") {
|
|
1985
|
-
x("initialCountry", "a string", i);
|
|
1986
|
-
break;
|
|
1987
|
-
}
|
|
1988
|
-
const n = i.toLowerCase();
|
|
1989
|
-
if (n && n !== bt.AUTO && !At(n)) {
|
|
1990
|
-
x("initialCountry", "a valid ISO2 country code or 'auto'", i);
|
|
1991
|
-
break;
|
|
1992
|
-
}
|
|
1993
|
-
t[s] = i;
|
|
1994
|
-
break;
|
|
1995
|
-
}
|
|
1996
|
-
case "placeholderNumberType":
|
|
1997
|
-
if (typeof i != "string" || !Mt.has(i)) {
|
|
1998
|
-
const n = Array.from(Mt).join(", ");
|
|
1999
|
-
x("placeholderNumberType", `one of ${n}`, i);
|
|
2000
|
-
break;
|
|
2001
|
-
}
|
|
2002
|
-
t[s] = i;
|
|
2003
|
-
break;
|
|
2004
|
-
case "allowedNumberTypes":
|
|
2005
|
-
if (i !== null) {
|
|
2006
|
-
if (!Array.isArray(i)) {
|
|
2007
|
-
x("allowedNumberTypes", "an array of number types or null", i);
|
|
2008
|
-
break;
|
|
2009
|
-
}
|
|
2010
|
-
let n = !0;
|
|
2011
|
-
for (const l of i)
|
|
2012
|
-
if (typeof l != "string" || !Mt.has(l)) {
|
|
2013
|
-
const u = Array.from(Mt).join(", ");
|
|
2014
|
-
x("allowedNumberTypes", `an array of valid number types (${u})`, l), n = !1;
|
|
2015
|
-
break;
|
|
2016
|
-
}
|
|
2017
|
-
n && (t[s] = i);
|
|
2018
|
-
} else
|
|
2019
|
-
t[s] = null;
|
|
2020
|
-
break;
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
return t;
|
|
2024
|
-
}, ws = (r) => {
|
|
2025
|
-
var t, s;
|
|
2026
|
-
r.initialCountry && (r.initialCountry = r.initialCountry.toLowerCase()), (t = r.onlyCountries) != null && t.length && (r.onlyCountries = r.onlyCountries.map((i) => i.toLowerCase())), (s = r.excludeCountries) != null && s.length && (r.excludeCountries = r.excludeCountries.map((i) => i.toLowerCase())), r.countryOrder && (r.countryOrder = r.countryOrder.map((i) => i.toLowerCase()));
|
|
2027
|
-
}, Ds = (r) => {
|
|
2028
|
-
r.dropdownAlwaysOpen && (r.useFullscreenPopup = !1, r.allowDropdown = !0), r.useFullscreenPopup ? r.fixDropdownWidth = !1 : Ae() && (r.fixDropdownWidth = !0), r.onlyCountries.length === 1 && (r.initialCountry = r.onlyCountries[0]), r.separateDialCode && (r.nationalMode = !1), r.allowDropdown && !r.showFlags && !r.separateDialCode && (r.nationalMode = !1), r.useFullscreenPopup && !r.dropdownContainer && (r.dropdownContainer = document.body), r.i18n = { ...ms, ...r.i18n };
|
|
2029
|
-
}, pt = (r) => r.replace(/\D/g, ""), de = (r = "") => r.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), Ls = () => typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1, As = (r, t) => {
|
|
2030
|
-
const s = de(t), i = [], n = [], l = [], u = [], h = [], d = [];
|
|
2031
|
-
for (const m of r)
|
|
2032
|
-
m.iso2 === s ? i.push(m) : m.normalisedName.startsWith(s) ? n.push(m) : m.normalisedName.includes(s) ? l.push(m) : s === m.dialCode || s === m.dialCodePlus ? u.push(m) : m.dialCodePlus.includes(s) ? h.push(m) : m.initials.includes(s) && d.push(m);
|
|
2033
|
-
const C = (m, A) => m.priority - A.priority;
|
|
2034
|
-
return [
|
|
2035
|
-
...i,
|
|
2036
|
-
...n,
|
|
2037
|
-
...l,
|
|
2038
|
-
// priority sort is only relevant when showing multiple countries with the same dial code (that's what the priority field is used to distinguish between)
|
|
2039
|
-
...u.sort(C),
|
|
2040
|
-
...h.sort(C),
|
|
2041
|
-
...d
|
|
2042
|
-
];
|
|
2043
|
-
}, _s = (r, t) => {
|
|
2044
|
-
const s = de(t);
|
|
2045
|
-
for (const i of r)
|
|
2046
|
-
if (i.normalisedName.startsWith(s))
|
|
2047
|
-
return i;
|
|
2048
|
-
return null;
|
|
2049
|
-
}, Yt = (r) => Object.keys(r).filter((t) => !!r[t]).join(" "), D = (r, t, s) => {
|
|
2050
|
-
const i = document.createElement(r);
|
|
2051
|
-
return t && Object.entries(t).forEach(
|
|
2052
|
-
([n, l]) => i.setAttribute(n, l)
|
|
2053
|
-
), s && s.appendChild(i), i;
|
|
2054
|
-
}, Os = () => `
|
|
2055
|
-
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${N.HIDDEN}="true">
|
|
2056
|
-
<circle cx="11" cy="11" r="7" />
|
|
2057
|
-
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
2058
|
-
</svg>`, Ts = (r) => {
|
|
2059
|
-
const t = `iti-${r}-clear-mask`;
|
|
2060
|
-
return `
|
|
2061
|
-
<svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${N.HIDDEN}="true" focusable="false">
|
|
2062
|
-
<mask id="${t}" maskUnits="userSpaceOnUse">
|
|
2063
|
-
<rect width="16" height="16" fill="white" />
|
|
2064
|
-
<path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
|
|
2065
|
-
</mask>
|
|
2066
|
-
<circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />
|
|
2067
|
-
</svg>`;
|
|
2068
|
-
}, Ps = () => `
|
|
2069
|
-
<svg class="iti__country-check-svg" width="14" height="14" viewBox="0 0 16 16" fill="currentColor" focusable="false" ${N.HIDDEN}="true">
|
|
2070
|
-
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"/>
|
|
2071
|
-
</svg>`, Ee = () => `
|
|
2072
|
-
<svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">
|
|
2073
|
-
<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"/>
|
|
2074
|
-
<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"/>
|
|
2075
|
-
</svg>`;
|
|
2076
|
-
var L, R, rt, Tt, z, et, at, yt, ut, w, mt, X, gt, _, W, g, Oe, Te, zt, Pe, Se, ve, Re, ke, Xt, Pt, qt, Ue, xe, Qt, Jt, He, Me, Zt, We;
|
|
2077
|
-
const _t = class _t {
|
|
2078
|
-
constructor(t, s, i) {
|
|
2079
|
-
I(this, g);
|
|
2080
|
-
// private
|
|
2081
|
-
I(this, L);
|
|
2082
|
-
I(this, R);
|
|
2083
|
-
I(this, rt);
|
|
2084
|
-
I(this, Tt);
|
|
2085
|
-
I(this, z);
|
|
2086
|
-
I(this, et);
|
|
2087
|
-
I(this, at);
|
|
2088
|
-
I(this, yt);
|
|
2089
|
-
I(this, ut);
|
|
2090
|
-
I(this, w);
|
|
2091
|
-
I(this, mt);
|
|
2092
|
-
I(this, X);
|
|
2093
|
-
I(this, gt);
|
|
2094
|
-
I(this, _);
|
|
2095
|
-
I(this, W);
|
|
2096
|
-
p(this, et, null), p(this, at, null), p(this, _, null), p(this, W, null), this.highlightedItem = null, t.dataset.intlTelInputId = i.toString(), this.telInput = t, p(this, L, s), p(this, R, i), this.hadInitialPlaceholder = !!t.getAttribute("placeholder"), p(this, rt, !!this.telInput.closest("[dir=rtl]")), e(this, L).separateDialCode && p(this, Tt, this.telInput.style.paddingLeft);
|
|
2097
|
-
}
|
|
2098
|
-
// Validate that the provided element is an HTMLInputElement.
|
|
2099
|
-
static validateInput(t) {
|
|
2100
|
-
const s = t == null ? void 0 : t.tagName;
|
|
2101
|
-
if (!(!!t && typeof t == "object" && s === "INPUT" && typeof t.setAttribute == "function")) {
|
|
2102
|
-
const n = Object.prototype.toString.call(t);
|
|
2103
|
-
throw new TypeError(
|
|
2104
|
-
`The first argument must be an HTMLInputElement, not ${n}`
|
|
2105
|
-
);
|
|
2106
|
-
}
|
|
2107
|
-
}
|
|
2108
|
-
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
2109
|
-
generateMarkup(t) {
|
|
2110
|
-
p(this, z, t), this.telInput.classList.add("iti__tel-input"), this.telInput.hasAttribute("autocomplete") || this.telInput.setAttribute("autocomplete", "tel"), this.telInput.hasAttribute("inputmode") || this.telInput.setAttribute("inputmode", "tel");
|
|
2111
|
-
const s = a(this, g, Oe).call(this);
|
|
2112
|
-
a(this, g, Te).call(this, s), s.appendChild(this.telInput), a(this, g, ve).call(this), a(this, g, Re).call(this, s);
|
|
2113
|
-
}
|
|
2114
|
-
//* Country search: Filter the countries according to the search query.
|
|
2115
|
-
filterCountriesByQuery(t) {
|
|
2116
|
-
let s;
|
|
2117
|
-
t === "" ? s = e(this, z) : s = As(e(this, z), t), a(this, g, Me).call(this, s);
|
|
2118
|
-
}
|
|
2119
|
-
handleSearchChange() {
|
|
2120
|
-
e(this, et) && clearTimeout(e(this, et)), p(this, et, setTimeout(() => {
|
|
2121
|
-
a(this, g, Jt).call(this), p(this, et, null);
|
|
2122
|
-
}, De.SEARCH_DEBOUNCE_MS));
|
|
2123
|
-
}
|
|
2124
|
-
handleSearchClear() {
|
|
2125
|
-
this.searchInput.value = "", this.searchInput.focus(), a(this, g, Jt).call(this);
|
|
2126
|
-
}
|
|
2127
|
-
//* Check if a country list item element is visible within it's container (the country list), else scroll until it is.
|
|
2128
|
-
scrollCountryListToItem(t) {
|
|
2129
|
-
const s = this.countryList, i = s.getBoundingClientRect(), n = t.getBoundingClientRect(), l = n.top - i.top + s.scrollTop;
|
|
2130
|
-
n.top < i.top ? s.scrollTop = l : n.bottom > i.bottom && (s.scrollTop = l - i.height + n.height);
|
|
2131
|
-
}
|
|
2132
|
-
//* Remove highlighting from the previous list item and highlight the new one.
|
|
2133
|
-
highlightListItem(t, s) {
|
|
2134
|
-
const i = this.highlightedItem;
|
|
2135
|
-
if (i && i.classList.remove(b.HIGHLIGHT), this.highlightedItem = t, this.highlightedItem) {
|
|
2136
|
-
if (this.highlightedItem.classList.add(b.HIGHLIGHT), e(this, L).countrySearch) {
|
|
2137
|
-
const n = this.highlightedItem.getAttribute("id") || "";
|
|
2138
|
-
this.searchInput.setAttribute(N.ACTIVE_DESCENDANT, n);
|
|
2139
|
-
}
|
|
2140
|
-
s && this.highlightedItem.focus();
|
|
2141
|
-
}
|
|
2142
|
-
}
|
|
2143
|
-
//* Highlight the next/prev item in the list (and ensure it is visible).
|
|
2144
|
-
handleUpDownKey(t) {
|
|
2145
|
-
var i, n;
|
|
2146
|
-
let s = t === S.ARROW_UP ? (i = this.highlightedItem) == null ? void 0 : i.previousElementSibling : (n = this.highlightedItem) == null ? void 0 : n.nextElementSibling;
|
|
2147
|
-
!s && this.countryList.childElementCount > 1 && (s = t === S.ARROW_UP ? this.countryList.lastElementChild : this.countryList.firstElementChild), s && (this.scrollCountryListToItem(s), this.highlightListItem(s, !1));
|
|
2148
|
-
}
|
|
2149
|
-
destroy() {
|
|
2150
|
-
this.telInput.iti = void 0, delete this.telInput.dataset.intlTelInputId, e(this, L).separateDialCode && (this.telInput.style.paddingLeft = e(this, Tt));
|
|
2151
|
-
const t = this.telInput.parentNode;
|
|
2152
|
-
t.before(this.telInput), t.remove(), this.telInput = null, this.countryContainer = null, this.selectedCountry = null, this.selectedCountryInner = null, this.searchInput = null, this.searchClearButton = null, this.countryList = null, this.hiddenInput = null, this.hiddenInputCountry = null, this.highlightedItem = null, p(this, yt, null), p(this, ut, null), p(this, w, null), p(this, mt, null), p(this, X, null), p(this, gt, null), p(this, _, null), p(this, W, null);
|
|
2153
|
-
for (const s of e(this, z))
|
|
2154
|
-
delete s.nodeById[e(this, R)];
|
|
2155
|
-
p(this, z, null);
|
|
2156
|
-
}
|
|
2157
|
-
// UI: Open the dropdown (DOM only).
|
|
2158
|
-
openDropdown() {
|
|
2159
|
-
const {
|
|
2160
|
-
countrySearch: t,
|
|
2161
|
-
dropdownAlwaysOpen: s,
|
|
2162
|
-
dropdownContainer: i
|
|
2163
|
-
} = e(this, L);
|
|
2164
|
-
if (a(this, g, zt).call(this), i)
|
|
2165
|
-
a(this, g, We).call(this);
|
|
2166
|
-
else {
|
|
2167
|
-
const n = a(this, g, Zt).call(this), l = this.telInput.offsetHeight + q.DROPDOWN_MARGIN;
|
|
2168
|
-
n ? e(this, w).style.top = `${l}px` : e(this, w).style.bottom = `${l}px`;
|
|
2169
|
-
}
|
|
2170
|
-
if (e(this, w).classList.remove(b.HIDE), this.selectedCountry.setAttribute(N.EXPANDED, "true"), t) {
|
|
2171
|
-
const n = this.countryList.firstElementChild;
|
|
2172
|
-
n && (this.highlightListItem(n, !1), this.countryList.scrollTop = 0), s || this.searchInput.focus();
|
|
2173
|
-
}
|
|
2174
|
-
e(this, ut).classList.add(b.ARROW_UP);
|
|
2175
|
-
}
|
|
2176
|
-
// UI: Close the dropdown (DOM only).
|
|
2177
|
-
closeDropdown() {
|
|
2178
|
-
const { countrySearch: t, dropdownContainer: s } = e(this, L);
|
|
2179
|
-
e(this, w).classList.add(b.HIDE), this.selectedCountry.setAttribute(N.EXPANDED, "false"), t && (this.searchInput.removeAttribute(N.ACTIVE_DESCENDANT), this.highlightedItem && (this.highlightedItem.classList.remove(b.HIGHLIGHT), this.highlightedItem = null)), e(this, ut).classList.remove(b.ARROW_UP), s ? (e(this, _).remove(), e(this, _).style.top = "", e(this, _).style.bottom = "", e(this, _).style.paddingLeft = "", e(this, _).style.paddingRight = "") : (e(this, w).style.top = "", e(this, w).style.bottom = "");
|
|
2180
|
-
}
|
|
2181
|
-
// UI: Whether the dropdown is currently closed (hidden).
|
|
2182
|
-
isDropdownClosed() {
|
|
2183
|
-
return e(this, w).classList.contains(b.HIDE);
|
|
2184
|
-
}
|
|
2185
|
-
setCountry(t) {
|
|
2186
|
-
const { allowDropdown: s, showFlags: i, separateDialCode: n, i18n: l } = e(this, L), { name: u, dialCode: h, iso2: d = "" } = t;
|
|
2187
|
-
if (s && a(this, g, He).call(this, d), this.selectedCountry) {
|
|
2188
|
-
const C = d && i ? `${b.FLAG} iti__${d}` : `${b.FLAG} ${b.GLOBE}`;
|
|
2189
|
-
let m, A, O;
|
|
2190
|
-
d ? (A = u, m = l.selectedCountryAriaLabel.replace("${countryName}", u).replace("${dialCode}", `+${h}`), O = i ? "" : Ee()) : (A = l.noCountrySelected, m = l.noCountrySelected, O = Ee()), this.selectedCountryInner.className = C, this.selectedCountry.setAttribute("title", A), this.selectedCountry.setAttribute(N.LABEL, m), this.selectedCountryInner.innerHTML = O;
|
|
2191
|
-
}
|
|
2192
|
-
if (n) {
|
|
2193
|
-
const C = h ? `+${h}` : "";
|
|
2194
|
-
e(this, yt).textContent = C, a(this, g, Xt).call(this);
|
|
2195
|
-
}
|
|
2196
|
-
}
|
|
2197
|
-
};
|
|
2198
|
-
L = new WeakMap(), R = new WeakMap(), rt = new WeakMap(), Tt = new WeakMap(), z = new WeakMap(), et = new WeakMap(), at = new WeakMap(), yt = new WeakMap(), ut = new WeakMap(), w = new WeakMap(), mt = new WeakMap(), X = new WeakMap(), gt = new WeakMap(), _ = new WeakMap(), W = new WeakMap(), g = new WeakSet(), Oe = function() {
|
|
2199
|
-
const {
|
|
2200
|
-
allowDropdown: t,
|
|
2201
|
-
showFlags: s,
|
|
2202
|
-
containerClass: i,
|
|
2203
|
-
useFullscreenPopup: n
|
|
2204
|
-
} = e(this, L), l = Yt({
|
|
2205
|
-
iti: !0,
|
|
2206
|
-
"iti--allow-dropdown": t,
|
|
2207
|
-
"iti--show-flags": s,
|
|
2208
|
-
"iti--inline-dropdown": !n,
|
|
2209
|
-
[i]: !!i
|
|
2210
|
-
}), u = D("div", { class: l });
|
|
2211
|
-
return e(this, rt) && u.setAttribute("dir", "ltr"), this.telInput.before(u), u;
|
|
2212
|
-
}, Te = function(t) {
|
|
2213
|
-
const { allowDropdown: s, separateDialCode: i, showFlags: n } = e(this, L);
|
|
2214
|
-
if (s || n || i) {
|
|
2215
|
-
this.countryContainer = D(
|
|
2216
|
-
"div",
|
|
2217
|
-
// visibly hidden until we measure it's width to set the input padding correctly
|
|
2218
|
-
{ class: `iti__country-container ${b.V_HIDE}` },
|
|
2219
|
-
t
|
|
2220
|
-
), s ? (this.selectedCountry = D(
|
|
2221
|
-
"button",
|
|
2222
|
-
{
|
|
2223
|
-
type: "button",
|
|
2224
|
-
class: "iti__selected-country",
|
|
2225
|
-
[N.EXPANDED]: "false",
|
|
2226
|
-
[N.LABEL]: e(this, L).i18n.noCountrySelected,
|
|
2227
|
-
[N.HASPOPUP]: "dialog",
|
|
2228
|
-
[N.CONTROLS]: `iti-${e(this, R)}__dropdown-content`
|
|
2229
|
-
},
|
|
2230
|
-
this.countryContainer
|
|
2231
|
-
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = D(
|
|
2232
|
-
"div",
|
|
2233
|
-
{ class: "iti__selected-country" },
|
|
2234
|
-
this.countryContainer
|
|
2235
|
-
);
|
|
2236
|
-
const l = D(
|
|
2237
|
-
"div",
|
|
2238
|
-
{ class: "iti__selected-country-primary" },
|
|
2239
|
-
this.selectedCountry
|
|
2240
|
-
);
|
|
2241
|
-
this.selectedCountryInner = D(
|
|
2242
|
-
"div",
|
|
2243
|
-
{ class: b.FLAG },
|
|
2244
|
-
l
|
|
2245
|
-
), s && p(this, ut, D(
|
|
2246
|
-
"div",
|
|
2247
|
-
{ class: "iti__arrow", [N.HIDDEN]: "true" },
|
|
2248
|
-
l
|
|
2249
|
-
)), i && p(this, yt, D(
|
|
2250
|
-
"div",
|
|
2251
|
-
{ class: "iti__selected-dial-code" },
|
|
2252
|
-
this.selectedCountry
|
|
2253
|
-
)), s && a(this, g, Pe).call(this);
|
|
2254
|
-
}
|
|
2255
|
-
}, zt = function() {
|
|
2256
|
-
const { fixDropdownWidth: t } = e(this, L);
|
|
2257
|
-
if (t && !e(this, w).style.width) {
|
|
2258
|
-
const s = this.telInput.offsetWidth;
|
|
2259
|
-
s > 0 && (e(this, w).style.width = `${s}px`);
|
|
2260
|
-
}
|
|
2261
|
-
}, Pe = function() {
|
|
2262
|
-
const {
|
|
2263
|
-
fixDropdownWidth: t,
|
|
2264
|
-
useFullscreenPopup: s,
|
|
2265
|
-
countrySearch: i,
|
|
2266
|
-
i18n: n,
|
|
2267
|
-
dropdownContainer: l,
|
|
2268
|
-
containerClass: u
|
|
2269
|
-
} = e(this, L), h = t ? "" : "iti--flexible-dropdown-width";
|
|
2270
|
-
if (p(this, w, D("div", {
|
|
2271
|
-
id: `iti-${e(this, R)}__dropdown-content`,
|
|
2272
|
-
class: `iti__dropdown-content ${b.HIDE} ${h}`,
|
|
2273
|
-
role: "dialog",
|
|
2274
|
-
[N.MODAL]: "true"
|
|
2275
|
-
})), e(this, rt) && e(this, w).setAttribute("dir", "rtl"), i && a(this, g, Se).call(this), this.countryList = D(
|
|
2276
|
-
"ul",
|
|
2277
|
-
{
|
|
2278
|
-
class: "iti__country-list",
|
|
2279
|
-
id: `iti-${e(this, R)}__country-listbox`,
|
|
2280
|
-
role: "listbox",
|
|
2281
|
-
[N.LABEL]: n.countryListAriaLabel
|
|
2282
|
-
},
|
|
2283
|
-
e(this, w)
|
|
2284
|
-
), a(this, g, ke).call(this), i && a(this, g, Qt).call(this), s || (a(this, g, zt).call(this), p(this, at, a(this, g, xe).call(this)), i && (e(this, w).style.height = `${e(this, at)}px`)), l) {
|
|
2285
|
-
const d = Yt({
|
|
2286
|
-
iti: !0,
|
|
2287
|
-
"iti--container": !0,
|
|
2288
|
-
"iti--fullscreen-popup": s,
|
|
2289
|
-
"iti--inline-dropdown": !s,
|
|
2290
|
-
[u]: !!u
|
|
2291
|
-
});
|
|
2292
|
-
p(this, _, D("div", { class: d })), e(this, _).appendChild(e(this, w));
|
|
2293
|
-
} else
|
|
2294
|
-
this.countryContainer.appendChild(e(this, w));
|
|
2295
|
-
}, Se = function() {
|
|
2296
|
-
const { i18n: t, searchInputClass: s } = e(this, L), i = D(
|
|
2297
|
-
"div",
|
|
2298
|
-
{ class: "iti__search-input-wrapper" },
|
|
2299
|
-
e(this, w)
|
|
2300
|
-
);
|
|
2301
|
-
p(this, mt, D(
|
|
2302
|
-
"span",
|
|
2303
|
-
{
|
|
2304
|
-
class: "iti__search-icon",
|
|
2305
|
-
[N.HIDDEN]: "true"
|
|
2306
|
-
},
|
|
2307
|
-
i
|
|
2308
|
-
)), e(this, mt).innerHTML = Os(), this.searchInput = D(
|
|
2309
|
-
"input",
|
|
2310
|
-
{
|
|
2311
|
-
id: `iti-${e(this, R)}__search-input`,
|
|
2312
|
-
// Chrome says inputs need either a name or an id
|
|
2313
|
-
type: "search",
|
|
2314
|
-
class: `iti__search-input ${s}`,
|
|
2315
|
-
placeholder: t.searchPlaceholder,
|
|
2316
|
-
// role=combobox + aria-autocomplete=list + aria-activedescendant allows maintaining focus on the search input while allowing users to navigate search results with up/down keyboard keys
|
|
2317
|
-
role: "combobox",
|
|
2318
|
-
[N.EXPANDED]: "true",
|
|
2319
|
-
[N.LABEL]: t.searchPlaceholder,
|
|
2320
|
-
[N.CONTROLS]: `iti-${e(this, R)}__country-listbox`,
|
|
2321
|
-
[N.AUTOCOMPLETE]: "list",
|
|
2322
|
-
autocomplete: "off"
|
|
2323
|
-
},
|
|
2324
|
-
i
|
|
2325
|
-
), this.searchClearButton = D(
|
|
2326
|
-
"button",
|
|
2327
|
-
{
|
|
2328
|
-
type: "button",
|
|
2329
|
-
class: `iti__search-clear ${b.HIDE}`,
|
|
2330
|
-
[N.LABEL]: t.clearSearchAriaLabel,
|
|
2331
|
-
tabindex: "-1"
|
|
2332
|
-
},
|
|
2333
|
-
i
|
|
2334
|
-
), this.searchClearButton.innerHTML = Ts(e(this, R)), p(this, gt, D(
|
|
2335
|
-
"span",
|
|
2336
|
-
{ class: "iti__a11y-text" },
|
|
2337
|
-
e(this, w)
|
|
2338
|
-
)), p(this, X, D(
|
|
2339
|
-
"div",
|
|
2340
|
-
{
|
|
2341
|
-
class: `iti__no-results ${b.HIDE}`,
|
|
2342
|
-
[N.HIDDEN]: "true"
|
|
2343
|
-
// all a11y messaging happens in this.#searchResultsA11yText
|
|
2344
|
-
},
|
|
2345
|
-
e(this, w)
|
|
2346
|
-
)), e(this, X).textContent = t.searchEmptyState;
|
|
2347
|
-
}, ve = function() {
|
|
2348
|
-
this.countryContainer && (a(this, g, Xt).call(this), this.countryContainer.classList.remove(b.V_HIDE));
|
|
2349
|
-
}, Re = function(t) {
|
|
2350
|
-
var i, n;
|
|
2351
|
-
const { hiddenInput: s } = e(this, L);
|
|
2352
|
-
if (s) {
|
|
2353
|
-
const l = this.telInput.getAttribute("name") || "", u = s(l);
|
|
2354
|
-
if (u.phone) {
|
|
2355
|
-
const h = (i = this.telInput.form) == null ? void 0 : i.querySelector(
|
|
2356
|
-
`input[name="${u.phone}"]`
|
|
2357
|
-
);
|
|
2358
|
-
h ? this.hiddenInput = h : (this.hiddenInput = D("input", {
|
|
2359
|
-
type: "hidden",
|
|
2360
|
-
name: u.phone
|
|
2361
|
-
}), t.appendChild(this.hiddenInput));
|
|
2362
|
-
}
|
|
2363
|
-
if (u.country) {
|
|
2364
|
-
const h = (n = this.telInput.form) == null ? void 0 : n.querySelector(
|
|
2365
|
-
`input[name="${u.country}"]`
|
|
2366
|
-
);
|
|
2367
|
-
h ? this.hiddenInputCountry = h : (this.hiddenInputCountry = D("input", {
|
|
2368
|
-
type: "hidden",
|
|
2369
|
-
name: u.country
|
|
2370
|
-
}), t.appendChild(this.hiddenInputCountry));
|
|
2371
|
-
}
|
|
2372
|
-
}
|
|
2373
|
-
}, //* For each country: add a country list item <li> to the countryList <ul> container.
|
|
2374
|
-
ke = function() {
|
|
2375
|
-
const t = document.createDocumentFragment();
|
|
2376
|
-
for (let s = 0; s < e(this, z).length; s++) {
|
|
2377
|
-
const i = e(this, z)[s], n = Yt({
|
|
2378
|
-
[b.COUNTRY_ITEM]: !0
|
|
2379
|
-
}), l = D("li", {
|
|
2380
|
-
id: `iti-${e(this, R)}__item-${i.iso2}`,
|
|
2381
|
-
class: n,
|
|
2382
|
-
tabindex: "-1",
|
|
2383
|
-
role: "option",
|
|
2384
|
-
[N.SELECTED]: "false"
|
|
2385
|
-
});
|
|
2386
|
-
l.dataset.dialCode = i.dialCode, l.dataset.countryCode = i.iso2, i.nodeById[e(this, R)] = l, e(this, L).showFlags && D("div", { class: `${b.FLAG} iti__${i.iso2}` }, l);
|
|
2387
|
-
const u = D("span", { class: "iti__country-name" }, l);
|
|
2388
|
-
u.textContent = `${i.name} `;
|
|
2389
|
-
const h = D("span", { class: "iti__dial-code" }, u);
|
|
2390
|
-
e(this, rt) && h.setAttribute("dir", "ltr"), h.textContent = `(+${i.dialCode})`, t.appendChild(l);
|
|
2391
|
-
}
|
|
2392
|
-
this.countryList.appendChild(t);
|
|
2393
|
-
}, //* Update the input padding to make space for the selected country/dial code.
|
|
2394
|
-
Xt = function() {
|
|
2395
|
-
if (this.selectedCountry) {
|
|
2396
|
-
const t = e(this, L).separateDialCode ? q.SANE_SELECTED_WITH_DIAL_WIDTH : q.SANE_SELECTED_NO_DIAL_WIDTH, i = (this.selectedCountry.offsetWidth || a(this, g, Ue).call(this) || t) + q.INPUT_PADDING_EXTRA_LEFT;
|
|
2397
|
-
this.telInput.style.paddingLeft = `${i}px`;
|
|
2398
|
-
}
|
|
2399
|
-
}, Pt = new WeakSet(), qt = function() {
|
|
2400
|
-
let t;
|
|
2401
|
-
try {
|
|
2402
|
-
t = window.top.document.body;
|
|
2403
|
-
} catch {
|
|
2404
|
-
t = document.body;
|
|
2405
|
-
}
|
|
2406
|
-
return t;
|
|
2407
|
-
}, //* When input is in a hidden container during init, we cannot calculate the selected country width.
|
|
2408
|
-
//* Fix: clone the markup, make it invisible, add it to the end of the DOM, and then measure it's width.
|
|
2409
|
-
//* To get the right styling to apply, all we need is a shallow clone of the container,
|
|
2410
|
-
//* and then to inject a deep clone of the selectedCountry element.
|
|
2411
|
-
Ue = function() {
|
|
2412
|
-
var t;
|
|
2413
|
-
if (this.telInput.parentNode) {
|
|
2414
|
-
const s = a(t = _t, Pt, qt).call(t), i = this.telInput.parentNode.cloneNode(
|
|
2415
|
-
!1
|
|
2416
|
-
);
|
|
2417
|
-
i.style.visibility = "hidden", s.appendChild(i);
|
|
2418
|
-
const n = this.countryContainer.cloneNode();
|
|
2419
|
-
i.appendChild(n);
|
|
2420
|
-
const l = this.selectedCountry.cloneNode(
|
|
2421
|
-
!0
|
|
2422
|
-
);
|
|
2423
|
-
n.appendChild(l);
|
|
2424
|
-
const u = l.offsetWidth;
|
|
2425
|
-
return s.removeChild(i), u;
|
|
2426
|
-
}
|
|
2427
|
-
return 0;
|
|
2428
|
-
}, // this is run before we add the dropdown to the DOM
|
|
2429
|
-
xe = function() {
|
|
2430
|
-
var n;
|
|
2431
|
-
const t = a(n = _t, Pt, qt).call(n);
|
|
2432
|
-
e(this, w).classList.remove(b.HIDE);
|
|
2433
|
-
const s = D("div", { class: "iti iti--inline-dropdown" });
|
|
2434
|
-
s.appendChild(e(this, w)), s.style.visibility = "hidden", t.appendChild(s);
|
|
2435
|
-
const i = e(this, w).offsetHeight;
|
|
2436
|
-
return t.removeChild(s), s.style.visibility = "", e(this, w).classList.add(b.HIDE), i > 0 ? i : q.SANE_DROPDOWN_HEIGHT;
|
|
2437
|
-
}, //* Update search results text (for a11y).
|
|
2438
|
-
Qt = function() {
|
|
2439
|
-
const { i18n: t } = e(this, L), s = this.countryList.childElementCount;
|
|
2440
|
-
e(this, gt).textContent = t.searchSummaryAria(s);
|
|
2441
|
-
}, // Search input handlers
|
|
2442
|
-
Jt = function() {
|
|
2443
|
-
const t = this.searchInput.value.trim();
|
|
2444
|
-
this.filterCountriesByQuery(t), this.searchInput.value ? this.searchClearButton.classList.remove(b.HIDE) : this.searchClearButton.classList.add(b.HIDE);
|
|
2445
|
-
}, // Update the selected list item in the dropdown
|
|
2446
|
-
He = function(t) {
|
|
2447
|
-
var s;
|
|
2448
|
-
if (e(this, W) && e(this, W).dataset.countryCode !== t && (e(this, W).setAttribute(N.SELECTED, "false"), (s = e(this, W).querySelector(".iti__country-check")) == null || s.remove(), p(this, W, null)), t && !e(this, W)) {
|
|
2449
|
-
const i = this.countryList.querySelector(
|
|
2450
|
-
`[data-country-code="${t}"]`
|
|
2451
|
-
);
|
|
2452
|
-
if (i) {
|
|
2453
|
-
i.setAttribute(N.SELECTED, "true");
|
|
2454
|
-
const n = D(
|
|
2455
|
-
"span",
|
|
2456
|
-
{ class: "iti__country-check", [N.HIDDEN]: "true" },
|
|
2457
|
-
i
|
|
2458
|
-
);
|
|
2459
|
-
n.innerHTML = Ps(), p(this, W, i);
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
}, //* Country search: Filter the country list to the given array of countries.
|
|
2463
|
-
Me = function(t) {
|
|
2464
|
-
this.countryList.replaceChildren();
|
|
2465
|
-
let s = !0;
|
|
2466
|
-
for (const i of t) {
|
|
2467
|
-
const n = i.nodeById[e(this, R)];
|
|
2468
|
-
n && (this.countryList.appendChild(n), s && (this.highlightListItem(n, !1), s = !1));
|
|
2469
|
-
}
|
|
2470
|
-
s ? (this.highlightListItem(null, !1), e(this, X) && e(this, X).classList.remove(b.HIDE)) : e(this, X) && e(this, X).classList.add(b.HIDE), this.countryList.scrollTop = 0, a(this, g, Qt).call(this);
|
|
2471
|
-
}, Zt = function() {
|
|
2472
|
-
if (e(this, L).dropdownAlwaysOpen)
|
|
2473
|
-
return !0;
|
|
2474
|
-
const t = this.telInput.getBoundingClientRect(), s = t.top, i = window.innerHeight - t.bottom;
|
|
2475
|
-
return i >= e(this, at) || i >= s;
|
|
2476
|
-
}, // inject dropdown into container and apply positioning styles
|
|
2477
|
-
We = function() {
|
|
2478
|
-
const { dropdownContainer: t, useFullscreenPopup: s } = e(this, L);
|
|
2479
|
-
if (s) {
|
|
2480
|
-
if (window.innerWidth >= q.NARROW_VIEWPORT_WIDTH) {
|
|
2481
|
-
const i = this.telInput.getBoundingClientRect();
|
|
2482
|
-
e(this, _).style.paddingLeft = `${i.left}px`, e(this, _).style.paddingRight = `${window.innerWidth - i.right}px`;
|
|
2483
|
-
}
|
|
2484
|
-
} else {
|
|
2485
|
-
const i = this.telInput.getBoundingClientRect();
|
|
2486
|
-
e(this, _).style.left = `${i.left}px`, a(this, g, Zt).call(this) ? e(this, _).style.top = `${i.bottom + q.DROPDOWN_MARGIN}px` : (e(this, _).style.top = "unset", e(this, _).style.bottom = `${window.innerHeight - i.top + q.DROPDOWN_MARGIN}px`);
|
|
2487
|
-
}
|
|
2488
|
-
t.appendChild(e(this, _));
|
|
2489
|
-
}, I(_t, Pt);
|
|
2490
|
-
let Gt = _t;
|
|
2491
|
-
const Ss = (r) => {
|
|
2492
|
-
const { onlyCountries: t, excludeCountries: s } = r;
|
|
2493
|
-
return t != null && t.length ? Ct.filter(
|
|
2494
|
-
(i) => t.includes(i.iso2)
|
|
2495
|
-
) : s != null && s.length ? Ct.filter(
|
|
2496
|
-
(i) => !s.includes(i.iso2)
|
|
2497
|
-
) : Ct;
|
|
2498
|
-
}, vs = (r, t) => {
|
|
2499
|
-
const { countryNameLocale: s, i18n: i } = t;
|
|
2500
|
-
let n;
|
|
2501
|
-
try {
|
|
2502
|
-
typeof Intl < "u" && typeof Intl.DisplayNames == "function" ? n = new Intl.DisplayNames(s, {
|
|
2503
|
-
type: "region"
|
|
2504
|
-
}) : n = null;
|
|
2505
|
-
} catch (l) {
|
|
2506
|
-
console.error(l), n = null;
|
|
2507
|
-
}
|
|
2508
|
-
for (const l of r)
|
|
2509
|
-
l.name = i[l.iso2] || (n == null ? void 0 : n.of(l.iso2.toUpperCase())) || "";
|
|
2510
|
-
}, Rs = (r) => {
|
|
2511
|
-
const t = /* @__PURE__ */ new Set();
|
|
2512
|
-
let s = 0;
|
|
2513
|
-
const i = {}, n = (u, h) => {
|
|
2514
|
-
if (!u || !h)
|
|
2515
|
-
return;
|
|
2516
|
-
h.length > s && (s = h.length), i.hasOwnProperty(h) || (i[h] = []);
|
|
2517
|
-
const d = i[h];
|
|
2518
|
-
d.includes(u) || d.push(u);
|
|
2519
|
-
}, l = [...r].sort((u, h) => u.priority - h.priority);
|
|
2520
|
-
for (const u of l) {
|
|
2521
|
-
t.has(u.dialCode) || t.add(u.dialCode);
|
|
2522
|
-
for (let h = 1; h < u.dialCode.length; h++) {
|
|
2523
|
-
const d = u.dialCode.substring(0, h);
|
|
2524
|
-
n(u.iso2, d);
|
|
2525
|
-
}
|
|
2526
|
-
if (n(u.iso2, u.dialCode), u.areaCodes) {
|
|
2527
|
-
const h = i[u.dialCode][0];
|
|
2528
|
-
for (const d of u.areaCodes) {
|
|
2529
|
-
for (let C = 1; C < d.length; C++) {
|
|
2530
|
-
const m = d.substring(0, C), A = u.dialCode + m;
|
|
2531
|
-
n(h, A), n(u.iso2, A);
|
|
2532
|
-
}
|
|
2533
|
-
n(u.iso2, u.dialCode + d);
|
|
2534
|
-
}
|
|
2535
|
-
}
|
|
2536
|
-
}
|
|
2537
|
-
return { dialCodes: t, dialCodeMaxLen: s, dialCodeToIso2Map: i };
|
|
2538
|
-
}, ks = (r, t) => {
|
|
2539
|
-
const { countryOrder: s } = t;
|
|
2540
|
-
r.sort((i, n) => {
|
|
2541
|
-
if (s) {
|
|
2542
|
-
const l = s.indexOf(i.iso2), u = s.indexOf(n.iso2), h = l > -1, d = u > -1;
|
|
2543
|
-
if (h || d)
|
|
2544
|
-
return h && d ? l - u : h ? -1 : 1;
|
|
2545
|
-
}
|
|
2546
|
-
return i.name.localeCompare(n.name);
|
|
2547
|
-
});
|
|
2548
|
-
}, Us = (r) => {
|
|
2549
|
-
for (const t of r)
|
|
2550
|
-
t.normalisedName = de(t.name), t.initials = t.normalisedName.split(/[^a-z]/).map((s) => s[0]).join(""), t.dialCodePlus = `+${t.dialCode}`;
|
|
2551
|
-
}, xs = /* @__PURE__ */ new Set([
|
|
2552
|
-
"800",
|
|
2553
|
-
"808",
|
|
2554
|
-
"870",
|
|
2555
|
-
"881",
|
|
2556
|
-
"882",
|
|
2557
|
-
"883",
|
|
2558
|
-
"888",
|
|
2559
|
-
"979"
|
|
2560
|
-
]), be = (r) => {
|
|
2561
|
-
const t = pt(r).slice(0, 3);
|
|
2562
|
-
return r.startsWith("+") && xs.has(t);
|
|
2563
|
-
}, Ne = (r, t, s, i) => {
|
|
2564
|
-
let n = r;
|
|
2565
|
-
if (s && t) {
|
|
2566
|
-
const l = `+${i.dialCode}`, u = n[l.length] === " " || n[l.length] === "-" ? l.length + 1 : l.length;
|
|
2567
|
-
n = n.substring(u);
|
|
2568
|
-
}
|
|
2569
|
-
return n;
|
|
2570
|
-
}, Hs = (r, t, s, i, n) => {
|
|
2571
|
-
const l = s ? s.formatNumberAsYouType(r, i.iso2) : r, { dialCode: u } = i;
|
|
2572
|
-
return n && t.charAt(0) !== "+" && l.includes(`+${u}`) ? (l.split(`+${u}`)[1] || "").trim() : l;
|
|
2573
|
-
}, Ms = (r, t, s, i) => {
|
|
2574
|
-
if (s === 0 && !i)
|
|
2575
|
-
return 0;
|
|
2576
|
-
let n = 0;
|
|
2577
|
-
for (let l = 0; l < t.length; l++) {
|
|
2578
|
-
if (/[+0-9]/.test(t[l]) && n++, n === r && !i)
|
|
2579
|
-
return l + 1;
|
|
2580
|
-
if (i && n === r + 1)
|
|
2581
|
-
return l;
|
|
2582
|
-
}
|
|
2583
|
-
return t.length;
|
|
2584
|
-
}, Ws = /* @__PURE__ */ new Set([
|
|
2585
|
-
"800",
|
|
2586
|
-
"822",
|
|
2587
|
-
"833",
|
|
2588
|
-
"844",
|
|
2589
|
-
"855",
|
|
2590
|
-
"866",
|
|
2591
|
-
"877",
|
|
2592
|
-
"880",
|
|
2593
|
-
"881",
|
|
2594
|
-
"882",
|
|
2595
|
-
"883",
|
|
2596
|
-
"884",
|
|
2597
|
-
"885",
|
|
2598
|
-
"886",
|
|
2599
|
-
"887",
|
|
2600
|
-
"888",
|
|
2601
|
-
"889"
|
|
2602
|
-
]), we = (r) => {
|
|
2603
|
-
const t = pt(r);
|
|
2604
|
-
if (t.startsWith(Le.NANP) && t.length >= 4) {
|
|
2605
|
-
const s = t.substring(1, 4);
|
|
2606
|
-
return Ws.has(s);
|
|
2607
|
-
}
|
|
2608
|
-
return !1;
|
|
2609
|
-
};
|
|
2610
|
-
var k, St, te;
|
|
2611
|
-
class Bs {
|
|
2612
|
-
constructor(t) {
|
|
2613
|
-
I(this, St);
|
|
2614
|
-
I(this, k);
|
|
2615
|
-
t && a(this, St, te).call(this, t);
|
|
2616
|
-
}
|
|
2617
|
-
// Denormalise ASCII 0-9 to the user's numeral set. If not yet known, return as-is.
|
|
2618
|
-
// NOTE: normalise is always called before this, so it should be impossible for the numeral set to be unknown at this point.
|
|
2619
|
-
denormalise(t) {
|
|
2620
|
-
if (!e(this, k) || e(this, k) === "ascii")
|
|
2621
|
-
return t;
|
|
2622
|
-
const s = e(this, k) === "arabic-indic" ? 1632 : 1776;
|
|
2623
|
-
return t.replace(/[0-9]/g, (i) => String.fromCharCode(s + Number(i)));
|
|
2624
|
-
}
|
|
2625
|
-
// Normalize Eastern Arabic (U+0660-0669) and Persian/Extended Arabic-Indic (U+06F0-06F9) numerals to ASCII 0-9
|
|
2626
|
-
normalise(t) {
|
|
2627
|
-
if (!t)
|
|
2628
|
-
return "";
|
|
2629
|
-
if (a(this, St, te).call(this, t), e(this, k) === "ascii")
|
|
2630
|
-
return t;
|
|
2631
|
-
const s = e(this, k) === "arabic-indic" ? 1632 : 1776, i = e(this, k) === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
|
|
2632
|
-
return t.replace(i, (n) => String.fromCharCode(48 + (n.charCodeAt(0) - s)));
|
|
2633
|
-
}
|
|
2634
|
-
isAscii() {
|
|
2635
|
-
return !e(this, k) || e(this, k) === "ascii";
|
|
2636
|
-
}
|
|
2637
|
-
}
|
|
2638
|
-
k = new WeakMap(), St = new WeakSet(), // If any Arabic-Indic digits, then label it as that set. Same for Persian. Otherwise assume ASCII.
|
|
2639
|
-
te = function(t) {
|
|
2640
|
-
/[\u0660-\u0669]/.test(t) ? p(this, k, "arabic-indic") : /[\u06F0-\u06F9]/.test(t) ? p(this, k, "persian") : p(this, k, "ascii");
|
|
2641
|
-
};
|
|
2642
|
-
let $s = 0;
|
|
2643
|
-
var c, E, vt, G, Rt, It, kt, Ut, y, V, j, B, st, H, it, ht, nt, ct, o, F, ot, Be, $e, Fe, ee, Ge, Ve, je, Ye, Ke, se, ze, Xe, qe, Qe, Je, Nt, wt, Ze, ts, es, ss, is, ns, os, ls, dt, Wt, rs, ie, tt, ne, Bt, oe, lt, le, Dt, Q, re, ae, Lt, ue, as, us, hs, cs, he, ds;
|
|
2644
|
-
const ft = class ft {
|
|
2645
|
-
constructor(t, s = {}) {
|
|
2646
|
-
I(this, o);
|
|
2647
|
-
//* PRIVATE FIELDS
|
|
2648
|
-
I(this, c);
|
|
2649
|
-
I(this, E);
|
|
2650
|
-
I(this, vt);
|
|
2651
|
-
// country data
|
|
2652
|
-
I(this, G);
|
|
2653
|
-
I(this, Rt);
|
|
2654
|
-
I(this, It);
|
|
2655
|
-
I(this, kt);
|
|
2656
|
-
I(this, Ut);
|
|
2657
|
-
I(this, y);
|
|
2658
|
-
I(this, V);
|
|
2659
|
-
I(this, j);
|
|
2660
|
-
I(this, B);
|
|
2661
|
-
I(this, st);
|
|
2662
|
-
I(this, H);
|
|
2663
|
-
I(this, it);
|
|
2664
|
-
I(this, ht);
|
|
2665
|
-
I(this, nt);
|
|
2666
|
-
I(this, ct);
|
|
2667
|
-
this.id = $s++, Gt.validateInput(t);
|
|
2668
|
-
const i = Ns(s);
|
|
2669
|
-
p(this, E, { ...ce, ...i }), ws(e(this, E)), Ds(e(this, E)), p(this, c, new Gt(t, e(this, E), this.id)), p(this, vt, Ls()), p(this, H, new Bs(t.value)), this.promise = a(this, o, Be).call(this, e(this, E)), p(this, G, Ss(e(this, E)));
|
|
2670
|
-
const { dialCodes: n, dialCodeMaxLen: l, dialCodeToIso2Map: u } = Rs(
|
|
2671
|
-
e(this, G)
|
|
2672
|
-
);
|
|
2673
|
-
p(this, kt, n), p(this, Rt, l), p(this, It, u), p(this, Ut, new Map(e(this, G).map((h) => [h.iso2, h]))), a(this, o, $e).call(this);
|
|
2674
|
-
}
|
|
2675
|
-
//********************
|
|
2676
|
-
//* PUBLIC METHODS
|
|
2677
|
-
//********************
|
|
2678
|
-
//* Remove plugin.
|
|
2679
|
-
destroy() {
|
|
2680
|
-
e(this, c).telInput && (e(this, E).allowDropdown && a(this, o, lt).call(this, !0), e(this, B).abort(), p(this, B, null), e(this, c).destroy(), delete f.instances[this.id]);
|
|
2681
|
-
}
|
|
2682
|
-
// check if the instance is still valid (not destroyed/unmounted)
|
|
2683
|
-
isActive() {
|
|
2684
|
-
var t;
|
|
2685
|
-
return !!((t = e(this, c)) != null && t.telInput);
|
|
2686
|
-
}
|
|
2687
|
-
//* Get the extension from the current number.
|
|
2688
|
-
getExtension() {
|
|
2689
|
-
var t;
|
|
2690
|
-
return f.utils && e(this, c).telInput ? f.utils.getExtension(
|
|
2691
|
-
a(this, o, Q).call(this),
|
|
2692
|
-
(t = e(this, y)) == null ? void 0 : t.iso2
|
|
2693
|
-
) : "";
|
|
2694
|
-
}
|
|
2695
|
-
//* Format the number to the given format.
|
|
2696
|
-
getNumber(t) {
|
|
2697
|
-
var s;
|
|
2698
|
-
if (f.utils && e(this, c).telInput) {
|
|
2699
|
-
const i = (s = e(this, y)) == null ? void 0 : s.iso2, n = a(this, o, Q).call(this), l = f.utils.formatNumber(
|
|
2700
|
-
n,
|
|
2701
|
-
i,
|
|
2702
|
-
t
|
|
2703
|
-
);
|
|
2704
|
-
return e(this, H).denormalise(l);
|
|
2705
|
-
}
|
|
2706
|
-
return "";
|
|
2707
|
-
}
|
|
2708
|
-
//* Get the type of the entered number e.g. landline/mobile.
|
|
2709
|
-
getNumberType() {
|
|
2710
|
-
var t;
|
|
2711
|
-
return f.utils && e(this, c).telInput ? f.utils.getNumberType(
|
|
2712
|
-
a(this, o, Q).call(this),
|
|
2713
|
-
(t = e(this, y)) == null ? void 0 : t.iso2
|
|
2714
|
-
) : Ce.UNKNOWN_NUMBER_TYPE;
|
|
2715
|
-
}
|
|
2716
|
-
//* Get the country data for the currently selected country.
|
|
2717
|
-
getSelectedCountryData() {
|
|
2718
|
-
return a(this, o, ae).call(this);
|
|
2719
|
-
}
|
|
2720
|
-
//* Get the validation error.
|
|
2721
|
-
getValidationError() {
|
|
2722
|
-
var t;
|
|
2723
|
-
if (f.utils && e(this, c).telInput) {
|
|
2724
|
-
const s = (t = e(this, y)) == null ? void 0 : t.iso2;
|
|
2725
|
-
return f.utils.getValidationError(a(this, o, Q).call(this), s);
|
|
2726
|
-
}
|
|
2727
|
-
return Ce.UNKNOWN_VALIDATION_ERROR;
|
|
2728
|
-
}
|
|
2729
|
-
//* Validate the input val using number length only
|
|
2730
|
-
isValidNumber() {
|
|
2731
|
-
var i, n;
|
|
2732
|
-
const t = (i = e(this, y)) == null ? void 0 : i.dialCode, s = (n = e(this, y)) == null ? void 0 : n.iso2;
|
|
2733
|
-
if (f.utils && e(this, c).telInput) {
|
|
2734
|
-
const l = a(this, o, Q).call(this), u = f.utils.getCoreNumber(l, s);
|
|
2735
|
-
if (u) {
|
|
2736
|
-
if (t === jt.DIAL_CODE && u[0] === jt.MOBILE_PREFIX && u.length !== jt.MOBILE_CORE_LENGTH)
|
|
2737
|
-
return !1;
|
|
2738
|
-
if (!Z.ALPHA_UNICODE.test(l) && t) {
|
|
2739
|
-
const d = l.startsWith("+") ? l.slice(1 + t.length) : l, C = pt(d).length;
|
|
2740
|
-
if (u.length > C)
|
|
2741
|
-
return !1;
|
|
2742
|
-
}
|
|
2743
|
-
}
|
|
2744
|
-
}
|
|
2745
|
-
return a(this, o, he).call(this, !1);
|
|
2746
|
-
}
|
|
2747
|
-
//* Validate the input val with precise validation
|
|
2748
|
-
isValidNumberPrecise() {
|
|
2749
|
-
return a(this, o, he).call(this, !0);
|
|
2750
|
-
}
|
|
2751
|
-
//* Update the selected country, and update the input val accordingly.
|
|
2752
|
-
setCountry(t) {
|
|
2753
|
-
var l, u;
|
|
2754
|
-
if (!e(this, c).telInput)
|
|
2755
|
-
return;
|
|
2756
|
-
const s = t == null ? void 0 : t.toLowerCase();
|
|
2757
|
-
if (!At(s))
|
|
2758
|
-
throw new Error(`Invalid country code: '${s}'`);
|
|
2759
|
-
const i = (l = e(this, y)) == null ? void 0 : l.iso2;
|
|
2760
|
-
if (t && s !== i || !t && i) {
|
|
2761
|
-
if (a(this, o, tt).call(this, s), a(this, o, le).call(this, ((u = e(this, y)) == null ? void 0 : u.dialCode) || ""), e(this, E).formatOnDisplay) {
|
|
2762
|
-
const h = a(this, o, F).call(this);
|
|
2763
|
-
a(this, o, dt).call(this, h);
|
|
2764
|
-
}
|
|
2765
|
-
a(this, o, Lt).call(this);
|
|
2766
|
-
}
|
|
2767
|
-
}
|
|
2768
|
-
//* Set the input value and update the country.
|
|
2769
|
-
setNumber(t) {
|
|
2770
|
-
if (!e(this, c).telInput)
|
|
2771
|
-
return;
|
|
2772
|
-
const s = e(this, H).normalise(t), i = a(this, o, Wt).call(this, s);
|
|
2773
|
-
a(this, o, dt).call(this, s), i && a(this, o, Lt).call(this), a(this, o, Nt).call(this, Ht.INPUT, { isSetNumber: !0 });
|
|
2774
|
-
}
|
|
2775
|
-
//* Set the placeholder number typ
|
|
2776
|
-
setPlaceholderNumberType(t) {
|
|
2777
|
-
e(this, c).telInput && (e(this, E).placeholderNumberType = t, a(this, o, Bt).call(this));
|
|
2778
|
-
}
|
|
2779
|
-
setDisabled(t) {
|
|
2780
|
-
e(this, c).telInput && (e(this, c).telInput.disabled = t, e(this, c).selectedCountry && (t ? e(this, c).selectedCountry.setAttribute("disabled", "true") : e(this, c).selectedCountry.removeAttribute("disabled")));
|
|
2781
|
-
}
|
|
2782
|
-
//********************
|
|
2783
|
-
//* STATIC METHODS
|
|
2784
|
-
//********************
|
|
2785
|
-
// Internal instance notification used by utils/geoip loaders.
|
|
2786
|
-
// Kept public so module-level helpers (e.g. attachUtils) can call it, while still allowing
|
|
2787
|
-
// access to private instance methods.
|
|
2788
|
-
static forEachInstance(t, ...s) {
|
|
2789
|
-
const i = Object.values(f.instances), n = s[0];
|
|
2790
|
-
i.forEach((l) => {
|
|
2791
|
-
var u, h, d, C;
|
|
2792
|
-
if (l instanceof ft)
|
|
2793
|
-
switch (t) {
|
|
2794
|
-
case "handleUtils":
|
|
2795
|
-
a(u = l, o, us).call(u);
|
|
2796
|
-
break;
|
|
2797
|
-
case "handleUtilsFailure":
|
|
2798
|
-
a(h = l, o, hs).call(h, n);
|
|
2799
|
-
break;
|
|
2800
|
-
case "handleAutoCountry":
|
|
2801
|
-
a(d = l, o, ue).call(d);
|
|
2802
|
-
break;
|
|
2803
|
-
case "handleAutoCountryFailure":
|
|
2804
|
-
a(C = l, o, as).call(C);
|
|
2805
|
-
break;
|
|
2806
|
-
}
|
|
2807
|
-
});
|
|
2808
|
-
}
|
|
2809
|
-
};
|
|
2810
|
-
c = new WeakMap(), E = new WeakMap(), vt = new WeakMap(), G = new WeakMap(), Rt = new WeakMap(), It = new WeakMap(), kt = new WeakMap(), Ut = new WeakMap(), y = new WeakMap(), V = new WeakMap(), j = new WeakMap(), B = new WeakMap(), st = new WeakMap(), H = new WeakMap(), it = new WeakMap(), ht = new WeakMap(), nt = new WeakMap(), ct = new WeakMap(), o = new WeakSet(), F = function() {
|
|
2811
|
-
const t = e(this, c).telInput.value.trim();
|
|
2812
|
-
return e(this, H).normalise(t);
|
|
2813
|
-
}, ot = function(t) {
|
|
2814
|
-
e(this, c).telInput.value = e(this, H).denormalise(t);
|
|
2815
|
-
}, Be = function(t) {
|
|
2816
|
-
const { initialCountry: s, geoIpLookup: i, loadUtils: n } = t, l = s === bt.AUTO && !!i, u = !!n && !f.utils;
|
|
2817
|
-
let h;
|
|
2818
|
-
l ? h = new Promise((C, m) => {
|
|
2819
|
-
p(this, it, C), p(this, ht, m);
|
|
2820
|
-
}) : (h = Promise.resolve(void 0), p(this, it, () => {
|
|
2821
|
-
}), p(this, ht, () => {
|
|
2822
|
-
}));
|
|
2823
|
-
let d;
|
|
2824
|
-
return u ? d = new Promise((C, m) => {
|
|
2825
|
-
p(this, nt, C), p(this, ct, m);
|
|
2826
|
-
}) : (d = Promise.resolve(void 0), p(this, nt, () => {
|
|
2827
|
-
}), p(this, ct, () => {
|
|
2828
|
-
})), Promise.all([h, d]).then(() => {
|
|
2829
|
-
});
|
|
2830
|
-
}, $e = function() {
|
|
2831
|
-
p(this, y, null), p(this, B, new AbortController()), a(this, o, Fe).call(this), e(this, c).generateMarkup(e(this, G)), a(this, o, ee).call(this), a(this, o, Ge).call(this), a(this, o, Ye).call(this), e(this, E).dropdownAlwaysOpen && a(this, o, wt).call(this);
|
|
2832
|
-
}, //********************
|
|
2833
|
-
//* PRIVATE METHODS
|
|
2834
|
-
//********************
|
|
2835
|
-
//* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
|
|
2836
|
-
Fe = function() {
|
|
2837
|
-
vs(e(this, G), e(this, E)), ks(e(this, G), e(this, E)), Us(e(this, G));
|
|
2838
|
-
}, //* Set the initial state of the input value and the selected country by:
|
|
2839
|
-
//* 1. Extracting a dial code from the given number
|
|
2840
|
-
//* 2. Using explicit initialCountry
|
|
2841
|
-
ee = function(t = !1) {
|
|
2842
|
-
const s = e(this, c).telInput.getAttribute("value"), i = e(this, H).normalise(s), n = a(this, o, F).call(this), u = i && i.startsWith("+") && (!n || !n.startsWith("+")) ? i : n, h = a(this, o, Dt).call(this, u), d = we(u), { initialCountry: C, geoIpLookup: m } = e(this, E), O = C === bt.AUTO && m && !t, v = At(C);
|
|
2843
|
-
h ? d ? v ? a(this, o, tt).call(this, C) : O || a(this, o, tt).call(this, Cs.ISO2) : a(this, o, Wt).call(this, u) : v ? a(this, o, tt).call(this, C) : O || a(this, o, tt).call(this, ""), u && a(this, o, dt).call(this, u);
|
|
2844
|
-
}, //* Initialise the main event listeners: input keyup, and click selected country.
|
|
2845
|
-
Ge = function() {
|
|
2846
|
-
a(this, o, ze).call(this), e(this, E).allowDropdown && a(this, o, je).call(this), (e(this, c).hiddenInput || e(this, c).hiddenInputCountry) && e(this, c).telInput.form && a(this, o, Ve).call(this);
|
|
2847
|
-
}, //* Update hidden input on form submit.
|
|
2848
|
-
Ve = function() {
|
|
2849
|
-
var s;
|
|
2850
|
-
const t = () => {
|
|
2851
|
-
var i;
|
|
2852
|
-
e(this, c).hiddenInput && (e(this, c).hiddenInput.value = this.getNumber()), e(this, c).hiddenInputCountry && (e(this, c).hiddenInputCountry.value = ((i = e(this, y)) == null ? void 0 : i.iso2) || "");
|
|
2853
|
-
};
|
|
2854
|
-
(s = e(this, c).telInput.form) == null || s.addEventListener("submit", t, {
|
|
2855
|
-
signal: e(this, B).signal
|
|
2856
|
-
});
|
|
2857
|
-
}, //* initialise the dropdown listeners.
|
|
2858
|
-
je = function() {
|
|
2859
|
-
const t = e(this, B).signal, s = (u) => {
|
|
2860
|
-
e(this, c).isDropdownClosed() ? e(this, c).telInput.focus() : u.preventDefault();
|
|
2861
|
-
}, i = e(this, c).telInput.closest("label");
|
|
2862
|
-
i && i.addEventListener("click", s, { signal: t });
|
|
2863
|
-
const n = () => {
|
|
2864
|
-
e(this, c).isDropdownClosed() && !e(this, c).telInput.disabled && !e(this, c).telInput.readOnly && a(this, o, wt).call(this);
|
|
2865
|
-
};
|
|
2866
|
-
e(this, c).selectedCountry.addEventListener(
|
|
2867
|
-
"click",
|
|
2868
|
-
n,
|
|
2869
|
-
{
|
|
2870
|
-
signal: t
|
|
2871
|
-
}
|
|
2872
|
-
);
|
|
2873
|
-
const l = (u) => {
|
|
2874
|
-
const h = [S.ARROW_UP, S.ARROW_DOWN, S.SPACE, S.ENTER];
|
|
2875
|
-
e(this, c).isDropdownClosed() && h.includes(u.key) && (u.preventDefault(), u.stopPropagation(), a(this, o, wt).call(this)), u.key === S.TAB && a(this, o, lt).call(this);
|
|
2876
|
-
};
|
|
2877
|
-
e(this, c).countryContainer.addEventListener(
|
|
2878
|
-
"keydown",
|
|
2879
|
-
l,
|
|
2880
|
-
{ signal: t }
|
|
2881
|
-
);
|
|
2882
|
-
}, //* Init requests: utils script / geo ip lookup.
|
|
2883
|
-
Ye = function() {
|
|
2884
|
-
var l;
|
|
2885
|
-
const { loadUtils: t, initialCountry: s, geoIpLookup: i } = e(this, E);
|
|
2886
|
-
if (t && !f.utils) {
|
|
2887
|
-
const u = () => {
|
|
2888
|
-
var h;
|
|
2889
|
-
(h = f.attachUtils(t)) == null || h.catch(() => {
|
|
2890
|
-
});
|
|
2891
|
-
};
|
|
2892
|
-
f.documentReady() ? u() : window.addEventListener("load", u, {
|
|
2893
|
-
signal: e(this, B).signal
|
|
2894
|
-
});
|
|
2895
|
-
} else
|
|
2896
|
-
e(this, nt).call(this);
|
|
2897
|
-
s === bt.AUTO && i && ((l = e(this, y)) != null && l.iso2 ? e(this, it).call(this) : a(this, o, Ke).call(this));
|
|
2898
|
-
}, //* Perform the geo ip lookup.
|
|
2899
|
-
Ke = function() {
|
|
2900
|
-
if (f.autoCountry)
|
|
2901
|
-
a(this, o, ue).call(this);
|
|
2902
|
-
else if (e(this, c).selectedCountryInner.classList.add(b.LOADING), !f.startedLoadingAutoCountry && (f.startedLoadingAutoCountry = !0, typeof e(this, E).geoIpLookup == "function")) {
|
|
2903
|
-
const t = (i = "") => {
|
|
2904
|
-
e(this, c).selectedCountryInner.classList.remove(b.LOADING);
|
|
2905
|
-
const n = i.toLowerCase();
|
|
2906
|
-
At(n) ? (f.autoCountry = n, setTimeout(() => ft.forEachInstance("handleAutoCountry"))) : ft.forEachInstance("handleAutoCountryFailure");
|
|
2907
|
-
}, s = () => {
|
|
2908
|
-
e(this, c).selectedCountryInner.classList.remove(b.LOADING), ft.forEachInstance("handleAutoCountryFailure");
|
|
2909
|
-
};
|
|
2910
|
-
e(this, E).geoIpLookup(t, s);
|
|
2911
|
-
}
|
|
2912
|
-
}, se = function() {
|
|
2913
|
-
a(this, o, wt).call(this), e(this, c).searchInput.value = "+", e(this, c).filterCountriesByQuery("");
|
|
2914
|
-
}, //* Initialize the tel input listeners.
|
|
2915
|
-
ze = function() {
|
|
2916
|
-
a(this, o, Xe).call(this), a(this, o, qe).call(this), a(this, o, Qe).call(this);
|
|
2917
|
-
}, Xe = function() {
|
|
2918
|
-
const {
|
|
2919
|
-
strictMode: t,
|
|
2920
|
-
formatAsYouType: s,
|
|
2921
|
-
separateDialCode: i,
|
|
2922
|
-
allowDropdown: n,
|
|
2923
|
-
countrySearch: l
|
|
2924
|
-
} = e(this, E);
|
|
2925
|
-
let u = !1;
|
|
2926
|
-
Z.ALPHA_UNICODE.test(a(this, o, F).call(this)) && (u = !0);
|
|
2927
|
-
const h = (d) => {
|
|
2928
|
-
var T;
|
|
2929
|
-
const C = a(this, o, F).call(this);
|
|
2930
|
-
if (e(this, vt) && (d == null ? void 0 : d.data) === "+" && i && n && l) {
|
|
2931
|
-
const M = e(this, c).telInput.selectionStart || 0, $ = C.substring(0, M - 1), Y = C.substring(M);
|
|
2932
|
-
a(this, o, ot).call(this, $ + Y), a(this, o, se).call(this);
|
|
2933
|
-
return;
|
|
2934
|
-
}
|
|
2935
|
-
a(this, o, Wt).call(this, C) && a(this, o, Lt).call(this);
|
|
2936
|
-
const m = (d == null ? void 0 : d.data) && Z.NON_PLUS_NUMERIC.test(d.data), A = (d == null ? void 0 : d.inputType) === fe.PASTE && C;
|
|
2937
|
-
m || A && !t ? u = !0 : Z.NON_PLUS_NUMERIC.test(C) || (u = !1);
|
|
2938
|
-
const O = (d == null ? void 0 : d.detail) && d.detail.isSetNumber, v = e(this, H).isAscii();
|
|
2939
|
-
if (s && !u && !O && v) {
|
|
2940
|
-
const M = e(this, c).telInput.selectionStart || 0, Y = C.substring(
|
|
2941
|
-
0,
|
|
2942
|
-
M
|
|
2943
|
-
).replace(
|
|
2944
|
-
Z.NON_PLUS_NUMERIC_GLOBAL,
|
|
2945
|
-
""
|
|
2946
|
-
).length, P = (d == null ? void 0 : d.inputType) === fe.DELETE_FWD, J = a(this, o, Q).call(this), K = Hs(
|
|
2947
|
-
J,
|
|
2948
|
-
C,
|
|
2949
|
-
f.utils,
|
|
2950
|
-
e(this, y) ?? {},
|
|
2951
|
-
i
|
|
2952
|
-
), U = Ms(
|
|
2953
|
-
Y,
|
|
2954
|
-
K,
|
|
2955
|
-
M,
|
|
2956
|
-
P
|
|
2957
|
-
);
|
|
2958
|
-
a(this, o, ot).call(this, K), e(this, c).telInput.setSelectionRange(U, U);
|
|
2959
|
-
}
|
|
2960
|
-
if (i && C.startsWith("+") && ((T = e(this, y)) != null && T.dialCode)) {
|
|
2961
|
-
const M = Ne(
|
|
2962
|
-
C,
|
|
2963
|
-
!0,
|
|
2964
|
-
i,
|
|
2965
|
-
e(this, y) ?? {}
|
|
2966
|
-
);
|
|
2967
|
-
a(this, o, ot).call(this, M);
|
|
2968
|
-
}
|
|
2969
|
-
};
|
|
2970
|
-
e(this, c).telInput.addEventListener(
|
|
2971
|
-
"input",
|
|
2972
|
-
h,
|
|
2973
|
-
{
|
|
2974
|
-
signal: e(this, B).signal
|
|
2975
|
-
}
|
|
2976
|
-
);
|
|
2977
|
-
}, qe = function() {
|
|
2978
|
-
const { strictMode: t, separateDialCode: s, allowDropdown: i, countrySearch: n } = e(this, E);
|
|
2979
|
-
if (t || s) {
|
|
2980
|
-
const l = (u) => {
|
|
2981
|
-
var h;
|
|
2982
|
-
if (u.key && u.key.length === 1 && !u.altKey && !u.ctrlKey && !u.metaKey) {
|
|
2983
|
-
if (s && i && n && u.key === "+") {
|
|
2984
|
-
u.preventDefault(), a(this, o, se).call(this);
|
|
2985
|
-
return;
|
|
2986
|
-
}
|
|
2987
|
-
if (t) {
|
|
2988
|
-
const d = a(this, o, F).call(this), m = !d.startsWith("+") && e(this, c).telInput.selectionStart === 0 && u.key === "+", A = e(this, H).normalise(u.key), O = /^[0-9]$/.test(A), v = s ? O : m || O, T = e(this, c).telInput, M = T.selectionStart, $ = T.selectionEnd, Y = d.slice(0, M), P = d.slice($), J = Y + u.key + P, K = a(this, o, Q).call(this, J);
|
|
2989
|
-
let U = !1;
|
|
2990
|
-
f.utils && e(this, V) && (U = f.utils.getCoreNumber(
|
|
2991
|
-
K,
|
|
2992
|
-
(h = e(this, y)) == null ? void 0 : h.iso2
|
|
2993
|
-
).length > e(this, V));
|
|
2994
|
-
const Et = a(this, o, ie).call(this, K) !== null;
|
|
2995
|
-
(!v || U && !Et && !m) && u.preventDefault();
|
|
2996
|
-
}
|
|
2997
|
-
}
|
|
2998
|
-
};
|
|
2999
|
-
e(this, c).telInput.addEventListener("keydown", l, {
|
|
3000
|
-
signal: e(this, B).signal
|
|
3001
|
-
});
|
|
3002
|
-
}
|
|
3003
|
-
}, Qe = function() {
|
|
3004
|
-
if (e(this, E).strictMode) {
|
|
3005
|
-
const t = (s) => {
|
|
3006
|
-
var K;
|
|
3007
|
-
s.preventDefault();
|
|
3008
|
-
const i = e(this, c).telInput, n = i.selectionStart, l = i.selectionEnd, u = a(this, o, F).call(this), h = u.slice(0, n), d = u.slice(l), C = (K = e(this, y)) == null ? void 0 : K.iso2, m = s.clipboardData.getData("text"), A = e(this, H).normalise(m), O = n === 0 && l > 0, v = !u.startsWith("+") || O, T = A.replace(Z.NON_PLUS_NUMERIC_GLOBAL, ""), M = T.startsWith("+"), $ = T.replace(/\+/g, ""), Y = M && v ? `+${$}` : $;
|
|
3009
|
-
let P = h + Y + d;
|
|
3010
|
-
if (P.length > 5) {
|
|
3011
|
-
let U = f.utils.getCoreNumber(P, C);
|
|
3012
|
-
for (; U.length === 0 && P.length > 0; )
|
|
3013
|
-
P = P.slice(0, -1), U = f.utils.getCoreNumber(P, C);
|
|
3014
|
-
if (!U)
|
|
3015
|
-
return;
|
|
3016
|
-
if (e(this, V) && U.length > e(this, V))
|
|
3017
|
-
if (i.selectionEnd === u.length) {
|
|
3018
|
-
const xt = U.length - e(this, V);
|
|
3019
|
-
P = P.slice(0, P.length - xt);
|
|
3020
|
-
} else
|
|
3021
|
-
return;
|
|
3022
|
-
}
|
|
3023
|
-
a(this, o, ot).call(this, P);
|
|
3024
|
-
const J = n + Y.length;
|
|
3025
|
-
i.setSelectionRange(J, J), i.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
|
|
3026
|
-
};
|
|
3027
|
-
e(this, c).telInput.addEventListener("paste", t, {
|
|
3028
|
-
signal: e(this, B).signal
|
|
3029
|
-
});
|
|
3030
|
-
}
|
|
3031
|
-
}, //* Adhere to the input's maxlength attr.
|
|
3032
|
-
Je = function(t) {
|
|
3033
|
-
const s = Number(e(this, c).telInput.getAttribute("maxlength"));
|
|
3034
|
-
return s && t.length > s ? t.substring(0, s) : t;
|
|
3035
|
-
}, //* Trigger a custom event on the input (typed via ItiEventMap).
|
|
3036
|
-
Nt = function(t, s = {}) {
|
|
3037
|
-
const i = new CustomEvent(t, {
|
|
3038
|
-
bubbles: !0,
|
|
3039
|
-
cancelable: !0,
|
|
3040
|
-
detail: s
|
|
3041
|
-
});
|
|
3042
|
-
e(this, c).telInput.dispatchEvent(i);
|
|
3043
|
-
}, //* Open the dropdown.
|
|
3044
|
-
wt = function() {
|
|
3045
|
-
const { dropdownContainer: t, useFullscreenPopup: s } = e(this, E);
|
|
3046
|
-
if (p(this, st, new AbortController()), e(this, c).openDropdown(), !s && t) {
|
|
3047
|
-
const i = () => a(this, o, lt).call(this);
|
|
3048
|
-
window.addEventListener("scroll", i, {
|
|
3049
|
-
signal: e(this, st).signal
|
|
3050
|
-
});
|
|
3051
|
-
}
|
|
3052
|
-
a(this, o, Ze).call(this), a(this, o, Nt).call(this, Ht.OPEN_COUNTRY_DROPDOWN);
|
|
3053
|
-
}, //* We only bind dropdown listeners when the dropdown is open.
|
|
3054
|
-
Ze = function() {
|
|
3055
|
-
const t = e(this, st).signal;
|
|
3056
|
-
a(this, o, ts).call(this, t), a(this, o, es).call(this, t), e(this, E).dropdownAlwaysOpen || a(this, o, ss).call(this, t), a(this, o, is).call(this, t), e(this, E).countrySearch && a(this, o, ns).call(this, t);
|
|
3057
|
-
}, //* When mouse over a list item, just highlight that one
|
|
3058
|
-
//* we add the class "highlight", so if they hit "enter" we know which one to select.
|
|
3059
|
-
ts = function(t) {
|
|
3060
|
-
const s = (i) => {
|
|
3061
|
-
var l;
|
|
3062
|
-
const n = (l = i.target) == null ? void 0 : l.closest(
|
|
3063
|
-
`.${b.COUNTRY_ITEM}`
|
|
3064
|
-
);
|
|
3065
|
-
n && e(this, c).highlightListItem(n, !1);
|
|
3066
|
-
};
|
|
3067
|
-
e(this, c).countryList.addEventListener(
|
|
3068
|
-
"mouseover",
|
|
3069
|
-
s,
|
|
3070
|
-
{
|
|
3071
|
-
signal: t
|
|
3072
|
-
}
|
|
3073
|
-
);
|
|
3074
|
-
}, //* Listen for country selection.
|
|
3075
|
-
es = function(t) {
|
|
3076
|
-
const s = (i) => {
|
|
3077
|
-
var l;
|
|
3078
|
-
const n = (l = i.target) == null ? void 0 : l.closest(
|
|
3079
|
-
`.${b.COUNTRY_ITEM}`
|
|
3080
|
-
);
|
|
3081
|
-
n && a(this, o, oe).call(this, n);
|
|
3082
|
-
};
|
|
3083
|
-
e(this, c).countryList.addEventListener("click", s, {
|
|
3084
|
-
signal: t
|
|
3085
|
-
});
|
|
3086
|
-
}, //* Click off to close (except when this initial opening click is bubbling up).
|
|
3087
|
-
//* We cannot just stopPropagation as it may be needed to close another instance.
|
|
3088
|
-
ss = function(t) {
|
|
3089
|
-
const s = (i) => {
|
|
3090
|
-
!!i.target.closest(
|
|
3091
|
-
`#iti-${this.id}__dropdown-content`
|
|
3092
|
-
) || a(this, o, lt).call(this);
|
|
3093
|
-
};
|
|
3094
|
-
setTimeout(() => {
|
|
3095
|
-
document.documentElement.addEventListener(
|
|
3096
|
-
"click",
|
|
3097
|
-
s,
|
|
3098
|
-
{ signal: t }
|
|
3099
|
-
);
|
|
3100
|
-
}, 0);
|
|
3101
|
-
}, //* Listen for up/down scrolling, enter to select, or escape to close.
|
|
3102
|
-
//* Use keydown as keypress doesn't fire for non-char keys and we want to catch if they
|
|
3103
|
-
//* just hit down and hold it to scroll down (no keyup event).
|
|
3104
|
-
//* Listen on the document because that's where key events are triggered if no input has focus.
|
|
3105
|
-
is = function(t) {
|
|
3106
|
-
let s = "", i = null;
|
|
3107
|
-
const n = (l) => {
|
|
3108
|
-
[
|
|
3109
|
-
S.ARROW_UP,
|
|
3110
|
-
S.ARROW_DOWN,
|
|
3111
|
-
S.ENTER,
|
|
3112
|
-
S.ESC
|
|
3113
|
-
].includes(l.key) && (l.preventDefault(), l.stopPropagation(), l.key === S.ARROW_UP || l.key === S.ARROW_DOWN ? e(this, c).handleUpDownKey(l.key) : l.key === S.ENTER && !l.isComposing ? a(this, o, ls).call(this) : l.key === S.ESC && (a(this, o, lt).call(this), e(this, c).selectedCountry.focus())), !e(this, E).countrySearch && Z.HIDDEN_SEARCH_CHAR.test(l.key) && (l.stopPropagation(), i && clearTimeout(i), s += l.key.toLowerCase(), a(this, o, os).call(this, s), i = setTimeout(() => {
|
|
3114
|
-
s = "";
|
|
3115
|
-
}, De.HIDDEN_SEARCH_RESET_MS));
|
|
3116
|
-
};
|
|
3117
|
-
document.addEventListener("keydown", n, { signal: t });
|
|
3118
|
-
}, //* Search input listeners when countrySearch enabled.
|
|
3119
|
-
ns = function(t) {
|
|
3120
|
-
e(this, c).searchInput.addEventListener(
|
|
3121
|
-
"input",
|
|
3122
|
-
() => e(this, c).handleSearchChange(),
|
|
3123
|
-
{ signal: t }
|
|
3124
|
-
), e(this, c).searchClearButton.addEventListener(
|
|
3125
|
-
"click",
|
|
3126
|
-
() => e(this, c).handleSearchClear(),
|
|
3127
|
-
{ signal: t }
|
|
3128
|
-
);
|
|
3129
|
-
}, //* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
|
|
3130
|
-
os = function(t) {
|
|
3131
|
-
const s = _s(e(this, G), t);
|
|
3132
|
-
if (s) {
|
|
3133
|
-
const i = s.nodeById[this.id];
|
|
3134
|
-
e(this, c).highlightListItem(i, !1), e(this, c).scrollCountryListToItem(i);
|
|
3135
|
-
}
|
|
3136
|
-
}, //* Select the currently highlighted item.
|
|
3137
|
-
ls = function() {
|
|
3138
|
-
e(this, c).highlightedItem && a(this, o, oe).call(this, e(this, c).highlightedItem);
|
|
3139
|
-
}, //* Update the input's value to the given val (format first if possible)
|
|
3140
|
-
//* NOTE: this is called from _setInitialState, handleUtils and setNumber.
|
|
3141
|
-
dt = function(t) {
|
|
3142
|
-
var u;
|
|
3143
|
-
const { formatOnDisplay: s, nationalMode: i, separateDialCode: n } = e(this, E);
|
|
3144
|
-
let l = t;
|
|
3145
|
-
if (s && f.utils && e(this, y)) {
|
|
3146
|
-
const h = be(t), d = i && !h || !l.startsWith("+") && !n, { NATIONAL: C, INTERNATIONAL: m } = f.utils.numberFormat, A = d ? C : m;
|
|
3147
|
-
l = f.utils.formatNumber(
|
|
3148
|
-
l,
|
|
3149
|
-
(u = e(this, y)) == null ? void 0 : u.iso2,
|
|
3150
|
-
A
|
|
3151
|
-
);
|
|
3152
|
-
}
|
|
3153
|
-
l = a(this, o, re).call(this, l), a(this, o, ot).call(this, l);
|
|
3154
|
-
}, //* Check if need to select a new country based on the given number
|
|
3155
|
-
//* Note: called from _setInitialState, keyup handler, setNumber.
|
|
3156
|
-
Wt = function(t) {
|
|
3157
|
-
const s = a(this, o, ie).call(this, t);
|
|
3158
|
-
return s !== null ? a(this, o, tt).call(this, s) : !1;
|
|
3159
|
-
}, // if there is a selected country, and the number doesn't start with a dial code, then add it
|
|
3160
|
-
rs = function(t) {
|
|
3161
|
-
var h, d;
|
|
3162
|
-
const s = (h = e(this, y)) == null ? void 0 : h.dialCode, i = (d = e(this, y)) == null ? void 0 : d.nationalPrefix;
|
|
3163
|
-
if (t.startsWith("+") || !s)
|
|
3164
|
-
return t;
|
|
3165
|
-
const u = i && t.startsWith(i) && !e(this, E).separateDialCode ? t.substring(1) : t;
|
|
3166
|
-
return `+${s}${u}`;
|
|
3167
|
-
}, //* Get the new country based on the input number, or return null if no change, or empty string if should be empty (e.g. if they type an invalid dial code).
|
|
3168
|
-
ie = function(t) {
|
|
3169
|
-
var d, C, m, A, O;
|
|
3170
|
-
const s = t.indexOf("+");
|
|
3171
|
-
let i = s ? t.substring(s) : t;
|
|
3172
|
-
const n = (d = e(this, y)) == null ? void 0 : d.iso2, l = (C = e(this, y)) == null ? void 0 : C.dialCode;
|
|
3173
|
-
i = a(this, o, rs).call(this, i);
|
|
3174
|
-
const u = a(this, o, Dt).call(this, i, !0), h = pt(i);
|
|
3175
|
-
if (u) {
|
|
3176
|
-
const v = pt(u), T = e(this, It)[v];
|
|
3177
|
-
if (T.length === 1)
|
|
3178
|
-
return T[0] === n ? null : T[0];
|
|
3179
|
-
if (!n && e(this, j) && T.includes(e(this, j)))
|
|
3180
|
-
return e(this, j);
|
|
3181
|
-
if (l === Le.NANP && we(h))
|
|
3182
|
-
return null;
|
|
3183
|
-
const $ = (m = e(this, y)) == null ? void 0 : m.areaCodes, Y = (A = e(this, y)) == null ? void 0 : A.priority;
|
|
3184
|
-
if ($) {
|
|
3185
|
-
const xt = $.map(
|
|
3186
|
-
(Et) => `${l}${Et}`
|
|
3187
|
-
);
|
|
3188
|
-
for (const Et of xt)
|
|
3189
|
-
if (h.startsWith(Et))
|
|
3190
|
-
return null;
|
|
3191
|
-
}
|
|
3192
|
-
const J = $ && !(Y === 0) && h.length > v.length, K = n && T.includes(n) && !J, U = n === T[0];
|
|
3193
|
-
if (!K && !U)
|
|
3194
|
-
return T[0];
|
|
3195
|
-
} else if (i.startsWith("+") && h.length) {
|
|
3196
|
-
const v = ((O = e(this, y)) == null ? void 0 : O.dialCode) || "";
|
|
3197
|
-
return v && v.startsWith(h) ? null : "";
|
|
3198
|
-
} else if ((!i || i === "+") && !n && e(this, j))
|
|
3199
|
-
return e(this, j);
|
|
3200
|
-
return null;
|
|
3201
|
-
}, //* Update the selected country, dial code (if separateDialCode), placeholder, title, and selected list item.
|
|
3202
|
-
//* Note: called from _setInitialState, _updateCountryFromNumber, _selectListItem, setCountry.
|
|
3203
|
-
tt = function(t) {
|
|
3204
|
-
var i, n;
|
|
3205
|
-
const s = ((i = e(this, y)) == null ? void 0 : i.iso2) || "";
|
|
3206
|
-
return p(this, y, t ? e(this, Ut).get(t) : null), (n = e(this, y)) != null && n.iso2 && p(this, j, e(this, y).iso2), e(this, c).setCountry(e(this, y) ?? {}), a(this, o, Bt).call(this), a(this, o, ne).call(this), s !== t;
|
|
3207
|
-
}, //* Update the maximum valid number length for the currently selected country.
|
|
3208
|
-
ne = function() {
|
|
3209
|
-
var l;
|
|
3210
|
-
const { strictMode: t, placeholderNumberType: s, allowedNumberTypes: i } = e(this, E), n = (l = e(this, y)) == null ? void 0 : l.iso2;
|
|
3211
|
-
if (t && f.utils)
|
|
3212
|
-
if (n) {
|
|
3213
|
-
const u = f.utils.numberType[s];
|
|
3214
|
-
let h = f.utils.getExampleNumber(
|
|
3215
|
-
n,
|
|
3216
|
-
!1,
|
|
3217
|
-
u,
|
|
3218
|
-
!0
|
|
3219
|
-
), d = h;
|
|
3220
|
-
for (; f.utils.isPossibleNumber(
|
|
3221
|
-
h,
|
|
3222
|
-
n,
|
|
3223
|
-
i
|
|
3224
|
-
); )
|
|
3225
|
-
d = h, h += "0";
|
|
3226
|
-
const C = f.utils.getCoreNumber(d, n);
|
|
3227
|
-
p(this, V, C.length), n === "by" && p(this, V, C.length + 1);
|
|
3228
|
-
} else
|
|
3229
|
-
p(this, V, null);
|
|
3230
|
-
}, //* Update the input placeholder to an example number from the currently selected country.
|
|
3231
|
-
Bt = function() {
|
|
3232
|
-
var u;
|
|
3233
|
-
const {
|
|
3234
|
-
autoPlaceholder: t,
|
|
3235
|
-
placeholderNumberType: s,
|
|
3236
|
-
nationalMode: i,
|
|
3237
|
-
customPlaceholder: n
|
|
3238
|
-
} = e(this, E), l = t === $t.AGGRESSIVE || !e(this, c).hadInitialPlaceholder && t === $t.POLITE;
|
|
3239
|
-
if (f.utils && l) {
|
|
3240
|
-
const h = f.utils.numberType[s];
|
|
3241
|
-
let d = (u = e(this, y)) != null && u.iso2 ? f.utils.getExampleNumber(
|
|
3242
|
-
e(this, y).iso2,
|
|
3243
|
-
i,
|
|
3244
|
-
h
|
|
3245
|
-
) : "";
|
|
3246
|
-
d = a(this, o, re).call(this, d), typeof n == "function" && (d = n(d, e(this, y) ?? {})), e(this, c).telInput.setAttribute("placeholder", d);
|
|
3247
|
-
}
|
|
3248
|
-
}, //* Called when the user selects a list item from the dropdown.
|
|
3249
|
-
oe = function(t) {
|
|
3250
|
-
const s = t.dataset[ye.COUNTRY_CODE], i = a(this, o, tt).call(this, s);
|
|
3251
|
-
a(this, o, lt).call(this);
|
|
3252
|
-
const n = t.dataset[ye.DIAL_CODE];
|
|
3253
|
-
if (a(this, o, le).call(this, n), e(this, E).formatOnDisplay) {
|
|
3254
|
-
const l = a(this, o, F).call(this);
|
|
3255
|
-
a(this, o, dt).call(this, l);
|
|
3256
|
-
}
|
|
3257
|
-
e(this, c).telInput.focus(), i && a(this, o, Lt).call(this);
|
|
3258
|
-
}, //* Close the dropdown and unbind any listeners.
|
|
3259
|
-
lt = function(t) {
|
|
3260
|
-
e(this, c).isDropdownClosed() || e(this, E).dropdownAlwaysOpen && !t || (e(this, c).closeDropdown(), e(this, st).abort(), p(this, st, null), a(this, o, Nt).call(this, Ht.CLOSE_COUNTRY_DROPDOWN));
|
|
3261
|
-
}, //* Replace any existing dial code with the new one
|
|
3262
|
-
//* Note: called from _selectListItem and setCountry
|
|
3263
|
-
le = function(t) {
|
|
3264
|
-
const s = a(this, o, F).call(this), i = `+${t}`;
|
|
3265
|
-
let n;
|
|
3266
|
-
if (s.startsWith("+")) {
|
|
3267
|
-
const l = a(this, o, Dt).call(this, s);
|
|
3268
|
-
l ? n = s.replace(l, i) : n = i, a(this, o, ot).call(this, n);
|
|
3269
|
-
}
|
|
3270
|
-
}, //* Try and extract a valid international dial code from a full telephone number.
|
|
3271
|
-
//* Note: returns the raw string inc plus character and any whitespace/dots etc.
|
|
3272
|
-
Dt = function(t, s) {
|
|
3273
|
-
let i = "";
|
|
3274
|
-
if (t.startsWith("+")) {
|
|
3275
|
-
let n = "", l = !1;
|
|
3276
|
-
for (let u = 0; u < t.length; u++) {
|
|
3277
|
-
const h = t.charAt(u);
|
|
3278
|
-
if (/[0-9]/.test(h)) {
|
|
3279
|
-
if (n += h, !!!e(this, It)[n])
|
|
3280
|
-
break;
|
|
3281
|
-
if (e(this, kt).has(n)) {
|
|
3282
|
-
if (i = t.substring(0, u + 1), l = !0, !s)
|
|
3283
|
-
break;
|
|
3284
|
-
} else s && l && (i = t.substring(0, u + 1));
|
|
3285
|
-
if (n.length === e(this, Rt))
|
|
3286
|
-
break;
|
|
3287
|
-
}
|
|
3288
|
-
}
|
|
3289
|
-
}
|
|
3290
|
-
return i;
|
|
3291
|
-
}, //* Get the input val, adding the dial code if separateDialCode is enabled.
|
|
3292
|
-
Q = function(t) {
|
|
3293
|
-
var u;
|
|
3294
|
-
const s = t ? e(this, H).normalise(t) : a(this, o, F).call(this), i = (u = e(this, y)) == null ? void 0 : u.dialCode;
|
|
3295
|
-
let n;
|
|
3296
|
-
const l = pt(s);
|
|
3297
|
-
return e(this, E).separateDialCode && !s.startsWith("+") && i && l ? n = `+${i}` : n = "", n + s;
|
|
3298
|
-
}, //* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
|
|
3299
|
-
re = function(t) {
|
|
3300
|
-
const s = !!a(this, o, Dt).call(this, t), i = Ne(
|
|
3301
|
-
t,
|
|
3302
|
-
s,
|
|
3303
|
-
e(this, E).separateDialCode,
|
|
3304
|
-
e(this, y) ?? {}
|
|
3305
|
-
);
|
|
3306
|
-
return a(this, o, Je).call(this, i);
|
|
3307
|
-
}, //* Return only the public-facing subset of the selected country data.
|
|
3308
|
-
ae = function() {
|
|
3309
|
-
const t = e(this, y);
|
|
3310
|
-
if (!t) return {};
|
|
3311
|
-
const { iso2: s, dialCode: i, name: n } = t;
|
|
3312
|
-
return { iso2: s, dialCode: i, name: n };
|
|
3313
|
-
}, //* Trigger the 'countrychange' event.
|
|
3314
|
-
Lt = function() {
|
|
3315
|
-
const t = a(this, o, ae).call(this);
|
|
3316
|
-
a(this, o, Nt).call(this, Ht.COUNTRY_CHANGE, t);
|
|
3317
|
-
}, //**************************
|
|
3318
|
-
//* INTERNAL METHODS
|
|
3319
|
-
//**************************
|
|
3320
|
-
//* Called when the geoip call returns.
|
|
3321
|
-
ue = function() {
|
|
3322
|
-
var t, s;
|
|
3323
|
-
if (!e(this, c).telInput) {
|
|
3324
|
-
(t = e(this, it)) == null || t.call(this);
|
|
3325
|
-
return;
|
|
3326
|
-
}
|
|
3327
|
-
e(this, E).initialCountry === bt.AUTO && f.autoCountry && (p(this, j, f.autoCountry), (s = e(this, y)) != null && s.iso2 || e(this, c).selectedCountryInner.classList.contains(b.GLOBE) || this.setCountry(e(this, j)), e(this, it).call(this));
|
|
3328
|
-
}, //* Called when the geoip call fails or times out.
|
|
3329
|
-
as = function() {
|
|
3330
|
-
var t;
|
|
3331
|
-
if (!e(this, c).telInput) {
|
|
3332
|
-
(t = e(this, ht)) == null || t.call(this);
|
|
3333
|
-
return;
|
|
3334
|
-
}
|
|
3335
|
-
a(this, o, ee).call(this, !0), e(this, ht).call(this);
|
|
3336
|
-
}, //* Called when the utils request completes.
|
|
3337
|
-
us = function() {
|
|
3338
|
-
var t, s;
|
|
3339
|
-
if (!e(this, c).telInput) {
|
|
3340
|
-
(t = e(this, nt)) == null || t.call(this);
|
|
3341
|
-
return;
|
|
3342
|
-
}
|
|
3343
|
-
if (f.utils) {
|
|
3344
|
-
const i = a(this, o, F).call(this);
|
|
3345
|
-
i && a(this, o, dt).call(this, i), (s = e(this, y)) != null && s.iso2 && (a(this, o, Bt).call(this), a(this, o, ne).call(this));
|
|
3346
|
-
}
|
|
3347
|
-
e(this, nt).call(this);
|
|
3348
|
-
}, //* Called when the utils request fails or times out.
|
|
3349
|
-
hs = function(t) {
|
|
3350
|
-
var s;
|
|
3351
|
-
if (!e(this, c).telInput) {
|
|
3352
|
-
(s = e(this, ct)) == null || s.call(this, t);
|
|
3353
|
-
return;
|
|
3354
|
-
}
|
|
3355
|
-
e(this, ct).call(this, t);
|
|
3356
|
-
}, cs = function(t) {
|
|
3357
|
-
var s;
|
|
3358
|
-
return f.utils ? f.utils.isPossibleNumber(
|
|
3359
|
-
t,
|
|
3360
|
-
(s = e(this, y)) == null ? void 0 : s.iso2,
|
|
3361
|
-
e(this, E).allowedNumberTypes
|
|
3362
|
-
) : null;
|
|
3363
|
-
}, //* Shared internal validation logic to handle alpha character extension rules.
|
|
3364
|
-
he = function(t) {
|
|
3365
|
-
var d, C;
|
|
3366
|
-
if (!f.utils || !e(this, c).telInput)
|
|
3367
|
-
return null;
|
|
3368
|
-
const { allowNumberExtensions: s, allowPhonewords: i } = e(this, E), n = (m) => t ? a(this, o, ds).call(this, m) : a(this, o, cs).call(this, m), l = a(this, o, Q).call(this);
|
|
3369
|
-
if (!((d = e(this, y)) != null && d.iso2) && !be(l) || !n(l))
|
|
3370
|
-
return !1;
|
|
3371
|
-
if (l.search(Z.ALPHA_UNICODE) > -1) {
|
|
3372
|
-
const m = (C = e(this, y)) == null ? void 0 : C.iso2;
|
|
3373
|
-
return f.utils.getExtension(l, m) ? s : i;
|
|
3374
|
-
}
|
|
3375
|
-
return !0;
|
|
3376
|
-
}, ds = function(t) {
|
|
3377
|
-
var s;
|
|
3378
|
-
return f.utils ? f.utils.isValidNumber(
|
|
3379
|
-
t,
|
|
3380
|
-
(s = e(this, y)) == null ? void 0 : s.iso2,
|
|
3381
|
-
e(this, E).allowedNumberTypes
|
|
3382
|
-
) : null;
|
|
3383
|
-
};
|
|
3384
|
-
let Ot = ft;
|
|
3385
|
-
const Fs = (r) => {
|
|
3386
|
-
if (!f.utils && !f.startedLoadingUtilsScript) {
|
|
3387
|
-
let t;
|
|
3388
|
-
if (typeof r == "function")
|
|
3389
|
-
try {
|
|
3390
|
-
t = Promise.resolve(r());
|
|
3391
|
-
} catch (s) {
|
|
3392
|
-
return Promise.reject(s);
|
|
3393
|
-
}
|
|
3394
|
-
else
|
|
3395
|
-
return Promise.reject(
|
|
3396
|
-
new TypeError(
|
|
3397
|
-
`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof r}`
|
|
3398
|
-
)
|
|
3399
|
-
);
|
|
3400
|
-
return f.startedLoadingUtilsScript = !0, t.then((s) => {
|
|
3401
|
-
const i = s == null ? void 0 : s.default;
|
|
3402
|
-
if (!i || typeof i != "object")
|
|
3403
|
-
throw new TypeError(
|
|
3404
|
-
"The loader function passed to attachUtils did not resolve to a module object with utils as its default export."
|
|
3405
|
-
);
|
|
3406
|
-
return f.utils = i, Ot.forEachInstance("handleUtils"), !0;
|
|
3407
|
-
}).catch((s) => {
|
|
3408
|
-
throw Ot.forEachInstance("handleUtilsFailure", s), s;
|
|
3409
|
-
});
|
|
3410
|
-
}
|
|
3411
|
-
return null;
|
|
3412
|
-
}, f = Object.assign(
|
|
3413
|
-
(r, t) => {
|
|
3414
|
-
const s = new Ot(r, t);
|
|
3415
|
-
return f.instances[s.id] = s, r.iti = s, s;
|
|
3416
|
-
},
|
|
3417
|
-
{
|
|
3418
|
-
defaults: ce,
|
|
3419
|
-
//* Using a static var like this allows us to mock it in the tests.
|
|
3420
|
-
documentReady: () => document.readyState === "complete",
|
|
3421
|
-
//* Get the country data object.
|
|
3422
|
-
getCountryData: () => Ct,
|
|
3423
|
-
//* A getter for the plugin instance.
|
|
3424
|
-
getInstance: (r) => {
|
|
3425
|
-
const t = r.dataset.intlTelInputId;
|
|
3426
|
-
return t ? f.instances[t] : null;
|
|
3427
|
-
},
|
|
3428
|
-
//* A map from instance ID to instance object.
|
|
3429
|
-
instances: {},
|
|
3430
|
-
attachUtils: Fs,
|
|
3431
|
-
startedLoadingUtilsScript: !1,
|
|
3432
|
-
startedLoadingAutoCountry: !1,
|
|
3433
|
-
version: "26.9.2"
|
|
3434
|
-
}
|
|
3435
|
-
);
|
|
3436
|
-
export {
|
|
3437
|
-
f as i
|
|
3438
|
-
};
|