@wodira/browser 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/dist/ui/components.d.ts +4 -0
- package/dist/ui/components.d.ts.map +1 -1
- package/dist/ui/i18n.d.ts +1 -1
- package/dist/ui/i18n.d.ts.map +1 -1
- package/dist/ui/{index-4eecjr6y.js → index-gt62v5t2.js} +12 -0
- package/dist/ui/index.js +2527 -167
- package/dist/ui/shirt-sponsors/cdn.js +12 -0
- package/dist/ui/shirt-sponsors/index.js +2 -2
- package/dist/ui/styles.d.ts.map +1 -1
- package/dist/ui/validators.d.ts +3 -0
- package/dist/ui/validators.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/ui/index.js
CHANGED
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
waiverDocumentStyles,
|
|
15
15
|
WodiraShirtAuction2,
|
|
16
16
|
defineWodiraShirtElements2
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-gt62v5t2.js";
|
|
18
18
|
import {
|
|
19
19
|
WodiraRoute3d2,
|
|
20
20
|
defineWodiraRouteElements2
|
|
21
21
|
} from "./index-3qe91gk8.js";
|
|
22
|
-
__chunks(import.meta.url,["
|
|
22
|
+
__chunks(import.meta.url,["b4ydbatd","kemkgn03","1zshfsk6","gt62v5t2","3qe91gk8","jyks1h8f","rn3jgtqn","xdhg885t"],[["./index.js",2,3,4],["./waiver-document-kemkgn03.js"],["./index-1zshfsk6.js"],["./index-gt62v5t2.js",2],["./index-3qe91gk8.js",2],["./shirt-3d-renderer-jyks1h8f.js",7],["./map-view-rn3jgtqn.js",4],["./index-xdhg885t.js"]],0);
|
|
23
23
|
|
|
24
24
|
// ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/iso.js
|
|
25
25
|
var exports_iso = {};
|
|
@@ -75,7 +75,7 @@ var es = {
|
|
|
75
75
|
athlete: "Atleta",
|
|
76
76
|
birthDate: "Fecha de nacimiento",
|
|
77
77
|
buyerEmail: "Email comprador",
|
|
78
|
-
buyerName: "Nombre comprador",
|
|
78
|
+
buyerName: "Nombre y apellidos comprador",
|
|
79
79
|
captain: "Capitán",
|
|
80
80
|
quantity: "Cantidad",
|
|
81
81
|
perUnit: "Precio por unidad.",
|
|
@@ -114,6 +114,9 @@ var es = {
|
|
|
114
114
|
genderCompositionTitle: "Composición del equipo",
|
|
115
115
|
invalidDate: "Fecha inválida",
|
|
116
116
|
invalidEmail: "Email inválido",
|
|
117
|
+
invalidPhone: "Introduce un teléfono válido para el país seleccionado, por ejemplo, 612 345 678 para España.",
|
|
118
|
+
phoneCountry: "País y prefijo",
|
|
119
|
+
registrationValidationFailed: "Revisa los datos indicados en el formulario.",
|
|
117
120
|
invalidNumber: "Número inválido",
|
|
118
121
|
invalidSelection: "Selecciona una opción válida",
|
|
119
122
|
invalidUrl: "URL inválida",
|
|
@@ -210,7 +213,7 @@ var en = {
|
|
|
210
213
|
athlete: "Athlete",
|
|
211
214
|
birthDate: "Date of birth",
|
|
212
215
|
buyerEmail: "Buyer email",
|
|
213
|
-
buyerName: "Buyer name",
|
|
216
|
+
buyerName: "Buyer’s first and last name",
|
|
214
217
|
captain: "Captain",
|
|
215
218
|
quantity: "Quantity",
|
|
216
219
|
perUnit: "Price per unit.",
|
|
@@ -249,6 +252,9 @@ var en = {
|
|
|
249
252
|
genderCompositionTitle: "Team composition",
|
|
250
253
|
invalidDate: "Invalid date",
|
|
251
254
|
invalidEmail: "Invalid email",
|
|
255
|
+
invalidPhone: "Enter a valid phone number for the selected country, or enter the full international number.",
|
|
256
|
+
phoneCountry: "Phone country and dialling code",
|
|
257
|
+
registrationValidationFailed: "Please check the fields marked in the form.",
|
|
252
258
|
invalidNumber: "Invalid number",
|
|
253
259
|
invalidSelection: "Select a valid option",
|
|
254
260
|
invalidUrl: "Invalid URL",
|
|
@@ -512,14 +518,6 @@ function suggestEmailCorrection(email) {
|
|
|
512
518
|
return null;
|
|
513
519
|
return `${value.slice(0, value.lastIndexOf("@"))}@${candidates[0]}`;
|
|
514
520
|
}
|
|
515
|
-
// ../../node_modules/.pnpm/@wodira+common@file+packages+common_@wodira+db@file+packages+database_@typescript+types_7099b171df80daee011599dba9f7981d/node_modules/@wodira/common/dist/browser-modules/event-waivers.js
|
|
516
|
-
function applicableEventWaivers(waivers, categoryIds) {
|
|
517
|
-
const selected = new Set(typeof categoryIds === "string" ? [categoryIds] : categoryIds ?? []);
|
|
518
|
-
return waivers.filter((waiver) => {
|
|
519
|
-
const linked = waiver.categoryIds ?? waiver.categories?.map(({ id }) => id) ?? [];
|
|
520
|
-
return linked.length === 0 || linked.some((id) => selected.has(id));
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
521
|
// ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/util.js
|
|
524
522
|
function getEnumValues(entries) {
|
|
525
523
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
@@ -6376,7 +6374,14 @@ var OptionalE164PhoneValidator = preprocess((value) => {
|
|
|
6376
6374
|
const normalized = normalizeE164Phone(value);
|
|
6377
6375
|
return normalized === "" ? "" : normalized;
|
|
6378
6376
|
}, E164PhoneValidator.optional().or(literal("")));
|
|
6379
|
-
|
|
6377
|
+
// ../../node_modules/.pnpm/@wodira+common@file+packages+common_@wodira+db@file+packages+database_@typescript+types_7099b171df80daee011599dba9f7981d/node_modules/@wodira/common/dist/browser-modules/event-waivers.js
|
|
6378
|
+
function applicableEventWaivers(waivers, categoryIds) {
|
|
6379
|
+
const selected = new Set(typeof categoryIds === "string" ? [categoryIds] : categoryIds ?? []);
|
|
6380
|
+
return waivers.filter((waiver) => {
|
|
6381
|
+
const linked = waiver.categoryIds ?? waiver.categories?.map(({ id }) => id) ?? [];
|
|
6382
|
+
return linked.length === 0 || linked.some((id) => selected.has(id));
|
|
6383
|
+
});
|
|
6384
|
+
}
|
|
6380
6385
|
// ../../node_modules/.pnpm/@wodira+common@file+packages+common_@wodira+db@file+packages+database_@typescript+types_7099b171df80daee011599dba9f7981d/node_modules/@wodira/common/dist/browser-modules/validators/commons.validators.js
|
|
6381
6386
|
var SortOrderEnum = _enum(["asc", "desc"]).describe("Sort Order Enum schema.");
|
|
6382
6387
|
var GenderEnum = _enum(["MALE", "FEMALE"]).describe("Gender Enum schema.");
|
|
@@ -6983,173 +6988,2421 @@ function hasParticipantConditionalRegistrationSupplement(supplements, fields, ca
|
|
|
6983
6988
|
return !field || field.target === "ATHLETE" && field.responseScope !== "REGISTRATION" && applicableEventWaivers([field], categoryId).length > 0;
|
|
6984
6989
|
});
|
|
6985
6990
|
}
|
|
6986
|
-
//
|
|
6987
|
-
function emitWodiraEvent(target, name, detail) {
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6991
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/metadata.min.json.js
|
|
6992
|
+
var metadata_min_json_default = { version: 4, country_calling_codes: { "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"], "7": ["RU", "KZ"], "20": ["EG"], "27": ["ZA"], "30": ["GR"], "31": ["NL"], "32": ["BE"], "33": ["FR"], "34": ["ES"], "36": ["HU"], "39": ["IT", "VA"], "40": ["RO"], "41": ["CH"], "43": ["AT"], "44": ["GB", "GG", "IM", "JE"], "45": ["DK"], "46": ["SE"], "47": ["NO", "SJ"], "48": ["PL"], "49": ["DE"], "51": ["PE"], "52": ["MX"], "53": ["CU"], "54": ["AR"], "55": ["BR"], "56": ["CL"], "57": ["CO"], "58": ["VE"], "60": ["MY"], "61": ["AU", "CC", "CX"], "62": ["ID"], "63": ["PH"], "64": ["NZ"], "65": ["SG"], "66": ["TH"], "81": ["JP"], "82": ["KR"], "84": ["VN"], "86": ["CN"], "90": ["TR"], "91": ["IN"], "92": ["PK"], "93": ["AF"], "94": ["LK"], "95": ["MM"], "98": ["IR"], "211": ["SS"], "212": ["MA", "EH"], "213": ["DZ"], "216": ["TN"], "218": ["LY"], "220": ["GM"], "221": ["SN"], "222": ["MR"], "223": ["ML"], "224": ["GN"], "225": ["CI"], "226": ["BF"], "227": ["NE"], "228": ["TG"], "229": ["BJ"], "230": ["MU"], "231": ["LR"], "232": ["SL"], "233": ["GH"], "234": ["NG"], "235": ["TD"], "236": ["CF"], "237": ["CM"], "238": ["CV"], "239": ["ST"], "240": ["GQ"], "241": ["GA"], "242": ["CG"], "243": ["CD"], "244": ["AO"], "245": ["GW"], "246": ["IO"], "247": ["AC"], "248": ["SC"], "249": ["SD"], "250": ["RW"], "251": ["ET"], "252": ["SO"], "253": ["DJ"], "254": ["KE"], "255": ["TZ"], "256": ["UG"], "257": ["BI"], "258": ["MZ"], "260": ["ZM"], "261": ["MG"], "262": ["RE", "YT"], "263": ["ZW"], "264": ["NA"], "265": ["MW"], "266": ["LS"], "267": ["BW"], "268": ["SZ"], "269": ["KM"], "290": ["SH", "TA"], "291": ["ER"], "297": ["AW"], "298": ["FO"], "299": ["GL"], "350": ["GI"], "351": ["PT"], "352": ["LU"], "353": ["IE"], "354": ["IS"], "355": ["AL"], "356": ["MT"], "357": ["CY"], "358": ["FI", "AX"], "359": ["BG"], "370": ["LT"], "371": ["LV"], "372": ["EE"], "373": ["MD"], "374": ["AM"], "375": ["BY"], "376": ["AD"], "377": ["MC"], "378": ["SM"], "380": ["UA"], "381": ["RS"], "382": ["ME"], "383": ["XK"], "385": ["HR"], "386": ["SI"], "387": ["BA"], "389": ["MK"], "420": ["CZ"], "421": ["SK"], "423": ["LI"], "500": ["FK"], "501": ["BZ"], "502": ["GT"], "503": ["SV"], "504": ["HN"], "505": ["NI"], "506": ["CR"], "507": ["PA"], "508": ["PM"], "509": ["HT"], "590": ["GP", "BL", "MF"], "591": ["BO"], "592": ["GY"], "593": ["EC"], "594": ["GF"], "595": ["PY"], "596": ["MQ"], "597": ["SR"], "598": ["UY"], "599": ["CW", "BQ"], "670": ["TL"], "672": ["NF"], "673": ["BN"], "674": ["NR"], "675": ["PG"], "676": ["TO"], "677": ["SB"], "678": ["VU"], "679": ["FJ"], "680": ["PW"], "681": ["WF"], "682": ["CK"], "683": ["NU"], "685": ["WS"], "686": ["KI"], "687": ["NC"], "688": ["TV"], "689": ["PF"], "690": ["TK"], "691": ["FM"], "692": ["MH"], "850": ["KP"], "852": ["HK"], "853": ["MO"], "855": ["KH"], "856": ["LA"], "880": ["BD"], "886": ["TW"], "960": ["MV"], "961": ["LB"], "962": ["JO"], "963": ["SY"], "964": ["IQ"], "965": ["KW"], "966": ["SA"], "967": ["YE"], "968": ["OM"], "970": ["PS"], "971": ["AE"], "972": ["IL"], "973": ["BH"], "974": ["QA"], "975": ["BT"], "976": ["MN"], "977": ["NP"], "992": ["TJ"], "993": ["TM"], "994": ["AZ"], "995": ["GE"], "996": ["KG"], "998": ["UZ"] }, countries: { AC: ["247", "00", "(?:[01589]\\d|[2-467])\\d{4}", [5, 6]], AD: ["376", "00", "(?:1|6\\d)\\d{7}|[135-9]\\d{5}", [6, 8, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["[135-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["1"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]]], AE: ["971", "00", "(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{2,9})", "$1 $2", ["60|8"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[236]|[479][2-8]"], "0$1"], ["(\\d{3})(\\d)(\\d{5})", "$1 $2 $3", ["[479]"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"]], "0"], AF: ["93", "00", "[2-7]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"]], "0"], AG: ["1", "011", "(?:268|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([457]\\d{6})$|1", "268$1", 0, "268"], AI: ["1", "011", "(?:264|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2457]\\d{6})$|1", "264$1", 0, "264"], AL: ["355", "00", "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}", [6, 7, 8, 9], [["(\\d{3})(\\d{3,4})", "$1 $2", ["80|9"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["4[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2358][2-5]|4"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["[23578]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["6"], "0$1"]], "0"], AM: ["374", "00", "(?:[1-489]\\d|55|60|77)\\d{6}", [8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[89]0"], "0 $1"], ["(\\d{3})(\\d{5})", "$1 $2", ["2|3[12]"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["1|47"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[3-9]"], "0$1"]], "0"], AO: ["244", "00", "[29]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[29]"]]]], AR: ["54", "00", "(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}", [10, 11], [["(\\d{4})(\\d{2})(\\d{4})", "$1 $2-$3", ["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])", "2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["1"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[68]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2-$3", ["[23]"], "0$1", 1], ["(\\d)(\\d{4})(\\d{2})(\\d{4})", "$2 15-$3-$4", ["9(?:2[2-469]|3[3-578])", "9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))", "9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]", "9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d)(\\d{2})(\\d{4})(\\d{4})", "$2 15-$3-$4", ["91"], "0$1", 0, "$1 $2 $3-$4"], ["(\\d{3})(\\d{3})(\\d{5})", "$1-$2-$3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{4})", "$2 15-$3-$4", ["9"], "0$1", 0, "$1 $2 $3-$4"]], "0", 0, "0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?", "9$1"], AS: ["1", "011", "(?:[58]\\d\\d|684|900)\\d{7}", [10], 0, "1", 0, "([267]\\d{6})$|1", "684$1", 0, "684"], AT: ["43", "00", "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{3,12})", "$1 $2", ["1(?:11|[2-9])"], "0$1"], ["(\\d{3})(\\d{2})", "$1 $2", ["517"], "0$1"], ["(\\d{2})(\\d{3,5})", "$1 $2", ["5[079]"], "0$1"], ["(\\d{3})(\\d{3,10})", "$1 $2", ["(?:31|4)6|51|6(?:48|5[0-3579]|[6-9])|7(?:20|32|8)|[89]", "(?:31|4)6|51|6(?:485|5[0-3579]|[6-9])|7(?:20|32|8)|[89]"], "0$1"], ["(\\d{4})(\\d{3,9})", "$1 $2", ["[2-467]|5[2-6]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,7})", "$1 $2 $3", ["5"], "0$1"]], "0"], AU: ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}", [5, 6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{3,4})", "$1 $2", ["16"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["16"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["14|4"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[2378]"], "(0$1)"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:30|[89])"]]], "0", 0, "(183[12])|0", 0, 0, 0, [["(?:(?:241|349)0\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|[34]\\d\\d)|91(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79]))))\\d{3}|(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\d|2[0-8])|8(?:55|6[0-8]|[78]\\d|9[02-9]))\\d{6}", [9]], ["4(?:79[01]|83[0-36-9]|9(?:5[0-3]|6[0-4]))\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, ["163\\d{2,6}", [5, 6, 7, 8, 9]], ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], AW: ["297", "00", "(?:[25-79]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[25-9]"]]]], AX: ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}", [5, 6, 7, 8, 9, 10, 11, 12], 0, "0", 0, 0, 0, 0, "18", 0, "00"], AZ: ["994", "00", "365\\d{6}|(?:[124579]\\d|60|88)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[28]|2|365|46", "1[28]|2|365[45]|46", "1[28]|2|365(?:4|5[02])|46"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[13-9]"], "0$1"]], "0"], BA: ["387", "00", "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[1-3]|[7-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2-$3", ["[3-5]|6[56]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["6"], "0$1"]], "0"], BB: ["1", "011", "(?:246|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "246$1", 0, "246"], BD: ["880", "00", "[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{2})(\\d{4,6})", "$1-$2", ["31[5-8]|[459]1"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1-$2", ["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28)|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"], "0$1"], ["(\\d{4})(\\d{3,6})", "$1-$2", ["[13-9]|2[23]"], "0$1"], ["(\\d)(\\d{7,8})", "$1-$2", ["2"], "0$1"]], "0"], BE: ["32", "00", "4\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:80|9)0"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[239]|4[23]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[15-8]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4"], "0$1"]], "0"], BF: ["226", "00", "[024-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[024-7]"]]]], BG: ["359", "00", "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}", [6, 7, 8, 9, 12], [["(\\d)(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["43[1-6]|70[1-9]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["(?:70|8)0"], "0$1"], ["(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3", ["43[1-7]|7"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[48]|9[08]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"]], "0"], BH: ["973", "00", "[136-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[13679]|8[02-4679]"]]]], BI: ["257", "00", "(?:[267]\\d|31)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2367]"]]]], BJ: ["229", "00", "01\\d{8}", [10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["0"]]]], BL: ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], BM: ["1", "011", "(?:441|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "441$1", 0, "441"], BN: ["673", "00", "[2-578]\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-578]"]]]], BO: ["591", "00(?:1\\d)?", "(?:[2-7]\\d\\d|8001)\\d{5}", [8, 9], [["(\\d)(\\d{7})", "$1 $2", ["[23]|4[46]|50"]], ["(\\d{8})", "$1", ["[5-7]"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["8"]]], "0", 0, "0(1\\d)?"], BQ: ["599", "00", "(?:[34]1|7\\d)\\d{5}", [7], 0, 0, 0, 0, 0, 0, "[347]"], BR: ["55", "00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)", "[1-467]\\d{9,10}|55[0-46-9]\\d{8}|[34]\\d{7}|55\\d{7,8}|(?:5[0-46-9]|[89]\\d)\\d{7,9}", [8, 9, 10, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["300|4(?:0[02]|37|86)", "300|4(?:0(?:0|20)|370|864)"]], ["(\\d{3})(\\d{2,3})(\\d{4})", "$1 $2 $3", ["(?:[358]|90)0"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2-$3", ["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"], "($1)"], ["(\\d{2})(\\d{5})(\\d{4})", "$1 $2-$3", ["[16][1-9]|[2-57-9]"], "($1)"]], "0", 0, "(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?", "$2"], BS: ["1", "011", "(?:242|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([3-8]\\d{6})$|1", "242$1", 0, "242"], BT: ["975", "00", "[178]\\d{7}|[2-8]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-6]|7[246]|8[2-4]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[67]|[78]"]]]], BW: ["267", "00", "90\\d{5}|(?:0800|[2-6]|(?:7|800)\\d)\\d{6}", [7, 8, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["90"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[2-6]"]], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["8"]]]], BY: ["375", "810", "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3})", "$1 $2", ["800"], "8 $1"], ["(\\d{3})(\\d{2})(\\d{2,4})", "$1 $2 $3", ["800"], "8 $1"], ["(\\d{4})(\\d{2})(\\d{3})", "$1 $2-$3", ["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])", "1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"], "8 0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["1(?:[56]|7[467])|2[1-3]"], "8 0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-4]"], "8 0$1"], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[89]"], "8 $1"]], "8", 0, "0|80?", 0, 0, 0, 0, "8~10"], BZ: ["501", "00", "(?:0800\\d|[2-8])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-8]"]], ["(\\d)(\\d{3})(\\d{4})(\\d{3})", "$1-$2-$3-$4", ["0"]]]], CA: ["1", "011", "[2-9]\\d{9}|3\\d{6}", [7, 10], 0, "1", 0, 0, 0, 0, 0, [["(?:2(?:04|[23]6|[48]9|5[07]|[67]3)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|9(?:0[25]|42))[2-9]\\d{6}", [10]], ["", [10]], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}", [10]], ["900[2-9]\\d{6}", [10]], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:2[125-9]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\d{6}", [10]], 0, ["310\\d{4}", [7]], 0, ["600[2-9]\\d{6}", [10]]]], CC: ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", [9]], ["4(?:79[01]|83[0-36-9]|9(?:5[0-3]|6[0-4]))\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], CD: ["243", "00", "(?:(?:[189]|5\\d)\\d|2)\\d{7}|[1-68]\\d{6}", [7, 8, 9, 10], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["[1-6]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["5"], "0$1"]], "0"], CF: ["236", "00", "8776\\d{4}|(?:[27]\\d|61)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-8]"]]]], CG: ["242", "00", "222\\d{6}|(?:0\\d|80)\\d{7}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[02]"]]]], CH: ["41", "00", "8\\d{11}|[2-9]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8[047]|90"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-79]|81"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["8"], "0$1"]], "0"], CI: ["225", "00", "[02]\\d{9}", [10], [["(\\d{2})(\\d{2})(\\d)(\\d{5})", "$1 $2 $3 $4", ["2"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3 $4", ["0"]]]], CK: ["682", "00", "[2-578]\\d{4}", [5], [["(\\d{2})(\\d{3})", "$1 $2", ["[2-578]"]]]], CL: ["56", "(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0", "12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}", [9, 10, 11], [["(\\d{5})(\\d{4})", "$1 $2", ["219", "2196"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["60|809"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["44"]], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2[1-36]"], "($1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["9(?:10|[2-9])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])"], "($1)"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["60|8"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{3})(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["60"]]]], CM: ["237", "00", "[26]\\d{8}|88\\d{6,7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["88"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[26]|88"]]]], CN: ["86", "00|1(?:[12]\\d|79)\\d\\d00", "(?:(?:1[03-689]|2\\d)\\d\\d|6)\\d{8}|1\\d{10}|[126]\\d{6}(?:\\d(?:\\d{2})?)?|86\\d{5,6}|(?:[3-579]\\d|8[0-57-9])\\d{5,9}", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5})", "$1 $2", ["101", "1010", "10100"], "0$1"], ["(\\d{2})(\\d{5,6})", "$1 $2", ["(?:10|2[0-57-9])[19]|3(?:[15]|35|49|9[1-68])|4(?:1[125-9]|2[179]|[35][1-9]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-35]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|9[0-35-9])|[39]7[0-79]", "10(?:12|9[56])|2[0-57-9](?:1[02]|9[56])|(?:3(?:[15]\\d|35|49|7[0-79]|9[1-68])|4(?:1[125-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-35]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1", "10(?:123|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[15]\\d|35|49|7[0-79]|9[1-68])|4(?:1[125-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-35]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12", "10(?:123|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[15]\\d|35|49|7[0-79]|9[1-68])|4(?:1[125-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-35]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["101", "1010"]], ["(\\d{3})(\\d{5,6})", "$1 $2", ["3(?:[15]|35|49|7[0-79]|9[1-68])|4(?:1[125-9]|2[179]|[35][1-9]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-35]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])", "(?:3(?:[15]\\d|35|49|7[0-79]|9[1-68])|4(?:1[125-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-35]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]", "(?:3(?:[15]\\d|35|49|7[0-79]|9[1-68])|4(?:1[125-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-35]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])", "(?:3(?:[15]\\d|35|49|7[0-79]|9[1-68])|4(?:1[125-9]|2[179]|[35][1-9]|6[47-9]|7\\d|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-35]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[48]0"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|2(?:[02-57-9]|1[1-9])", "10|2(?:[02-57-9]|1[1-9])", "10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["3(?:[3-59]|7[02-6])|4(?:1[25-9]|[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:31|55|79|87)[02-9]"], "0$1", 1], ["(\\d{3})(\\d{7,8})", "$1 $2", ["9"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[3-578]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["1[3-9]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["[12]"], "0$1", 1]], "0", 0, "(1(?:[12]\\d|79)\\d\\d)|0", 0, 0, 0, 0, "00"], CO: ["57", "00(?:4(?:[14]4|56)|[579])", "(?:46|60\\d\\d)\\d{6}|(?:1\\d|[39])\\d{9}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["46"]], ["(\\d{3})(\\d{7})", "$1 $2", ["6|90"], "($1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3[0-357]|94"]], ["(\\d)(\\d{3})(\\d{7})", "$1-$2-$3", ["1"], "0$1", 0, "$1 $2 $3"]], "0", 0, "0([3579]|4(?:[14]4|56))?"], CR: ["506", "00", "(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}", [8, 10], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[3-9]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["[89]"]]], 0, 0, "(19(?:0[0-2468]|1[09]|20|66|77|99))"], CU: ["53", "119", "(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}", [6, 7, 8, 10], [["(\\d{2})(\\d{4,6})", "$1 $2", ["2[1-4]|[34]"], "(0$1)"], ["(\\d)(\\d{6,7})", "$1 $2", ["7"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["[56]"], "0$1"], ["(\\d{3})(\\d{7})", "$1 $2", ["8"], "0$1"]], "0"], CV: ["238", "0", "(?:[2-59]\\d\\d|800)\\d{4}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-589]"]]]], CW: ["599", "00", "(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[3467]"]], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["9[4-8]"]]], 0, 0, 0, 0, 0, "[69]"], CX: ["61", "001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011", "1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}", [6, 7, 8, 9, 10, 12], 0, "0", 0, "([59]\\d{7})$|0", "8$1", 0, 0, [["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}", [9]], ["4(?:79[01]|83[0-36-9]|9(?:5[0-3]|6[0-4]))\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\d{6}", [9]], ["180(?:0\\d{3}|2)\\d{3}", [7, 10]], ["190[0-26]\\d{6}", [10]], 0, 0, 0, 0, ["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}", [9]], ["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}", [6, 8, 10, 12]]], "0011"], CY: ["357", "00", "(?:[279]\\d|[58]0)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[257-9]"]]]], CZ: ["420", "00", "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}", [9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]|9[015-7]"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["96"]], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]]], DE: ["49", "00", "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [["(\\d{2})(\\d{3,13})", "$1 $2", ["3[02]|40|[68]9"], "0$1"], ["(\\d{3})(\\d{3,12})", "$1 $2", ["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1", "2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"], "0$1"], ["(\\d{4})(\\d{2,11})", "$1 $2", ["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]", "[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"], "0$1"], ["(\\d{3})(\\d{4})", "$1 $2", ["138"], "0$1"], ["(\\d{5})(\\d{2,10})", "$1 $2", ["3"], "0$1"], ["(\\d{3})(\\d{5,11})", "$1 $2", ["181"], "0$1"], ["(\\d{3})(\\d)(\\d{4,10})", "$1 $2 $3", ["1(?:3|80)|9"], "0$1"], ["(\\d{3})(\\d{7,8})", "$1 $2", ["1[67]"], "0$1"], ["(\\d{3})(\\d{7,12})", "$1 $2", ["8"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["185", "1850", "18500"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["18[68]"], "0$1"], ["(\\d{4})(\\d{7})", "$1 $2", ["15[1279]"], "0$1"], ["(\\d{5})(\\d{6})", "$1 $2", ["15[03-68]", "15(?:[0568]|3[13]|41)"], "0$1"], ["(\\d{3})(\\d{8})", "$1 $2", ["18"], "0$1"], ["(\\d{3})(\\d{2})(\\d{7,8})", "$1 $2 $3", ["1(?:6[023]|7)"], "0$1"], ["(\\d{4})(\\d{2})(\\d{7})", "$1 $2 $3", ["15[279]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{8})", "$1 $2 $3", ["15"], "0$1"]], "0"], DJ: ["253", "00", "(?:2\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[27]"]]]], DK: ["45", "00", "[2-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-9]"]]]], DM: ["1", "011", "(?:[58]\\d\\d|767|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "767$1", 0, "767"], DO: ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "8001|8[024]9"], DZ: ["213", "00", "(?:[1-4]|[5-79]\\d|80)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["9"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-8]"], "0$1"]], "0"], EC: ["593", "00", "1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}", [8, 9, 10, 11], [["(\\d)(\\d{3})(\\d{4})", "$1 $2-$3", ["[2-7]"], "(0$1)", 0, "$1-$2-$3"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1"]]], "0"], EE: ["372", "00", "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[369]|4[3-8]|5(?:[0-2]|4[67]|5[0-478]|6[45])|7[1-9]|88", "[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|4[67]0|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]], ["(\\d{4})(\\d{3,4})", "$1 $2", ["[45]|8(?:00|[1-49])", "[45]|8(?:00[1-9]|[1-49])"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], EG: ["20", "00", "[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}", [8, 9, 10], [["(\\d)(\\d{7,8})", "$1 $2", ["[23]"], "0$1"], ["(\\d{2})(\\d{6,7})", "$1 $2", ["1[35]|[4-6]|8[2468]|9[235-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{8})", "$1 $2", ["1"], "0$1"]], "0"], EH: ["212", "00", "[5-8]\\d{8}", [9], 0, "0", 0, 0, 0, 0, 0, [["528[89]\\d{5}"], ["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[016-8]\\d|2[0-8]|3[01]|5[0-5]))\\d{6}"], ["80[0-7]\\d{6}"], ["89\\d{7}"], 0, 0, 0, 0, ["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]], ER: ["291", "00", "[178]\\d{6}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[178]"], "0$1"]], "0"], ES: ["34", "00", "400\\d{6}|(?:51|[6-9]\\d)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[89]00"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[4-9]"]]]], ET: ["251", "00", "(?:11|[2-57-9]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-57-9]"], "0$1"]], "0"], FI: ["358", "00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))", "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}", [5, 6, 7, 8, 9, 10, 11, 12], [["(\\d{5})", "$1", ["20[2-59]"], "0$1"], ["(\\d{3})(\\d{3,7})", "$1 $2", ["(?:[1-3]0|[68])0|70[07-9]"], "0$1"], ["(\\d{2})(\\d{4,8})", "$1 $2", ["[14]|2[09]|50|7[135]"], "0$1"], ["(\\d{2})(\\d{6,10})", "$1 $2", ["7"], "0$1"], ["(\\d)(\\d{4,9})", "$1 $2", ["(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"], "0$1"]], "0", 0, 0, 0, 0, "1[03-79]|[2-9]", 0, "00"], FJ: ["679", "0(?:0|52)", "45\\d{5}|(?:0800\\d|[235-9])\\d{6}", [7, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|45"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]]], 0, 0, 0, 0, 0, 0, 0, "00"], FK: ["500", "00", "[2-7]\\d{4}", [5]], FM: ["691", "00", "(?:[39]\\d\\d|820)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[389]"]]]], FO: ["298", "00", "[2-9]\\d{5}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-9]"]]], 0, 0, "(10(?:01|[12]0|88))"], FR: ["33", "00", "[1-9]\\d{8}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0 $1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[1-79]"], "0$1"]], "0"], GA: ["241", "00", "(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}", [7, 8], [["(\\d)(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-7]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["11|[67]"], "0$1"]], 0, 0, "0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})", "$1"], GB: ["44", "00", "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], "0", 0, "0|180020", 0, 0, 0, [["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-5])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|5[01]))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-3]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}", [9, 10]], ["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]], 0, " x"], GD: ["1", "011", "(?:473|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "473$1", 0, "473"], GE: ["995", "00", "(?:[3-57]\\d\\d|800)\\d{6}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["32"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[57]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[348]"], "0$1"]], "0"], GF: ["594", "00", "(?:694\\d|7093)\\d{5}|(?:59|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]|80[6-9]|9[47]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[89]"], "0$1"]], "0"], GG: ["44", "00", "(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?", [7, 9, 10], 0, "0", 0, "([25-9]\\d{5})$|0|180020", "1481$1", 0, 0, [["1481[25-9]\\d{5}", [10]], ["7(?:(?:781|839)\\d|911[17])\\d{5}", [10]], ["80[08]\\d{7}|800\\d{6}|8001111"], ["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d", [7, 10]], ["70\\d{8}", [10]], 0, ["(?:3[0347]|55)\\d{8}", [10]], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", [10]], ["56\\d{8}", [10]]]], GH: ["233", "00", "[235]\\d{8}|800\\d{5,6}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2358]"], "0$1"]], "0"], GI: ["350", "00", "(?:[25]\\d|60)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["2"]]]], GL: ["299", "00", "(?:19|[2-689]\\d|70)\\d{4}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]]], GM: ["220", "00", "[48]\\d{8}|[2-9]\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[235-9]|4(?:[0-35]|4[16-9])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[48]"]]]], GN: ["224", "00", "722\\d{6}|(?:3|6\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]]], GP: ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]|80[6-9]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], GQ: ["240", "00", "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235]"]], ["(\\d{3})(\\d{6})", "$1 $2", ["[89]"]]]], GR: ["30", "00", "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}", [10, 11, 12], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["21|7"]], ["(\\d{4})(\\d{6})", "$1 $2", ["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2689]"]], ["(\\d{3})(\\d{3,4})(\\d{5})", "$1 $2 $3", ["8"]]]], GT: ["502", "00", "80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[2-8]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], GU: ["1", "011", "(?:[58]\\d\\d|671|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "671$1", 0, "671"], GW: ["245", "00", "[49]\\d{8}|4\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["40"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"]]]], GY: ["592", "001", "(?:[2-8]\\d{3}|9008)\\d{3}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], HK: ["852", "00(?:30|5[09]|[126-9]?)", "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", [5, 6, 7, 8, 9, 11], [["(\\d{3})(\\d{2,5})", "$1 $2", ["900", "9003"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{3})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["9"]]], 0, 0, 0, 0, 0, 0, 0, "00"], HN: ["504", "00", "8\\d{10}|[237-9]\\d{7}", [8, 11], [["(\\d{4})(\\d{4})", "$1-$2", ["[237-9]"]]]], HR: ["385", "00", "[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}", [7, 8, 9], [["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["6[01]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{4})(\\d{3})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6|7[245]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-57]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"]], "0"], HT: ["509", "00", "[2-589]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["[2-589]"]]]], HU: ["36", "00", "[235-7]\\d{8}|[1-9]\\d{7}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"], "(06 $1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "06 $1"]], "06"], ID: ["62", "00[89]", "00[1-9]\\d{9,14}|(?:[1-36]|8\\d{5})\\d{6}|00\\d{9}|[1-9]\\d{8,10}|[2-9]\\d{7}", [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["15"]], ["(\\d{2})(\\d{5,9})", "$1 $2", ["2[124]|[36]1"], "(0$1)"], ["(\\d{3})(\\d{5,7})", "$1 $2", ["800"], "0$1"], ["(\\d{3})(\\d{5,8})", "$1 $2", ["[2-79]"], "(0$1)"], ["(\\d{3})(\\d{3,4})(\\d{3})", "$1-$2-$3", ["8[1-35-9]"], "0$1"], ["(\\d{3})(\\d{6,8})", "$1 $2", ["1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["804"], "0$1"], ["(\\d{3})(\\d)(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["80"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1-$2-$3", ["8"], "0$1"]], "0"], IE: ["353", "00", "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}", [7, 8, 9, 10], [["(\\d{2})(\\d{5})", "$1 $2", ["2[24-9]|47|58|6[237-9]|9[35-9]"], "(0$1)"], ["(\\d{3})(\\d{5})", "$1 $2", ["[45]0"], "(0$1)"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["1"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2569]|4[1-69]|7[14]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["70"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["81"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["4"], "(0$1)"], ["(\\d{2})(\\d)(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], IL: ["972", "0(?:0|1(?:05|[2-9]))", "1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}", [7, 8, 9, 10, 11, 12], [["(\\d{4})(\\d{3})", "$1-$2", ["125"]], ["(\\d{4})(\\d{2})(\\d{2})", "$1-$2-$3", ["121"]], ["(\\d)(\\d{3})(\\d{4})", "$1-$2-$3", ["[2-489]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1-$2-$3", ["12"]], ["(\\d{4})(\\d{6})", "$1-$2", ["159"]], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3-$4", ["1[7-9]"]], ["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})", "$1-$2 $3-$4", ["15"]]], "0"], IM: ["44", "00", "1624\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([25-8]\\d{5})$|0|180020", "1624$1", 0, "74576|(?:16|7[56])24"], IN: ["91", "00", "(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}", [8, 9, 10, 11, 12, 13], [["(\\d{8})", "$1", ["5(?:0|2[23]|3[03]|[67]1|88)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)", "5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"], 0, 1], ["(\\d{4})(\\d{4,5})", "$1 $2", ["180", "1800"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["140"], 0, 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["11|2[02]|33|4[04]|79[1-5]|80[2-46]", "11|2[02]|33|4[04]|79[1-5]|80(?:[2-4]|6[0-589])", "11|2[02]|33|4[04]|79(?:[1245]|3(?:[02-9]|1[0-24-9]))|80(?:[2-4]|6[0-589])"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]", "1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"], "0$1", 1], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807", "1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]", "1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\d|7(?:[23569]\\d|8[0-57-9])|8(?:[14-6]\\d|2[0-79]))|7(?:1(?:[013-8]\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"], "0$1", 1], ["(\\d{5})(\\d{5})", "$1 $2", ["16|[6-9]"], "0$1", 1], ["(\\d{4})(\\d{2,4})(\\d{4})", "$1 $2 $3", ["18[06]", "18[06]0"], 0, 1], ["(\\d{4})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["18"], 0, 1]], "0"], IO: ["246", "00", "3\\d{6}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["3"]]]], IQ: ["964", "00", "(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-6]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"]], "0"], IR: ["98", "00", "[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}", [4, 5, 6, 7, 10], [["(\\d{4,5})", "$1", ["96"], "0$1"], ["(\\d{2})(\\d{4,5})", "$1 $2", ["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["[1-8]"], "0$1"]], "0"], IS: ["354", "00|1(?:0(?:01|[12]0)|100)", "(?:38\\d|[4-9])\\d{6}", [7, 9], [["(\\d{3})(\\d{4})", "$1 $2", ["[4-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["3"]]], 0, 0, 0, 0, 0, 0, 0, "00"], IT: ["39", "00", "0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?", [6, 7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{4,6})", "$1 $2", ["0[26]"]], ["(\\d{3})(\\d{3,6})", "$1 $2", ["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])", "0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]], ["(\\d{4})(\\d{2,6})", "$1 $2", ["0(?:[13-579][2-46-8]|8[236-8])"]], ["(\\d{4})(\\d{4})", "$1 $2", ["894"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[26]|5"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["1(?:44|[679])|[378]|43"]], ["(\\d{3})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["0[13-57-9][0159]|14"]], ["(\\d{2})(\\d{4})(\\d{5})", "$1 $2 $3", ["0[26]"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[03]"]]], 0, 0, 0, 0, 0, 0, [["0(?:669[0-79]\\d{1,6}|831\\d{2,8})|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"], ["3[2-9]\\d{7,8}|(?:31|43)\\d{8}", [9, 10]], ["80(?:0\\d{3}|3)\\d{3}", [6, 9]], ["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}", [6, 8, 9, 10]], ["1(?:78\\d|99)\\d{6}", [9, 10]], ["3[2-8]\\d{9,10}", [11, 12]], 0, 0, ["55\\d{8}", [10]], ["84(?:[08]\\d{3}|[17])\\d{3}", [6, 9]]]], JE: ["44", "00", "1534\\d{6}|(?:[3578]\\d|90)\\d{8}", [10], 0, "0", 0, "([0-24-8]\\d{5})$|0|180020", "1534$1", 0, 0, [["1534[0-24-8]\\d{5}"], ["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"], ["80(?:07(?:35|81)|8901)\\d{4}"], ["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"], ["701511\\d{4}"], 0, ["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"], ["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"], ["56\\d{8}"]]], JM: ["1", "011", "(?:[58]\\d\\d|658|900)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "658|876"], JO: ["962", "00", "(?:(?:[2689]|7\\d)\\d|32|427|53)\\d{6}", [8, 9], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2356]|87"], "(0$1)"], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["70"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[47]"], "0$1"]], "0"], JP: ["81", "010", "00[1-9]\\d{6,14}|[25-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}", [8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [["(\\d{3})(\\d{3})(\\d{3})", "$1-$2-$3", ["(?:12|57|99)0"], "0$1"], ["(\\d{4})(\\d)(\\d{4})", "$1-$2-$3", ["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]", "1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["60"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2-$3", ["3|4(?:2[09]|7[01])|6[1-9]", "3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]", "1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3", ["[14]|[289][2-9]|5[3-9]|7[2-4679]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2-$3", ["800"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[25-9]"], "0$1"]], "0", 0, "(000[2569]\\d{4,6})$|(?:(?:003768)0?)|0", "$1"], KE: ["254", "000", "(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}", [7, 8, 9, 10], [["(\\d{2})(\\d{5,7})", "$1 $2", ["[24-6]"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["[17]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0"], KG: ["996", "00", "8\\d{9}|[235-9]\\d{8}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["3(?:1[346]|[24-79])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-79]|88"], "0$1"], ["(\\d{3})(\\d{3})(\\d)(\\d{2,3})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], KH: ["855", "00[14-9]", "1\\d{9}|[1-9]\\d{7,8}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], KI: ["686", "00", "(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}", [5, 8], 0, "0"], KM: ["269", "00", "[3478]\\d{6}", [7], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[3478]"]]]], KN: ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "869$1", 0, "869"], KP: ["850", "00|99", "85\\d{6}|(?:19\\d|[2-7])\\d{7}", [8, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-7]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"]], "0"], KR: ["82", "00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))", "00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}", [5, 6, 8, 9, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3,4})", "$1-$2", ["(?:3[1-3]|[46][1-4]|5[1-5])1"], "0$1"], ["(\\d{4})(\\d{4})", "$1-$2", ["1"]], ["(\\d)(\\d{3,4})(\\d{4})", "$1-$2-$3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1-$2-$3", ["[36]0|8"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1-$2-$3", ["[1346]|5[1-5]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2-$3", ["[57]"], "0$1"], ["(\\d{2})(\\d{5})(\\d{4})", "$1-$2-$3", ["5"], "0$1"]], "0", 0, "0(8(?:[1-46-8]|5\\d\\d))?"], KW: ["965", "00", "18\\d{5}|(?:[2569]\\d|41)\\d{6}", [7, 8], [["(\\d{4})(\\d{3,4})", "$1 $2", ["[169]|2(?:[235]|4[1-35-9])|52"]], ["(\\d{3})(\\d{5})", "$1 $2", ["[245]"]]]], KY: ["1", "011", "(?:345|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "345$1", 0, "345"], KZ: ["7", "810", "8\\d{13}|[78]\\d{9}", [10, 14], 0, "8", 0, 0, 0, 0, "7", 0, "8~10"], LA: ["856", "00", "(?:2\\d|3)\\d{8}|(?:[235-8]\\d|41)\\d{6}", [8, 9, 10], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2[13]|3[14]|[4-8]"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["3"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["2"], "0$1"]], "0"], LB: ["961", "00", "[27-9]\\d{7}|[13-9]\\d{6}", [7, 8], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[13-69]|7(?:[2-57]|62|8[0-6]|9[04-9])|8[02-9]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[27-9]"]]], "0"], LC: ["1", "011", "(?:[58]\\d\\d|758|900)\\d{7}", [10], 0, "1", 0, "([2-8]\\d{6})$|1", "758$1", 0, "758"], LI: ["423", "00", "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}", [7, 9], [["(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2379]|8(?:0[09]|7)", "[2379]|8(?:0(?:02|9)|7)"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["69"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]]], "0", 0, "(1001)|0"], LK: ["94", "00", "[1-9]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1-689]"], "0$1"]], "0"], LR: ["231", "00", "(?:[2457]\\d|33|88)\\d{7}|(?:2\\d|[4-6])\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["4[67]|[56]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-578]"], "0$1"]], "0"], LS: ["266", "00", "(?:[256]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2568]"]]]], LT: ["370", "00", "(?:[3469]\\d|52|[78]0)\\d{6}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["52[0-7]"], "(0-$1)", 1], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0 $1", 1], ["(\\d{2})(\\d{6})", "$1 $2", ["37|4(?:[15]|6[1-8])"], "(0-$1)", 1], ["(\\d{3})(\\d{5})", "$1 $2", ["[3-6]"], "(0-$1)", 1]], "0", 0, "[08]"], LU: ["352", "00", "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}", [4, 5, 6, 7, 8, 9, 10, 11], [["(\\d{2})(\\d{3})", "$1 $2", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["20[2-689]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4", ["20"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})", "$1 $2 $3 $4", ["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["80[01]|90[015]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3 $4", ["20"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})", "$1 $2 $3 $4 $5", ["20"]]], 0, 0, "(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"], LV: ["371", "00", "(?:[268]\\d|78|90)\\d{6}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2679]|8[01]"]]]], LY: ["218", "00", "[2-9]\\d{8}", [9], [["(\\d{2})(\\d{7})", "$1-$2", ["[2-9]"], "0$1"]], "0"], MA: ["212", "00", "[5-8]\\d{8}", [9], [["(\\d{4})(\\d{5})", "$1-$2", ["892"], "0$1"], ["(\\d{2})(\\d{7})", "$1-$2", ["8(?:0[0-7]|9)"], "0$1"], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[5-8]"], "0$1"]], "0", 0, 0, 0, 0, "[5-8]"], MC: ["377", "00", "(?:[3489]|[67]\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["4"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[389]"]], ["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4 $5", ["[67]"], "0$1"]], "0"], MD: ["373", "00", "(?:[235-7]\\d|[89]0)\\d{6}", [8], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["22|3"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[25-7]"], "0$1"]], "0"], ME: ["382", "00", "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[2-9]"], "0$1"]], "0"], MF: ["590", "00", "7090\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\d)|80[6-9]\\d\\d)\\d{4}"], ["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\d{4}"], ["80[0-5]\\d{6}"], ["8[129]\\d{7}"], 0, 0, 0, 0, ["9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}"]]], MG: ["261", "00", "[23]\\d{8}", [9], [["(\\d{2})(\\d{2})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["[23]"], "0$1"]], "0", 0, "([24-9]\\d{6})$|0", "20$1"], MH: ["692", "011", "329\\d{4}|(?:[256]\\d|45)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1-$2", ["[2-6]"]]], "1"], MK: ["389", "00", "[2-578]\\d{7}", [8], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2|34[47]|4(?:[37]7|5[47]|64)"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[347]"], "0$1"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[58]"], "0$1"]], "0"], ML: ["223", "00", "[24-9]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24-9]"]]]], MM: ["95", "00", "1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}", [6, 7, 8, 9, 10], [["(\\d)(\\d{2})(\\d{3})", "$1 $2 $3", ["16|2"], "0$1"], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]"], "0$1"], ["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[12]|452|678|86", "[12]|452|6788|86"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[4-7]|8[1-35]"], "0$1"], ["(\\d)(\\d{3})(\\d{4,6})", "$1 $2 $3", ["9(?:2[0-4]|[35-9]|4[137-9])"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["92"], "0$1"], ["(\\d)(\\d{5})(\\d{4})", "$1 $2 $3", ["9"], "0$1"]], "0"], MN: ["976", "001", "[12]\\d{7,9}|[5-9]\\d{7}", [8, 9, 10], [["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["11|2[16]"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[5-9]"]], ["(\\d{3})(\\d{5,6})", "$1 $2", ["[12]2[1-3]"], "0$1"], ["(\\d{4})(\\d{5,6})", "$1 $2", ["[12](?:27|3[2-8]|4[2-68]|5[1-4689])", "[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"], "0$1"], ["(\\d{5})(\\d{4,5})", "$1 $2", ["[12]"], "0$1"]], "0"], MO: ["853", "00", "0800\\d{3}|(?:28|[68]\\d)\\d{6}", [7, 8], [["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[268]"]]]], MP: ["1", "011", "[58]\\d{9}|(?:67|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "670$1", 0, "670"], MQ: ["596", "00", "7091\\d{5}|(?:[56]9|[89]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]|8(?:0[6-9]|[36])"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], MR: ["222", "00", "(?:[2-4]\\d\\d|800)\\d{5}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[2-48]"]]]], MS: ["1", "011", "(?:[58]\\d\\d|664|900)\\d{7}", [10], 0, "1", 0, "([34]\\d{6})$|1", "664$1", 0, "664"], MT: ["356", "00", "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[2357-9]"]]]], MU: ["230", "0(?:0|[24-7]0|3[03])", "(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}", [7, 8, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-46]|8[013]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[57]"]], ["(\\d{5})(\\d{5})", "$1 $2", ["8"]]], 0, 0, 0, 0, 0, 0, 0, "020"], MV: ["960", "0(?:0|19)", "(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}", [7, 10], [["(\\d{3})(\\d{4})", "$1-$2", ["[34679]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], MW: ["265", "00", "(?:[1289]\\d|31|77)\\d{7}|1\\d{6}", [7, 9], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["1[2-9]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-37-9]"], "0$1"]], "0"], MX: ["52", "0[09]", "[2-9]\\d{9}", [10], [["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["33|5[56]|81"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[2-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], MY: ["60", "00", "1\\d{8,9}|(?:3\\d|[4-9])\\d{7}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1-$2 $3", ["[4-79]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1-$2 $3", ["1(?:[02469]|[378][1-9]|53)|8", "1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"], "0$1"], ["(\\d)(\\d{4})(\\d{4})", "$1-$2 $3", ["3"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{4})", "$1-$2-$3-$4", ["1(?:[367]|80)"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1-$2 $3", ["15"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4})", "$1-$2 $3", ["1"], "0$1"]], "0"], MZ: ["258", "00", "(?:2|8\\d)\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2|8[2-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["8"]]]], NA: ["264", "00", "[68]\\d{7,8}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["88"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["87"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], NC: ["687", "00", "(?:050|[2-57-9]\\d\\d)\\d{3}", [6], [["(\\d{2})(\\d{2})(\\d{2})", "$1.$2.$3", ["[02-57-9]"]]]], NE: ["227", "00", "[027-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["08"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[089]|2[013]|7[0467]"]]]], NF: ["672", "00", "[13]\\d{5}", [6], [["(\\d{2})(\\d{4})", "$1 $2", ["1[0-3]"]], ["(\\d)(\\d{5})", "$1 $2", ["[13]"]]], 0, 0, "([0-258]\\d{4})$", "3$1"], NG: ["234", "009", "(?:20|9\\d)\\d{8}|[78]\\d{9,13}", [10, 11, 12, 13, 14], [["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[7-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["20[129]"], "0$1"], ["(\\d{4})(\\d{2})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{3})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["[78]"], "0$1"], ["(\\d{3})(\\d{5})(\\d{5,6})", "$1 $2 $3", ["[78]"], "0$1"]], "0"], NI: ["505", "00", "(?:1800|[25-8]\\d{3})\\d{4}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[125-8]"]]]], NL: ["31", "00", "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}", [5, 6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{4,7})", "$1 $2", ["[89]0"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["66"], "0$1"], ["(\\d)(\\d{8})", "$1 $2", ["6"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-578]|91"], "0$1"], ["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3", ["9"], "0$1"]], "0"], NO: ["47", "00", "(?:0|[2-9]\\d{3})\\d{4}", [5, 8], [["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["[489]"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-7]"]]], 0, 0, 0, 0, 0, "[02-689]|7[0-8]"], NP: ["977", "00", "(?:1\\d|9)\\d{9}|[1-9]\\d{7}", [8, 10, 11], [["(\\d)(\\d{7})", "$1-$2", ["1[2-6]"], "0$1"], ["(\\d{2})(\\d{6})", "$1-$2", ["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"], "0$1"], ["(\\d{3})(\\d{7})", "$1-$2", ["9"]]], "0"], NR: ["674", "00", "(?:222|444|(?:55|8\\d)\\d|666|777|999)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[24-9]"]]]], NU: ["683", "00", "(?:[4-7]|888\\d)\\d{3}", [4, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["8"]]]], NZ: ["64", "0(?:0|161)", "11\\d{8,12}|[29]\\d{7,9}|(?:[34]\\d|6[0-35-9])\\d{6}|50\\d{5}(?:\\d{2,3})?|7\\d{7,8}|8\\d{4,9}", [5, 6, 7, 8, 9, 10, 11, 12, 13, 14], [["(\\d{2})(\\d{3,8})", "$1 $2", ["8[1-79]"], "0$1"], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["50[036-8]|8|90", "50(?:[0367]|88)|8|90"], "0$1"], ["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["24|[346]|7[2-57-9]|9[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2(?:10|74)|[589]"], "0$1"], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["2[028]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})(\\d{2,6})", "$1 $2 $3 $4", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,5})", "$1 $2 $3", ["2(?:[169]|7[0-35-9])|7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "00"], OM: ["968", "00", "(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}", [7, 8, 9], [["(\\d{3})(\\d{4,6})", "$1 $2", ["[58]"]], ["(\\d{2})(\\d{6})", "$1 $2", ["2"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[179]"]]]], PA: ["507", "00", "(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}", [7, 8, 10, 11], [["(\\d{3})(\\d{4})", "$1-$2", ["[1-57-9]"]], ["(\\d{4})(\\d{4})", "$1-$2", ["[68]"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]]], PE: ["51", "00|19(?:1[124]|77|90)00", "(?:[14-8]|9\\d)\\d{7}", [8, 9], [["(\\d{3})(\\d{5})", "$1 $2", ["80"], "(0$1)"], ["(\\d)(\\d{7})", "$1 $2", ["1"], "(0$1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[4-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"]]], "0", 0, 0, 0, 0, 0, 0, "00", " Anexo "], PF: ["689", "00", "4\\d{5}(?:\\d{2})?|8\\d{7,8}", [6, 8, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["44"]], ["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["4|8[7-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], PG: ["675", "00|140[1-3]", "(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["18|[2-69]|85[02-46-9]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[78]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], PH: ["63", "00", "(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}", [6, 8, 9, 10, 11, 12, 13], [["(\\d)(\\d{5})", "$1 $2", ["2"], "(0$1)"], ["(\\d{4})(\\d{4,6})", "$1 $2", ["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2", "3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"], "(0$1)"], ["(\\d{5})(\\d{4})", "$1 $2", ["346|4(?:27|9[35])|883", "3469|4(?:279|9(?:30|56))|8834"], "(0$1)"], ["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["2"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|8[2-8]"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]], ["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})", "$1 $2 $3 $4", ["1"]]], "0"], PK: ["92", "00", "122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,7})", "$1 $2 $3", ["[89]0"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["1"]], ["(\\d{3})(\\d{6,7})", "$1 $2", ["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])", "9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"], "(0$1)"], ["(\\d{2})(\\d{7,8})", "$1 $2", ["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"], "(0$1)"], ["(\\d{5})(\\d{5})", "$1 $2", ["58"], "(0$1)"], ["(\\d{3})(\\d{7})", "$1 $2", ["3"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"], "(0$1)"], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[24-9]"], "(0$1)"]], "0"], PL: ["48", "00", "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}", [6, 7, 8, 9, 10], [["(\\d{5})", "$1", ["19"]], ["(\\d{3})(\\d{3})", "$1 $2", ["11|20|64"]], ["(\\d{2})(\\d{2})(\\d{3})", "$1 $2 $3", ["30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1", "30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]], ["(\\d{3})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["64"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[2-8]|[2-7]|8[1-79]|9[145]"]], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["8"]]]], PM: ["508", "00", "[78]\\d{8}|[2-9]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[2-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], "0"], PR: ["1", "011", "(?:[589]\\d\\d|787)\\d{7}", [10], 0, "1", 0, 0, 0, 0, "787|939"], PS: ["970", "00", "[2489]2\\d{6}|(?:1\\d|5)\\d{8}", [8, 9, 10], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["[2489]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], PT: ["351", "00", "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["2[12]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["16|[236-9]"]]]], PW: ["680", "01[12]", "(?:[24-8]\\d\\d|345|900)\\d{4}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]]], PY: ["595", "00", "[36-8]\\d{5,8}|4\\d{6,8}|59\\d{6}|9\\d{5,10}|(?:2\\d|5[0-8])\\d{6,7}", [6, 7, 8, 9, 10, 11], [["(\\d{3})(\\d{3,6})", "$1 $2", ["[2-9]0"], "0$1"], ["(\\d{2})(\\d{5})", "$1 $2", ["3[289]|4[246-8]|61|7[1-3]|8[1-36]"], "(0$1)"], ["(\\d{3})(\\d{4,5})", "$1 $2", ["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["87"]], ["(\\d{3})(\\d{6})", "$1 $2", ["9(?:[5-79]|8[1-8])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-8]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["9"]]], "0"], QA: ["974", "00", "800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}", [7, 8, 9, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["2[136]|8"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[3-7]"]]]], RE: ["262", "00", "709\\d{6}|(?:26|[689]\\d)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[26-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, [["2631[0-6]\\d{4}|26(?:2\\d|30|88)\\d{5}"], ["(?:69(?:2\\d\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\d{4}"], ["80\\d{7}"], ["89[1-37-9]\\d{6}"], 0, 0, 0, 0, ["9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\d{4}"], ["8(?:1[019]|2[0156]|84|90)\\d{6}"]]], RO: ["40", "00", "(?:[2378]\\d|90)\\d{7}|[23]\\d{5}", [6, 9], [["(\\d{3})(\\d{3})", "$1 $2", ["2[3-6]", "2[3-6]\\d9"], "0$1"], ["(\\d{2})(\\d{4})", "$1 $2", ["219|31"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[23]1"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[237-9]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, " int "], RS: ["381", "00", "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}", [6, 7, 8, 9, 10, 11, 12], [["(\\d{3})(\\d{3,9})", "$1 $2", ["(?:2[389]|39)0|[7-9]"], "0$1"], ["(\\d{2})(\\d{5,10})", "$1 $2", ["[1-36]"], "0$1"]], "0"], RU: ["7", "810", "8\\d{13}|[347-9]\\d{9}", [10, 14], [["(\\d{4})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-8]|2[1-9])", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))", "7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"], "8 ($1)", 1], ["(\\d{5})(\\d)(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["7(?:1[0-68]|2[1-9])", "7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))", "7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "8 ($1)", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[349]|8(?:[02-7]|1[1-8])"], "8 ($1)", 1], ["(\\d{4})(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["8"], "8 ($1)"]], "8", 0, 0, 0, 0, "[3489]", 0, "8~10"], RW: ["250", "00", "(?:06|[27]\\d\\d|[89]00)\\d{6}", [8, 9], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[7-9]"], "0$1"]], "0"], SA: ["966", "00", "(?:[15]\\d|800|92)\\d{7}", [9, 10], [["(\\d{4})(\\d{5})", "$1 $2", ["9"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["5"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]]], "0"], SB: ["677", "0[01]", "[6-9]\\d{6}|[1-6]\\d{4}", [5, 7], [["(\\d{2})(\\d{5})", "$1 $2", ["6[89]|7|8[4-9]|9(?:[0-8]|9[0-8])"]]]], SC: ["248", "010|0[0-2]", "(?:[2489]\\d|64)\\d{5}", [7], [["(\\d)(\\d{3})(\\d{3})", "$1 $2 $3", ["[246]|9[57]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], SD: ["249", "00", "[19]\\d{8}", [9], [["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], SE: ["46", "00", "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}", [6, 7, 8, 9, 10, 12], [["(\\d{2})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["20"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{4})", "$1-$2", ["9(?:00|39|44|9)"], "0$1", 0, "$1 $2"], ["(\\d{2})(\\d{3})(\\d{2})", "$1-$2 $3", ["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3"], ["(\\d)(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2,3})(\\d{2})", "$1-$2 $3", ["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3"], ["(\\d{3})(\\d{2,3})(\\d{3})", "$1-$2 $3", ["9(?:00|39|44)"], "0$1", 0, "$1 $2 $3"], ["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["10|7"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1-$2 $3 $4", ["8"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1-$2 $3 $4", ["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{2})(\\d{3})", "$1-$2 $3 $4", ["9"], "0$1", 0, "$1 $2 $3 $4"], ["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1-$2 $3 $4 $5", ["[26]"], "0$1", 0, "$1 $2 $3 $4 $5"]], "0"], SG: ["65", "0[0-3]\\d", "(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}", [8, 10, 11], [["(\\d{4})(\\d{4})", "$1 $2", ["[369]|8(?:0[1-9]|[1-9])"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"]], ["(\\d{4})(\\d{4})(\\d{3})", "$1 $2 $3", ["7"]], ["(\\d{4})(\\d{3})(\\d{4})", "$1 $2 $3", ["1"]]]], SH: ["290", "00", "(?:[2569]\\d|8)\\d{3}", [4, 5], 0, 0, 0, 0, 0, 0, "[2569]"], SI: ["386", "00|10(?:22|66|88|99)", "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}", [5, 6, 7, 8], [["(\\d{2})(\\d{3,6})", "$1 $2", ["8[09]|9"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["59|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[37][01]|4[013]|51|6"], "0$1"], ["(\\d)(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[1-57]"], "(0$1)"]], "0", 0, 0, 0, 0, 0, 0, "00"], SJ: ["47", "00", "0\\d{4}|(?:[489]\\d|79)\\d{6}", [5, 8], 0, 0, 0, 0, 0, 0, "79"], SK: ["421", "00", "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}", [6, 7, 9], [["(\\d)(\\d{2})(\\d{3,4})", "$1 $2 $3", ["21"], "0$1"], ["(\\d{2})(\\d{2})(\\d{2,3})", "$1 $2 $3", ["[3-5][1-8]1", "[3-5][1-8]1[67]"], "0$1"], ["(\\d)(\\d{3})(\\d{3})(\\d{2})", "$1 $2 $3 $4", ["2"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[689]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[3-5]"], "0$1"]], "0"], SL: ["232", "00", "(?:[237-9]\\d|66)\\d{6}", [8], [["(\\d{2})(\\d{6})", "$1 $2", ["[236-9]"], "(0$1)"]], "0"], SM: ["378", "00", "(?:0549|[5-7]\\d)\\d{6}", [8, 10], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-7]"]], ["(\\d{4})(\\d{6})", "$1 $2", ["0"]]], 0, 0, "([89]\\d{5})$", "0549$1"], SN: ["221", "00", "(?:[378]\\d|93)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[379]"]]]], SO: ["252", "00", "[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}", [6, 7, 8, 9], [["(\\d{2})(\\d{4})", "$1 $2", ["8[125]"]], ["(\\d{6})", "$1", ["[134]"]], ["(\\d)(\\d{6})", "$1 $2", ["[15]|2[0-79]|3[0-46-8]|4[0-7]"]], ["(\\d{2})(\\d{5,7})", "$1 $2", ["1|28|9[2-9]"]], ["(\\d)(\\d{7})", "$1 $2", ["[267]|904"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[346-9]"]]], "0"], SR: ["597", "00", "(?:[2-5]|[6-9]\\d)\\d{5}", [6, 7], [["(\\d{2})(\\d{2})(\\d{2})", "$1-$2-$3", ["56"]], ["(\\d{3})(\\d{3})", "$1-$2", ["[2-5]"]], ["(\\d{3})(\\d{4})", "$1-$2", ["[6-9]"]]]], SS: ["211", "00", "[19]\\d{8}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[19]"], "0$1"]], "0"], ST: ["239", "00", "(?:22|9\\d)\\d{5}", [7], [["(\\d{3})(\\d{4})", "$1 $2", ["[29]"]]]], SV: ["503", "00", "[25-7]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?", [7, 8, 11], [["(\\d{3})(\\d{4})", "$1 $2", ["[89]"]], ["(\\d{4})(\\d{4})", "$1 $2", ["[25-7]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["[89]"]]]], SX: ["1", "011", "7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "(5\\d{6})$|1", "721$1", 0, "721"], SY: ["963", "00", "[1-359]\\d{8}|[1-5]\\d{7}", [8, 9], [["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-4]|5[1-3]"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[59]"], "0$1", 1]], "0"], SZ: ["268", "00", "0800\\d{4}|(?:[237]\\d|900)\\d{6}", [8, 9], [["(\\d{4})(\\d{4})", "$1 $2", ["[0237]"]], ["(\\d{5})(\\d{4})", "$1 $2", ["9"]]]], TA: ["290", "00", "8\\d{3}", [4], 0, 0, 0, 0, 0, 0, "8"], TC: ["1", "011", "(?:[58]\\d\\d|649|900)\\d{7}", [10], 0, "1", 0, "([2-479]\\d{6})$|1", "649$1", 0, "649"], TD: ["235", "00|16", "(?:22|[3689]\\d|77)\\d{6}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[236-9]"]]], 0, 0, 0, 0, 0, 0, 0, "00"], TG: ["228", "00", "[279]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[279]"]]]], TH: ["66", "00[1-9]", "(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}", [8, 9, 10, 13], [["(\\d)(\\d{3})(\\d{4})", "$1 $2 $3", ["2"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[13-9]"], "0$1"], ["(\\d{4})(\\d{3})(\\d{3})", "$1 $2 $3", ["1"]]], "0"], TJ: ["992", "810", "(?:[0-57-9]\\d|66)\\d{7}", [9], [["(\\d{6})(\\d)(\\d{2})", "$1 $2 $3", ["331", "3317"]], ["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["44[02-479]|[34]7"]], ["(\\d{4})(\\d)(\\d{4})", "$1 $2 $3", ["3(?:[1245]|3[12])"]], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["\\d"]]], 0, 0, 0, 0, 0, 0, 0, "8~10"], TK: ["690", "00", "[2-47]\\d{3,6}", [4, 5, 6, 7]], TL: ["670", "00", "7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}", [7, 8], [["(\\d{3})(\\d{4})", "$1 $2", ["[2-489]|70"]], ["(\\d{4})(\\d{4})", "$1 $2", ["7"]]]], TM: ["993", "810", "[1-7]\\d{7}", [8], [["(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["12"], "(8 $1)"], ["(\\d{3})(\\d)(\\d{2})(\\d{2})", "$1 $2-$3-$4", ["[1-5]"], "(8 $1)"], ["(\\d{2})(\\d{6})", "$1 $2", ["[67]"], "8 $1"]], "8", 0, 0, 0, 0, 0, 0, "8~10"], TN: ["216", "00", "[2-57-9]\\d{7}", [8], [["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-57-9]"]]]], TO: ["676", "00", "(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}", [5, 7], [["(\\d{2})(\\d{3})", "$1-$2", ["[2-4]|50|6[09]|7[0-24-69]|8[05]"]], ["(\\d{4})(\\d{3})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[5-9]"]]]], TR: ["90", "00", "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}", [7, 10, 12, 13], [["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["512|8[01589]|90"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["5"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[24][1-8]|3[1-9]"], "(0$1)", 1], ["(\\d{3})(\\d{3})(\\d{6,7})", "$1 $2 $3", ["80"], "0$1", 1]], "0"], TT: ["1", "011", "(?:[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-46-8]\\d{6})$|1", "868$1", 0, "868"], TV: ["688", "00", "(?:2|7\\d\\d|90)\\d{4}", [5, 6, 7], [["(\\d{2})(\\d{3})", "$1 $2", ["2"]], ["(\\d{2})(\\d{4})", "$1 $2", ["90"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], TW: ["886", "0(?:0[25-79]|19)", "[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}", [7, 8, 9, 10, 11], [["(\\d{2})(\\d)(\\d{4})", "$1 $2 $3", ["202"], "0$1"], ["(\\d{3})(\\d{5})", "$1 $2", ["826"], "0$1"], ["(\\d{3})(\\d{2})(\\d{3})", "$1 $2 $3", ["83"], "0$1"], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["82"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[25]0|37|49|8[09]"], "0$1"], ["(\\d)(\\d{3,4})(\\d{4})", "$1 $2 $3", ["[23568]|4(?:0[02-48]|[1-478])|7[1-9]", "[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[49]"], "0$1"], ["(\\d{2})(\\d{4})(\\d{4,5})", "$1 $2 $3", ["7"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, 0, "#"], TZ: ["255", "00[056]", "(?:[25-8]\\d|41|90)\\d{7}", [9], [["(\\d{3})(\\d{2})(\\d{4})", "$1 $2 $3", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[24]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["5"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[67]"], "0$1"]], "0"], UA: ["380", "00", "[89]\\d{9}|[3-9]\\d{8}", [9, 10], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]", "6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"], "0$1"], ["(\\d{4})(\\d{5})", "$1 $2", ["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])", "3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[3-7]|89|9[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[89]"], "0$1"]], "0", 0, 0, 0, 0, 0, 0, "0~0"], UG: ["256", "00[057]", "800\\d{6}|(?:[29]0|[347]\\d)\\d{7}", [9], [["(\\d{4})(\\d{5})", "$1 $2", ["202", "2024", "20240"], "0$1"], ["(\\d{3})(\\d{6})", "$1 $2", ["20[0-35-7]|4(?:6[45]|[7-9])|[7-9]", "20(?:[0135-7]|2[5-9])|4(?:6[45]|[7-9])|[7-9]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[2-4]"], "0$1"]], "0"], US: ["1", "011", "[2-9]\\d{9}|3\\d{6}", [10], [["(\\d{3})(\\d{4})", "$1-$2", ["310"], 0, 1], ["(\\d{3})(\\d{3})(\\d{4})", "($1) $2-$3", ["[2-9]"], 0, 1, "$1-$2-$3"]], "1", 0, 0, 0, 0, 0, [["983[2-57-9]\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[02589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\d{6}"], [""], ["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"], ["900[2-9]\\d{6}"], ["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\d{6}"]]], UY: ["598", "0(?:0|1[3-9]\\d)", "0004\\d{2,9}|[1249]\\d{7}|2\\d{3,4}|(?:[49]\\d|80)\\d{5}", [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [["(\\d{4,5})", "$1", ["21"]], ["(\\d{3})(\\d{3,4})", "$1 $2", ["0"]], ["(\\d{3})(\\d{4})", "$1 $2", ["[49]0|8"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["9"], "0$1"], ["(\\d{4})(\\d{4})", "$1 $2", ["[124]"]], ["(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3", ["0"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})", "$1 $2 $3 $4", ["0"]]], "0", 0, 0, 0, 0, 0, 0, "00", " int. "], UZ: ["998", "00", "(?:20|33|[5-9]\\d)\\d{7}", [9], [["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[235-9]"]]]], VA: ["39", "00", "0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}", [6, 7, 8, 9, 10, 11, 12], 0, 0, 0, 0, 0, 0, "06698"], VC: ["1", "011", "(?:[58]\\d\\d|784|900)\\d{7}", [10], 0, "1", 0, "([2-7]\\d{6})$|1", "784$1", 0, "784"], VE: ["58", "00", "[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}", [10], [["(\\d{3})(\\d{7})", "$1-$2", ["[24-689]"], "0$1"]], "0"], VG: ["1", "011", "(?:284|[58]\\d\\d|900)\\d{7}", [10], 0, "1", 0, "([2-578]\\d{6})$|1", "284$1", 0, "284"], VI: ["1", "011", "[58]\\d{9}|(?:34|90)0\\d{7}", [10], 0, "1", 0, "([2-9]\\d{6})$|1", "340$1", 0, "340"], VN: ["84", "00", "[12]\\d{9}|[135-9]\\d{8}|[16]\\d{6,7}|7\\d{6}", [7, 8, 9, 10], [["(\\d{4})(\\d{4,6})", "$1 $2", ["1(?:2[02]|[89])"], 0, 1], ["(\\d{2})(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["1[26]|6"], "0$1", 1], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[1357-9]"], "0$1", 1], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["2[48]"], "0$1", 1], ["(\\d{3})(\\d{4})(\\d{3})", "$1 $2 $3", ["2"], "0$1", 1]], "0"], VU: ["678", "00", "[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}", [5, 7], [["(\\d{3})(\\d{4})", "$1 $2", ["[57-9]"]]]], WF: ["681", "00", "(?:40|72|8\\d{4})\\d{4}|[89]\\d{5}", [6, 9], [["(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["[47-9]"]], ["(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"]]]], WS: ["685", "0", "(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}", [5, 6, 7, 10], [["(\\d{5})", "$1", ["[2-5]|6[1-9]"]], ["(\\d{3})(\\d{3,7})", "$1 $2", ["[68]"]], ["(\\d{2})(\\d{5})", "$1 $2", ["7"]]]], XK: ["383", "00", "2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{5})", "$1 $2", ["[89]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3})", "$1 $2 $3", ["[2-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["2|39"], "0$1"], ["(\\d{2})(\\d{7,10})", "$1 $2", ["3"], "0$1"]], "0"], YE: ["967", "00", "(?:1|7\\d)\\d{7}|[1-7]\\d{6}", [7, 8, 9], [["(\\d)(\\d{3})(\\d{3,4})", "$1 $2 $3", ["[1-6]|7(?:[24-6]|8[0-7])"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["7"], "0$1"]], "0"], YT: ["262", "00", "(?:639\\d|7093)\\d{5}|(?:26|80|9\\d)\\d{7}", [9], 0, "0", 0, 0, 0, 0, 0, [["26(?:89\\d|9(?:0[0-467]|15|5[0-4]|6\\d|[78]0))\\d{4}"], ["(?:639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\d{4}"], ["80\\d{7}"], 0, 0, 0, 0, 0, ["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]], ZA: ["27", "00", "[1-79]\\d{8}|8\\d{4,9}", [5, 6, 7, 8, 9, 10], [["(\\d{2})(\\d{3,4})", "$1 $2", ["8[1-4]"], "0$1"], ["(\\d{2})(\\d{3})(\\d{2,3})", "$1 $2 $3", ["8[1-4]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["860"], "0$1"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1-9]"], "0$1"], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["8"], "0$1"]], "0"], ZM: ["260", "00", "800\\d{6}|(?:21|[579]\\d|63)\\d{7}", [9], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[28]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[579]"], "0$1"]], "0"], ZW: ["263", "00", "8\\d{6}(?:\\d{3})?|[235-8]\\d{8}", [7, 9, 10], [["(\\d{3})(\\d{4})", "$1 $2", ["80"], "0$1"], ["(\\d{2})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["29[013-9]"], "0$1"], ["(\\d{2})(\\d{7})", "$1 $2", ["[256]|39|8[13-59]"], "(0$1)"], ["(\\d{2})(\\d{3})(\\d{4})", "$1 $2 $3", ["7"], "0$1"], ["(\\d{3})(\\d{3})(\\d{3,4})", "$1 $2 $3", ["3"], "0$1"], ["(\\d{4})(\\d{6})", "$1 $2", ["8"], "0$1"]], "0"] }, nonGeographic: { "800": ["800", 0, "(?:00|[1-9]\\d)\\d{6}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["\\d"]]], 0, 0, 0, 0, 0, 0, [0, 0, ["(?:00|[1-9]\\d)\\d{6}"]]], "808": ["808", 0, "[1-9]\\d{7}", [8], [["(\\d{4})(\\d{4})", "$1 $2", ["[1-9]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, 0, ["[1-9]\\d{7}"]]], "870": ["870", 0, "7\\d{11}|[235-7]\\d{8}", [9, 12], [["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["[235-7]"]]], 0, 0, 0, 0, 0, 0, [0, ["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"], 0, 0, 0, 0, 0, 0, ["2\\d{8}", [9]]]], "878": ["878", 0, "10\\d{10}", [12], [["(\\d{2})(\\d{5})(\\d{5})", "$1 $2 $3", ["1"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["10\\d{10}"]]], "881": ["881", 0, "6\\d{9}|[0-36-9]\\d{8}", [9, 10], [["(\\d)(\\d{3})(\\d{5})", "$1 $2 $3", ["[0-37-9]"]], ["(\\d)(\\d{3})(\\d{5,6})", "$1 $2 $3", ["6"]]], 0, 0, 0, 0, 0, 0, [0, ["6\\d{9}|[0-36-9]\\d{8}"]]], "882": ["882", 0, "[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?", [7, 8, 9, 10, 11, 12], [["(\\d{2})(\\d{5})", "$1 $2", ["16|342"]], ["(\\d{2})(\\d{6})", "$1 $2", ["49"]], ["(\\d{2})(\\d{2})(\\d{4})", "$1 $2 $3", ["1[36]|9"]], ["(\\d{2})(\\d{4})(\\d{3})", "$1 $2 $3", ["3[23]"]], ["(\\d{2})(\\d{3,4})(\\d{4})", "$1 $2 $3", ["16"]], ["(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", ["10|23|3(?:[15]|4[57])|4|5[12]"]], ["(\\d{3})(\\d{4})(\\d{4})", "$1 $2 $3", ["34"]], ["(\\d{2})(\\d{4,5})(\\d{5})", "$1 $2 $3", ["[1-35]"]]], 0, 0, 0, 0, 0, 0, [0, ["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|5(?:0\\d{3}|2[0-2]))\\d{7}", [7, 8, 9, 10, 12]], 0, 0, 0, ["348[57]\\d{7}", [11]], 0, 0, ["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]], "883": ["883", 0, "(?:[1-4]\\d|51)\\d{6,10}", [8, 9, 10, 11, 12], [["(\\d{3})(\\d{3})(\\d{2,8})", "$1 $2 $3", ["[14]|2[24-689]|3[02-689]|51[24-9]"]], ["(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3", ["510"]], ["(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["21"]], ["(\\d{4})(\\d{4})(\\d{4})", "$1 $2 $3", ["51[13]"]], ["(\\d{3})(\\d{3})(\\d{3})(\\d{3})", "$1 $2 $3 $4", ["[235]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, 0, 0, ["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]], "888": ["888", 0, "\\d{11}", [11], [["(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], 0, 0, 0, 0, 0, 0, [0, 0, 0, 0, 0, 0, ["\\d{11}"]]], "979": ["979", 0, "[1359]\\d{8}", [9], [["(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], 0, 0, 0, 0, 0, 0, [0, 0, 0, ["[1359]\\d{8}"]]] } };
|
|
6993
|
+
|
|
6994
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js
|
|
6995
|
+
function withMetadataArgument(func, _arguments) {
|
|
6996
|
+
var args = Array.prototype.slice.call(_arguments);
|
|
6997
|
+
args.push(metadata_min_json_default);
|
|
6998
|
+
return func.apply(this, args);
|
|
6993
6999
|
}
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
return error;
|
|
6999
|
-
return "Ha ocurrido un error inesperado.";
|
|
7000
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/isObject.js
|
|
7001
|
+
var objectConstructor = {}.constructor;
|
|
7002
|
+
function isObject2(object) {
|
|
7003
|
+
return object !== undefined && object !== null && object.constructor === objectConstructor;
|
|
7000
7004
|
}
|
|
7001
7005
|
|
|
7002
|
-
//
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
return
|
|
7006
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/normalizeArguments.js
|
|
7007
|
+
function _typeof(o) {
|
|
7008
|
+
"@babel/helpers - typeof";
|
|
7009
|
+
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o) {
|
|
7010
|
+
return typeof o;
|
|
7011
|
+
} : function(o) {
|
|
7012
|
+
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
7013
|
+
}, _typeof(o);
|
|
7014
|
+
}
|
|
7015
|
+
function ownKeys(e, r) {
|
|
7016
|
+
var t = Object.keys(e);
|
|
7017
|
+
if (Object.getOwnPropertySymbols) {
|
|
7018
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
7019
|
+
r && (o = o.filter(function(r) {
|
|
7020
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
7021
|
+
})), t.push.apply(t, o);
|
|
7022
|
+
}
|
|
7023
|
+
return t;
|
|
7006
7024
|
}
|
|
7007
|
-
function
|
|
7008
|
-
|
|
7025
|
+
function _objectSpread(e) {
|
|
7026
|
+
for (var r = 1;r < arguments.length; r++) {
|
|
7027
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
7028
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function(r) {
|
|
7029
|
+
_defineProperty(e, r, t[r]);
|
|
7030
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
7031
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
7032
|
+
});
|
|
7033
|
+
}
|
|
7034
|
+
return e;
|
|
7009
7035
|
}
|
|
7010
|
-
function
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7036
|
+
function _defineProperty(e, r, t) {
|
|
7037
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
|
|
7038
|
+
}
|
|
7039
|
+
function _toPropertyKey(t) {
|
|
7040
|
+
var i = _toPrimitive(t, "string");
|
|
7041
|
+
return _typeof(i) == "symbol" ? i : i + "";
|
|
7042
|
+
}
|
|
7043
|
+
function _toPrimitive(t, r) {
|
|
7044
|
+
if (_typeof(t) != "object" || !t)
|
|
7045
|
+
return t;
|
|
7046
|
+
var e = t[Symbol.toPrimitive];
|
|
7047
|
+
if (e !== undefined) {
|
|
7048
|
+
var i = e.call(t, r || "default");
|
|
7049
|
+
if (_typeof(i) != "object")
|
|
7050
|
+
return i;
|
|
7051
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
7016
7052
|
}
|
|
7053
|
+
return (r === "string" ? String : Number)(t);
|
|
7017
7054
|
}
|
|
7018
|
-
function
|
|
7019
|
-
return
|
|
7055
|
+
function _slicedToArray(r, e) {
|
|
7056
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
7020
7057
|
}
|
|
7021
|
-
function
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
return isEmail(value) ? valid() : invalid("email");
|
|
7058
|
+
function _nonIterableRest() {
|
|
7059
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
7060
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
7025
7061
|
}
|
|
7026
|
-
function
|
|
7027
|
-
if (
|
|
7028
|
-
|
|
7029
|
-
|
|
7062
|
+
function _unsupportedIterableToArray(r, a) {
|
|
7063
|
+
if (r) {
|
|
7064
|
+
if (typeof r == "string")
|
|
7065
|
+
return _arrayLikeToArray(r, a);
|
|
7066
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
7067
|
+
return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
|
|
7068
|
+
}
|
|
7030
7069
|
}
|
|
7031
|
-
function
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
return
|
|
7070
|
+
function _arrayLikeToArray(r, a) {
|
|
7071
|
+
(a == null || a > r.length) && (a = r.length);
|
|
7072
|
+
for (var e = 0, n = Array(a);e < a; e++)
|
|
7073
|
+
n[e] = r[e];
|
|
7074
|
+
return n;
|
|
7036
7075
|
}
|
|
7037
|
-
function
|
|
7038
|
-
|
|
7076
|
+
function _iterableToArrayLimit(r, l) {
|
|
7077
|
+
var t = r == null ? null : typeof Symbol != "undefined" && r[Symbol.iterator] || r["@@iterator"];
|
|
7078
|
+
if (t != null) {
|
|
7079
|
+
var e, n, i, u, a = [], f = true, o = false;
|
|
7080
|
+
try {
|
|
7081
|
+
if (i = (t = t.call(r)).next, l === 0) {
|
|
7082
|
+
if (Object(t) !== t)
|
|
7083
|
+
return;
|
|
7084
|
+
f = false;
|
|
7085
|
+
} else
|
|
7086
|
+
for (;!(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true)
|
|
7087
|
+
;
|
|
7088
|
+
} catch (r) {
|
|
7089
|
+
o = true, n = r;
|
|
7090
|
+
} finally {
|
|
7091
|
+
try {
|
|
7092
|
+
if (!f && t["return"] != null && (u = t["return"](), Object(u) !== u))
|
|
7093
|
+
return;
|
|
7094
|
+
} finally {
|
|
7095
|
+
if (o)
|
|
7096
|
+
throw n;
|
|
7097
|
+
}
|
|
7098
|
+
}
|
|
7099
|
+
return a;
|
|
7100
|
+
}
|
|
7039
7101
|
}
|
|
7040
|
-
function
|
|
7041
|
-
|
|
7102
|
+
function _arrayWithHoles(r) {
|
|
7103
|
+
if (Array.isArray(r))
|
|
7104
|
+
return r;
|
|
7042
7105
|
}
|
|
7043
|
-
function
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
if (
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
if (
|
|
7053
|
-
|
|
7054
|
-
|
|
7106
|
+
function normalizeArguments(args) {
|
|
7107
|
+
var _Array$prototype$slic = Array.prototype.slice.call(args), _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4), arg_1 = _Array$prototype$slic2[0], arg_2 = _Array$prototype$slic2[1], arg_3 = _Array$prototype$slic2[2], arg_4 = _Array$prototype$slic2[3];
|
|
7108
|
+
var text;
|
|
7109
|
+
var options;
|
|
7110
|
+
var metadata;
|
|
7111
|
+
if (typeof arg_1 === "string") {
|
|
7112
|
+
text = arg_1;
|
|
7113
|
+
} else
|
|
7114
|
+
throw new TypeError("A text for parsing must be a string.");
|
|
7115
|
+
if (!arg_2 || typeof arg_2 === "string") {
|
|
7116
|
+
if (arg_4) {
|
|
7117
|
+
options = arg_3;
|
|
7118
|
+
metadata = arg_4;
|
|
7119
|
+
} else {
|
|
7120
|
+
options = undefined;
|
|
7121
|
+
metadata = arg_3;
|
|
7122
|
+
}
|
|
7123
|
+
if (arg_2) {
|
|
7124
|
+
options = _objectSpread({
|
|
7125
|
+
defaultCountry: arg_2
|
|
7126
|
+
}, options);
|
|
7127
|
+
}
|
|
7128
|
+
} else if (isObject2(arg_2)) {
|
|
7129
|
+
if (arg_3) {
|
|
7130
|
+
options = arg_2;
|
|
7131
|
+
metadata = arg_3;
|
|
7132
|
+
} else {
|
|
7133
|
+
metadata = arg_2;
|
|
7134
|
+
}
|
|
7135
|
+
} else
|
|
7136
|
+
throw new Error("Invalid second argument: ".concat(arg_2));
|
|
7137
|
+
return {
|
|
7138
|
+
text,
|
|
7139
|
+
options,
|
|
7140
|
+
metadata
|
|
7141
|
+
};
|
|
7055
7142
|
}
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7143
|
+
|
|
7144
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/constants.js
|
|
7145
|
+
var MIN_LENGTH_FOR_NSN = 2;
|
|
7146
|
+
var MAX_LENGTH_FOR_NSN = 17;
|
|
7147
|
+
var MAX_LENGTH_COUNTRY_CODE = 3;
|
|
7148
|
+
var VALID_DIGITS = "0-90-9٠-٩۰-۹";
|
|
7149
|
+
var DASHES = "-‐-―−ー-";
|
|
7150
|
+
var SLASHES = "//";
|
|
7151
|
+
var DOTS = "..";
|
|
7152
|
+
var WHITESPACE = " ";
|
|
7153
|
+
var BRACKETS = "()()[]\\[\\]";
|
|
7154
|
+
var TILDES = "~⁓∼~";
|
|
7155
|
+
var VALID_PUNCTUATION = "".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);
|
|
7156
|
+
var PLUS_CHARS = "++";
|
|
7157
|
+
|
|
7158
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/ParseError.js
|
|
7159
|
+
function _typeof2(o) {
|
|
7160
|
+
"@babel/helpers - typeof";
|
|
7161
|
+
return _typeof2 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o) {
|
|
7162
|
+
return typeof o;
|
|
7163
|
+
} : function(o) {
|
|
7164
|
+
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
7165
|
+
}, _typeof2(o);
|
|
7166
|
+
}
|
|
7167
|
+
function _defineProperties(e, r) {
|
|
7168
|
+
for (var t = 0;t < r.length; t++) {
|
|
7169
|
+
var o = r[t];
|
|
7170
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey2(o.key), o);
|
|
7171
|
+
}
|
|
7172
|
+
}
|
|
7173
|
+
function _createClass(e, r, t) {
|
|
7174
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: false }), e;
|
|
7175
|
+
}
|
|
7176
|
+
function _toPropertyKey2(t) {
|
|
7177
|
+
var i = _toPrimitive2(t, "string");
|
|
7178
|
+
return _typeof2(i) == "symbol" ? i : i + "";
|
|
7179
|
+
}
|
|
7180
|
+
function _toPrimitive2(t, r) {
|
|
7181
|
+
if (_typeof2(t) != "object" || !t)
|
|
7182
|
+
return t;
|
|
7183
|
+
var e = t[Symbol.toPrimitive];
|
|
7184
|
+
if (e !== undefined) {
|
|
7185
|
+
var i = e.call(t, r || "default");
|
|
7186
|
+
if (_typeof2(i) != "object")
|
|
7187
|
+
return i;
|
|
7188
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
7189
|
+
}
|
|
7190
|
+
return (r === "string" ? String : Number)(t);
|
|
7191
|
+
}
|
|
7192
|
+
function _classCallCheck(a, n) {
|
|
7193
|
+
if (!(a instanceof n))
|
|
7194
|
+
throw new TypeError("Cannot call a class as a function");
|
|
7195
|
+
}
|
|
7196
|
+
function _callSuper(t, o, e) {
|
|
7197
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
7198
|
+
}
|
|
7199
|
+
function _possibleConstructorReturn(t, e) {
|
|
7200
|
+
if (e && (_typeof2(e) == "object" || typeof e == "function"))
|
|
7201
|
+
return e;
|
|
7202
|
+
if (e !== undefined)
|
|
7203
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
7204
|
+
return _assertThisInitialized(t);
|
|
7205
|
+
}
|
|
7206
|
+
function _assertThisInitialized(e) {
|
|
7207
|
+
if (e === undefined)
|
|
7208
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
7209
|
+
return e;
|
|
7210
|
+
}
|
|
7211
|
+
function _inherits(t, e) {
|
|
7212
|
+
if (typeof e != "function" && e !== null)
|
|
7213
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
7214
|
+
t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: true, configurable: true } }), Object.defineProperty(t, "prototype", { writable: false }), e && _setPrototypeOf(t, e);
|
|
7215
|
+
}
|
|
7216
|
+
function _wrapNativeSuper(t) {
|
|
7217
|
+
var r = typeof Map == "function" ? new Map : undefined;
|
|
7218
|
+
return _wrapNativeSuper = function _wrapNativeSuper(t) {
|
|
7219
|
+
if (t === null || !_isNativeFunction(t))
|
|
7220
|
+
return t;
|
|
7221
|
+
if (typeof t != "function")
|
|
7222
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
7223
|
+
if (r !== undefined) {
|
|
7224
|
+
if (r.has(t))
|
|
7225
|
+
return r.get(t);
|
|
7226
|
+
r.set(t, Wrapper);
|
|
7227
|
+
}
|
|
7228
|
+
function Wrapper() {
|
|
7229
|
+
return _construct(t, arguments, _getPrototypeOf(this).constructor);
|
|
7230
|
+
}
|
|
7231
|
+
return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }), _setPrototypeOf(Wrapper, t);
|
|
7232
|
+
}, _wrapNativeSuper(t);
|
|
7233
|
+
}
|
|
7234
|
+
function _construct(t, e, r) {
|
|
7235
|
+
if (_isNativeReflectConstruct())
|
|
7236
|
+
return Reflect.construct.apply(null, arguments);
|
|
7237
|
+
var o = [null];
|
|
7238
|
+
o.push.apply(o, e);
|
|
7239
|
+
var p = new (t.bind.apply(t, o));
|
|
7240
|
+
return r && _setPrototypeOf(p, r.prototype), p;
|
|
7241
|
+
}
|
|
7242
|
+
function _isNativeReflectConstruct() {
|
|
7243
|
+
try {
|
|
7244
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
7245
|
+
} catch (t) {}
|
|
7246
|
+
return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
|
|
7247
|
+
return !!t;
|
|
7248
|
+
})();
|
|
7060
7249
|
}
|
|
7061
|
-
function
|
|
7062
|
-
|
|
7250
|
+
function _isNativeFunction(t) {
|
|
7251
|
+
try {
|
|
7252
|
+
return Function.toString.call(t).indexOf("[native code]") !== -1;
|
|
7253
|
+
} catch (n) {
|
|
7254
|
+
return typeof t == "function";
|
|
7255
|
+
}
|
|
7256
|
+
}
|
|
7257
|
+
function _setPrototypeOf(t, e) {
|
|
7258
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
|
|
7259
|
+
return t.__proto__ = e, t;
|
|
7260
|
+
}, _setPrototypeOf(t, e);
|
|
7261
|
+
}
|
|
7262
|
+
function _getPrototypeOf(t) {
|
|
7263
|
+
return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
7264
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
7265
|
+
}, _getPrototypeOf(t);
|
|
7266
|
+
}
|
|
7267
|
+
var ParseError = /* @__PURE__ */ function(_Error) {
|
|
7268
|
+
function ParseError(code) {
|
|
7269
|
+
var _this;
|
|
7270
|
+
_classCallCheck(this, ParseError);
|
|
7271
|
+
_this = _callSuper(this, ParseError, [code]);
|
|
7272
|
+
Object.setPrototypeOf(_this, ParseError.prototype);
|
|
7273
|
+
_this.name = _this.constructor.name;
|
|
7274
|
+
return _this;
|
|
7275
|
+
}
|
|
7276
|
+
_inherits(ParseError, _Error);
|
|
7277
|
+
return _createClass(ParseError);
|
|
7278
|
+
}(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
7279
|
+
|
|
7280
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/tools/semver-compare.js
|
|
7281
|
+
function semver_compare_default(a, b) {
|
|
7282
|
+
a = a.split("-");
|
|
7283
|
+
b = b.split("-");
|
|
7284
|
+
var pa = a[0].split(".");
|
|
7285
|
+
var pb = b[0].split(".");
|
|
7286
|
+
for (var i = 0;i < 3; i++) {
|
|
7287
|
+
var na = Number(pa[i]);
|
|
7288
|
+
var nb = Number(pb[i]);
|
|
7289
|
+
if (na > nb)
|
|
7290
|
+
return 1;
|
|
7291
|
+
if (nb > na)
|
|
7292
|
+
return -1;
|
|
7293
|
+
if (!isNaN(na) && isNaN(nb))
|
|
7294
|
+
return 1;
|
|
7295
|
+
if (isNaN(na) && !isNaN(nb))
|
|
7296
|
+
return -1;
|
|
7297
|
+
}
|
|
7298
|
+
if (a[1] && b[1]) {
|
|
7299
|
+
return a[1] > b[1] ? 1 : a[1] < b[1] ? -1 : 0;
|
|
7300
|
+
}
|
|
7301
|
+
return !a[1] && b[1] ? 1 : a[1] && !b[1] ? -1 : 0;
|
|
7063
7302
|
}
|
|
7064
|
-
|
|
7065
|
-
|
|
7303
|
+
|
|
7304
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/isCallingCode.js
|
|
7305
|
+
var CALLING_CODE_REG_EXP = /^\d+$/;
|
|
7306
|
+
function isCallingCode(string) {
|
|
7307
|
+
return CALLING_CODE_REG_EXP.test(string);
|
|
7066
7308
|
}
|
|
7067
7309
|
|
|
7068
|
-
//
|
|
7069
|
-
function
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7310
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/metadata.js
|
|
7311
|
+
function _typeof3(o) {
|
|
7312
|
+
"@babel/helpers - typeof";
|
|
7313
|
+
return _typeof3 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o) {
|
|
7314
|
+
return typeof o;
|
|
7315
|
+
} : function(o) {
|
|
7316
|
+
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
7317
|
+
}, _typeof3(o);
|
|
7318
|
+
}
|
|
7319
|
+
function _classCallCheck2(a, n) {
|
|
7320
|
+
if (!(a instanceof n))
|
|
7321
|
+
throw new TypeError("Cannot call a class as a function");
|
|
7322
|
+
}
|
|
7323
|
+
function _defineProperties2(e, r) {
|
|
7324
|
+
for (var t = 0;t < r.length; t++) {
|
|
7325
|
+
var o = r[t];
|
|
7326
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey3(o.key), o);
|
|
7327
|
+
}
|
|
7328
|
+
}
|
|
7329
|
+
function _createClass2(e, r, t) {
|
|
7330
|
+
return r && _defineProperties2(e.prototype, r), t && _defineProperties2(e, t), Object.defineProperty(e, "prototype", { writable: false }), e;
|
|
7331
|
+
}
|
|
7332
|
+
function _toPropertyKey3(t) {
|
|
7333
|
+
var i = _toPrimitive3(t, "string");
|
|
7334
|
+
return _typeof3(i) == "symbol" ? i : i + "";
|
|
7335
|
+
}
|
|
7336
|
+
function _toPrimitive3(t, r) {
|
|
7337
|
+
if (_typeof3(t) != "object" || !t)
|
|
7338
|
+
return t;
|
|
7339
|
+
var e = t[Symbol.toPrimitive];
|
|
7340
|
+
if (e !== undefined) {
|
|
7341
|
+
var i = e.call(t, r || "default");
|
|
7342
|
+
if (_typeof3(i) != "object")
|
|
7343
|
+
return i;
|
|
7344
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
7345
|
+
}
|
|
7346
|
+
return (r === "string" ? String : Number)(t);
|
|
7347
|
+
}
|
|
7348
|
+
var V3 = "1.2.0";
|
|
7349
|
+
var V4 = "1.7.35";
|
|
7350
|
+
var DEFAULT_EXT_PREFIX = " ext. ";
|
|
7351
|
+
var Metadata = /* @__PURE__ */ function() {
|
|
7352
|
+
function Metadata(metadata) {
|
|
7353
|
+
_classCallCheck2(this, Metadata);
|
|
7354
|
+
validateMetadata(metadata);
|
|
7355
|
+
this.metadata = metadata;
|
|
7356
|
+
setVersion.call(this, metadata);
|
|
7357
|
+
}
|
|
7358
|
+
return _createClass2(Metadata, [{
|
|
7359
|
+
key: "getCountries",
|
|
7360
|
+
value: function getCountries() {
|
|
7361
|
+
return Object.keys(this.metadata.countries).filter(function(_) {
|
|
7362
|
+
return _ !== "001";
|
|
7363
|
+
});
|
|
7078
7364
|
}
|
|
7079
|
-
|
|
7080
|
-
|
|
7365
|
+
}, {
|
|
7366
|
+
key: "getCountryMetadata",
|
|
7367
|
+
value: function getCountryMetadata(countryCode) {
|
|
7368
|
+
return this.metadata.countries[countryCode];
|
|
7369
|
+
}
|
|
7370
|
+
}, {
|
|
7371
|
+
key: "nonGeographic",
|
|
7372
|
+
value: function nonGeographic() {
|
|
7373
|
+
if (this.v1 || this.v2 || this.v3)
|
|
7374
|
+
return;
|
|
7375
|
+
return this.metadata.nonGeographic || this.metadata.nonGeographical;
|
|
7376
|
+
}
|
|
7377
|
+
}, {
|
|
7378
|
+
key: "hasCountry",
|
|
7379
|
+
value: function hasCountry(country) {
|
|
7380
|
+
return this.getCountryMetadata(country) !== undefined;
|
|
7381
|
+
}
|
|
7382
|
+
}, {
|
|
7383
|
+
key: "hasCallingCode",
|
|
7384
|
+
value: function hasCallingCode(callingCode) {
|
|
7385
|
+
if (this.getCountryCodesForCallingCode(callingCode)) {
|
|
7386
|
+
return true;
|
|
7387
|
+
}
|
|
7388
|
+
if (this.nonGeographic()) {
|
|
7389
|
+
if (this.nonGeographic()[callingCode]) {
|
|
7390
|
+
return true;
|
|
7391
|
+
}
|
|
7392
|
+
} else {
|
|
7393
|
+
var countryCodes = this.countryCallingCodes()[callingCode];
|
|
7394
|
+
if (countryCodes && countryCodes.length === 1 && countryCodes[0] === "001") {
|
|
7395
|
+
return true;
|
|
7396
|
+
}
|
|
7397
|
+
}
|
|
7398
|
+
}
|
|
7399
|
+
}, {
|
|
7400
|
+
key: "isNonGeographicCallingCode",
|
|
7401
|
+
value: function isNonGeographicCallingCode(callingCode) {
|
|
7402
|
+
if (this.nonGeographic()) {
|
|
7403
|
+
return this.nonGeographic()[callingCode] ? true : false;
|
|
7404
|
+
} else {
|
|
7405
|
+
return this.getCountryCodesForCallingCode(callingCode) ? false : true;
|
|
7406
|
+
}
|
|
7407
|
+
}
|
|
7408
|
+
}, {
|
|
7409
|
+
key: "country",
|
|
7410
|
+
value: function country(countryCode) {
|
|
7411
|
+
return this.selectNumberingPlan(countryCode);
|
|
7412
|
+
}
|
|
7413
|
+
}, {
|
|
7414
|
+
key: "selectNumberingPlan",
|
|
7415
|
+
value: function selectNumberingPlan(argument, legacyArgumentCallingCode) {
|
|
7416
|
+
var countryCode;
|
|
7417
|
+
var callingCode;
|
|
7418
|
+
if (argument) {
|
|
7419
|
+
if (isCallingCode(argument)) {
|
|
7420
|
+
callingCode = argument;
|
|
7421
|
+
} else {
|
|
7422
|
+
countryCode = argument;
|
|
7423
|
+
}
|
|
7424
|
+
}
|
|
7425
|
+
if (legacyArgumentCallingCode) {
|
|
7426
|
+
callingCode = legacyArgumentCallingCode;
|
|
7427
|
+
}
|
|
7428
|
+
if (countryCode && countryCode !== "001") {
|
|
7429
|
+
var countryMetadata = this.getCountryMetadata(countryCode);
|
|
7430
|
+
if (!countryMetadata) {
|
|
7431
|
+
throw new Error("Unknown country: ".concat(countryCode));
|
|
7432
|
+
}
|
|
7433
|
+
this.numberingPlan = new NumberingPlan(countryMetadata, this);
|
|
7434
|
+
} else if (callingCode) {
|
|
7435
|
+
if (!this.hasCallingCode(callingCode)) {
|
|
7436
|
+
throw new Error("Unknown calling code: ".concat(callingCode));
|
|
7437
|
+
}
|
|
7438
|
+
this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this);
|
|
7439
|
+
} else {
|
|
7440
|
+
this.numberingPlan = undefined;
|
|
7441
|
+
}
|
|
7442
|
+
return this;
|
|
7443
|
+
}
|
|
7444
|
+
}, {
|
|
7445
|
+
key: "getCountryCodesForCallingCode",
|
|
7446
|
+
value: function getCountryCodesForCallingCode(callingCode) {
|
|
7447
|
+
var countryCodes = this.countryCallingCodes()[callingCode];
|
|
7448
|
+
if (countryCodes) {
|
|
7449
|
+
if (countryCodes.length === 1 && countryCodes[0].length === 3) {
|
|
7450
|
+
return;
|
|
7451
|
+
}
|
|
7452
|
+
return countryCodes;
|
|
7453
|
+
}
|
|
7454
|
+
}
|
|
7455
|
+
}, {
|
|
7456
|
+
key: "getCountryCodeForCallingCode",
|
|
7457
|
+
value: function getCountryCodeForCallingCode(callingCode) {
|
|
7458
|
+
var countryCodes = this.getCountryCodesForCallingCode(callingCode);
|
|
7459
|
+
if (countryCodes) {
|
|
7460
|
+
return countryCodes[0];
|
|
7461
|
+
}
|
|
7462
|
+
}
|
|
7463
|
+
}, {
|
|
7464
|
+
key: "getNumberingPlanMetadata",
|
|
7465
|
+
value: function getNumberingPlanMetadata(callingCode) {
|
|
7466
|
+
var countryCode = this.getCountryCodeForCallingCode(callingCode);
|
|
7467
|
+
if (countryCode) {
|
|
7468
|
+
return this.getCountryMetadata(countryCode);
|
|
7469
|
+
}
|
|
7470
|
+
if (this.nonGeographic()) {
|
|
7471
|
+
var metadata = this.nonGeographic()[callingCode];
|
|
7472
|
+
if (metadata) {
|
|
7473
|
+
return metadata;
|
|
7474
|
+
}
|
|
7475
|
+
} else {
|
|
7476
|
+
var countryCodes = this.countryCallingCodes()[callingCode];
|
|
7477
|
+
if (countryCodes && countryCodes.length === 1 && countryCodes[0] === "001") {
|
|
7478
|
+
return this.metadata.countries["001"];
|
|
7479
|
+
}
|
|
7480
|
+
}
|
|
7481
|
+
}
|
|
7482
|
+
}, {
|
|
7483
|
+
key: "countryCallingCode",
|
|
7484
|
+
value: function countryCallingCode() {
|
|
7485
|
+
return this.numberingPlan.callingCode();
|
|
7486
|
+
}
|
|
7487
|
+
}, {
|
|
7488
|
+
key: "IDDPrefix",
|
|
7489
|
+
value: function IDDPrefix() {
|
|
7490
|
+
return this.numberingPlan.IDDPrefix();
|
|
7491
|
+
}
|
|
7492
|
+
}, {
|
|
7493
|
+
key: "defaultIDDPrefix",
|
|
7494
|
+
value: function defaultIDDPrefix() {
|
|
7495
|
+
return this.numberingPlan.defaultIDDPrefix();
|
|
7496
|
+
}
|
|
7497
|
+
}, {
|
|
7498
|
+
key: "nationalNumberPattern",
|
|
7499
|
+
value: function nationalNumberPattern() {
|
|
7500
|
+
return this.numberingPlan.nationalNumberPattern();
|
|
7501
|
+
}
|
|
7502
|
+
}, {
|
|
7503
|
+
key: "possibleLengths",
|
|
7504
|
+
value: function possibleLengths() {
|
|
7505
|
+
return this.numberingPlan.possibleLengths();
|
|
7506
|
+
}
|
|
7507
|
+
}, {
|
|
7508
|
+
key: "formats",
|
|
7509
|
+
value: function formats() {
|
|
7510
|
+
return this.numberingPlan.formats();
|
|
7511
|
+
}
|
|
7512
|
+
}, {
|
|
7513
|
+
key: "nationalPrefixForParsing",
|
|
7514
|
+
value: function nationalPrefixForParsing() {
|
|
7515
|
+
return this.numberingPlan.nationalPrefixForParsing();
|
|
7516
|
+
}
|
|
7517
|
+
}, {
|
|
7518
|
+
key: "nationalPrefixTransformRule",
|
|
7519
|
+
value: function nationalPrefixTransformRule() {
|
|
7520
|
+
return this.numberingPlan.nationalPrefixTransformRule();
|
|
7521
|
+
}
|
|
7522
|
+
}, {
|
|
7523
|
+
key: "leadingDigits",
|
|
7524
|
+
value: function leadingDigits() {
|
|
7525
|
+
return this.numberingPlan.leadingDigits();
|
|
7526
|
+
}
|
|
7527
|
+
}, {
|
|
7528
|
+
key: "hasTypes",
|
|
7529
|
+
value: function hasTypes() {
|
|
7530
|
+
return this.numberingPlan.hasTypes();
|
|
7531
|
+
}
|
|
7532
|
+
}, {
|
|
7533
|
+
key: "type",
|
|
7534
|
+
value: function type(_type) {
|
|
7535
|
+
return this.numberingPlan.type(_type);
|
|
7536
|
+
}
|
|
7537
|
+
}, {
|
|
7538
|
+
key: "ext",
|
|
7539
|
+
value: function ext() {
|
|
7540
|
+
return this.numberingPlan.ext();
|
|
7541
|
+
}
|
|
7542
|
+
}, {
|
|
7543
|
+
key: "countryCallingCodes",
|
|
7544
|
+
value: function countryCallingCodes() {
|
|
7545
|
+
if (this.v1)
|
|
7546
|
+
return this.metadata.country_phone_code_to_countries;
|
|
7547
|
+
return this.metadata.country_calling_codes;
|
|
7548
|
+
}
|
|
7549
|
+
}, {
|
|
7550
|
+
key: "chooseCountryByCountryCallingCode",
|
|
7551
|
+
value: function chooseCountryByCountryCallingCode(callingCode) {
|
|
7552
|
+
return this.selectNumberingPlan(callingCode);
|
|
7553
|
+
}
|
|
7554
|
+
}, {
|
|
7555
|
+
key: "hasSelectedNumberingPlan",
|
|
7556
|
+
value: function hasSelectedNumberingPlan() {
|
|
7557
|
+
return this.numberingPlan !== undefined;
|
|
7558
|
+
}
|
|
7559
|
+
}]);
|
|
7560
|
+
}();
|
|
7561
|
+
var NumberingPlan = /* @__PURE__ */ function() {
|
|
7562
|
+
function NumberingPlan(metadata, globalMetadataObject) {
|
|
7563
|
+
_classCallCheck2(this, NumberingPlan);
|
|
7564
|
+
this.globalMetadataObject = globalMetadataObject;
|
|
7565
|
+
this.metadata = metadata;
|
|
7566
|
+
setVersion.call(this, globalMetadataObject.metadata);
|
|
7567
|
+
}
|
|
7568
|
+
return _createClass2(NumberingPlan, [{
|
|
7569
|
+
key: "callingCode",
|
|
7570
|
+
value: function callingCode() {
|
|
7571
|
+
return this.metadata[0];
|
|
7572
|
+
}
|
|
7573
|
+
}, {
|
|
7574
|
+
key: "_getDefaultCountryMetadataForThisCallingCode",
|
|
7575
|
+
value: function _getDefaultCountryMetadataForThisCallingCode() {
|
|
7576
|
+
return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());
|
|
7577
|
+
}
|
|
7578
|
+
}, {
|
|
7579
|
+
key: "getDefaultCountryMetadataForRegion",
|
|
7580
|
+
value: function getDefaultCountryMetadataForRegion() {
|
|
7581
|
+
return this._getDefaultCountryMetadataForThisCallingCode();
|
|
7582
|
+
}
|
|
7583
|
+
}, {
|
|
7584
|
+
key: "IDDPrefix",
|
|
7585
|
+
value: function IDDPrefix() {
|
|
7586
|
+
if (this.v1 || this.v2)
|
|
7587
|
+
return;
|
|
7588
|
+
return this.metadata[1];
|
|
7589
|
+
}
|
|
7590
|
+
}, {
|
|
7591
|
+
key: "defaultIDDPrefix",
|
|
7592
|
+
value: function defaultIDDPrefix() {
|
|
7593
|
+
if (this.v1 || this.v2)
|
|
7594
|
+
return;
|
|
7595
|
+
return this.metadata[12];
|
|
7596
|
+
}
|
|
7597
|
+
}, {
|
|
7598
|
+
key: "nationalNumberPattern",
|
|
7599
|
+
value: function nationalNumberPattern() {
|
|
7600
|
+
if (this.v1 || this.v2)
|
|
7601
|
+
return this.metadata[1];
|
|
7602
|
+
return this.metadata[2];
|
|
7603
|
+
}
|
|
7604
|
+
}, {
|
|
7605
|
+
key: "possibleLengths",
|
|
7606
|
+
value: function possibleLengths() {
|
|
7607
|
+
if (this.v1)
|
|
7608
|
+
return;
|
|
7609
|
+
return this.metadata[this.v2 ? 2 : 3];
|
|
7610
|
+
}
|
|
7611
|
+
}, {
|
|
7612
|
+
key: "_getFormats",
|
|
7613
|
+
value: function _getFormats(metadata) {
|
|
7614
|
+
return metadata[this.v1 ? 2 : this.v2 ? 3 : 4];
|
|
7615
|
+
}
|
|
7616
|
+
}, {
|
|
7617
|
+
key: "formats",
|
|
7618
|
+
value: function formats() {
|
|
7619
|
+
var _this = this;
|
|
7620
|
+
var formats = this._getFormats(this.metadata) || this._getFormats(this._getDefaultCountryMetadataForThisCallingCode()) || [];
|
|
7621
|
+
return formats.map(function(_) {
|
|
7622
|
+
return new Format(_, _this);
|
|
7623
|
+
});
|
|
7624
|
+
}
|
|
7625
|
+
}, {
|
|
7626
|
+
key: "nationalPrefix",
|
|
7627
|
+
value: function nationalPrefix() {
|
|
7628
|
+
return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];
|
|
7629
|
+
}
|
|
7630
|
+
}, {
|
|
7631
|
+
key: "_getNationalPrefixFormattingRule",
|
|
7632
|
+
value: function _getNationalPrefixFormattingRule(metadata) {
|
|
7633
|
+
return metadata[this.v1 ? 4 : this.v2 ? 5 : 6];
|
|
7634
|
+
}
|
|
7635
|
+
}, {
|
|
7636
|
+
key: "nationalPrefixFormattingRule",
|
|
7637
|
+
value: function nationalPrefixFormattingRule() {
|
|
7638
|
+
return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode());
|
|
7639
|
+
}
|
|
7640
|
+
}, {
|
|
7641
|
+
key: "_nationalPrefixForParsing",
|
|
7642
|
+
value: function _nationalPrefixForParsing() {
|
|
7643
|
+
return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];
|
|
7644
|
+
}
|
|
7645
|
+
}, {
|
|
7646
|
+
key: "nationalPrefixForParsing",
|
|
7647
|
+
value: function nationalPrefixForParsing() {
|
|
7648
|
+
return this._nationalPrefixForParsing() || this.nationalPrefix();
|
|
7649
|
+
}
|
|
7650
|
+
}, {
|
|
7651
|
+
key: "nationalPrefixTransformRule",
|
|
7652
|
+
value: function nationalPrefixTransformRule() {
|
|
7653
|
+
return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];
|
|
7654
|
+
}
|
|
7655
|
+
}, {
|
|
7656
|
+
key: "_getNationalPrefixIsOptionalWhenFormatting",
|
|
7657
|
+
value: function _getNationalPrefixIsOptionalWhenFormatting() {
|
|
7658
|
+
return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];
|
|
7659
|
+
}
|
|
7660
|
+
}, {
|
|
7661
|
+
key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
|
|
7662
|
+
value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
|
|
7663
|
+
return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode());
|
|
7664
|
+
}
|
|
7665
|
+
}, {
|
|
7666
|
+
key: "leadingDigits",
|
|
7667
|
+
value: function leadingDigits() {
|
|
7668
|
+
return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];
|
|
7669
|
+
}
|
|
7670
|
+
}, {
|
|
7671
|
+
key: "types",
|
|
7672
|
+
value: function types() {
|
|
7673
|
+
return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];
|
|
7674
|
+
}
|
|
7675
|
+
}, {
|
|
7676
|
+
key: "hasTypes",
|
|
7677
|
+
value: function hasTypes() {
|
|
7678
|
+
if (this.types() && this.types().length === 0) {
|
|
7679
|
+
return false;
|
|
7680
|
+
}
|
|
7681
|
+
return !!this.types();
|
|
7682
|
+
}
|
|
7683
|
+
}, {
|
|
7684
|
+
key: "type",
|
|
7685
|
+
value: function type(_type2) {
|
|
7686
|
+
if (this.hasTypes() && getType(this.types(), _type2)) {
|
|
7687
|
+
return new Type(getType(this.types(), _type2), this);
|
|
7688
|
+
}
|
|
7689
|
+
}
|
|
7690
|
+
}, {
|
|
7691
|
+
key: "ext",
|
|
7692
|
+
value: function ext() {
|
|
7693
|
+
if (this.v1 || this.v2)
|
|
7694
|
+
return DEFAULT_EXT_PREFIX;
|
|
7695
|
+
return this.metadata[13] || DEFAULT_EXT_PREFIX;
|
|
7696
|
+
}
|
|
7697
|
+
}]);
|
|
7698
|
+
}();
|
|
7699
|
+
var Format = /* @__PURE__ */ function() {
|
|
7700
|
+
function Format(format, metadata) {
|
|
7701
|
+
_classCallCheck2(this, Format);
|
|
7702
|
+
this._format = format;
|
|
7703
|
+
this.metadata = metadata;
|
|
7704
|
+
}
|
|
7705
|
+
return _createClass2(Format, [{
|
|
7706
|
+
key: "pattern",
|
|
7707
|
+
value: function pattern() {
|
|
7708
|
+
return this._format[0];
|
|
7709
|
+
}
|
|
7710
|
+
}, {
|
|
7711
|
+
key: "format",
|
|
7712
|
+
value: function format() {
|
|
7713
|
+
return this._format[1];
|
|
7714
|
+
}
|
|
7715
|
+
}, {
|
|
7716
|
+
key: "leadingDigitsPatterns",
|
|
7717
|
+
value: function leadingDigitsPatterns() {
|
|
7718
|
+
return this._format[2] || [];
|
|
7719
|
+
}
|
|
7720
|
+
}, {
|
|
7721
|
+
key: "nationalPrefixFormattingRule",
|
|
7722
|
+
value: function nationalPrefixFormattingRule() {
|
|
7723
|
+
return this._format[3] || this.metadata.nationalPrefixFormattingRule();
|
|
7724
|
+
}
|
|
7725
|
+
}, {
|
|
7726
|
+
key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
|
|
7727
|
+
value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
|
|
7728
|
+
return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
|
|
7729
|
+
}
|
|
7730
|
+
}, {
|
|
7731
|
+
key: "nationalPrefixIsMandatoryWhenFormattingInNationalFormat",
|
|
7732
|
+
value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() {
|
|
7733
|
+
return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
|
|
7734
|
+
}
|
|
7735
|
+
}, {
|
|
7736
|
+
key: "usesNationalPrefix",
|
|
7737
|
+
value: function usesNationalPrefix() {
|
|
7738
|
+
return this.nationalPrefixFormattingRule() && !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()) ? true : false;
|
|
7739
|
+
}
|
|
7740
|
+
}, {
|
|
7741
|
+
key: "internationalFormat",
|
|
7742
|
+
value: function internationalFormat() {
|
|
7743
|
+
return this._format[5] || this.format();
|
|
7744
|
+
}
|
|
7745
|
+
}]);
|
|
7746
|
+
}();
|
|
7747
|
+
var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
|
|
7748
|
+
var Type = /* @__PURE__ */ function() {
|
|
7749
|
+
function Type(type, metadata) {
|
|
7750
|
+
_classCallCheck2(this, Type);
|
|
7751
|
+
this.type = type;
|
|
7752
|
+
this.metadata = metadata;
|
|
7753
|
+
}
|
|
7754
|
+
return _createClass2(Type, [{
|
|
7755
|
+
key: "pattern",
|
|
7756
|
+
value: function pattern() {
|
|
7757
|
+
if (this.metadata.v1)
|
|
7758
|
+
return this.type;
|
|
7759
|
+
return this.type[0];
|
|
7760
|
+
}
|
|
7761
|
+
}, {
|
|
7762
|
+
key: "possibleLengths",
|
|
7763
|
+
value: function possibleLengths() {
|
|
7764
|
+
if (this.metadata.v1)
|
|
7765
|
+
return;
|
|
7766
|
+
return this.type[1] || this.metadata.possibleLengths();
|
|
7767
|
+
}
|
|
7768
|
+
}]);
|
|
7769
|
+
}();
|
|
7770
|
+
function getType(types, type) {
|
|
7771
|
+
switch (type) {
|
|
7772
|
+
case "FIXED_LINE":
|
|
7773
|
+
return types[0];
|
|
7774
|
+
case "MOBILE":
|
|
7775
|
+
return types[1];
|
|
7776
|
+
case "TOLL_FREE":
|
|
7777
|
+
return types[2];
|
|
7778
|
+
case "PREMIUM_RATE":
|
|
7779
|
+
return types[3];
|
|
7780
|
+
case "PERSONAL_NUMBER":
|
|
7781
|
+
return types[4];
|
|
7782
|
+
case "VOICEMAIL":
|
|
7783
|
+
return types[5];
|
|
7784
|
+
case "UAN":
|
|
7785
|
+
return types[6];
|
|
7786
|
+
case "PAGER":
|
|
7787
|
+
return types[7];
|
|
7788
|
+
case "VOIP":
|
|
7789
|
+
return types[8];
|
|
7790
|
+
case "SHARED_COST":
|
|
7791
|
+
return types[9];
|
|
7792
|
+
}
|
|
7793
|
+
}
|
|
7794
|
+
function validateMetadata(metadata) {
|
|
7795
|
+
if (!metadata) {
|
|
7796
|
+
throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");
|
|
7797
|
+
}
|
|
7798
|
+
if (!isObject2(metadata) || !isObject2(metadata.countries)) {
|
|
7799
|
+
throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(isObject2(metadata) ? "an object of shape: { " + Object.keys(metadata).join(", ") + " }" : "a " + typeOf(metadata) + ": " + metadata, "."));
|
|
7800
|
+
}
|
|
7801
|
+
}
|
|
7802
|
+
var typeOf = function typeOf(_) {
|
|
7803
|
+
return _typeof3(_);
|
|
7804
|
+
};
|
|
7805
|
+
function getCountryCallingCode(country, metadataJson) {
|
|
7806
|
+
var metadata = new Metadata(metadataJson);
|
|
7807
|
+
if (metadata.hasCountry(country)) {
|
|
7808
|
+
return metadata.selectNumberingPlan(country).countryCallingCode();
|
|
7809
|
+
}
|
|
7810
|
+
throw new Error("Unknown country: ".concat(country));
|
|
7811
|
+
}
|
|
7812
|
+
function isSupportedCountry(country, metadataJson) {
|
|
7813
|
+
return metadataJson.countries.hasOwnProperty(country);
|
|
7814
|
+
}
|
|
7815
|
+
function setVersion(metadata) {
|
|
7816
|
+
var version = metadata.version;
|
|
7817
|
+
if (typeof version === "number") {
|
|
7818
|
+
this.v1 = version === 1;
|
|
7819
|
+
this.v2 = version === 2;
|
|
7820
|
+
this.v3 = version === 3;
|
|
7821
|
+
this.v4 = version === 4;
|
|
7822
|
+
} else {
|
|
7823
|
+
if (!version) {
|
|
7824
|
+
this.v1 = true;
|
|
7825
|
+
} else if (semver_compare_default(version, V3) === -1) {
|
|
7826
|
+
this.v2 = true;
|
|
7827
|
+
} else if (semver_compare_default(version, V4) === -1) {
|
|
7828
|
+
this.v3 = true;
|
|
7829
|
+
} else {
|
|
7830
|
+
this.v4 = true;
|
|
7831
|
+
}
|
|
7832
|
+
}
|
|
7081
7833
|
}
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7834
|
+
|
|
7835
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js
|
|
7836
|
+
var RFC3966_EXTN_PREFIX = ";ext=";
|
|
7837
|
+
var getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {
|
|
7838
|
+
return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})");
|
|
7839
|
+
};
|
|
7840
|
+
function createExtensionPattern(purpose) {
|
|
7841
|
+
var extLimitAfterExplicitLabel = "20";
|
|
7842
|
+
var extLimitAfterLikelyLabel = "15";
|
|
7843
|
+
var extLimitAfterAmbiguousChar = "9";
|
|
7844
|
+
var extLimitWhenNotSure = "6";
|
|
7845
|
+
var possibleSeparatorsBetweenNumberAndExtLabel = "[ \\t,]*";
|
|
7846
|
+
var possibleCharsAfterExtLabel = "[:\\..]?[ \\t,-]*";
|
|
7847
|
+
var optionalExtnSuffix = "#?";
|
|
7848
|
+
var explicitExtLabels = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)";
|
|
7849
|
+
var ambiguousExtLabels = "(?:[xx##~~]|int|int)";
|
|
7850
|
+
var ambiguousSeparator = "[- ]+";
|
|
7851
|
+
var possibleSeparatorsNumberExtLabelNoComma = "[ \\t]*";
|
|
7852
|
+
var autoDiallingAndExtLabelsFound = "(?:,{2}|;)";
|
|
7853
|
+
var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);
|
|
7854
|
+
var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;
|
|
7855
|
+
var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
|
|
7856
|
+
var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#";
|
|
7857
|
+
var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;
|
|
7858
|
+
var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
|
|
7859
|
+
return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn;
|
|
7085
7860
|
}
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7861
|
+
|
|
7862
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js
|
|
7863
|
+
var MIN_LENGTH_PHONE_NUMBER_PATTERN = "[" + VALID_DIGITS + "]{" + MIN_LENGTH_FOR_NSN + "}";
|
|
7864
|
+
var VALID_PHONE_NUMBER = "[" + PLUS_CHARS + "]{0,1}" + "(?:" + "[" + VALID_PUNCTUATION + "]*" + "[" + VALID_DIGITS + "]" + "){3,}" + "[" + VALID_PUNCTUATION + VALID_DIGITS + "]*";
|
|
7865
|
+
var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp("^" + "[" + PLUS_CHARS + "]{0,1}" + "(?:" + "[" + VALID_PUNCTUATION + "]*" + "[" + VALID_DIGITS + "]" + "){1,2}" + "$", "i");
|
|
7866
|
+
var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER + "(?:" + createExtensionPattern() + ")?";
|
|
7867
|
+
var VALID_PHONE_NUMBER_PATTERN = new RegExp("^" + MIN_LENGTH_PHONE_NUMBER_PATTERN + "$" + "|" + "^" + VALID_PHONE_NUMBER_WITH_EXTENSION + "$", "i");
|
|
7868
|
+
function isViablePhoneNumber(number) {
|
|
7869
|
+
return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);
|
|
7870
|
+
}
|
|
7871
|
+
function isViablePhoneNumberStart(number) {
|
|
7872
|
+
return VALID_PHONE_NUMBER_START_REG_EXP.test(number);
|
|
7095
7873
|
}
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
const composition = selectedExactComposition ?? (exactCompositions.length === 1 ? exactCompositions[0] : null);
|
|
7104
|
-
const plan = composition ? buildGenderSlotPlan(composition, captainGender) : null;
|
|
7105
|
-
return plan?.every((requiredGender) => allowedGenders.includes(requiredGender)) ? plan : null;
|
|
7874
|
+
|
|
7875
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js
|
|
7876
|
+
var EXTN_PATTERN = new RegExp("(?:" + createExtensionPattern() + ")$", "i");
|
|
7877
|
+
function extractExtension(number) {
|
|
7878
|
+
var start = number.search(EXTN_PATTERN);
|
|
7879
|
+
if (start < 0) {
|
|
7880
|
+
return {};
|
|
7106
7881
|
}
|
|
7107
|
-
|
|
7108
|
-
|
|
7882
|
+
var numberWithoutExtension = number.slice(0, start);
|
|
7883
|
+
var matches = number.match(EXTN_PATTERN);
|
|
7884
|
+
var i = 1;
|
|
7885
|
+
while (i < matches.length) {
|
|
7886
|
+
if (matches[i]) {
|
|
7887
|
+
return {
|
|
7888
|
+
number: numberWithoutExtension,
|
|
7889
|
+
ext: matches[i]
|
|
7890
|
+
};
|
|
7891
|
+
}
|
|
7892
|
+
i++;
|
|
7109
7893
|
}
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7894
|
+
}
|
|
7895
|
+
|
|
7896
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/parseDigits.js
|
|
7897
|
+
var DIGITS = {
|
|
7898
|
+
"0": "0",
|
|
7899
|
+
"1": "1",
|
|
7900
|
+
"2": "2",
|
|
7901
|
+
"3": "3",
|
|
7902
|
+
"4": "4",
|
|
7903
|
+
"5": "5",
|
|
7904
|
+
"6": "6",
|
|
7905
|
+
"7": "7",
|
|
7906
|
+
"8": "8",
|
|
7907
|
+
"9": "9",
|
|
7908
|
+
"0": "0",
|
|
7909
|
+
"1": "1",
|
|
7910
|
+
"2": "2",
|
|
7911
|
+
"3": "3",
|
|
7912
|
+
"4": "4",
|
|
7913
|
+
"5": "5",
|
|
7914
|
+
"6": "6",
|
|
7915
|
+
"7": "7",
|
|
7916
|
+
"8": "8",
|
|
7917
|
+
"9": "9",
|
|
7918
|
+
"٠": "0",
|
|
7919
|
+
"١": "1",
|
|
7920
|
+
"٢": "2",
|
|
7921
|
+
"٣": "3",
|
|
7922
|
+
"٤": "4",
|
|
7923
|
+
"٥": "5",
|
|
7924
|
+
"٦": "6",
|
|
7925
|
+
"٧": "7",
|
|
7926
|
+
"٨": "8",
|
|
7927
|
+
"٩": "9",
|
|
7928
|
+
"۰": "0",
|
|
7929
|
+
"۱": "1",
|
|
7930
|
+
"۲": "2",
|
|
7931
|
+
"۳": "3",
|
|
7932
|
+
"۴": "4",
|
|
7933
|
+
"۵": "5",
|
|
7934
|
+
"۶": "6",
|
|
7935
|
+
"۷": "7",
|
|
7936
|
+
"۸": "8",
|
|
7937
|
+
"۹": "9"
|
|
7938
|
+
};
|
|
7939
|
+
function parseDigit(character) {
|
|
7940
|
+
return DIGITS[character];
|
|
7941
|
+
}
|
|
7942
|
+
|
|
7943
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js
|
|
7944
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
7945
|
+
var t = typeof Symbol != "undefined" && r[Symbol.iterator] || r["@@iterator"];
|
|
7946
|
+
if (t)
|
|
7947
|
+
return (t = t.call(r)).next.bind(t);
|
|
7948
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray2(r)) || e && r && typeof r.length == "number") {
|
|
7949
|
+
t && (r = t);
|
|
7950
|
+
var o = 0;
|
|
7951
|
+
return function() {
|
|
7952
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
7953
|
+
};
|
|
7114
7954
|
}
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
...Array.from({ length: teamSize - 2 }, () => captainGender)
|
|
7125
|
-
];
|
|
7955
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
7956
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
7957
|
+
}
|
|
7958
|
+
function _unsupportedIterableToArray2(r, a) {
|
|
7959
|
+
if (r) {
|
|
7960
|
+
if (typeof r == "string")
|
|
7961
|
+
return _arrayLikeToArray2(r, a);
|
|
7962
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
7963
|
+
return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray2(r, a) : undefined;
|
|
7126
7964
|
}
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7965
|
+
}
|
|
7966
|
+
function _arrayLikeToArray2(r, a) {
|
|
7967
|
+
(a == null || a > r.length) && (a = r.length);
|
|
7968
|
+
for (var e = 0, n = Array(a);e < a; e++)
|
|
7969
|
+
n[e] = r[e];
|
|
7970
|
+
return n;
|
|
7971
|
+
}
|
|
7972
|
+
function parseIncompletePhoneNumber(string) {
|
|
7973
|
+
var result = "";
|
|
7974
|
+
for (var _iterator = _createForOfIteratorHelperLoose(string.split("")), _step;!(_step = _iterator()).done; ) {
|
|
7975
|
+
var character = _step.value;
|
|
7976
|
+
result += parsePhoneNumberCharacter(character, result) || "";
|
|
7134
7977
|
}
|
|
7135
|
-
return
|
|
7978
|
+
return result;
|
|
7136
7979
|
}
|
|
7137
|
-
function
|
|
7138
|
-
if (
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
return { code: "gender-not-allowed", gender: invalidGender, allowed: allowedGenders };
|
|
7980
|
+
function parsePhoneNumberCharacter(character, prevParsedCharacters, eventListener) {
|
|
7981
|
+
if (character === "+") {
|
|
7982
|
+
if (prevParsedCharacters) {
|
|
7983
|
+
if (typeof eventListener === "function") {
|
|
7984
|
+
eventListener("end");
|
|
7985
|
+
}
|
|
7986
|
+
return;
|
|
7987
|
+
}
|
|
7988
|
+
return "+";
|
|
7147
7989
|
}
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7990
|
+
return parseDigit(character);
|
|
7991
|
+
}
|
|
7992
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/mergeArrays.js
|
|
7993
|
+
function _createForOfIteratorHelperLoose2(r, e) {
|
|
7994
|
+
var t = typeof Symbol != "undefined" && r[Symbol.iterator] || r["@@iterator"];
|
|
7995
|
+
if (t)
|
|
7996
|
+
return (t = t.call(r)).next.bind(t);
|
|
7997
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray3(r)) || e && r && typeof r.length == "number") {
|
|
7998
|
+
t && (r = t);
|
|
7999
|
+
var o = 0;
|
|
8000
|
+
return function() {
|
|
8001
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
8002
|
+
};
|
|
8003
|
+
}
|
|
8004
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
8005
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
8006
|
+
}
|
|
8007
|
+
function _unsupportedIterableToArray3(r, a) {
|
|
8008
|
+
if (r) {
|
|
8009
|
+
if (typeof r == "string")
|
|
8010
|
+
return _arrayLikeToArray3(r, a);
|
|
8011
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
8012
|
+
return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray3(r, a) : undefined;
|
|
8013
|
+
}
|
|
8014
|
+
}
|
|
8015
|
+
function _arrayLikeToArray3(r, a) {
|
|
8016
|
+
(a == null || a > r.length) && (a = r.length);
|
|
8017
|
+
for (var e = 0, n = Array(a);e < a; e++)
|
|
8018
|
+
n[e] = r[e];
|
|
8019
|
+
return n;
|
|
8020
|
+
}
|
|
8021
|
+
function mergeArrays(a, b) {
|
|
8022
|
+
var merged = a.slice();
|
|
8023
|
+
for (var _iterator = _createForOfIteratorHelperLoose2(b), _step;!(_step = _iterator()).done; ) {
|
|
8024
|
+
var element = _step.value;
|
|
8025
|
+
if (a.indexOf(element) < 0) {
|
|
8026
|
+
merged.push(element);
|
|
8027
|
+
}
|
|
8028
|
+
}
|
|
8029
|
+
return merged.sort(function(a, b) {
|
|
8030
|
+
return a - b;
|
|
8031
|
+
});
|
|
8032
|
+
}
|
|
8033
|
+
|
|
8034
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js
|
|
8035
|
+
function checkNumberLength(nationalNumber, country, metadata) {
|
|
8036
|
+
return checkNumberLengthForType(nationalNumber, undefined, country, metadata);
|
|
8037
|
+
}
|
|
8038
|
+
function checkNumberLengthForType(nationalNumber, type, country, metadata) {
|
|
8039
|
+
if (country) {
|
|
8040
|
+
metadata = new Metadata(metadata.metadata);
|
|
8041
|
+
metadata.selectNumberingPlan(country);
|
|
8042
|
+
}
|
|
8043
|
+
var type_info = metadata.type(type);
|
|
8044
|
+
var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths();
|
|
8045
|
+
if (!possible_lengths) {
|
|
8046
|
+
return "IS_POSSIBLE";
|
|
8047
|
+
}
|
|
8048
|
+
if (type === "FIXED_LINE_OR_MOBILE") {
|
|
8049
|
+
if (!metadata.type("FIXED_LINE")) {
|
|
8050
|
+
return checkNumberLengthForType(nationalNumber, "MOBILE", country, metadata);
|
|
8051
|
+
}
|
|
8052
|
+
var mobile_type = metadata.type("MOBILE");
|
|
8053
|
+
if (mobile_type) {
|
|
8054
|
+
possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths());
|
|
8055
|
+
}
|
|
8056
|
+
} else if (type && !type_info) {
|
|
8057
|
+
return "INVALID_LENGTH";
|
|
8058
|
+
}
|
|
8059
|
+
var actual_length = nationalNumber.length;
|
|
8060
|
+
var minimum_length = possible_lengths[0];
|
|
8061
|
+
if (minimum_length === actual_length) {
|
|
8062
|
+
return "IS_POSSIBLE";
|
|
8063
|
+
}
|
|
8064
|
+
if (minimum_length > actual_length) {
|
|
8065
|
+
return "TOO_SHORT";
|
|
8066
|
+
}
|
|
8067
|
+
if (possible_lengths[possible_lengths.length - 1] < actual_length) {
|
|
8068
|
+
return "TOO_LONG";
|
|
8069
|
+
}
|
|
8070
|
+
return possible_lengths.indexOf(actual_length, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
|
|
8071
|
+
}
|
|
8072
|
+
|
|
8073
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/isPossible.js
|
|
8074
|
+
function isPossiblePhoneNumber(input, options, metadataJson) {
|
|
8075
|
+
if (options === undefined) {
|
|
8076
|
+
options = {};
|
|
8077
|
+
}
|
|
8078
|
+
var metadata = new Metadata(metadataJson);
|
|
8079
|
+
if (options.v2) {
|
|
8080
|
+
if (!input.countryCallingCode) {
|
|
8081
|
+
throw new Error("Invalid phone number object passed");
|
|
8082
|
+
}
|
|
8083
|
+
metadata.selectNumberingPlan(input.country || input.countryCallingCode);
|
|
8084
|
+
} else {
|
|
8085
|
+
if (!input.phone) {
|
|
8086
|
+
return false;
|
|
8087
|
+
}
|
|
8088
|
+
if (input.country) {
|
|
8089
|
+
if (!metadata.hasCountry(input.country)) {
|
|
8090
|
+
throw new Error("Unknown country: ".concat(input.country));
|
|
8091
|
+
}
|
|
8092
|
+
metadata.selectNumberingPlan(input.country);
|
|
8093
|
+
} else {
|
|
8094
|
+
if (!input.countryCallingCode) {
|
|
8095
|
+
throw new Error("Invalid phone number object passed");
|
|
8096
|
+
}
|
|
8097
|
+
metadata.selectNumberingPlan(input.countryCallingCode);
|
|
8098
|
+
}
|
|
8099
|
+
}
|
|
8100
|
+
if (metadata.possibleLengths()) {
|
|
8101
|
+
return isPossibleNumber(input.phone || input.nationalNumber, metadata);
|
|
8102
|
+
}
|
|
8103
|
+
if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {
|
|
8104
|
+
return true;
|
|
8105
|
+
}
|
|
8106
|
+
throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
|
|
8107
|
+
}
|
|
8108
|
+
function isPossibleNumber(nationalNumber, metadata) {
|
|
8109
|
+
switch (checkNumberLength(nationalNumber, undefined, metadata)) {
|
|
8110
|
+
case "IS_POSSIBLE":
|
|
8111
|
+
return true;
|
|
8112
|
+
default:
|
|
8113
|
+
return false;
|
|
8114
|
+
}
|
|
8115
|
+
}
|
|
8116
|
+
|
|
8117
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js
|
|
8118
|
+
function matchesEntirely(text, regularExpressionText) {
|
|
8119
|
+
text = text || "";
|
|
8120
|
+
return new RegExp("^(?:" + regularExpressionText + ")$").test(text);
|
|
8121
|
+
}
|
|
8122
|
+
|
|
8123
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/getNumberType.js
|
|
8124
|
+
function _createForOfIteratorHelperLoose3(r, e) {
|
|
8125
|
+
var t = typeof Symbol != "undefined" && r[Symbol.iterator] || r["@@iterator"];
|
|
8126
|
+
if (t)
|
|
8127
|
+
return (t = t.call(r)).next.bind(t);
|
|
8128
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray4(r)) || e && r && typeof r.length == "number") {
|
|
8129
|
+
t && (r = t);
|
|
8130
|
+
var o = 0;
|
|
8131
|
+
return function() {
|
|
8132
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
8133
|
+
};
|
|
8134
|
+
}
|
|
8135
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
8136
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
8137
|
+
}
|
|
8138
|
+
function _unsupportedIterableToArray4(r, a) {
|
|
8139
|
+
if (r) {
|
|
8140
|
+
if (typeof r == "string")
|
|
8141
|
+
return _arrayLikeToArray4(r, a);
|
|
8142
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
8143
|
+
return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray4(r, a) : undefined;
|
|
8144
|
+
}
|
|
8145
|
+
}
|
|
8146
|
+
function _arrayLikeToArray4(r, a) {
|
|
8147
|
+
(a == null || a > r.length) && (a = r.length);
|
|
8148
|
+
for (var e = 0, n = Array(a);e < a; e++)
|
|
8149
|
+
n[e] = r[e];
|
|
8150
|
+
return n;
|
|
8151
|
+
}
|
|
8152
|
+
var NON_FIXED_LINE_PHONE_TYPES = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
|
|
8153
|
+
function getNumberType(input, options, metadataJson) {
|
|
8154
|
+
options = options || {};
|
|
8155
|
+
if (!input.country && !input.countryCallingCode) {
|
|
8156
|
+
return;
|
|
8157
|
+
}
|
|
8158
|
+
var metadata = new Metadata(metadataJson);
|
|
8159
|
+
metadata.selectNumberingPlan(input.country || input.countryCallingCode);
|
|
8160
|
+
var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
|
|
8161
|
+
if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {
|
|
8162
|
+
return;
|
|
8163
|
+
}
|
|
8164
|
+
if (isNumberTypeEqualTo(nationalNumber, "FIXED_LINE", metadata)) {
|
|
8165
|
+
if (metadata.type("MOBILE") && metadata.type("MOBILE").pattern() === "") {
|
|
8166
|
+
return "FIXED_LINE_OR_MOBILE";
|
|
8167
|
+
}
|
|
8168
|
+
if (!metadata.type("MOBILE")) {
|
|
8169
|
+
return "FIXED_LINE_OR_MOBILE";
|
|
8170
|
+
}
|
|
8171
|
+
if (isNumberTypeEqualTo(nationalNumber, "MOBILE", metadata)) {
|
|
8172
|
+
return "FIXED_LINE_OR_MOBILE";
|
|
8173
|
+
}
|
|
8174
|
+
return "FIXED_LINE";
|
|
8175
|
+
}
|
|
8176
|
+
for (var _iterator = _createForOfIteratorHelperLoose3(NON_FIXED_LINE_PHONE_TYPES), _step;!(_step = _iterator()).done; ) {
|
|
8177
|
+
var type = _step.value;
|
|
8178
|
+
if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {
|
|
8179
|
+
return type;
|
|
8180
|
+
}
|
|
8181
|
+
}
|
|
8182
|
+
}
|
|
8183
|
+
function isNumberTypeEqualTo(nationalNumber, type, metadata) {
|
|
8184
|
+
var typeDefinition = metadata.type(type);
|
|
8185
|
+
if (!typeDefinition || !typeDefinition.pattern()) {
|
|
8186
|
+
return false;
|
|
8187
|
+
}
|
|
8188
|
+
if (typeDefinition.possibleLengths() && typeDefinition.possibleLengths().indexOf(nationalNumber.length) < 0) {
|
|
8189
|
+
return false;
|
|
8190
|
+
}
|
|
8191
|
+
return matchesEntirely(nationalNumber, typeDefinition.pattern());
|
|
8192
|
+
}
|
|
8193
|
+
|
|
8194
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/isValid.js
|
|
8195
|
+
function isValidNumber(input, options, metadataJson) {
|
|
8196
|
+
options = options || {};
|
|
8197
|
+
var metadata = new Metadata(metadataJson);
|
|
8198
|
+
metadata.selectNumberingPlan(input.country || input.countryCallingCode);
|
|
8199
|
+
if (metadata.hasTypes()) {
|
|
8200
|
+
return getNumberType(input, options, metadata.metadata) !== undefined;
|
|
8201
|
+
}
|
|
8202
|
+
var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
|
|
8203
|
+
return matchesEntirely(nationalNumber, metadata.nationalNumberPattern());
|
|
8204
|
+
}
|
|
8205
|
+
|
|
8206
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/isCountryCode.js
|
|
8207
|
+
var COUNTRY_CODE_REG_EXP = /^[A-Z]{2}$/;
|
|
8208
|
+
function isCountryCode(string) {
|
|
8209
|
+
return COUNTRY_CODE_REG_EXP.test(string);
|
|
8210
|
+
}
|
|
8211
|
+
|
|
8212
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/getCountryAndCallingCodeFromOneOfThem.js
|
|
8213
|
+
var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
|
|
8214
|
+
function getCountryAndCallingCodeFromOneOfThem(countryOrCallingCode, metadataJson) {
|
|
8215
|
+
var country;
|
|
8216
|
+
var callingCode;
|
|
8217
|
+
var metadata = new Metadata(metadataJson);
|
|
8218
|
+
if (isCountryCode(countryOrCallingCode)) {
|
|
8219
|
+
country = countryOrCallingCode;
|
|
8220
|
+
metadata.selectNumberingPlan(country);
|
|
8221
|
+
callingCode = metadata.countryCallingCode();
|
|
8222
|
+
} else {
|
|
8223
|
+
callingCode = countryOrCallingCode;
|
|
8224
|
+
if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {
|
|
8225
|
+
if (metadata.isNonGeographicCallingCode(callingCode)) {
|
|
8226
|
+
country = "001";
|
|
8227
|
+
}
|
|
8228
|
+
}
|
|
8229
|
+
}
|
|
8230
|
+
return {
|
|
8231
|
+
country,
|
|
8232
|
+
callingCode
|
|
8233
|
+
};
|
|
8234
|
+
}
|
|
8235
|
+
|
|
8236
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js
|
|
8237
|
+
function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {
|
|
8238
|
+
var _metadata = new Metadata(metadata);
|
|
8239
|
+
var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);
|
|
8240
|
+
if (!possibleCountries) {
|
|
8241
|
+
return [];
|
|
8242
|
+
}
|
|
8243
|
+
return possibleCountries.filter(function(country) {
|
|
8244
|
+
return couldNationalNumberBelongToCountry(nationalNumber, country, metadata);
|
|
8245
|
+
});
|
|
8246
|
+
}
|
|
8247
|
+
function couldNationalNumberBelongToCountry(nationalNumber, country, metadataJson) {
|
|
8248
|
+
var metadata = new Metadata(metadataJson);
|
|
8249
|
+
metadata.selectNumberingPlan(country);
|
|
8250
|
+
return metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0;
|
|
8251
|
+
}
|
|
8252
|
+
|
|
8253
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js
|
|
8254
|
+
var CAPTURING_DIGIT_PATTERN = new RegExp("([" + VALID_DIGITS + "])");
|
|
8255
|
+
function stripIddPrefix(number, country, callingCode, metadataJson) {
|
|
8256
|
+
if (!country) {
|
|
8257
|
+
return;
|
|
8258
|
+
}
|
|
8259
|
+
var metadata = new Metadata(metadataJson);
|
|
8260
|
+
metadata.selectNumberingPlan(country || callingCode);
|
|
8261
|
+
var IDDPrefixPattern = new RegExp(metadata.IDDPrefix());
|
|
8262
|
+
if (number.search(IDDPrefixPattern) !== 0) {
|
|
8263
|
+
return;
|
|
8264
|
+
}
|
|
8265
|
+
number = number.slice(number.match(IDDPrefixPattern)[0].length);
|
|
8266
|
+
var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);
|
|
8267
|
+
if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {
|
|
8268
|
+
if (matchedGroups[1] === "0") {
|
|
8269
|
+
return;
|
|
8270
|
+
}
|
|
8271
|
+
}
|
|
8272
|
+
return number;
|
|
8273
|
+
}
|
|
8274
|
+
|
|
8275
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js
|
|
8276
|
+
function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {
|
|
8277
|
+
if (number && metadata.numberingPlan.nationalPrefixForParsing()) {
|
|
8278
|
+
var prefixPattern = new RegExp("^(?:" + metadata.numberingPlan.nationalPrefixForParsing() + ")");
|
|
8279
|
+
var prefixMatch = prefixPattern.exec(number);
|
|
8280
|
+
if (prefixMatch) {
|
|
8281
|
+
var nationalNumber;
|
|
8282
|
+
var carrierCode;
|
|
8283
|
+
var capturedGroupsCount = prefixMatch.length - 1;
|
|
8284
|
+
var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount];
|
|
8285
|
+
if (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {
|
|
8286
|
+
nationalNumber = number.replace(prefixPattern, metadata.nationalPrefixTransformRule());
|
|
8287
|
+
if (capturedGroupsCount > 1) {
|
|
8288
|
+
carrierCode = prefixMatch[1];
|
|
8289
|
+
}
|
|
8290
|
+
} else {
|
|
8291
|
+
var prefixBeforeNationalNumber = prefixMatch[0];
|
|
8292
|
+
nationalNumber = number.slice(prefixBeforeNationalNumber.length);
|
|
8293
|
+
if (hasCapturedGroups) {
|
|
8294
|
+
carrierCode = prefixMatch[1];
|
|
8295
|
+
}
|
|
8296
|
+
}
|
|
8297
|
+
var nationalPrefix;
|
|
8298
|
+
if (hasCapturedGroups) {
|
|
8299
|
+
var possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1]);
|
|
8300
|
+
var possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup);
|
|
8301
|
+
if (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {
|
|
8302
|
+
nationalPrefix = metadata.numberingPlan.nationalPrefix();
|
|
8303
|
+
}
|
|
8304
|
+
} else {
|
|
8305
|
+
nationalPrefix = prefixMatch[0];
|
|
8306
|
+
}
|
|
8307
|
+
return {
|
|
8308
|
+
nationalNumber,
|
|
8309
|
+
nationalPrefix,
|
|
8310
|
+
carrierCode
|
|
8311
|
+
};
|
|
8312
|
+
}
|
|
8313
|
+
}
|
|
8314
|
+
return {
|
|
8315
|
+
nationalNumber: number
|
|
8316
|
+
};
|
|
8317
|
+
}
|
|
8318
|
+
|
|
8319
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js
|
|
8320
|
+
function _createForOfIteratorHelperLoose4(r, e) {
|
|
8321
|
+
var t = typeof Symbol != "undefined" && r[Symbol.iterator] || r["@@iterator"];
|
|
8322
|
+
if (t)
|
|
8323
|
+
return (t = t.call(r)).next.bind(t);
|
|
8324
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray5(r)) || e && r && typeof r.length == "number") {
|
|
8325
|
+
t && (r = t);
|
|
8326
|
+
var o = 0;
|
|
8327
|
+
return function() {
|
|
8328
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
8329
|
+
};
|
|
8330
|
+
}
|
|
8331
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
8332
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
8333
|
+
}
|
|
8334
|
+
function _unsupportedIterableToArray5(r, a) {
|
|
8335
|
+
if (r) {
|
|
8336
|
+
if (typeof r == "string")
|
|
8337
|
+
return _arrayLikeToArray5(r, a);
|
|
8338
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
8339
|
+
return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray5(r, a) : undefined;
|
|
8340
|
+
}
|
|
8341
|
+
}
|
|
8342
|
+
function _arrayLikeToArray5(r, a) {
|
|
8343
|
+
(a == null || a > r.length) && (a = r.length);
|
|
8344
|
+
for (var e = 0, n = Array(a);e < a; e++)
|
|
8345
|
+
n[e] = r[e];
|
|
8346
|
+
return n;
|
|
8347
|
+
}
|
|
8348
|
+
function getCountryByNationalNumber(nationalNumber, countries, metadataJson) {
|
|
8349
|
+
var metadata = new Metadata(metadataJson);
|
|
8350
|
+
for (var _iterator = _createForOfIteratorHelperLoose4(countries), _step;!(_step = _iterator()).done; ) {
|
|
8351
|
+
var country = _step.value;
|
|
8352
|
+
metadata.selectNumberingPlan(country);
|
|
8353
|
+
if (metadata.leadingDigits()) {
|
|
8354
|
+
if (nationalNumber && nationalNumber.search(metadata.leadingDigits()) === 0) {
|
|
8355
|
+
return country;
|
|
8356
|
+
}
|
|
8357
|
+
} else if (getNumberType({
|
|
8358
|
+
phone: nationalNumber,
|
|
8359
|
+
country
|
|
8360
|
+
}, undefined, metadata.metadata)) {
|
|
8361
|
+
return country;
|
|
8362
|
+
}
|
|
8363
|
+
}
|
|
8364
|
+
}
|
|
8365
|
+
|
|
8366
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js
|
|
8367
|
+
var USE_NON_GEOGRAPHIC_COUNTRY_CODE2 = false;
|
|
8368
|
+
function getCountryByCallingCode(callingCode, _ref) {
|
|
8369
|
+
var { nationalNumber, metadata } = _ref;
|
|
8370
|
+
if (USE_NON_GEOGRAPHIC_COUNTRY_CODE2) {
|
|
8371
|
+
if (metadata.isNonGeographicCallingCode(callingCode)) {
|
|
8372
|
+
return "001";
|
|
8373
|
+
}
|
|
8374
|
+
}
|
|
8375
|
+
var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);
|
|
8376
|
+
if (!possibleCountries) {
|
|
8377
|
+
return;
|
|
8378
|
+
}
|
|
8379
|
+
if (possibleCountries.length === 1) {
|
|
8380
|
+
return possibleCountries[0];
|
|
8381
|
+
}
|
|
8382
|
+
return getCountryByNationalNumber(nationalNumber, possibleCountries, metadata.metadata);
|
|
8383
|
+
}
|
|
8384
|
+
|
|
8385
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js
|
|
8386
|
+
function extractNationalNumber(number, country, metadata) {
|
|
8387
|
+
var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(number, metadata), { carrierCode, nationalNumber } = _extractNationalNumbe;
|
|
8388
|
+
if (nationalNumber !== number) {
|
|
8389
|
+
if (!shouldHaveExtractedNationalPrefix(number, nationalNumber, metadata)) {
|
|
8390
|
+
return {
|
|
8391
|
+
nationalNumber: number
|
|
8392
|
+
};
|
|
8393
|
+
}
|
|
8394
|
+
if (metadata.numberingPlan.possibleLengths()) {
|
|
8395
|
+
if (!country) {
|
|
8396
|
+
country = getCountryByCallingCode(metadata.numberingPlan.callingCode(), {
|
|
8397
|
+
nationalNumber,
|
|
8398
|
+
metadata
|
|
8399
|
+
});
|
|
8400
|
+
}
|
|
8401
|
+
if (!isPossibleIncompleteNationalNumber(nationalNumber, country, metadata)) {
|
|
8402
|
+
return {
|
|
8403
|
+
nationalNumber: number
|
|
8404
|
+
};
|
|
8405
|
+
}
|
|
8406
|
+
}
|
|
8407
|
+
}
|
|
8408
|
+
return {
|
|
8409
|
+
nationalNumber,
|
|
8410
|
+
carrierCode
|
|
8411
|
+
};
|
|
8412
|
+
}
|
|
8413
|
+
function shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata) {
|
|
8414
|
+
if (matchesEntirely(nationalNumberBefore, metadata.nationalNumberPattern()) && !matchesEntirely(nationalNumberAfter, metadata.nationalNumberPattern())) {
|
|
8415
|
+
return false;
|
|
8416
|
+
}
|
|
8417
|
+
return true;
|
|
8418
|
+
}
|
|
8419
|
+
function isPossibleIncompleteNationalNumber(nationalNumber, country, metadata) {
|
|
8420
|
+
switch (checkNumberLength(nationalNumber, country, metadata)) {
|
|
8421
|
+
case "TOO_SHORT":
|
|
8422
|
+
case "INVALID_LENGTH":
|
|
8423
|
+
return false;
|
|
8424
|
+
default:
|
|
8425
|
+
return true;
|
|
8426
|
+
}
|
|
8427
|
+
}
|
|
8428
|
+
|
|
8429
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js
|
|
8430
|
+
function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode, metadataJson) {
|
|
8431
|
+
if (!(country || defaultCountry || defaultCallingCode)) {
|
|
8432
|
+
return {
|
|
8433
|
+
number
|
|
8434
|
+
};
|
|
8435
|
+
}
|
|
8436
|
+
var countryCallingCode = country || defaultCountry ? getCountryCallingCode(country || defaultCountry, metadataJson) : defaultCallingCode;
|
|
8437
|
+
if (number.indexOf(countryCallingCode) === 0) {
|
|
8438
|
+
var metadata = new Metadata(metadataJson);
|
|
8439
|
+
metadata.selectNumberingPlan(country || defaultCountry || defaultCallingCode);
|
|
8440
|
+
var possibleShorterNumber = number.slice(countryCallingCode.length);
|
|
8441
|
+
var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, undefined, metadata), possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;
|
|
8442
|
+
var _extractNationalNumbe2 = extractNationalNumber(number, undefined, metadata), nationalNumber = _extractNationalNumbe2.nationalNumber;
|
|
8443
|
+
if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || checkNumberLength(nationalNumber, undefined, metadata) === "TOO_LONG") {
|
|
8444
|
+
return {
|
|
8445
|
+
countryCallingCode,
|
|
8446
|
+
number: possibleShorterNumber
|
|
8447
|
+
};
|
|
8448
|
+
}
|
|
8449
|
+
}
|
|
8450
|
+
return {
|
|
8451
|
+
number
|
|
8452
|
+
};
|
|
8453
|
+
}
|
|
8454
|
+
|
|
8455
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js
|
|
8456
|
+
function extractCountryCallingCode(number, country, defaultCountry, defaultCallingCode, metadataJson) {
|
|
8457
|
+
if (!number) {
|
|
8458
|
+
return {};
|
|
8459
|
+
}
|
|
8460
|
+
var isNumberWithIddPrefix;
|
|
8461
|
+
if (number[0] !== "+") {
|
|
8462
|
+
var numberWithoutIDD = stripIddPrefix(number, country || defaultCountry, defaultCallingCode, metadataJson);
|
|
8463
|
+
if (numberWithoutIDD && numberWithoutIDD !== number) {
|
|
8464
|
+
isNumberWithIddPrefix = true;
|
|
8465
|
+
number = "+" + numberWithoutIDD;
|
|
8466
|
+
} else {
|
|
8467
|
+
if (country || defaultCountry || defaultCallingCode) {
|
|
8468
|
+
var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, defaultCountry, defaultCallingCode, metadataJson), { countryCallingCode, number: shorterNumber } = _extractCountryCallin;
|
|
8469
|
+
if (countryCallingCode) {
|
|
8470
|
+
return {
|
|
8471
|
+
countryCallingCodeSource: "FROM_NUMBER_WITHOUT_PLUS_SIGN",
|
|
8472
|
+
countryCallingCode,
|
|
8473
|
+
number: shorterNumber
|
|
8474
|
+
};
|
|
8475
|
+
}
|
|
8476
|
+
}
|
|
8477
|
+
return {
|
|
8478
|
+
number
|
|
8479
|
+
};
|
|
8480
|
+
}
|
|
8481
|
+
}
|
|
8482
|
+
if (number[1] === "0") {
|
|
8483
|
+
return {};
|
|
8484
|
+
}
|
|
8485
|
+
var metadata = new Metadata(metadataJson);
|
|
8486
|
+
var i = 2;
|
|
8487
|
+
while (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {
|
|
8488
|
+
var _countryCallingCode = number.slice(1, i);
|
|
8489
|
+
if (metadata.hasCallingCode(_countryCallingCode)) {
|
|
8490
|
+
metadata.selectNumberingPlan(_countryCallingCode);
|
|
8491
|
+
return {
|
|
8492
|
+
countryCallingCodeSource: isNumberWithIddPrefix ? "FROM_NUMBER_WITH_IDD" : "FROM_NUMBER_WITH_PLUS_SIGN",
|
|
8493
|
+
countryCallingCode: _countryCallingCode,
|
|
8494
|
+
number: number.slice(i)
|
|
8495
|
+
};
|
|
8496
|
+
}
|
|
8497
|
+
i++;
|
|
8498
|
+
}
|
|
8499
|
+
return {};
|
|
8500
|
+
}
|
|
8501
|
+
|
|
8502
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js
|
|
8503
|
+
function applyInternationalSeparatorStyle(formattedNumber) {
|
|
8504
|
+
return formattedNumber.replace(new RegExp("[".concat(VALID_PUNCTUATION, "]+"), "g"), " ").trim();
|
|
8505
|
+
}
|
|
8506
|
+
|
|
8507
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js
|
|
8508
|
+
var FIRST_GROUP_PATTERN = /(\$\d)/;
|
|
8509
|
+
function formatNationalNumberUsingFormat(number, format, _ref) {
|
|
8510
|
+
var { useInternationalFormat, withNationalPrefix, carrierCode, metadata } = _ref;
|
|
8511
|
+
var formattedNumber = number.replace(new RegExp(format.pattern()), useInternationalFormat ? format.internationalFormat() : withNationalPrefix && format.nationalPrefixFormattingRule() ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) : format.format());
|
|
8512
|
+
if (useInternationalFormat) {
|
|
8513
|
+
return applyInternationalSeparatorStyle(formattedNumber);
|
|
8514
|
+
}
|
|
8515
|
+
return formattedNumber;
|
|
8516
|
+
}
|
|
8517
|
+
|
|
8518
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js
|
|
8519
|
+
var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
|
|
8520
|
+
function getIddPrefix(country, callingCode, metadata) {
|
|
8521
|
+
var countryMetadata = new Metadata(metadata);
|
|
8522
|
+
countryMetadata.selectNumberingPlan(country || callingCode);
|
|
8523
|
+
if (countryMetadata.defaultIDDPrefix()) {
|
|
8524
|
+
return countryMetadata.defaultIDDPrefix();
|
|
8525
|
+
}
|
|
8526
|
+
if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {
|
|
8527
|
+
return countryMetadata.IDDPrefix();
|
|
8528
|
+
}
|
|
8529
|
+
}
|
|
8530
|
+
|
|
8531
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/RFC3966.js
|
|
8532
|
+
function formatRFC3966(_ref) {
|
|
8533
|
+
var { number, ext } = _ref;
|
|
8534
|
+
if (!number) {
|
|
8535
|
+
return "";
|
|
8536
|
+
}
|
|
8537
|
+
if (number[0] !== "+") {
|
|
8538
|
+
throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');
|
|
8539
|
+
}
|
|
8540
|
+
return "tel:".concat(number).concat(ext ? ";ext=" + ext : "");
|
|
8541
|
+
}
|
|
8542
|
+
|
|
8543
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/format.js
|
|
8544
|
+
var DEFAULT_OPTIONS = {
|
|
8545
|
+
formatExtension: function formatExtension(formattedNumber, extension, metadata) {
|
|
8546
|
+
return "".concat(formattedNumber).concat(metadata.ext()).concat(extension);
|
|
8547
|
+
}
|
|
8548
|
+
};
|
|
8549
|
+
function formatNumber(input, format, options, metadataJson) {
|
|
8550
|
+
if (options) {
|
|
8551
|
+
options = merge2({}, DEFAULT_OPTIONS, options);
|
|
8552
|
+
} else {
|
|
8553
|
+
options = DEFAULT_OPTIONS;
|
|
8554
|
+
}
|
|
8555
|
+
var metadata = new Metadata(metadataJson);
|
|
8556
|
+
if (input.country && input.country !== "001") {
|
|
8557
|
+
if (!metadata.hasCountry(input.country)) {
|
|
8558
|
+
throw new Error("Unknown country: ".concat(input.country));
|
|
8559
|
+
}
|
|
8560
|
+
metadata.selectNumberingPlan(input.country);
|
|
8561
|
+
} else if (input.countryCallingCode) {
|
|
8562
|
+
metadata.selectNumberingPlan(input.countryCallingCode);
|
|
8563
|
+
} else
|
|
8564
|
+
return input.phone || "";
|
|
8565
|
+
var countryCallingCode = metadata.countryCallingCode();
|
|
8566
|
+
var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
|
|
8567
|
+
var number;
|
|
8568
|
+
switch (format) {
|
|
8569
|
+
case "NATIONAL":
|
|
8570
|
+
if (!nationalNumber) {
|
|
8571
|
+
return "";
|
|
8572
|
+
}
|
|
8573
|
+
number = formatNationalNumber(nationalNumber, input.carrierCode, "NATIONAL", metadata, options);
|
|
8574
|
+
return addExtension(number, input.ext, metadata, options.formatExtension);
|
|
8575
|
+
case "INTERNATIONAL":
|
|
8576
|
+
if (!nationalNumber) {
|
|
8577
|
+
return "+".concat(countryCallingCode);
|
|
8578
|
+
}
|
|
8579
|
+
number = formatNationalNumber(nationalNumber, null, "INTERNATIONAL", metadata, options);
|
|
8580
|
+
number = "+".concat(countryCallingCode, " ").concat(number);
|
|
8581
|
+
return addExtension(number, input.ext, metadata, options.formatExtension);
|
|
8582
|
+
case "E.164":
|
|
8583
|
+
return "+".concat(countryCallingCode).concat(nationalNumber);
|
|
8584
|
+
case "RFC3966":
|
|
8585
|
+
return formatRFC3966({
|
|
8586
|
+
number: "+".concat(countryCallingCode).concat(nationalNumber),
|
|
8587
|
+
ext: input.ext
|
|
8588
|
+
});
|
|
8589
|
+
case "IDD":
|
|
8590
|
+
if (!options.fromCountry) {
|
|
8591
|
+
return;
|
|
8592
|
+
}
|
|
8593
|
+
var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options.fromCountry, metadata);
|
|
8594
|
+
if (!formattedNumber) {
|
|
8595
|
+
return;
|
|
8596
|
+
}
|
|
8597
|
+
return addExtension(formattedNumber, input.ext, metadata, options.formatExtension);
|
|
8598
|
+
default:
|
|
8599
|
+
throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(format, '"'));
|
|
8600
|
+
}
|
|
8601
|
+
}
|
|
8602
|
+
function formatNationalNumber(number, carrierCode, formatAs, metadata, options) {
|
|
8603
|
+
var format = chooseFormatForNumber(metadata.formats(), number);
|
|
8604
|
+
if (!format) {
|
|
8605
|
+
return number;
|
|
8606
|
+
}
|
|
8607
|
+
return formatNationalNumberUsingFormat(number, format, {
|
|
8608
|
+
useInternationalFormat: formatAs === "INTERNATIONAL",
|
|
8609
|
+
withNationalPrefix: format.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options && options.nationalPrefix === false ? false : true,
|
|
8610
|
+
carrierCode,
|
|
8611
|
+
metadata
|
|
8612
|
+
});
|
|
8613
|
+
}
|
|
8614
|
+
function chooseFormatForNumber(availableFormats, nationalNumber) {
|
|
8615
|
+
return pickFirstMatchingElement(availableFormats, function(format) {
|
|
8616
|
+
if (format.leadingDigitsPatterns().length > 0) {
|
|
8617
|
+
var lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1];
|
|
8618
|
+
if (nationalNumber.search(lastLeadingDigitsPattern) !== 0) {
|
|
8619
|
+
return false;
|
|
8620
|
+
}
|
|
8621
|
+
}
|
|
8622
|
+
return matchesEntirely(nationalNumber, format.pattern());
|
|
8623
|
+
});
|
|
8624
|
+
}
|
|
8625
|
+
function addExtension(formattedNumber, ext, metadata, formatExtension) {
|
|
8626
|
+
return ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber;
|
|
8627
|
+
}
|
|
8628
|
+
function formatIDD(nationalNumber, carrierCode, countryCallingCode, fromCountry, metadata) {
|
|
8629
|
+
var fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata.metadata);
|
|
8630
|
+
if (fromCountryCallingCode === countryCallingCode) {
|
|
8631
|
+
var formattedNumber = formatNationalNumber(nationalNumber, carrierCode, "NATIONAL", metadata);
|
|
8632
|
+
if (countryCallingCode === "1") {
|
|
8633
|
+
return countryCallingCode + " " + formattedNumber;
|
|
8634
|
+
}
|
|
8635
|
+
return formattedNumber;
|
|
8636
|
+
}
|
|
8637
|
+
var iddPrefix = getIddPrefix(fromCountry, undefined, metadata.metadata);
|
|
8638
|
+
if (iddPrefix) {
|
|
8639
|
+
return "".concat(iddPrefix, " ").concat(countryCallingCode, " ").concat(formatNationalNumber(nationalNumber, null, "INTERNATIONAL", metadata));
|
|
8640
|
+
}
|
|
8641
|
+
}
|
|
8642
|
+
function merge2() {
|
|
8643
|
+
var i = 1;
|
|
8644
|
+
for (var _len = arguments.length, objects = new Array(_len), _key = 0;_key < _len; _key++) {
|
|
8645
|
+
objects[_key] = arguments[_key];
|
|
8646
|
+
}
|
|
8647
|
+
while (i < objects.length) {
|
|
8648
|
+
if (objects[i]) {
|
|
8649
|
+
for (var key in objects[i]) {
|
|
8650
|
+
objects[0][key] = objects[i][key];
|
|
8651
|
+
}
|
|
8652
|
+
}
|
|
8653
|
+
i++;
|
|
8654
|
+
}
|
|
8655
|
+
return objects[0];
|
|
8656
|
+
}
|
|
8657
|
+
function pickFirstMatchingElement(elements, testFunction) {
|
|
8658
|
+
var i = 0;
|
|
8659
|
+
while (i < elements.length) {
|
|
8660
|
+
if (testFunction(elements[i])) {
|
|
8661
|
+
return elements[i];
|
|
8662
|
+
}
|
|
8663
|
+
i++;
|
|
8664
|
+
}
|
|
8665
|
+
}
|
|
8666
|
+
|
|
8667
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/PhoneNumber.js
|
|
8668
|
+
function _typeof4(o) {
|
|
8669
|
+
"@babel/helpers - typeof";
|
|
8670
|
+
return _typeof4 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o) {
|
|
8671
|
+
return typeof o;
|
|
8672
|
+
} : function(o) {
|
|
8673
|
+
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
8674
|
+
}, _typeof4(o);
|
|
8675
|
+
}
|
|
8676
|
+
function ownKeys2(e, r) {
|
|
8677
|
+
var t = Object.keys(e);
|
|
8678
|
+
if (Object.getOwnPropertySymbols) {
|
|
8679
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
8680
|
+
r && (o = o.filter(function(r) {
|
|
8681
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
8682
|
+
})), t.push.apply(t, o);
|
|
8683
|
+
}
|
|
8684
|
+
return t;
|
|
8685
|
+
}
|
|
8686
|
+
function _objectSpread2(e) {
|
|
8687
|
+
for (var r = 1;r < arguments.length; r++) {
|
|
8688
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
8689
|
+
r % 2 ? ownKeys2(Object(t), true).forEach(function(r) {
|
|
8690
|
+
_defineProperty2(e, r, t[r]);
|
|
8691
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r) {
|
|
8692
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
8693
|
+
});
|
|
8694
|
+
}
|
|
8695
|
+
return e;
|
|
8696
|
+
}
|
|
8697
|
+
function _defineProperty2(e, r, t) {
|
|
8698
|
+
return (r = _toPropertyKey4(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
|
|
8699
|
+
}
|
|
8700
|
+
function _classCallCheck3(a, n) {
|
|
8701
|
+
if (!(a instanceof n))
|
|
8702
|
+
throw new TypeError("Cannot call a class as a function");
|
|
8703
|
+
}
|
|
8704
|
+
function _defineProperties3(e, r) {
|
|
8705
|
+
for (var t = 0;t < r.length; t++) {
|
|
8706
|
+
var o = r[t];
|
|
8707
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey4(o.key), o);
|
|
8708
|
+
}
|
|
8709
|
+
}
|
|
8710
|
+
function _createClass3(e, r, t) {
|
|
8711
|
+
return r && _defineProperties3(e.prototype, r), t && _defineProperties3(e, t), Object.defineProperty(e, "prototype", { writable: false }), e;
|
|
8712
|
+
}
|
|
8713
|
+
function _toPropertyKey4(t) {
|
|
8714
|
+
var i = _toPrimitive4(t, "string");
|
|
8715
|
+
return _typeof4(i) == "symbol" ? i : i + "";
|
|
8716
|
+
}
|
|
8717
|
+
function _toPrimitive4(t, r) {
|
|
8718
|
+
if (_typeof4(t) != "object" || !t)
|
|
8719
|
+
return t;
|
|
8720
|
+
var e = t[Symbol.toPrimitive];
|
|
8721
|
+
if (e !== undefined) {
|
|
8722
|
+
var i = e.call(t, r || "default");
|
|
8723
|
+
if (_typeof4(i) != "object")
|
|
8724
|
+
return i;
|
|
8725
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
8726
|
+
}
|
|
8727
|
+
return (r === "string" ? String : Number)(t);
|
|
8728
|
+
}
|
|
8729
|
+
var PhoneNumber = /* @__PURE__ */ function() {
|
|
8730
|
+
function PhoneNumber(countryOrCountryCallingCode, nationalNumber, metadata) {
|
|
8731
|
+
_classCallCheck3(this, PhoneNumber);
|
|
8732
|
+
if (!countryOrCountryCallingCode) {
|
|
8733
|
+
throw new TypeError("First argument is required");
|
|
8734
|
+
}
|
|
8735
|
+
if (typeof countryOrCountryCallingCode !== "string") {
|
|
8736
|
+
throw new TypeError("First argument must be a string");
|
|
8737
|
+
}
|
|
8738
|
+
if (countryOrCountryCallingCode[0] === "+" && !nationalNumber) {
|
|
8739
|
+
throw new TypeError("`metadata` argument not passed");
|
|
8740
|
+
}
|
|
8741
|
+
if (isObject2(nationalNumber) && isObject2(nationalNumber.countries)) {
|
|
8742
|
+
metadata = nationalNumber;
|
|
8743
|
+
var e164Number = countryOrCountryCallingCode;
|
|
8744
|
+
if (!E164_NUMBER_REGEXP.test(e164Number)) {
|
|
8745
|
+
throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
|
|
8746
|
+
}
|
|
8747
|
+
var _extractCountryCallin = extractCountryCallingCode(e164Number, undefined, undefined, undefined, metadata), { countryCallingCode: _countryCallingCode, number } = _extractCountryCallin;
|
|
8748
|
+
nationalNumber = number;
|
|
8749
|
+
countryOrCountryCallingCode = _countryCallingCode;
|
|
8750
|
+
if (!nationalNumber) {
|
|
8751
|
+
throw new Error("Invalid `number` argument passed: too short");
|
|
8752
|
+
}
|
|
8753
|
+
}
|
|
8754
|
+
if (!nationalNumber) {
|
|
8755
|
+
throw new TypeError("`nationalNumber` argument is required");
|
|
8756
|
+
}
|
|
8757
|
+
if (typeof nationalNumber !== "string") {
|
|
8758
|
+
throw new TypeError("`nationalNumber` argument must be a string");
|
|
8759
|
+
}
|
|
8760
|
+
validateMetadata(metadata);
|
|
8761
|
+
var _getCountryAndCalling = getCountryAndCallingCodeFromOneOfThem(countryOrCountryCallingCode, metadata), { country, callingCode: countryCallingCode } = _getCountryAndCalling;
|
|
8762
|
+
this.country = country;
|
|
8763
|
+
this.countryCallingCode = countryCallingCode;
|
|
8764
|
+
this.nationalNumber = nationalNumber;
|
|
8765
|
+
this.number = "+" + this.countryCallingCode + this.nationalNumber;
|
|
8766
|
+
this.getMetadata = function() {
|
|
8767
|
+
return metadata;
|
|
8768
|
+
};
|
|
8769
|
+
}
|
|
8770
|
+
return _createClass3(PhoneNumber, [{
|
|
8771
|
+
key: "setExt",
|
|
8772
|
+
value: function setExt(ext) {
|
|
8773
|
+
this.ext = ext;
|
|
8774
|
+
}
|
|
8775
|
+
}, {
|
|
8776
|
+
key: "getPossibleCountries",
|
|
8777
|
+
value: function getPossibleCountries() {
|
|
8778
|
+
if (this.country) {
|
|
8779
|
+
return [this.country];
|
|
8780
|
+
}
|
|
8781
|
+
return getPossibleCountriesForNumber(this.countryCallingCode, this.nationalNumber, this.getMetadata());
|
|
8782
|
+
}
|
|
8783
|
+
}, {
|
|
8784
|
+
key: "isPossible",
|
|
8785
|
+
value: function isPossible() {
|
|
8786
|
+
return isPossiblePhoneNumber(this, {
|
|
8787
|
+
v2: true
|
|
8788
|
+
}, this.getMetadata());
|
|
8789
|
+
}
|
|
8790
|
+
}, {
|
|
8791
|
+
key: "isValid",
|
|
8792
|
+
value: function isValid() {
|
|
8793
|
+
return isValidNumber(this, {
|
|
8794
|
+
v2: true
|
|
8795
|
+
}, this.getMetadata());
|
|
8796
|
+
}
|
|
8797
|
+
}, {
|
|
8798
|
+
key: "isNonGeographic",
|
|
8799
|
+
value: function isNonGeographic() {
|
|
8800
|
+
var metadata = new Metadata(this.getMetadata());
|
|
8801
|
+
return metadata.isNonGeographicCallingCode(this.countryCallingCode);
|
|
8802
|
+
}
|
|
8803
|
+
}, {
|
|
8804
|
+
key: "isEqual",
|
|
8805
|
+
value: function isEqual(phoneNumber) {
|
|
8806
|
+
return this.number === phoneNumber.number && this.ext === phoneNumber.ext;
|
|
8807
|
+
}
|
|
8808
|
+
}, {
|
|
8809
|
+
key: "getType",
|
|
8810
|
+
value: function getType() {
|
|
8811
|
+
return getNumberType(this, {
|
|
8812
|
+
v2: true
|
|
8813
|
+
}, this.getMetadata());
|
|
8814
|
+
}
|
|
8815
|
+
}, {
|
|
8816
|
+
key: "format",
|
|
8817
|
+
value: function format(_format, options) {
|
|
8818
|
+
return formatNumber(this, _format, options ? _objectSpread2(_objectSpread2({}, options), {}, {
|
|
8819
|
+
v2: true
|
|
8820
|
+
}) : {
|
|
8821
|
+
v2: true
|
|
8822
|
+
}, this.getMetadata());
|
|
8823
|
+
}
|
|
8824
|
+
}, {
|
|
8825
|
+
key: "formatNational",
|
|
8826
|
+
value: function formatNational(options) {
|
|
8827
|
+
return this.format("NATIONAL", options);
|
|
8828
|
+
}
|
|
8829
|
+
}, {
|
|
8830
|
+
key: "formatInternational",
|
|
8831
|
+
value: function formatInternational(options) {
|
|
8832
|
+
return this.format("INTERNATIONAL", options);
|
|
8833
|
+
}
|
|
8834
|
+
}, {
|
|
8835
|
+
key: "getURI",
|
|
8836
|
+
value: function getURI(options) {
|
|
8837
|
+
return this.format("RFC3966", options);
|
|
8838
|
+
}
|
|
8839
|
+
}]);
|
|
8840
|
+
}();
|
|
8841
|
+
var E164_NUMBER_REGEXP = /^\+\d+$/;
|
|
8842
|
+
|
|
8843
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js
|
|
8844
|
+
var PLUS_SIGN = "+";
|
|
8845
|
+
var RFC3966_VISUAL_SEPARATOR_ = "[\\-\\.\\(\\)]?";
|
|
8846
|
+
var RFC3966_PHONE_DIGIT_ = "(" + "[" + VALID_DIGITS + "]" + "|" + RFC3966_VISUAL_SEPARATOR_ + ")";
|
|
8847
|
+
var RFC3966_GLOBAL_NUMBER_DIGITS_ = "^" + "\\" + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + "*" + "[" + VALID_DIGITS + "]" + RFC3966_PHONE_DIGIT_ + "*" + "$";
|
|
8848
|
+
var RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, "g");
|
|
8849
|
+
var ALPHANUM_ = VALID_DIGITS;
|
|
8850
|
+
var RFC3966_DOMAINLABEL_ = "[" + ALPHANUM_ + "]+((\\-)*[" + ALPHANUM_ + "])*";
|
|
8851
|
+
var VALID_ALPHA_ = "a-zA-Z";
|
|
8852
|
+
var RFC3966_TOPLABEL_ = "[" + VALID_ALPHA_ + "]+((\\-)*[" + ALPHANUM_ + "])*";
|
|
8853
|
+
var RFC3966_DOMAINNAME_ = "^(" + RFC3966_DOMAINLABEL_ + "\\.)*" + RFC3966_TOPLABEL_ + "\\.?$";
|
|
8854
|
+
var RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, "g");
|
|
8855
|
+
var RFC3966_PREFIX_ = "tel:";
|
|
8856
|
+
var RFC3966_PHONE_CONTEXT_ = ";phone-context=";
|
|
8857
|
+
var RFC3966_ISDN_SUBADDRESS_ = ";isub=";
|
|
8858
|
+
function extractPhoneContext(numberToExtractFrom) {
|
|
8859
|
+
var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);
|
|
8860
|
+
if (indexOfPhoneContext < 0) {
|
|
8861
|
+
return null;
|
|
8862
|
+
}
|
|
8863
|
+
var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length;
|
|
8864
|
+
if (phoneContextStart >= numberToExtractFrom.length) {
|
|
8865
|
+
return "";
|
|
8866
|
+
}
|
|
8867
|
+
var phoneContextEnd = numberToExtractFrom.indexOf(";", phoneContextStart);
|
|
8868
|
+
if (phoneContextEnd >= 0) {
|
|
8869
|
+
return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);
|
|
8870
|
+
} else {
|
|
8871
|
+
return numberToExtractFrom.substring(phoneContextStart);
|
|
8872
|
+
}
|
|
8873
|
+
}
|
|
8874
|
+
function isPhoneContextValid(phoneContext) {
|
|
8875
|
+
if (phoneContext === null) {
|
|
8876
|
+
return true;
|
|
8877
|
+
}
|
|
8878
|
+
if (phoneContext.length === 0) {
|
|
8879
|
+
return false;
|
|
8880
|
+
}
|
|
8881
|
+
return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);
|
|
8882
|
+
}
|
|
8883
|
+
|
|
8884
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js
|
|
8885
|
+
function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {
|
|
8886
|
+
var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;
|
|
8887
|
+
var phoneContext = extractPhoneContext(numberToParse);
|
|
8888
|
+
if (!isPhoneContextValid(phoneContext)) {
|
|
8889
|
+
throw new ParseError("NOT_A_NUMBER");
|
|
8890
|
+
}
|
|
8891
|
+
var phoneNumberString;
|
|
8892
|
+
if (phoneContext === null) {
|
|
8893
|
+
phoneNumberString = extractFormattedPhoneNumber(numberToParse) || "";
|
|
8894
|
+
} else {
|
|
8895
|
+
phoneNumberString = "";
|
|
8896
|
+
if (phoneContext.charAt(0) === PLUS_SIGN) {
|
|
8897
|
+
phoneNumberString += phoneContext;
|
|
8898
|
+
}
|
|
8899
|
+
var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);
|
|
8900
|
+
var indexOfNationalNumber;
|
|
8901
|
+
if (indexOfRfc3966Prefix >= 0) {
|
|
8902
|
+
indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;
|
|
8903
|
+
} else {
|
|
8904
|
+
indexOfNationalNumber = 0;
|
|
8905
|
+
}
|
|
8906
|
+
var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);
|
|
8907
|
+
phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);
|
|
8908
|
+
}
|
|
8909
|
+
var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);
|
|
8910
|
+
if (indexOfIsdn > 0) {
|
|
8911
|
+
phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);
|
|
8912
|
+
}
|
|
8913
|
+
if (phoneNumberString !== "") {
|
|
8914
|
+
return phoneNumberString;
|
|
8915
|
+
}
|
|
8916
|
+
}
|
|
8917
|
+
|
|
8918
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/parse.js
|
|
8919
|
+
var MAX_INPUT_STRING_LENGTH = 250;
|
|
8920
|
+
var PHONE_NUMBER_START_PATTERN = new RegExp("[" + PLUS_CHARS + VALID_DIGITS + "]");
|
|
8921
|
+
var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp("[^" + VALID_DIGITS + "#" + "]+$");
|
|
8922
|
+
var USE_NON_GEOGRAPHIC_COUNTRY_CODE3 = false;
|
|
8923
|
+
function parse4(text, options, metadataJson) {
|
|
8924
|
+
options = options || {};
|
|
8925
|
+
var metadata = new Metadata(metadataJson);
|
|
8926
|
+
if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {
|
|
8927
|
+
if (options.v2) {
|
|
8928
|
+
throw new ParseError("INVALID_COUNTRY");
|
|
8929
|
+
}
|
|
8930
|
+
throw new Error("Unknown country: ".concat(options.defaultCountry));
|
|
8931
|
+
}
|
|
8932
|
+
var _parseInput = parseInput(text, options.v2, options.extract), { number: formattedPhoneNumber, ext, error } = _parseInput;
|
|
8933
|
+
if (!formattedPhoneNumber) {
|
|
8934
|
+
if (options.v2) {
|
|
8935
|
+
if (error === "TOO_SHORT") {
|
|
8936
|
+
throw new ParseError("TOO_SHORT");
|
|
8937
|
+
}
|
|
8938
|
+
throw new ParseError("NOT_A_NUMBER");
|
|
8939
|
+
}
|
|
8940
|
+
return {};
|
|
8941
|
+
}
|
|
8942
|
+
var _parsePhoneNumber = parsePhoneNumber(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata), { country, nationalNumber, countryCallingCode, countryCallingCodeSource, carrierCode } = _parsePhoneNumber;
|
|
8943
|
+
if (!metadata.hasSelectedNumberingPlan()) {
|
|
8944
|
+
if (options.v2) {
|
|
8945
|
+
throw new ParseError("INVALID_COUNTRY");
|
|
8946
|
+
}
|
|
8947
|
+
return {};
|
|
8948
|
+
}
|
|
8949
|
+
if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {
|
|
8950
|
+
if (options.v2) {
|
|
8951
|
+
throw new ParseError("TOO_SHORT");
|
|
8952
|
+
}
|
|
8953
|
+
return {};
|
|
8954
|
+
}
|
|
8955
|
+
if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {
|
|
8956
|
+
if (options.v2) {
|
|
8957
|
+
throw new ParseError("TOO_LONG");
|
|
8958
|
+
}
|
|
8959
|
+
return {};
|
|
8960
|
+
}
|
|
8961
|
+
if (options.v2) {
|
|
8962
|
+
var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);
|
|
8963
|
+
if (country) {
|
|
8964
|
+
phoneNumber.country = country;
|
|
8965
|
+
}
|
|
8966
|
+
if (carrierCode) {
|
|
8967
|
+
phoneNumber.carrierCode = carrierCode;
|
|
8968
|
+
}
|
|
8969
|
+
if (ext) {
|
|
8970
|
+
phoneNumber.ext = ext;
|
|
8971
|
+
}
|
|
8972
|
+
phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;
|
|
8973
|
+
return phoneNumber;
|
|
8974
|
+
}
|
|
8975
|
+
var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;
|
|
8976
|
+
if (!options.extended) {
|
|
8977
|
+
return valid ? result(country, nationalNumber, ext) : {};
|
|
8978
|
+
}
|
|
8979
|
+
return {
|
|
8980
|
+
country,
|
|
8981
|
+
countryCallingCode,
|
|
8982
|
+
carrierCode,
|
|
8983
|
+
valid,
|
|
8984
|
+
possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, metadata) ? true : false,
|
|
8985
|
+
phone: nationalNumber,
|
|
8986
|
+
ext
|
|
8987
|
+
};
|
|
8988
|
+
}
|
|
8989
|
+
function _extractFormattedPhoneNumber(text, extract, throwOnError) {
|
|
8990
|
+
if (!text) {
|
|
8991
|
+
return;
|
|
8992
|
+
}
|
|
8993
|
+
if (text.length > MAX_INPUT_STRING_LENGTH) {
|
|
8994
|
+
if (throwOnError) {
|
|
8995
|
+
throw new ParseError("TOO_LONG");
|
|
8996
|
+
}
|
|
8997
|
+
return;
|
|
8998
|
+
}
|
|
8999
|
+
if (extract === false) {
|
|
9000
|
+
return text;
|
|
9001
|
+
}
|
|
9002
|
+
var startsAt = text.search(PHONE_NUMBER_START_PATTERN);
|
|
9003
|
+
if (startsAt < 0) {
|
|
9004
|
+
return;
|
|
9005
|
+
}
|
|
9006
|
+
return text.slice(startsAt).replace(AFTER_PHONE_NUMBER_END_PATTERN, "");
|
|
9007
|
+
}
|
|
9008
|
+
function parseInput(text, v2, extract) {
|
|
9009
|
+
var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {
|
|
9010
|
+
extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {
|
|
9011
|
+
return _extractFormattedPhoneNumber(text, extract, v2);
|
|
9012
|
+
}
|
|
9013
|
+
});
|
|
9014
|
+
if (!number) {
|
|
9015
|
+
return {};
|
|
9016
|
+
}
|
|
9017
|
+
if (!isViablePhoneNumber(number)) {
|
|
9018
|
+
if (isViablePhoneNumberStart(number)) {
|
|
9019
|
+
return {
|
|
9020
|
+
error: "TOO_SHORT"
|
|
9021
|
+
};
|
|
9022
|
+
}
|
|
9023
|
+
return {};
|
|
9024
|
+
}
|
|
9025
|
+
var withExtensionStripped = extractExtension(number);
|
|
9026
|
+
if (withExtensionStripped.ext) {
|
|
9027
|
+
return withExtensionStripped;
|
|
9028
|
+
}
|
|
9029
|
+
return {
|
|
9030
|
+
number
|
|
9031
|
+
};
|
|
9032
|
+
}
|
|
9033
|
+
function result(country, nationalNumber, ext) {
|
|
9034
|
+
var result = {
|
|
9035
|
+
country,
|
|
9036
|
+
phone: nationalNumber
|
|
9037
|
+
};
|
|
9038
|
+
if (ext) {
|
|
9039
|
+
result.ext = ext;
|
|
9040
|
+
}
|
|
9041
|
+
return result;
|
|
9042
|
+
}
|
|
9043
|
+
function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {
|
|
9044
|
+
var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), undefined, defaultCountry, defaultCallingCode, metadata.metadata), { countryCallingCodeSource, countryCallingCode, number } = _extractCountryCallin;
|
|
9045
|
+
var country;
|
|
9046
|
+
if (countryCallingCode) {
|
|
9047
|
+
metadata.selectNumberingPlan(countryCallingCode);
|
|
9048
|
+
} else if (number && (defaultCountry || defaultCallingCode)) {
|
|
9049
|
+
if (defaultCountry) {
|
|
9050
|
+
country = defaultCountry;
|
|
9051
|
+
metadata.selectNumberingPlan(defaultCountry);
|
|
9052
|
+
countryCallingCode = metadata.numberingPlan.callingCode();
|
|
9053
|
+
} else {
|
|
9054
|
+
metadata.selectNumberingPlan(defaultCallingCode);
|
|
9055
|
+
countryCallingCode = defaultCallingCode;
|
|
9056
|
+
if (USE_NON_GEOGRAPHIC_COUNTRY_CODE3) {
|
|
9057
|
+
if (metadata.isNonGeographicCallingCode(countryCallingCode)) {
|
|
9058
|
+
country = "001";
|
|
9059
|
+
}
|
|
9060
|
+
}
|
|
9061
|
+
}
|
|
9062
|
+
} else
|
|
9063
|
+
return {};
|
|
9064
|
+
if (!number) {
|
|
9065
|
+
return {
|
|
9066
|
+
countryCallingCodeSource,
|
|
9067
|
+
countryCallingCode
|
|
9068
|
+
};
|
|
9069
|
+
}
|
|
9070
|
+
var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), undefined, metadata), { nationalNumber, carrierCode } = _extractNationalNumbe;
|
|
9071
|
+
var exactCountry = getCountryByCallingCode(countryCallingCode, {
|
|
9072
|
+
nationalNumber,
|
|
9073
|
+
metadata
|
|
9074
|
+
});
|
|
9075
|
+
if (exactCountry) {
|
|
9076
|
+
country = exactCountry;
|
|
9077
|
+
if (exactCountry === "001") {} else {
|
|
9078
|
+
metadata.selectNumberingPlan(country);
|
|
9079
|
+
}
|
|
9080
|
+
}
|
|
9081
|
+
return {
|
|
9082
|
+
country,
|
|
9083
|
+
countryCallingCode,
|
|
9084
|
+
countryCallingCodeSource,
|
|
9085
|
+
nationalNumber,
|
|
9086
|
+
carrierCode
|
|
9087
|
+
};
|
|
9088
|
+
}
|
|
9089
|
+
|
|
9090
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js
|
|
9091
|
+
function _typeof5(o) {
|
|
9092
|
+
"@babel/helpers - typeof";
|
|
9093
|
+
return _typeof5 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o) {
|
|
9094
|
+
return typeof o;
|
|
9095
|
+
} : function(o) {
|
|
9096
|
+
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
9097
|
+
}, _typeof5(o);
|
|
9098
|
+
}
|
|
9099
|
+
function ownKeys3(e, r) {
|
|
9100
|
+
var t = Object.keys(e);
|
|
9101
|
+
if (Object.getOwnPropertySymbols) {
|
|
9102
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
9103
|
+
r && (o = o.filter(function(r) {
|
|
9104
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
9105
|
+
})), t.push.apply(t, o);
|
|
9106
|
+
}
|
|
9107
|
+
return t;
|
|
9108
|
+
}
|
|
9109
|
+
function _objectSpread3(e) {
|
|
9110
|
+
for (var r = 1;r < arguments.length; r++) {
|
|
9111
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
9112
|
+
r % 2 ? ownKeys3(Object(t), true).forEach(function(r) {
|
|
9113
|
+
_defineProperty3(e, r, t[r]);
|
|
9114
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys3(Object(t)).forEach(function(r) {
|
|
9115
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
9116
|
+
});
|
|
9117
|
+
}
|
|
9118
|
+
return e;
|
|
9119
|
+
}
|
|
9120
|
+
function _defineProperty3(e, r, t) {
|
|
9121
|
+
return (r = _toPropertyKey5(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
|
|
9122
|
+
}
|
|
9123
|
+
function _toPropertyKey5(t) {
|
|
9124
|
+
var i = _toPrimitive5(t, "string");
|
|
9125
|
+
return _typeof5(i) == "symbol" ? i : i + "";
|
|
9126
|
+
}
|
|
9127
|
+
function _toPrimitive5(t, r) {
|
|
9128
|
+
if (_typeof5(t) != "object" || !t)
|
|
9129
|
+
return t;
|
|
9130
|
+
var e = t[Symbol.toPrimitive];
|
|
9131
|
+
if (e !== undefined) {
|
|
9132
|
+
var i = e.call(t, r || "default");
|
|
9133
|
+
if (_typeof5(i) != "object")
|
|
9134
|
+
return i;
|
|
9135
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9136
|
+
}
|
|
9137
|
+
return (r === "string" ? String : Number)(t);
|
|
9138
|
+
}
|
|
9139
|
+
function parsePhoneNumberWithError(text, options, metadata) {
|
|
9140
|
+
return parse4(text, _objectSpread3(_objectSpread3({}, options), {}, {
|
|
9141
|
+
v2: true
|
|
9142
|
+
}), metadata);
|
|
9143
|
+
}
|
|
9144
|
+
|
|
9145
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js
|
|
9146
|
+
function _typeof6(o) {
|
|
9147
|
+
"@babel/helpers - typeof";
|
|
9148
|
+
return _typeof6 = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o) {
|
|
9149
|
+
return typeof o;
|
|
9150
|
+
} : function(o) {
|
|
9151
|
+
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
9152
|
+
}, _typeof6(o);
|
|
9153
|
+
}
|
|
9154
|
+
function ownKeys4(e, r) {
|
|
9155
|
+
var t = Object.keys(e);
|
|
9156
|
+
if (Object.getOwnPropertySymbols) {
|
|
9157
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
9158
|
+
r && (o = o.filter(function(r) {
|
|
9159
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
9160
|
+
})), t.push.apply(t, o);
|
|
9161
|
+
}
|
|
9162
|
+
return t;
|
|
9163
|
+
}
|
|
9164
|
+
function _objectSpread4(e) {
|
|
9165
|
+
for (var r = 1;r < arguments.length; r++) {
|
|
9166
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
9167
|
+
r % 2 ? ownKeys4(Object(t), true).forEach(function(r) {
|
|
9168
|
+
_defineProperty4(e, r, t[r]);
|
|
9169
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys4(Object(t)).forEach(function(r) {
|
|
9170
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
9171
|
+
});
|
|
9172
|
+
}
|
|
9173
|
+
return e;
|
|
9174
|
+
}
|
|
9175
|
+
function _defineProperty4(e, r, t) {
|
|
9176
|
+
return (r = _toPropertyKey6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
|
|
9177
|
+
}
|
|
9178
|
+
function _toPropertyKey6(t) {
|
|
9179
|
+
var i = _toPrimitive6(t, "string");
|
|
9180
|
+
return _typeof6(i) == "symbol" ? i : i + "";
|
|
9181
|
+
}
|
|
9182
|
+
function _toPrimitive6(t, r) {
|
|
9183
|
+
if (_typeof6(t) != "object" || !t)
|
|
9184
|
+
return t;
|
|
9185
|
+
var e = t[Symbol.toPrimitive];
|
|
9186
|
+
if (e !== undefined) {
|
|
9187
|
+
var i = e.call(t, r || "default");
|
|
9188
|
+
if (_typeof6(i) != "object")
|
|
9189
|
+
return i;
|
|
9190
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9191
|
+
}
|
|
9192
|
+
return (r === "string" ? String : Number)(t);
|
|
9193
|
+
}
|
|
9194
|
+
function parsePhoneNumber2(text, options, metadata) {
|
|
9195
|
+
if (options && options.defaultCountry && !isSupportedCountry(options.defaultCountry, metadata)) {
|
|
9196
|
+
options = _objectSpread4(_objectSpread4({}, options), {}, {
|
|
9197
|
+
defaultCountry: undefined
|
|
9198
|
+
});
|
|
9199
|
+
}
|
|
9200
|
+
try {
|
|
9201
|
+
return parsePhoneNumberWithError(text, options, metadata);
|
|
9202
|
+
} catch (error) {
|
|
9203
|
+
if (error instanceof ParseError) {} else {
|
|
9204
|
+
throw error;
|
|
9205
|
+
}
|
|
9206
|
+
}
|
|
9207
|
+
}
|
|
9208
|
+
|
|
9209
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/parsePhoneNumber.js
|
|
9210
|
+
function parsePhoneNumber3() {
|
|
9211
|
+
var _normalizeArguments = normalizeArguments(arguments), { text, options, metadata } = _normalizeArguments;
|
|
9212
|
+
return parsePhoneNumber2(text, options, metadata);
|
|
9213
|
+
}
|
|
9214
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/es6/getCountries.js
|
|
9215
|
+
function getCountries(metadata) {
|
|
9216
|
+
return new Metadata(metadata).getCountries();
|
|
9217
|
+
}
|
|
9218
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js
|
|
9219
|
+
function parsePhoneNumber4() {
|
|
9220
|
+
return withMetadataArgument(parsePhoneNumber3, arguments);
|
|
9221
|
+
}
|
|
9222
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/min/exports/getCountries.js
|
|
9223
|
+
function getCountries2() {
|
|
9224
|
+
return withMetadataArgument(getCountries, arguments);
|
|
9225
|
+
}
|
|
9226
|
+
// ../../node_modules/.pnpm/libphonenumber-js@1.13.17/node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js
|
|
9227
|
+
function getCountryCallingCode2() {
|
|
9228
|
+
return withMetadataArgument(getCountryCallingCode, arguments);
|
|
9229
|
+
}
|
|
9230
|
+
// src/ui/events.ts
|
|
9231
|
+
function emitWodiraEvent(target, name, detail) {
|
|
9232
|
+
target.dispatchEvent(new CustomEvent(name, {
|
|
9233
|
+
detail,
|
|
9234
|
+
bubbles: true,
|
|
9235
|
+
composed: true
|
|
9236
|
+
}));
|
|
9237
|
+
}
|
|
9238
|
+
function getErrorMessage(error) {
|
|
9239
|
+
if (error instanceof Error)
|
|
9240
|
+
return error.message;
|
|
9241
|
+
if (typeof error === "string")
|
|
9242
|
+
return error;
|
|
9243
|
+
return "Ha ocurrido un error inesperado.";
|
|
9244
|
+
}
|
|
9245
|
+
|
|
9246
|
+
// src/ui/validators.ts
|
|
9247
|
+
var VALID_GENDERS = new Set(["FEMALE", "MALE"]);
|
|
9248
|
+
function isBlank(value) {
|
|
9249
|
+
return value === undefined || value === null || typeof value === "string" && value.trim() === "" || Array.isArray(value) && value.length === 0;
|
|
9250
|
+
}
|
|
9251
|
+
function isEmail(value) {
|
|
9252
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value.trim());
|
|
9253
|
+
}
|
|
9254
|
+
function isHttpUrl(value) {
|
|
9255
|
+
try {
|
|
9256
|
+
const url = new URL(value.trim());
|
|
9257
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
9258
|
+
} catch {
|
|
9259
|
+
return false;
|
|
9260
|
+
}
|
|
9261
|
+
}
|
|
9262
|
+
function validateRequiredText(value) {
|
|
9263
|
+
return isBlank(value) ? invalid("required") : valid();
|
|
9264
|
+
}
|
|
9265
|
+
function validateEmail(value, required) {
|
|
9266
|
+
if (isBlank(value))
|
|
9267
|
+
return required ? invalid("required") : valid();
|
|
9268
|
+
return isEmail(value) ? valid() : invalid("email");
|
|
9269
|
+
}
|
|
9270
|
+
function parseRegistrationPhone(value, country = "ES") {
|
|
9271
|
+
return parsePhoneNumber4(value.trim(), { defaultCountry: country, extract: false });
|
|
9272
|
+
}
|
|
9273
|
+
function validateInternationalPhone(value, country) {
|
|
9274
|
+
if (isBlank(value))
|
|
9275
|
+
return invalid("required");
|
|
9276
|
+
const phone = parseRegistrationPhone(value, country);
|
|
9277
|
+
return phone?.isPossible() && E164PhoneValidator.safeParse(phone.number).success ? valid() : invalid("phone");
|
|
9278
|
+
}
|
|
9279
|
+
function validateHttpUrl(value, required) {
|
|
9280
|
+
if (isBlank(value))
|
|
9281
|
+
return required ? invalid("required") : valid();
|
|
9282
|
+
return isHttpUrl(value) ? valid() : invalid("url");
|
|
9283
|
+
}
|
|
9284
|
+
function validateDate(value, required) {
|
|
9285
|
+
if (isBlank(value))
|
|
9286
|
+
return required ? invalid("required") : valid();
|
|
9287
|
+
const parsed = new Date(value);
|
|
9288
|
+
return Number.isNaN(parsed.getTime()) ? invalid("date") : valid();
|
|
9289
|
+
}
|
|
9290
|
+
function validateCheckbox(value, required) {
|
|
9291
|
+
return required && value !== true ? invalid("required") : valid();
|
|
9292
|
+
}
|
|
9293
|
+
function validateGender(value) {
|
|
9294
|
+
return VALID_GENDERS.has(value) ? valid() : invalid("selection");
|
|
9295
|
+
}
|
|
9296
|
+
function validateCustomFieldValue(value, type, options, required) {
|
|
9297
|
+
if (eventFormAnswerSchema({ type, options, isRequired: required }).safeParse(value).success)
|
|
9298
|
+
return valid();
|
|
9299
|
+
if (isBlank(value) || type === "CHECKBOX")
|
|
9300
|
+
return invalid("required");
|
|
9301
|
+
if (type === "SELECT" || type === "MULTI_SELECT" || type === "RADIO")
|
|
9302
|
+
return invalid("selection");
|
|
9303
|
+
if (type === "DATE")
|
|
9304
|
+
return invalid("date");
|
|
9305
|
+
if (type === "NUMBER")
|
|
9306
|
+
return invalid("number");
|
|
9307
|
+
return invalid("required");
|
|
9308
|
+
}
|
|
9309
|
+
function normalizeLimit(value, fallback, max) {
|
|
9310
|
+
if (!Number.isFinite(value))
|
|
9311
|
+
return fallback;
|
|
9312
|
+
return Math.min(max, Math.max(1, Math.trunc(value)));
|
|
9313
|
+
}
|
|
9314
|
+
function valid() {
|
|
9315
|
+
return { valid: true };
|
|
9316
|
+
}
|
|
9317
|
+
function invalid(reason) {
|
|
9318
|
+
return { valid: false, reason };
|
|
9319
|
+
}
|
|
9320
|
+
|
|
9321
|
+
// src/ui/registration-eligibility.ts
|
|
9322
|
+
function readGenderCompositions(value, teamSize) {
|
|
9323
|
+
if (!Array.isArray(value))
|
|
9324
|
+
return [];
|
|
9325
|
+
return value.filter((composition) => {
|
|
9326
|
+
if (!composition || typeof composition !== "object" || Array.isArray(composition))
|
|
9327
|
+
return false;
|
|
9328
|
+
const candidate = composition;
|
|
9329
|
+
if (!Number.isInteger(candidate.male) || !Number.isInteger(candidate.female) || candidate.male < 0 || candidate.female < 0) {
|
|
9330
|
+
return false;
|
|
9331
|
+
}
|
|
9332
|
+
return teamSize == null || candidate.male + candidate.female === teamSize;
|
|
9333
|
+
});
|
|
9334
|
+
}
|
|
9335
|
+
function getAllowedGenders(category) {
|
|
9336
|
+
const genders = category.genders.filter(isGender);
|
|
9337
|
+
return genders.length > 0 ? [...new Set(genders)] : ["FEMALE", "MALE"];
|
|
9338
|
+
}
|
|
9339
|
+
function buildGenderSlotPlan(composition, captainGender) {
|
|
9340
|
+
const availableForCaptain = captainGender === "MALE" ? composition.male : composition.female;
|
|
9341
|
+
if (availableForCaptain < 1)
|
|
9342
|
+
return null;
|
|
9343
|
+
return [
|
|
9344
|
+
captainGender,
|
|
9345
|
+
...Array.from({ length: composition.male - (captainGender === "MALE" ? 1 : 0) }, () => "MALE"),
|
|
9346
|
+
...Array.from({ length: composition.female - (captainGender === "FEMALE" ? 1 : 0) }, () => "FEMALE")
|
|
9347
|
+
];
|
|
9348
|
+
}
|
|
9349
|
+
function buildRegistrationGenderSlotPlan(category, captainGender, selectedExactComposition) {
|
|
9350
|
+
if (!category)
|
|
9351
|
+
return null;
|
|
9352
|
+
const teamSize = Math.max(1, category.teamSize ?? 1);
|
|
9353
|
+
const allowedGenders = getAllowedGenders(category);
|
|
9354
|
+
const exactCompositions = readGenderCompositions(category.allowedGenderCompositions, teamSize);
|
|
9355
|
+
if (exactCompositions.length > 0) {
|
|
9356
|
+
const composition = selectedExactComposition ?? (exactCompositions.length === 1 ? exactCompositions[0] : null);
|
|
9357
|
+
const plan = composition ? buildGenderSlotPlan(composition, captainGender) : null;
|
|
9358
|
+
return plan?.every((requiredGender) => allowedGenders.includes(requiredGender)) ? plan : null;
|
|
9359
|
+
}
|
|
9360
|
+
if (allowedGenders.length === 1) {
|
|
9361
|
+
return Array.from({ length: teamSize }, () => allowedGenders[0]);
|
|
9362
|
+
}
|
|
9363
|
+
if (!allowedGenders.includes(captainGender))
|
|
9364
|
+
return null;
|
|
9365
|
+
if (category.genderPolicy === "ALL_SAME") {
|
|
9366
|
+
return Array.from({ length: teamSize }, () => captainGender);
|
|
9367
|
+
}
|
|
9368
|
+
if (category.genderPolicy === "MINIMUM_ONE_EACH") {
|
|
9369
|
+
if (teamSize < 2)
|
|
9370
|
+
return null;
|
|
9371
|
+
const otherGender = captainGender === "MALE" ? "FEMALE" : "MALE";
|
|
9372
|
+
if (!allowedGenders.includes(otherGender))
|
|
9373
|
+
return null;
|
|
9374
|
+
return [
|
|
9375
|
+
captainGender,
|
|
9376
|
+
otherGender,
|
|
9377
|
+
...Array.from({ length: teamSize - 2 }, () => captainGender)
|
|
9378
|
+
];
|
|
9379
|
+
}
|
|
9380
|
+
if (category.genderPolicy === "BALANCED") {
|
|
9381
|
+
const otherGender = captainGender === "MALE" ? "FEMALE" : "MALE";
|
|
9382
|
+
if (!allowedGenders.includes(otherGender))
|
|
9383
|
+
return null;
|
|
9384
|
+
const plan = Array.from({ length: teamSize }, (_, position) => position % 2 === 0 ? captainGender : otherGender);
|
|
9385
|
+
const counts = countGenders(plan);
|
|
9386
|
+
return Object.values(counts).every((count) => count / teamSize <= 0.6) ? plan : null;
|
|
9387
|
+
}
|
|
9388
|
+
return null;
|
|
9389
|
+
}
|
|
9390
|
+
function validateRegistrationGenderPolicy(category, athletes) {
|
|
9391
|
+
if (!category)
|
|
9392
|
+
return null;
|
|
9393
|
+
const selectedGenders = athletes.map((athlete) => athlete.gender).filter(isGender);
|
|
9394
|
+
if (selectedGenders.length === 0)
|
|
9395
|
+
return null;
|
|
9396
|
+
const allowedGenders = getAllowedGenders(category);
|
|
9397
|
+
const invalidGender = selectedGenders.find((gender) => !allowedGenders.includes(gender));
|
|
9398
|
+
if (invalidGender) {
|
|
9399
|
+
return { code: "gender-not-allowed", gender: invalidGender, allowed: allowedGenders };
|
|
9400
|
+
}
|
|
9401
|
+
if (selectedGenders.length < athletes.length)
|
|
9402
|
+
return null;
|
|
9403
|
+
const exactCompositions = readGenderCompositions(category.allowedGenderCompositions, category.teamSize);
|
|
9404
|
+
if (exactCompositions.length > 0) {
|
|
9405
|
+
if (category.teamSize && athletes.length < category.teamSize)
|
|
7153
9406
|
return null;
|
|
7154
9407
|
const counts = countGenders(selectedGenders);
|
|
7155
9408
|
const matches = exactCompositions.some((composition) => composition.male === counts.MALE && composition.female === counts.FEMALE);
|
|
@@ -7787,7 +10040,7 @@ function formatDate(date, locale) {
|
|
|
7787
10040
|
return date;
|
|
7788
10041
|
return new Intl.DateTimeFormat(resolveLocale(locale), { dateStyle: "medium" }).format(parsed);
|
|
7789
10042
|
}
|
|
7790
|
-
function
|
|
10043
|
+
function formatNumber2(value, locale, options = {}) {
|
|
7791
10044
|
if (value === undefined || value === null || !Number.isFinite(value))
|
|
7792
10045
|
return "—";
|
|
7793
10046
|
return new Intl.NumberFormat(resolveLocale(locale), {
|
|
@@ -7851,6 +10104,16 @@ function formatPlainNumber(value, locale, maximumFractionDigits) {
|
|
|
7851
10104
|
function isCheckboxField(field) {
|
|
7852
10105
|
return field.type === "CHECKBOX";
|
|
7853
10106
|
}
|
|
10107
|
+
var phoneCountries = getCountries2();
|
|
10108
|
+
function getPhoneCountryOptions(locale) {
|
|
10109
|
+
const names = new Intl.DisplayNames([locale], { type: "region" });
|
|
10110
|
+
return phoneCountries.map((country) => ({
|
|
10111
|
+
country,
|
|
10112
|
+
name: names.of(country) ?? country,
|
|
10113
|
+
prefix: `+${getCountryCallingCode2(country)}`
|
|
10114
|
+
})).sort((left, right) => left.name.localeCompare(right.name, locale));
|
|
10115
|
+
}
|
|
10116
|
+
var phoneCountryOptions = { es: getPhoneCountryOptions("es"), en: getPhoneCountryOptions("en") };
|
|
7854
10117
|
function emptyAthlete() {
|
|
7855
10118
|
return {
|
|
7856
10119
|
fullname: "",
|
|
@@ -7883,6 +10146,8 @@ function fieldErrorId(fieldName) {
|
|
|
7883
10146
|
function validationMessage(locale, result) {
|
|
7884
10147
|
if (result.valid)
|
|
7885
10148
|
return "";
|
|
10149
|
+
if (result.reason === "phone")
|
|
10150
|
+
return t(locale, "invalidPhone");
|
|
7886
10151
|
if (result.reason === "email")
|
|
7887
10152
|
return t(locale, "invalidEmail");
|
|
7888
10153
|
if (result.reason === "url")
|
|
@@ -8061,9 +10326,9 @@ function describeTierWindow(tier, locale) {
|
|
|
8061
10326
|
if (hasTicketWindow) {
|
|
8062
10327
|
const firstTicket = (tier.ticketThresholdStart ?? 0) + 1;
|
|
8063
10328
|
if (tier.ticketThresholdEnd === null || tier.ticketThresholdEnd === undefined) {
|
|
8064
|
-
details.push(`${t(locale, "tierTicketsFrom")} ${
|
|
10329
|
+
details.push(`${t(locale, "tierTicketsFrom")} ${formatNumber2(firstTicket, locale)}`);
|
|
8065
10330
|
} else {
|
|
8066
|
-
details.push(`${t(locale, "tierTicketsRange")} ${
|
|
10331
|
+
details.push(`${t(locale, "tierTicketsRange")} ${formatNumber2(firstTicket, locale)}–${formatNumber2(tier.ticketThresholdEnd, locale)}`);
|
|
8067
10332
|
}
|
|
8068
10333
|
}
|
|
8069
10334
|
return details.join(" · ");
|
|
@@ -8346,8 +10611,8 @@ class WodiraPricingCards extends RegistrationWindowElement {
|
|
|
8346
10611
|
const unavailable = registrationWindowMessage(this.pricing, this.locale) || categoryAvailabilityMessage(card, this.locale, eventSpots);
|
|
8347
10612
|
const remaining = eventSpots == null || categorySpots === null ? eventSpots ?? categorySpots : Math.min(eventSpots, categorySpots);
|
|
8348
10613
|
const details = [
|
|
8349
|
-
card.teamSize > 1 ? `${t(this.locale, "teamSize")} ${
|
|
8350
|
-
remaining === null ? "" : `${
|
|
10614
|
+
card.teamSize > 1 ? `${t(this.locale, "teamSize")} ${formatNumber2(card.teamSize, this.locale)}` : "",
|
|
10615
|
+
remaining === null ? "" : `${formatNumber2(remaining, this.locale)} ${t(this.locale, "availableSlots")}`
|
|
8351
10616
|
].filter(Boolean).join(" · ");
|
|
8352
10617
|
return html`
|
|
8353
10618
|
<article part="card pricing-card ${selected ? "selected" : ""}">
|
|
@@ -8998,6 +11263,9 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
8998
11263
|
}
|
|
8999
11264
|
renderAthleteInput(index, key, label, type, value) {
|
|
9000
11265
|
const errorKey = `athletes.${index}.${key}`;
|
|
11266
|
+
if (key === "phone") {
|
|
11267
|
+
return this.renderPhoneInput(errorKey, this.athletes[index], (key, value) => this.updateAthlete(index, key, value));
|
|
11268
|
+
}
|
|
9001
11269
|
const id = fieldErrorId(errorKey);
|
|
9002
11270
|
const birthDateBounds = key === "birthDate" && this.event ? getRegistrationBirthDateBounds(this.selectedCategory, this.event) : null;
|
|
9003
11271
|
return html`
|
|
@@ -9020,6 +11288,54 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
9020
11288
|
</div>
|
|
9021
11289
|
`;
|
|
9022
11290
|
}
|
|
11291
|
+
renderPhoneInput(errorKey, athlete, update) {
|
|
11292
|
+
const id = fieldErrorId(errorKey);
|
|
11293
|
+
const value = athlete?.phone ?? "";
|
|
11294
|
+
const internationalNumber = value.trim().startsWith("+") ? parseRegistrationPhone(value) : undefined;
|
|
11295
|
+
const country = internationalNumber?.country ?? internationalNumber?.getPossibleCountries().find((candidate) => candidate === athlete?.phoneCountry) ?? internationalNumber?.getPossibleCountries()[0] ?? athlete?.phoneCountry ?? "ES";
|
|
11296
|
+
const options = phoneCountryOptions[resolveUiLocale(this.locale)];
|
|
11297
|
+
return html`
|
|
11298
|
+
<div part="email-field phone-field">
|
|
11299
|
+
<label for=${`${id}-input`} part="label">${t(this.locale, "phone")} *</label>
|
|
11300
|
+
<div part="phone-control">
|
|
11301
|
+
<select
|
|
11302
|
+
part="select phone-country"
|
|
11303
|
+
aria-label=${t(this.locale, "phoneCountry")}
|
|
11304
|
+
@change=${(event) => {
|
|
11305
|
+
update("phoneCountry", event.target.value);
|
|
11306
|
+
if (internationalNumber)
|
|
11307
|
+
update("phone", internationalNumber.formatNational());
|
|
11308
|
+
}}
|
|
11309
|
+
>
|
|
11310
|
+
${options.map((option) => html`
|
|
11311
|
+
<option value=${option.country} ?selected=${option.country === country}>
|
|
11312
|
+
${option.name} (${option.prefix})
|
|
11313
|
+
</option>
|
|
11314
|
+
`)}
|
|
11315
|
+
</select>
|
|
11316
|
+
<input
|
|
11317
|
+
id=${`${id}-input`}
|
|
11318
|
+
part="input phone-number"
|
|
11319
|
+
type="tel"
|
|
11320
|
+
autocomplete="tel"
|
|
11321
|
+
placeholder=${country === "ES" ? "612 345 678" : nothing}
|
|
11322
|
+
.value=${value}
|
|
11323
|
+
aria-invalid=${this.fieldErrors[errorKey] ? "true" : "false"}
|
|
11324
|
+
aria-describedby=${this.fieldErrors[errorKey] ? id : nothing}
|
|
11325
|
+
@input=${(event) => {
|
|
11326
|
+
const number = event.target.value;
|
|
11327
|
+
const pastedNumber = number.trim().startsWith("+") ? parseRegistrationPhone(number) : undefined;
|
|
11328
|
+
const pastedCountry = pastedNumber?.country ?? pastedNumber?.getPossibleCountries().find((candidate) => candidate === country) ?? pastedNumber?.getPossibleCountries()[0];
|
|
11329
|
+
if (pastedCountry && pastedCountry !== country)
|
|
11330
|
+
update("phoneCountry", pastedCountry);
|
|
11331
|
+
update("phone", number);
|
|
11332
|
+
}}
|
|
11333
|
+
/>
|
|
11334
|
+
</div>
|
|
11335
|
+
${this.renderFieldError(errorKey)}
|
|
11336
|
+
</div>
|
|
11337
|
+
`;
|
|
11338
|
+
}
|
|
9023
11339
|
renderCustomFields(categoryId = this.categoryId, guestIndex, participantIndex) {
|
|
9024
11340
|
const conditionIds = this.conditionFieldIds(categoryId);
|
|
9025
11341
|
const isTeam = (this.getCategory(categoryId)?.teamSize ?? 1) > 1;
|
|
@@ -9341,7 +11657,7 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
9341
11657
|
</button>
|
|
9342
11658
|
${guestCategory && guestCategory.teamSize > 1 ? html`<small part="hint"
|
|
9343
11659
|
>${t(this.locale, "teamSize")}
|
|
9344
|
-
${
|
|
11660
|
+
${formatNumber2(guestCategory.teamSize, this.locale)}</small
|
|
9345
11661
|
>` : nothing}
|
|
9346
11662
|
</div>
|
|
9347
11663
|
</fieldset>
|
|
@@ -9407,6 +11723,9 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
9407
11723
|
}
|
|
9408
11724
|
renderGuestAthleteInput(guestIndex, athleteIndex, key, label, type, value) {
|
|
9409
11725
|
const errorKey = `guestRegistrations.${guestIndex}.athletes.${athleteIndex}.${key}`;
|
|
11726
|
+
if (key === "phone") {
|
|
11727
|
+
return this.renderPhoneInput(errorKey, this.guestRegistrations[guestIndex]?.athletes[athleteIndex], (key, value) => this.updateGuestAthlete(guestIndex, athleteIndex, key, value));
|
|
11728
|
+
}
|
|
9410
11729
|
const id = fieldErrorId(errorKey);
|
|
9411
11730
|
const guestCategory = this.getCategory(this.guestRegistrations[guestIndex]?.categoryId ?? "");
|
|
9412
11731
|
const birthDateBounds = key === "birthDate" && this.event ? getRegistrationBirthDateBounds(guestCategory, this.event) : null;
|
|
@@ -9906,7 +12225,7 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
9906
12225
|
athletes: guest.athletes.map((athlete, currentAthleteIndex) => currentAthleteIndex === athleteIndex ? { ...athlete, [key]: value } : athlete)
|
|
9907
12226
|
});
|
|
9908
12227
|
});
|
|
9909
|
-
this.clearFieldError(`guestRegistrations.${guestIndex}.athletes.${athleteIndex}.${key}`);
|
|
12228
|
+
this.clearFieldError(`guestRegistrations.${guestIndex}.athletes.${athleteIndex}.${key === "phoneCountry" ? "phone" : key}`);
|
|
9910
12229
|
if (key === "gender")
|
|
9911
12230
|
this.clearFieldError(`guestRegistrations.${guestIndex}.genderPolicy`);
|
|
9912
12231
|
if (key === "birthDate")
|
|
@@ -9937,7 +12256,7 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
9937
12256
|
updateAthlete(index, key, value) {
|
|
9938
12257
|
const next = this.athletes.map((athlete, candidateIndex) => candidateIndex === index ? { ...athlete, [key]: value } : athlete);
|
|
9939
12258
|
this.athletes = key === "gender" ? this.normalizeAthleteGenders(this.selectedCategory, next, this.selectedGenderCompositionIndex) : next;
|
|
9940
|
-
this.clearFieldError(`athletes.${index}.${key}`);
|
|
12259
|
+
this.clearFieldError(`athletes.${index}.${key === "phoneCountry" ? "phone" : key}`);
|
|
9941
12260
|
if (key === "gender")
|
|
9942
12261
|
this.clearFieldError("genderPolicy");
|
|
9943
12262
|
if (key === "birthDate")
|
|
@@ -10044,7 +12363,7 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
10044
12363
|
continue;
|
|
10045
12364
|
setValidationError(errors, this.locale, `athletes.${index}.fullname`, validateRequiredText(athlete.fullname));
|
|
10046
12365
|
setValidationError(errors, this.locale, `athletes.${index}.email`, validateEmail(athlete.email, true));
|
|
10047
|
-
setValidationError(errors, this.locale, `athletes.${index}.phone`,
|
|
12366
|
+
setValidationError(errors, this.locale, `athletes.${index}.phone`, validateInternationalPhone(athlete.phone, athlete.phoneCountry));
|
|
10048
12367
|
setValidationError(errors, this.locale, `athletes.${index}.idNumber`, validateRequiredText(athlete.idNumber));
|
|
10049
12368
|
setValidationError(errors, this.locale, `athletes.${index}.birthDate`, validateDate(athlete.birthDate, true));
|
|
10050
12369
|
setValidationError(errors, this.locale, `athletes.${index}.gender`, validateGender(athlete.gender));
|
|
@@ -10083,7 +12402,7 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
10083
12402
|
this.validateRegistrationFields(errors, guest.categoryId, athlete.customFieldValues, guestIndex, athleteIndex);
|
|
10084
12403
|
setValidationError(errors, this.locale, `guestRegistrations.${guestIndex}.athletes.${athleteIndex}.fullname`, validateRequiredText(athlete.fullname));
|
|
10085
12404
|
setValidationError(errors, this.locale, `guestRegistrations.${guestIndex}.athletes.${athleteIndex}.email`, validateEmail(athlete.email, true));
|
|
10086
|
-
setValidationError(errors, this.locale, `guestRegistrations.${guestIndex}.athletes.${athleteIndex}.phone`,
|
|
12405
|
+
setValidationError(errors, this.locale, `guestRegistrations.${guestIndex}.athletes.${athleteIndex}.phone`, validateInternationalPhone(athlete.phone, athlete.phoneCountry));
|
|
10087
12406
|
setValidationError(errors, this.locale, `guestRegistrations.${guestIndex}.athletes.${athleteIndex}.idNumber`, validateRequiredText(athlete.idNumber));
|
|
10088
12407
|
setValidationError(errors, this.locale, `guestRegistrations.${guestIndex}.athletes.${athleteIndex}.birthDate`, validateDate(athlete.birthDate, true));
|
|
10089
12408
|
setValidationError(errors, this.locale, `guestRegistrations.${guestIndex}.athletes.${athleteIndex}.gender`, validateGender(athlete.gender));
|
|
@@ -10141,13 +12460,13 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
10141
12460
|
}));
|
|
10142
12461
|
}
|
|
10143
12462
|
checkoutAthlete(athlete, categoryId) {
|
|
10144
|
-
const { customFieldValues, ...details } = athlete;
|
|
12463
|
+
const { customFieldValues, phoneCountry, ...details } = athlete;
|
|
10145
12464
|
const customFields = this.fieldAnswers(categoryId, customFieldValues, true);
|
|
10146
12465
|
return {
|
|
10147
12466
|
...details,
|
|
10148
12467
|
fullname: details.fullname.trim(),
|
|
10149
12468
|
email: details.email.trim(),
|
|
10150
|
-
phone: details.phone.trim(),
|
|
12469
|
+
phone: parseRegistrationPhone(details.phone, phoneCountry)?.number ?? details.phone.trim(),
|
|
10151
12470
|
idNumber: details.idNumber.trim(),
|
|
10152
12471
|
...customFields.length ? { customFields } : {}
|
|
10153
12472
|
};
|
|
@@ -10183,7 +12502,7 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
10183
12502
|
}))
|
|
10184
12503
|
};
|
|
10185
12504
|
}
|
|
10186
|
-
async loadSummary() {
|
|
12505
|
+
async loadSummary(showFieldErrors = false) {
|
|
10187
12506
|
if (!this.isConnected)
|
|
10188
12507
|
return;
|
|
10189
12508
|
const requestId = ++this.summaryRequestId;
|
|
@@ -10216,7 +12535,10 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
10216
12535
|
if (requestId === this.summaryRequestId) {
|
|
10217
12536
|
this.summary = undefined;
|
|
10218
12537
|
this.summaryError = true;
|
|
10219
|
-
|
|
12538
|
+
const errors = showFieldErrors ? this.registrationApiFieldErrors(error) : {};
|
|
12539
|
+
if (Object.keys(errors).length)
|
|
12540
|
+
this.fieldErrors = errors;
|
|
12541
|
+
this.summaryErrorMessage = Object.keys(errors).length ? t(this.locale, "registrationValidationFailed") : error instanceof WodiraBrowserApiError && error.status >= 400 && error.status < 500 ? registrationErrorMessage(this.locale, getErrorMessage(error)) : "";
|
|
10220
12542
|
}
|
|
10221
12543
|
} finally {
|
|
10222
12544
|
if (requestId === this.summaryRequestId)
|
|
@@ -10234,7 +12556,7 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
10234
12556
|
}
|
|
10235
12557
|
const fingerprint = this.reviewFingerprint();
|
|
10236
12558
|
clearTimeout(this.summaryTimer);
|
|
10237
|
-
await this.loadSummary();
|
|
12559
|
+
await this.loadSummary(true);
|
|
10238
12560
|
await this.updateComplete;
|
|
10239
12561
|
if (!this.isConnected || this.loading || this.summaryLoading || this.summaryError || this.summary?.categoryId !== this.categoryId || typeof this.summary?.total !== "number" || !Number.isFinite(this.summary.total) || this.summary.total < 0 || fingerprint !== this.reviewFingerprint() || Boolean(this.registrationUnavailableMessage)) {
|
|
10240
12562
|
if (this.summaryError)
|
|
@@ -10266,6 +12588,35 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
10266
12588
|
this.termsAccepted
|
|
10267
12589
|
]);
|
|
10268
12590
|
}
|
|
12591
|
+
registrationApiFieldErrors(error) {
|
|
12592
|
+
if (!(error instanceof WodiraBrowserApiError) || error.status !== 400)
|
|
12593
|
+
return {};
|
|
12594
|
+
const payload = error.payload;
|
|
12595
|
+
if (!payload || typeof payload !== "object")
|
|
12596
|
+
return {};
|
|
12597
|
+
const details = payload.message;
|
|
12598
|
+
const issues = details && typeof details === "object" && "errors" in details ? details.errors : payload.errors;
|
|
12599
|
+
if (!Array.isArray(issues))
|
|
12600
|
+
return {};
|
|
12601
|
+
const activePositions = this.athletes.flatMap((_, index) => this.isParticipantDeferred(index) ? [] : [index]);
|
|
12602
|
+
const errors = {};
|
|
12603
|
+
for (const issue of issues) {
|
|
12604
|
+
if (!issue || !Array.isArray(issue.path) || typeof issue.message !== "string")
|
|
12605
|
+
continue;
|
|
12606
|
+
const path = [...issue.path];
|
|
12607
|
+
if (path[0] === "athletes") {
|
|
12608
|
+
const position = activePositions[path[1]];
|
|
12609
|
+
if (position === undefined)
|
|
12610
|
+
continue;
|
|
12611
|
+
path[1] = position;
|
|
12612
|
+
}
|
|
12613
|
+
const key = path.join(".");
|
|
12614
|
+
if (!/^(?:purchaser(?:Email|Name)|teamName|club|promocode|(?:guestRegistrations\.\d+\.)?athletes\.\d+\.(?:fullname|email|phone|idNumber|gender|birthDate)|guestRegistrations\.\d+\.(?:guestName|guestEmail|teamName|club))$/.test(key))
|
|
12615
|
+
continue;
|
|
12616
|
+
errors[key] = key.endsWith(".phone") ? t(this.locale, "invalidPhone") : /email$/i.test(key) && issue.code === "invalid_format" ? t(this.locale, "invalidEmail") : issue.message;
|
|
12617
|
+
}
|
|
12618
|
+
return errors;
|
|
12619
|
+
}
|
|
10269
12620
|
async focusRegistrationError() {
|
|
10270
12621
|
await this.updateComplete;
|
|
10271
12622
|
const invalidField = this.renderRoot.querySelector('input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"]');
|
|
@@ -10344,8 +12695,17 @@ class WodiraRegistrationForm extends RegistrationWindowElement {
|
|
|
10344
12695
|
const session = await client.createRegistrationCheckoutSession(checkoutInput);
|
|
10345
12696
|
this.handleCheckoutSession(session);
|
|
10346
12697
|
} catch (error) {
|
|
10347
|
-
|
|
12698
|
+
const errors = this.registrationApiFieldErrors(error);
|
|
12699
|
+
if (Object.keys(errors).length) {
|
|
12700
|
+
this.fieldErrors = errors;
|
|
12701
|
+
if (this.checkoutStep === "review")
|
|
12702
|
+
this.checkoutStep = "details";
|
|
12703
|
+
this.error = t(this.locale, "registrationValidationFailed");
|
|
12704
|
+
} else {
|
|
12705
|
+
this.error = registrationErrorMessage(this.locale, getErrorMessage(error));
|
|
12706
|
+
}
|
|
10348
12707
|
emitWodiraEvent(this, "wodira:error", { error, message: this.error });
|
|
12708
|
+
await this.focusRegistrationError();
|
|
10349
12709
|
} finally {
|
|
10350
12710
|
this.loading = false;
|
|
10351
12711
|
}
|