intl-tel-input 27.3.1 → 28.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/intlTelInput-no-assets.css +2 -2
- package/dist/css/intlTelInput.css +3 -3
- package/dist/js/data.js +2 -2
- package/dist/js/data.min.js +1 -1
- package/dist/js/data.mjs +1 -1
- package/dist/js/i18n.d.ts +1 -1592
- package/dist/js/intlTelInput.d.ts +61 -45
- package/dist/js/intlTelInput.js +109 -104
- package/dist/js/intlTelInput.min.js +6 -6
- package/dist/js/intlTelInput.mjs +107 -102
- package/dist/js/intlTelInputWithUtils.js +510 -490
- package/dist/js/intlTelInputWithUtils.min.js +9 -9
- package/dist/js/intlTelInputWithUtils.mjs +508 -488
- package/dist/js/utils.js +56 -55
- package/package.json +14 -181
- package/CHANGELOG.md +0 -33
- package/angular/README.md +0 -13
- package/angular/dist/IntlTelInput.d.ts +0 -110
- package/angular/dist/IntlTelInput.js +0 -5130
- package/angular/dist/IntlTelInputWithUtils.d.ts +0 -3
- package/angular/dist/IntlTelInputWithUtils.js +0 -11469
- package/react/README.md +0 -13
- package/react/dist/IntlTelInput.d.ts +0 -25
- package/react/dist/IntlTelInput.js +0 -4822
- package/react/dist/IntlTelInputWithUtils.d.ts +0 -4
- package/react/dist/IntlTelInputWithUtils.js +0 -11161
- package/svelte/README.md +0 -14
- package/svelte/src/IntlTelInput.svelte +0 -233
- package/svelte/src/IntlTelInput.svelte.d.ts +0 -36
- package/svelte/src/IntlTelInputWithUtils.svelte +0 -24
- package/vue/README.md +0 -14
- package/vue/dist/IntlTelInput-DWpqqgvZ.js +0 -2684
- package/vue/dist/IntlTelInput.js +0 -5
- package/vue/dist/IntlTelInput.vue.d.ts +0 -43
- package/vue/dist/IntlTelInputWithUtils.js +0 -49403
- package/vue/dist/index.d.ts +0 -4
- package/vue/dist/indexWithUtils.d.ts +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input
|
|
2
|
+
* International Telephone Input v28.0.0
|
|
3
3
|
* git+https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -23,13 +23,13 @@ var _factory = (() => {
|
|
|
23
23
|
};
|
|
24
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
25
|
|
|
26
|
-
// src/js/intlTelInputWithUtils.ts
|
|
26
|
+
// packages/core/src/js/intlTelInputWithUtils.ts
|
|
27
27
|
var intlTelInputWithUtils_exports = {};
|
|
28
28
|
__export(intlTelInputWithUtils_exports, {
|
|
29
29
|
default: () => intlTelInputWithUtils_default
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
-
// src/js/data.ts
|
|
32
|
+
// packages/core/src/js/data.ts
|
|
33
33
|
var rawCountryData = [
|
|
34
34
|
[
|
|
35
35
|
"af",
|
|
@@ -1781,7 +1781,7 @@ var _factory = (() => {
|
|
|
1781
1781
|
var isIso2 = (val) => iso2Set.has(val);
|
|
1782
1782
|
var data_default = allCountries;
|
|
1783
1783
|
|
|
1784
|
-
// src/js/constants.ts
|
|
1784
|
+
// packages/core/src/js/constants.ts
|
|
1785
1785
|
var EVENTS = {
|
|
1786
1786
|
OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
|
|
1787
1787
|
CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
|
|
@@ -1827,10 +1827,6 @@ var _factory = (() => {
|
|
|
1827
1827
|
HIDDEN_SEARCH_RESET_MS: 1e3,
|
|
1828
1828
|
NEXT_TICK: 0
|
|
1829
1829
|
};
|
|
1830
|
-
var SENTINELS = {
|
|
1831
|
-
UNKNOWN_NUMBER_TYPE: -99,
|
|
1832
|
-
UNKNOWN_VALIDATION_ERROR: -99
|
|
1833
|
-
};
|
|
1834
1830
|
var LAYOUT = {
|
|
1835
1831
|
NARROW_VIEWPORT_WIDTH: 500,
|
|
1836
1832
|
// keep in sync with .iti__country-list CSS media query
|
|
@@ -1872,6 +1868,12 @@ var _factory = (() => {
|
|
|
1872
1868
|
var INITIAL_COUNTRY = {
|
|
1873
1869
|
AUTO: "auto"
|
|
1874
1870
|
};
|
|
1871
|
+
var NUMBER_FORMATS = [
|
|
1872
|
+
"E164",
|
|
1873
|
+
"INTERNATIONAL",
|
|
1874
|
+
"NATIONAL",
|
|
1875
|
+
"RFC3966"
|
|
1876
|
+
];
|
|
1875
1877
|
var NUMBER_TYPES = [
|
|
1876
1878
|
"FIXED_LINE",
|
|
1877
1879
|
"MOBILE",
|
|
@@ -1886,11 +1888,21 @@ var _factory = (() => {
|
|
|
1886
1888
|
"VOICEMAIL",
|
|
1887
1889
|
"UNKNOWN"
|
|
1888
1890
|
];
|
|
1889
|
-
var
|
|
1891
|
+
var VALIDATION_ERRORS = [
|
|
1892
|
+
"IS_POSSIBLE",
|
|
1893
|
+
"INVALID_COUNTRY_CODE",
|
|
1894
|
+
"TOO_SHORT",
|
|
1895
|
+
"TOO_LONG",
|
|
1896
|
+
"IS_POSSIBLE_LOCAL_ONLY",
|
|
1897
|
+
"INVALID_LENGTH"
|
|
1898
|
+
];
|
|
1899
|
+
var toEnumObject = (arr) => Object.fromEntries(arr.map((v) => [v, v]));
|
|
1900
|
+
var NUMBER_FORMAT = toEnumObject(NUMBER_FORMATS);
|
|
1901
|
+
var NUMBER_TYPE = toEnumObject(NUMBER_TYPES);
|
|
1902
|
+
var VALIDATION_ERROR = toEnumObject(VALIDATION_ERRORS);
|
|
1890
1903
|
var DATA_KEYS = {
|
|
1891
|
-
// e.g. <li data-
|
|
1892
|
-
|
|
1893
|
-
ISO2: "countryCode",
|
|
1904
|
+
// e.g. <li data-iso2="us"> for country items in dropdown
|
|
1905
|
+
ISO2: "iso2",
|
|
1894
1906
|
DIAL_CODE: "dialCode",
|
|
1895
1907
|
// e.g. <input data-intl-tel-input-id="0"> on the input element
|
|
1896
1908
|
INSTANCE_ID: "intlTelInputId"
|
|
@@ -1907,7 +1919,7 @@ var _factory = (() => {
|
|
|
1907
1919
|
MODAL: "aria-modal"
|
|
1908
1920
|
};
|
|
1909
1921
|
|
|
1910
|
-
// src/js/i18n/en.ts
|
|
1922
|
+
// packages/core/src/js/i18n/en.ts
|
|
1911
1923
|
var interfaceTranslations = {
|
|
1912
1924
|
selectedCountryAriaLabel: "Change country for phone number, currently selected ${countryName} (${dialCode})",
|
|
1913
1925
|
noCountrySelected: "Select country for phone number",
|
|
@@ -1927,7 +1939,7 @@ var _factory = (() => {
|
|
|
1927
1939
|
};
|
|
1928
1940
|
var en_default = interfaceTranslations;
|
|
1929
1941
|
|
|
1930
|
-
// src/js/core/options.ts
|
|
1942
|
+
// packages/core/src/js/core/options.ts
|
|
1931
1943
|
var mediaQuery = (q) => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia(q).matches;
|
|
1932
1944
|
var isNarrowViewport = () => mediaQuery(`(max-width: ${LAYOUT.NARROW_VIEWPORT_WIDTH}px)`);
|
|
1933
1945
|
var computeDefaultUseFullscreenPopup = () => {
|
|
@@ -1942,7 +1954,7 @@ var _factory = (() => {
|
|
|
1942
1954
|
//* Whether or not to allow the dropdown.
|
|
1943
1955
|
allowDropdown: true,
|
|
1944
1956
|
//* The number type to enforce during validation.
|
|
1945
|
-
allowedNumberTypes: [
|
|
1957
|
+
allowedNumberTypes: [NUMBER_TYPE.MOBILE, NUMBER_TYPE.FIXED_LINE],
|
|
1946
1958
|
//* Whether or not to allow extensions after the main number.
|
|
1947
1959
|
allowNumberExtensions: false,
|
|
1948
1960
|
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
@@ -1953,6 +1965,8 @@ var _factory = (() => {
|
|
|
1953
1965
|
containerClass: "",
|
|
1954
1966
|
//* Locale for localising country names via Intl.DisplayNames.
|
|
1955
1967
|
countryNameLocale: "en",
|
|
1968
|
+
//* Override individual country names by iso2 code.
|
|
1969
|
+
countryNameOverrides: {},
|
|
1956
1970
|
//* The order of the countries in the dropdown. Defaults to alphabetical.
|
|
1957
1971
|
countryOrder: null,
|
|
1958
1972
|
//* Add a country search input at the top of the dropdown.
|
|
@@ -1986,17 +2000,17 @@ var _factory = (() => {
|
|
|
1986
2000
|
//* Display only these countries.
|
|
1987
2001
|
onlyCountries: null,
|
|
1988
2002
|
//* Number type to use for placeholders.
|
|
1989
|
-
placeholderNumberType:
|
|
2003
|
+
placeholderNumberType: NUMBER_TYPE.MOBILE,
|
|
1990
2004
|
//* Add custom classes to the search input element.
|
|
1991
2005
|
searchInputClass: "",
|
|
1992
2006
|
//* Display the international dial code next to the selected flag.
|
|
1993
|
-
separateDialCode:
|
|
2007
|
+
separateDialCode: true,
|
|
1994
2008
|
//* When strictMode rejects a key (etc), play a short feedback animation
|
|
1995
|
-
strictRejectAnimation:
|
|
2009
|
+
strictRejectAnimation: true,
|
|
1996
2010
|
//* Show flags - for both the selected country, and in the country dropdown
|
|
1997
2011
|
showFlags: true,
|
|
1998
2012
|
//* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
|
|
1999
|
-
strictMode:
|
|
2013
|
+
strictMode: true,
|
|
2000
2014
|
//* Use full screen popup instead of dropdown for country list.
|
|
2001
2015
|
useFullscreenPopup: computeDefaultUseFullscreenPopup()
|
|
2002
2016
|
};
|
|
@@ -2140,6 +2154,13 @@ var _factory = (() => {
|
|
|
2140
2154
|
}
|
|
2141
2155
|
validatedOptions[key] = value;
|
|
2142
2156
|
break;
|
|
2157
|
+
case "countryNameOverrides":
|
|
2158
|
+
if (value && !isPlainObject(value)) {
|
|
2159
|
+
warnOption("countryNameOverrides", "an object", value);
|
|
2160
|
+
break;
|
|
2161
|
+
}
|
|
2162
|
+
validatedOptions[key] = value;
|
|
2163
|
+
break;
|
|
2143
2164
|
case "initialCountry": {
|
|
2144
2165
|
if (typeof value !== "string") {
|
|
2145
2166
|
warnOption("initialCountry", "a string", value);
|
|
@@ -2158,8 +2179,8 @@ var _factory = (() => {
|
|
|
2158
2179
|
break;
|
|
2159
2180
|
}
|
|
2160
2181
|
case "placeholderNumberType":
|
|
2161
|
-
if (typeof value !== "string" || !
|
|
2162
|
-
const validTypes =
|
|
2182
|
+
if (typeof value !== "string" || !NUMBER_TYPES.includes(value)) {
|
|
2183
|
+
const validTypes = NUMBER_TYPES.join(", ");
|
|
2163
2184
|
warnOption("placeholderNumberType", `one of ${validTypes}`, value);
|
|
2164
2185
|
break;
|
|
2165
2186
|
}
|
|
@@ -2177,8 +2198,8 @@ var _factory = (() => {
|
|
|
2177
2198
|
}
|
|
2178
2199
|
let allValid = true;
|
|
2179
2200
|
for (const v of value) {
|
|
2180
|
-
if (typeof v !== "string" || !
|
|
2181
|
-
const validTypes =
|
|
2201
|
+
if (typeof v !== "string" || !NUMBER_TYPES.includes(v)) {
|
|
2202
|
+
const validTypes = NUMBER_TYPES.join(", ");
|
|
2182
2203
|
warnOption(
|
|
2183
2204
|
"allowedNumberTypes",
|
|
2184
2205
|
`an array of valid number types (${validTypes})`,
|
|
@@ -2240,11 +2261,11 @@ var _factory = (() => {
|
|
|
2240
2261
|
o.i18n = { ...en_default, ...o.i18n };
|
|
2241
2262
|
};
|
|
2242
2263
|
|
|
2243
|
-
// src/js/helpers/string.ts
|
|
2264
|
+
// packages/core/src/js/helpers/string.ts
|
|
2244
2265
|
var getNumeric = (s) => s.replace(/\D/g, "");
|
|
2245
2266
|
var normaliseString = (s = "") => s.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
|
2246
2267
|
|
|
2247
|
-
// src/js/helpers/dom.ts
|
|
2268
|
+
// packages/core/src/js/helpers/dom.ts
|
|
2248
2269
|
var buildClassNames = (flags) => Object.keys(flags).filter((k) => Boolean(flags[k])).join(" ");
|
|
2249
2270
|
var createEl = (tagName, attrs, container) => {
|
|
2250
2271
|
const el = document.createElement(tagName);
|
|
@@ -2259,7 +2280,7 @@ var _factory = (() => {
|
|
|
2259
2280
|
return el;
|
|
2260
2281
|
};
|
|
2261
2282
|
|
|
2262
|
-
// src/js/core/icons.ts
|
|
2283
|
+
// packages/core/src/js/core/icons.ts
|
|
2263
2284
|
var buildSearchIcon = () => `
|
|
2264
2285
|
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${ARIA.HIDDEN}="true">
|
|
2265
2286
|
<circle cx="11" cy="11" r="7" />
|
|
@@ -2286,7 +2307,7 @@ var _factory = (() => {
|
|
|
2286
2307
|
<path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>
|
|
2287
2308
|
</svg>`;
|
|
2288
2309
|
|
|
2289
|
-
// src/js/core/countrySearch.ts
|
|
2310
|
+
// packages/core/src/js/core/countrySearch.ts
|
|
2290
2311
|
var buildSearchTokens = (countries) => {
|
|
2291
2312
|
const tokens = /* @__PURE__ */ new Map();
|
|
2292
2313
|
for (const c of countries) {
|
|
@@ -2346,7 +2367,7 @@ var _factory = (() => {
|
|
|
2346
2367
|
return null;
|
|
2347
2368
|
};
|
|
2348
2369
|
|
|
2349
|
-
// src/js/core/numerals.ts
|
|
2370
|
+
// packages/core/src/js/core/numerals.ts
|
|
2350
2371
|
var Numerals = class _Numerals {
|
|
2351
2372
|
#userNumeralSet;
|
|
2352
2373
|
//* Stateless conversion of any Arabic-Indic / Persian digits to ASCII 0-9.
|
|
@@ -2404,7 +2425,7 @@ var _factory = (() => {
|
|
|
2404
2425
|
}
|
|
2405
2426
|
};
|
|
2406
2427
|
|
|
2407
|
-
// src/js/core/ui.ts
|
|
2428
|
+
// packages/core/src/js/core/ui.ts
|
|
2408
2429
|
var UI = class _UI {
|
|
2409
2430
|
// private
|
|
2410
2431
|
#options;
|
|
@@ -3157,7 +3178,7 @@ var _factory = (() => {
|
|
|
3157
3178
|
}
|
|
3158
3179
|
if (iso2 && !this.#selectedListItemEl) {
|
|
3159
3180
|
const newListItem = this.#countryListEl.querySelector(
|
|
3160
|
-
`[data-
|
|
3181
|
+
`[data-iso2="${iso2}"]`
|
|
3161
3182
|
);
|
|
3162
3183
|
if (newListItem) {
|
|
3163
3184
|
newListItem.setAttribute(ARIA.SELECTED, "true");
|
|
@@ -3345,7 +3366,7 @@ var _factory = (() => {
|
|
|
3345
3366
|
}
|
|
3346
3367
|
};
|
|
3347
3368
|
|
|
3348
|
-
// src/js/data/country-data.ts
|
|
3369
|
+
// packages/core/src/js/data/country-data.ts
|
|
3349
3370
|
var processAllCountries = (options) => {
|
|
3350
3371
|
const { onlyCountries, excludeCountries } = options;
|
|
3351
3372
|
if (onlyCountries?.length) {
|
|
@@ -3360,7 +3381,7 @@ var _factory = (() => {
|
|
|
3360
3381
|
return [...data_default];
|
|
3361
3382
|
};
|
|
3362
3383
|
var generateCountryNames = (countries, options) => {
|
|
3363
|
-
const { countryNameLocale,
|
|
3384
|
+
const { countryNameLocale, countryNameOverrides } = options;
|
|
3364
3385
|
let displayNames;
|
|
3365
3386
|
try {
|
|
3366
3387
|
const hasDisplayNames = typeof Intl !== "undefined" && typeof Intl.DisplayNames === "function";
|
|
@@ -3376,7 +3397,7 @@ var _factory = (() => {
|
|
|
3376
3397
|
displayNames = null;
|
|
3377
3398
|
}
|
|
3378
3399
|
for (const c of countries) {
|
|
3379
|
-
c.name =
|
|
3400
|
+
c.name = countryNameOverrides[c.iso2] || displayNames?.of(c.iso2.toUpperCase()) || "";
|
|
3380
3401
|
}
|
|
3381
3402
|
};
|
|
3382
3403
|
var processDialCodes = (countries) => {
|
|
@@ -3445,7 +3466,7 @@ var _factory = (() => {
|
|
|
3445
3466
|
});
|
|
3446
3467
|
};
|
|
3447
3468
|
|
|
3448
|
-
// src/js/data/intl-regionless.ts
|
|
3469
|
+
// packages/core/src/js/data/intl-regionless.ts
|
|
3449
3470
|
var regionlessDialCodes = /* @__PURE__ */ new Set([
|
|
3450
3471
|
"800",
|
|
3451
3472
|
"808",
|
|
@@ -3461,7 +3482,7 @@ var _factory = (() => {
|
|
|
3461
3482
|
return number.startsWith("+") && regionlessDialCodes.has(dialCode);
|
|
3462
3483
|
};
|
|
3463
3484
|
|
|
3464
|
-
// src/js/format/formatting.ts
|
|
3485
|
+
// packages/core/src/js/format/formatting.ts
|
|
3465
3486
|
var stripSeparateDialCode = (fullNumber, hasValidDialCode, separateDialCode, selectedCountryData) => {
|
|
3466
3487
|
if (!separateDialCode || !hasValidDialCode) {
|
|
3467
3488
|
return fullNumber;
|
|
@@ -3480,7 +3501,7 @@ var _factory = (() => {
|
|
|
3480
3501
|
return result;
|
|
3481
3502
|
};
|
|
3482
3503
|
|
|
3483
|
-
// src/js/format/caret.ts
|
|
3504
|
+
// packages/core/src/js/format/caret.ts
|
|
3484
3505
|
var computeNewCaretPosition = (relevantChars, formattedValue, prevCaretPos, isDeleteForwards) => {
|
|
3485
3506
|
if (prevCaretPos === 0 && !isDeleteForwards) {
|
|
3486
3507
|
return 0;
|
|
@@ -3500,7 +3521,7 @@ var _factory = (() => {
|
|
|
3500
3521
|
return formattedValue.length;
|
|
3501
3522
|
};
|
|
3502
3523
|
|
|
3503
|
-
// src/js/data/nanp-regionless.ts
|
|
3524
|
+
// packages/core/src/js/data/nanp-regionless.ts
|
|
3504
3525
|
var regionlessNanpAreaCodes = /* @__PURE__ */ new Set([
|
|
3505
3526
|
"800",
|
|
3506
3527
|
"822",
|
|
@@ -3529,7 +3550,7 @@ var _factory = (() => {
|
|
|
3529
3550
|
return false;
|
|
3530
3551
|
};
|
|
3531
3552
|
|
|
3532
|
-
// src/js/intlTelInput.ts
|
|
3553
|
+
// packages/core/src/js/intlTelInput.ts
|
|
3533
3554
|
var nextId = 0;
|
|
3534
3555
|
var ensureUtils = (methodName) => {
|
|
3535
3556
|
if (!intlTelInput.utils) {
|
|
@@ -3696,7 +3717,7 @@ var _factory = (() => {
|
|
|
3696
3717
|
if (this.#utilsDeferred) {
|
|
3697
3718
|
const { loadUtils } = this.#options;
|
|
3698
3719
|
const doAttachUtils = () => {
|
|
3699
|
-
intlTelInput.attachUtils(loadUtils)
|
|
3720
|
+
intlTelInput.attachUtils(loadUtils).catch(() => {
|
|
3700
3721
|
});
|
|
3701
3722
|
};
|
|
3702
3723
|
if (intlTelInput.documentReady()) {
|
|
@@ -3716,7 +3737,7 @@ var _factory = (() => {
|
|
|
3716
3737
|
}
|
|
3717
3738
|
}
|
|
3718
3739
|
//* Perform the geo ip lookup.
|
|
3719
|
-
#loadAutoCountry() {
|
|
3740
|
+
async #loadAutoCountry() {
|
|
3720
3741
|
if (intlTelInput.autoCountry) {
|
|
3721
3742
|
this.#handleAutoCountryLoaded();
|
|
3722
3743
|
return;
|
|
@@ -3727,19 +3748,18 @@ var _factory = (() => {
|
|
|
3727
3748
|
}
|
|
3728
3749
|
intlTelInput.startedLoadingAutoCountry = true;
|
|
3729
3750
|
if (typeof this.#options.geoIpLookup === "function") {
|
|
3730
|
-
|
|
3731
|
-
const
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
setTimeout(() => _Iti.forEachInstance("handleAutoCountryLoaded"));
|
|
3735
|
-
} else {
|
|
3751
|
+
try {
|
|
3752
|
+
const iso2 = await this.#options.geoIpLookup();
|
|
3753
|
+
const iso2Lower = typeof iso2 === "string" ? iso2.toLowerCase() : "";
|
|
3754
|
+
if (!isIso2(iso2Lower)) {
|
|
3736
3755
|
_Iti.forEachInstance("handleAutoCountryFailure");
|
|
3756
|
+
return;
|
|
3737
3757
|
}
|
|
3738
|
-
|
|
3739
|
-
|
|
3758
|
+
intlTelInput.autoCountry = iso2Lower;
|
|
3759
|
+
setTimeout(() => _Iti.forEachInstance("handleAutoCountryLoaded"));
|
|
3760
|
+
} catch {
|
|
3740
3761
|
_Iti.forEachInstance("handleAutoCountryFailure");
|
|
3741
|
-
}
|
|
3742
|
-
this.#options.geoIpLookup(successCallback, failureCallback);
|
|
3762
|
+
}
|
|
3743
3763
|
}
|
|
3744
3764
|
}
|
|
3745
3765
|
#openDropdownWithPlus() {
|
|
@@ -4054,8 +4074,7 @@ var _factory = (() => {
|
|
|
4054
4074
|
if (formatOnDisplay && intlTelInput.utils && this.#selectedCountry) {
|
|
4055
4075
|
const isRegionless = hasRegionlessDialCode(fullNumber);
|
|
4056
4076
|
const useNational = nationalMode && !isRegionless || !number.startsWith("+") && !separateDialCode;
|
|
4057
|
-
const
|
|
4058
|
-
const format = useNational ? NATIONAL : INTERNATIONAL;
|
|
4077
|
+
const format = useNational ? NUMBER_FORMAT.NATIONAL : NUMBER_FORMAT.INTERNATIONAL;
|
|
4059
4078
|
number = intlTelInput.utils.formatNumber(
|
|
4060
4079
|
number,
|
|
4061
4080
|
this.#selectedCountry?.iso2,
|
|
@@ -4175,11 +4194,10 @@ var _factory = (() => {
|
|
|
4175
4194
|
this.#maxCoreNumberLength = null;
|
|
4176
4195
|
return;
|
|
4177
4196
|
}
|
|
4178
|
-
const numberType = intlTelInput.utils.numberType[placeholderNumberType];
|
|
4179
4197
|
let exampleNumber = intlTelInput.utils.getExampleNumber(
|
|
4180
4198
|
iso2,
|
|
4181
4199
|
false,
|
|
4182
|
-
|
|
4200
|
+
placeholderNumberType,
|
|
4183
4201
|
true
|
|
4184
4202
|
);
|
|
4185
4203
|
let validNumber = exampleNumber;
|
|
@@ -4209,11 +4227,10 @@ var _factory = (() => {
|
|
|
4209
4227
|
if (!intlTelInput.utils || !shouldSetPlaceholder) {
|
|
4210
4228
|
return;
|
|
4211
4229
|
}
|
|
4212
|
-
const numberType = intlTelInput.utils.numberType[placeholderNumberType];
|
|
4213
4230
|
let placeholder = this.#selectedCountry ? intlTelInput.utils.getExampleNumber(
|
|
4214
4231
|
this.#selectedCountry.iso2,
|
|
4215
4232
|
nationalMode,
|
|
4216
|
-
|
|
4233
|
+
placeholderNumberType
|
|
4217
4234
|
) : "";
|
|
4218
4235
|
placeholder = this.#prepareNumberForInput(placeholder);
|
|
4219
4236
|
if (typeof customPlaceholder === "function") {
|
|
@@ -4323,19 +4340,9 @@ var _factory = (() => {
|
|
|
4323
4340
|
);
|
|
4324
4341
|
return this.#truncateToMaxLength(number);
|
|
4325
4342
|
}
|
|
4326
|
-
//* Return only the public-facing subset of the selected country data.
|
|
4327
|
-
#getPublicCountryData() {
|
|
4328
|
-
const d = this.#selectedCountry;
|
|
4329
|
-
if (!d) {
|
|
4330
|
-
return null;
|
|
4331
|
-
}
|
|
4332
|
-
const { iso2, dialCode, name } = d;
|
|
4333
|
-
return { iso2, dialCode, name };
|
|
4334
|
-
}
|
|
4335
4343
|
//* Dispatch the 'countrychange' event.
|
|
4336
4344
|
#dispatchCountryChangeEvent() {
|
|
4337
|
-
|
|
4338
|
-
this.#dispatchEvent(EVENTS.COUNTRY_CHANGE, countryData);
|
|
4345
|
+
this.#dispatchEvent(EVENTS.COUNTRY_CHANGE, this.#selectedCountry ?? null);
|
|
4339
4346
|
}
|
|
4340
4347
|
//**************************
|
|
4341
4348
|
//* INTERNAL METHODS
|
|
@@ -4426,7 +4433,7 @@ var _factory = (() => {
|
|
|
4426
4433
|
this.#selectedCountry?.iso2
|
|
4427
4434
|
);
|
|
4428
4435
|
}
|
|
4429
|
-
//* Format the number to the given format.
|
|
4436
|
+
//* Format the number to the given format (defaults to "E164").
|
|
4430
4437
|
getNumber(format) {
|
|
4431
4438
|
if (!this.#isActive) {
|
|
4432
4439
|
return "";
|
|
@@ -4441,10 +4448,10 @@ var _factory = (() => {
|
|
|
4441
4448
|
);
|
|
4442
4449
|
return this.#numerals.denormalise(formattedNumber);
|
|
4443
4450
|
}
|
|
4444
|
-
//* Get the type of the entered number e.g.
|
|
4451
|
+
//* Get the type of the entered number e.g. "FIXED_LINE" / "MOBILE", or null if it can't be determined / instance is destroyed.
|
|
4445
4452
|
getNumberType() {
|
|
4446
4453
|
if (!this.#isActive) {
|
|
4447
|
-
return
|
|
4454
|
+
return null;
|
|
4448
4455
|
}
|
|
4449
4456
|
ensureUtils("getNumberType");
|
|
4450
4457
|
return intlTelInput.utils.getNumberType(
|
|
@@ -4454,12 +4461,12 @@ var _factory = (() => {
|
|
|
4454
4461
|
}
|
|
4455
4462
|
//* Get the country data for the currently selected country.
|
|
4456
4463
|
getSelectedCountryData() {
|
|
4457
|
-
return this.#
|
|
4464
|
+
return this.#selectedCountry ?? null;
|
|
4458
4465
|
}
|
|
4459
|
-
//* Get the validation error.
|
|
4466
|
+
//* Get the validation error e.g. "TOO_SHORT" / "TOO_LONG", or null if it can't be determined / instance is destroyed.
|
|
4460
4467
|
getValidationError() {
|
|
4461
4468
|
if (!this.#isActive) {
|
|
4462
|
-
return
|
|
4469
|
+
return null;
|
|
4463
4470
|
}
|
|
4464
4471
|
ensureUtils("getValidationError");
|
|
4465
4472
|
const iso2 = this.#selectedCountry?.iso2;
|
|
@@ -4608,39 +4615,31 @@ var _factory = (() => {
|
|
|
4608
4615
|
});
|
|
4609
4616
|
}
|
|
4610
4617
|
};
|
|
4611
|
-
var attachUtils = (source) => {
|
|
4612
|
-
if (
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4618
|
+
var attachUtils = async (source) => {
|
|
4619
|
+
if (intlTelInput.utils || intlTelInput.startedLoadingUtils) {
|
|
4620
|
+
return null;
|
|
4621
|
+
}
|
|
4622
|
+
if (typeof source !== "function") {
|
|
4623
|
+
throw new TypeError(
|
|
4624
|
+
`The argument passed to attachUtils must be a function that returns a promise for the utils module, not ${typeof source}`
|
|
4625
|
+
);
|
|
4626
|
+
}
|
|
4627
|
+
intlTelInput.startedLoadingUtils = true;
|
|
4628
|
+
try {
|
|
4629
|
+
const module = await source();
|
|
4630
|
+
const utils = module?.default;
|
|
4631
|
+
if (!utils || typeof utils !== "object") {
|
|
4632
|
+
throw new TypeError(
|
|
4633
|
+
"The loader function passed to attachUtils did not resolve to a module object with utils as its default export."
|
|
4625
4634
|
);
|
|
4626
4635
|
}
|
|
4627
|
-
intlTelInput.
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
);
|
|
4634
|
-
}
|
|
4635
|
-
intlTelInput.utils = utils;
|
|
4636
|
-
Iti.forEachInstance("handleUtilsLoaded");
|
|
4637
|
-
return true;
|
|
4638
|
-
}).catch((error) => {
|
|
4639
|
-
Iti.forEachInstance("handleUtilsFailure", error);
|
|
4640
|
-
throw error;
|
|
4641
|
-
});
|
|
4636
|
+
intlTelInput.utils = utils;
|
|
4637
|
+
Iti.forEachInstance("handleUtilsLoaded");
|
|
4638
|
+
return true;
|
|
4639
|
+
} catch (error) {
|
|
4640
|
+
Iti.forEachInstance("handleUtilsFailure", error);
|
|
4641
|
+
throw error;
|
|
4642
4642
|
}
|
|
4643
|
-
return null;
|
|
4644
4643
|
};
|
|
4645
4644
|
var intlTelInput = Object.assign(
|
|
4646
4645
|
(input, options) => {
|
|
@@ -4665,22 +4664,25 @@ var _factory = (() => {
|
|
|
4665
4664
|
attachUtils,
|
|
4666
4665
|
startedLoadingUtils: false,
|
|
4667
4666
|
startedLoadingAutoCountry: false,
|
|
4668
|
-
version: "
|
|
4667
|
+
version: "28.0.0",
|
|
4668
|
+
NUMBER_FORMAT,
|
|
4669
|
+
NUMBER_TYPE,
|
|
4670
|
+
VALIDATION_ERROR
|
|
4669
4671
|
}
|
|
4670
4672
|
);
|
|
4671
4673
|
var intlTelInput_default = intlTelInput;
|
|
4672
4674
|
|
|
4673
|
-
// dist/js/utils.js
|
|
4675
|
+
// packages/core/dist/js/utils.js
|
|
4674
4676
|
var _scope = {};
|
|
4675
4677
|
(function() {
|
|
4676
|
-
var
|
|
4677
|
-
function
|
|
4678
|
+
var aa = this || self;
|
|
4679
|
+
function k(a, b) {
|
|
4678
4680
|
a = a.split(".");
|
|
4679
|
-
var c =
|
|
4681
|
+
var c = aa;
|
|
4680
4682
|
a[0] in c || typeof c.execScript == "undefined" || c.execScript("var " + a[0]);
|
|
4681
4683
|
for (var d; a.length && (d = a.shift()); ) a.length || b === void 0 ? c[d] && c[d] !== Object.prototype[d] ? c = c[d] : c = c[d] = {} : c[d] = b;
|
|
4682
4684
|
}
|
|
4683
|
-
function
|
|
4685
|
+
function m(a, b) {
|
|
4684
4686
|
function c() {
|
|
4685
4687
|
}
|
|
4686
4688
|
c.prototype = b.prototype;
|
|
@@ -4693,7 +4695,7 @@ var _factory = (() => {
|
|
|
4693
4695
|
};
|
|
4694
4696
|
}
|
|
4695
4697
|
;
|
|
4696
|
-
function
|
|
4698
|
+
function ba(a) {
|
|
4697
4699
|
const b = [];
|
|
4698
4700
|
let c = 0;
|
|
4699
4701
|
for (const d in a) b[c++] = a[d];
|
|
@@ -4702,13 +4704,13 @@ var _factory = (() => {
|
|
|
4702
4704
|
;
|
|
4703
4705
|
var da = class {
|
|
4704
4706
|
constructor(a) {
|
|
4705
|
-
if (
|
|
4707
|
+
if (ca !== ca) throw Error("SafeUrl is not meant to be built directly");
|
|
4706
4708
|
this.g = a;
|
|
4707
4709
|
}
|
|
4708
4710
|
toString() {
|
|
4709
4711
|
return this.g.toString();
|
|
4710
4712
|
}
|
|
4711
|
-
},
|
|
4713
|
+
}, ca = {};
|
|
4712
4714
|
new da("about:invalid#zClosurez");
|
|
4713
4715
|
new da("about:blank");
|
|
4714
4716
|
const ea = {};
|
|
@@ -4734,7 +4736,7 @@ var _factory = (() => {
|
|
|
4734
4736
|
const ja = {};
|
|
4735
4737
|
class ka {
|
|
4736
4738
|
constructor() {
|
|
4737
|
-
var a =
|
|
4739
|
+
var a = aa.trustedTypes && aa.trustedTypes.emptyHTML || "";
|
|
4738
4740
|
if (ja !== ja) throw Error("SafeHtml is not meant to be built directly");
|
|
4739
4741
|
this.g = a;
|
|
4740
4742
|
}
|
|
@@ -4771,38 +4773,38 @@ var _factory = (() => {
|
|
|
4771
4773
|
}
|
|
4772
4774
|
}
|
|
4773
4775
|
function ua(a) {
|
|
4774
|
-
a =
|
|
4776
|
+
a = ba(a.g);
|
|
4775
4777
|
a.sort(function(b, c) {
|
|
4776
4778
|
return b.g - c.g;
|
|
4777
4779
|
});
|
|
4778
4780
|
return a;
|
|
4779
4781
|
}
|
|
4780
4782
|
;
|
|
4781
|
-
function
|
|
4783
|
+
function n() {
|
|
4782
4784
|
this.h = {};
|
|
4783
4785
|
this.j = this.m().g;
|
|
4784
4786
|
this.g = this.l = null;
|
|
4785
4787
|
}
|
|
4786
|
-
|
|
4787
|
-
return
|
|
4788
|
+
n.prototype.has = function(a) {
|
|
4789
|
+
return p(this, a.g);
|
|
4788
4790
|
};
|
|
4789
|
-
|
|
4790
|
-
return
|
|
4791
|
+
n.prototype.get = function(a, b) {
|
|
4792
|
+
return q(this, a.g, b);
|
|
4791
4793
|
};
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
+
n.prototype.set = function(a, b) {
|
|
4795
|
+
r(this, a.g, b);
|
|
4794
4796
|
};
|
|
4795
|
-
|
|
4797
|
+
n.prototype.add = function(a, b) {
|
|
4796
4798
|
va(this, a.g, b);
|
|
4797
4799
|
};
|
|
4798
|
-
|
|
4800
|
+
n.prototype.equals = function(a) {
|
|
4799
4801
|
if (!a || this.constructor != a.constructor) return false;
|
|
4800
4802
|
for (var b = ua(this.m()), c = 0; c < b.length; c++) {
|
|
4801
4803
|
var d = b[c], e = d.g;
|
|
4802
|
-
if (
|
|
4803
|
-
if (
|
|
4804
|
-
var f = d.h == 11 || d.h == 10, g =
|
|
4805
|
-
e =
|
|
4804
|
+
if (p(this, e) != p(a, e)) return false;
|
|
4805
|
+
if (p(this, e)) {
|
|
4806
|
+
var f = d.h == 11 || d.h == 10, g = t(this, e);
|
|
4807
|
+
e = t(a, e);
|
|
4806
4808
|
if (d.l) {
|
|
4807
4809
|
if (g.length != e.length) return false;
|
|
4808
4810
|
for (d = 0; d < g.length; d++) {
|
|
@@ -4817,25 +4819,25 @@ var _factory = (() => {
|
|
|
4817
4819
|
function wa(a, b) {
|
|
4818
4820
|
for (var c = ua(a.m()), d = 0; d < c.length; d++) {
|
|
4819
4821
|
var e = c[d], f = e.g;
|
|
4820
|
-
if (
|
|
4822
|
+
if (p(b, f)) {
|
|
4821
4823
|
a.g && delete a.g[e.g];
|
|
4822
4824
|
var g = e.h == 11 || e.h == 10;
|
|
4823
4825
|
if (e.l) {
|
|
4824
|
-
e =
|
|
4826
|
+
e = t(b, f) || [];
|
|
4825
4827
|
for (var h = 0; h < e.length; h++) va(a, f, g ? e[h].clone() : e[h]);
|
|
4826
|
-
} else e =
|
|
4828
|
+
} else e = t(b, f), g ? (g = t(a, f)) ? wa(g, e) : r(a, f, e.clone()) : r(a, f, e);
|
|
4827
4829
|
}
|
|
4828
4830
|
}
|
|
4829
4831
|
}
|
|
4830
|
-
|
|
4832
|
+
n.prototype.clone = function() {
|
|
4831
4833
|
var a = new this.constructor();
|
|
4832
4834
|
a != this && (a.h = {}, a.g && (a.g = {}), wa(a, this));
|
|
4833
4835
|
return a;
|
|
4834
4836
|
};
|
|
4835
|
-
function
|
|
4837
|
+
function p(a, b) {
|
|
4836
4838
|
return a.h[b] != null;
|
|
4837
4839
|
}
|
|
4838
|
-
function
|
|
4840
|
+
function t(a, b) {
|
|
4839
4841
|
var c = a.h[b];
|
|
4840
4842
|
if (c == null) return null;
|
|
4841
4843
|
if (a.l) {
|
|
@@ -4851,12 +4853,12 @@ var _factory = (() => {
|
|
|
4851
4853
|
}
|
|
4852
4854
|
return c;
|
|
4853
4855
|
}
|
|
4854
|
-
function
|
|
4855
|
-
var d =
|
|
4856
|
+
function q(a, b, c) {
|
|
4857
|
+
var d = t(a, b);
|
|
4856
4858
|
return a.j[b].l ? d[c || 0] : d;
|
|
4857
4859
|
}
|
|
4858
|
-
function
|
|
4859
|
-
if (
|
|
4860
|
+
function u(a, b) {
|
|
4861
|
+
if (p(a, b)) a = q(a, b);
|
|
4860
4862
|
else a: {
|
|
4861
4863
|
a = a.j[b];
|
|
4862
4864
|
if (a.j === void 0) if (b = a.u, b === Boolean) a.j = false;
|
|
@@ -4870,10 +4872,10 @@ var _factory = (() => {
|
|
|
4870
4872
|
}
|
|
4871
4873
|
return a;
|
|
4872
4874
|
}
|
|
4873
|
-
function
|
|
4874
|
-
return a.j[b].l ?
|
|
4875
|
+
function v(a, b) {
|
|
4876
|
+
return a.j[b].l ? p(a, b) ? a.h[b].length : 0 : p(a, b) ? 1 : 0;
|
|
4875
4877
|
}
|
|
4876
|
-
function
|
|
4878
|
+
function r(a, b, c) {
|
|
4877
4879
|
a.h[b] = c;
|
|
4878
4880
|
a.g && (a.g[b] = c);
|
|
4879
4881
|
}
|
|
@@ -4882,20 +4884,20 @@ var _factory = (() => {
|
|
|
4882
4884
|
a.h[b].push(c);
|
|
4883
4885
|
a.g && delete a.g[b];
|
|
4884
4886
|
}
|
|
4885
|
-
function
|
|
4887
|
+
function w(a, b) {
|
|
4886
4888
|
var c = [], d;
|
|
4887
4889
|
for (d in b) d != 0 && c.push(new la(d, b[d]));
|
|
4888
4890
|
return new ta(a, c);
|
|
4889
4891
|
}
|
|
4890
4892
|
;
|
|
4891
|
-
function
|
|
4893
|
+
function x() {
|
|
4892
4894
|
}
|
|
4893
|
-
|
|
4895
|
+
x.prototype.g = function(a) {
|
|
4894
4896
|
new a.h();
|
|
4895
4897
|
throw Error("Unimplemented");
|
|
4896
4898
|
};
|
|
4897
|
-
|
|
4898
|
-
if (a.h == 11 || a.h == 10) return b instanceof
|
|
4899
|
+
x.prototype.h = function(a, b) {
|
|
4900
|
+
if (a.h == 11 || a.h == 10) return b instanceof n ? b : this.g(a.u.prototype.m(), b);
|
|
4899
4901
|
if (a.h == 14) return typeof b === "string" && xa.test(b) && (a = Number(b), a > 0) ? a : b;
|
|
4900
4902
|
if (!a.o) return b;
|
|
4901
4903
|
a = a.u;
|
|
@@ -4905,94 +4907,94 @@ var _factory = (() => {
|
|
|
4905
4907
|
return b;
|
|
4906
4908
|
};
|
|
4907
4909
|
var xa = /^-?[0-9]+$/;
|
|
4908
|
-
function
|
|
4910
|
+
function ya() {
|
|
4909
4911
|
}
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
+
m(ya, x);
|
|
4913
|
+
ya.prototype.g = function(a, b) {
|
|
4912
4914
|
a = new a.h();
|
|
4913
4915
|
a.l = this;
|
|
4914
4916
|
a.h = b;
|
|
4915
4917
|
a.g = {};
|
|
4916
4918
|
return a;
|
|
4917
4919
|
};
|
|
4918
|
-
function
|
|
4920
|
+
function z() {
|
|
4919
4921
|
}
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
return a.h == 8 ? !!b :
|
|
4922
|
+
m(z, ya);
|
|
4923
|
+
z.prototype.h = function(a, b) {
|
|
4924
|
+
return a.h == 8 ? !!b : x.prototype.h.apply(this, arguments);
|
|
4923
4925
|
};
|
|
4924
|
-
|
|
4925
|
-
return
|
|
4926
|
+
z.prototype.g = function(a, b) {
|
|
4927
|
+
return z.na.g.call(this, a, b);
|
|
4926
4928
|
};
|
|
4927
|
-
function
|
|
4929
|
+
function A(a, b) {
|
|
4928
4930
|
a != null && this.g.apply(this, arguments);
|
|
4929
4931
|
}
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
+
A.prototype.h = "";
|
|
4933
|
+
A.prototype.set = function(a) {
|
|
4932
4934
|
this.h = "" + a;
|
|
4933
4935
|
};
|
|
4934
|
-
|
|
4936
|
+
A.prototype.g = function(a, b, c) {
|
|
4935
4937
|
this.h += String(a);
|
|
4936
4938
|
if (b != null) for (let d = 1; d < arguments.length; d++) this.h += arguments[d];
|
|
4937
4939
|
return this;
|
|
4938
4940
|
};
|
|
4939
|
-
function
|
|
4941
|
+
function B(a) {
|
|
4940
4942
|
a.h = "";
|
|
4941
4943
|
}
|
|
4942
|
-
|
|
4944
|
+
A.prototype.toString = function() {
|
|
4943
4945
|
return this.h;
|
|
4944
4946
|
};
|
|
4945
|
-
function
|
|
4946
|
-
|
|
4947
|
-
}
|
|
4948
|
-
n(E, p);
|
|
4949
|
-
var ya = null;
|
|
4950
|
-
function F() {
|
|
4951
|
-
p.call(this);
|
|
4947
|
+
function C() {
|
|
4948
|
+
n.call(this);
|
|
4952
4949
|
}
|
|
4953
|
-
|
|
4950
|
+
m(C, n);
|
|
4954
4951
|
var za = null;
|
|
4955
|
-
function
|
|
4956
|
-
|
|
4952
|
+
function D() {
|
|
4953
|
+
n.call(this);
|
|
4957
4954
|
}
|
|
4958
|
-
|
|
4959
|
-
p.call(this);
|
|
4960
|
-
}
|
|
4961
|
-
n(H, p);
|
|
4955
|
+
m(D, n);
|
|
4962
4956
|
var Aa = null;
|
|
4963
|
-
E
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
F
|
|
4957
|
+
function E(a) {
|
|
4958
|
+
return t(a, 9) || [];
|
|
4959
|
+
}
|
|
4960
|
+
function F() {
|
|
4961
|
+
n.call(this);
|
|
4962
|
+
}
|
|
4963
|
+
m(F, n);
|
|
4964
|
+
var Ba = null;
|
|
4965
|
+
C.prototype.m = function() {
|
|
4970
4966
|
var a = za;
|
|
4971
|
-
a || (za = a =
|
|
4967
|
+
a || (za = a = w(C, { 0: { name: "NumberFormat", ja: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: true, i: 9, type: String }, 2: { name: "format", required: true, i: 9, type: String }, 3: { name: "leading_digits_pattern", ca: true, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: false, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } }));
|
|
4972
4968
|
return a;
|
|
4973
4969
|
};
|
|
4974
|
-
|
|
4975
|
-
|
|
4970
|
+
C.m = C.prototype.m;
|
|
4971
|
+
D.prototype.m = function() {
|
|
4976
4972
|
var a = Aa;
|
|
4977
|
-
a || (Aa = a =
|
|
4973
|
+
a || (Aa = a = w(D, { 0: { name: "PhoneNumberDesc", ja: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", ca: true, i: 5, type: Number }, 10: { name: "possible_length_local_only", ca: true, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } }));
|
|
4974
|
+
return a;
|
|
4975
|
+
};
|
|
4976
|
+
D.m = D.prototype.m;
|
|
4977
|
+
F.prototype.m = function() {
|
|
4978
|
+
var a = Ba;
|
|
4979
|
+
a || (Ba = a = w(F, {
|
|
4978
4980
|
0: { name: "PhoneMetadata", ja: "i18n.phonenumbers.PhoneMetadata" },
|
|
4979
|
-
1: { name: "general_desc", i: 11, type:
|
|
4980
|
-
2: { name: "fixed_line", i: 11, type:
|
|
4981
|
-
3: { name: "mobile", i: 11, type:
|
|
4982
|
-
4: { name: "toll_free", i: 11, type:
|
|
4983
|
-
5: { name: "premium_rate", i: 11, type:
|
|
4984
|
-
6: { name: "shared_cost", i: 11, type:
|
|
4985
|
-
7: { name: "personal_number", i: 11, type:
|
|
4986
|
-
8: { name: "voip", i: 11, type:
|
|
4987
|
-
21: { name: "pager", i: 11, type:
|
|
4988
|
-
25: { name: "uan", i: 11, type:
|
|
4989
|
-
27: { name: "emergency", i: 11, type:
|
|
4990
|
-
28: { name: "voicemail", i: 11, type:
|
|
4991
|
-
29: { name: "short_code", i: 11, type:
|
|
4992
|
-
30: { name: "standard_rate", i: 11, type:
|
|
4993
|
-
31: { name: "carrier_specific", i: 11, type:
|
|
4994
|
-
33: { name: "sms_services", i: 11, type:
|
|
4995
|
-
24: { name: "no_international_dialling", i: 11, type:
|
|
4981
|
+
1: { name: "general_desc", i: 11, type: D },
|
|
4982
|
+
2: { name: "fixed_line", i: 11, type: D },
|
|
4983
|
+
3: { name: "mobile", i: 11, type: D },
|
|
4984
|
+
4: { name: "toll_free", i: 11, type: D },
|
|
4985
|
+
5: { name: "premium_rate", i: 11, type: D },
|
|
4986
|
+
6: { name: "shared_cost", i: 11, type: D },
|
|
4987
|
+
7: { name: "personal_number", i: 11, type: D },
|
|
4988
|
+
8: { name: "voip", i: 11, type: D },
|
|
4989
|
+
21: { name: "pager", i: 11, type: D },
|
|
4990
|
+
25: { name: "uan", i: 11, type: D },
|
|
4991
|
+
27: { name: "emergency", i: 11, type: D },
|
|
4992
|
+
28: { name: "voicemail", i: 11, type: D },
|
|
4993
|
+
29: { name: "short_code", i: 11, type: D },
|
|
4994
|
+
30: { name: "standard_rate", i: 11, type: D },
|
|
4995
|
+
31: { name: "carrier_specific", i: 11, type: D },
|
|
4996
|
+
33: { name: "sms_services", i: 11, type: D },
|
|
4997
|
+
24: { name: "no_international_dialling", i: 11, type: D },
|
|
4996
4998
|
9: { name: "id", required: true, i: 9, type: String },
|
|
4997
4999
|
10: { name: "country_code", i: 5, type: Number },
|
|
4998
5000
|
11: { name: "international_prefix", i: 9, type: String },
|
|
@@ -5006,31 +5008,31 @@ var _factory = (() => {
|
|
|
5006
5008
|
},
|
|
5007
5009
|
16: { name: "national_prefix_transform_rule", i: 9, type: String },
|
|
5008
5010
|
18: { name: "same_mobile_and_fixed_line_pattern", i: 8, defaultValue: false, type: Boolean },
|
|
5009
|
-
19: { name: "number_format", ca: true, i: 11, type:
|
|
5010
|
-
20: { name: "intl_number_format", ca: true, i: 11, type:
|
|
5011
|
+
19: { name: "number_format", ca: true, i: 11, type: C },
|
|
5012
|
+
20: { name: "intl_number_format", ca: true, i: 11, type: C },
|
|
5011
5013
|
22: { name: "main_country_for_code", i: 8, defaultValue: false, type: Boolean },
|
|
5012
5014
|
23: { name: "leading_digits", i: 9, type: String }
|
|
5013
5015
|
}));
|
|
5014
5016
|
return a;
|
|
5015
5017
|
};
|
|
5016
|
-
|
|
5017
|
-
function
|
|
5018
|
-
|
|
5019
|
-
}
|
|
5020
|
-
|
|
5021
|
-
var
|
|
5022
|
-
|
|
5023
|
-
var a =
|
|
5024
|
-
a || (
|
|
5018
|
+
F.m = F.prototype.m;
|
|
5019
|
+
function G() {
|
|
5020
|
+
n.call(this);
|
|
5021
|
+
}
|
|
5022
|
+
m(G, n);
|
|
5023
|
+
var Ca = null, Da = { sa: 0, ra: 1, qa: 5, pa: 10, oa: 20 };
|
|
5024
|
+
G.prototype.m = function() {
|
|
5025
|
+
var a = Ca;
|
|
5026
|
+
a || (Ca = a = w(G, { 0: { name: "PhoneNumber", ja: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: true, i: 5, type: Number }, 2: { name: "national_number", required: true, 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: Da }, 7: {
|
|
5025
5027
|
name: "preferred_domestic_carrier_code",
|
|
5026
5028
|
i: 9,
|
|
5027
5029
|
type: String
|
|
5028
5030
|
} }));
|
|
5029
5031
|
return a;
|
|
5030
5032
|
};
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
var
|
|
5033
|
+
G.ctor = G;
|
|
5034
|
+
G.ctor.m = G.prototype.m;
|
|
5035
|
+
var H = {
|
|
5034
5036
|
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(" "),
|
|
5035
5037
|
7: ["RU", "KZ"],
|
|
5036
5038
|
20: ["EG"],
|
|
@@ -5246,7 +5248,7 @@ var _factory = (() => {
|
|
|
5246
5248
|
995: ["GE"],
|
|
5247
5249
|
996: ["KG"],
|
|
5248
5250
|
998: ["UZ"]
|
|
5249
|
-
},
|
|
5251
|
+
}, Ea = {
|
|
5250
5252
|
AC: [, [
|
|
5251
5253
|
,
|
|
5252
5254
|
,
|
|
@@ -10318,14 +10320,14 @@ var _factory = (() => {
|
|
|
10318
10320
|
], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
|
|
10319
10321
|
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]]]
|
|
10320
10322
|
};
|
|
10321
|
-
function
|
|
10323
|
+
function I() {
|
|
10322
10324
|
this.g = {};
|
|
10323
10325
|
}
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
return
|
|
10326
|
+
I.h = void 0;
|
|
10327
|
+
I.g = function() {
|
|
10328
|
+
return I.h ? I.h : I.h = new I();
|
|
10327
10329
|
};
|
|
10328
|
-
var
|
|
10330
|
+
var Fa = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "\uFF10": "0", "\uFF11": "1", "\uFF12": "2", "\uFF13": "3", "\uFF14": "4", "\uFF15": "5", "\uFF16": "6", "\uFF17": "7", "\uFF18": "8", "\uFF19": "9", "\u0660": "0", "\u0661": "1", "\u0662": "2", "\u0663": "3", "\u0664": "4", "\u0665": "5", "\u0666": "6", "\u0667": "7", "\u0668": "8", "\u0669": "9", "\u06F0": "0", "\u06F1": "1", "\u06F2": "2", "\u06F3": "3", "\u06F4": "4", "\u06F5": "5", "\u06F6": "6", "\u06F7": "7", "\u06F8": "8", "\u06F9": "9" }, Ga = {
|
|
10329
10331
|
0: "0",
|
|
10330
10332
|
1: "1",
|
|
10331
10333
|
2: "2",
|
|
@@ -10339,7 +10341,7 @@ var _factory = (() => {
|
|
|
10339
10341
|
"+": "+",
|
|
10340
10342
|
"*": "*",
|
|
10341
10343
|
"#": "#"
|
|
10342
|
-
},
|
|
10344
|
+
}, Ha = {
|
|
10343
10345
|
0: "0",
|
|
10344
10346
|
1: "1",
|
|
10345
10347
|
2: "2",
|
|
@@ -10406,56 +10408,56 @@ var _factory = (() => {
|
|
|
10406
10408
|
X: "9",
|
|
10407
10409
|
Y: "9",
|
|
10408
10410
|
Z: "9"
|
|
10409
|
-
},
|
|
10410
|
-
function
|
|
10411
|
+
}, Ia = RegExp("[+\uFF0B]+"), J = RegExp("^[+\uFF0B]+"), Ja = RegExp("([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])"), Ka = RegExp("[+\uFF0B0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]"), La = /[\\\/] *x/, Ma = RegExp("[^0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9A-Za-z#]+$"), Na = /(?:.*?[A-Za-z]){3}.*/, Oa = RegExp("^\\+([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]|[\\-\\.\\(\\)]?)*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]|[\\-\\.\\(\\)]?)*$"), Pa = RegExp("^([A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]+((\\-)*[A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9])*\\.?$");
|
|
10412
|
+
function K(a) {
|
|
10411
10413
|
return "([0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]{1," + a + "})";
|
|
10412
10414
|
}
|
|
10413
|
-
function
|
|
10414
|
-
return ";ext=" +
|
|
10415
|
-
}
|
|
10416
|
-
var Qa = new RegExp("(?:" + Pa() + ")$", "i"), Ra = new RegExp("^[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]{2}$|^[+\uFF0B]*(?:[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*]*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]){3,}[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]*(?:" + Pa() + ")?$", "i"), Sa = /(\$\d)/, Ta = /^\(?\$1\)?$/;
|
|
10417
|
-
function Ua(a) {
|
|
10418
|
-
return a.length < 2 ? false : N(Ra, a);
|
|
10415
|
+
function Qa() {
|
|
10416
|
+
return ";ext=" + K("20") + "|[ \xA0\\t,]*(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)[:\\.\uFF0E]?[ \xA0\\t,-]*" + (K("20") + "#?|[ \xA0\\t,]*(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)[:\\.\uFF0E]?[ \xA0\\t,-]*") + (K("9") + "#?|[- ]+") + (K("6") + "#|[ \xA0\\t]*(?:,{2}|;)[:\\.\uFF0E]?[ \xA0\\t,-]*") + (K("15") + "#?|[ \xA0\\t]*(?:,)+[:\\.\uFF0E]?[ \xA0\\t,-]*") + (K("9") + "#?");
|
|
10419
10417
|
}
|
|
10418
|
+
var Ra = new RegExp("(?:" + Qa() + ")$", "i"), Sa = new RegExp("^[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]{2}$|^[+\uFF0B]*(?:[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*]*[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]){3,}[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E*A-Za-z0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]*(?:" + Qa() + ")?$", "i"), Ta = /(\$\d)/, Ua = /^\(?\$1\)?$/;
|
|
10420
10419
|
function Va(a) {
|
|
10421
|
-
return
|
|
10420
|
+
return a.length < 2 ? false : L(Sa, a);
|
|
10422
10421
|
}
|
|
10423
10422
|
function Wa(a) {
|
|
10424
|
-
|
|
10425
|
-
D(a);
|
|
10426
|
-
a.g(b);
|
|
10423
|
+
return L(Na, a) ? M(a, Ha) : M(a, Fa);
|
|
10427
10424
|
}
|
|
10428
10425
|
function Xa(a) {
|
|
10429
|
-
|
|
10426
|
+
var b = Wa(a.toString());
|
|
10427
|
+
B(a);
|
|
10428
|
+
a.g(b);
|
|
10430
10429
|
}
|
|
10431
|
-
function
|
|
10432
|
-
|
|
10430
|
+
function Ya(a) {
|
|
10431
|
+
return a != null && (v(a, 9) != 1 || E(a)[0] != -1);
|
|
10432
|
+
}
|
|
10433
|
+
function M(a, b) {
|
|
10434
|
+
for (var c = new A(), d, e = a.length, f = 0; f < e; ++f) d = a.charAt(f), d = b[d.toUpperCase()], d != null && c.g(d);
|
|
10433
10435
|
return c.toString();
|
|
10434
10436
|
}
|
|
10435
|
-
function
|
|
10436
|
-
return a.length == 0 ||
|
|
10437
|
+
function Za(a) {
|
|
10438
|
+
return a.length == 0 || Ua.test(a);
|
|
10437
10439
|
}
|
|
10438
|
-
function
|
|
10439
|
-
return a != null && isNaN(a) && a.toUpperCase() in
|
|
10440
|
+
function N(a) {
|
|
10441
|
+
return a != null && isNaN(a) && a.toUpperCase() in Ea;
|
|
10440
10442
|
}
|
|
10441
|
-
|
|
10442
|
-
if (
|
|
10443
|
-
var c =
|
|
10443
|
+
I.prototype.format = function(a, b) {
|
|
10444
|
+
if (q(a, 2) == 0 && p(a, 5)) {
|
|
10445
|
+
var c = u(a, 5);
|
|
10444
10446
|
if (c.length > 0) return c;
|
|
10445
10447
|
}
|
|
10446
|
-
c =
|
|
10447
|
-
var d =
|
|
10448
|
-
if (b == 0) return
|
|
10449
|
-
if (!(c in
|
|
10450
|
-
var e =
|
|
10451
|
-
a =
|
|
10448
|
+
c = u(a, 1);
|
|
10449
|
+
var d = O(a);
|
|
10450
|
+
if (b == 0) return $a(c, 0, d, "");
|
|
10451
|
+
if (!(c in H)) return d;
|
|
10452
|
+
var e = P(this, c, Q(c));
|
|
10453
|
+
a = p(a, 3) && q(a, 3).length != 0 ? b == 3 ? ";ext=" + q(a, 3) : p(e, 13) ? q(e, 13) + u(a, 3) : " ext. " + u(a, 3) : "";
|
|
10452
10454
|
a: {
|
|
10453
|
-
e = (
|
|
10455
|
+
e = (t(e, 20) || []).length == 0 || b == 2 ? t(e, 19) || [] : t(e, 20) || [];
|
|
10454
10456
|
for (var f, g = e.length, h = 0; h < g; ++h) {
|
|
10455
10457
|
f = e[h];
|
|
10456
|
-
var l =
|
|
10457
|
-
if (l == 0 || d.search(
|
|
10458
|
-
if (l = new RegExp(
|
|
10458
|
+
var l = v(f, 3);
|
|
10459
|
+
if (l == 0 || d.search(q(f, 3, l - 1)) == 0) {
|
|
10460
|
+
if (l = new RegExp(q(f, 1)), L(l, d)) {
|
|
10459
10461
|
e = f;
|
|
10460
10462
|
break a;
|
|
10461
10463
|
}
|
|
@@ -10463,21 +10465,21 @@ var _factory = (() => {
|
|
|
10463
10465
|
}
|
|
10464
10466
|
e = null;
|
|
10465
10467
|
}
|
|
10466
|
-
e != null && (g = e, e =
|
|
10468
|
+
e != null && (g = e, e = u(g, 2), f = new RegExp(q(
|
|
10467
10469
|
g,
|
|
10468
10470
|
1
|
|
10469
|
-
)),
|
|
10470
|
-
return
|
|
10471
|
+
)), u(g, 5), g = u(g, 4), d = b == 2 && g != null && g.length > 0 ? d.replace(f, e.replace(Ta, g)) : d.replace(f, e), b == 3 && (d = d.replace(RegExp("^[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+"), ""), d = d.replace(RegExp("[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+", "g"), "-")));
|
|
10472
|
+
return $a(c, b, d, a);
|
|
10471
10473
|
};
|
|
10472
|
-
function
|
|
10473
|
-
return "001" == c ?
|
|
10474
|
+
function P(a, b, c) {
|
|
10475
|
+
return "001" == c ? R(a, "" + b) : R(a, c);
|
|
10474
10476
|
}
|
|
10475
|
-
function
|
|
10476
|
-
if (!
|
|
10477
|
-
var b = "" +
|
|
10478
|
-
return
|
|
10477
|
+
function O(a) {
|
|
10478
|
+
if (!p(a, 2)) return "";
|
|
10479
|
+
var b = "" + q(a, 2);
|
|
10480
|
+
return p(a, 4) && q(a, 4) && u(a, 8) > 0 ? Array(u(a, 8) + 1).join("0") + b : b;
|
|
10479
10481
|
}
|
|
10480
|
-
function
|
|
10482
|
+
function $a(a, b, c, d) {
|
|
10481
10483
|
switch (b) {
|
|
10482
10484
|
case 0:
|
|
10483
10485
|
return "+" + a + c + d;
|
|
@@ -10489,83 +10491,83 @@ var _factory = (() => {
|
|
|
10489
10491
|
return c + d;
|
|
10490
10492
|
}
|
|
10491
10493
|
}
|
|
10492
|
-
function
|
|
10494
|
+
function S(a, b) {
|
|
10493
10495
|
switch (b) {
|
|
10494
10496
|
case 4:
|
|
10495
|
-
return
|
|
10497
|
+
return q(a, 5);
|
|
10496
10498
|
case 3:
|
|
10497
|
-
return
|
|
10499
|
+
return q(a, 4);
|
|
10498
10500
|
case 1:
|
|
10499
|
-
return
|
|
10501
|
+
return q(a, 3);
|
|
10500
10502
|
case 0:
|
|
10501
10503
|
case 2:
|
|
10502
|
-
return
|
|
10504
|
+
return q(a, 2);
|
|
10503
10505
|
case 5:
|
|
10504
|
-
return
|
|
10506
|
+
return q(a, 6);
|
|
10505
10507
|
case 6:
|
|
10506
|
-
return
|
|
10508
|
+
return q(a, 8);
|
|
10507
10509
|
case 7:
|
|
10508
|
-
return
|
|
10510
|
+
return q(a, 7);
|
|
10509
10511
|
case 8:
|
|
10510
|
-
return
|
|
10512
|
+
return q(a, 21);
|
|
10511
10513
|
case 9:
|
|
10512
|
-
return
|
|
10514
|
+
return q(a, 25);
|
|
10513
10515
|
case 10:
|
|
10514
|
-
return
|
|
10516
|
+
return q(a, 28);
|
|
10515
10517
|
default:
|
|
10516
|
-
return
|
|
10518
|
+
return q(a, 1);
|
|
10517
10519
|
}
|
|
10518
10520
|
}
|
|
10519
|
-
function
|
|
10520
|
-
var c =
|
|
10521
|
-
a =
|
|
10521
|
+
function ab(a, b) {
|
|
10522
|
+
var c = bb(a, b);
|
|
10523
|
+
a = P(a, u(b, 1), c);
|
|
10522
10524
|
if (a == null) return -1;
|
|
10523
|
-
b =
|
|
10524
|
-
return
|
|
10525
|
+
b = O(b);
|
|
10526
|
+
return cb(b, a);
|
|
10525
10527
|
}
|
|
10526
|
-
function
|
|
10527
|
-
return
|
|
10528
|
+
function cb(a, b) {
|
|
10529
|
+
return T(a, q(b, 1)) ? T(a, q(b, 5)) ? 4 : T(a, q(b, 4)) ? 3 : T(a, q(b, 6)) ? 5 : T(a, q(b, 8)) ? 6 : T(a, q(b, 7)) ? 7 : T(a, q(b, 21)) ? 8 : T(a, q(b, 25)) ? 9 : T(a, q(b, 28)) ? 10 : T(a, q(b, 2)) ? q(b, 18) || T(a, q(b, 3)) ? 2 : 0 : !q(b, 18) && T(a, q(b, 3)) ? 1 : -1 : -1;
|
|
10528
10530
|
}
|
|
10529
|
-
function
|
|
10531
|
+
function R(a, b) {
|
|
10530
10532
|
if (b == null) return null;
|
|
10531
10533
|
b = b.toUpperCase();
|
|
10532
10534
|
var c = a.g[b];
|
|
10533
10535
|
if (c == null) {
|
|
10534
|
-
c =
|
|
10536
|
+
c = Ea[b];
|
|
10535
10537
|
if (c == null) return null;
|
|
10536
|
-
c = new
|
|
10538
|
+
c = new z().g(F.m(), c);
|
|
10537
10539
|
a.g[b] = c;
|
|
10538
10540
|
}
|
|
10539
10541
|
return c;
|
|
10540
10542
|
}
|
|
10541
|
-
function
|
|
10543
|
+
function T(a, b) {
|
|
10542
10544
|
var c = a.length;
|
|
10543
|
-
return
|
|
10545
|
+
return v(b, 9) > 0 && E(b).indexOf(c) == -1 ? false : L(u(b, 2), a);
|
|
10544
10546
|
}
|
|
10545
|
-
function
|
|
10546
|
-
var c =
|
|
10547
|
-
var d =
|
|
10548
|
-
var e =
|
|
10549
|
-
e == null || "001" != c && d !=
|
|
10547
|
+
function db(a, b) {
|
|
10548
|
+
var c = bb(a, b);
|
|
10549
|
+
var d = u(b, 1);
|
|
10550
|
+
var e = P(a, d, c);
|
|
10551
|
+
e == null || "001" != c && d != eb(a, c) ? e = false : (a = O(b), e = cb(a, e) != -1);
|
|
10550
10552
|
return e;
|
|
10551
10553
|
}
|
|
10552
|
-
function
|
|
10554
|
+
function bb(a, b) {
|
|
10553
10555
|
if (b == null) return null;
|
|
10554
|
-
var c =
|
|
10555
|
-
c =
|
|
10556
|
+
var c = u(b, 1);
|
|
10557
|
+
c = H[c];
|
|
10556
10558
|
if (c == null) a = null;
|
|
10557
10559
|
else if (c.length == 1) a = c[0];
|
|
10558
10560
|
else a: {
|
|
10559
|
-
b =
|
|
10561
|
+
b = O(b);
|
|
10560
10562
|
for (var d, e = c.length, f = 0; f < e; f++) {
|
|
10561
10563
|
d = c[f];
|
|
10562
|
-
var g =
|
|
10563
|
-
if (
|
|
10564
|
-
if (b.search(
|
|
10564
|
+
var g = R(a, d);
|
|
10565
|
+
if (p(g, 23)) {
|
|
10566
|
+
if (b.search(q(g, 23)) == 0) {
|
|
10565
10567
|
a = d;
|
|
10566
10568
|
break a;
|
|
10567
10569
|
}
|
|
10568
|
-
} else if (
|
|
10570
|
+
} else if (cb(b, g) != -1) {
|
|
10569
10571
|
a = d;
|
|
10570
10572
|
break a;
|
|
10571
10573
|
}
|
|
@@ -10574,93 +10576,93 @@ var _factory = (() => {
|
|
|
10574
10576
|
}
|
|
10575
10577
|
return a;
|
|
10576
10578
|
}
|
|
10577
|
-
function
|
|
10578
|
-
a =
|
|
10579
|
+
function Q(a) {
|
|
10580
|
+
a = H[a];
|
|
10579
10581
|
return a == null ? "ZZ" : a[0];
|
|
10580
10582
|
}
|
|
10581
|
-
function
|
|
10582
|
-
a =
|
|
10583
|
+
function eb(a, b) {
|
|
10584
|
+
a = R(a, b);
|
|
10583
10585
|
if (a == null) throw Error("Invalid region code: " + b);
|
|
10584
|
-
return
|
|
10586
|
+
return u(a, 10);
|
|
10585
10587
|
}
|
|
10586
|
-
function
|
|
10587
|
-
var e =
|
|
10588
|
-
e =
|
|
10589
|
-
if (d == 2) if (
|
|
10590
|
-
else return
|
|
10588
|
+
function U(a, b, c, d) {
|
|
10589
|
+
var e = S(c, d), f = v(e, 9) == 0 ? E(q(c, 1)) : E(e);
|
|
10590
|
+
e = t(e, 10) || [];
|
|
10591
|
+
if (d == 2) if (Ya(S(c, 0))) a = S(c, 1), Ya(a) && (f = f.concat(v(a, 9) == 0 ? E(q(c, 1)) : E(a)), f.sort(), e.length == 0 ? e = t(a, 10) || [] : (e = e.concat(t(a, 10) || []), e.sort()));
|
|
10592
|
+
else return U(a, b, c, 1);
|
|
10591
10593
|
if (f[0] == -1) return 5;
|
|
10592
10594
|
b = b.length;
|
|
10593
10595
|
if (e.indexOf(b) > -1) return 4;
|
|
10594
10596
|
c = f[0];
|
|
10595
10597
|
return c == b ? 0 : c > b ? 2 : f[f.length - 1] < b ? 3 : f.indexOf(b, 1) > -1 ? 0 : 5;
|
|
10596
10598
|
}
|
|
10597
|
-
function
|
|
10598
|
-
var d =
|
|
10599
|
-
b =
|
|
10600
|
-
if (!(b in
|
|
10601
|
-
b =
|
|
10602
|
-
return
|
|
10599
|
+
function V(a, b, c) {
|
|
10600
|
+
var d = O(b);
|
|
10601
|
+
b = u(b, 1);
|
|
10602
|
+
if (!(b in H)) return 1;
|
|
10603
|
+
b = P(a, b, Q(b));
|
|
10604
|
+
return U(a, d, b, c);
|
|
10603
10605
|
}
|
|
10604
|
-
function
|
|
10606
|
+
function fb(a, b) {
|
|
10605
10607
|
a = a.toString();
|
|
10606
10608
|
if (a.length == 0 || a.charAt(0) == "0") return 0;
|
|
10607
|
-
for (var c, d = a.length, e = 1; e <= 3 && e <= d; ++e) if (c = parseInt(a.substring(0, e), 10), c in
|
|
10609
|
+
for (var c, d = a.length, e = 1; e <= 3 && e <= d; ++e) if (c = parseInt(a.substring(0, e), 10), c in H) return b.g(a.substring(e)), c;
|
|
10608
10610
|
return 0;
|
|
10609
10611
|
}
|
|
10610
|
-
function
|
|
10612
|
+
function gb(a, b, c, d, e, f) {
|
|
10611
10613
|
if (b.length == 0) return 0;
|
|
10612
|
-
b = new
|
|
10614
|
+
b = new A(b);
|
|
10613
10615
|
var g;
|
|
10614
|
-
c != null && (g =
|
|
10616
|
+
c != null && (g = q(c, 11));
|
|
10615
10617
|
g == null && (g = "NonMatch");
|
|
10616
10618
|
var h = b.toString();
|
|
10617
10619
|
if (h.length == 0) g = 20;
|
|
10618
|
-
else if (
|
|
10620
|
+
else if (J.test(h)) h = h.replace(J, ""), B(b), b.g(Wa(h)), g = 1;
|
|
10619
10621
|
else {
|
|
10620
10622
|
h = new RegExp(g);
|
|
10621
|
-
|
|
10623
|
+
Xa(b);
|
|
10622
10624
|
g = b.toString();
|
|
10623
10625
|
if (g.search(h) == 0) {
|
|
10624
10626
|
h = g.match(h)[0].length;
|
|
10625
|
-
var l = g.substring(h).match(
|
|
10626
|
-
l && l[1] != null && l[1].length > 0 &&
|
|
10627
|
+
var l = g.substring(h).match(Ja);
|
|
10628
|
+
l && l[1] != null && l[1].length > 0 && M(l[1], Fa) == "0" ? g = false : (B(b), b.g(g.substring(h)), g = true);
|
|
10627
10629
|
} else g = false;
|
|
10628
10630
|
g = g ? 5 : 20;
|
|
10629
10631
|
}
|
|
10630
|
-
e &&
|
|
10632
|
+
e && r(f, 6, g);
|
|
10631
10633
|
if (g != 20) {
|
|
10632
10634
|
if (b.h.length <= 2) throw Error("Phone number too short after IDD");
|
|
10633
|
-
a =
|
|
10634
|
-
if (a != 0) return
|
|
10635
|
+
a = fb(b, d);
|
|
10636
|
+
if (a != 0) return r(f, 1, a), a;
|
|
10635
10637
|
throw Error("Invalid country calling code");
|
|
10636
10638
|
}
|
|
10637
|
-
if (c != null && (g =
|
|
10638
|
-
|
|
10639
|
+
if (c != null && (g = u(c, 10), h = "" + g, l = b.toString(), l.lastIndexOf(h, 0) == 0 && (h = new A(l.substring(h.length)), l = q(c, 1), l = new RegExp(u(l, 2)), hb(h, c, null), h = h.toString(), !L(l, b.toString()) && L(l, h) || U(a, b.toString(), c, -1) == 3))) return d.g(h), e && r(f, 6, 10), r(f, 1, g), g;
|
|
10640
|
+
r(f, 1, 0);
|
|
10639
10641
|
return 0;
|
|
10640
10642
|
}
|
|
10641
|
-
function
|
|
10642
|
-
var d = a.toString(), e = d.length, f =
|
|
10643
|
+
function hb(a, b, c) {
|
|
10644
|
+
var d = a.toString(), e = d.length, f = q(b, 15);
|
|
10643
10645
|
if (e != 0 && f != null && f.length != 0 && (f = new RegExp("^(?:" + f + ")"), e = f.exec(d))) {
|
|
10644
10646
|
var g = RegExp;
|
|
10645
|
-
var h =
|
|
10646
|
-
h =
|
|
10647
|
+
var h = q(b, 1);
|
|
10648
|
+
h = u(h, 2);
|
|
10647
10649
|
g = new g(h);
|
|
10648
|
-
h =
|
|
10650
|
+
h = L(g, d);
|
|
10649
10651
|
var l = e.length - 1;
|
|
10650
|
-
b =
|
|
10652
|
+
b = q(b, 16);
|
|
10651
10653
|
if (b == null || b.length == 0 || e[l] == null || e[l].length == 0) {
|
|
10652
|
-
if (!h ||
|
|
10653
|
-
} else if (d = d.replace(f, b), !h ||
|
|
10654
|
+
if (!h || L(g, d.substring(e[0].length))) c != null && l > 0 && e[l] != null && c.g(e[1]), a.set(d.substring(e[0].length));
|
|
10655
|
+
} else if (d = d.replace(f, b), !h || L(g, d)) c != null && l > 0 && c.g(e[1]), a.set(d);
|
|
10654
10656
|
}
|
|
10655
10657
|
}
|
|
10656
|
-
function
|
|
10657
|
-
if (!
|
|
10658
|
-
return
|
|
10658
|
+
function W(a, b, c) {
|
|
10659
|
+
if (!N(c) && b.length > 0 && b.charAt(0) != "+") throw Error("Invalid country calling code");
|
|
10660
|
+
return ib(a, b, c, true);
|
|
10659
10661
|
}
|
|
10660
|
-
function
|
|
10662
|
+
function ib(a, b, c, d) {
|
|
10661
10663
|
if (b == null) throw Error("The string supplied did not seem to be a phone number");
|
|
10662
10664
|
if (b.length > 250) throw Error("The string supplied is too long to be a phone number");
|
|
10663
|
-
var e = new
|
|
10665
|
+
var e = new A();
|
|
10664
10666
|
var f = b.indexOf(";phone-context=");
|
|
10665
10667
|
if (f === -1) f = null;
|
|
10666
10668
|
else if (f += 15, f >= b.length) f = "";
|
|
@@ -10669,126 +10671,126 @@ var _factory = (() => {
|
|
|
10669
10671
|
f = g !== -1 ? b.substring(f, g) : b.substring(f);
|
|
10670
10672
|
}
|
|
10671
10673
|
var h = f;
|
|
10672
|
-
h == null ? g = true : h.length === 0 ? g = false : (g =
|
|
10674
|
+
h == null ? g = true : h.length === 0 ? g = false : (g = Oa.exec(h), h = Pa.exec(h), g = g !== null || h !== null);
|
|
10673
10675
|
if (!g) throw Error("The string supplied did not seem to be a phone number");
|
|
10674
|
-
f != null ? (f.charAt(0) === "+" && e.g(f), f = b.indexOf("tel:"), e.g(b.substring(f >= 0 ? f + 4 : 0, b.indexOf(";phone-context=")))) : (f = e.g, g = b ?? "", h = g.search(
|
|
10676
|
+
f != null ? (f.charAt(0) === "+" && e.g(f), f = b.indexOf("tel:"), e.g(b.substring(f >= 0 ? f + 4 : 0, b.indexOf(";phone-context=")))) : (f = e.g, g = b ?? "", h = g.search(Ka), h >= 0 ? (g = g.substring(h), g = g.replace(Ma, ""), h = g.search(La), h >= 0 && (g = g.substring(0, h))) : g = "", f.call(e, g));
|
|
10675
10677
|
f = e.toString();
|
|
10676
10678
|
g = f.indexOf(";isub=");
|
|
10677
|
-
g > 0 && (
|
|
10678
|
-
if (!
|
|
10679
|
+
g > 0 && (B(e), e.g(f.substring(0, g)));
|
|
10680
|
+
if (!Va(e.toString())) throw Error("The string supplied did not seem to be a phone number");
|
|
10679
10681
|
f = e.toString();
|
|
10680
|
-
if (!(
|
|
10681
|
-
f = new
|
|
10682
|
-
d &&
|
|
10682
|
+
if (!(N(c) || f != null && f.length > 0 && J.test(f))) throw Error("Invalid country calling code");
|
|
10683
|
+
f = new G();
|
|
10684
|
+
d && r(f, 5, b);
|
|
10683
10685
|
a: {
|
|
10684
10686
|
b = e.toString();
|
|
10685
|
-
g = b.search(
|
|
10686
|
-
if (g >= 0 &&
|
|
10687
|
-
h = b.match(
|
|
10688
|
-
for (var l = h.length,
|
|
10689
|
-
|
|
10687
|
+
g = b.search(Ra);
|
|
10688
|
+
if (g >= 0 && Va(b.substring(0, g))) {
|
|
10689
|
+
h = b.match(Ra);
|
|
10690
|
+
for (var l = h.length, y = 1; y < l; ++y) if (h[y] != null && h[y].length > 0) {
|
|
10691
|
+
B(e);
|
|
10690
10692
|
e.g(b.substring(0, g));
|
|
10691
|
-
b = h[
|
|
10693
|
+
b = h[y];
|
|
10692
10694
|
break a;
|
|
10693
10695
|
}
|
|
10694
10696
|
}
|
|
10695
10697
|
b = "";
|
|
10696
10698
|
}
|
|
10697
|
-
b.length > 0 &&
|
|
10698
|
-
g =
|
|
10699
|
-
b = new
|
|
10699
|
+
b.length > 0 && r(f, 3, b);
|
|
10700
|
+
g = R(a, c);
|
|
10701
|
+
b = new A();
|
|
10700
10702
|
h = 0;
|
|
10701
10703
|
l = e.toString();
|
|
10702
10704
|
try {
|
|
10703
|
-
h =
|
|
10704
|
-
} catch (
|
|
10705
|
-
if (
|
|
10706
|
-
if (l = l.replace(
|
|
10707
|
-
} else throw
|
|
10705
|
+
h = gb(a, l, g, b, d, f);
|
|
10706
|
+
} catch (Y) {
|
|
10707
|
+
if (Y.message == "Invalid country calling code" && J.test(l)) {
|
|
10708
|
+
if (l = l.replace(J, ""), h = gb(a, l, g, b, d, f), h == 0) throw Y;
|
|
10709
|
+
} else throw Y;
|
|
10708
10710
|
}
|
|
10709
|
-
h != 0 ? (e =
|
|
10711
|
+
h != 0 ? (e = Q(h), e != c && (g = P(a, h, e))) : (Xa(e), b.g(e.toString()), c != null ? (h = u(g, 10), r(
|
|
10710
10712
|
f,
|
|
10711
10713
|
1,
|
|
10712
10714
|
h
|
|
10713
10715
|
)) : d && (delete f.h[6], f.g && delete f.g[6]));
|
|
10714
10716
|
if (b.h.length < 2) throw Error("The string supplied is too short to be a phone number");
|
|
10715
|
-
g != null && (c = new
|
|
10717
|
+
g != null && (c = new A(), e = new A(b.toString()), hb(e, g, c), a = U(a, e.toString(), g, -1), a != 2 && a != 4 && a != 5 && (b = e, d && c.toString().length > 0 && r(f, 7, c.toString())));
|
|
10716
10718
|
d = b.toString();
|
|
10717
10719
|
a = d.length;
|
|
10718
10720
|
if (a < 2) throw Error("The string supplied is too short to be a phone number");
|
|
10719
10721
|
if (a > 17) throw Error("The string supplied is too long to be a phone number");
|
|
10720
10722
|
if (d.length > 1 && d.charAt(0) == "0") {
|
|
10721
|
-
|
|
10723
|
+
r(f, 4, true);
|
|
10722
10724
|
for (a = 1; a < d.length - 1 && d.charAt(a) == "0"; ) a++;
|
|
10723
|
-
a != 1 &&
|
|
10725
|
+
a != 1 && r(f, 8, a);
|
|
10724
10726
|
}
|
|
10725
|
-
|
|
10727
|
+
r(f, 2, parseInt(d, 10));
|
|
10726
10728
|
return f;
|
|
10727
10729
|
}
|
|
10728
|
-
function
|
|
10730
|
+
function L(a, b) {
|
|
10729
10731
|
return (a = b.match(new RegExp("^(?:" + (typeof a == "string" ? a : a.source) + ")$", "i"))) && a[0].length == b.length ? true : false;
|
|
10730
10732
|
}
|
|
10731
10733
|
;
|
|
10732
|
-
function
|
|
10734
|
+
function jb(a) {
|
|
10733
10735
|
this.ga = RegExp("\u2008");
|
|
10734
10736
|
this.ka = "";
|
|
10735
|
-
this.$ = new
|
|
10737
|
+
this.$ = new A();
|
|
10736
10738
|
this.ea = "";
|
|
10737
|
-
this.u = new
|
|
10738
|
-
this.da = new
|
|
10739
|
+
this.u = new A();
|
|
10740
|
+
this.da = new A();
|
|
10739
10741
|
this.v = true;
|
|
10740
10742
|
this.fa = this.aa = this.ma = false;
|
|
10741
|
-
this.ha =
|
|
10743
|
+
this.ha = I.g();
|
|
10742
10744
|
this.ba = 0;
|
|
10743
|
-
this.h = new
|
|
10745
|
+
this.h = new A();
|
|
10744
10746
|
this.ia = false;
|
|
10745
10747
|
this.o = "";
|
|
10746
|
-
this.g = new
|
|
10748
|
+
this.g = new A();
|
|
10747
10749
|
this.j = [];
|
|
10748
10750
|
this.la = a;
|
|
10749
|
-
this.l =
|
|
10751
|
+
this.l = kb(this, this.la);
|
|
10750
10752
|
}
|
|
10751
|
-
var
|
|
10752
|
-
|
|
10753
|
-
var
|
|
10754
|
-
function
|
|
10753
|
+
var lb = new F();
|
|
10754
|
+
r(lb, 11, "NA");
|
|
10755
|
+
var mb = RegExp("^[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*\\$1[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*(\\$\\d[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]*)*$"), nb = /[- ]/;
|
|
10756
|
+
function kb(a, b) {
|
|
10755
10757
|
var c = a.ha;
|
|
10756
|
-
b =
|
|
10757
|
-
a =
|
|
10758
|
-
return a != null ? a :
|
|
10758
|
+
b = N(b) ? eb(c, b) : 0;
|
|
10759
|
+
a = R(a.ha, Q(b));
|
|
10760
|
+
return a != null ? a : lb;
|
|
10759
10761
|
}
|
|
10760
|
-
function
|
|
10762
|
+
function ob(a) {
|
|
10761
10763
|
for (var b = a.j.length, c = 0; c < b; ++c) {
|
|
10762
|
-
var d = a.j[c], e =
|
|
10764
|
+
var d = a.j[c], e = u(d, 1);
|
|
10763
10765
|
if (a.ea == e) return false;
|
|
10764
10766
|
var f = a;
|
|
10765
|
-
var g = d, h =
|
|
10766
|
-
|
|
10767
|
+
var g = d, h = u(g, 1);
|
|
10768
|
+
B(f.$);
|
|
10767
10769
|
var l = f;
|
|
10768
|
-
g =
|
|
10769
|
-
var
|
|
10770
|
-
|
|
10770
|
+
g = u(g, 2);
|
|
10771
|
+
var y = "999999999999999".match(h)[0];
|
|
10772
|
+
y.length < l.g.h.length ? l = "" : (l = y.replace(new RegExp(h, "g"), g), l = l.replace(RegExp("9", "g"), "\u2008"));
|
|
10771
10773
|
l.length > 0 ? (f.$.g(l), f = true) : f = false;
|
|
10772
|
-
if (f) return a.ea = e, a.ia =
|
|
10774
|
+
if (f) return a.ea = e, a.ia = nb.test(q(d, 4)), a.ba = 0, true;
|
|
10773
10775
|
}
|
|
10774
10776
|
return a.v = false;
|
|
10775
10777
|
}
|
|
10776
|
-
function
|
|
10778
|
+
function pb(a, b) {
|
|
10777
10779
|
for (var c = [], d = b.length - 3, e = a.j.length, f = 0; f < e; ++f) {
|
|
10778
10780
|
var g = a.j[f];
|
|
10779
|
-
|
|
10781
|
+
v(g, 3) == 0 ? c.push(a.j[f]) : (g = q(g, 3, Math.min(d, v(g, 3) - 1)), b.search(g) == 0 && c.push(a.j[f]));
|
|
10780
10782
|
}
|
|
10781
10783
|
a.j = c;
|
|
10782
10784
|
}
|
|
10783
|
-
function
|
|
10785
|
+
function qb(a, b) {
|
|
10784
10786
|
a.u.g(b);
|
|
10785
10787
|
var c = b;
|
|
10786
|
-
|
|
10788
|
+
Ja.test(c) || a.u.h.length == 1 && Ia.test(c) ? (b == "+" ? (c = b, a.da.g(b)) : (c = Fa[b], a.da.g(c), a.g.g(c)), b = c) : (a.v = false, a.ma = true);
|
|
10787
10789
|
if (!a.v) {
|
|
10788
10790
|
if (!a.ma) {
|
|
10789
|
-
if (
|
|
10790
|
-
if (
|
|
10791
|
-
} else if (a.o.length > 0 && (b = a.g.toString(),
|
|
10791
|
+
if (rb(a)) {
|
|
10792
|
+
if (sb(a)) return tb(a);
|
|
10793
|
+
} else if (a.o.length > 0 && (b = a.g.toString(), B(a.g), a.g.g(a.o), a.g.g(b), b = a.h.toString(), c = b.lastIndexOf(a.o), B(a.h), a.h.g(b.substring(0, c))), a.o != ub(a)) return a.h.g(" "), tb(a);
|
|
10792
10794
|
}
|
|
10793
10795
|
return a.u.toString();
|
|
10794
10796
|
}
|
|
@@ -10798,93 +10800,93 @@ var _factory = (() => {
|
|
|
10798
10800
|
case 2:
|
|
10799
10801
|
return a.u.toString();
|
|
10800
10802
|
case 3:
|
|
10801
|
-
if (
|
|
10802
|
-
else return a.o =
|
|
10803
|
+
if (rb(a)) a.fa = true;
|
|
10804
|
+
else return a.o = ub(a), vb(a);
|
|
10803
10805
|
default:
|
|
10804
|
-
if (a.fa) return
|
|
10806
|
+
if (a.fa) return sb(a) && (a.fa = false), a.h.toString() + a.g.toString();
|
|
10805
10807
|
if (a.j.length > 0) {
|
|
10806
|
-
b =
|
|
10807
|
-
c =
|
|
10808
|
+
b = wb(a, b);
|
|
10809
|
+
c = xb(a);
|
|
10808
10810
|
if (c.length > 0) return c;
|
|
10809
|
-
|
|
10810
|
-
return
|
|
10811
|
+
pb(a, a.g.toString());
|
|
10812
|
+
return ob(a) ? yb(a) : a.v ? X(a, b) : a.u.toString();
|
|
10811
10813
|
}
|
|
10812
|
-
return
|
|
10814
|
+
return vb(a);
|
|
10813
10815
|
}
|
|
10814
10816
|
}
|
|
10815
|
-
function
|
|
10817
|
+
function tb(a) {
|
|
10816
10818
|
a.v = true;
|
|
10817
10819
|
a.fa = false;
|
|
10818
10820
|
a.j = [];
|
|
10819
10821
|
a.ba = 0;
|
|
10820
|
-
|
|
10822
|
+
B(a.$);
|
|
10821
10823
|
a.ea = "";
|
|
10822
|
-
return
|
|
10824
|
+
return vb(a);
|
|
10823
10825
|
}
|
|
10824
|
-
function
|
|
10826
|
+
function xb(a) {
|
|
10825
10827
|
for (var b = a.g.toString(), c = a.j.length, d = 0; d < c; ++d) {
|
|
10826
|
-
var e = a.j[d], f =
|
|
10827
|
-
if (new RegExp("^(?:" + f + ")$").test(b) && (a.ia =
|
|
10828
|
+
var e = a.j[d], f = u(e, 1);
|
|
10829
|
+
if (new RegExp("^(?:" + f + ")$").test(b) && (a.ia = nb.test(q(e, 4)), e = b.replace(new RegExp(f, "g"), q(e, 2)), e = X(a, e), M(e, Ga) == a.da)) return e;
|
|
10828
10830
|
}
|
|
10829
10831
|
return "";
|
|
10830
10832
|
}
|
|
10831
|
-
function
|
|
10833
|
+
function X(a, b) {
|
|
10832
10834
|
var c = a.h.h.length;
|
|
10833
10835
|
return a.ia && c > 0 && a.h.toString().charAt(c - 1) != " " ? a.h + " " + b : a.h + b;
|
|
10834
10836
|
}
|
|
10835
|
-
function
|
|
10837
|
+
function vb(a) {
|
|
10836
10838
|
var b = a.g.toString();
|
|
10837
10839
|
if (b.length >= 3) {
|
|
10838
|
-
for (var c = a.aa && a.o.length == 0 &&
|
|
10840
|
+
for (var c = a.aa && a.o.length == 0 && v(a.l, 20) > 0 ? t(a.l, 20) || [] : t(a.l, 19) || [], d = c.length, e = 0; e < d; ++e) {
|
|
10839
10841
|
var f = c[e];
|
|
10840
|
-
a.o.length > 0 &&
|
|
10842
|
+
a.o.length > 0 && Za(u(f, 4)) && !q(f, 6) && !p(f, 5) || (a.o.length != 0 || a.aa || Za(u(f, 4)) || q(f, 6)) && mb.test(u(f, 2)) && a.j.push(f);
|
|
10841
10843
|
}
|
|
10842
|
-
|
|
10843
|
-
b =
|
|
10844
|
-
return b.length > 0 ? b :
|
|
10844
|
+
pb(a, b);
|
|
10845
|
+
b = xb(a);
|
|
10846
|
+
return b.length > 0 ? b : ob(a) ? yb(a) : a.u.toString();
|
|
10845
10847
|
}
|
|
10846
|
-
return
|
|
10848
|
+
return X(a, b);
|
|
10847
10849
|
}
|
|
10848
|
-
function
|
|
10850
|
+
function yb(a) {
|
|
10849
10851
|
var b = a.g.toString(), c = b.length;
|
|
10850
10852
|
if (c > 0) {
|
|
10851
|
-
for (var d = "", e = 0; e < c; e++) d =
|
|
10852
|
-
return a.v ?
|
|
10853
|
+
for (var d = "", e = 0; e < c; e++) d = wb(a, b.charAt(e));
|
|
10854
|
+
return a.v ? X(a, d) : a.u.toString();
|
|
10853
10855
|
}
|
|
10854
10856
|
return a.h.toString();
|
|
10855
10857
|
}
|
|
10856
|
-
function
|
|
10858
|
+
function ub(a) {
|
|
10857
10859
|
var b = a.g.toString(), c = 0;
|
|
10858
|
-
if (
|
|
10860
|
+
if (q(a.l, 10) != 1) var d = false;
|
|
10859
10861
|
else d = a.g.toString(), d = d.charAt(0) == "1" && d.charAt(1) != "0" && d.charAt(1) != "1";
|
|
10860
|
-
d ? (c = 1, a.h.g("1").g(" "), a.aa = true) :
|
|
10861
|
-
|
|
10862
|
+
d ? (c = 1, a.h.g("1").g(" "), a.aa = true) : p(a.l, 15) && (d = new RegExp("^(?:" + q(a.l, 15) + ")"), d = b.match(d), d != null && d[0] != null && d[0].length > 0 && (a.aa = true, c = d[0].length, a.h.g(b.substring(0, c))));
|
|
10863
|
+
B(a.g);
|
|
10862
10864
|
a.g.g(b.substring(c));
|
|
10863
10865
|
return b.substring(0, c);
|
|
10864
10866
|
}
|
|
10865
|
-
function
|
|
10866
|
-
var b = a.da.toString(), c = new RegExp("^(?:\\+|" +
|
|
10867
|
+
function rb(a) {
|
|
10868
|
+
var b = a.da.toString(), c = new RegExp("^(?:\\+|" + q(a.l, 11) + ")");
|
|
10867
10869
|
c = b.match(c);
|
|
10868
|
-
return c != null && c[0] != null && c[0].length > 0 ? (a.aa = true, c = c[0].length,
|
|
10870
|
+
return c != null && c[0] != null && c[0].length > 0 ? (a.aa = true, c = c[0].length, B(a.g), a.g.g(b.substring(c)), B(a.h), a.h.g(b.substring(0, c)), b.charAt(0) != "+" && a.h.g(" "), true) : false;
|
|
10869
10871
|
}
|
|
10870
|
-
function
|
|
10872
|
+
function sb(a) {
|
|
10871
10873
|
if (a.g.h.length == 0) return false;
|
|
10872
|
-
var b = new
|
|
10874
|
+
var b = new A(), c = fb(a.g, b);
|
|
10873
10875
|
if (c == 0) return false;
|
|
10874
|
-
|
|
10876
|
+
B(a.g);
|
|
10875
10877
|
a.g.g(b.toString());
|
|
10876
|
-
b =
|
|
10877
|
-
"001" == b ? a.l =
|
|
10878
|
+
b = Q(c);
|
|
10879
|
+
"001" == b ? a.l = R(a.ha, "" + c) : b != a.la && (a.l = kb(a, b));
|
|
10878
10880
|
a.h.g("" + c).g(" ");
|
|
10879
10881
|
a.o = "";
|
|
10880
10882
|
return true;
|
|
10881
10883
|
}
|
|
10882
|
-
function
|
|
10884
|
+
function wb(a, b) {
|
|
10883
10885
|
var c = a.$.toString();
|
|
10884
10886
|
if (c.substring(a.ba).search(a.ga) >= 0) {
|
|
10885
10887
|
var d = c.search(a.ga);
|
|
10886
10888
|
b = c.replace(a.ga, b);
|
|
10887
|
-
|
|
10889
|
+
B(a.$);
|
|
10888
10890
|
a.$.g(b);
|
|
10889
10891
|
a.ba = d;
|
|
10890
10892
|
return b.substring(0, a.ba + 1);
|
|
@@ -10894,119 +10896,137 @@ var _factory = (() => {
|
|
|
10894
10896
|
return a.u.toString();
|
|
10895
10897
|
}
|
|
10896
10898
|
;
|
|
10897
|
-
const
|
|
10899
|
+
const zb = {};
|
|
10900
|
+
["E164", "INTERNATIONAL", "NATIONAL", "RFC3966"].forEach((a, b) => {
|
|
10901
|
+
zb[a] = b;
|
|
10902
|
+
});
|
|
10903
|
+
const Z = {};
|
|
10904
|
+
"FIXED_LINE MOBILE FIXED_LINE_OR_MOBILE TOLL_FREE PREMIUM_RATE SHARED_COST VOIP PERSONAL_NUMBER PAGER UAN VOICEMAIL UNKNOWN".split(" ").forEach((a, b) => {
|
|
10905
|
+
Z[a] = b;
|
|
10906
|
+
});
|
|
10907
|
+
Z.UNKNOWN = -1;
|
|
10908
|
+
const Ab = {};
|
|
10909
|
+
"IS_POSSIBLE INVALID_COUNTRY_CODE TOO_SHORT TOO_LONG IS_POSSIBLE_LOCAL_ONLY INVALID_LENGTH".split(" ").forEach((a, b) => {
|
|
10910
|
+
Ab[a] = b;
|
|
10911
|
+
});
|
|
10912
|
+
const Bb = {};
|
|
10913
|
+
Object.keys(Z).forEach((a) => {
|
|
10914
|
+
Bb[Z[a]] = a;
|
|
10915
|
+
});
|
|
10916
|
+
const Cb = {};
|
|
10917
|
+
Object.keys(Ab).forEach((a) => {
|
|
10918
|
+
Cb[Ab[a]] = a;
|
|
10919
|
+
});
|
|
10920
|
+
const Db = (a) => {
|
|
10898
10921
|
const b = [];
|
|
10899
10922
|
a.includes("FIXED_LINE_OR_MOBILE") ? (a.includes("MOBILE") || b.push("MOBILE"), a.includes("FIXED_LINE") || b.push("FIXED_LINE")) : (a.includes("MOBILE") || a.includes("FIXED_LINE")) && b.push("FIXED_LINE_OR_MOBILE");
|
|
10900
10923
|
return a.concat(b);
|
|
10901
|
-
}
|
|
10902
|
-
|
|
10903
|
-
|
|
10924
|
+
};
|
|
10925
|
+
k("utils", {});
|
|
10926
|
+
k("utils.formatNumberAsYouType", (a, b) => {
|
|
10904
10927
|
try {
|
|
10905
|
-
const c = a.replace(/[^+0-9]/g, ""), d = new
|
|
10928
|
+
const c = a.replace(/[^+0-9]/g, ""), d = new jb(b);
|
|
10906
10929
|
b = "";
|
|
10907
|
-
for (let e = 0; e < c.length; e++) d.ka =
|
|
10930
|
+
for (let e = 0; e < c.length; e++) d.ka = qb(d, c.charAt(e)), b = d.ka;
|
|
10908
10931
|
return b;
|
|
10909
10932
|
} catch {
|
|
10910
10933
|
return a;
|
|
10911
10934
|
}
|
|
10912
10935
|
});
|
|
10913
|
-
|
|
10936
|
+
k("utils.formatNumber", (a, b, c) => {
|
|
10914
10937
|
try {
|
|
10915
|
-
const e =
|
|
10916
|
-
var d =
|
|
10917
|
-
return d == 0 || d == 4 ? e.format(f, typeof c === "undefined" ? 0 : c) : a;
|
|
10938
|
+
const e = I.g(), f = W(e, a, b);
|
|
10939
|
+
var d = V(e, f, -1);
|
|
10940
|
+
return d == 0 || d == 4 ? e.format(f, typeof c === "undefined" ? 0 : zb[c]) : a;
|
|
10918
10941
|
} catch {
|
|
10919
10942
|
return a;
|
|
10920
10943
|
}
|
|
10921
10944
|
});
|
|
10922
|
-
|
|
10945
|
+
k("utils.getExampleNumber", (a, b, c, d) => {
|
|
10923
10946
|
try {
|
|
10924
|
-
const
|
|
10947
|
+
const y = I.g();
|
|
10925
10948
|
a: {
|
|
10926
|
-
var e =
|
|
10927
|
-
if (
|
|
10928
|
-
var
|
|
10949
|
+
var e = y, f = Z[c];
|
|
10950
|
+
if (N(a)) {
|
|
10951
|
+
var g = S(R(e, a), f);
|
|
10929
10952
|
try {
|
|
10930
|
-
if (
|
|
10931
|
-
var
|
|
10932
|
-
var
|
|
10953
|
+
if (p(g, 6)) {
|
|
10954
|
+
var h = q(g, 6);
|
|
10955
|
+
var l = ib(e, h, a, false);
|
|
10933
10956
|
break a;
|
|
10934
10957
|
}
|
|
10935
|
-
} catch (
|
|
10958
|
+
} catch (Y) {
|
|
10936
10959
|
}
|
|
10937
10960
|
}
|
|
10938
|
-
|
|
10961
|
+
l = null;
|
|
10939
10962
|
}
|
|
10940
|
-
return
|
|
10963
|
+
return y.format(l, d ? 0 : b ? 2 : 1);
|
|
10941
10964
|
} catch {
|
|
10942
10965
|
return "";
|
|
10943
10966
|
}
|
|
10944
10967
|
});
|
|
10945
|
-
|
|
10968
|
+
k("utils.getExtension", (a, b) => {
|
|
10946
10969
|
try {
|
|
10947
|
-
var c =
|
|
10948
|
-
return
|
|
10970
|
+
var c = W(I.g(), a, b);
|
|
10971
|
+
return q(c, 3);
|
|
10949
10972
|
} catch {
|
|
10950
10973
|
return "";
|
|
10951
10974
|
}
|
|
10952
10975
|
});
|
|
10953
|
-
|
|
10976
|
+
k("utils.getNumberType", (a, b) => {
|
|
10954
10977
|
try {
|
|
10955
|
-
const c =
|
|
10956
|
-
return
|
|
10978
|
+
const c = I.g(), d = W(c, a, b), e = ab(c, d);
|
|
10979
|
+
return Bb[e] || null;
|
|
10957
10980
|
} catch {
|
|
10958
|
-
return
|
|
10981
|
+
return null;
|
|
10959
10982
|
}
|
|
10960
10983
|
});
|
|
10961
|
-
|
|
10962
|
-
if (!b) return
|
|
10984
|
+
k("utils.getValidationError", (a, b) => {
|
|
10985
|
+
if (!b) return "INVALID_COUNTRY_CODE";
|
|
10963
10986
|
try {
|
|
10964
|
-
const c =
|
|
10965
|
-
return
|
|
10987
|
+
const c = I.g(), d = W(c, a, b), e = V(c, d, -1);
|
|
10988
|
+
return Cb[e] || null;
|
|
10966
10989
|
} catch (c) {
|
|
10967
|
-
return c.message === "Invalid country calling code" ?
|
|
10990
|
+
return c.message === "Invalid country calling code" ? "INVALID_COUNTRY_CODE" : a.length <= 3 || c.message === "Phone number too short after IDD" || c.message === "The string supplied is too short to be a phone number" ? "TOO_SHORT" : c.message === "The string supplied is too long to be a phone number" ? "TOO_LONG" : null;
|
|
10968
10991
|
}
|
|
10969
10992
|
});
|
|
10970
|
-
|
|
10993
|
+
k("utils.isValidNumber", (a, b, c) => {
|
|
10971
10994
|
try {
|
|
10972
|
-
const d =
|
|
10995
|
+
const d = I.g(), e = W(d, a, b), f = db(d, e);
|
|
10973
10996
|
if (c) {
|
|
10974
|
-
const g =
|
|
10975
|
-
return f && g.includes(
|
|
10997
|
+
const g = Db(c).map((h) => Z[h]);
|
|
10998
|
+
return f && g.includes(ab(d, e));
|
|
10976
10999
|
}
|
|
10977
11000
|
return f;
|
|
10978
11001
|
} catch {
|
|
10979
11002
|
return false;
|
|
10980
11003
|
}
|
|
10981
11004
|
});
|
|
10982
|
-
|
|
11005
|
+
k("utils.isPossibleNumber", (a, b, c) => {
|
|
10983
11006
|
try {
|
|
10984
|
-
const d =
|
|
11007
|
+
const d = I.g(), e = W(d, a, b);
|
|
10985
11008
|
if (c) {
|
|
10986
|
-
const f =
|
|
10987
|
-
for (let g of f) if (
|
|
11009
|
+
const f = Db(c);
|
|
11010
|
+
for (let g of f) if (V(d, e, Z[g]) === 0) return true;
|
|
10988
11011
|
return false;
|
|
10989
11012
|
}
|
|
10990
|
-
return
|
|
11013
|
+
return V(d, e, -1) === 0;
|
|
10991
11014
|
} catch {
|
|
10992
11015
|
return false;
|
|
10993
11016
|
}
|
|
10994
11017
|
});
|
|
10995
|
-
|
|
11018
|
+
k("utils.getCoreNumber", (a, b) => {
|
|
10996
11019
|
try {
|
|
10997
|
-
var c =
|
|
10998
|
-
return
|
|
11020
|
+
var c = W(I.g(), a, b);
|
|
11021
|
+
return q(c, 2).toString();
|
|
10999
11022
|
} catch {
|
|
11000
11023
|
return "";
|
|
11001
11024
|
}
|
|
11002
11025
|
});
|
|
11003
|
-
m("utils.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 });
|
|
11004
|
-
m("utils.numberType", zb);
|
|
11005
|
-
m("utils.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
|
|
11006
11026
|
}).call(_scope);
|
|
11007
11027
|
var utils_default = _scope.utils;
|
|
11008
11028
|
|
|
11009
|
-
// src/js/intlTelInputWithUtils.ts
|
|
11029
|
+
// packages/core/src/js/intlTelInputWithUtils.ts
|
|
11010
11030
|
intlTelInput_default.utils = utils_default;
|
|
11011
11031
|
var intlTelInputWithUtils_default = intlTelInput_default;
|
|
11012
11032
|
return __toCommonJS(intlTelInputWithUtils_exports);
|