intl-tel-input 25.12.6 → 25.13.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/README.md +5 -5
- package/angular/README.md +1 -1
- package/angular/build/IntlTelInput.js +105 -47
- package/angular/build/IntlTelInputWithUtils.js +105 -47
- package/angular/build/types/intl-tel-input.d.ts +6 -0
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput.d.ts +6 -0
- package/build/js/intlTelInput.js +107 -52
- package/build/js/intlTelInput.min.js +4 -4
- package/build/js/intlTelInputWithUtils.js +107 -52
- package/build/js/intlTelInputWithUtils.min.js +6 -6
- package/package.json +1 -1
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +106 -51
- package/react/build/IntlTelInput.d.ts +6 -0
- package/react/build/IntlTelInput.js +106 -51
- package/react/build/IntlTelInputWithUtils.cjs +106 -51
- package/react/build/IntlTelInputWithUtils.js +106 -51
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +325 -285
- package/vue/build/IntlTelInputWithUtils.mjs +570 -530
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mergeModels as
|
|
1
|
+
import { mergeModels as I0, useModel as Y0, ref as w1, onMounted as z0, watch as Z0, onUnmounted as J0, withDirectives as X0, createElementBlock as q0, openBlock as Q0, mergeProps as d2, vModelText as t2 } from "vue";
|
|
2
2
|
const e2 = [
|
|
3
3
|
[
|
|
4
4
|
"af",
|
|
@@ -1676,9 +1676,9 @@ const e2 = [
|
|
|
1676
1676
|
null,
|
|
1677
1677
|
"0"
|
|
1678
1678
|
]
|
|
1679
|
-
],
|
|
1679
|
+
], t1 = [];
|
|
1680
1680
|
for (const h of e2)
|
|
1681
|
-
|
|
1681
|
+
t1.push({
|
|
1682
1682
|
name: "",
|
|
1683
1683
|
// populated in the plugin
|
|
1684
1684
|
iso2: h[0],
|
|
@@ -1950,13 +1950,13 @@ const $2 = {
|
|
|
1950
1950
|
// additional countries (not supported by country-list library)
|
|
1951
1951
|
ac: "Ascension Island",
|
|
1952
1952
|
xk: "Kosovo"
|
|
1953
|
-
},
|
|
1953
|
+
}, b0 = { ...$2, ...n2 }, _1 = {
|
|
1954
1954
|
OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
|
|
1955
1955
|
CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
|
|
1956
1956
|
COUNTRY_CHANGE: "countrychange",
|
|
1957
1957
|
INPUT: "input"
|
|
1958
1958
|
// used for synthetic input trigger
|
|
1959
|
-
},
|
|
1959
|
+
}, N = {
|
|
1960
1960
|
HIDE: "iti__hide",
|
|
1961
1961
|
V_HIDE: "iti__v-hide",
|
|
1962
1962
|
ARROW_UP: "iti__arrow--up",
|
|
@@ -1971,10 +1971,10 @@ const $2 = {
|
|
|
1971
1971
|
ENTER: "Enter",
|
|
1972
1972
|
ESC: "Escape",
|
|
1973
1973
|
TAB: "Tab"
|
|
1974
|
-
},
|
|
1974
|
+
}, _0 = {
|
|
1975
1975
|
PASTE: "insertFromPaste",
|
|
1976
1976
|
DELETE_FWD: "deleteContentForward"
|
|
1977
|
-
},
|
|
1977
|
+
}, d1 = {
|
|
1978
1978
|
ALPHA_UNICODE: new RegExp("\\p{L}", "u"),
|
|
1979
1979
|
// any kind of letter from any language
|
|
1980
1980
|
NON_PLUS_NUMERIC: /[^+0-9]/,
|
|
@@ -1985,20 +1985,20 @@ const $2 = {
|
|
|
1985
1985
|
// single acceptable hidden-search char
|
|
1986
1986
|
}, i2 = {
|
|
1987
1987
|
HIDDEN_SEARCH_RESET_MS: 1e3
|
|
1988
|
-
},
|
|
1988
|
+
}, N0 = {
|
|
1989
1989
|
UNKNOWN_NUMBER_TYPE: -99,
|
|
1990
1990
|
UNKNOWN_VALIDATION_ERROR: -99
|
|
1991
|
-
},
|
|
1991
|
+
}, D1 = {
|
|
1992
1992
|
SANE_SELECTED_WITH_DIAL_WIDTH: 78,
|
|
1993
1993
|
// px width fallback when separateDialCode enabled
|
|
1994
1994
|
SANE_SELECTED_NO_DIAL_WIDTH: 42,
|
|
1995
1995
|
// px width fallback when no separate dial code
|
|
1996
1996
|
INPUT_PADDING_EXTRA_LEFT: 6
|
|
1997
1997
|
// px gap between selected country container and input text
|
|
1998
|
-
},
|
|
1998
|
+
}, T0 = {
|
|
1999
1999
|
NANP: "1"
|
|
2000
2000
|
// North American Numbering Plan
|
|
2001
|
-
},
|
|
2001
|
+
}, v1 = {
|
|
2002
2002
|
DIAL_CODE: "44",
|
|
2003
2003
|
// +44 United Kingdom
|
|
2004
2004
|
MOBILE_PREFIX: "7",
|
|
@@ -2007,15 +2007,15 @@ const $2 = {
|
|
|
2007
2007
|
// core number length (excluding dial code / national prefix) for mobiles
|
|
2008
2008
|
}, s2 = {
|
|
2009
2009
|
ISO2: "us"
|
|
2010
|
-
},
|
|
2010
|
+
}, x1 = {
|
|
2011
2011
|
AGGRESSIVE: "aggressive",
|
|
2012
2012
|
POLITE: "polite"
|
|
2013
|
-
},
|
|
2013
|
+
}, P1 = {
|
|
2014
2014
|
AUTO: "auto"
|
|
2015
|
-
},
|
|
2015
|
+
}, E0 = {
|
|
2016
2016
|
COUNTRY_CODE: "countryCode",
|
|
2017
2017
|
DIAL_CODE: "dialCode"
|
|
2018
|
-
},
|
|
2018
|
+
}, b = {
|
|
2019
2019
|
EXPANDED: "aria-expanded",
|
|
2020
2020
|
LABEL: "aria-label",
|
|
2021
2021
|
SELECTED: "aria-selected",
|
|
@@ -2025,11 +2025,11 @@ const $2 = {
|
|
|
2025
2025
|
HIDDEN: "aria-hidden",
|
|
2026
2026
|
AUTOCOMPLETE: "aria-autocomplete",
|
|
2027
2027
|
MODAL: "aria-modal"
|
|
2028
|
-
},
|
|
2028
|
+
}, M1 = (h) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(h).matches, r2 = () => {
|
|
2029
2029
|
if (typeof navigator < "u" && typeof window < "u") {
|
|
2030
2030
|
const h = /Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
2031
2031
|
navigator.userAgent
|
|
2032
|
-
), e =
|
|
2032
|
+
), e = M1("(max-width: 500px)"), $ = M1("(max-height: 600px)"), i = M1("(pointer: coarse)");
|
|
2033
2033
|
return h || e || i && $;
|
|
2034
2034
|
}
|
|
2035
2035
|
return !1;
|
|
@@ -2039,7 +2039,7 @@ const $2 = {
|
|
|
2039
2039
|
//* Whether or not to allow the dropdown.
|
|
2040
2040
|
allowDropdown: !0,
|
|
2041
2041
|
//* Add a placeholder in the input with an example number for the selected country.
|
|
2042
|
-
autoPlaceholder:
|
|
2042
|
+
autoPlaceholder: x1.POLITE,
|
|
2043
2043
|
//* Modify the parentClass.
|
|
2044
2044
|
containerClass: "",
|
|
2045
2045
|
//* The order of the countries in the dropdown. Defaults to alphabetical.
|
|
@@ -2086,18 +2086,18 @@ const $2 = {
|
|
|
2086
2086
|
validationNumberTypes: ["MOBILE"]
|
|
2087
2087
|
}, o2 = (h, e) => {
|
|
2088
2088
|
h.useFullscreenPopup && (h.fixDropdownWidth = !1), h.onlyCountries.length === 1 && (h.initialCountry = h.onlyCountries[0]), h.separateDialCode && (h.nationalMode = !1), h.allowDropdown && !h.showFlags && !h.separateDialCode && (h.nationalMode = !1), h.useFullscreenPopup && !h.dropdownContainer && (h.dropdownContainer = document.body), h.i18n = { ...e, ...h.i18n };
|
|
2089
|
-
},
|
|
2089
|
+
}, N1 = (h) => h.replace(/\D/g, ""), A0 = (h = "") => h.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), u2 = (h, e) => {
|
|
2090
2090
|
const $ = A0(e), i = [], s = [], a = [], u = [], f = [], C = [];
|
|
2091
2091
|
for (const _ of h)
|
|
2092
2092
|
_.iso2 === $ ? i.push(_) : _.normalisedName.startsWith($) ? s.push(_) : _.normalisedName.includes($) ? a.push(_) : $ === _.dialCode || $ === _.dialCodePlus ? u.push(_) : _.dialCodePlus.includes($) ? f.push(_) : _.initials.includes($) && C.push(_);
|
|
2093
|
-
const
|
|
2093
|
+
const y = (_, T) => _.priority - T.priority;
|
|
2094
2094
|
return [
|
|
2095
|
-
...i.sort(
|
|
2096
|
-
...s.sort(
|
|
2097
|
-
...a.sort(
|
|
2098
|
-
...u.sort(
|
|
2099
|
-
...f.sort(
|
|
2100
|
-
...C.sort(
|
|
2095
|
+
...i.sort(y),
|
|
2096
|
+
...s.sort(y),
|
|
2097
|
+
...a.sort(y),
|
|
2098
|
+
...u.sort(y),
|
|
2099
|
+
...f.sort(y),
|
|
2100
|
+
...C.sort(y)
|
|
2101
2101
|
];
|
|
2102
2102
|
}, l2 = (h, e) => {
|
|
2103
2103
|
const $ = e.toLowerCase();
|
|
@@ -2105,19 +2105,19 @@ const $2 = {
|
|
|
2105
2105
|
if (i.name.toLowerCase().startsWith($))
|
|
2106
2106
|
return i;
|
|
2107
2107
|
return null;
|
|
2108
|
-
},
|
|
2108
|
+
}, R1 = (h) => Object.keys(h).filter((e) => !!h[e]).join(" "), L = (h, e, $) => {
|
|
2109
2109
|
const i = document.createElement(h);
|
|
2110
2110
|
return e && Object.entries(e).forEach(
|
|
2111
2111
|
([s, a]) => i.setAttribute(s, a)
|
|
2112
2112
|
), $ && $.appendChild(i), i;
|
|
2113
2113
|
}, a2 = () => `
|
|
2114
|
-
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${
|
|
2114
|
+
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${b.HIDDEN}="true">
|
|
2115
2115
|
<circle cx="11" cy="11" r="7" />
|
|
2116
2116
|
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
2117
2117
|
</svg>`, c2 = (h) => {
|
|
2118
2118
|
const e = `iti-${h}-clear-mask`;
|
|
2119
2119
|
return `
|
|
2120
|
-
<svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${
|
|
2120
|
+
<svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${b.HIDDEN}="true" focusable="false">
|
|
2121
2121
|
<mask id="${e}" maskUnits="userSpaceOnUse">
|
|
2122
2122
|
<rect width="16" height="16" fill="white" />
|
|
2123
2123
|
<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" />
|
|
@@ -2140,53 +2140,53 @@ class h2 {
|
|
|
2140
2140
|
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !((e = this.telInput.form) != null && e.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
2141
2141
|
}
|
|
2142
2142
|
_createWrapperAndInsert() {
|
|
2143
|
-
const { allowDropdown: e, showFlags: $, containerClass: i, useFullscreenPopup: s } = this.options, a =
|
|
2143
|
+
const { allowDropdown: e, showFlags: $, containerClass: i, useFullscreenPopup: s } = this.options, a = R1({
|
|
2144
2144
|
iti: !0,
|
|
2145
2145
|
"iti--allow-dropdown": e,
|
|
2146
2146
|
"iti--show-flags": $,
|
|
2147
2147
|
"iti--inline-dropdown": !s,
|
|
2148
2148
|
[i]: !!i
|
|
2149
|
-
}), u =
|
|
2149
|
+
}), u = L("div", { class: a });
|
|
2150
2150
|
return this.isRTL && u.setAttribute("dir", "ltr"), this.telInput.before(u), u;
|
|
2151
2151
|
}
|
|
2152
2152
|
_maybeBuildCountryContainer(e) {
|
|
2153
2153
|
const { allowDropdown: $, separateDialCode: i, showFlags: s } = this.options;
|
|
2154
2154
|
if ($ || s || i) {
|
|
2155
|
-
this.countryContainer =
|
|
2155
|
+
this.countryContainer = L(
|
|
2156
2156
|
"div",
|
|
2157
2157
|
// visibly hidden until we measure it's width to set the input padding correctly
|
|
2158
|
-
{ class: `iti__country-container ${
|
|
2158
|
+
{ class: `iti__country-container ${N.V_HIDE}` },
|
|
2159
2159
|
e
|
|
2160
|
-
), $ ? (this.selectedCountry =
|
|
2160
|
+
), $ ? (this.selectedCountry = L(
|
|
2161
2161
|
"button",
|
|
2162
2162
|
{
|
|
2163
2163
|
type: "button",
|
|
2164
2164
|
class: "iti__selected-country",
|
|
2165
|
-
[
|
|
2166
|
-
[
|
|
2167
|
-
[
|
|
2168
|
-
[
|
|
2165
|
+
[b.EXPANDED]: "false",
|
|
2166
|
+
[b.LABEL]: this.options.i18n.noCountrySelected,
|
|
2167
|
+
[b.HASPOPUP]: "dialog",
|
|
2168
|
+
[b.CONTROLS]: `iti-${this.id}__dropdown-content`
|
|
2169
2169
|
},
|
|
2170
2170
|
this.countryContainer
|
|
2171
|
-
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry =
|
|
2171
|
+
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = L(
|
|
2172
2172
|
"div",
|
|
2173
2173
|
{ class: "iti__selected-country" },
|
|
2174
2174
|
this.countryContainer
|
|
2175
2175
|
);
|
|
2176
|
-
const a =
|
|
2176
|
+
const a = L(
|
|
2177
2177
|
"div",
|
|
2178
2178
|
{ class: "iti__selected-country-primary" },
|
|
2179
2179
|
this.selectedCountry
|
|
2180
2180
|
);
|
|
2181
|
-
this.selectedCountryInner =
|
|
2181
|
+
this.selectedCountryInner = L(
|
|
2182
2182
|
"div",
|
|
2183
|
-
{ class:
|
|
2183
|
+
{ class: N.FLAG },
|
|
2184
2184
|
a
|
|
2185
|
-
), $ && (this.dropdownArrow =
|
|
2185
|
+
), $ && (this.dropdownArrow = L(
|
|
2186
2186
|
"div",
|
|
2187
|
-
{ class: "iti__arrow", [
|
|
2187
|
+
{ class: "iti__arrow", [b.HIDDEN]: "true" },
|
|
2188
2188
|
a
|
|
2189
|
-
)), i && (this.selectedDialCode =
|
|
2189
|
+
)), i && (this.selectedDialCode = L(
|
|
2190
2190
|
"div",
|
|
2191
2191
|
{ class: "iti__selected-dial-code" },
|
|
2192
2192
|
this.selectedCountry
|
|
@@ -2202,46 +2202,46 @@ class h2 {
|
|
|
2202
2202
|
dropdownContainer: a,
|
|
2203
2203
|
containerClass: u
|
|
2204
2204
|
} = this.options, f = e ? "" : "iti--flexible-dropdown-width";
|
|
2205
|
-
if (this.dropdownContent =
|
|
2205
|
+
if (this.dropdownContent = L("div", {
|
|
2206
2206
|
id: `iti-${this.id}__dropdown-content`,
|
|
2207
|
-
class: `iti__dropdown-content ${
|
|
2207
|
+
class: `iti__dropdown-content ${N.HIDE} ${f}`,
|
|
2208
2208
|
role: "dialog",
|
|
2209
|
-
[
|
|
2210
|
-
}), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), i && this._buildSearchUI(), this.countryList =
|
|
2209
|
+
[b.MODAL]: "true"
|
|
2210
|
+
}), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), i && this._buildSearchUI(), this.countryList = L(
|
|
2211
2211
|
"ul",
|
|
2212
2212
|
{
|
|
2213
2213
|
class: "iti__country-list",
|
|
2214
2214
|
id: `iti-${this.id}__country-listbox`,
|
|
2215
2215
|
role: "listbox",
|
|
2216
|
-
[
|
|
2216
|
+
[b.LABEL]: s.countryListAriaLabel
|
|
2217
2217
|
},
|
|
2218
2218
|
this.dropdownContent
|
|
2219
2219
|
), this._appendListItems(), i && this.updateSearchResultsA11yText(), a) {
|
|
2220
|
-
const C =
|
|
2220
|
+
const C = R1({
|
|
2221
2221
|
iti: !0,
|
|
2222
2222
|
"iti--container": !0,
|
|
2223
2223
|
"iti--fullscreen-popup": $,
|
|
2224
2224
|
"iti--inline-dropdown": !$,
|
|
2225
2225
|
[u]: !!u
|
|
2226
2226
|
});
|
|
2227
|
-
this.dropdown =
|
|
2227
|
+
this.dropdown = L("div", { class: C }), this.dropdown.appendChild(this.dropdownContent);
|
|
2228
2228
|
} else
|
|
2229
2229
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
2230
2230
|
}
|
|
2231
2231
|
_buildSearchUI() {
|
|
2232
|
-
const { i18n: e } = this.options, $ =
|
|
2232
|
+
const { i18n: e } = this.options, $ = L(
|
|
2233
2233
|
"div",
|
|
2234
2234
|
{ class: "iti__search-input-wrapper" },
|
|
2235
2235
|
this.dropdownContent
|
|
2236
2236
|
);
|
|
2237
|
-
this.searchIcon =
|
|
2237
|
+
this.searchIcon = L(
|
|
2238
2238
|
"span",
|
|
2239
2239
|
{
|
|
2240
2240
|
class: "iti__search-icon",
|
|
2241
|
-
[
|
|
2241
|
+
[b.HIDDEN]: "true"
|
|
2242
2242
|
},
|
|
2243
2243
|
$
|
|
2244
|
-
), this.searchIcon.innerHTML = a2(), this.searchInput =
|
|
2244
|
+
), this.searchIcon.innerHTML = a2(), this.searchInput = L(
|
|
2245
2245
|
"input",
|
|
2246
2246
|
{
|
|
2247
2247
|
id: `iti-${this.id}__search-input`,
|
|
@@ -2251,38 +2251,38 @@ class h2 {
|
|
|
2251
2251
|
placeholder: e.searchPlaceholder,
|
|
2252
2252
|
// 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
|
|
2253
2253
|
role: "combobox",
|
|
2254
|
-
[
|
|
2255
|
-
[
|
|
2256
|
-
[
|
|
2257
|
-
[
|
|
2254
|
+
[b.EXPANDED]: "true",
|
|
2255
|
+
[b.LABEL]: e.searchPlaceholder,
|
|
2256
|
+
[b.CONTROLS]: `iti-${this.id}__country-listbox`,
|
|
2257
|
+
[b.AUTOCOMPLETE]: "list",
|
|
2258
2258
|
autocomplete: "off"
|
|
2259
2259
|
},
|
|
2260
2260
|
$
|
|
2261
|
-
), this.searchClearButton =
|
|
2261
|
+
), this.searchClearButton = L(
|
|
2262
2262
|
"button",
|
|
2263
2263
|
{
|
|
2264
2264
|
type: "button",
|
|
2265
|
-
class: `iti__search-clear ${
|
|
2266
|
-
[
|
|
2265
|
+
class: `iti__search-clear ${N.HIDE}`,
|
|
2266
|
+
[b.LABEL]: e.clearSearchAriaLabel,
|
|
2267
2267
|
tabindex: "-1"
|
|
2268
2268
|
},
|
|
2269
2269
|
$
|
|
2270
|
-
), this.searchClearButton.innerHTML = c2(this.id), this.searchResultsA11yText =
|
|
2270
|
+
), this.searchClearButton.innerHTML = c2(this.id), this.searchResultsA11yText = L(
|
|
2271
2271
|
"span",
|
|
2272
2272
|
{ class: "iti__a11y-text" },
|
|
2273
2273
|
this.dropdownContent
|
|
2274
|
-
), this.searchNoResults =
|
|
2274
|
+
), this.searchNoResults = L(
|
|
2275
2275
|
"div",
|
|
2276
2276
|
{
|
|
2277
|
-
class: `iti__no-results ${
|
|
2278
|
-
[
|
|
2277
|
+
class: `iti__no-results ${N.HIDE}`,
|
|
2278
|
+
[b.HIDDEN]: "true"
|
|
2279
2279
|
// all a11y messaging happens in this.searchResultsA11yText
|
|
2280
2280
|
},
|
|
2281
2281
|
this.dropdownContent
|
|
2282
2282
|
), this.searchNoResults.textContent = e.zeroSearchResults;
|
|
2283
2283
|
}
|
|
2284
2284
|
_maybeUpdateInputPaddingAndReveal() {
|
|
2285
|
-
this.countryContainer && (this.updateInputPadding(), this.countryContainer.classList.remove(
|
|
2285
|
+
this.countryContainer && (this.updateInputPadding(), this.countryContainer.classList.remove(N.V_HIDE));
|
|
2286
2286
|
}
|
|
2287
2287
|
_maybeBuildHiddenInputs(e) {
|
|
2288
2288
|
var i, s;
|
|
@@ -2293,7 +2293,7 @@ class h2 {
|
|
|
2293
2293
|
const f = (i = this.telInput.form) == null ? void 0 : i.querySelector(
|
|
2294
2294
|
`input[name="${u.phone}"]`
|
|
2295
2295
|
);
|
|
2296
|
-
f ? this.hiddenInput = f : (this.hiddenInput =
|
|
2296
|
+
f ? this.hiddenInput = f : (this.hiddenInput = L("input", {
|
|
2297
2297
|
type: "hidden",
|
|
2298
2298
|
name: u.phone
|
|
2299
2299
|
}), e.appendChild(this.hiddenInput));
|
|
@@ -2302,7 +2302,7 @@ class h2 {
|
|
|
2302
2302
|
const f = (s = this.telInput.form) == null ? void 0 : s.querySelector(
|
|
2303
2303
|
`input[name="${u.country}"]`
|
|
2304
2304
|
);
|
|
2305
|
-
f ? this.hiddenInputCountry = f : (this.hiddenInputCountry =
|
|
2305
|
+
f ? this.hiddenInputCountry = f : (this.hiddenInputCountry = L("input", {
|
|
2306
2306
|
type: "hidden",
|
|
2307
2307
|
name: u.country
|
|
2308
2308
|
}), e.appendChild(this.hiddenInputCountry));
|
|
@@ -2313,20 +2313,20 @@ class h2 {
|
|
|
2313
2313
|
_appendListItems() {
|
|
2314
2314
|
const e = document.createDocumentFragment();
|
|
2315
2315
|
for (let $ = 0; $ < this.countries.length; $++) {
|
|
2316
|
-
const i = this.countries[$], s =
|
|
2317
|
-
[
|
|
2318
|
-
[
|
|
2319
|
-
}), a =
|
|
2316
|
+
const i = this.countries[$], s = R1({
|
|
2317
|
+
[N.COUNTRY_ITEM]: !0,
|
|
2318
|
+
[N.HIGHLIGHT]: $ === 0
|
|
2319
|
+
}), a = L("li", {
|
|
2320
2320
|
id: `iti-${this.id}__item-${i.iso2}`,
|
|
2321
2321
|
class: s,
|
|
2322
2322
|
tabindex: "-1",
|
|
2323
2323
|
role: "option",
|
|
2324
|
-
[
|
|
2324
|
+
[b.SELECTED]: "false"
|
|
2325
2325
|
});
|
|
2326
|
-
a.dataset.dialCode = i.dialCode, a.dataset.countryCode = i.iso2, i.nodeById[this.id] = a, this.options.showFlags &&
|
|
2327
|
-
const u =
|
|
2326
|
+
a.dataset.dialCode = i.dialCode, a.dataset.countryCode = i.iso2, i.nodeById[this.id] = a, this.options.showFlags && L("div", { class: `${N.FLAG} iti__${i.iso2}` }, a);
|
|
2327
|
+
const u = L("span", { class: "iti__country-name" }, a);
|
|
2328
2328
|
u.textContent = i.name;
|
|
2329
|
-
const f =
|
|
2329
|
+
const f = L("span", { class: "iti__dial-code" }, a);
|
|
2330
2330
|
this.isRTL && f.setAttribute("dir", "ltr"), f.textContent = `+${i.dialCode}`, e.appendChild(a);
|
|
2331
2331
|
}
|
|
2332
2332
|
this.countryList.appendChild(e);
|
|
@@ -2334,7 +2334,7 @@ class h2 {
|
|
|
2334
2334
|
//* Update the input padding to make space for the selected country/dial code.
|
|
2335
2335
|
updateInputPadding() {
|
|
2336
2336
|
if (this.selectedCountry) {
|
|
2337
|
-
const e = this.options.separateDialCode ?
|
|
2337
|
+
const e = this.options.separateDialCode ? D1.SANE_SELECTED_WITH_DIAL_WIDTH : D1.SANE_SELECTED_NO_DIAL_WIDTH, i = (this.selectedCountry.offsetWidth || this._getHiddenSelectedCountryWidth() || e) + D1.INPUT_PADDING_EXTRA_LEFT;
|
|
2338
2338
|
this.telInput.style.paddingLeft = `${i}px`;
|
|
2339
2339
|
}
|
|
2340
2340
|
}
|
|
@@ -2376,20 +2376,20 @@ class h2 {
|
|
|
2376
2376
|
}
|
|
2377
2377
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
2378
2378
|
scrollTo(e) {
|
|
2379
|
-
const $ = this.countryList, i = document.documentElement.scrollTop, s = $.offsetHeight, a = $.getBoundingClientRect().top + i, u = a + s, f = e.offsetHeight, C = e.getBoundingClientRect().top + i,
|
|
2379
|
+
const $ = this.countryList, i = document.documentElement.scrollTop, s = $.offsetHeight, a = $.getBoundingClientRect().top + i, u = a + s, f = e.offsetHeight, C = e.getBoundingClientRect().top + i, y = C + f, _ = C - a + $.scrollTop;
|
|
2380
2380
|
if (C < a)
|
|
2381
2381
|
$.scrollTop = _;
|
|
2382
|
-
else if (
|
|
2383
|
-
const
|
|
2384
|
-
$.scrollTop = _ -
|
|
2382
|
+
else if (y > u) {
|
|
2383
|
+
const T = s - f;
|
|
2384
|
+
$.scrollTop = _ - T;
|
|
2385
2385
|
}
|
|
2386
2386
|
}
|
|
2387
2387
|
//* Remove highlighting from other list items and highlight the given item.
|
|
2388
2388
|
highlightListItem(e, $) {
|
|
2389
2389
|
const i = this.highlightedItem;
|
|
2390
|
-
if (i && (i.classList.remove(
|
|
2390
|
+
if (i && (i.classList.remove(N.HIGHLIGHT), i.setAttribute(b.SELECTED, "false")), this.highlightedItem = e, this.highlightedItem && (this.highlightedItem.classList.add(N.HIGHLIGHT), this.highlightedItem.setAttribute(b.SELECTED, "true"), this.options.countrySearch)) {
|
|
2391
2391
|
const s = this.highlightedItem.getAttribute("id") || "";
|
|
2392
|
-
this.searchInput.setAttribute(
|
|
2392
|
+
this.searchInput.setAttribute(b.ACTIVE_DESCENDANT, s);
|
|
2393
2393
|
}
|
|
2394
2394
|
$ && this.highlightedItem.focus();
|
|
2395
2395
|
}
|
|
@@ -2401,7 +2401,7 @@ class h2 {
|
|
|
2401
2401
|
const s = i.nodeById[this.id];
|
|
2402
2402
|
s && (this.countryList.appendChild(s), $ && (this.highlightListItem(s, !1), $ = !1));
|
|
2403
2403
|
}
|
|
2404
|
-
$ ? (this.highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove(
|
|
2404
|
+
$ ? (this.highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove(N.HIDE)) : this.searchNoResults && this.searchNoResults.classList.add(N.HIDE), this.countryList.scrollTop = 0, this.updateSearchResultsA11yText();
|
|
2405
2405
|
}
|
|
2406
2406
|
destroy() {
|
|
2407
2407
|
this.telInput.iti = void 0, delete this.telInput.dataset.intlTelInputId, this.options.separateDialCode && (this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
@@ -2418,18 +2418,18 @@ const f2 = (h) => {
|
|
|
2418
2418
|
const i = e.map(
|
|
2419
2419
|
(s) => s.toLowerCase()
|
|
2420
2420
|
);
|
|
2421
|
-
return
|
|
2421
|
+
return t1.filter(
|
|
2422
2422
|
(s) => i.includes(s.iso2)
|
|
2423
2423
|
);
|
|
2424
2424
|
} else if ($.length) {
|
|
2425
2425
|
const i = $.map(
|
|
2426
2426
|
(s) => s.toLowerCase()
|
|
2427
2427
|
);
|
|
2428
|
-
return
|
|
2428
|
+
return t1.filter(
|
|
2429
2429
|
(s) => !i.includes(s.iso2)
|
|
2430
2430
|
);
|
|
2431
2431
|
}
|
|
2432
|
-
return
|
|
2432
|
+
return t1;
|
|
2433
2433
|
}, p2 = (h, e) => {
|
|
2434
2434
|
for (const $ of h) {
|
|
2435
2435
|
const i = $.iso2.toLowerCase();
|
|
@@ -2442,11 +2442,11 @@ const f2 = (h) => {
|
|
|
2442
2442
|
if (!u || !f)
|
|
2443
2443
|
return;
|
|
2444
2444
|
f.length > i && (i = f.length), s.hasOwnProperty(f) || (s[f] = []);
|
|
2445
|
-
const
|
|
2446
|
-
if (
|
|
2445
|
+
const y = s[f];
|
|
2446
|
+
if (y.includes(u))
|
|
2447
2447
|
return;
|
|
2448
|
-
const _ = C !== void 0 ? C :
|
|
2449
|
-
|
|
2448
|
+
const _ = C !== void 0 ? C : y.length;
|
|
2449
|
+
y[_] = u;
|
|
2450
2450
|
};
|
|
2451
2451
|
for (const u of h) {
|
|
2452
2452
|
$.has(u.dialCode) || $.add(u.dialCode);
|
|
@@ -2463,9 +2463,9 @@ const f2 = (h) => {
|
|
|
2463
2463
|
if (u.areaCodes) {
|
|
2464
2464
|
const f = s[u.dialCode][0];
|
|
2465
2465
|
for (const C of u.areaCodes) {
|
|
2466
|
-
for (let
|
|
2467
|
-
const _ = C.substring(0,
|
|
2468
|
-
a(f,
|
|
2466
|
+
for (let y = 1; y < C.length; y++) {
|
|
2467
|
+
const _ = C.substring(0, y), T = u.dialCode + _;
|
|
2468
|
+
a(f, T), a(u.iso2, T);
|
|
2469
2469
|
}
|
|
2470
2470
|
a(u.iso2, u.dialCode + C);
|
|
2471
2471
|
}
|
|
@@ -2508,7 +2508,7 @@ const f2 = (h) => {
|
|
|
2508
2508
|
return a;
|
|
2509
2509
|
}
|
|
2510
2510
|
return e.length;
|
|
2511
|
-
},
|
|
2511
|
+
}, N2 = [
|
|
2512
2512
|
"800",
|
|
2513
2513
|
"822",
|
|
2514
2514
|
"833",
|
|
@@ -2526,21 +2526,21 @@ const f2 = (h) => {
|
|
|
2526
2526
|
"887",
|
|
2527
2527
|
"888",
|
|
2528
2528
|
"889"
|
|
2529
|
-
],
|
|
2530
|
-
const e =
|
|
2531
|
-
if (e.startsWith(
|
|
2529
|
+
], S0 = (h) => {
|
|
2530
|
+
const e = N1(h);
|
|
2531
|
+
if (e.startsWith(T0.NANP) && e.length >= 4) {
|
|
2532
2532
|
const $ = e.substring(1, 4);
|
|
2533
|
-
return
|
|
2533
|
+
return N2.includes($);
|
|
2534
2534
|
}
|
|
2535
2535
|
return !1;
|
|
2536
2536
|
};
|
|
2537
|
-
for (const h of
|
|
2538
|
-
h.name =
|
|
2539
|
-
let
|
|
2540
|
-
const S2 = new Set(
|
|
2541
|
-
class
|
|
2537
|
+
for (const h of t1)
|
|
2538
|
+
h.name = b0[h.iso2];
|
|
2539
|
+
let E2 = 0;
|
|
2540
|
+
const S2 = new Set(t1.map((h) => h.iso2)), O1 = (h) => S2.has(h);
|
|
2541
|
+
class B1 {
|
|
2542
2542
|
constructor(e, $ = {}) {
|
|
2543
|
-
this.id =
|
|
2543
|
+
this.id = E2++, this.options = { ...L0, ...$ }, o2(this.options, b0), this.ui = new h2(e, this.options, this.id), this.isAndroid = B1._getIsAndroid(), this.promise = this._createInitPromises(), this.countries = f2(this.options);
|
|
2544
2544
|
const { dialCodes: i, dialCodeMaxLen: s, dialCodeToIso2Map: a } = C2(
|
|
2545
2545
|
this.countries,
|
|
2546
2546
|
this.options
|
|
@@ -2550,6 +2550,31 @@ class R1 {
|
|
|
2550
2550
|
static _getIsAndroid() {
|
|
2551
2551
|
return typeof navigator < "u" ? /Android/i.test(navigator.userAgent) : !1;
|
|
2552
2552
|
}
|
|
2553
|
+
_updateNumeralSet(e) {
|
|
2554
|
+
/[\u0660-\u0669]/.test(e) ? this.userNumeralSet = "arabic-indic" : /[\u06F0-\u06F9]/.test(e) ? this.userNumeralSet = "persian" : this.userNumeralSet = "ascii";
|
|
2555
|
+
}
|
|
2556
|
+
_mapAsciiToUserNumerals(e) {
|
|
2557
|
+
if (this.userNumeralSet || this._updateNumeralSet(this.ui.telInput.value), this.userNumeralSet === "ascii")
|
|
2558
|
+
return e;
|
|
2559
|
+
const $ = this.userNumeralSet === "arabic-indic" ? 1632 : 1776;
|
|
2560
|
+
return e.replace(/[0-9]/g, (i) => String.fromCharCode($ + Number(i)));
|
|
2561
|
+
}
|
|
2562
|
+
// Normalize Eastern Arabic (U+0660-0669) and Persian/Extended Arabic-Indic (U+06F0-06F9) numerals to ASCII 0-9
|
|
2563
|
+
_normaliseNumerals(e) {
|
|
2564
|
+
if (!e)
|
|
2565
|
+
return "";
|
|
2566
|
+
if (this._updateNumeralSet(e), this.userNumeralSet === "ascii")
|
|
2567
|
+
return e;
|
|
2568
|
+
const $ = this.userNumeralSet === "arabic-indic" ? 1632 : 1776, i = this.userNumeralSet === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
|
|
2569
|
+
return e.replace(i, (s) => String.fromCharCode(48 + (s.charCodeAt(0) - $)));
|
|
2570
|
+
}
|
|
2571
|
+
_getTelInputValue() {
|
|
2572
|
+
const e = this.ui.telInput.value.trim();
|
|
2573
|
+
return this._normaliseNumerals(e);
|
|
2574
|
+
}
|
|
2575
|
+
_setTelInputValue(e) {
|
|
2576
|
+
this.ui.telInput.value = this._mapAsciiToUserNumerals(e);
|
|
2577
|
+
}
|
|
2553
2578
|
_createInitPromises() {
|
|
2554
2579
|
const e = new Promise((i, s) => {
|
|
2555
2580
|
this.resolveAutoCountryPromise = i, this.rejectAutoCountryPromise = s;
|
|
@@ -2573,14 +2598,14 @@ class R1 {
|
|
|
2573
2598
|
//* 1. Extracting a dial code from the given number
|
|
2574
2599
|
//* 2. Using explicit initialCountry
|
|
2575
2600
|
_setInitialState(e = !1) {
|
|
2576
|
-
const $ = this.ui.telInput.getAttribute("value"), i = this.
|
|
2577
|
-
if (
|
|
2578
|
-
this._updateCountryFromNumber(
|
|
2579
|
-
else if (!
|
|
2580
|
-
const
|
|
2581
|
-
|
|
2601
|
+
const $ = this.ui.telInput.getAttribute("value"), i = this._normaliseNumerals($), s = this._getTelInputValue(), u = i && i.startsWith("+") && (!s || !s.startsWith("+")) ? i : s, f = this._getDialCode(u), C = S0(u), { initialCountry: y, geoIpLookup: _ } = this.options, T = y === P1.AUTO && _;
|
|
2602
|
+
if (f && !C)
|
|
2603
|
+
this._updateCountryFromNumber(u);
|
|
2604
|
+
else if (!T || e) {
|
|
2605
|
+
const B = y ? y.toLowerCase() : "";
|
|
2606
|
+
O1(B) ? this._setCountry(B) : f && C ? this._setCountry(s2.ISO2) : this._setCountry("");
|
|
2582
2607
|
}
|
|
2583
|
-
|
|
2608
|
+
u && this._updateValFromNumber(u);
|
|
2584
2609
|
}
|
|
2585
2610
|
//* Initialise the main event listeners: input keyup, and click selected country.
|
|
2586
2611
|
_initListeners() {
|
|
@@ -2599,12 +2624,12 @@ class R1 {
|
|
|
2599
2624
|
//* initialise the dropdown listeners.
|
|
2600
2625
|
_initDropdownListeners() {
|
|
2601
2626
|
const e = this.abortController.signal, $ = (u) => {
|
|
2602
|
-
this.ui.dropdownContent.classList.contains(
|
|
2627
|
+
this.ui.dropdownContent.classList.contains(N.HIDE) ? this.ui.telInput.focus() : u.preventDefault();
|
|
2603
2628
|
}, i = this.ui.telInput.closest("label");
|
|
2604
2629
|
i && i.addEventListener("click", $, { signal: e });
|
|
2605
2630
|
const s = () => {
|
|
2606
2631
|
this.ui.dropdownContent.classList.contains(
|
|
2607
|
-
|
|
2632
|
+
N.HIDE
|
|
2608
2633
|
) && !this.ui.telInput.disabled && !this.ui.telInput.readOnly && this._openDropdown();
|
|
2609
2634
|
};
|
|
2610
2635
|
this.ui.selectedCountry.addEventListener(
|
|
@@ -2616,7 +2641,7 @@ class R1 {
|
|
|
2616
2641
|
);
|
|
2617
2642
|
const a = (u) => {
|
|
2618
2643
|
this.ui.dropdownContent.classList.contains(
|
|
2619
|
-
|
|
2644
|
+
N.HIDE
|
|
2620
2645
|
) && [x.ARROW_UP, x.ARROW_DOWN, x.SPACE, x.ENTER].includes(u.key) && (u.preventDefault(), u.stopPropagation(), this._openDropdown()), u.key === x.TAB && this._closeDropdown();
|
|
2621
2646
|
};
|
|
2622
2647
|
this.ui.countryContainer.addEventListener(
|
|
@@ -2646,17 +2671,17 @@ class R1 {
|
|
|
2646
2671
|
}
|
|
2647
2672
|
} else
|
|
2648
2673
|
this.resolveUtilsScriptPromise();
|
|
2649
|
-
$ ===
|
|
2674
|
+
$ === P1.AUTO && i && !this.selectedCountryData.iso2 ? this._loadAutoCountry() : this.resolveAutoCountryPromise();
|
|
2650
2675
|
}
|
|
2651
2676
|
//* Perform the geo ip lookup.
|
|
2652
2677
|
_loadAutoCountry() {
|
|
2653
2678
|
m.autoCountry ? this.handleAutoCountry() : m.startedLoadingAutoCountry || (m.startedLoadingAutoCountry = !0, typeof this.options.geoIpLookup == "function" && this.options.geoIpLookup(
|
|
2654
2679
|
(e = "") => {
|
|
2655
2680
|
const $ = e.toLowerCase();
|
|
2656
|
-
|
|
2681
|
+
O1($) ? (m.autoCountry = $, setTimeout(() => l1("handleAutoCountry"))) : (this._setInitialState(!0), l1("rejectAutoCountryPromise"));
|
|
2657
2682
|
},
|
|
2658
2683
|
() => {
|
|
2659
|
-
this._setInitialState(!0),
|
|
2684
|
+
this._setInitialState(!0), l1("rejectAutoCountryPromise");
|
|
2660
2685
|
}
|
|
2661
2686
|
));
|
|
2662
2687
|
}
|
|
@@ -2676,40 +2701,38 @@ class R1 {
|
|
|
2676
2701
|
countrySearch: a
|
|
2677
2702
|
} = this.options;
|
|
2678
2703
|
let u = !1;
|
|
2679
|
-
|
|
2704
|
+
d1.ALPHA_UNICODE.test(this._getTelInputValue()) && (u = !0);
|
|
2680
2705
|
const f = (C) => {
|
|
2706
|
+
const y = this._getTelInputValue();
|
|
2681
2707
|
if (this.isAndroid && (C == null ? void 0 : C.data) === "+" && i && s && a) {
|
|
2682
|
-
const
|
|
2683
|
-
|
|
2684
|
-
v - 1
|
|
2685
|
-
), T = this.ui.telInput.value.substring(v);
|
|
2686
|
-
this.ui.telInput.value = N + T, this._openDropdownWithPlus();
|
|
2708
|
+
const w = this.ui.telInput.selectionStart || 0, H = y.substring(0, w - 1), k = y.substring(w);
|
|
2709
|
+
this._setTelInputValue(H + k), this._openDropdownWithPlus();
|
|
2687
2710
|
return;
|
|
2688
2711
|
}
|
|
2689
|
-
this._updateCountryFromNumber(
|
|
2690
|
-
const
|
|
2691
|
-
|
|
2692
|
-
const
|
|
2693
|
-
if ($ && !u && !
|
|
2694
|
-
const
|
|
2712
|
+
this._updateCountryFromNumber(y) && this._triggerCountryChange();
|
|
2713
|
+
const _ = (C == null ? void 0 : C.data) && d1.NON_PLUS_NUMERIC.test(C.data), T = (C == null ? void 0 : C.inputType) === _0.PASTE && y;
|
|
2714
|
+
_ || T && !e ? u = !0 : d1.NON_PLUS_NUMERIC.test(y) || (u = !1);
|
|
2715
|
+
const B = (C == null ? void 0 : C.detail) && C.detail.isSetNumber, E = this.userNumeralSet === "ascii";
|
|
2716
|
+
if ($ && !u && !B && E) {
|
|
2717
|
+
const w = this.ui.telInput.selectionStart || 0, k = y.substring(
|
|
2695
2718
|
0,
|
|
2696
|
-
|
|
2719
|
+
w
|
|
2697
2720
|
).replace(
|
|
2698
|
-
|
|
2721
|
+
d1.NON_PLUS_NUMERIC_GLOBAL,
|
|
2699
2722
|
""
|
|
2700
|
-
).length,
|
|
2701
|
-
|
|
2702
|
-
|
|
2723
|
+
).length, W = (C == null ? void 0 : C.inputType) === _0.DELETE_FWD, D = this._getFullNumber(), K = I2(
|
|
2724
|
+
D,
|
|
2725
|
+
y,
|
|
2703
2726
|
m.utils,
|
|
2704
2727
|
this.selectedCountryData,
|
|
2705
2728
|
this.options.separateDialCode
|
|
2706
|
-
),
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2729
|
+
), V = _2(
|
|
2730
|
+
k,
|
|
2731
|
+
K,
|
|
2732
|
+
w,
|
|
2733
|
+
W
|
|
2711
2734
|
);
|
|
2712
|
-
this.
|
|
2735
|
+
this._setTelInputValue(K), this.ui.telInput.setSelectionRange(V, V);
|
|
2713
2736
|
}
|
|
2714
2737
|
};
|
|
2715
2738
|
this.ui.telInput.addEventListener(
|
|
@@ -2730,11 +2753,11 @@ class R1 {
|
|
|
2730
2753
|
return;
|
|
2731
2754
|
}
|
|
2732
2755
|
if (e) {
|
|
2733
|
-
const f = this.
|
|
2734
|
-
|
|
2756
|
+
const f = this._getTelInputValue(), y = !f.startsWith("+") && this.ui.telInput.selectionStart === 0 && u.key === "+", _ = this._normaliseNumerals(u.key), T = /^[0-9]$/.test(_), B = $ ? T : y || T, E = this.ui.telInput, w = E.selectionStart, H = E.selectionEnd, k = f.slice(0, w), W = f.slice(H), D = k + u.key + W, K = this._getFullNumber(D), V = m.utils.getCoreNumber(
|
|
2757
|
+
K,
|
|
2735
2758
|
this.selectedCountryData.iso2
|
|
2736
|
-
),
|
|
2737
|
-
(!
|
|
2759
|
+
), $1 = this.maxCoreNumberLength && V.length > this.maxCoreNumberLength, a1 = this._getNewCountryFromNumber(K) !== null;
|
|
2760
|
+
(!B || $1 && !a1 && !y) && u.preventDefault();
|
|
2738
2761
|
}
|
|
2739
2762
|
}
|
|
2740
2763
|
};
|
|
@@ -2747,21 +2770,24 @@ class R1 {
|
|
|
2747
2770
|
if (this.options.strictMode) {
|
|
2748
2771
|
const e = ($) => {
|
|
2749
2772
|
$.preventDefault();
|
|
2750
|
-
const i = this.ui.telInput, s = i.selectionStart, a = i.selectionEnd, u =
|
|
2751
|
-
let
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
if (i.selectionEnd === i.value.length) {
|
|
2758
|
-
const y1 = B.length - this.maxCoreNumberLength;
|
|
2759
|
-
P = P.slice(0, P.length - y1);
|
|
2760
|
-
} else
|
|
2773
|
+
const i = this.ui.telInput, s = i.selectionStart, a = i.selectionEnd, u = this._getTelInputValue(), f = u.slice(0, s), C = u.slice(a), y = this.selectedCountryData.iso2, _ = $.clipboardData.getData("text"), T = this._normaliseNumerals(_), B = s === 0 && a > 0, E = !u.startsWith("+") || B, w = T.replace(d1.NON_PLUS_NUMERIC_GLOBAL, ""), H = w.startsWith("+"), k = w.replace(/\+/g, ""), W = H && E ? `+${k}` : k;
|
|
2774
|
+
let D = f + W + C;
|
|
2775
|
+
if (D.length > 5) {
|
|
2776
|
+
let V = m.utils.getCoreNumber(D, y);
|
|
2777
|
+
for (; V.length === 0 && D.length > 0; )
|
|
2778
|
+
D = D.slice(0, -1), V = m.utils.getCoreNumber(D, y);
|
|
2779
|
+
if (!V)
|
|
2761
2780
|
return;
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2781
|
+
if (this.maxCoreNumberLength && V.length > this.maxCoreNumberLength)
|
|
2782
|
+
if (i.selectionEnd === u.length) {
|
|
2783
|
+
const $1 = V.length - this.maxCoreNumberLength;
|
|
2784
|
+
D = D.slice(0, D.length - $1);
|
|
2785
|
+
} else
|
|
2786
|
+
return;
|
|
2787
|
+
}
|
|
2788
|
+
this._setTelInputValue(D);
|
|
2789
|
+
const K = s + W.length;
|
|
2790
|
+
i.setSelectionRange(K, K), i.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
|
|
2765
2791
|
};
|
|
2766
2792
|
this.ui.telInput.addEventListener("paste", e, {
|
|
2767
2793
|
signal: this.abortController.signal
|
|
@@ -2785,11 +2811,11 @@ class R1 {
|
|
|
2785
2811
|
//* Open the dropdown.
|
|
2786
2812
|
_openDropdown() {
|
|
2787
2813
|
const { fixDropdownWidth: e, countrySearch: $ } = this.options;
|
|
2788
|
-
if (this.dropdownAbortController = new AbortController(), e && (this.ui.dropdownContent.style.width = `${this.ui.telInput.offsetWidth}px`), this.ui.dropdownContent.classList.remove(
|
|
2814
|
+
if (this.dropdownAbortController = new AbortController(), e && (this.ui.dropdownContent.style.width = `${this.ui.telInput.offsetWidth}px`), this.ui.dropdownContent.classList.remove(N.HIDE), this.ui.selectedCountry.setAttribute(b.EXPANDED, "true"), this._setDropdownPosition(), $) {
|
|
2789
2815
|
const i = this.ui.countryList.firstElementChild;
|
|
2790
2816
|
i && (this.ui.highlightListItem(i, !1), this.ui.countryList.scrollTop = 0), this.ui.searchInput.focus();
|
|
2791
2817
|
}
|
|
2792
|
-
this._bindDropdownListeners(), this.ui.dropdownArrow.classList.add(
|
|
2818
|
+
this._bindDropdownListeners(), this.ui.dropdownArrow.classList.add(N.ARROW_UP), this._trigger(_1.OPEN_COUNTRY_DROPDOWN);
|
|
2793
2819
|
}
|
|
2794
2820
|
//* Set the dropdown position
|
|
2795
2821
|
_setDropdownPosition() {
|
|
@@ -2815,7 +2841,7 @@ class R1 {
|
|
|
2815
2841
|
const $ = (i) => {
|
|
2816
2842
|
var a;
|
|
2817
2843
|
const s = (a = i.target) == null ? void 0 : a.closest(
|
|
2818
|
-
`.${
|
|
2844
|
+
`.${N.COUNTRY_ITEM}`
|
|
2819
2845
|
);
|
|
2820
2846
|
s && this.ui.highlightListItem(s, !1);
|
|
2821
2847
|
};
|
|
@@ -2832,7 +2858,7 @@ class R1 {
|
|
|
2832
2858
|
const $ = (i) => {
|
|
2833
2859
|
var a;
|
|
2834
2860
|
const s = (a = i.target) == null ? void 0 : a.closest(
|
|
2835
|
-
`.${
|
|
2861
|
+
`.${N.COUNTRY_ITEM}`
|
|
2836
2862
|
);
|
|
2837
2863
|
s && this._selectListItem(s);
|
|
2838
2864
|
};
|
|
@@ -2868,7 +2894,7 @@ class R1 {
|
|
|
2868
2894
|
x.ARROW_DOWN,
|
|
2869
2895
|
x.ENTER,
|
|
2870
2896
|
x.ESC
|
|
2871
|
-
].includes(a.key) && (a.preventDefault(), a.stopPropagation(), a.key === x.ARROW_UP || a.key === x.ARROW_DOWN ? this._handleUpDownKey(a.key) : a.key === x.ENTER ? this._handleEnterKey() : a.key === x.ESC && (this._closeDropdown(), this.ui.selectedCountry.focus())), !this.options.countrySearch &&
|
|
2897
|
+
].includes(a.key) && (a.preventDefault(), a.stopPropagation(), a.key === x.ARROW_UP || a.key === x.ARROW_DOWN ? this._handleUpDownKey(a.key) : a.key === x.ENTER ? this._handleEnterKey() : a.key === x.ESC && (this._closeDropdown(), this.ui.selectedCountry.focus())), !this.options.countrySearch && d1.HIDDEN_SEARCH_CHAR.test(a.key) && (a.stopPropagation(), i && clearTimeout(i), $ += a.key.toLowerCase(), this._searchForCountry($), i = setTimeout(() => {
|
|
2872
2898
|
$ = "";
|
|
2873
2899
|
}, i2.HIDDEN_SEARCH_RESET_MS));
|
|
2874
2900
|
};
|
|
@@ -2878,7 +2904,7 @@ class R1 {
|
|
|
2878
2904
|
_bindDropdownSearchListeners(e) {
|
|
2879
2905
|
const $ = () => {
|
|
2880
2906
|
const u = this.ui.searchInput.value.trim();
|
|
2881
|
-
this._filterCountriesByQuery(u), this.ui.searchInput.value ? this.ui.searchClearButton.classList.remove(
|
|
2907
|
+
this._filterCountriesByQuery(u), this.ui.searchInput.value ? this.ui.searchClearButton.classList.remove(N.HIDE) : this.ui.searchClearButton.classList.add(N.HIDE);
|
|
2882
2908
|
};
|
|
2883
2909
|
let i = null;
|
|
2884
2910
|
const s = () => {
|
|
@@ -2931,7 +2957,7 @@ class R1 {
|
|
|
2931
2957
|
u
|
|
2932
2958
|
);
|
|
2933
2959
|
}
|
|
2934
|
-
$ = this._beforeSetNumber($), this.
|
|
2960
|
+
$ = this._beforeSetNumber($), this._setTelInputValue($);
|
|
2935
2961
|
}
|
|
2936
2962
|
//* Check if need to select a new country based on the given number
|
|
2937
2963
|
//* Note: called from _setInitialState, keyup handler, setNumber.
|
|
@@ -2955,27 +2981,27 @@ class R1 {
|
|
|
2955
2981
|
let i = $ ? e.substring($) : e;
|
|
2956
2982
|
const s = this.selectedCountryData.iso2, a = this.selectedCountryData.dialCode;
|
|
2957
2983
|
i = this._ensureHasDialCode(i);
|
|
2958
|
-
const u = this._getDialCode(i, !0), f =
|
|
2984
|
+
const u = this._getDialCode(i, !0), f = N1(i);
|
|
2959
2985
|
if (u) {
|
|
2960
|
-
const C =
|
|
2961
|
-
if (
|
|
2962
|
-
return
|
|
2963
|
-
if (!s && this.defaultCountry &&
|
|
2986
|
+
const C = N1(u), y = this.dialCodeToIso2Map[C];
|
|
2987
|
+
if (y.length === 1)
|
|
2988
|
+
return y[0] === s ? null : y[0];
|
|
2989
|
+
if (!s && this.defaultCountry && y.includes(this.defaultCountry))
|
|
2964
2990
|
return this.defaultCountry;
|
|
2965
|
-
if (a ===
|
|
2991
|
+
if (a === T0.NANP && S0(f))
|
|
2966
2992
|
return null;
|
|
2967
|
-
const { areaCodes:
|
|
2968
|
-
if (
|
|
2969
|
-
const
|
|
2970
|
-
(
|
|
2993
|
+
const { areaCodes: T, priority: B } = this.selectedCountryData;
|
|
2994
|
+
if (T) {
|
|
2995
|
+
const W = T.map(
|
|
2996
|
+
(D) => `${a}${D}`
|
|
2971
2997
|
);
|
|
2972
|
-
for (const
|
|
2973
|
-
if (f.startsWith(
|
|
2998
|
+
for (const D of W)
|
|
2999
|
+
if (f.startsWith(D))
|
|
2974
3000
|
return null;
|
|
2975
3001
|
}
|
|
2976
|
-
const
|
|
2977
|
-
if (!
|
|
2978
|
-
return
|
|
3002
|
+
const w = T && !(B === 0) && f.length > C.length, H = s && y.includes(s) && !w, k = s === y[0];
|
|
3003
|
+
if (!H && !k)
|
|
3004
|
+
return y[0];
|
|
2979
3005
|
} else if (i.startsWith("+") && f.length) {
|
|
2980
3006
|
const C = this.selectedCountryData.dialCode || "";
|
|
2981
3007
|
return C && C.startsWith(f) ? null : "";
|
|
@@ -2988,14 +3014,14 @@ class R1 {
|
|
|
2988
3014
|
_setCountry(e) {
|
|
2989
3015
|
const { separateDialCode: $, showFlags: i, i18n: s } = this.options, a = this.selectedCountryData.iso2 || "";
|
|
2990
3016
|
if (this.selectedCountryData = e ? this.countryByIso2.get(e) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.ui.selectedCountry) {
|
|
2991
|
-
const u = e && i ? `${
|
|
3017
|
+
const u = e && i ? `${N.FLAG} iti__${e}` : `${N.FLAG} ${N.GLOBE}`;
|
|
2992
3018
|
let f, C;
|
|
2993
3019
|
if (e) {
|
|
2994
|
-
const { name:
|
|
2995
|
-
C =
|
|
3020
|
+
const { name: y, dialCode: _ } = this.selectedCountryData;
|
|
3021
|
+
C = y, f = s.selectedCountryAriaLabel.replace("${countryName}", y).replace("${dialCode}", `+${_}`);
|
|
2996
3022
|
} else
|
|
2997
3023
|
C = s.noCountrySelected, f = s.noCountrySelected;
|
|
2998
|
-
this.ui.selectedCountryInner.className = u, this.ui.selectedCountry.setAttribute("title", C), this.ui.selectedCountry.setAttribute(
|
|
3024
|
+
this.ui.selectedCountryInner.className = u, this.ui.selectedCountry.setAttribute("title", C), this.ui.selectedCountry.setAttribute(b.LABEL, f);
|
|
2999
3025
|
}
|
|
3000
3026
|
if ($) {
|
|
3001
3027
|
const u = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
@@ -3033,7 +3059,7 @@ class R1 {
|
|
|
3033
3059
|
placeholderNumberType: $,
|
|
3034
3060
|
nationalMode: i,
|
|
3035
3061
|
customPlaceholder: s
|
|
3036
|
-
} = this.options, a = e ===
|
|
3062
|
+
} = this.options, a = e === x1.AGGRESSIVE || !this.ui.hadInitialPlaceholder && e === x1.POLITE;
|
|
3037
3063
|
if (m.utils && a) {
|
|
3038
3064
|
const u = m.utils.numberType[$];
|
|
3039
3065
|
let f = this.selectedCountryData.iso2 ? m.utils.getExampleNumber(
|
|
@@ -3046,23 +3072,27 @@ class R1 {
|
|
|
3046
3072
|
}
|
|
3047
3073
|
//* Called when the user selects a list item from the dropdown.
|
|
3048
3074
|
_selectListItem(e) {
|
|
3049
|
-
const $ = e.dataset[
|
|
3075
|
+
const $ = e.dataset[E0.COUNTRY_CODE], i = this._setCountry($);
|
|
3050
3076
|
this._closeDropdown();
|
|
3051
|
-
const s = e.dataset[
|
|
3052
|
-
this._updateDialCode(s), this.options.formatOnDisplay
|
|
3077
|
+
const s = e.dataset[E0.DIAL_CODE];
|
|
3078
|
+
if (this._updateDialCode(s), this.options.formatOnDisplay) {
|
|
3079
|
+
const a = this._getTelInputValue();
|
|
3080
|
+
this._updateValFromNumber(a);
|
|
3081
|
+
}
|
|
3082
|
+
this.ui.telInput.focus(), i && this._triggerCountryChange();
|
|
3053
3083
|
}
|
|
3054
3084
|
//* Close the dropdown and unbind any listeners.
|
|
3055
3085
|
_closeDropdown() {
|
|
3056
|
-
this.ui.dropdownContent.classList.contains(
|
|
3086
|
+
this.ui.dropdownContent.classList.contains(N.HIDE) || (this.ui.dropdownContent.classList.add(N.HIDE), this.ui.selectedCountry.setAttribute(b.EXPANDED, "false"), this.ui.highlightedItem && this.ui.highlightedItem.setAttribute(b.SELECTED, "false"), this.options.countrySearch && this.ui.searchInput.removeAttribute(b.ACTIVE_DESCENDANT), this.ui.dropdownArrow.classList.remove(N.ARROW_UP), this.dropdownAbortController.abort(), this.dropdownAbortController = null, this.options.dropdownContainer && this.ui.dropdown.remove(), this._trigger(_1.CLOSE_COUNTRY_DROPDOWN));
|
|
3057
3087
|
}
|
|
3058
3088
|
//* Replace any existing dial code with the new one
|
|
3059
3089
|
//* Note: called from _selectListItem and setCountry
|
|
3060
3090
|
_updateDialCode(e) {
|
|
3061
|
-
const $ = this.
|
|
3091
|
+
const $ = this._getTelInputValue(), i = `+${e}`;
|
|
3062
3092
|
let s;
|
|
3063
3093
|
if ($.startsWith("+")) {
|
|
3064
3094
|
const a = this._getDialCode($);
|
|
3065
|
-
a ? s = $.replace(a, i) : s = i, this.
|
|
3095
|
+
a ? s = $.replace(a, i) : s = i, this._setTelInputValue(s);
|
|
3066
3096
|
}
|
|
3067
3097
|
}
|
|
3068
3098
|
//* Try and extract a valid international dial code from a full telephone number.
|
|
@@ -3089,9 +3119,9 @@ class R1 {
|
|
|
3089
3119
|
}
|
|
3090
3120
|
//* Get the input val, adding the dial code if separateDialCode is enabled.
|
|
3091
3121
|
_getFullNumber(e) {
|
|
3092
|
-
const $ = e
|
|
3122
|
+
const $ = e ? this._normaliseNumerals(e) : this._getTelInputValue(), { dialCode: i } = this.selectedCountryData;
|
|
3093
3123
|
let s;
|
|
3094
|
-
const a =
|
|
3124
|
+
const a = N1($);
|
|
3095
3125
|
return this.options.separateDialCode && !$.startsWith("+") && i && a ? s = `+${i}` : s = "", s + $;
|
|
3096
3126
|
}
|
|
3097
3127
|
//* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
|
|
@@ -3106,18 +3136,22 @@ class R1 {
|
|
|
3106
3136
|
}
|
|
3107
3137
|
//* Trigger the 'countrychange' event.
|
|
3108
3138
|
_triggerCountryChange() {
|
|
3109
|
-
this._trigger(
|
|
3139
|
+
this._trigger(_1.COUNTRY_CHANGE);
|
|
3110
3140
|
}
|
|
3111
3141
|
//**************************
|
|
3112
3142
|
//* SECRET PUBLIC METHODS
|
|
3113
3143
|
//**************************
|
|
3114
3144
|
//* This is called when the geoip call returns.
|
|
3115
3145
|
handleAutoCountry() {
|
|
3116
|
-
this.options.initialCountry ===
|
|
3146
|
+
this.options.initialCountry === P1.AUTO && m.autoCountry && (this.defaultCountry = m.autoCountry, this.selectedCountryData.iso2 || this.ui.selectedCountryInner.classList.contains(N.GLOBE) || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
|
|
3117
3147
|
}
|
|
3118
3148
|
//* This is called when the utils request completes.
|
|
3119
3149
|
handleUtils() {
|
|
3120
|
-
m.utils
|
|
3150
|
+
if (m.utils) {
|
|
3151
|
+
const e = this._getTelInputValue();
|
|
3152
|
+
e && this._updateValFromNumber(e), this.selectedCountryData.iso2 && (this._updatePlaceholder(), this._updateMaxLength());
|
|
3153
|
+
}
|
|
3154
|
+
this.resolveUtilsScriptPromise();
|
|
3121
3155
|
}
|
|
3122
3156
|
//********************
|
|
3123
3157
|
//* PUBLIC METHODS
|
|
@@ -3136,12 +3170,12 @@ class R1 {
|
|
|
3136
3170
|
//* Format the number to the given format.
|
|
3137
3171
|
getNumber(e) {
|
|
3138
3172
|
if (m.utils) {
|
|
3139
|
-
const { iso2: $ } = this.selectedCountryData
|
|
3140
|
-
|
|
3141
|
-
this._getFullNumber(),
|
|
3173
|
+
const { iso2: $ } = this.selectedCountryData, i = this._getFullNumber(), s = m.utils.formatNumber(
|
|
3174
|
+
i,
|
|
3142
3175
|
$,
|
|
3143
3176
|
e
|
|
3144
3177
|
);
|
|
3178
|
+
return this._mapAsciiToUserNumerals(s);
|
|
3145
3179
|
}
|
|
3146
3180
|
return "";
|
|
3147
3181
|
}
|
|
@@ -3150,7 +3184,7 @@ class R1 {
|
|
|
3150
3184
|
return m.utils ? m.utils.getNumberType(
|
|
3151
3185
|
this._getFullNumber(),
|
|
3152
3186
|
this.selectedCountryData.iso2
|
|
3153
|
-
) :
|
|
3187
|
+
) : N0.UNKNOWN_NUMBER_TYPE;
|
|
3154
3188
|
}
|
|
3155
3189
|
//* Get the country data for the currently selected country.
|
|
3156
3190
|
getSelectedCountryData() {
|
|
@@ -3162,14 +3196,14 @@ class R1 {
|
|
|
3162
3196
|
const { iso2: e } = this.selectedCountryData;
|
|
3163
3197
|
return m.utils.getValidationError(this._getFullNumber(), e);
|
|
3164
3198
|
}
|
|
3165
|
-
return
|
|
3199
|
+
return N0.UNKNOWN_VALIDATION_ERROR;
|
|
3166
3200
|
}
|
|
3167
3201
|
//* Validate the input val using number length only
|
|
3168
3202
|
isValidNumber() {
|
|
3169
3203
|
const { dialCode: e, iso2: $ } = this.selectedCountryData;
|
|
3170
|
-
if (e ===
|
|
3204
|
+
if (e === v1.DIAL_CODE && m.utils) {
|
|
3171
3205
|
const i = this._getFullNumber(), s = m.utils.getCoreNumber(i, $);
|
|
3172
|
-
if (s[0] ===
|
|
3206
|
+
if (s[0] === v1.MOBILE_PREFIX && s.length !== v1.MOBILE_CORE_LENGTH)
|
|
3173
3207
|
return !1;
|
|
3174
3208
|
}
|
|
3175
3209
|
return this._validateNumber(!1);
|
|
@@ -3191,7 +3225,7 @@ class R1 {
|
|
|
3191
3225
|
return null;
|
|
3192
3226
|
if (!this.selectedCountryData.iso2)
|
|
3193
3227
|
return !1;
|
|
3194
|
-
const $ = (u) => e ? this._utilsIsValidNumber(u) : this._utilsIsPossibleNumber(u), i = this._getFullNumber(), s = i.search(
|
|
3228
|
+
const $ = (u) => e ? this._utilsIsValidNumber(u) : this._utilsIsPossibleNumber(u), i = this._getFullNumber(), s = i.search(d1.ALPHA_UNICODE);
|
|
3195
3229
|
if (s > -1 && !this.options.allowPhonewords) {
|
|
3196
3230
|
const u = i.substring(0, s), f = $(u), C = $(i);
|
|
3197
3231
|
return f && C;
|
|
@@ -3208,15 +3242,21 @@ class R1 {
|
|
|
3208
3242
|
//* Update the selected country, and update the input val accordingly.
|
|
3209
3243
|
setCountry(e) {
|
|
3210
3244
|
const $ = e == null ? void 0 : e.toLowerCase();
|
|
3211
|
-
if (!
|
|
3245
|
+
if (!O1($))
|
|
3212
3246
|
throw new Error(`Invalid country code: '${$}'`);
|
|
3213
3247
|
const i = this.selectedCountryData.iso2;
|
|
3214
|
-
(e && $ !== i || !e && i)
|
|
3248
|
+
if (e && $ !== i || !e && i) {
|
|
3249
|
+
if (this._setCountry($), this._updateDialCode(this.selectedCountryData.dialCode), this.options.formatOnDisplay) {
|
|
3250
|
+
const a = this._getTelInputValue();
|
|
3251
|
+
this._updateValFromNumber(a);
|
|
3252
|
+
}
|
|
3253
|
+
this._triggerCountryChange();
|
|
3254
|
+
}
|
|
3215
3255
|
}
|
|
3216
3256
|
//* Set the input value and update the country.
|
|
3217
3257
|
setNumber(e) {
|
|
3218
|
-
const $ = this.
|
|
3219
|
-
this._updateValFromNumber(
|
|
3258
|
+
const $ = this._normaliseNumerals(e), i = this._updateCountryFromNumber($);
|
|
3259
|
+
this._updateValFromNumber($), i && this._triggerCountryChange(), this._trigger(_1.INPUT, { isSetNumber: !0 });
|
|
3220
3260
|
}
|
|
3221
3261
|
//* Set the placeholder number typ
|
|
3222
3262
|
setPlaceholderNumberType(e) {
|
|
@@ -3226,7 +3266,7 @@ class R1 {
|
|
|
3226
3266
|
this.ui.telInput.disabled = e, e ? this.ui.selectedCountry.setAttribute("disabled", "true") : this.ui.selectedCountry.removeAttribute("disabled");
|
|
3227
3267
|
}
|
|
3228
3268
|
}
|
|
3229
|
-
const
|
|
3269
|
+
const b2 = (h) => {
|
|
3230
3270
|
if (!m.utils && !m.startedLoadingUtilsScript) {
|
|
3231
3271
|
let e;
|
|
3232
3272
|
if (typeof h == "function")
|
|
@@ -3247,20 +3287,20 @@ const L2 = (h) => {
|
|
|
3247
3287
|
throw new TypeError(
|
|
3248
3288
|
"The loader function passed to attachUtils did not resolve to a module object with utils as its default export."
|
|
3249
3289
|
);
|
|
3250
|
-
return m.utils = i,
|
|
3290
|
+
return m.utils = i, l1("handleUtils"), !0;
|
|
3251
3291
|
}).catch(($) => {
|
|
3252
|
-
throw
|
|
3292
|
+
throw l1("rejectUtilsScriptPromise", $), $;
|
|
3253
3293
|
});
|
|
3254
3294
|
}
|
|
3255
3295
|
return null;
|
|
3256
|
-
},
|
|
3296
|
+
}, l1 = (h, ...e) => {
|
|
3257
3297
|
Object.values(m.instances).forEach(($) => {
|
|
3258
3298
|
const i = $[h];
|
|
3259
3299
|
typeof i == "function" && i.apply($, e);
|
|
3260
3300
|
});
|
|
3261
3301
|
}, m = Object.assign(
|
|
3262
3302
|
(h, e) => {
|
|
3263
|
-
const $ = new
|
|
3303
|
+
const $ = new B1(h, e);
|
|
3264
3304
|
return m.instances[$.id] = $, h.iti = $, $;
|
|
3265
3305
|
},
|
|
3266
3306
|
{
|
|
@@ -3268,7 +3308,7 @@ const L2 = (h) => {
|
|
|
3268
3308
|
//* Using a static var like this allows us to mock it in the tests.
|
|
3269
3309
|
documentReady: () => document.readyState === "complete",
|
|
3270
3310
|
//* Get the country data object.
|
|
3271
|
-
getCountryData: () =>
|
|
3311
|
+
getCountryData: () => t1,
|
|
3272
3312
|
//* A getter for the plugin instance.
|
|
3273
3313
|
getInstance: (h) => {
|
|
3274
3314
|
const e = h.dataset.intlTelInputId;
|
|
@@ -3276,10 +3316,10 @@ const L2 = (h) => {
|
|
|
3276
3316
|
},
|
|
3277
3317
|
//* A map from instance ID to instance object.
|
|
3278
3318
|
instances: {},
|
|
3279
|
-
attachUtils:
|
|
3319
|
+
attachUtils: b2,
|
|
3280
3320
|
startedLoadingUtilsScript: !1,
|
|
3281
3321
|
startedLoadingAutoCountry: !1,
|
|
3282
|
-
version: "25.
|
|
3322
|
+
version: "25.13.0"
|
|
3283
3323
|
}
|
|
3284
3324
|
);
|
|
3285
3325
|
(function() {
|
|
@@ -3325,7 +3365,7 @@ const L2 = (h) => {
|
|
|
3325
3365
|
}
|
|
3326
3366
|
new f();
|
|
3327
3367
|
const C = {};
|
|
3328
|
-
class
|
|
3368
|
+
class y {
|
|
3329
3369
|
constructor() {
|
|
3330
3370
|
if (C !== C) throw Error("SafeStyleSheet is not meant to be built directly");
|
|
3331
3371
|
}
|
|
@@ -3333,9 +3373,9 @@ const L2 = (h) => {
|
|
|
3333
3373
|
return "";
|
|
3334
3374
|
}
|
|
3335
3375
|
}
|
|
3336
|
-
new
|
|
3376
|
+
new y();
|
|
3337
3377
|
const _ = {};
|
|
3338
|
-
class
|
|
3378
|
+
class T {
|
|
3339
3379
|
constructor() {
|
|
3340
3380
|
var t = h.trustedTypes && h.trustedTypes.emptyHTML || "";
|
|
3341
3381
|
if (_ !== _) throw Error("SafeHtml is not meant to be built directly");
|
|
@@ -3345,65 +3385,65 @@ const L2 = (h) => {
|
|
|
3345
3385
|
return this.g.toString();
|
|
3346
3386
|
}
|
|
3347
3387
|
}
|
|
3348
|
-
new
|
|
3349
|
-
function
|
|
3388
|
+
new T();
|
|
3389
|
+
function B(d, t) {
|
|
3350
3390
|
switch (this.g = d, this.l = !!t.aa, this.h = t.i, this.s = t.type, this.o = !1, this.h) {
|
|
3391
|
+
case H:
|
|
3351
3392
|
case k:
|
|
3352
|
-
case P:
|
|
3353
|
-
case B:
|
|
3354
3393
|
case W:
|
|
3355
|
-
case
|
|
3356
|
-
case
|
|
3357
|
-
case
|
|
3394
|
+
case D:
|
|
3395
|
+
case K:
|
|
3396
|
+
case w:
|
|
3397
|
+
case E:
|
|
3358
3398
|
this.o = !0;
|
|
3359
3399
|
}
|
|
3360
3400
|
this.j = t.defaultValue;
|
|
3361
3401
|
}
|
|
3362
|
-
var
|
|
3363
|
-
function
|
|
3402
|
+
var E = 1, w = 2, H = 3, k = 4, W = 6, D = 16, K = 18;
|
|
3403
|
+
function V(d, t) {
|
|
3364
3404
|
for (this.h = d, this.g = {}, d = 0; d < t.length; d++) {
|
|
3365
3405
|
var n = t[d];
|
|
3366
3406
|
this.g[n.g] = n;
|
|
3367
3407
|
}
|
|
3368
3408
|
}
|
|
3369
|
-
function
|
|
3409
|
+
function $1(d) {
|
|
3370
3410
|
return d = i(d.g), d.sort(function(t, n) {
|
|
3371
3411
|
return t.g - n.g;
|
|
3372
3412
|
}), d;
|
|
3373
3413
|
}
|
|
3374
|
-
function
|
|
3414
|
+
function R() {
|
|
3375
3415
|
this.h = {}, this.j = this.m().g, this.g = this.l = null;
|
|
3376
3416
|
}
|
|
3377
|
-
|
|
3378
|
-
return
|
|
3379
|
-
},
|
|
3417
|
+
R.prototype.has = function(d) {
|
|
3418
|
+
return U(this, d.g);
|
|
3419
|
+
}, R.prototype.get = function(d, t) {
|
|
3380
3420
|
return g(this, d.g, t);
|
|
3381
|
-
},
|
|
3382
|
-
|
|
3383
|
-
},
|
|
3384
|
-
|
|
3421
|
+
}, R.prototype.set = function(d, t) {
|
|
3422
|
+
P(this, d.g, t);
|
|
3423
|
+
}, R.prototype.add = function(d, t) {
|
|
3424
|
+
U1(this, d.g, t);
|
|
3385
3425
|
};
|
|
3386
|
-
function
|
|
3387
|
-
for (var n =
|
|
3426
|
+
function a1(d, t) {
|
|
3427
|
+
for (var n = $1(d.m()), r = 0; r < n.length; r++) {
|
|
3388
3428
|
var o = n[r], l = o.g;
|
|
3389
|
-
if (
|
|
3429
|
+
if (U(t, l)) {
|
|
3390
3430
|
d.g && delete d.g[o.g];
|
|
3391
3431
|
var c = o.h == 11 || o.h == 10;
|
|
3392
3432
|
if (o.l) {
|
|
3393
3433
|
o = O(t, l);
|
|
3394
|
-
for (var p = 0; p < o.length; p++)
|
|
3395
|
-
} else o =
|
|
3434
|
+
for (var p = 0; p < o.length; p++) U1(d, l, c ? o[p].clone() : o[p]);
|
|
3435
|
+
} else o = c1(t, l), c ? (c = c1(d, l)) ? a1(c, o) : P(d, l, o.clone()) : P(d, l, o);
|
|
3396
3436
|
}
|
|
3397
3437
|
}
|
|
3398
3438
|
}
|
|
3399
|
-
|
|
3439
|
+
R.prototype.clone = function() {
|
|
3400
3440
|
var d = new this.constructor();
|
|
3401
|
-
return d != this && (d.h = {}, d.g && (d.g = {}),
|
|
3441
|
+
return d != this && (d.h = {}, d.g && (d.g = {}), a1(d, this)), d;
|
|
3402
3442
|
};
|
|
3403
|
-
function
|
|
3443
|
+
function U(d, t) {
|
|
3404
3444
|
return d.h[t] != null;
|
|
3405
3445
|
}
|
|
3406
|
-
function
|
|
3446
|
+
function c1(d, t) {
|
|
3407
3447
|
var n = d.h[t];
|
|
3408
3448
|
if (n == null) return null;
|
|
3409
3449
|
if (d.l) {
|
|
@@ -3420,11 +3460,11 @@ const L2 = (h) => {
|
|
|
3420
3460
|
return n;
|
|
3421
3461
|
}
|
|
3422
3462
|
function g(d, t, n) {
|
|
3423
|
-
var r =
|
|
3463
|
+
var r = c1(d, t);
|
|
3424
3464
|
return d.j[t].l ? r[n || 0] : r;
|
|
3425
3465
|
}
|
|
3426
3466
|
function S(d, t) {
|
|
3427
|
-
if (
|
|
3467
|
+
if (U(d, t)) d = g(d, t);
|
|
3428
3468
|
else d: {
|
|
3429
3469
|
if (d = d.j[t], d.j === void 0) if (t = d.s, t === Boolean) d.j = !1;
|
|
3430
3470
|
else if (t === Number) d.j = 0;
|
|
@@ -3438,105 +3478,105 @@ const L2 = (h) => {
|
|
|
3438
3478
|
return d;
|
|
3439
3479
|
}
|
|
3440
3480
|
function O(d, t) {
|
|
3441
|
-
return
|
|
3481
|
+
return c1(d, t) || [];
|
|
3442
3482
|
}
|
|
3443
|
-
function
|
|
3444
|
-
return d.j[t].l ?
|
|
3483
|
+
function z(d, t) {
|
|
3484
|
+
return d.j[t].l ? U(d, t) ? d.h[t].length : 0 : U(d, t) ? 1 : 0;
|
|
3445
3485
|
}
|
|
3446
|
-
function
|
|
3486
|
+
function P(d, t, n) {
|
|
3447
3487
|
d.h[t] = n, d.g && (d.g[t] = n);
|
|
3448
3488
|
}
|
|
3449
|
-
function
|
|
3489
|
+
function U1(d, t, n) {
|
|
3450
3490
|
d.h[t] || (d.h[t] = []), d.h[t].push(n), d.g && delete d.g[t];
|
|
3451
3491
|
}
|
|
3452
|
-
function
|
|
3492
|
+
function h1(d, t) {
|
|
3453
3493
|
var n = [], r;
|
|
3454
|
-
for (r in t) r != 0 && n.push(new
|
|
3455
|
-
return new
|
|
3494
|
+
for (r in t) r != 0 && n.push(new B(r, t[r]));
|
|
3495
|
+
return new V(d, n);
|
|
3456
3496
|
}
|
|
3457
|
-
function
|
|
3497
|
+
function f1() {
|
|
3458
3498
|
}
|
|
3459
|
-
|
|
3499
|
+
f1.prototype.g = function(d) {
|
|
3460
3500
|
throw new d.h(), Error("Unimplemented");
|
|
3461
|
-
},
|
|
3462
|
-
if (d.h == 11 || d.h == 10) return t instanceof
|
|
3463
|
-
if (d.h == 14) return typeof t == "string" &&
|
|
3501
|
+
}, f1.prototype.h = function(d, t) {
|
|
3502
|
+
if (d.h == 11 || d.h == 10) return t instanceof R ? t : this.g(d.s.prototype.m(), t);
|
|
3503
|
+
if (d.h == 14) return typeof t == "string" && G1.test(t) && (d = Number(t), 0 < d) ? d : t;
|
|
3464
3504
|
if (!d.o) return t;
|
|
3465
3505
|
if (d = d.s, d === String) {
|
|
3466
3506
|
if (typeof t == "number") return String(t);
|
|
3467
|
-
} else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" ||
|
|
3507
|
+
} else if (d === Number && typeof t == "string" && (t === "Infinity" || t === "-Infinity" || t === "NaN" || G1.test(t))) return Number(t);
|
|
3468
3508
|
return t;
|
|
3469
3509
|
};
|
|
3470
|
-
var
|
|
3471
|
-
function
|
|
3510
|
+
var G1 = /^-?[0-9]+$/;
|
|
3511
|
+
function E1() {
|
|
3472
3512
|
}
|
|
3473
|
-
$(
|
|
3513
|
+
$(E1, f1), E1.prototype.g = function(d, t) {
|
|
3474
3514
|
return d = new d.h(), d.l = this, d.h = t, d.g = {}, d;
|
|
3475
3515
|
};
|
|
3476
|
-
function
|
|
3516
|
+
function n1() {
|
|
3477
3517
|
}
|
|
3478
|
-
$(
|
|
3479
|
-
return d.h == 8 ? !!t :
|
|
3480
|
-
},
|
|
3481
|
-
return
|
|
3518
|
+
$(n1, E1), n1.prototype.h = function(d, t) {
|
|
3519
|
+
return d.h == 8 ? !!t : f1.prototype.h.apply(this, arguments);
|
|
3520
|
+
}, n1.prototype.g = function(d, t) {
|
|
3521
|
+
return n1.ma.g.call(this, d, t);
|
|
3482
3522
|
};
|
|
3483
|
-
function
|
|
3523
|
+
function v(d, t) {
|
|
3484
3524
|
d != null && this.g.apply(this, arguments);
|
|
3485
3525
|
}
|
|
3486
|
-
|
|
3526
|
+
v.prototype.h = "", v.prototype.set = function(d) {
|
|
3487
3527
|
this.h = "" + d;
|
|
3488
|
-
},
|
|
3528
|
+
}, v.prototype.g = function(d, t, n) {
|
|
3489
3529
|
if (this.h += String(d), t != null) for (let r = 1; r < arguments.length; r++) this.h += arguments[r];
|
|
3490
3530
|
return this;
|
|
3491
3531
|
};
|
|
3492
|
-
function
|
|
3532
|
+
function G(d) {
|
|
3493
3533
|
d.h = "";
|
|
3494
3534
|
}
|
|
3495
|
-
|
|
3535
|
+
v.prototype.toString = function() {
|
|
3496
3536
|
return this.h;
|
|
3497
3537
|
};
|
|
3498
|
-
function
|
|
3499
|
-
|
|
3538
|
+
function X() {
|
|
3539
|
+
R.call(this);
|
|
3500
3540
|
}
|
|
3501
|
-
$(
|
|
3502
|
-
var
|
|
3503
|
-
function
|
|
3504
|
-
|
|
3541
|
+
$(X, R);
|
|
3542
|
+
var H1 = null;
|
|
3543
|
+
function A() {
|
|
3544
|
+
R.call(this);
|
|
3505
3545
|
}
|
|
3506
|
-
$(
|
|
3507
|
-
var
|
|
3508
|
-
function
|
|
3509
|
-
|
|
3546
|
+
$(A, R);
|
|
3547
|
+
var k1 = null;
|
|
3548
|
+
function q() {
|
|
3549
|
+
R.call(this);
|
|
3510
3550
|
}
|
|
3511
|
-
$(
|
|
3512
|
-
var
|
|
3513
|
-
|
|
3514
|
-
var d = U1;
|
|
3515
|
-
return d || (U1 = d = u1(Z, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
|
|
3516
|
-
}, Z.m = Z.prototype.m, b.prototype.m = function() {
|
|
3517
|
-
var d = G1;
|
|
3518
|
-
return d || (G1 = d = u1(b, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
|
|
3519
|
-
}, b.m = b.prototype.m, J.prototype.m = function() {
|
|
3551
|
+
$(q, R);
|
|
3552
|
+
var V1 = null;
|
|
3553
|
+
X.prototype.m = function() {
|
|
3520
3554
|
var d = H1;
|
|
3521
|
-
return d || (H1 = d =
|
|
3555
|
+
return d || (H1 = d = h1(X, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), d;
|
|
3556
|
+
}, X.m = X.prototype.m, A.prototype.m = function() {
|
|
3557
|
+
var d = k1;
|
|
3558
|
+
return d || (k1 = d = h1(A, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), d;
|
|
3559
|
+
}, A.m = A.prototype.m, q.prototype.m = function() {
|
|
3560
|
+
var d = V1;
|
|
3561
|
+
return d || (V1 = d = h1(q, {
|
|
3522
3562
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
3523
|
-
1: { name: "general_desc", i: 11, type:
|
|
3524
|
-
2: { name: "fixed_line", i: 11, type:
|
|
3525
|
-
3: { name: "mobile", i: 11, type:
|
|
3526
|
-
4: { name: "toll_free", i: 11, type:
|
|
3527
|
-
5: { name: "premium_rate", i: 11, type:
|
|
3528
|
-
6: { name: "shared_cost", i: 11, type:
|
|
3529
|
-
7: { name: "personal_number", i: 11, type:
|
|
3530
|
-
8: { name: "voip", i: 11, type:
|
|
3531
|
-
21: { name: "pager", i: 11, type:
|
|
3532
|
-
25: { name: "uan", i: 11, type:
|
|
3533
|
-
27: { name: "emergency", i: 11, type:
|
|
3534
|
-
28: { name: "voicemail", i: 11, type:
|
|
3535
|
-
29: { name: "short_code", i: 11, type:
|
|
3536
|
-
30: { name: "standard_rate", i: 11, type:
|
|
3537
|
-
31: { name: "carrier_specific", i: 11, type:
|
|
3538
|
-
33: { name: "sms_services", i: 11, type:
|
|
3539
|
-
24: { name: "no_international_dialling", i: 11, type:
|
|
3563
|
+
1: { name: "general_desc", i: 11, type: A },
|
|
3564
|
+
2: { name: "fixed_line", i: 11, type: A },
|
|
3565
|
+
3: { name: "mobile", i: 11, type: A },
|
|
3566
|
+
4: { name: "toll_free", i: 11, type: A },
|
|
3567
|
+
5: { name: "premium_rate", i: 11, type: A },
|
|
3568
|
+
6: { name: "shared_cost", i: 11, type: A },
|
|
3569
|
+
7: { name: "personal_number", i: 11, type: A },
|
|
3570
|
+
8: { name: "voip", i: 11, type: A },
|
|
3571
|
+
21: { name: "pager", i: 11, type: A },
|
|
3572
|
+
25: { name: "uan", i: 11, type: A },
|
|
3573
|
+
27: { name: "emergency", i: 11, type: A },
|
|
3574
|
+
28: { name: "voicemail", i: 11, type: A },
|
|
3575
|
+
29: { name: "short_code", i: 11, type: A },
|
|
3576
|
+
30: { name: "standard_rate", i: 11, type: A },
|
|
3577
|
+
31: { name: "carrier_specific", i: 11, type: A },
|
|
3578
|
+
33: { name: "sms_services", i: 11, type: A },
|
|
3579
|
+
24: { name: "no_international_dialling", i: 11, type: A },
|
|
3540
3580
|
9: { name: "id", required: !0, i: 9, type: String },
|
|
3541
3581
|
10: { name: "country_code", i: 5, type: Number },
|
|
3542
3582
|
11: { name: "international_prefix", i: 9, type: String },
|
|
@@ -3550,26 +3590,26 @@ const L2 = (h) => {
|
|
|
3550
3590
|
},
|
|
3551
3591
|
16: { name: "national_prefix_transform_rule", i: 9, type: String },
|
|
3552
3592
|
18: { name: "same_mobile_and_fixed_line_pattern", i: 8, defaultValue: !1, type: Boolean },
|
|
3553
|
-
19: { name: "number_format", aa: !0, i: 11, type:
|
|
3554
|
-
20: { name: "intl_number_format", aa: !0, i: 11, type:
|
|
3593
|
+
19: { name: "number_format", aa: !0, i: 11, type: X },
|
|
3594
|
+
20: { name: "intl_number_format", aa: !0, i: 11, type: X },
|
|
3555
3595
|
22: { name: "main_country_for_code", i: 8, defaultValue: !1, type: Boolean },
|
|
3556
3596
|
23: { name: "leading_digits", i: 9, type: String }
|
|
3557
3597
|
})), d;
|
|
3558
|
-
},
|
|
3559
|
-
function
|
|
3560
|
-
|
|
3598
|
+
}, q.m = q.prototype.m;
|
|
3599
|
+
function Z() {
|
|
3600
|
+
R.call(this);
|
|
3561
3601
|
}
|
|
3562
|
-
$(
|
|
3563
|
-
var
|
|
3564
|
-
|
|
3565
|
-
var d =
|
|
3566
|
-
return d || (
|
|
3602
|
+
$(Z, R);
|
|
3603
|
+
var F1 = null, D0 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
|
|
3604
|
+
Z.prototype.m = function() {
|
|
3605
|
+
var d = F1;
|
|
3606
|
+
return d || (F1 = d = h1(Z, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: D0 }, 7: {
|
|
3567
3607
|
name: "preferred_domestic_carrier_code",
|
|
3568
3608
|
i: 9,
|
|
3569
3609
|
type: String
|
|
3570
3610
|
} })), d;
|
|
3571
|
-
},
|
|
3572
|
-
var
|
|
3611
|
+
}, Z.ctor = Z, Z.ctor.m = Z.prototype.m;
|
|
3612
|
+
var i1 = {
|
|
3573
3613
|
1: "US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),
|
|
3574
3614
|
7: ["RU", "KZ"],
|
|
3575
3615
|
20: ["EG"],
|
|
@@ -3785,7 +3825,7 @@ const L2 = (h) => {
|
|
|
3785
3825
|
995: ["GE"],
|
|
3786
3826
|
996: ["KG"],
|
|
3787
3827
|
998: ["UZ"]
|
|
3788
|
-
},
|
|
3828
|
+
}, W1 = {
|
|
3789
3829
|
AC: [, [
|
|
3790
3830
|
,
|
|
3791
3831
|
,
|
|
@@ -8851,13 +8891,13 @@ const L2 = (h) => {
|
|
|
8851
8891
|
], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
|
|
8852
8892
|
979: [, [, , "[1359]\\d{8}", , , , , , , [9], [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "[1359]\\d{8}", , , , "123456789", , , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 979, , , , , , , , 1, [[, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]]
|
|
8853
8893
|
};
|
|
8854
|
-
function
|
|
8894
|
+
function M() {
|
|
8855
8895
|
this.g = {};
|
|
8856
8896
|
}
|
|
8857
|
-
|
|
8858
|
-
return
|
|
8897
|
+
M.h = void 0, M.g = function() {
|
|
8898
|
+
return M.h ? M.h : M.h = new M();
|
|
8859
8899
|
};
|
|
8860
|
-
var
|
|
8900
|
+
var S1 = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "٠": "0", "١": "1", "٢": "2", "٣": "3", "٤": "4", "٥": "5", "٦": "6", "٧": "7", "٨": "8", "٩": "9", "۰": "0", "۱": "1", "۲": "2", "۳": "3", "۴": "4", "۵": "5", "۶": "6", "۷": "7", "۸": "8", "۹": "9" }, v0 = {
|
|
8861
8901
|
0: "0",
|
|
8862
8902
|
1: "1",
|
|
8863
8903
|
2: "2",
|
|
@@ -8938,54 +8978,54 @@ const L2 = (h) => {
|
|
|
8938
8978
|
X: "9",
|
|
8939
8979
|
Y: "9",
|
|
8940
8980
|
Z: "9"
|
|
8941
|
-
}, M0 = RegExp("[++]+"),
|
|
8942
|
-
function
|
|
8981
|
+
}, M0 = RegExp("[++]+"), s1 = RegExp("^[++]+"), K1 = RegExp("([0-90-9٠-٩۰-۹])"), R0 = RegExp("[++0-90-9٠-٩۰-۹]"), O0 = /[\\\/] *x/, x0 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), B0 = /(?:.*?[A-Za-z]){3}.*/, U0 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), G0 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
|
|
8982
|
+
function e1(d) {
|
|
8943
8983
|
return "([0-90-9٠-٩۰-۹]{1," + d + "})";
|
|
8944
8984
|
}
|
|
8945
|
-
function
|
|
8946
|
-
return ";ext=" +
|
|
8947
|
-
}
|
|
8948
|
-
var K1 = new RegExp("(?:" + V1() + ")$", "i"), H0 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + V1() + ")?$", "i"), k0 = /(\$\d)/, F0 = /^\(?\$1\)?$/;
|
|
8949
|
-
function j1(d) {
|
|
8950
|
-
return 2 > d.length ? !1 : V(H0, d);
|
|
8951
|
-
}
|
|
8952
|
-
function Y1(d) {
|
|
8953
|
-
return V(B0, d) ? a1(d, P0) : a1(d, _1);
|
|
8985
|
+
function j1() {
|
|
8986
|
+
return ";ext=" + e1("20") + "|[ \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[ \\t,-]*" + (e1("20") + "#?|[ \\t,]*(?:[xx##~~]|int|int)[:\\..]?[ \\t,-]*") + (e1("9") + "#?|[- ]+") + (e1("6") + "#|[ \\t]*(?:,{2}|;)[:\\..]?[ \\t,-]*") + (e1("15") + "#?|[ \\t]*(?:,)+[:\\..]?[ \\t,-]*") + (e1("9") + "#?");
|
|
8954
8987
|
}
|
|
8988
|
+
var Y1 = new RegExp("(?:" + j1() + ")$", "i"), H0 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + j1() + ")?$", "i"), k0 = /(\$\d)/, V0 = /^\(?\$1\)?$/;
|
|
8955
8989
|
function z1(d) {
|
|
8956
|
-
|
|
8957
|
-
H(d), d.g(t);
|
|
8990
|
+
return 2 > d.length ? !1 : j(H0, d);
|
|
8958
8991
|
}
|
|
8959
8992
|
function Z1(d) {
|
|
8960
|
-
return d
|
|
8993
|
+
return j(B0, d) ? p1(d, P0) : p1(d, S1);
|
|
8961
8994
|
}
|
|
8962
|
-
function
|
|
8963
|
-
|
|
8995
|
+
function J1(d) {
|
|
8996
|
+
var t = Z1(d.toString());
|
|
8997
|
+
G(d), d.g(t);
|
|
8998
|
+
}
|
|
8999
|
+
function X1(d) {
|
|
9000
|
+
return d != null && (z(d, 9) != 1 || O(d, 9)[0] != -1);
|
|
9001
|
+
}
|
|
9002
|
+
function p1(d, t) {
|
|
9003
|
+
for (var n = new v(), r, o = d.length, l = 0; l < o; ++l) r = d.charAt(l), r = t[r.toUpperCase()], r != null && n.g(r);
|
|
8964
9004
|
return n.toString();
|
|
8965
9005
|
}
|
|
8966
|
-
function
|
|
8967
|
-
return d.length == 0 ||
|
|
9006
|
+
function q1(d) {
|
|
9007
|
+
return d.length == 0 || V0.test(d);
|
|
8968
9008
|
}
|
|
8969
|
-
function
|
|
8970
|
-
return d != null && isNaN(d) && d.toUpperCase() in
|
|
9009
|
+
function C1(d) {
|
|
9010
|
+
return d != null && isNaN(d) && d.toUpperCase() in W1;
|
|
8971
9011
|
}
|
|
8972
|
-
|
|
8973
|
-
if (g(d, 2) == 0 &&
|
|
9012
|
+
M.prototype.format = function(d, t) {
|
|
9013
|
+
if (g(d, 2) == 0 && U(d, 5)) {
|
|
8974
9014
|
var n = S(d, 5);
|
|
8975
9015
|
if (0 < n.length) return n;
|
|
8976
9016
|
}
|
|
8977
9017
|
n = S(d, 1);
|
|
8978
|
-
var r =
|
|
8979
|
-
if (t == 0) return
|
|
8980
|
-
if (!(n in
|
|
8981
|
-
var o =
|
|
8982
|
-
d =
|
|
9018
|
+
var r = o1(d);
|
|
9019
|
+
if (t == 0) return Q1(n, 0, r, "");
|
|
9020
|
+
if (!(n in i1)) return r;
|
|
9021
|
+
var o = r1(this, n, u1(n));
|
|
9022
|
+
d = U(d, 3) && g(d, 3).length != 0 ? t == 3 ? ";ext=" + g(d, 3) : U(o, 13) ? g(o, 13) + S(d, 3) : " ext. " + S(d, 3) : "";
|
|
8983
9023
|
d: {
|
|
8984
9024
|
o = O(o, 20).length == 0 || t == 2 ? O(o, 19) : O(o, 20);
|
|
8985
9025
|
for (var l, c = o.length, p = 0; p < c; ++p) {
|
|
8986
9026
|
l = o[p];
|
|
8987
|
-
var
|
|
8988
|
-
if ((
|
|
9027
|
+
var I = z(l, 3);
|
|
9028
|
+
if ((I == 0 || r.search(g(l, 3, I - 1)) == 0) && (I = new RegExp(g(l, 1)), j(I, r))) {
|
|
8989
9029
|
o = l;
|
|
8990
9030
|
break d;
|
|
8991
9031
|
}
|
|
@@ -8995,17 +9035,17 @@ const L2 = (h) => {
|
|
|
8995
9035
|
return o != null && (c = o, o = S(c, 2), l = new RegExp(g(c, 1)), S(
|
|
8996
9036
|
c,
|
|
8997
9037
|
5
|
|
8998
|
-
), c = S(c, 4), r = t == 2 && c != null && 0 < c.length ? r.replace(l, o.replace(k0, c)) : r.replace(l, o), t == 3 && (r = r.replace(RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+"), ""), r = r.replace(RegExp("[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))),
|
|
9038
|
+
), c = S(c, 4), r = t == 2 && c != null && 0 < c.length ? r.replace(l, o.replace(k0, c)) : r.replace(l, o), t == 3 && (r = r.replace(RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+"), ""), r = r.replace(RegExp("[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), Q1(n, t, r, d);
|
|
8999
9039
|
};
|
|
9000
|
-
function
|
|
9001
|
-
return n == "001" ?
|
|
9040
|
+
function r1(d, t, n) {
|
|
9041
|
+
return n == "001" ? J(d, "" + t) : J(d, n);
|
|
9002
9042
|
}
|
|
9003
|
-
function
|
|
9004
|
-
if (!
|
|
9043
|
+
function o1(d) {
|
|
9044
|
+
if (!U(d, 2)) return "";
|
|
9005
9045
|
var t = "" + g(d, 2);
|
|
9006
|
-
return
|
|
9046
|
+
return U(d, 4) && g(d, 4) && 0 < S(d, 8) ? Array(S(d, 8) + 1).join("0") + t : t;
|
|
9007
9047
|
}
|
|
9008
|
-
function
|
|
9048
|
+
function Q1(d, t, n, r) {
|
|
9009
9049
|
switch (t) {
|
|
9010
9050
|
case 0:
|
|
9011
9051
|
return "+" + d + n + r;
|
|
@@ -9017,7 +9057,7 @@ const L2 = (h) => {
|
|
|
9017
9057
|
return n + r;
|
|
9018
9058
|
}
|
|
9019
9059
|
}
|
|
9020
|
-
function
|
|
9060
|
+
function g1(d, t) {
|
|
9021
9061
|
switch (t) {
|
|
9022
9062
|
case 4:
|
|
9023
9063
|
return g(d, 5);
|
|
@@ -9044,47 +9084,47 @@ const L2 = (h) => {
|
|
|
9044
9084
|
return g(d, 1);
|
|
9045
9085
|
}
|
|
9046
9086
|
}
|
|
9047
|
-
function
|
|
9048
|
-
var n =
|
|
9049
|
-
return d =
|
|
9087
|
+
function d0(d, t) {
|
|
9088
|
+
var n = t0(d, t);
|
|
9089
|
+
return d = r1(d, S(t, 1), n), d == null ? -1 : (t = o1(t), b1(t, d));
|
|
9050
9090
|
}
|
|
9051
|
-
function
|
|
9091
|
+
function b1(d, t) {
|
|
9052
9092
|
return F(d, g(t, 1)) ? F(d, g(t, 5)) ? 4 : F(d, g(t, 4)) ? 3 : F(d, g(t, 6)) ? 5 : F(d, g(t, 8)) ? 6 : F(d, g(t, 7)) ? 7 : F(d, g(t, 21)) ? 8 : F(d, g(t, 25)) ? 9 : F(d, g(t, 28)) ? 10 : F(d, g(t, 2)) ? g(t, 18) || F(d, g(t, 3)) ? 2 : 0 : !g(t, 18) && F(d, g(t, 3)) ? 1 : -1 : -1;
|
|
9053
9093
|
}
|
|
9054
|
-
function
|
|
9094
|
+
function J(d, t) {
|
|
9055
9095
|
if (t == null) return null;
|
|
9056
9096
|
t = t.toUpperCase();
|
|
9057
9097
|
var n = d.g[t];
|
|
9058
9098
|
if (n == null) {
|
|
9059
|
-
if (n =
|
|
9060
|
-
n = new
|
|
9099
|
+
if (n = W1[t], n == null) return null;
|
|
9100
|
+
n = new n1().g(q.m(), n), d.g[t] = n;
|
|
9061
9101
|
}
|
|
9062
9102
|
return n;
|
|
9063
9103
|
}
|
|
9064
9104
|
function F(d, t) {
|
|
9065
9105
|
var n = d.length;
|
|
9066
|
-
return 0 <
|
|
9106
|
+
return 0 < z(t, 9) && O(t, 9).indexOf(n) == -1 ? !1 : j(S(t, 2), d);
|
|
9067
9107
|
}
|
|
9068
|
-
function
|
|
9069
|
-
var n =
|
|
9070
|
-
return o == null || n != "001" && r !=
|
|
9108
|
+
function F0(d, t) {
|
|
9109
|
+
var n = t0(d, t), r = S(t, 1), o = r1(d, r, n);
|
|
9110
|
+
return o == null || n != "001" && r != e0(d, n) ? o = !1 : (d = o1(t), o = b1(d, o) != -1), o;
|
|
9071
9111
|
}
|
|
9072
|
-
function
|
|
9112
|
+
function t0(d, t) {
|
|
9073
9113
|
if (t == null) return null;
|
|
9074
9114
|
var n = S(t, 1);
|
|
9075
|
-
if (n =
|
|
9115
|
+
if (n = i1[n], n == null) d = null;
|
|
9076
9116
|
else if (n.length == 1) d = n[0];
|
|
9077
9117
|
else d: {
|
|
9078
|
-
t =
|
|
9118
|
+
t = o1(t);
|
|
9079
9119
|
for (var r, o = n.length, l = 0; l < o; l++) {
|
|
9080
9120
|
r = n[l];
|
|
9081
|
-
var c =
|
|
9082
|
-
if (
|
|
9121
|
+
var c = J(d, r);
|
|
9122
|
+
if (U(c, 23)) {
|
|
9083
9123
|
if (t.search(g(c, 23)) == 0) {
|
|
9084
9124
|
d = r;
|
|
9085
9125
|
break d;
|
|
9086
9126
|
}
|
|
9087
|
-
} else if (
|
|
9127
|
+
} else if (b1(t, c) != -1) {
|
|
9088
9128
|
d = r;
|
|
9089
9129
|
break d;
|
|
9090
9130
|
}
|
|
@@ -9093,70 +9133,70 @@ const L2 = (h) => {
|
|
|
9093
9133
|
}
|
|
9094
9134
|
return d;
|
|
9095
9135
|
}
|
|
9096
|
-
function
|
|
9097
|
-
return d =
|
|
9136
|
+
function u1(d) {
|
|
9137
|
+
return d = i1[d], d == null ? "ZZ" : d[0];
|
|
9098
9138
|
}
|
|
9099
|
-
function
|
|
9100
|
-
if (d =
|
|
9139
|
+
function e0(d, t) {
|
|
9140
|
+
if (d = J(d, t), d == null) throw Error("Invalid region code: " + t);
|
|
9101
9141
|
return S(d, 10);
|
|
9102
9142
|
}
|
|
9103
|
-
function
|
|
9104
|
-
var o =
|
|
9105
|
-
if (o = O(o, 10), r == 2) if (
|
|
9106
|
-
else return
|
|
9143
|
+
function m1(d, t, n, r) {
|
|
9144
|
+
var o = g1(n, r), l = z(o, 9) == 0 ? O(g(n, 1), 9) : O(o, 9);
|
|
9145
|
+
if (o = O(o, 10), r == 2) if (X1(g1(n, 0))) d = g1(n, 1), X1(d) && (l = l.concat(z(d, 9) == 0 ? O(g(n, 1), 9) : O(d, 9)), l.sort(), o.length == 0 ? o = O(d, 10) : (o = o.concat(O(d, 10)), o.sort()));
|
|
9146
|
+
else return m1(d, t, n, 1);
|
|
9107
9147
|
return l[0] == -1 ? 5 : (t = t.length, -1 < o.indexOf(t) ? 4 : (n = l[0], n == t ? 0 : n > t ? 2 : l[l.length - 1] < t ? 3 : -1 < l.indexOf(t, 1) ? 0 : 5));
|
|
9108
9148
|
}
|
|
9109
|
-
function
|
|
9110
|
-
var r =
|
|
9111
|
-
return t = S(t, 1), t in
|
|
9149
|
+
function y1(d, t, n) {
|
|
9150
|
+
var r = o1(t);
|
|
9151
|
+
return t = S(t, 1), t in i1 ? (t = r1(d, t, u1(t)), m1(d, r, t, n)) : 1;
|
|
9112
9152
|
}
|
|
9113
|
-
function
|
|
9153
|
+
function $0(d, t) {
|
|
9114
9154
|
if (d = d.toString(), d.length == 0 || d.charAt(0) == "0") return 0;
|
|
9115
|
-
for (var n, r = d.length, o = 1; 3 >= o && o <= r; ++o) if (n = parseInt(d.substring(0, o), 10), n in
|
|
9155
|
+
for (var n, r = d.length, o = 1; 3 >= o && o <= r; ++o) if (n = parseInt(d.substring(0, o), 10), n in i1) return t.g(d.substring(o)), n;
|
|
9116
9156
|
return 0;
|
|
9117
9157
|
}
|
|
9118
|
-
function
|
|
9158
|
+
function n0(d, t, n, r, o, l) {
|
|
9119
9159
|
if (t.length == 0) return 0;
|
|
9120
|
-
t = new
|
|
9160
|
+
t = new v(t);
|
|
9121
9161
|
var c;
|
|
9122
9162
|
n != null && (c = g(n, 11)), c == null && (c = "NonMatch");
|
|
9123
9163
|
var p = t.toString();
|
|
9124
9164
|
if (p.length == 0) c = 20;
|
|
9125
|
-
else if (
|
|
9165
|
+
else if (s1.test(p)) p = p.replace(s1, ""), G(t), t.g(Z1(p)), c = 1;
|
|
9126
9166
|
else {
|
|
9127
|
-
if (p = new RegExp(c),
|
|
9167
|
+
if (p = new RegExp(c), J1(t), c = t.toString(), c.search(p) == 0) {
|
|
9128
9168
|
p = c.match(p)[0].length;
|
|
9129
|
-
var
|
|
9130
|
-
|
|
9169
|
+
var I = c.substring(p).match(K1);
|
|
9170
|
+
I && I[1] != null && 0 < I[1].length && p1(I[1], S1) == "0" ? c = !1 : (G(t), t.g(c.substring(p)), c = !0);
|
|
9131
9171
|
} else c = !1;
|
|
9132
9172
|
c = c ? 5 : 20;
|
|
9133
9173
|
}
|
|
9134
|
-
if (o &&
|
|
9174
|
+
if (o && P(l, 6, c), c != 20) {
|
|
9135
9175
|
if (2 >= t.h.length) throw Error("Phone number too short after IDD");
|
|
9136
|
-
if (d =
|
|
9176
|
+
if (d = $0(t, r), d != 0) return P(l, 1, d), d;
|
|
9137
9177
|
throw Error("Invalid country calling code");
|
|
9138
9178
|
}
|
|
9139
|
-
return n != null && (c = S(n, 10), p = "" + c,
|
|
9179
|
+
return n != null && (c = S(n, 10), p = "" + c, I = t.toString(), I.lastIndexOf(p, 0) == 0 && (p = new v(I.substring(p.length)), I = g(n, 1), I = new RegExp(S(I, 2)), i0(p, n, null), p = p.toString(), !j(I, t.toString()) && j(I, p) || m1(d, t.toString(), n, -1) == 3)) ? (r.g(p), o && P(l, 6, 10), P(l, 1, c), c) : (P(l, 1, 0), 0);
|
|
9140
9180
|
}
|
|
9141
|
-
function
|
|
9181
|
+
function i0(d, t, n) {
|
|
9142
9182
|
var r = d.toString(), o = r.length, l = g(t, 15);
|
|
9143
9183
|
if (o != 0 && l != null && l.length != 0) {
|
|
9144
9184
|
var c = new RegExp("^(?:" + l + ")");
|
|
9145
9185
|
if (o = c.exec(r)) {
|
|
9146
9186
|
l = new RegExp(S(g(t, 1), 2));
|
|
9147
|
-
var p =
|
|
9148
|
-
t = g(t, 16), t == null || t.length == 0 || o[
|
|
9187
|
+
var p = j(l, r), I = o.length - 1;
|
|
9188
|
+
t = g(t, 16), t == null || t.length == 0 || o[I] == null || o[I].length == 0 ? (!p || j(l, r.substring(o[0].length))) && (n != null && 0 < I && o[I] != null && n.g(o[1]), d.set(r.substring(o[0].length))) : (r = r.replace(c, t), (!p || j(l, r)) && (n != null && 0 < I && n.g(o[1]), d.set(r)));
|
|
9149
9189
|
}
|
|
9150
9190
|
}
|
|
9151
9191
|
}
|
|
9152
|
-
function
|
|
9153
|
-
if (!
|
|
9154
|
-
return
|
|
9192
|
+
function Q(d, t, n) {
|
|
9193
|
+
if (!C1(n) && 0 < t.length && t.charAt(0) != "+") throw Error("Invalid country calling code");
|
|
9194
|
+
return s0(d, t, n, !0);
|
|
9155
9195
|
}
|
|
9156
|
-
function
|
|
9196
|
+
function s0(d, t, n, r) {
|
|
9157
9197
|
if (t == null) throw Error("The string supplied did not seem to be a phone number");
|
|
9158
9198
|
if (250 < t.length) throw Error("The string supplied is too long to be a phone number");
|
|
9159
|
-
var o = new
|
|
9199
|
+
var o = new v(), l = t.indexOf(";phone-context=");
|
|
9160
9200
|
if (l === -1) l = null;
|
|
9161
9201
|
else if (l += 15, l >= t.length) l = "";
|
|
9162
9202
|
else {
|
|
@@ -9164,80 +9204,80 @@ const L2 = (h) => {
|
|
|
9164
9204
|
l = c !== -1 ? t.substring(l, c) : t.substring(l);
|
|
9165
9205
|
}
|
|
9166
9206
|
var p = l;
|
|
9167
|
-
if (p == null ? c = !0 : p.length === 0 ? c = !1 : (c = U0.exec(p), p = G0.exec(p), c = c !== null || p !== null), !c || (l != null ? (l.charAt(0) === "+" && o.g(l), l = t.indexOf("tel:"), o.g(t.substring(0 <= l ? l + 4 : 0, t.indexOf(";phone-context=")))) : (l = o.g, c = t ?? "", p = c.search(R0), 0 <= p ? (c = c.substring(p), c = c.replace(x0, ""), p = c.search(O0), 0 <= p && (c = c.substring(0, p))) : c = "", l.call(o, c)), l = o.toString(), c = l.indexOf(";isub="), 0 < c && (
|
|
9168
|
-
if (l = o.toString(), !(
|
|
9169
|
-
l = new
|
|
9207
|
+
if (p == null ? c = !0 : p.length === 0 ? c = !1 : (c = U0.exec(p), p = G0.exec(p), c = c !== null || p !== null), !c || (l != null ? (l.charAt(0) === "+" && o.g(l), l = t.indexOf("tel:"), o.g(t.substring(0 <= l ? l + 4 : 0, t.indexOf(";phone-context=")))) : (l = o.g, c = t ?? "", p = c.search(R0), 0 <= p ? (c = c.substring(p), c = c.replace(x0, ""), p = c.search(O0), 0 <= p && (c = c.substring(0, p))) : c = "", l.call(o, c)), l = o.toString(), c = l.indexOf(";isub="), 0 < c && (G(o), o.g(l.substring(0, c))), !z1(o.toString()))) throw Error("The string supplied did not seem to be a phone number");
|
|
9208
|
+
if (l = o.toString(), !(C1(n) || l != null && 0 < l.length && s1.test(l))) throw Error("Invalid country calling code");
|
|
9209
|
+
l = new Z(), r && P(l, 5, t);
|
|
9170
9210
|
d: {
|
|
9171
|
-
if (t = o.toString(), c = t.search(
|
|
9172
|
-
p = t.match(
|
|
9173
|
-
for (var
|
|
9174
|
-
|
|
9211
|
+
if (t = o.toString(), c = t.search(Y1), 0 <= c && z1(t.substring(0, c))) {
|
|
9212
|
+
p = t.match(Y1);
|
|
9213
|
+
for (var I = p.length, Y = 1; Y < I; ++Y) if (p[Y] != null && 0 < p[Y].length) {
|
|
9214
|
+
G(o), o.g(t.substring(0, c)), t = p[Y];
|
|
9175
9215
|
break d;
|
|
9176
9216
|
}
|
|
9177
9217
|
}
|
|
9178
9218
|
t = "";
|
|
9179
9219
|
}
|
|
9180
|
-
0 < t.length &&
|
|
9220
|
+
0 < t.length && P(l, 3, t), c = J(d, n), t = new v(), p = 0, I = o.toString();
|
|
9181
9221
|
try {
|
|
9182
|
-
p =
|
|
9183
|
-
} catch (
|
|
9184
|
-
if (
|
|
9185
|
-
if (
|
|
9186
|
-
} else throw
|
|
9222
|
+
p = n0(d, I, c, t, r, l);
|
|
9223
|
+
} catch (A1) {
|
|
9224
|
+
if (A1.message == "Invalid country calling code" && s1.test(I)) {
|
|
9225
|
+
if (I = I.replace(s1, ""), p = n0(d, I, c, t, r, l), p == 0) throw A1;
|
|
9226
|
+
} else throw A1;
|
|
9187
9227
|
}
|
|
9188
|
-
if (p != 0 ? (o =
|
|
9228
|
+
if (p != 0 ? (o = u1(p), o != n && (c = r1(d, p, o))) : (J1(o), t.g(o.toString()), n != null ? (p = S(c, 10), P(
|
|
9189
9229
|
l,
|
|
9190
9230
|
1,
|
|
9191
9231
|
p
|
|
9192
|
-
)) : r && (delete l.h[6], l.g && delete l.g[6])), 2 > t.h.length || (c != null && (n = new
|
|
9232
|
+
)) : r && (delete l.h[6], l.g && delete l.g[6])), 2 > t.h.length || (c != null && (n = new v(), o = new v(t.toString()), i0(o, c, n), d = m1(d, o.toString(), c, -1), d != 2 && d != 4 && d != 5 && (t = o, r && 0 < n.toString().length && P(l, 7, n.toString()))), r = t.toString(), d = r.length, 2 > d)) throw Error("The string supplied is too short to be a phone number");
|
|
9193
9233
|
if (17 < d) throw Error("The string supplied is too long to be a phone number");
|
|
9194
9234
|
if (1 < r.length && r.charAt(0) == "0") {
|
|
9195
|
-
for (
|
|
9196
|
-
d != 1 &&
|
|
9235
|
+
for (P(l, 4, !0), d = 1; d < r.length - 1 && r.charAt(d) == "0"; ) d++;
|
|
9236
|
+
d != 1 && P(l, 8, d);
|
|
9197
9237
|
}
|
|
9198
|
-
return
|
|
9238
|
+
return P(l, 2, parseInt(r, 10)), l;
|
|
9199
9239
|
}
|
|
9200
|
-
function
|
|
9240
|
+
function j(d, t) {
|
|
9201
9241
|
return !!((d = t.match(new RegExp("^(?:" + (typeof d == "string" ? d : d.source) + ")$", "i"))) && d[0].length == t.length);
|
|
9202
9242
|
}
|
|
9203
|
-
function
|
|
9204
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new
|
|
9243
|
+
function W0(d) {
|
|
9244
|
+
this.fa = RegExp(" "), this.ja = "", this.v = new v(), this.da = "", this.s = new v(), this.ba = new v(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = M.g(), this.$ = 0, this.h = new v(), this.ha = !1, this.o = "", this.g = new v(), this.j = [], this.ka = d, this.l = u0(this, this.ka);
|
|
9205
9245
|
}
|
|
9206
|
-
var
|
|
9207
|
-
|
|
9208
|
-
var K0 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"),
|
|
9209
|
-
function
|
|
9246
|
+
var r0 = new q();
|
|
9247
|
+
P(r0, 11, "NA");
|
|
9248
|
+
var K0 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"), o0 = /[- ]/;
|
|
9249
|
+
function u0(d, t) {
|
|
9210
9250
|
var n = d.ga;
|
|
9211
|
-
return t =
|
|
9251
|
+
return t = C1(t) ? e0(n, t) : 0, d = J(d.ga, u1(t)), d ?? r0;
|
|
9212
9252
|
}
|
|
9213
|
-
function
|
|
9253
|
+
function l0(d) {
|
|
9214
9254
|
for (var t = d.j.length, n = 0; n < t; ++n) {
|
|
9215
9255
|
var r = d.j[n], o = S(r, 1);
|
|
9216
9256
|
if (d.da == o) return !1;
|
|
9217
9257
|
var l = d, c = r, p = S(c, 1);
|
|
9218
|
-
|
|
9219
|
-
var
|
|
9258
|
+
G(l.v);
|
|
9259
|
+
var I = l;
|
|
9220
9260
|
c = S(c, 2);
|
|
9221
|
-
var
|
|
9222
|
-
if (
|
|
9261
|
+
var Y = "999999999999999".match(p)[0];
|
|
9262
|
+
if (Y.length < I.g.h.length ? I = "" : (I = Y.replace(new RegExp(p, "g"), c), I = I.replace(RegExp("9", "g"), " ")), 0 < I.length ? (l.v.g(I), l = !0) : l = !1, l) return d.da = o, d.ha = o0.test(g(r, 4)), d.$ = 0, !0;
|
|
9223
9263
|
}
|
|
9224
9264
|
return d.u = !1;
|
|
9225
9265
|
}
|
|
9226
|
-
function
|
|
9266
|
+
function a0(d, t) {
|
|
9227
9267
|
for (var n = [], r = t.length - 3, o = d.j.length, l = 0; l < o; ++l) {
|
|
9228
9268
|
var c = d.j[l];
|
|
9229
|
-
|
|
9269
|
+
z(c, 3) == 0 ? n.push(d.j[l]) : (c = g(c, 3, Math.min(r, z(c, 3) - 1)), t.search(c) == 0 && n.push(d.j[l]));
|
|
9230
9270
|
}
|
|
9231
9271
|
d.j = n;
|
|
9232
9272
|
}
|
|
9233
9273
|
function j0(d, t) {
|
|
9234
9274
|
d.s.g(t);
|
|
9235
9275
|
var n = t;
|
|
9236
|
-
if (
|
|
9276
|
+
if (K1.test(n) || d.s.h.length == 1 && M0.test(n) ? (t == "+" ? (n = t, d.ba.g(t)) : (n = S1[t], d.ba.g(n), d.g.g(n)), t = n) : (d.u = !1, d.la = !0), !d.u) {
|
|
9237
9277
|
if (!d.la) {
|
|
9238
|
-
if (
|
|
9239
|
-
if (
|
|
9240
|
-
} else if (0 < d.o.length && (t = d.g.toString(),
|
|
9278
|
+
if (C0(d)) {
|
|
9279
|
+
if (g0(d)) return c0(d);
|
|
9280
|
+
} else if (0 < d.o.length && (t = d.g.toString(), G(d.g), d.g.g(d.o), d.g.g(t), t = d.h.toString(), n = t.lastIndexOf(d.o), G(d.h), d.h.g(t.substring(0, n))), d.o != p0(d)) return d.h.g(" "), c0(d);
|
|
9241
9281
|
}
|
|
9242
9282
|
return d.s.toString();
|
|
9243
9283
|
}
|
|
@@ -9247,75 +9287,75 @@ const L2 = (h) => {
|
|
|
9247
9287
|
case 2:
|
|
9248
9288
|
return d.s.toString();
|
|
9249
9289
|
case 3:
|
|
9250
|
-
if (
|
|
9251
|
-
else return d.o =
|
|
9290
|
+
if (C0(d)) d.ea = !0;
|
|
9291
|
+
else return d.o = p0(d), T1(d);
|
|
9252
9292
|
default:
|
|
9253
|
-
return d.ea ? (
|
|
9293
|
+
return d.ea ? (g0(d) && (d.ea = !1), d.h.toString() + d.g.toString()) : 0 < d.j.length ? (t = m0(d, t), n = h0(d), 0 < n.length ? n : (a0(d, d.g.toString()), l0(d) ? f0(d) : d.u ? I1(d, t) : d.s.toString())) : T1(d);
|
|
9254
9294
|
}
|
|
9255
9295
|
}
|
|
9256
|
-
function
|
|
9257
|
-
return d.u = !0, d.ea = !1, d.j = [], d.$ = 0,
|
|
9296
|
+
function c0(d) {
|
|
9297
|
+
return d.u = !0, d.ea = !1, d.j = [], d.$ = 0, G(d.v), d.da = "", T1(d);
|
|
9258
9298
|
}
|
|
9259
|
-
function
|
|
9299
|
+
function h0(d) {
|
|
9260
9300
|
for (var t = d.g.toString(), n = d.j.length, r = 0; r < n; ++r) {
|
|
9261
9301
|
var o = d.j[r], l = S(o, 1);
|
|
9262
|
-
if (new RegExp("^(?:" + l + ")$").test(t) && (d.ha =
|
|
9302
|
+
if (new RegExp("^(?:" + l + ")$").test(t) && (d.ha = o0.test(g(o, 4)), o = t.replace(new RegExp(l, "g"), g(o, 2)), o = I1(d, o), p1(o, v0) == d.ba)) return o;
|
|
9263
9303
|
}
|
|
9264
9304
|
return "";
|
|
9265
9305
|
}
|
|
9266
|
-
function
|
|
9306
|
+
function I1(d, t) {
|
|
9267
9307
|
var n = d.h.h.length;
|
|
9268
9308
|
return d.ha && 0 < n && d.h.toString().charAt(n - 1) != " " ? d.h + " " + t : d.h + t;
|
|
9269
9309
|
}
|
|
9270
|
-
function
|
|
9310
|
+
function T1(d) {
|
|
9271
9311
|
var t = d.g.toString();
|
|
9272
9312
|
if (3 <= t.length) {
|
|
9273
|
-
for (var n = d.ca && d.o.length == 0 && 0 <
|
|
9313
|
+
for (var n = d.ca && d.o.length == 0 && 0 < z(d.l, 20) ? O(d.l, 20) : O(d.l, 19), r = n.length, o = 0; o < r; ++o) {
|
|
9274
9314
|
var l = n[o];
|
|
9275
|
-
0 < d.o.length &&
|
|
9315
|
+
0 < d.o.length && q1(S(l, 4)) && !g(l, 6) && !U(l, 5) || (d.o.length != 0 || d.ca || q1(S(l, 4)) || g(l, 6)) && K0.test(S(l, 2)) && d.j.push(l);
|
|
9276
9316
|
}
|
|
9277
|
-
return
|
|
9317
|
+
return a0(d, t), t = h0(d), 0 < t.length ? t : l0(d) ? f0(d) : d.s.toString();
|
|
9278
9318
|
}
|
|
9279
|
-
return
|
|
9319
|
+
return I1(d, t);
|
|
9280
9320
|
}
|
|
9281
|
-
function
|
|
9321
|
+
function f0(d) {
|
|
9282
9322
|
var t = d.g.toString(), n = t.length;
|
|
9283
9323
|
if (0 < n) {
|
|
9284
|
-
for (var r = "", o = 0; o < n; o++) r =
|
|
9285
|
-
return d.u ?
|
|
9324
|
+
for (var r = "", o = 0; o < n; o++) r = m0(d, t.charAt(o));
|
|
9325
|
+
return d.u ? I1(d, r) : d.s.toString();
|
|
9286
9326
|
}
|
|
9287
9327
|
return d.h.toString();
|
|
9288
9328
|
}
|
|
9289
|
-
function
|
|
9329
|
+
function p0(d) {
|
|
9290
9330
|
var t = d.g.toString(), n = 0;
|
|
9291
9331
|
if (g(d.l, 10) != 1) var r = !1;
|
|
9292
9332
|
else r = d.g.toString(), r = r.charAt(0) == "1" && r.charAt(1) != "0" && r.charAt(1) != "1";
|
|
9293
|
-
return r ? (n = 1, d.h.g("1").g(" "), d.ca = !0) :
|
|
9333
|
+
return r ? (n = 1, d.h.g("1").g(" "), d.ca = !0) : U(d.l, 15) && (r = new RegExp("^(?:" + g(d.l, 15) + ")"), r = t.match(r), r != null && r[0] != null && 0 < r[0].length && (d.ca = !0, n = r[0].length, d.h.g(t.substring(0, n)))), G(d.g), d.g.g(t.substring(n)), t.substring(0, n);
|
|
9294
9334
|
}
|
|
9295
|
-
function
|
|
9335
|
+
function C0(d) {
|
|
9296
9336
|
var t = d.ba.toString(), n = new RegExp("^(?:\\+|" + g(d.l, 11) + ")");
|
|
9297
|
-
return n = t.match(n), n != null && n[0] != null && 0 < n[0].length ? (d.ca = !0, n = n[0].length,
|
|
9337
|
+
return n = t.match(n), n != null && n[0] != null && 0 < n[0].length ? (d.ca = !0, n = n[0].length, G(d.g), d.g.g(t.substring(n)), G(d.h), d.h.g(t.substring(0, n)), t.charAt(0) != "+" && d.h.g(" "), !0) : !1;
|
|
9298
9338
|
}
|
|
9299
|
-
function
|
|
9339
|
+
function g0(d) {
|
|
9300
9340
|
if (d.g.h.length == 0) return !1;
|
|
9301
|
-
var t = new
|
|
9302
|
-
return n == 0 ? !1 : (
|
|
9341
|
+
var t = new v(), n = $0(d.g, t);
|
|
9342
|
+
return n == 0 ? !1 : (G(d.g), d.g.g(t.toString()), t = u1(n), t == "001" ? d.l = J(d.ga, "" + n) : t != d.ka && (d.l = u0(d, t)), d.h.g("" + n).g(" "), d.o = "", !0);
|
|
9303
9343
|
}
|
|
9304
|
-
function
|
|
9344
|
+
function m0(d, t) {
|
|
9305
9345
|
var n = d.v.toString();
|
|
9306
9346
|
if (0 <= n.substring(d.$).search(d.fa)) {
|
|
9307
9347
|
var r = n.search(d.fa);
|
|
9308
|
-
return t = n.replace(d.fa, t),
|
|
9348
|
+
return t = n.replace(d.fa, t), G(d.v), d.v.g(t), d.$ = r, t.substring(0, d.$ + 1);
|
|
9309
9349
|
}
|
|
9310
9350
|
return d.j.length == 1 && (d.u = !1), d.da = "", d.s.toString();
|
|
9311
9351
|
}
|
|
9312
|
-
const
|
|
9352
|
+
const y0 = (d) => {
|
|
9313
9353
|
const t = [];
|
|
9314
9354
|
return d.includes("FIXED_LINE_OR_MOBILE") ? (d.includes("MOBILE") || t.push("MOBILE"), d.includes("FIXED_LINE") || t.push("FIXED_LINE")) : (d.includes("MOBILE") || d.includes("FIXED_LINE")) && t.push("FIXED_LINE_OR_MOBILE"), d.concat(t);
|
|
9315
|
-
},
|
|
9355
|
+
}, L1 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
|
|
9316
9356
|
e("intlTelInputUtilsTemp", {}), e("intlTelInputUtilsTemp.formatNumberAsYouType", (d, t) => {
|
|
9317
9357
|
try {
|
|
9318
|
-
const n = d.replace(/[^+0-9]/g, ""), r = new
|
|
9358
|
+
const n = d.replace(/[^+0-9]/g, ""), r = new W0(t);
|
|
9319
9359
|
t = "";
|
|
9320
9360
|
for (let o = 0; o < n.length; o++) r.ja = j0(r, n.charAt(o)), t = r.ja;
|
|
9321
9361
|
return t;
|
|
@@ -9324,22 +9364,22 @@ const L2 = (h) => {
|
|
|
9324
9364
|
}
|
|
9325
9365
|
}), e("intlTelInputUtilsTemp.formatNumber", (d, t, n) => {
|
|
9326
9366
|
try {
|
|
9327
|
-
const o =
|
|
9328
|
-
var r =
|
|
9367
|
+
const o = M.g(), l = Q(o, d, t);
|
|
9368
|
+
var r = y1(o, l, -1);
|
|
9329
9369
|
return r == 0 || r == 4 ? o.format(l, typeof n > "u" ? 0 : n) : d;
|
|
9330
9370
|
} catch {
|
|
9331
9371
|
return d;
|
|
9332
9372
|
}
|
|
9333
9373
|
}), e("intlTelInputUtilsTemp.getExampleNumber", (d, t, n, r) => {
|
|
9334
9374
|
try {
|
|
9335
|
-
const
|
|
9375
|
+
const I = M.g();
|
|
9336
9376
|
d: {
|
|
9337
|
-
var o =
|
|
9338
|
-
if (
|
|
9339
|
-
var l =
|
|
9377
|
+
var o = I;
|
|
9378
|
+
if (C1(d)) {
|
|
9379
|
+
var l = g1(J(o, d), n);
|
|
9340
9380
|
try {
|
|
9341
|
-
if (
|
|
9342
|
-
var c = g(l, 6), p =
|
|
9381
|
+
if (U(l, 6)) {
|
|
9382
|
+
var c = g(l, 6), p = s0(o, c, d, !1);
|
|
9343
9383
|
break d;
|
|
9344
9384
|
}
|
|
9345
9385
|
} catch {
|
|
@@ -9347,37 +9387,37 @@ const L2 = (h) => {
|
|
|
9347
9387
|
}
|
|
9348
9388
|
p = null;
|
|
9349
9389
|
}
|
|
9350
|
-
return
|
|
9390
|
+
return I.format(p, r ? 0 : t ? 2 : 1);
|
|
9351
9391
|
} catch {
|
|
9352
9392
|
return "";
|
|
9353
9393
|
}
|
|
9354
9394
|
}), e("intlTelInputUtilsTemp.getExtension", (d, t) => {
|
|
9355
9395
|
try {
|
|
9356
|
-
return g(
|
|
9396
|
+
return g(Q(M.g(), d, t), 3);
|
|
9357
9397
|
} catch {
|
|
9358
9398
|
return "";
|
|
9359
9399
|
}
|
|
9360
9400
|
}), e("intlTelInputUtilsTemp.getNumberType", (d, t) => {
|
|
9361
9401
|
try {
|
|
9362
|
-
const n =
|
|
9363
|
-
return
|
|
9402
|
+
const n = M.g(), r = Q(n, d, t);
|
|
9403
|
+
return d0(n, r);
|
|
9364
9404
|
} catch {
|
|
9365
9405
|
return -99;
|
|
9366
9406
|
}
|
|
9367
9407
|
}), e("intlTelInputUtilsTemp.getValidationError", (d, t) => {
|
|
9368
9408
|
if (!t) return 1;
|
|
9369
9409
|
try {
|
|
9370
|
-
const n =
|
|
9371
|
-
return
|
|
9410
|
+
const n = M.g(), r = Q(n, d, t);
|
|
9411
|
+
return y1(n, r, -1);
|
|
9372
9412
|
} catch (n) {
|
|
9373
9413
|
return n.message === "Invalid country calling code" ? 1 : 3 >= d.length || n.message === "Phone number too short after IDD" || n.message === "The string supplied is too short to be a phone number" ? 2 : n.message === "The string supplied is too long to be a phone number" ? 3 : -99;
|
|
9374
9414
|
}
|
|
9375
9415
|
}), e("intlTelInputUtilsTemp.isValidNumber", (d, t, n) => {
|
|
9376
9416
|
try {
|
|
9377
|
-
const r =
|
|
9417
|
+
const r = M.g(), o = Q(r, d, t), l = F0(r, o);
|
|
9378
9418
|
if (n) {
|
|
9379
|
-
const c =
|
|
9380
|
-
return l && c.includes(
|
|
9419
|
+
const c = y0(n).map((p) => L1[p]);
|
|
9420
|
+
return l && c.includes(d0(r, o));
|
|
9381
9421
|
}
|
|
9382
9422
|
return l;
|
|
9383
9423
|
} catch {
|
|
@@ -9385,30 +9425,30 @@ const L2 = (h) => {
|
|
|
9385
9425
|
}
|
|
9386
9426
|
}), e("intlTelInputUtilsTemp.isPossibleNumber", (d, t, n) => {
|
|
9387
9427
|
try {
|
|
9388
|
-
const r =
|
|
9428
|
+
const r = M.g(), o = Q(r, d, t);
|
|
9389
9429
|
if (n) {
|
|
9390
|
-
const l =
|
|
9391
|
-
for (let c of l) if (
|
|
9430
|
+
const l = y0(n);
|
|
9431
|
+
for (let c of l) if (y1(r, o, L1[c]) === 0) return !0;
|
|
9392
9432
|
return !1;
|
|
9393
9433
|
}
|
|
9394
|
-
return
|
|
9434
|
+
return y1(r, o, -1) === 0;
|
|
9395
9435
|
} catch {
|
|
9396
9436
|
return !1;
|
|
9397
9437
|
}
|
|
9398
9438
|
}), e("intlTelInputUtilsTemp.getCoreNumber", (d, t) => {
|
|
9399
9439
|
try {
|
|
9400
|
-
return g(
|
|
9440
|
+
return g(Q(M.g(), d, t), 2).toString();
|
|
9401
9441
|
} catch {
|
|
9402
9442
|
return "";
|
|
9403
9443
|
}
|
|
9404
|
-
}), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType",
|
|
9444
|
+
}), e("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), e("intlTelInputUtilsTemp.numberType", L1), e("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
|
|
9405
9445
|
})();
|
|
9406
|
-
const w0 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0,
|
|
9446
|
+
const w0 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, T2 = w0.intlTelInputUtilsTemp;
|
|
9407
9447
|
delete w0.intlTelInputUtilsTemp;
|
|
9408
|
-
m.utils =
|
|
9409
|
-
const
|
|
9448
|
+
m.utils = T2;
|
|
9449
|
+
const A2 = {
|
|
9410
9450
|
__name: "IntlTelInputWithUtils",
|
|
9411
|
-
props: /* @__PURE__ */
|
|
9451
|
+
props: /* @__PURE__ */ I0({
|
|
9412
9452
|
disabled: {
|
|
9413
9453
|
type: Boolean,
|
|
9414
9454
|
default: !1
|
|
@@ -9432,44 +9472,44 @@ const b2 = {
|
|
|
9432
9472
|
},
|
|
9433
9473
|
modelModifiers: {}
|
|
9434
9474
|
}),
|
|
9435
|
-
emits: /* @__PURE__ */
|
|
9475
|
+
emits: /* @__PURE__ */ I0([
|
|
9436
9476
|
"changeNumber",
|
|
9437
9477
|
"changeCountry",
|
|
9438
9478
|
"changeValidity",
|
|
9439
9479
|
"changeErrorCode"
|
|
9440
9480
|
], ["update:modelValue"]),
|
|
9441
9481
|
setup(h, { expose: e, emit: $ }) {
|
|
9442
|
-
const i = Y0(h, "modelValue"), s = h, a = $, u =
|
|
9443
|
-
let
|
|
9444
|
-
C.value !==
|
|
9482
|
+
const i = Y0(h, "modelValue"), s = h, a = $, u = w1(), f = w1(), C = w1(!1), y = () => f.value ? s.options.strictMode ? f.value.isValidNumberPrecise() : f.value.isValidNumber() : null, _ = () => {
|
|
9483
|
+
let E = y();
|
|
9484
|
+
C.value !== E && (C.value = E, a("changeValidity", !!E), a(
|
|
9445
9485
|
"changeErrorCode",
|
|
9446
|
-
|
|
9486
|
+
E ? null : f.value.getValidationError()
|
|
9447
9487
|
));
|
|
9448
|
-
},
|
|
9449
|
-
var
|
|
9450
|
-
a("changeNumber", ((
|
|
9451
|
-
},
|
|
9452
|
-
var
|
|
9453
|
-
a("changeCountry", ((
|
|
9488
|
+
}, T = () => {
|
|
9489
|
+
var E;
|
|
9490
|
+
a("changeNumber", ((E = f.value) == null ? void 0 : E.getNumber()) ?? ""), _();
|
|
9491
|
+
}, B = () => {
|
|
9492
|
+
var E;
|
|
9493
|
+
a("changeCountry", ((E = f.value) == null ? void 0 : E.getSelectedCountryData().iso2) ?? ""), T(), _();
|
|
9454
9494
|
};
|
|
9455
9495
|
return z0(() => {
|
|
9456
|
-
u.value && (f.value = m(u.value, s.options), s.value && f.value.setNumber(s.value), s.disabled && f.value.setDisabled(s.disabled), C.value =
|
|
9496
|
+
u.value && (f.value = m(u.value, s.options), s.value && f.value.setNumber(s.value), s.disabled && f.value.setDisabled(s.disabled), C.value = y());
|
|
9457
9497
|
}), Z0(
|
|
9458
9498
|
() => s.disabled,
|
|
9459
|
-
(
|
|
9460
|
-
var
|
|
9461
|
-
return (
|
|
9499
|
+
(E) => {
|
|
9500
|
+
var w;
|
|
9501
|
+
return (w = f.value) == null ? void 0 : w.setDisabled(E);
|
|
9462
9502
|
}
|
|
9463
9503
|
), J0(() => {
|
|
9464
|
-
var
|
|
9465
|
-
return (
|
|
9466
|
-
}), e({ instance: f, input: u }), (
|
|
9504
|
+
var E;
|
|
9505
|
+
return (E = f.value) == null ? void 0 : E.destroy();
|
|
9506
|
+
}), e({ instance: f, input: u }), (E, w) => X0((Q0(), q0("input", d2({
|
|
9467
9507
|
ref_key: "input",
|
|
9468
9508
|
ref: u,
|
|
9469
|
-
"onUpdate:modelValue":
|
|
9509
|
+
"onUpdate:modelValue": w[0] || (w[0] = (H) => i.value = H),
|
|
9470
9510
|
type: "tel",
|
|
9471
|
-
onCountrychange:
|
|
9472
|
-
onInput:
|
|
9511
|
+
onCountrychange: B,
|
|
9512
|
+
onInput: T
|
|
9473
9513
|
}, h.inputProps), null, 16)), [
|
|
9474
9514
|
[
|
|
9475
9515
|
t2,
|
|
@@ -9481,5 +9521,5 @@ const b2 = {
|
|
|
9481
9521
|
}
|
|
9482
9522
|
};
|
|
9483
9523
|
export {
|
|
9484
|
-
|
|
9524
|
+
A2 as default
|
|
9485
9525
|
};
|