@bigbinary/neeto-playwright-commons 1.22.17 → 1.22.19

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/index.cjs.js CHANGED
@@ -85,6 +85,7 @@ const ROUTES = {
85
85
  },
86
86
  auth: {
87
87
  adminPanel: "/admin/admin-panel",
88
+ billing: "/admin/my/profile/billing",
88
89
  },
89
90
  };
90
91
  const API_ROUTES = {
@@ -2399,13 +2400,13 @@ var sideChannel = function getSideChannel() {
2399
2400
  var replace = String.prototype.replace;
2400
2401
  var percentTwenties = /%20/g;
2401
2402
 
2402
- var Format = {
2403
+ var Format$1 = {
2403
2404
  RFC1738: 'RFC1738',
2404
2405
  RFC3986: 'RFC3986'
2405
2406
  };
2406
2407
 
2407
2408
  var formats$3 = {
2408
- 'default': Format.RFC3986,
2409
+ 'default': Format$1.RFC3986,
2409
2410
  formatters: {
2410
2411
  RFC1738: function (value) {
2411
2412
  return replace.call(value, percentTwenties, '+');
@@ -2414,8 +2415,8 @@ var formats$3 = {
2414
2415
  return String(value);
2415
2416
  }
2416
2417
  },
2417
- RFC1738: Format.RFC1738,
2418
- RFC3986: Format.RFC3986
2418
+ RFC1738: Format$1.RFC1738,
2419
+ RFC3986: Format$1.RFC3986
2419
2420
  };
2420
2421
 
2421
2422
  var formats$2 = formats$3;
@@ -3294,7 +3295,7 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
3294
3295
  };
3295
3296
  };
3296
3297
 
3297
- var parse$b = function (str, opts) {
3298
+ var parse$c = function (str, opts) {
3298
3299
  var options = normalizeParseOptions(opts);
3299
3300
 
3300
3301
  if (str === '' || str === null || typeof str === 'undefined') {
@@ -3321,12 +3322,12 @@ var parse$b = function (str, opts) {
3321
3322
  };
3322
3323
 
3323
3324
  var stringify$6 = stringify_1;
3324
- var parse$a = parse$b;
3325
+ var parse$b = parse$c;
3325
3326
  var formats = formats$3;
3326
3327
 
3327
3328
  var lib$e = {
3328
3329
  formats: formats,
3329
- parse: parse$a,
3330
+ parse: parse$b,
3330
3331
  stringify: stringify$6
3331
3332
  };
3332
3333
 
@@ -3360,6 +3361,7 @@ const COMMON_SELECTORS = {
3360
3361
  body: "body",
3361
3362
  toastIcon: ".Toastify__toast-icon",
3362
3363
  toastContainer: ".Toastify__toast-container",
3364
+ toastBody: ".Toastify__toast-body",
3363
3365
  paneModalCrossIcon: "pane-close-button",
3364
3366
  inputField: "nui-input-field",
3365
3367
  alertBox: "alert-box",
@@ -3401,6 +3403,7 @@ const COMMON_SELECTORS = {
3401
3403
  homeButton: "home-button",
3402
3404
  neetoUiSwitch: "nui-switch",
3403
3405
  floatingActionMenuButton: "floating-action-menu-container",
3406
+ floatingActionMenuLink: "floating-action-menu-link-section",
3404
3407
  columnsDropdownContainer: "customize-columns-dropdown-container",
3405
3408
  columnsDropdownButton: "columns-dropdown-button",
3406
3409
  breadcrumbHeader: "header-breadcrumb",
@@ -3442,6 +3445,25 @@ const COMMON_SELECTORS = {
3442
3445
  continueButton: "continue-button",
3443
3446
  clearAllButton: "clear-all-button",
3444
3447
  requiredSwitch: "required-switch",
3448
+ qrCodeDownloadButton: "qr-code-download-button",
3449
+ linkCopyButton: "link-copy-button",
3450
+ moreDropdownIcon: "more-dropdown-icon",
3451
+ previewButton: "preview-button",
3452
+ editButton: "edit-button",
3453
+ deleteButton: "delete-button",
3454
+ backButton: "back-button",
3455
+ nameInputField: "name-input-field",
3456
+ descriptionInputField: "description-input-field",
3457
+ searchTextField: "search-text-field",
3458
+ dragHandle: "drag-handle",
3459
+ fileInputError: "file-input-error-message",
3460
+ csvUploadInput: "csv-upload-input",
3461
+ nuiCheckboxContainer: "nui-checkbox-container",
3462
+ dynamicVariablesList: "dynamic-variables-list",
3463
+ emailInputWrapper: "email-input-wrapper",
3464
+ switchWrapper: "nui-switch-wrapper",
3465
+ switchLabel: "nui-switch-item",
3466
+ columnVisibilityBtn: (action) => `column-visibility-${action}-button`,
3445
3467
  customSwitch: (switchLabel) => `${neetoCist.hyphenate(switchLabel)}-switch`,
3446
3468
  customMenuItem: (label) => `${neetoCist.hyphenate(label)}-menu-item`,
3447
3469
  customInputLabel: (name = "nui") => `${neetoCist.hyphenate(name)}-input-label`,
@@ -3696,12 +3718,16 @@ const NEETO_EDITOR_SELECTORS = {
3696
3718
  tableOption: optionSelector("table"),
3697
3719
  tableCreateButton: "neeto-editor-fixed-menu-table-option-create-button",
3698
3720
  videoUploadOption: optionSelector("video-upload"),
3721
+ todoListOption: optionSelector("todoList"),
3699
3722
  editorMenuWrapper: "neeto-editor-fixed-menu-wrapper",
3700
3723
  editorMediaUploaderTab: "neeto-editor-media-uploader-local-tab",
3701
3724
  dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${joinHyphenCase(variable)}`,
3702
3725
  neetoEditorFixedMenuFontSize: "neeto-editor-fixed-menu-font-size-option",
3703
3726
  highlightText: (textColorIndex) => `--neeto-editor-highlight-text-${textColorIndex}`,
3704
3727
  highlightBg: (bgColorIndex) => `--neeto-editor-highlight-bg-${bgColorIndex}`,
3728
+ neetoEditorHighlightTextColor: (textColorIndex) => `neeto-editor-highlight-text-color-dot-${textColorIndex}`,
3729
+ neetoEditorHighlightBgColor: (bgColorIndex) => `neeto-editor-highlight-background-color-dot-${bgColorIndex}`,
3730
+ todoList: "[data-type='todoList']",
3705
3731
  };
3706
3732
  const NEETO_TEXT_MODIFIER_SELECTORS = {
3707
3733
  strike: optionSelector("strike"),
@@ -3858,6 +3884,12 @@ const MEMBER_SELECTORS = {
3858
3884
  deactivateButton: "ntm-deactivate-members-button",
3859
3885
  rolesButton: "ntm-manage-member-roles-button",
3860
3886
  statusTag: "ntm-member-status-tag",
3887
+ exportMemberHeading: "export-member-heading",
3888
+ downloadAsRadioItem: (fileType) => `download-as-${fileType}-radio-item`,
3889
+ exportSubmitBtn: "export-submit-button",
3890
+ exportCancelBtn: "export-cancel-button",
3891
+ downloadButton: "download-button",
3892
+ manageAppListChk: "ntm-manage-members-app-list-checkbox",
3861
3893
  menubarSubLink: (sublink) => `members-${sublink}-block-sub-link`,
3862
3894
  takeActionStateOption: (option = "") => `ntm-${hyphenize(option)}-members-button`,
3863
3895
  checkboxLabel: (label) => `${hyphenize(label)}-checkbox-label`,
@@ -3908,6 +3940,9 @@ const ROLES_SELECTORS = {
3908
3940
  searchPermissionsInput: "ntm-search-permissions-input",
3909
3941
  permissionDescription: "ntm-permission-category-description",
3910
3942
  rolesEditButton: "ntm-roles-table-edit-role-button",
3943
+ roleCell: (roleName) => `${neetoCist.hyphenate(roleName)}-role-cell`,
3944
+ tablePermissionCheckbox: "ntm-roles-table-permission-checkbox",
3945
+ descriptionInputError: "description-input-error",
3911
3946
  };
3912
3947
 
3913
3948
  const SIGNUP_SELECTORS = {
@@ -4005,6 +4040,12 @@ const GOOGLE_LOGIN_SELECTORS = {
4005
4040
  totpChallengeSelector: '[data-challengeid="2"]',
4006
4041
  signOutFrameLocator: 'iframe[name="account"]',
4007
4042
  };
4043
+ const GOOGLE_ANALYTICS_SELECTORS = {
4044
+ gaCode: "google-analytics-code-input-field",
4045
+ };
4046
+ const GOOGLE_SHEETS_SELECTORS = {
4047
+ iframe: 'iframe[title="Content"]',
4048
+ };
4008
4049
 
4009
4050
  const dataQa = (value) => `[data-qa='${value}']`;
4010
4051
  const SLACK_SELECTORS = {
@@ -4078,6 +4119,11 @@ const ZAPIER_SELECTORS = {
4078
4119
  zapierSubLink: "zapier-sub-link",
4079
4120
  };
4080
4121
 
4122
+ const TWILIO_SELECTORS = {
4123
+ sidField: "sid-input-field",
4124
+ authTokenField: "auth-token-input-field",
4125
+ };
4126
+
4081
4127
  const TABLE_SELECTORS = {
4082
4128
  freezeUnfreezeButton: "freeze-unfreeze-column-menu-button",
4083
4129
  ascendingButton: "ascending-column-menu-button",
@@ -4097,6 +4143,7 @@ const ADMIN_PANEL_SELECTORS = {
4097
4143
  settingsItemHeading: "settings-item-heading",
4098
4144
  settingsItemDescription: "settings-item-description",
4099
4145
  expiryDateInput: "expiry-date-input",
4146
+ goBackButton: "admin-panel-go-back-button",
4100
4147
  };
4101
4148
  const CUSTOM_DOMAIN_SELECTORS = {
4102
4149
  addCustomDomainButton: "add-new-custom-domain-button",
@@ -4107,6 +4154,7 @@ const CUSTOM_DOMAIN_SELECTORS = {
4107
4154
  deleteCustomDomainButton: "delete-custom-domain-button",
4108
4155
  dropdownButton: "custom-domains-more-dropdown-button",
4109
4156
  activeTagContainer: "active-tag-container",
4157
+ nameInputError: "domain-name-input-error",
4110
4158
  };
4111
4159
  const API_KEYS_SELECTORS = {
4112
4160
  editApiKeyButton: "api-key-edit-button",
@@ -4121,6 +4169,17 @@ const API_KEYS_SELECTORS = {
4121
4169
  expiresAtField: "api-keys-expires-at-field",
4122
4170
  createdAtField: "api-keys-created-at-field",
4123
4171
  };
4172
+ const IP_RESTRICTIONS_SELECTORS = {
4173
+ enableIPRestrictionChk: "enable-ip-restriction-checkbox",
4174
+ saveChanges: "ip-restriction-save-changes",
4175
+ addIPRangeBtn: "add-allowed-ip-range-button",
4176
+ ipStartTextField: "ip-start-text-field",
4177
+ ipEndTextField: "ip-end-text-field",
4178
+ ipRangeDeleteBtn: "allowed-ip-range-delete-button",
4179
+ ipStartInpError: "ip-start-input-error",
4180
+ ipEndInpError: "ip-end-input-error",
4181
+ typeSelectError: "type-select-error",
4182
+ };
4124
4183
 
4125
4184
  const DATE_PICKER_SELECTORS = {
4126
4185
  pickerInput: "picker-input",
@@ -4130,6 +4189,18 @@ const DATE_PICKER_SELECTORS = {
4130
4189
  prevYearButton: "prev-year-button",
4131
4190
  };
4132
4191
 
4192
+ const ONBOARDING_SELECTORS = {
4193
+ welcomeTitle: "onboarding-welcome-title",
4194
+ welcomeDescription: "onboarding-welcome-description",
4195
+ getStartedBtn: "onboarding-welcome-button",
4196
+ doLaterBtn: "onboarding-do-later-button",
4197
+ helpBtn: "onboarding-help-button",
4198
+ continueBtn: "onboarding-continue-button",
4199
+ congratulationsTitle: "onboarding-congratulations-title",
4200
+ congratulationsDescription: "onboarding-congratulations-description",
4201
+ congratulationsBtn: "onboarding-congratulations-button",
4202
+ };
4203
+
4133
4204
  const mimeTypeMap = {
4134
4205
  csv: "text/csv",
4135
4206
  avi: "video/x-msvideo",
@@ -4267,11 +4338,12 @@ class CustomCommands {
4267
4338
  }),
4268
4339
  ]);
4269
4340
  };
4270
- this.apiRequest = async ({ url, failOnStatusCode = true, headers: additionalHeaders, body: data, method = "get", params = {}, ...otherOptions }) => {
4341
+ this.apiRequest = async ({ url, failOnStatusCode = true, headers: additionalHeaders, body: data, method = "get", params = {}, timeout = 30000, ...otherOptions }) => {
4271
4342
  var _a;
4272
4343
  const csrfToken = (_a = this.csrfToken) !== null && _a !== void 0 ? _a : (await this.initializeCsrfToken());
4273
4344
  const requestOptions = {
4274
4345
  failOnStatusCode,
4346
+ timeout,
4275
4347
  headers: {
4276
4348
  ...additionalHeaders,
4277
4349
  "accept-encoding": "gzip",
@@ -5094,17 +5166,17 @@ for (var i = 0; i < entries.length; i++) {
5094
5166
  * @param {string} message
5095
5167
  * @param {any} [locator]
5096
5168
  */
5097
- function ParseError$2(message, locator) {
5169
+ function ParseError$3(message, locator) {
5098
5170
  this.message = message;
5099
5171
  this.locator = locator;
5100
- if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError$2);
5172
+ if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError$3);
5101
5173
  }
5102
- extendError(ParseError$2);
5174
+ extendError(ParseError$3);
5103
5175
 
5104
5176
  errors$4.DOMException = DOMException$2;
5105
5177
  errors$4.DOMExceptionName = DOMExceptionName$1;
5106
5178
  errors$4.ExceptionCode = ExceptionCode;
5107
- errors$4.ParseError = ParseError$2;
5179
+ errors$4.ParseError = ParseError$3;
5108
5180
 
5109
5181
  var dom$1 = {};
5110
5182
 
@@ -10941,7 +11013,7 @@ var isHTMLMimeType$1 = conventions$2.isHTMLMimeType;
10941
11013
  var isHTMLRawTextElement = conventions$2.isHTMLRawTextElement;
10942
11014
  var hasOwn = conventions$2.hasOwn;
10943
11015
  var NAMESPACE$1 = conventions$2.NAMESPACE;
10944
- var ParseError$1 = errors$2.ParseError;
11016
+ var ParseError$2 = errors$2.ParseError;
10945
11017
  var DOMException = errors$2.DOMException;
10946
11018
 
10947
11019
  //var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
@@ -10964,7 +11036,7 @@ XMLReader$1.prototype = {
10964
11036
  var domBuilder = this.domBuilder;
10965
11037
  domBuilder.startDocument();
10966
11038
  _copy(defaultNSMap, (defaultNSMap = Object.create(null)));
10967
- parse$9(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);
11039
+ parse$a(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);
10968
11040
  domBuilder.endDocument();
10969
11041
  },
10970
11042
  };
@@ -10978,7 +11050,7 @@ XMLReader$1.prototype = {
10978
11050
  */
10979
11051
  var ENTITY_REG = /&#?\w+;?/g;
10980
11052
 
10981
- function parse$9(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {
11053
+ function parse$a(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {
10982
11054
  var isHTML = isHTMLMimeType$1(domBuilder.mimeType);
10983
11055
  if (source.indexOf(g.UNICODE_REPLACEMENT_CHARACTER) >= 0) {
10984
11056
  return errorHandler.fatalError('Unicode replacement character detected, source encoding issues?');
@@ -11164,10 +11236,10 @@ function parse$9(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler)
11164
11236
  }
11165
11237
  }
11166
11238
  } catch (e) {
11167
- if (e instanceof ParseError$1) {
11239
+ if (e instanceof ParseError$2) {
11168
11240
  throw e;
11169
11241
  } else if (e instanceof DOMException) {
11170
- throw new ParseError$1(e.name + ': ' + e.message, domBuilder.locator, e);
11242
+ throw new ParseError$2(e.name + ': ' + e.message, domBuilder.locator, e);
11171
11243
  }
11172
11244
  errorHandler.error('element parse error: ' + e);
11173
11245
  end = -1;
@@ -11847,7 +11919,7 @@ var isHTMLMimeType = conventions$1.isHTMLMimeType;
11847
11919
  var isValidMimeType = conventions$1.isValidMimeType;
11848
11920
  var MIME_TYPE$5 = conventions$1.MIME_TYPE;
11849
11921
  var NAMESPACE = conventions$1.NAMESPACE;
11850
- var ParseError = errors$1.ParseError;
11922
+ var ParseError$1 = errors$1.ParseError;
11851
11923
 
11852
11924
  var XMLReader = sax$1.XMLReader;
11853
11925
 
@@ -12287,7 +12359,7 @@ DOMHandler.prototype = {
12287
12359
  try {
12288
12360
  this.onError(level, message, this);
12289
12361
  } catch (e) {
12290
- throw new ParseError('Reporting ' + level + ' "' + message + '" caused ' + e, this.locator);
12362
+ throw new ParseError$1('Reporting ' + level + ' "' + message + '" caused ' + e, this.locator);
12291
12363
  }
12292
12364
  } else {
12293
12365
  console.error('[xmldom ' + level + ']\t' + message, _locator(this.locator));
@@ -12314,7 +12386,7 @@ DOMHandler.prototype = {
12314
12386
  */
12315
12387
  fatalError: function (message) {
12316
12388
  this.reportError('fatalError', message);
12317
- throw new ParseError(message, this.locator);
12389
+ throw new ParseError$1(message, this.locator);
12318
12390
  },
12319
12391
  };
12320
12392
 
@@ -36981,7 +37053,7 @@ function parserPosition(data, i, formatToken, contextTokens = 3) {
36981
37053
  }
36982
37054
  return lines.join('\n');
36983
37055
  }
36984
- function parse$8(parser, tokens, options, formatToken = JSON.stringify) {
37056
+ function parse$9(parser, tokens, options, formatToken = JSON.stringify) {
36985
37057
  const data = { tokens: tokens, options: options };
36986
37058
  const result = parser(data, 0);
36987
37059
  if (!result.matched) {
@@ -37041,7 +37113,7 @@ core$3.of = emit;
37041
37113
  core$3.option = option;
37042
37114
  core$3.or = choice;
37043
37115
  core$3.otherwise = otherwise;
37044
- core$3.parse = parse$8;
37116
+ core$3.parse = parse$9;
37045
37117
  core$3.parserPosition = parserPosition;
37046
37118
  core$3.peek = peek;
37047
37119
  core$3.recursive = recursive;
@@ -37242,7 +37314,7 @@ function parse_(parser, str) {
37242
37314
  function prettyPrintPosition(str, offset, len = 1) {
37243
37315
  return `${str.replace(/(\t)|(\r)|(\n)/g, (m, t, r) => t ? '\u2409' : r ? '\u240d' : '\u240a')}\n${''.padEnd(offset)}${'^'.repeat(len)}`;
37244
37316
  }
37245
- function parse$7(str) {
37317
+ function parse$8(str) {
37246
37318
  return parse_(listSelector_, str);
37247
37319
  }
37248
37320
  function parse1(str) {
@@ -37370,7 +37442,7 @@ parseley$1.Ast = ast;
37370
37442
  parseley$1.compareSelectors = compareSelectors;
37371
37443
  parseley$1.compareSpecificity = compareSpecificity;
37372
37444
  parseley$1.normalize = normalize$3;
37373
- parseley$1.parse = parse$7;
37445
+ parseley$1.parse = parse$8;
37374
37446
  parseley$1.parse1 = parse1;
37375
37447
  parseley$1.serialize = serialize;
37376
37448
 
@@ -43946,7 +44018,7 @@ var textFormatters = /*#__PURE__*/Object.freeze({
43946
44018
  * @default
43947
44019
  * @private
43948
44020
  */
43949
- const DEFAULT_OPTIONS = {
44021
+ const DEFAULT_OPTIONS$1 = {
43950
44022
  baseElements: {
43951
44023
  selectors: [ 'body' ],
43952
44024
  orderBy: 'selectors', // 'selectors' | 'occurrence'
@@ -44060,7 +44132,7 @@ const selectorsMerge = (acc, src, options) => (
44060
44132
  */
44061
44133
  function compile$3 (options = {}) {
44062
44134
  options = merge__default["default"](
44063
- DEFAULT_OPTIONS,
44135
+ DEFAULT_OPTIONS$1,
44064
44136
  options,
44065
44137
  {
44066
44138
  arrayMerge: overwriteMerge,
@@ -44725,7 +44797,7 @@ function assign (obj /* from1, from2, from3, ... */) {
44725
44797
 
44726
44798
  function _class (obj) { return Object.prototype.toString.call(obj) }
44727
44799
  function isString$1 (obj) { return _class(obj) === '[object String]' }
44728
- function isObject$3 (obj) { return _class(obj) === '[object Object]' }
44800
+ function isObject$4 (obj) { return _class(obj) === '[object Object]' }
44729
44801
  function isRegExp (obj) { return _class(obj) === '[object RegExp]' }
44730
44802
  function isFunction (obj) { return _class(obj) === '[object Function]' }
44731
44803
 
@@ -44887,7 +44959,7 @@ function compile$2 (self) {
44887
44959
 
44888
44960
  self.__compiled__[name] = compiled;
44889
44961
 
44890
- if (isObject$3(val)) {
44962
+ if (isObject$4(val)) {
44891
44963
  if (isRegExp(val.validate)) {
44892
44964
  compiled.validate = createValidator(val.validate);
44893
44965
  } else if (isFunction(val.validate)) {
@@ -48268,7 +48340,9 @@ class MailerUtils {
48268
48340
  };
48269
48341
  this.findMessage = async (messageSearchCriteria = {}, { timeout = 10000, receivedAfter = dateTimeOneHourAgo(), expectedEmailCount = 1, } = {}, shouldThrowErrorOnTimeout = true) => {
48270
48342
  const ids = await this.getEmailIds(messageSearchCriteria, { expectedEmailCount, receivedAfter, timeout }, shouldThrowErrorOnTimeout);
48271
- return (await this.getEmails(ids))[0];
48343
+ const emails = await this.getEmails(ids);
48344
+ const filteredEmails = emails.filter(email => this.matchesCriteria(email, messageSearchCriteria));
48345
+ return filteredEmails[0] || {};
48272
48346
  };
48273
48347
  this.findOtpFromEmail = async ({ email, subjectSubstring = OTP_EMAIL_PATTERN, timeout = 2 * 60 * 1000, receivedAfter = new Date(), expectedEmailCount = 1, }) => {
48274
48348
  if (!this.accountId) {
@@ -48293,6 +48367,26 @@ class MailerUtils {
48293
48367
  };
48294
48368
  this.fastmailApi = new FastmailApi(neetoPlaywrightUtilities);
48295
48369
  }
48370
+ matchesCriteria(email, criteria) {
48371
+ const { to, from, subject, body } = criteria;
48372
+ if (to && !email.to.some(r => r.email.toLowerCase() === to.toLowerCase())) {
48373
+ return false;
48374
+ }
48375
+ if (from &&
48376
+ !email.from.some(s => s.email.toLowerCase() === from.toLowerCase())) {
48377
+ return false;
48378
+ }
48379
+ if (subject &&
48380
+ !email.subject.toLowerCase().includes(subject.toLowerCase())) {
48381
+ return false;
48382
+ }
48383
+ if (body &&
48384
+ !(email.html.body.toLowerCase().includes(body.toLowerCase()) ||
48385
+ email.text.body.toLowerCase().includes(body.toLowerCase()))) {
48386
+ return false;
48387
+ }
48388
+ return true;
48389
+ }
48296
48390
  }
48297
48391
 
48298
48392
  function isNodePattern(cb) {
@@ -48617,14 +48711,14 @@ function grayPixel(img, i) {
48617
48711
  var pixelMatch = /*@__PURE__*/getDefaultExportFromCjs(pixelmatch_1);
48618
48712
 
48619
48713
  // This file is autogenerated. It's used to publish ESM to npm.
48620
- function _typeof$1(obj) {
48714
+ function _typeof$7(obj) {
48621
48715
  "@babel/helpers - typeof";
48622
48716
 
48623
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
48717
+ return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
48624
48718
  return typeof obj;
48625
48719
  } : function (obj) {
48626
48720
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
48627
- }, _typeof$1(obj);
48721
+ }, _typeof$7(obj);
48628
48722
  }
48629
48723
 
48630
48724
  // https://github.com/bgrins/TinyColor
@@ -48888,7 +48982,7 @@ tinycolor.prototype = {
48888
48982
  // If input is an object, force 1 into "1.0" to handle ratios properly
48889
48983
  // String input requires "1.0" as input, so 1 will be treated as 1
48890
48984
  tinycolor.fromRatio = function (color, opts) {
48891
- if (_typeof$1(color) == "object") {
48985
+ if (_typeof$7(color) == "object") {
48892
48986
  var newColor = {};
48893
48987
  for (var i in color) {
48894
48988
  if (color.hasOwnProperty(i)) {
@@ -48934,7 +49028,7 @@ function inputToRGB(color) {
48934
49028
  if (typeof color == "string") {
48935
49029
  color = stringInputToObject(color);
48936
49030
  }
48937
- if (_typeof$1(color) == "object") {
49031
+ if (_typeof$7(color) == "object") {
48938
49032
  if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
48939
49033
  rgb = rgbToRgb(color.r, color.g, color.b);
48940
49034
  ok = true;
@@ -131923,7 +132017,7 @@ const addType = (mime, extensions) => {
131923
132017
  * @param {string} path path to find extension for
131924
132018
  * @returns {string} mime found mime type
131925
132019
  */
131926
- const getType = path => {
132020
+ const getType$1 = path => {
131927
132021
  const pathParts = path.split("/").slice(-1);
131928
132022
  const extension = pathParts[pathParts.length - 1].split(".").pop();
131929
132023
  const type = findType(extension);
@@ -136262,7 +136356,7 @@ async function getMIMEFromBuffer(buffer, path) {
136262
136356
  if (path) {
136263
136357
  // If a path is supplied, and fileType yields no results, then retry with MIME
136264
136358
  // Path can be either a file path or a url
136265
- return getType(path);
136359
+ return getType$1(path);
136266
136360
  }
136267
136361
  return null;
136268
136362
  }
@@ -136457,9 +136551,9 @@ function getBufferAsync(mime) {
136457
136551
  return promisify(getBuffer, this, mime);
136458
136552
  }
136459
136553
 
136460
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
136461
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
136462
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
136554
+ function _defineProperty$4(obj, key, value) { key = _toPropertyKey$5(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
136555
+ function _toPropertyKey$5(arg) { var key = _toPrimitive$5(arg, "string"); return typeof key === "symbol" ? key : String(key); }
136556
+ function _toPrimitive$5(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
136463
136557
  const alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_";
136464
136558
 
136465
136559
  // an array storing the maximum string length of hashes at various bases
@@ -136594,17 +136688,17 @@ let Jimp$1 = class Jimp extends EventEmitter {
136594
136688
  args[_key] = arguments[_key];
136595
136689
  }
136596
136690
  super();
136597
- _defineProperty(this, "bitmap", emptyBitmap);
136598
- _defineProperty(this, "_background", 0x00000000);
136599
- _defineProperty(this, "_originalMime", Jimp.MIME_PNG);
136600
- _defineProperty(this, "_exif", null);
136601
- _defineProperty(this, "_rgba", true);
136602
- _defineProperty(this, "writeAsync", path => promisify(this.write, this, path));
136603
- _defineProperty(this, "getBase64Async", mime => promisify(this.getBase64, this, mime));
136604
- _defineProperty(this, "getBuffer", getBuffer);
136605
- _defineProperty(this, "getBufferAsync", getBufferAsync);
136606
- _defineProperty(this, "getPixelColour", this.getPixelColor);
136607
- _defineProperty(this, "setPixelColour", this.setPixelColor);
136691
+ _defineProperty$4(this, "bitmap", emptyBitmap);
136692
+ _defineProperty$4(this, "_background", 0x00000000);
136693
+ _defineProperty$4(this, "_originalMime", Jimp.MIME_PNG);
136694
+ _defineProperty$4(this, "_exif", null);
136695
+ _defineProperty$4(this, "_rgba", true);
136696
+ _defineProperty$4(this, "writeAsync", path => promisify(this.write, this, path));
136697
+ _defineProperty$4(this, "getBase64Async", mime => promisify(this.getBase64, this, mime));
136698
+ _defineProperty$4(this, "getBuffer", getBuffer);
136699
+ _defineProperty$4(this, "getBufferAsync", getBufferAsync);
136700
+ _defineProperty$4(this, "getPixelColour", this.getPixelColor);
136701
+ _defineProperty$4(this, "setPixelColour", this.setPixelColor);
136608
136702
  const jimpInstance = this;
136609
136703
  let cb = noop$3;
136610
136704
  if (isArrayBuffer(args[0])) {
@@ -136870,7 +136964,7 @@ let Jimp$1 = class Jimp extends EventEmitter {
136870
136964
  if (typeof cb !== "function") {
136871
136965
  return throwError.call(this, "cb must be a function", cb);
136872
136966
  }
136873
- const mime = getType(path) || this.getMIME();
136967
+ const mime = getType$1(path) || this.getMIME();
136874
136968
  const pathObj = Path.parse(path);
136875
136969
  if (pathObj.dir) {
136876
136970
  fs$d.mkdirSync(pathObj.dir, {
@@ -137606,7 +137700,7 @@ function clone(obj0) {
137606
137700
  } // Custom guard
137607
137701
 
137608
137702
 
137609
- function isObject$2(o) {
137703
+ function isObject$3(o) {
137610
137704
  return o != null && typeof o === 'object';
137611
137705
  } // _deepFreeze = (obj) ->
137612
137706
  // Object.freeze obj
@@ -137890,7 +137984,7 @@ function doSetIn(obj, path, val, idx) {
137890
137984
  if (idx === path.length - 1) {
137891
137985
  newValue = val;
137892
137986
  } else {
137893
- const nestedObj = isObject$2(obj) && isObject$2(obj[key]) ? obj[key] : typeof path[idx + 1] === 'number' ? [] : {};
137987
+ const nestedObj = isObject$3(obj) && isObject$3(obj[key]) ? obj[key] : typeof path[idx + 1] === 'number' ? [] : {};
137894
137988
  newValue = doSetIn(nestedObj, path, val, idx + 1);
137895
137989
  }
137896
137990
 
@@ -138155,7 +138249,7 @@ function doMerge(fAddDefaults, fDeep, first, ...rest) {
138155
138249
  if (fAddDefaults && out[key] !== undefined) continue;
138156
138250
  let nextVal = obj[key];
138157
138251
 
138158
- if (fDeep && isObject$2(out[key]) && isObject$2(nextVal)) {
138252
+ if (fDeep && isObject$3(out[key]) && isObject$3(nextVal)) {
138159
138253
  nextVal = doMerge(fAddDefaults, fDeep, out[key], nextVal);
138160
138254
  }
138161
138255
 
@@ -142511,11 +142605,11 @@ var packerSync = function (metaData, opt) {
142511
142605
  return Buffer.concat(chunks);
142512
142606
  };
142513
142607
 
142514
- let parse$6 = parserSync;
142608
+ let parse$7 = parserSync;
142515
142609
  let pack = packerSync;
142516
142610
 
142517
142611
  pngSync.read = function (buffer, options) {
142518
- return parse$6(buffer, options || {});
142612
+ return parse$7(buffer, options || {});
142519
142613
  };
142520
142614
 
142521
142615
  pngSync.write = function (png, options) {
@@ -158271,7 +158365,7 @@ var normalize$1 = (() => ({
158271
158365
  }
158272
158366
  }));
158273
158367
 
158274
- var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};var http=http$1;var https=https$1;var url$1=Url;var qs=require$$3$1;var zlib=zlib$5;var util$2=require$$0$2;var phin=function phin(opts,cb){if(typeof opts!=='string'){if(!opts.hasOwnProperty('url')){throw new Error('Missing url option from options for request method.')}}var addr=(typeof opts==='undefined'?'undefined':_typeof(opts))==='object'?url$1.parse(opts.url):url$1.parse(opts);var options={'hostname':addr.hostname,'port':addr.port||(addr.protocol.toLowerCase()==='http:'?80:443),'path':addr.path,'method':'GET','headers':{},'auth':addr.auth||null,'parse':'none','stream':false};if((typeof opts==='undefined'?'undefined':_typeof(opts))==='object'){options=Object.assign(options,opts);}options.port=Number(options.port);if(options.hasOwnProperty('timeout'))delete options.timeout;if(options.compressed===true){options.headers['accept-encoding']='gzip, deflate';}if(opts.hasOwnProperty('form')){if(_typeof(opts.form)!=='object'){throw new Error('phin \'form\' option must be of type Object if present.')}var formDataString=qs.stringify(opts.form);options.headers['Content-Type']='application/x-www-form-urlencoded';options.headers['Content-Length']=Buffer.byteLength(formDataString);opts.data=formDataString;}var req=void 0;var resHandler=function resHandler(res){var stream=res;if(options.compressed===true){if(res.headers['content-encoding']==='gzip'){stream=res.pipe(zlib.createGunzip());}else if(res.headers['content-encoding']==='deflate'){stream=res.pipe(zlib.createInflate());}}if(options.stream===true){res.stream=stream;if(cb)cb(null,res);}else {res.body=new Buffer([]);stream.on('data',function(chunk){res.body=Buffer.concat([res.body,chunk]);});stream.on('end',function(){if(cb){if(options.parse==='json'){try{res.body=JSON.parse(res.body.toString());}catch(err){cb('Invalid JSON received.',res);return}}cb(null,res);}});}};switch(addr.protocol.toLowerCase()){case'http:':req=http.request(options,resHandler);break;case'https:':req=https.request(options,resHandler);break;default:if(cb)cb(new Error('Invalid / unknown URL protocol. Expected HTTP or HTTPS.'),null);return;}if(typeof opts.timeout==='number'){req.setTimeout(opts.timeout,function(){req.abort();if(cb)cb(new Error('Timeout has been reached.'),null);cb=null;});}req.on('error',function(err){if(cb)cb(err,null);});if(opts.hasOwnProperty('data')){var postData=opts.data;if(!(opts.data instanceof Buffer)&&_typeof(opts.data)==='object'){var contentType=options.headers['content-type']||options.headers['Content-Type'];if(contentType==='application/x-www-form-urlencoded'){postData=qs.stringify(opts.data);}else {try{postData=JSON.stringify(opts.data);}catch(err){if(cb)cb(new Error('Couldn\'t stringify object. (Likely due to a circular reference.)'),null);}}}req.write(postData);}req.end();};phin.promisified=function(opts,http){return new Promise(function(resolve,reject){phin(opts,function(err,res){if(err){reject(err);}else {resolve(res);}});})};if(util$2.promisify){phin[util$2.promisify.custom]=phin.promisified;}var phin_compiled=phin;
158368
+ var _typeof$6=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};var http=http$1;var https=https$1;var url$1=Url;var qs=require$$3$1;var zlib=zlib$5;var util$2=require$$0$2;var phin=function phin(opts,cb){if(typeof opts!=='string'){if(!opts.hasOwnProperty('url')){throw new Error('Missing url option from options for request method.')}}var addr=(typeof opts==='undefined'?'undefined':_typeof$6(opts))==='object'?url$1.parse(opts.url):url$1.parse(opts);var options={'hostname':addr.hostname,'port':addr.port||(addr.protocol.toLowerCase()==='http:'?80:443),'path':addr.path,'method':'GET','headers':{},'auth':addr.auth||null,'parse':'none','stream':false};if((typeof opts==='undefined'?'undefined':_typeof$6(opts))==='object'){options=Object.assign(options,opts);}options.port=Number(options.port);if(options.hasOwnProperty('timeout'))delete options.timeout;if(options.compressed===true){options.headers['accept-encoding']='gzip, deflate';}if(opts.hasOwnProperty('form')){if(_typeof$6(opts.form)!=='object'){throw new Error('phin \'form\' option must be of type Object if present.')}var formDataString=qs.stringify(opts.form);options.headers['Content-Type']='application/x-www-form-urlencoded';options.headers['Content-Length']=Buffer.byteLength(formDataString);opts.data=formDataString;}var req=void 0;var resHandler=function resHandler(res){var stream=res;if(options.compressed===true){if(res.headers['content-encoding']==='gzip'){stream=res.pipe(zlib.createGunzip());}else if(res.headers['content-encoding']==='deflate'){stream=res.pipe(zlib.createInflate());}}if(options.stream===true){res.stream=stream;if(cb)cb(null,res);}else {res.body=new Buffer([]);stream.on('data',function(chunk){res.body=Buffer.concat([res.body,chunk]);});stream.on('end',function(){if(cb){if(options.parse==='json'){try{res.body=JSON.parse(res.body.toString());}catch(err){cb('Invalid JSON received.',res);return}}cb(null,res);}});}};switch(addr.protocol.toLowerCase()){case'http:':req=http.request(options,resHandler);break;case'https:':req=https.request(options,resHandler);break;default:if(cb)cb(new Error('Invalid / unknown URL protocol. Expected HTTP or HTTPS.'),null);return;}if(typeof opts.timeout==='number'){req.setTimeout(opts.timeout,function(){req.abort();if(cb)cb(new Error('Timeout has been reached.'),null);cb=null;});}req.on('error',function(err){if(cb)cb(err,null);});if(opts.hasOwnProperty('data')){var postData=opts.data;if(!(opts.data instanceof Buffer)&&_typeof$6(opts.data)==='object'){var contentType=options.headers['content-type']||options.headers['Content-Type'];if(contentType==='application/x-www-form-urlencoded'){postData=qs.stringify(opts.data);}else {try{postData=JSON.stringify(opts.data);}catch(err){if(cb)cb(new Error('Couldn\'t stringify object. (Likely due to a circular reference.)'),null);}}}req.write(postData);}req.end();};phin.promisified=function(opts,http){return new Promise(function(resolve,reject){phin(opts,function(err,res){if(err){reject(err);}else {resolve(res);}});})};if(util$2.promisify){phin[util$2.promisify.custom]=phin.promisified;}var phin_compiled=phin;
158275
158369
 
158276
158370
  var parseBmfontAscii = function parseBMFontAscii(data) {
158277
158371
  if (!data)
@@ -182502,7 +182596,7 @@ function splitToRanges(min, max) {
182502
182596
  }
182503
182597
 
182504
182598
  stops = [...stops];
182505
- stops.sort(compare);
182599
+ stops.sort(compare$1);
182506
182600
  return stops;
182507
182601
  }
182508
182602
 
@@ -182608,7 +182702,7 @@ function zip(a, b) {
182608
182702
  return arr;
182609
182703
  }
182610
182704
 
182611
- function compare(a, b) {
182705
+ function compare$1(a, b) {
182612
182706
  return a > b ? 1 : b > a ? -1 : 0;
182613
182707
  }
182614
182708
 
@@ -182684,7 +182778,7 @@ var toRegexRange_1 = toRegexRange$1;
182684
182778
  const util$1 = require$$0$2;
182685
182779
  const toRegexRange = toRegexRange_1;
182686
182780
 
182687
- const isObject$1 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
182781
+ const isObject$2 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
182688
182782
 
182689
182783
  const transform = toNumber => {
182690
182784
  return value => toNumber === true ? Number(value) : String(value);
@@ -182899,7 +182993,7 @@ const fill$2 = (start, end, step, options = {}) => {
182899
182993
  return fill$2(start, end, 1, { transform: step });
182900
182994
  }
182901
182995
 
182902
- if (isObject$1(step)) {
182996
+ if (isObject$2(step)) {
182903
182997
  return fill$2(start, end, 0, step);
182904
182998
  }
182905
182999
 
@@ -182908,7 +183002,7 @@ const fill$2 = (start, end, step, options = {}) => {
182908
183002
  step = step || opts.step || 1;
182909
183003
 
182910
183004
  if (!isNumber(step)) {
182911
- if (step != null && !isObject$1(step)) return invalidStep(step, opts);
183005
+ if (step != null && !isObject$2(step)) return invalidStep(step, opts);
182912
183006
  return fill$2(start, end, 1, step);
182913
183007
  }
182914
183008
 
@@ -183176,7 +183270,7 @@ const {
183176
183270
  * parse
183177
183271
  */
183178
183272
 
183179
- const parse$5 = (input, options = {}) => {
183273
+ const parse$6 = (input, options = {}) => {
183180
183274
  if (typeof input !== 'string') {
183181
183275
  throw new TypeError('Expected a string');
183182
183276
  }
@@ -183476,12 +183570,12 @@ const parse$5 = (input, options = {}) => {
183476
183570
  return ast;
183477
183571
  };
183478
183572
 
183479
- var parse_1$1 = parse$5;
183573
+ var parse_1$1 = parse$6;
183480
183574
 
183481
183575
  const stringify = stringify$4;
183482
183576
  const compile = compile_1;
183483
183577
  const expand$2 = expand_1;
183484
- const parse$4 = parse_1$1;
183578
+ const parse$5 = parse_1$1;
183485
183579
 
183486
183580
  /**
183487
183581
  * Expand the given pattern or create a regex-compatible string.
@@ -183533,7 +183627,7 @@ const braces$1 = (input, options = {}) => {
183533
183627
  * @api public
183534
183628
  */
183535
183629
 
183536
- braces$1.parse = (input, options = {}) => parse$4(input, options);
183630
+ braces$1.parse = (input, options = {}) => parse$5(input, options);
183537
183631
 
183538
183632
  /**
183539
183633
  * Creates a braces string from an AST, or an AST node.
@@ -184335,7 +184429,7 @@ const syntaxError = (type, char) => {
184335
184429
  * @return {Object}
184336
184430
  */
184337
184431
 
184338
- const parse$3 = (input, options) => {
184432
+ const parse$4 = (input, options) => {
184339
184433
  if (typeof input !== 'string') {
184340
184434
  throw new TypeError('Expected a string');
184341
184435
  }
@@ -184538,7 +184632,7 @@ const parse$3 = (input, options) => {
184538
184632
  // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
184539
184633
  //
184540
184634
  // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
184541
- const expression = parse$3(rest, { ...options, fastpaths: false }).output;
184635
+ const expression = parse$4(rest, { ...options, fastpaths: false }).output;
184542
184636
 
184543
184637
  output = token.close = `)${expression})${extglobStar})`;
184544
184638
  }
@@ -185284,7 +185378,7 @@ const parse$3 = (input, options) => {
185284
185378
  * impact when none of the fast paths match.
185285
185379
  */
185286
185380
 
185287
- parse$3.fastpaths = (input, options) => {
185381
+ parse$4.fastpaths = (input, options) => {
185288
185382
  const opts = { ...options };
185289
185383
  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
185290
185384
  const len = input.length;
@@ -185371,14 +185465,14 @@ parse$3.fastpaths = (input, options) => {
185371
185465
  return source;
185372
185466
  };
185373
185467
 
185374
- var parse_1 = parse$3;
185468
+ var parse_1 = parse$4;
185375
185469
 
185376
185470
  const path$7 = Path;
185377
185471
  const scan = scan_1;
185378
- const parse$2 = parse_1;
185472
+ const parse$3 = parse_1;
185379
185473
  const utils$c = utils$f;
185380
185474
  const constants$1 = constants$3;
185381
- const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
185475
+ const isObject$1 = val => val && typeof val === 'object' && !Array.isArray(val);
185382
185476
 
185383
185477
  /**
185384
185478
  * Creates a matcher function from one or more glob patterns. The
@@ -185415,7 +185509,7 @@ const picomatch$2 = (glob, options, returnState = false) => {
185415
185509
  return arrayMatcher;
185416
185510
  }
185417
185511
 
185418
- const isState = isObject(glob) && glob.tokens && glob.input;
185512
+ const isState = isObject$1(glob) && glob.tokens && glob.input;
185419
185513
 
185420
185514
  if (glob === '' || (typeof glob !== 'string' && !isState)) {
185421
185515
  throw new TypeError('Expected pattern to be a non-empty string');
@@ -185571,7 +185665,7 @@ picomatch$2.isMatch = (str, patterns, options) => picomatch$2(patterns, options)
185571
185665
 
185572
185666
  picomatch$2.parse = (pattern, options) => {
185573
185667
  if (Array.isArray(pattern)) return pattern.map(p => picomatch$2.parse(p, options));
185574
- return parse$2(pattern, { ...options, fastpaths: false });
185668
+ return parse$3(pattern, { ...options, fastpaths: false });
185575
185669
  };
185576
185670
 
185577
185671
  /**
@@ -185664,11 +185758,11 @@ picomatch$2.makeRe = (input, options = {}, returnOutput = false, returnState = f
185664
185758
  let parsed = { negated: false, fastpaths: true };
185665
185759
 
185666
185760
  if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
185667
- parsed.output = parse$2.fastpaths(input, options);
185761
+ parsed.output = parse$3.fastpaths(input, options);
185668
185762
  }
185669
185763
 
185670
185764
  if (!parsed.output) {
185671
- parsed = parse$2(input, options);
185765
+ parsed = parse$3(input, options);
185672
185766
  }
185673
185767
 
185674
185768
  return picomatch$2.compileRe(parsed, options, returnOutput, returnState);
@@ -189061,8 +189155,6 @@ const ORGANIZATION_TEXTS = {
189061
189155
  subdomainAvailable: "Subdomain is available",
189062
189156
  };
189063
189157
 
189064
- /* eslint-disable playwright/require-top-level-describe */
189065
- /* eslint-disable playwright/no-standalone-expect */
189066
189158
  class HelpAndProfilePage {
189067
189159
  constructor({ page, neetoPlaywrightUtilities, chatApiBaseURL, kbDocsBaseURL, changelogBaseURL, }) {
189068
189160
  this.hoverOnBody = () => this.page.locator("body").hover();
@@ -189482,6 +189574,31 @@ class HelpAndProfilePage {
189482
189574
  ]);
189483
189575
  });
189484
189576
  };
189577
+ this.verifySubscriptionPlan = async (plan, product) => {
189578
+ await test$1.test.step("1: Open Help Center links", () => this.openHelpCenter());
189579
+ await test$1.test.step("2: Open and verify subscription plan", async () => {
189580
+ await this.neetoPlaywrightUtilities.waitForPageLoad();
189581
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuLink)).toHaveText(this.t("neetoMolecules.sidebar.currentPlan", {
189582
+ subscriptionPlan: plan,
189583
+ }));
189584
+ await this.page
189585
+ .getByTestId(COMMON_SELECTORS.floatingActionMenuLink)
189586
+ .click();
189587
+ await this.neetoPlaywrightUtilities.waitForPageLoad();
189588
+ await test$1.expect(this.page).toHaveURL(new RegExp(ROUTES.auth.billing));
189589
+ if (!neetoCist.isPresent(product))
189590
+ return;
189591
+ //TODO: Use data-cy label when this https://github.com/neetozone/neeto-auth-playwright/issues/24 is resolved
189592
+ const actionButtonName = plan === "Free" ? "Upgrade" : "Downgrade";
189593
+ const productRow = this.page.getByRole("row", {
189594
+ name: `Neeto${product}`,
189595
+ });
189596
+ await Promise.all([
189597
+ test$1.expect(productRow.getByRole("cell", { name: plan })).toBeVisible(),
189598
+ test$1.expect(productRow.getByRole("button", { name: actionButtonName })).toBeVisible(),
189599
+ ]);
189600
+ });
189601
+ };
189485
189602
  this.page = page;
189486
189603
  this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
189487
189604
  this.chatApiBaseURL = chatApiBaseURL;
@@ -192225,12 +192342,11 @@ class EditorPage {
192225
192342
  await this.openHighlighterContainer(isButtonInMoreMenu);
192226
192343
  const colorPallete = this.page.getByTestId(COMMON_SELECTORS.customDropdownContainer());
192227
192344
  await colorPallete
192228
- .locator(`[style*="(${NEETO_EDITOR_SELECTORS.highlightText(colorIndex)})"]` //TODO: Use data-cy once https://github.com/bigbinary/neeto-editor-nano/issues/784 resolves
192229
- )
192345
+ .getByTestId(NEETO_EDITOR_SELECTORS.neetoEditorHighlightTextColor(colorIndex))
192230
192346
  .click();
192231
192347
  await this.openHighlighterContainer(isButtonInMoreMenu);
192232
192348
  await colorPallete
192233
- .locator(`[style*="(${NEETO_EDITOR_SELECTORS.highlightBg(colorIndex)})"]`) //TODO: Use data-cy once https://github.com/bigbinary/neeto-editor-nano/issues/784 resolves
192349
+ .getByTestId(NEETO_EDITOR_SELECTORS.neetoEditorHighlightBgColor(colorIndex))
192234
192350
  .click();
192235
192351
  const highlightedText = this.contentField.getByText(randomText);
192236
192352
  await this.focusText(highlightedText);
@@ -192456,6 +192572,17 @@ class EditorPage {
192456
192572
  }
192457
192573
  return [{ key: "video-upload", value: this.videoPath }];
192458
192574
  };
192575
+ this.verifyTodoListSelector = async (isButtonInMoreMenu) => {
192576
+ const randomText = await this.fillRandomText();
192577
+ await test$1.expect(this.contentField.getByText(randomText, { exact: true })).toBeVisible();
192578
+ isButtonInMoreMenu && (await this.moreMenuSelector.click());
192579
+ await this.todoListSelector.click();
192580
+ await test$1.expect(this.contentField.locator(NEETO_EDITOR_SELECTORS.todoList, {
192581
+ hasText: randomText,
192582
+ })).toBeVisible();
192583
+ await this.moveCursorAtBottom();
192584
+ return [{ key: "todoList", value: randomText }];
192585
+ };
192459
192586
  this.verifyDynamicVariables = async (dynamicVariables) => {
192460
192587
  for (const { key, value } of dynamicVariables) {
192461
192588
  await this.dynamicVariablesButton.click();
@@ -192495,6 +192622,7 @@ class EditorPage {
192495
192622
  filePath: this.videoPath,
192496
192623
  isButtonInMoreMenu,
192497
192624
  }),
192625
+ todoList: isButtonInMoreMenu => this.verifyTodoListSelector(isButtonInMoreMenu),
192498
192626
  };
192499
192627
  this.verifyDescriptionEditor = async ({ dynamicVariables, linkUrl, videoPath, filePath, imageUrl, videoUrl, highlighterCount, cannedResponseSuccessMessage, } = {}) => {
192500
192628
  const fixedMenuButtons = await this.fixedMenuOptions();
@@ -192570,6 +192698,7 @@ class EditorPage {
192570
192698
  this.redoSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.redoOption);
192571
192699
  this.tableOption = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.tableOption);
192572
192700
  this.videoUploadOption = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.videoUploadOption);
192701
+ this.todoListSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.todoListOption);
192573
192702
  }
192574
192703
  }
192575
192704
 
@@ -193286,7 +193415,7 @@ class CustomDomainPage {
193286
193415
  .on("error", () => {
193287
193416
  resolve(false);
193288
193417
  });
193289
- }), { timeout: 30000, intervals: [5000] })
193418
+ }), { timeout: 60000, intervals: [5000] })
193290
193419
  .toBe(true);
193291
193420
  this.saveCustomDomainState = async () => {
193292
193421
  const { user } = readFileSyncIfExists();
@@ -193297,7 +193426,7 @@ class CustomDomainPage {
193297
193426
  updateCredentials({ key: "domain", value: CUSTOM_DOMAIN_SUFFIX });
193298
193427
  };
193299
193428
  // eslint-disable-next-line playwright/no-wait-for-timeout
193300
- this.waitForDomainPropagation = () => this.page.waitForTimeout(15000);
193429
+ this.waitForDomainPropagation = () => this.page.waitForTimeout(20000);
193301
193430
  this.setupCustomDomain = async () => {
193302
193431
  if (shouldSkipCustomDomainSetup())
193303
193432
  return;
@@ -193651,6 +193780,304 @@ const networkConditions = {
193651
193780
  },
193652
193781
  };
193653
193782
 
193783
+ const PHONE_NUMBER_FORMATS = [
193784
+ { name: "Afghanistan", code: "+93", format: "70#######", flag: "🇦🇫" },
193785
+ { name: "Aland", code: "+358", format: "5####", flag: "🇦🇽" },
193786
+ { name: "Albania", code: "+355", format: "68#######", flag: "🇦🇱" },
193787
+ { name: "Algeria", code: "+213", format: "55#######", flag: "🇩🇿" },
193788
+ { name: "American Samoa", code: "+1684", format: "#######", flag: "🇦🇸" },
193789
+ { name: "Andorra", code: "+376", format: "6#####", flag: "🇦🇩" },
193790
+ { name: "Angola", code: "+244", format: "9########", flag: "🇦🇴" },
193791
+ { name: "Anguilla", code: "+1264", format: "9######", flag: "🇦🇮" },
193792
+ { name: "Antarctica", code: "+672", format: "1####", flag: "🇦🇶" },
193793
+ { name: "Antigua and Barbuda", code: "+1268", format: "#######", flag: "🇦🇬" },
193794
+ { name: "Argentina", code: "+54", format: "11########", flag: "🇦🇷" },
193795
+ { name: "Armenia", code: "+374", format: "9#######", flag: "🇦🇲" },
193796
+ { name: "Aruba", code: "+297", format: "9######", flag: "🇦🇼" },
193797
+ { name: "Australia", code: "+61", format: "485######", flag: "🇦🇺" },
193798
+ { name: "Austria", code: "+43", format: "1#####", flag: "🇦🇹" },
193799
+ { name: "Azerbaijan", code: "+994", format: "50#######", flag: "🇦🇿" },
193800
+ { name: "Bahamas", code: "+1242", format: "5######", flag: "🇧🇸" },
193801
+ { name: "Bahrain", code: "+973", format: "36######", flag: "🇧🇭" },
193802
+ { name: "Bangladesh", code: "+880", format: "36######", flag: "🇧🇩" },
193803
+ { name: "Barbados", code: "+1246", format: "#######", flag: "🇧🇧" },
193804
+ { name: "Belarus", code: "+375", format: "29#######", flag: "🇧🇾" },
193805
+ { name: "Belgium", code: "+32", format: "2#######", flag: "🇧🇪" },
193806
+ { name: "Belize", code: "+501", format: "8######", flag: "🇧🇿" },
193807
+ { name: "Benin", code: "+229", format: "21######", flag: "🇧🇯" },
193808
+ { name: "Bermuda", code: "+1441", format: "#######", flag: "🇧🇲" },
193809
+ { name: "Bhutan", code: "+975", format: "17######", flag: "🇧🇹" },
193810
+ { name: "Bolivia", code: "+591", format: "2#######", flag: "🇧🇴" },
193811
+ { name: "Bonaire", code: "+5997", format: "######", flag: "🇧🇶" },
193812
+ {
193813
+ name: "Bosnia and Herzegovina",
193814
+ code: "+387",
193815
+ format: "6########",
193816
+ flag: "🇧🇦",
193817
+ },
193818
+ { name: "Botswana", code: "+267", format: "7#######", flag: "🇧🇼" },
193819
+ { name: "Bouvet Island", code: "+47", format: "2#######", flag: "🇧🇻" },
193820
+ { name: "Brazil", code: "+55", format: "9########", flag: "🇧🇷" },
193821
+ {
193822
+ name: "British Indian Ocean Territory",
193823
+ code: "+246",
193824
+ format: "3######",
193825
+ flag: "🇮🇴",
193826
+ },
193827
+ {
193828
+ name: "British Virgin Islands",
193829
+ code: "+1284",
193830
+ format: "#######",
193831
+ flag: "🇻🇬",
193832
+ },
193833
+ { name: "Brunei", code: "+673", format: "8######", flag: "🇧🇳" },
193834
+ { name: "Bulgaria", code: "+359", format: "8######", flag: "🇧🇬" },
193835
+ { name: "Burkina Faso", code: "+226", format: "70######", flag: "🇧🇫" },
193836
+ { name: "Burundi", code: "+257", format: "79######", flag: "🇧🇮" },
193837
+ { name: "Cambodia", code: "+855", format: "12######", flag: "🇰🇭" },
193838
+ { name: "Cameroon", code: "+237", format: "6########", flag: "🇨🇲" },
193839
+ { name: "Canada", code: "+1", format: "416#######", flag: "🇨🇦" },
193840
+ { name: "Cayman Islands", code: "+1345", format: "#######", flag: "🇰🇾" },
193841
+ { name: "Cape Verde", code: "+238", format: "5######", flag: "🇨🇻" },
193842
+ {
193843
+ name: "Central African Republic",
193844
+ code: "+236",
193845
+ format: "70######",
193846
+ flag: "🇨🇫",
193847
+ },
193848
+ { name: "Chad", code: "+235", format: "66######", flag: "🇹🇩" },
193849
+ { name: "Chile", code: "+56", format: "9########", flag: "🇨🇱" },
193850
+ { name: "China", code: "+86", format: "2#########", flag: "🇨🇳" },
193851
+ { name: "Christmas Island", code: "+61", format: "26#######", flag: "🇨🇽" },
193852
+ {
193853
+ name: "Cocos (Keeling) Islands",
193854
+ code: "+61",
193855
+ format: "26#######",
193856
+ flag: "🇨🇨",
193857
+ },
193858
+ { name: "Colombia", code: "+57", format: "3#########", flag: "🇨🇴" },
193859
+ { name: "Comoros", code: "+269", format: "7######", flag: "🇰🇲" },
193860
+ { name: "Cook Islands", code: "+682", format: "2####", flag: "🇨🇰" },
193861
+ { name: "Costa Rica", code: "+506", format: "6#######", flag: "🇨🇷" },
193862
+ { name: "Croatia", code: "+385", format: "91######", flag: "🇭🇷" },
193863
+ { name: "Cuba", code: "+53", format: "2######", flag: "🇨🇺" },
193864
+ { name: "Curacao", code: "+5999", format: "#######", flag: "🇨🇼" },
193865
+ { name: "Cyprus", code: "+357", format: "99######", flag: "🇨🇾" },
193866
+ { name: "Czech Republic", code: "+420", format: "7########", flag: "🇨🇿" },
193867
+ { name: "Denmark", code: "+45", format: "5#######", flag: "🇩🇰" },
193868
+ { name: "Djibouti", code: "+253", format: "77######", flag: "🇩🇯" },
193869
+ { name: "Dominica", code: "+1767", format: "#######", flag: "🇩🇲" },
193870
+ { name: "Dominican Republic", code: "+1", format: "809#######", flag: "🇩🇴" },
193871
+ { name: "East Timor", code: "+670", format: "2######", flag: "🇹🇱" },
193872
+ { name: "Ecuador", code: "+593", format: "2#######", flag: "🇪🇨" },
193873
+ { name: "Egypt", code: "+20", format: "10######", flag: "🇪🇬" },
193874
+ { name: "El Salvador", code: "+503", format: "7#######", flag: "🇸🇻" },
193875
+ { name: "Equatorial Guinea", code: "+240", format: "3########", flag: "🇬🇶" },
193876
+ { name: "Eritrea", code: "+291", format: "1######", flag: "🇪🇷" },
193877
+ { name: "Estonia", code: "+372", format: "5######", flag: "🇪🇪" },
193878
+ { name: "Eswatini", code: "+268", format: "76######", flag: "🇸🇿" },
193879
+ { name: "Ethiopia", code: "+251", format: "9########", flag: "🇪🇹" },
193880
+ { name: "Falkland Islands", code: "+500", format: "5####", flag: "🇫🇰" },
193881
+ { name: "Faroe Islands", code: "+298", format: "######", flag: "🇫🇴" },
193882
+ { name: "Fiji", code: "+679", format: "9######", flag: "🇫🇯" },
193883
+ { name: "Finland", code: "+358", format: "########", flag: "🇫🇮" },
193884
+ { name: "France", code: "+33", format: "#########", flag: "🇫🇷" },
193885
+ { name: "French Guiana", code: "+594", format: "9########", flag: "🇬🇫" },
193886
+ { name: "French Polynesia", code: "+689", format: "87######", flag: "🇵🇫" },
193887
+ { name: "Gabon", code: "+241", format: "6#######", flag: "🇬🇦" },
193888
+ { name: "Gambia", code: "+220", format: "7######", flag: "🇬🇲" },
193889
+ { name: "Georgia", code: "+995", format: "5########", flag: "🇬🇪" },
193890
+ { name: "Germany", code: "+49", format: "5########", flag: "🇩🇪" },
193891
+ { name: "Ghana", code: "+233", format: "5########", flag: "🇬🇭" },
193892
+ { name: "Greece", code: "+30", format: "69########", flag: "🇬🇷" },
193893
+ { name: "Greenland", code: "+299", format: "6#####", flag: "🇬🇱" },
193894
+ { name: "Grenada", code: "+1473", format: "9##-####", flag: "🇬🇩" },
193895
+ { name: "Guam", code: "+1671", format: "5######", flag: "🇬🇺" },
193896
+ { name: "Guatemala", code: "+502", format: "6#######", flag: "🇬🇹" },
193897
+ { name: "Guinea", code: "+224", format: "6########", flag: "🇬🇳" },
193898
+ { name: "Guinea-Bissau", code: "+245", format: "9########", flag: "🇬🇼" },
193899
+ { name: "Guyana", code: "+592", format: "5######", flag: "🇬🇾" },
193900
+ { name: "Haiti", code: "+509", format: "3#######", flag: "🇭🇹" },
193901
+ { name: "Honduras", code: "+504", format: "9#######", flag: "🇭🇳" },
193902
+ { name: "Hungary", code: "+36", format: "9#######", flag: "🇭🇺" },
193903
+ { name: "Hong Kong", code: "+852", format: "########", flag: "🇭🇰" },
193904
+ { name: "Iceland", code: "+354", format: "4######", flag: "🇮🇸" },
193905
+ { name: "India", code: "+91", format: "##########", flag: "🇮🇳" },
193906
+ { name: "Indonesia", code: "+62", format: "8#########", flag: "🇮🇩" },
193907
+ { name: "Iran", code: "+98", format: "9#########", flag: "🇮🇷" },
193908
+ { name: "Iraq", code: "+964", format: "2########", flag: "🇮🇶" },
193909
+ { name: "Ireland", code: "+353", format: "8########", flag: "🇮🇪" },
193910
+ { name: "Israel", code: "+972", format: "5########", flag: "🇮🇱" },
193911
+ { name: "Italy", code: "+39", format: "3########", flag: "🇮🇹" },
193912
+ { name: "Jamaica", code: "+1876", format: "4######", flag: "🇯🇲" },
193913
+ { name: "Japan", code: "+81", format: "90########", flag: "🇯🇵" },
193914
+ { name: "Jersey", code: "+44", format: "1544######", flag: "🇯🇪" },
193915
+ { name: "Jordan", code: "+962", format: "7########", flag: "🇯🇴" },
193916
+ { name: "Kazakhstan", code: "+7", format: "7#########", flag: "🇰🇿" },
193917
+ { name: "Kenya", code: "+254", format: "7########", flag: "🇰🇪" },
193918
+ { name: "Kiribati", code: "+686", format: "7#######", flag: "🇰🇮" },
193919
+ { name: "Kuwait", code: "+965", format: "6#######", flag: "🇰🇼" },
193920
+ { name: "Kyrgyzstan", code: "+996", format: "70#######", flag: "🇰🇬" },
193921
+ { name: "Latvia", code: "+371", format: "2#######", flag: "🇱🇻" },
193922
+ { name: "Lebanon", code: "+961", format: "2#######", flag: "🇱🇧" },
193923
+ { name: "Lesotho", code: "+266", format: "58######", flag: "🇱🇸" },
193924
+ { name: "Liberia", code: "+231", format: "5######", flag: "🇱🇷" },
193925
+ { name: "Libya", code: "+218", format: "9########", flag: "🇱🇾" },
193926
+ { name: "Liechtenstein", code: "+423", format: "6########", flag: "🇱🇮" },
193927
+ { name: "Lithuania", code: "+370", format: "6#######", flag: "🇱🇹" },
193928
+ { name: "Luxembourg", code: "+352", format: "6########", flag: "🇱🇺" },
193929
+ { name: "Macao", code: "+853", format: "6#######", flag: "🇲🇴" },
193930
+ { name: "Madagascar", code: "+261", format: "33#######", flag: "🇲🇬" },
193931
+ { name: "Malawi", code: "+265", format: "9########", flag: "🇲🇼" },
193932
+ { name: "Malaysia", code: "+60", format: "1########", flag: "🇲🇾" },
193933
+ { name: "Maldives", code: "+960", format: "7######", flag: "🇲🇻" },
193934
+ { name: "Mali", code: "+223", format: "6#######", flag: "🇲🇱" },
193935
+ { name: "Malta", code: "+356", format: "79######", flag: "🇲🇹" },
193936
+ { name: "Marshall Islands", code: "+692", format: "2######", flag: "🇲🇭" },
193937
+ { name: "Martinique", code: "+596", format: "9########", flag: "🇲🇶" },
193938
+ { name: "Mauritania", code: "+222", format: "3#######", flag: "🇲🇷" },
193939
+ { name: "Mauritius", code: "+230", format: "2######", flag: "🇲🇺" },
193940
+ { name: "Mayotte", code: "+262", format: "826######", flag: "🇾🇹" },
193941
+ { name: "Mexico", code: "+52", format: "55########", flag: "🇲🇽" },
193942
+ { name: "Micronesia", code: "+691", format: "9######", flag: "🇫🇲" },
193943
+ { name: "Moldova", code: "+373", format: "79######", flag: "🇲🇩" },
193944
+ { name: "Monaco", code: "+377", format: "6########", flag: "🇲🇨" },
193945
+ { name: "Mongolia", code: "+976", format: "9#######", flag: "🇲🇳" },
193946
+ { name: "Montenegro", code: "+382", format: "67######", flag: "🇲🇪" },
193947
+ { name: "Montserrat", code: "+1664", format: "3######", flag: "🇲🇸" },
193948
+ { name: "Morocco", code: "+212", format: "69#######", flag: "🇲🇦" },
193949
+ { name: "Mozambique", code: "+258", format: "84#######", flag: "🇲🇿" },
193950
+ { name: "Myanmar (Burma)", code: "+95", format: "96#######", flag: "🇲🇲" },
193951
+ { name: "Namibia", code: "+264", format: "61######", flag: "🇳🇦" },
193952
+ { name: "Nauru", code: "+674", format: "8######", flag: "🇳🇷" },
193953
+ { name: "Nepal", code: "+977", format: "9#######", flag: "🇳🇵" },
193954
+ { name: "Netherlands", code: "+31", format: "6########", flag: "🇳🇱" },
193955
+ { name: "New Caledonia", code: "+687", format: "7#####", flag: "🇳🇨" },
193956
+ { name: "New Zealand", code: "+64", format: "2#######", flag: "🇳🇿" },
193957
+ { name: "Nicaragua", code: "+505", format: "2#######", flag: "🇳🇮" },
193958
+ { name: "Niger", code: "+227", format: "2#######", flag: "🇳🇪" },
193959
+ { name: "Nigeria", code: "+234", format: "2#######", flag: "🇳🇬" },
193960
+ { name: "Niue", code: "+683", format: "5###", flag: "🇳🇺" },
193961
+ { name: "Norfolk Island", code: "+672", format: "3#####", flag: "🇳🇫" },
193962
+ {
193963
+ name: "Northern Mariana Islands",
193964
+ code: "+1670",
193965
+ format: "#######",
193966
+ flag: "🇲🇵",
193967
+ },
193968
+ { name: "Norway", code: "+47", format: "########", flag: "🇳🇴" },
193969
+ { name: "North Korea", code: "+47", format: "4#######", flag: "🇰🇵" },
193970
+ { name: "Oman", code: "+968", format: "9#######", flag: "🇴🇲" },
193971
+ { name: "Pakistan", code: "+92", format: "4########", flag: "🇵🇰" },
193972
+ { name: "Palau", code: "+680", format: "4######", flag: "🇵🇼" },
193973
+ { name: "Palestine", code: "+970", format: "5########", flag: "🇵🇸" },
193974
+ { name: "Panama", code: "+507", format: "6#######", flag: "🇵🇦" },
193975
+ { name: "Papua New Guinea", code: "+675", format: "4######", flag: "🇵🇬" },
193976
+ { name: "Paraguay", code: "+595", format: "9########", flag: "🇵🇾" },
193977
+ { name: "Peru", code: "+51", format: "9########", flag: "🇵🇪" },
193978
+ { name: "Philippines", code: "+63", format: "9#########", flag: "🇵🇭" },
193979
+ { name: "Pitcairn", code: "+64", format: "8#####", flag: "🇵🇳" },
193980
+ { name: "Poland", code: "+48", format: "501######", flag: "🇵🇱" },
193981
+ { name: "Portugal", code: "+351", format: "9########", flag: "🇵🇹" },
193982
+ { name: "Puerto Rico", code: "+1", format: "939#######", flag: "🇵🇷" },
193983
+ { name: "Qatar", code: "+974", format: "5#######", flag: "🇶🇦" },
193984
+ { name: "Reunion", code: "+262", format: "897######", flag: "🇷🇪" },
193985
+ { name: "Romania", code: "+40", format: "8########", flag: "🇷🇴" },
193986
+ { name: "Russia", code: "+7", format: "9#########", flag: "🇷🇺" },
193987
+ { name: "Rwanda", code: "+250", format: "7########", flag: "🇷🇼" },
193988
+ {
193989
+ name: "Saint Kitts and Nevis",
193990
+ code: "+1869",
193991
+ format: "#######",
193992
+ flag: "🇰🇳",
193993
+ },
193994
+ { name: "Saint Lucia", code: "+1758", format: "#######", flag: "🇱🇨" },
193995
+ {
193996
+ name: "Saint Vincent and the Grenadines",
193997
+ code: "+1784",
193998
+ format: "#######",
193999
+ flag: "🇻🇨",
194000
+ },
194001
+ { name: "Samoa", code: "+685", format: "8#####", flag: "🇼🇸" },
194002
+ { name: "San Marino", code: "+378", format: "8#####", flag: "🇸🇲" },
194003
+ {
194004
+ name: "Sao Tome and Principe",
194005
+ code: "+239",
194006
+ format: "9######",
194007
+ flag: "🇸🇹",
194008
+ },
194009
+ { name: "Saudi Arabia", code: "+966", format: "5########", flag: "🇸🇦" },
194010
+ { name: "Senegal", code: "+221", format: "77#######", flag: "🇸🇳" },
194011
+ { name: "Serbia", code: "+381", format: "77######", flag: "🇷🇸" },
194012
+ { name: "Seychelles", code: "+248", format: "2######", flag: "🇸🇨" },
194013
+ { name: "Sierra Leone", code: "+232", format: "76######", flag: "🇸🇱" },
194014
+ { name: "Singapore", code: "+65", format: "9#######", flag: "🇸🇬" },
194015
+ { name: "Slovakia", code: "+421", format: "9########", flag: "🇸🇰" },
194016
+ { name: "Slovenia", code: "+386", format: "30######", flag: "🇸🇮" },
194017
+ { name: "Solomon Islands", code: "+677", format: "5####", flag: "🇸🇧" },
194018
+ { name: "Somalia", code: "+252", format: "5######", flag: "🇸🇴" },
194019
+ { name: "South Africa", code: "+27", format: "6########", flag: "🇿🇦" },
194020
+ {
194021
+ name: "South Georgia and the South Sandwich Islands",
194022
+ code: "+500",
194023
+ format: "5####",
194024
+ flag: "🇬🇸",
194025
+ },
194026
+ { name: "South Sudan", code: "+211", format: "9########", flag: "🇸🇸" },
194027
+ { name: "Spain", code: "+34", format: "7########", flag: "🇪🇸" },
194028
+ { name: "Sri Lanka", code: "+94", format: "7########", flag: "🇱🇰" },
194029
+ { name: "Sudan", code: "+249", format: "9########", flag: "🇸🇩" },
194030
+ { name: "Suriname", code: "+597", format: "3#####", flag: "🇸🇷" },
194031
+ {
194032
+ name: "Svalbard and Jan Mayen",
194033
+ code: "+4779",
194034
+ format: "######",
194035
+ flag: "🇸🇯",
194036
+ },
194037
+ { name: "Sweden", code: "+46", format: "9########", flag: "🇸🇪" },
194038
+ { name: "Switzerland", code: "+41", format: "9########", flag: "🇨🇭" },
194039
+ { name: "Syria", code: "+963", format: "9########", flag: "🇸🇾" },
194040
+ { name: "South Korea", code: "+82", format: "5########", flag: "🇰🇷" },
194041
+ { name: "Taiwan", code: "+886", format: "9########", flag: "🇹🇼" },
194042
+ { name: "Tajikistan", code: "+992", format: "9########", flag: "🇹🇯" },
194043
+ { name: "Tanzania", code: "+255", format: "7########", flag: "🇹🇿" },
194044
+ { name: "Thailand", code: "+66", format: "7#######", flag: "🇹🇭" },
194045
+ { name: "Togo", code: "+228", format: "9#######", flag: "🇹🇬" },
194046
+ { name: "Tokelau", code: "+690", format: "7####", flag: "🇹🇰" },
194047
+ { name: "Tonga", code: "+676", format: "7####", flag: "🇹🇴" },
194048
+ { name: "Trinidad and Tobago", code: "+1868", format: "7######", flag: "🇹🇹" },
194049
+ { name: "Tunisia", code: "+216", format: "9#######", flag: "🇹🇳" },
194050
+ { name: "Turkey", code: "+90", format: "5#########", flag: "🇹🇷" },
194051
+ { name: "Turkmenistan", code: "+993", format: "6#######", flag: "🇹🇲" },
194052
+ {
194053
+ name: "Turks and Caicos Islands",
194054
+ code: "+1649",
194055
+ format: "7######",
194056
+ flag: "🇹🇨",
194057
+ },
194058
+ { name: "Tuvalu", code: "+688", format: "7######", flag: "🇹🇻" },
194059
+ { name: "Uganda", code: "+256", format: "7########", flag: "🇺🇬" },
194060
+ { name: "Ukraine", code: "+380", format: "7########", flag: "🇺🇦" },
194061
+ {
194062
+ name: "United Arab Emirates",
194063
+ code: "+971",
194064
+ format: "5########",
194065
+ flag: "🇦🇪",
194066
+ },
194067
+ { name: "United Kingdom", code: "+44", format: "30########", flag: "🇬🇧" },
194068
+ { name: "United States", code: "+1", format: "212#######", flag: "🇺🇸" },
194069
+ { name: "Uruguay", code: "+598", format: "9#######", flag: "🇺🇾" },
194070
+ { name: "Uzbekistan", code: "+998", format: "90#######", flag: "🇺🇿" },
194071
+ { name: "Vanuatu", code: "+678", format: "7######", flag: "🇻🇺" },
194072
+ { name: "Venezuela", code: "+58", format: "41########", flag: "🇻🇪" },
194073
+ { name: "Vietnam", code: "+84", format: "9########", flag: "🇻🇳" },
194074
+ { name: "Wallis and Futuna", code: "+681", format: "8########", flag: "🇼🇫" },
194075
+ { name: "Western Sahara", code: "+212", format: "69#######", flag: "🇪🇭" },
194076
+ { name: "Yemen", code: "+967", format: "7########", flag: "🇾🇪" },
194077
+ { name: "Zambia", code: "+260", format: "9########", flag: "🇿🇲" },
194078
+ { name: "Zimbabwe", code: "+263", format: "9######", flag: "🇿🇼" },
194079
+ ];
194080
+
193654
194081
  const initializeCredentials = (product) => {
193655
194082
  var _a;
193656
194083
  if (process.env.SKIP_SETUP === "true" && getGlobalUserState()) {
@@ -194292,7 +194719,7 @@ function expand$1(template, context) {
194292
194719
  }
194293
194720
 
194294
194721
  // pkg/dist-src/parse.js
194295
- function parse$1(options) {
194722
+ function parse$2(options) {
194296
194723
  let method = options.method.toUpperCase();
194297
194724
  let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
194298
194725
  let headers = Object.assign({}, options.headers);
@@ -194358,7 +194785,7 @@ function parse$1(options) {
194358
194785
 
194359
194786
  // pkg/dist-src/endpoint-with-defaults.js
194360
194787
  function endpointWithDefaults(defaults, route, options) {
194361
- return parse$1(merge(defaults, route, options));
194788
+ return parse$2(merge(defaults, route, options));
194362
194789
  }
194363
194790
 
194364
194791
  // pkg/dist-src/with-defaults.js
@@ -194369,7 +194796,7 @@ function withDefaults$2(oldDefaults, newDefaults) {
194369
194796
  DEFAULTS: DEFAULTS2,
194370
194797
  defaults: withDefaults$2.bind(null, DEFAULTS2),
194371
194798
  merge: merge.bind(null, DEFAULTS2),
194372
- parse: parse$1
194799
+ parse: parse$2
194373
194800
  });
194374
194801
  }
194375
194802
 
@@ -194902,6 +195329,2818 @@ const isGithubIssueOpen = async (issueLinks) => {
194902
195329
  return issueStatuses.some(issueStatus => { var _a; return ((_a = issueStatus === null || issueStatus === void 0 ? void 0 : issueStatus.data) === null || _a === void 0 ? void 0 : _a.state) === "open"; });
194903
195330
  };
194904
195331
 
195332
+ // This file is a workaround for a bug in web browsers' "native"
195333
+ // ES6 importing system which is uncapable of importing "*.json" files.
195334
+ // https://github.com/catamphetamine/libphonenumber-js/issues/239
195335
+ var metadata = {"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|[46])\\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,[["(?:(?:2(?:(?:[0-26-9]\\d|3[0-8]|5[0135-9])\\d|4(?:[02-9]\\d|10))|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90))|7(?:[013-57-9]\\d|2[0-8])\\d)\\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)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[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}",[9]],["4(?:79[01]|83[0-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-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|4[14])|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","(?:[025-7]\\d|44)\\d{6}",[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|[24-689])\\d{7}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["0"]]]],"BL":["590","00","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,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)?","8001\\d{5}|(?:[2-467]\\d|50)\\d{6}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[235]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\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","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],"BW":["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\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]|63)|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]|33|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-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-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","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],"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,6})","$1 $2",["(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]","(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-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-5]|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[1-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(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-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-5]|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[1-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(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-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-5]|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[1-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","10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:1[124-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-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\d|5[1-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{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|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]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|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[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|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])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|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",["(?:4|80)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-68])|4(?:[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])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\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]|9[14]"]],["(\\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-389]|94[0-478])\\d{5}|4(?:[0-36]\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-37-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[03568]","15(?:[0568]|31)"],"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]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|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,"528[89]"],"ER":["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],"ES":["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],"ET":["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"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{6})","$1",["[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,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0-35])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\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","(?:[56]94\\d|7093)\\d{5}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]|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","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{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"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","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],"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","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,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[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","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-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|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]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[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(?:(?:2[14]|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|4[47])|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(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|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]|28|3[129]|4[1-35689]|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[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|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|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|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",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[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,10}|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",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|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[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}",[6,7,8,9,10,11]],["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","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|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",["7"],"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","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33622|7",0,"8~10"],"LA":["856","00","[23]\\d{9}|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",["[23]"],"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",["2(?:[0367]|4[3-8])"]],["(\\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",["2(?:[0367]|4[3-8])"]],["(\\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]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],"LV":["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|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{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-8]|5[0-5]|8[0-7]))\\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}"]]],"MC":["377","00","(?:[3489]|6\\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",["6"],"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","(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}"],["80[0-5]\\d{6}"],0,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",["[12]1"],"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","(?:596\\d|7091)\\d{5}|(?:69|[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{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-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-79]"]],["(\\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",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],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)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\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",["1|2[028]"],"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"]],["(\\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",["(?: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","(?: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","[45]\\d{5}|(?:708|8\\d\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"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","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,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",["[26]1|3[289]|4[1246-8]|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-7])"],"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,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["(?: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","(?:[236-8]\\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",["[236-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,0,[["336(?:[013-9]\\d|2[013-9])\\d{5}|(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15-7]|6[0-35-79]|7[1-37-9]))\\d{7}",[10]],["9\\d{9}",[10]],["8(?:0[04]|108\\d{3})\\d{7}"],["80[39]\\d{7}",[10]],["808\\d{7}",[10]]],"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(?:[1-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","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],"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[0139]|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)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|7[67]|9[2-9]"]]],"0"],"SR":["597","00","(?:[2-5]|68|[78]\\d|90)\\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","[267]\\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",["[267]"]],["(\\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|30|[689]\\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{8}",[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",["[0-57-9]"]]],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-6]\\d|71)\\d{6}",[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-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"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{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?: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"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"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,[["(?:3052(?:0[0-8]|[1-9]\\d)|5056(?:[0-35-9]\\d|4[0-68]))\\d{4}|(?:2742|305[3-9]|(?:472|983)[2-47-9]|505[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[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[0135-79]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-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-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-247]|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]|33|44|66|77|88)[2-9]\\d{6}"],0,0,0,["305209\\d{4}"]]],"UY":["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\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{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-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","7093\\d{5}|(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?: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","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|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",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"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|51"]],["(\\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})|50\\d{3})\\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}"]]]}};
195336
+
195337
+ // Importing from a ".js" file is a workaround for Node.js "ES Modules"
195338
+ // importing system which is even uncapable of importing "*.json" files.
195339
+
195340
+ function withMetadataArgument(func, _arguments) {
195341
+ var args = Array.prototype.slice.call(_arguments);
195342
+ args.push(metadata);
195343
+ return func.apply(this, args)
195344
+ }
195345
+
195346
+ // Copy-pasted from:
195347
+ // https://github.com/substack/semver-compare/blob/master/index.js
195348
+ //
195349
+ // Inlining this function because some users reported issues with
195350
+ // importing from `semver-compare` in a browser with ES6 "native" modules.
195351
+ //
195352
+ // Fixes `semver-compare` not being able to compare versions with alpha/beta/etc "tags".
195353
+ // https://github.com/catamphetamine/libphonenumber-js/issues/381
195354
+ function compare (a, b) {
195355
+ a = a.split('-');
195356
+ b = b.split('-');
195357
+ var pa = a[0].split('.');
195358
+ var pb = b[0].split('.');
195359
+ for (var i = 0; i < 3; i++) {
195360
+ var na = Number(pa[i]);
195361
+ var nb = Number(pb[i]);
195362
+ if (na > nb) return 1;
195363
+ if (nb > na) return -1;
195364
+ if (!isNaN(na) && isNaN(nb)) return 1;
195365
+ if (isNaN(na) && !isNaN(nb)) return -1;
195366
+ }
195367
+ if (a[1] && b[1]) {
195368
+ return a[1] > b[1] ? 1 : a[1] < b[1] ? -1 : 0;
195369
+ }
195370
+ return !a[1] && b[1] ? 1 : a[1] && !b[1] ? -1 : 0;
195371
+ }
195372
+
195373
+ var objectConstructor = {}.constructor;
195374
+ function isObject(object) {
195375
+ return object !== undefined && object !== null && object.constructor === objectConstructor;
195376
+ }
195377
+
195378
+ function _typeof$5(o) { "@babel/helpers - typeof"; return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$5(o); }
195379
+ function _classCallCheck$2(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
195380
+ function _defineProperties$1(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$4(o.key), o); } }
195381
+ function _createClass$2(e, r, t) { return r && _defineProperties$1(e.prototype, r), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
195382
+ function _toPropertyKey$4(t) { var i = _toPrimitive$4(t, "string"); return "symbol" == _typeof$5(i) ? i : i + ""; }
195383
+ function _toPrimitive$4(t, r) { if ("object" != _typeof$5(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != _typeof$5(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return (String )(t); }
195384
+
195385
+ // Added "idd_prefix" and "default_idd_prefix".
195386
+ var V3 = '1.2.0';
195387
+
195388
+ // Moved `001` country code to "nonGeographic" section of metadata.
195389
+ var V4 = '1.7.35';
195390
+ var DEFAULT_EXT_PREFIX = ' ext. ';
195391
+ var CALLING_CODE_REG_EXP = /^\d+$/;
195392
+
195393
+ /**
195394
+ * See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md
195395
+ */
195396
+ var Metadata = /*#__PURE__*/function () {
195397
+ function Metadata(metadata) {
195398
+ _classCallCheck$2(this, Metadata);
195399
+ validateMetadata(metadata);
195400
+ this.metadata = metadata;
195401
+ setVersion.call(this, metadata);
195402
+ }
195403
+ return _createClass$2(Metadata, [{
195404
+ key: "getCountries",
195405
+ value: function getCountries() {
195406
+ return Object.keys(this.metadata.countries).filter(function (_) {
195407
+ return _ !== '001';
195408
+ });
195409
+ }
195410
+ }, {
195411
+ key: "getCountryMetadata",
195412
+ value: function getCountryMetadata(countryCode) {
195413
+ return this.metadata.countries[countryCode];
195414
+ }
195415
+ }, {
195416
+ key: "nonGeographic",
195417
+ value: function nonGeographic() {
195418
+ if (this.v1 || this.v2 || this.v3) return;
195419
+ // `nonGeographical` was a typo.
195420
+ // It's present in metadata generated from `1.7.35` to `1.7.37`.
195421
+ // The test case could be found by searching for "nonGeographical".
195422
+ return this.metadata.nonGeographic || this.metadata.nonGeographical;
195423
+ }
195424
+ }, {
195425
+ key: "hasCountry",
195426
+ value: function hasCountry(country) {
195427
+ return this.getCountryMetadata(country) !== undefined;
195428
+ }
195429
+ }, {
195430
+ key: "hasCallingCode",
195431
+ value: function hasCallingCode(callingCode) {
195432
+ if (this.getCountryCodesForCallingCode(callingCode)) {
195433
+ return true;
195434
+ }
195435
+ if (this.nonGeographic()) {
195436
+ if (this.nonGeographic()[callingCode]) {
195437
+ return true;
195438
+ }
195439
+ } else {
195440
+ // A hacky workaround for old custom metadata (generated before V4).
195441
+ var countryCodes = this.countryCallingCodes()[callingCode];
195442
+ if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {
195443
+ return true;
195444
+ }
195445
+ }
195446
+ }
195447
+ }, {
195448
+ key: "isNonGeographicCallingCode",
195449
+ value: function isNonGeographicCallingCode(callingCode) {
195450
+ if (this.nonGeographic()) {
195451
+ return this.nonGeographic()[callingCode] ? true : false;
195452
+ } else {
195453
+ return this.getCountryCodesForCallingCode(callingCode) ? false : true;
195454
+ }
195455
+ }
195456
+
195457
+ // Deprecated.
195458
+ }, {
195459
+ key: "country",
195460
+ value: function country(countryCode) {
195461
+ return this.selectNumberingPlan(countryCode);
195462
+ }
195463
+ }, {
195464
+ key: "selectNumberingPlan",
195465
+ value: function selectNumberingPlan(countryCode, callingCode) {
195466
+ // Supports just passing `callingCode` as the first argument.
195467
+ if (countryCode && CALLING_CODE_REG_EXP.test(countryCode)) {
195468
+ callingCode = countryCode;
195469
+ countryCode = null;
195470
+ }
195471
+ if (countryCode && countryCode !== '001') {
195472
+ if (!this.hasCountry(countryCode)) {
195473
+ throw new Error("Unknown country: ".concat(countryCode));
195474
+ }
195475
+ this.numberingPlan = new NumberingPlan(this.getCountryMetadata(countryCode), this);
195476
+ } else if (callingCode) {
195477
+ if (!this.hasCallingCode(callingCode)) {
195478
+ throw new Error("Unknown calling code: ".concat(callingCode));
195479
+ }
195480
+ this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this);
195481
+ } else {
195482
+ this.numberingPlan = undefined;
195483
+ }
195484
+ return this;
195485
+ }
195486
+ }, {
195487
+ key: "getCountryCodesForCallingCode",
195488
+ value: function getCountryCodesForCallingCode(callingCode) {
195489
+ var countryCodes = this.countryCallingCodes()[callingCode];
195490
+ if (countryCodes) {
195491
+ // Metadata before V4 included "non-geographic entity" calling codes
195492
+ // inside `country_calling_codes` (for example, `"881":["001"]`).
195493
+ // Now the semantics of `country_calling_codes` has changed:
195494
+ // it's specifically for "countries" now.
195495
+ // Older versions of custom metadata will simply skip parsing
195496
+ // "non-geographic entity" phone numbers with new versions
195497
+ // of this library: it's not considered a bug,
195498
+ // because such numbers are extremely rare,
195499
+ // and developers extremely rarely use custom metadata.
195500
+ if (countryCodes.length === 1 && countryCodes[0].length === 3) {
195501
+ return;
195502
+ }
195503
+ return countryCodes;
195504
+ }
195505
+ }
195506
+ }, {
195507
+ key: "getCountryCodeForCallingCode",
195508
+ value: function getCountryCodeForCallingCode(callingCode) {
195509
+ var countryCodes = this.getCountryCodesForCallingCode(callingCode);
195510
+ if (countryCodes) {
195511
+ return countryCodes[0];
195512
+ }
195513
+ }
195514
+ }, {
195515
+ key: "getNumberingPlanMetadata",
195516
+ value: function getNumberingPlanMetadata(callingCode) {
195517
+ var countryCode = this.getCountryCodeForCallingCode(callingCode);
195518
+ if (countryCode) {
195519
+ return this.getCountryMetadata(countryCode);
195520
+ }
195521
+ if (this.nonGeographic()) {
195522
+ var metadata = this.nonGeographic()[callingCode];
195523
+ if (metadata) {
195524
+ return metadata;
195525
+ }
195526
+ } else {
195527
+ // A hacky workaround for old custom metadata (generated before V4).
195528
+ // In that metadata, there was no concept of "non-geographic" metadata
195529
+ // so metadata for `001` country code was stored along with other countries.
195530
+ // The test case can be found by searching for:
195531
+ // "should work around `nonGeographic` metadata not existing".
195532
+ var countryCodes = this.countryCallingCodes()[callingCode];
195533
+ if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {
195534
+ return this.metadata.countries['001'];
195535
+ }
195536
+ }
195537
+ }
195538
+
195539
+ // Deprecated.
195540
+ }, {
195541
+ key: "countryCallingCode",
195542
+ value: function countryCallingCode() {
195543
+ return this.numberingPlan.callingCode();
195544
+ }
195545
+
195546
+ // Deprecated.
195547
+ }, {
195548
+ key: "IDDPrefix",
195549
+ value: function IDDPrefix() {
195550
+ return this.numberingPlan.IDDPrefix();
195551
+ }
195552
+
195553
+ // Deprecated.
195554
+ }, {
195555
+ key: "defaultIDDPrefix",
195556
+ value: function defaultIDDPrefix() {
195557
+ return this.numberingPlan.defaultIDDPrefix();
195558
+ }
195559
+
195560
+ // Deprecated.
195561
+ }, {
195562
+ key: "nationalNumberPattern",
195563
+ value: function nationalNumberPattern() {
195564
+ return this.numberingPlan.nationalNumberPattern();
195565
+ }
195566
+
195567
+ // Deprecated.
195568
+ }, {
195569
+ key: "possibleLengths",
195570
+ value: function possibleLengths() {
195571
+ return this.numberingPlan.possibleLengths();
195572
+ }
195573
+
195574
+ // Deprecated.
195575
+ }, {
195576
+ key: "formats",
195577
+ value: function formats() {
195578
+ return this.numberingPlan.formats();
195579
+ }
195580
+
195581
+ // Deprecated.
195582
+ }, {
195583
+ key: "nationalPrefixForParsing",
195584
+ value: function nationalPrefixForParsing() {
195585
+ return this.numberingPlan.nationalPrefixForParsing();
195586
+ }
195587
+
195588
+ // Deprecated.
195589
+ }, {
195590
+ key: "nationalPrefixTransformRule",
195591
+ value: function nationalPrefixTransformRule() {
195592
+ return this.numberingPlan.nationalPrefixTransformRule();
195593
+ }
195594
+
195595
+ // Deprecated.
195596
+ }, {
195597
+ key: "leadingDigits",
195598
+ value: function leadingDigits() {
195599
+ return this.numberingPlan.leadingDigits();
195600
+ }
195601
+
195602
+ // Deprecated.
195603
+ }, {
195604
+ key: "hasTypes",
195605
+ value: function hasTypes() {
195606
+ return this.numberingPlan.hasTypes();
195607
+ }
195608
+
195609
+ // Deprecated.
195610
+ }, {
195611
+ key: "type",
195612
+ value: function type(_type) {
195613
+ return this.numberingPlan.type(_type);
195614
+ }
195615
+
195616
+ // Deprecated.
195617
+ }, {
195618
+ key: "ext",
195619
+ value: function ext() {
195620
+ return this.numberingPlan.ext();
195621
+ }
195622
+ }, {
195623
+ key: "countryCallingCodes",
195624
+ value: function countryCallingCodes() {
195625
+ if (this.v1) return this.metadata.country_phone_code_to_countries;
195626
+ return this.metadata.country_calling_codes;
195627
+ }
195628
+
195629
+ // Deprecated.
195630
+ }, {
195631
+ key: "chooseCountryByCountryCallingCode",
195632
+ value: function chooseCountryByCountryCallingCode(callingCode) {
195633
+ return this.selectNumberingPlan(callingCode);
195634
+ }
195635
+ }, {
195636
+ key: "hasSelectedNumberingPlan",
195637
+ value: function hasSelectedNumberingPlan() {
195638
+ return this.numberingPlan !== undefined;
195639
+ }
195640
+ }]);
195641
+ }();
195642
+ var NumberingPlan = /*#__PURE__*/function () {
195643
+ function NumberingPlan(metadata, globalMetadataObject) {
195644
+ _classCallCheck$2(this, NumberingPlan);
195645
+ this.globalMetadataObject = globalMetadataObject;
195646
+ this.metadata = metadata;
195647
+ setVersion.call(this, globalMetadataObject.metadata);
195648
+ }
195649
+ return _createClass$2(NumberingPlan, [{
195650
+ key: "callingCode",
195651
+ value: function callingCode() {
195652
+ return this.metadata[0];
195653
+ }
195654
+
195655
+ // Formatting information for regions which share
195656
+ // a country calling code is contained by only one region
195657
+ // for performance reasons. For example, for NANPA region
195658
+ // ("North American Numbering Plan Administration",
195659
+ // which includes USA, Canada, Cayman Islands, Bahamas, etc)
195660
+ // it will be contained in the metadata for `US`.
195661
+ }, {
195662
+ key: "getDefaultCountryMetadataForRegion",
195663
+ value: function getDefaultCountryMetadataForRegion() {
195664
+ return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());
195665
+ }
195666
+
195667
+ // Is always present.
195668
+ }, {
195669
+ key: "IDDPrefix",
195670
+ value: function IDDPrefix() {
195671
+ if (this.v1 || this.v2) return;
195672
+ return this.metadata[1];
195673
+ }
195674
+
195675
+ // Is only present when a country supports multiple IDD prefixes.
195676
+ }, {
195677
+ key: "defaultIDDPrefix",
195678
+ value: function defaultIDDPrefix() {
195679
+ if (this.v1 || this.v2) return;
195680
+ return this.metadata[12];
195681
+ }
195682
+ }, {
195683
+ key: "nationalNumberPattern",
195684
+ value: function nationalNumberPattern() {
195685
+ if (this.v1 || this.v2) return this.metadata[1];
195686
+ return this.metadata[2];
195687
+ }
195688
+
195689
+ // "possible length" data is always present in Google's metadata.
195690
+ }, {
195691
+ key: "possibleLengths",
195692
+ value: function possibleLengths() {
195693
+ if (this.v1) return;
195694
+ return this.metadata[this.v2 ? 2 : 3];
195695
+ }
195696
+ }, {
195697
+ key: "_getFormats",
195698
+ value: function _getFormats(metadata) {
195699
+ return metadata[this.v1 ? 2 : this.v2 ? 3 : 4];
195700
+ }
195701
+
195702
+ // For countries of the same region (e.g. NANPA)
195703
+ // formats are all stored in the "main" country for that region.
195704
+ // E.g. "RU" and "KZ", "US" and "CA".
195705
+ }, {
195706
+ key: "formats",
195707
+ value: function formats() {
195708
+ var _this = this;
195709
+ var formats = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];
195710
+ return formats.map(function (_) {
195711
+ return new Format(_, _this);
195712
+ });
195713
+ }
195714
+ }, {
195715
+ key: "nationalPrefix",
195716
+ value: function nationalPrefix() {
195717
+ return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];
195718
+ }
195719
+ }, {
195720
+ key: "_getNationalPrefixFormattingRule",
195721
+ value: function _getNationalPrefixFormattingRule(metadata) {
195722
+ return metadata[this.v1 ? 4 : this.v2 ? 5 : 6];
195723
+ }
195724
+
195725
+ // For countries of the same region (e.g. NANPA)
195726
+ // national prefix formatting rule is stored in the "main" country for that region.
195727
+ // E.g. "RU" and "KZ", "US" and "CA".
195728
+ }, {
195729
+ key: "nationalPrefixFormattingRule",
195730
+ value: function nationalPrefixFormattingRule() {
195731
+ return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion());
195732
+ }
195733
+ }, {
195734
+ key: "_nationalPrefixForParsing",
195735
+ value: function _nationalPrefixForParsing() {
195736
+ return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];
195737
+ }
195738
+ }, {
195739
+ key: "nationalPrefixForParsing",
195740
+ value: function nationalPrefixForParsing() {
195741
+ // If `national_prefix_for_parsing` is not set explicitly,
195742
+ // then infer it from `national_prefix` (if any)
195743
+ return this._nationalPrefixForParsing() || this.nationalPrefix();
195744
+ }
195745
+ }, {
195746
+ key: "nationalPrefixTransformRule",
195747
+ value: function nationalPrefixTransformRule() {
195748
+ return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];
195749
+ }
195750
+ }, {
195751
+ key: "_getNationalPrefixIsOptionalWhenFormatting",
195752
+ value: function _getNationalPrefixIsOptionalWhenFormatting() {
195753
+ return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];
195754
+ }
195755
+
195756
+ // For countries of the same region (e.g. NANPA)
195757
+ // "national prefix is optional when formatting" flag is
195758
+ // stored in the "main" country for that region.
195759
+ // E.g. "RU" and "KZ", "US" and "CA".
195760
+ }, {
195761
+ key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
195762
+ value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
195763
+ return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion());
195764
+ }
195765
+ }, {
195766
+ key: "leadingDigits",
195767
+ value: function leadingDigits() {
195768
+ return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];
195769
+ }
195770
+ }, {
195771
+ key: "types",
195772
+ value: function types() {
195773
+ return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];
195774
+ }
195775
+ }, {
195776
+ key: "hasTypes",
195777
+ value: function hasTypes() {
195778
+ // Versions 1.2.0 - 1.2.4: can be `[]`.
195779
+ /* istanbul ignore next */
195780
+ if (this.types() && this.types().length === 0) {
195781
+ return false;
195782
+ }
195783
+ // Versions <= 1.2.4: can be `undefined`.
195784
+ // Version >= 1.2.5: can be `0`.
195785
+ return !!this.types();
195786
+ }
195787
+ }, {
195788
+ key: "type",
195789
+ value: function type(_type2) {
195790
+ if (this.hasTypes() && getType(this.types(), _type2)) {
195791
+ return new Type(getType(this.types(), _type2), this);
195792
+ }
195793
+ }
195794
+ }, {
195795
+ key: "ext",
195796
+ value: function ext() {
195797
+ if (this.v1 || this.v2) return DEFAULT_EXT_PREFIX;
195798
+ return this.metadata[13] || DEFAULT_EXT_PREFIX;
195799
+ }
195800
+ }]);
195801
+ }();
195802
+ var Format = /*#__PURE__*/function () {
195803
+ function Format(format, metadata) {
195804
+ _classCallCheck$2(this, Format);
195805
+ this._format = format;
195806
+ this.metadata = metadata;
195807
+ }
195808
+ return _createClass$2(Format, [{
195809
+ key: "pattern",
195810
+ value: function pattern() {
195811
+ return this._format[0];
195812
+ }
195813
+ }, {
195814
+ key: "format",
195815
+ value: function format() {
195816
+ return this._format[1];
195817
+ }
195818
+ }, {
195819
+ key: "leadingDigitsPatterns",
195820
+ value: function leadingDigitsPatterns() {
195821
+ return this._format[2] || [];
195822
+ }
195823
+ }, {
195824
+ key: "nationalPrefixFormattingRule",
195825
+ value: function nationalPrefixFormattingRule() {
195826
+ return this._format[3] || this.metadata.nationalPrefixFormattingRule();
195827
+ }
195828
+ }, {
195829
+ key: "nationalPrefixIsOptionalWhenFormattingInNationalFormat",
195830
+ value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {
195831
+ return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
195832
+ }
195833
+ }, {
195834
+ key: "nationalPrefixIsMandatoryWhenFormattingInNationalFormat",
195835
+ value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() {
195836
+ // National prefix is omitted if there's no national prefix formatting rule
195837
+ // set for this country, or when the national prefix formatting rule
195838
+ // contains no national prefix itself, or when this rule is set but
195839
+ // national prefix is optional for this phone number format
195840
+ // (and it is not enforced explicitly)
195841
+ return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
195842
+ }
195843
+
195844
+ // Checks whether national prefix formatting rule contains national prefix.
195845
+ }, {
195846
+ key: "usesNationalPrefix",
195847
+ value: function usesNationalPrefix() {
195848
+ return this.nationalPrefixFormattingRule() &&
195849
+ // Check that national prefix formatting rule is not a "dummy" one.
195850
+ !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule())
195851
+ // In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`
195852
+ // when `national_prefix_formatting_rule` is not present.
195853
+ // So, `true` or `false` are returned explicitly here, so that
195854
+ // `0` number isn't returned.
195855
+ ? true : false;
195856
+ }
195857
+ }, {
195858
+ key: "internationalFormat",
195859
+ value: function internationalFormat() {
195860
+ return this._format[5] || this.format();
195861
+ }
195862
+ }]);
195863
+ }();
195864
+ /**
195865
+ * A pattern that is used to determine if the national prefix formatting rule
195866
+ * has the first group only, i.e., does not start with the national prefix.
195867
+ * Note that the pattern explicitly allows for unbalanced parentheses.
195868
+ */
195869
+ var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
195870
+ var Type = /*#__PURE__*/function () {
195871
+ function Type(type, metadata) {
195872
+ _classCallCheck$2(this, Type);
195873
+ this.type = type;
195874
+ this.metadata = metadata;
195875
+ }
195876
+ return _createClass$2(Type, [{
195877
+ key: "pattern",
195878
+ value: function pattern() {
195879
+ if (this.metadata.v1) return this.type;
195880
+ return this.type[0];
195881
+ }
195882
+ }, {
195883
+ key: "possibleLengths",
195884
+ value: function possibleLengths() {
195885
+ if (this.metadata.v1) return;
195886
+ return this.type[1] || this.metadata.possibleLengths();
195887
+ }
195888
+ }]);
195889
+ }();
195890
+ function getType(types, type) {
195891
+ switch (type) {
195892
+ case 'FIXED_LINE':
195893
+ return types[0];
195894
+ case 'MOBILE':
195895
+ return types[1];
195896
+ case 'TOLL_FREE':
195897
+ return types[2];
195898
+ case 'PREMIUM_RATE':
195899
+ return types[3];
195900
+ case 'PERSONAL_NUMBER':
195901
+ return types[4];
195902
+ case 'VOICEMAIL':
195903
+ return types[5];
195904
+ case 'UAN':
195905
+ return types[6];
195906
+ case 'PAGER':
195907
+ return types[7];
195908
+ case 'VOIP':
195909
+ return types[8];
195910
+ case 'SHARED_COST':
195911
+ return types[9];
195912
+ }
195913
+ }
195914
+ function validateMetadata(metadata) {
195915
+ if (!metadata) {
195916
+ throw new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.');
195917
+ }
195918
+
195919
+ // `country_phone_code_to_countries` was renamed to `country_calling_codes` in `1.0.18`.
195920
+ // For that reason, it's not used in this detection algorithm.
195921
+ // Instead, it detects by `countries: {}` property existence.
195922
+ if (!isObject(metadata) || !isObject(metadata.countries)) {
195923
+ 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(isObject(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + typeOf(metadata) + ': ' + metadata, "."));
195924
+ }
195925
+ }
195926
+
195927
+ // Babel transforms `typeof` into some "branches"
195928
+ // so istanbul will show this as "branch not covered".
195929
+ /* istanbul ignore next */
195930
+ var typeOf = function typeOf(_) {
195931
+ return _typeof$5(_);
195932
+ };
195933
+
195934
+ /**
195935
+ * Returns "country calling code" for a country.
195936
+ * Throws an error if the country doesn't exist or isn't supported by this library.
195937
+ * @param {string} country
195938
+ * @param {object} metadata
195939
+ * @return {string}
195940
+ * @example
195941
+ * // Returns "44"
195942
+ * getCountryCallingCode("GB")
195943
+ */
195944
+ function getCountryCallingCode(country, metadata) {
195945
+ metadata = new Metadata(metadata);
195946
+ if (metadata.hasCountry(country)) {
195947
+ return metadata.country(country).countryCallingCode();
195948
+ }
195949
+ throw new Error("Unknown country: ".concat(country));
195950
+ }
195951
+ function setVersion(metadata) {
195952
+ var version = metadata.version;
195953
+ if (typeof version === 'number') {
195954
+ this.v1 = version === 1;
195955
+ this.v2 = version === 2;
195956
+ this.v3 = version === 3;
195957
+ this.v4 = version === 4;
195958
+ } else {
195959
+ if (!version) {
195960
+ this.v1 = true;
195961
+ } else if (compare(version, V3) === -1) {
195962
+ this.v2 = true;
195963
+ } else if (compare(version, V4) === -1) {
195964
+ this.v3 = true;
195965
+ } else {
195966
+ this.v4 = true;
195967
+ }
195968
+ }
195969
+ }
195970
+
195971
+ // const ISO_COUNTRY_CODE = /^[A-Z]{2}$/
195972
+ // function isCountryCode(countryCode) {
195973
+ // return ISO_COUNTRY_CODE.test(countryCodeOrCountryCallingCode)
195974
+ // }
195975
+
195976
+ function checkNumberLength(nationalNumber, metadata) {
195977
+ return checkNumberLengthForType(nationalNumber, undefined, metadata);
195978
+ }
195979
+
195980
+ // Checks whether a number is possible for the country based on its length.
195981
+ // Should only be called for the "new" metadata which has "possible lengths".
195982
+ function checkNumberLengthForType(nationalNumber, type, metadata) {
195983
+ var type_info = metadata.type(type);
195984
+
195985
+ // There should always be "<possiblePengths/>" set for every type element.
195986
+ // This is declared in the XML schema.
195987
+ // For size efficiency, where a sub-description (e.g. fixed-line)
195988
+ // has the same "<possiblePengths/>" as the "general description", this is missing,
195989
+ // so we fall back to the "general description". Where no numbers of the type
195990
+ // exist at all, there is one possible length (-1) which is guaranteed
195991
+ // not to match the length of any real phone number.
195992
+ var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths();
195993
+ // let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()
195994
+
195995
+ // Metadata before version `1.0.18` didn't contain `possible_lengths`.
195996
+ if (!possible_lengths) {
195997
+ return 'IS_POSSIBLE';
195998
+ }
195999
+ var actual_length = nationalNumber.length;
196000
+
196001
+ // In `libphonenumber-js` all "local-only" formats are dropped for simplicity.
196002
+ // // This is safe because there is never an overlap beween the possible lengths
196003
+ // // and the local-only lengths; this is checked at build time.
196004
+ // if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)
196005
+ // {
196006
+ // return 'IS_POSSIBLE_LOCAL_ONLY'
196007
+ // }
196008
+
196009
+ var minimum_length = possible_lengths[0];
196010
+ if (minimum_length === actual_length) {
196011
+ return 'IS_POSSIBLE';
196012
+ }
196013
+ if (minimum_length > actual_length) {
196014
+ return 'TOO_SHORT';
196015
+ }
196016
+ if (possible_lengths[possible_lengths.length - 1] < actual_length) {
196017
+ return 'TOO_LONG';
196018
+ }
196019
+
196020
+ // We skip the first element since we've already checked it.
196021
+ return possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH';
196022
+ }
196023
+
196024
+ /**
196025
+ * Checks if a phone number is "possible" (basically just checks its length).
196026
+ *
196027
+ * isPossible(phoneNumberInstance, { ..., v2: true }, metadata)
196028
+ *
196029
+ * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)
196030
+ * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)
196031
+ *
196032
+ * @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.
196033
+ * @param {object} [options]
196034
+ * @param {object} metadata
196035
+ * @return {string}
196036
+ */
196037
+ function isPossiblePhoneNumber(input, options, metadata) {
196038
+ /* istanbul ignore if */
196039
+ if (options === undefined) {
196040
+ options = {};
196041
+ }
196042
+ metadata = new Metadata(metadata);
196043
+ if (options.v2) {
196044
+ if (!input.countryCallingCode) {
196045
+ throw new Error('Invalid phone number object passed');
196046
+ }
196047
+ metadata.selectNumberingPlan(input.countryCallingCode);
196048
+ } else {
196049
+ if (!input.phone) {
196050
+ return false;
196051
+ }
196052
+ if (input.country) {
196053
+ if (!metadata.hasCountry(input.country)) {
196054
+ throw new Error("Unknown country: ".concat(input.country));
196055
+ }
196056
+ metadata.country(input.country);
196057
+ } else {
196058
+ if (!input.countryCallingCode) {
196059
+ throw new Error('Invalid phone number object passed');
196060
+ }
196061
+ metadata.selectNumberingPlan(input.countryCallingCode);
196062
+ }
196063
+ }
196064
+
196065
+ // Old metadata (< 1.0.18) had no "possible length" data.
196066
+ if (metadata.possibleLengths()) {
196067
+ return isPossibleNumber(input.phone || input.nationalNumber, metadata);
196068
+ } else {
196069
+ // There was a bug between `1.7.35` and `1.7.37` where "possible_lengths"
196070
+ // were missing for "non-geographical" numbering plans.
196071
+ // Just assume the number is possible in such cases:
196072
+ // it's unlikely that anyone generated their custom metadata
196073
+ // in that short period of time (one day).
196074
+ // This code can be removed in some future major version update.
196075
+ if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {
196076
+ // "Non-geographic entities" did't have `possibleLengths`
196077
+ // due to a bug in metadata generation process.
196078
+ return true;
196079
+ } else {
196080
+ throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.');
196081
+ }
196082
+ }
196083
+ }
196084
+ function isPossibleNumber(nationalNumber, metadata) {
196085
+ //, isInternational) {
196086
+ switch (checkNumberLength(nationalNumber, metadata)) {
196087
+ case 'IS_POSSIBLE':
196088
+ return true;
196089
+ // This library ignores "local-only" phone numbers (for simplicity).
196090
+ // See the readme for more info on what are "local-only" phone numbers.
196091
+ // case 'IS_POSSIBLE_LOCAL_ONLY':
196092
+ // return !isInternational
196093
+ default:
196094
+ return false;
196095
+ }
196096
+ }
196097
+
196098
+ /**
196099
+ * Checks whether the entire input sequence can be matched
196100
+ * against the regular expression.
196101
+ * @return {boolean}
196102
+ */
196103
+ function matchesEntirely(text, regular_expression) {
196104
+ // If assigning the `''` default value is moved to the arguments above,
196105
+ // code coverage would decrease for some weird reason.
196106
+ text = text || '';
196107
+ return new RegExp('^(?:' + regular_expression + ')$').test(text);
196108
+ }
196109
+
196110
+ function _createForOfIteratorHelperLoose$3(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$4(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
196111
+ function _unsupportedIterableToArray$4(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$4(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : void 0; } }
196112
+ function _arrayLikeToArray$4(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
196113
+ var NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL'];
196114
+
196115
+ // Finds out national phone number type (fixed line, mobile, etc)
196116
+ function getNumberType(input, options, metadata) {
196117
+ // If assigning the `{}` default value is moved to the arguments above,
196118
+ // code coverage would decrease for some weird reason.
196119
+ options = options || {};
196120
+
196121
+ // When `parse()` returns an empty object — `{}` —
196122
+ // that means that the phone number is malformed,
196123
+ // so it can't possibly be valid.
196124
+ if (!input.country && !input.countryCallingCode) {
196125
+ return;
196126
+ }
196127
+ metadata = new Metadata(metadata);
196128
+ metadata.selectNumberingPlan(input.country, input.countryCallingCode);
196129
+ var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
196130
+
196131
+ // The following is copy-pasted from the original function:
196132
+ // https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835
196133
+
196134
+ // Is this national number even valid for this country
196135
+ if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {
196136
+ return;
196137
+ }
196138
+
196139
+ // Is it fixed line number
196140
+ if (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {
196141
+ // Because duplicate regular expressions are removed
196142
+ // to reduce metadata size, if "mobile" pattern is ""
196143
+ // then it means it was removed due to being a duplicate of the fixed-line pattern.
196144
+ //
196145
+ if (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {
196146
+ return 'FIXED_LINE_OR_MOBILE';
196147
+ }
196148
+
196149
+ // `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.
196150
+ // For example, for "US" country.
196151
+ // Old metadata (< `1.0.18`) had a specific "types" data structure
196152
+ // that happened to be `undefined` for `MOBILE` in that case.
196153
+ // Newer metadata (>= `1.0.18`) has another data structure that is
196154
+ // not `undefined` for `MOBILE` in that case (it's just an empty array).
196155
+ // So this `if` is just for backwards compatibility with old metadata.
196156
+ if (!metadata.type('MOBILE')) {
196157
+ return 'FIXED_LINE_OR_MOBILE';
196158
+ }
196159
+
196160
+ // Check if the number happens to qualify as both fixed line and mobile.
196161
+ // (no such country in the minimal metadata set)
196162
+ /* istanbul ignore if */
196163
+ if (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {
196164
+ return 'FIXED_LINE_OR_MOBILE';
196165
+ }
196166
+ return 'FIXED_LINE';
196167
+ }
196168
+ for (var _iterator = _createForOfIteratorHelperLoose$3(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {
196169
+ var type = _step.value;
196170
+ if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {
196171
+ return type;
196172
+ }
196173
+ }
196174
+ }
196175
+ function isNumberTypeEqualTo(nationalNumber, type, metadata) {
196176
+ type = metadata.type(type);
196177
+ if (!type || !type.pattern()) {
196178
+ return false;
196179
+ }
196180
+ // Check if any possible number lengths are present;
196181
+ // if so, we use them to avoid checking
196182
+ // the validation pattern if they don't match.
196183
+ // If they are absent, this means they match
196184
+ // the general description, which we have
196185
+ // already checked before a specific number type.
196186
+ if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {
196187
+ return false;
196188
+ }
196189
+ return matchesEntirely(nationalNumber, type.pattern());
196190
+ }
196191
+
196192
+ /**
196193
+ * Checks if a given phone number is valid.
196194
+ *
196195
+ * isValid(phoneNumberInstance, { ..., v2: true }, metadata)
196196
+ *
196197
+ * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)
196198
+ * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)
196199
+ *
196200
+ * If the `number` is a string, it will be parsed to an object,
196201
+ * but only if it contains only valid phone number characters (including punctuation).
196202
+ * If the `number` is an object, it is used as is.
196203
+ *
196204
+ * The optional `defaultCountry` argument is the default country.
196205
+ * I.e. it does not restrict to just that country,
196206
+ * e.g. in those cases where several countries share
196207
+ * the same phone numbering rules (NANPA, Britain, etc).
196208
+ * For example, even though the number `07624 369230`
196209
+ * belongs to the Isle of Man ("IM" country code)
196210
+ * calling `isValidNumber('07624369230', 'GB', metadata)`
196211
+ * still returns `true` because the country is not restricted to `GB`,
196212
+ * it's just that `GB` is the default one for the phone numbering rules.
196213
+ * For restricting the country see `isValidNumberForRegion()`
196214
+ * though restricting a country might not be a good idea.
196215
+ * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion
196216
+ *
196217
+ * Examples:
196218
+ *
196219
+ * ```js
196220
+ * isValidNumber('+78005553535', metadata)
196221
+ * isValidNumber('8005553535', 'RU', metadata)
196222
+ * isValidNumber('88005553535', 'RU', metadata)
196223
+ * isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)
196224
+ * ```
196225
+ */
196226
+ function isValidNumber(input, options, metadata) {
196227
+ // If assigning the `{}` default value is moved to the arguments above,
196228
+ // code coverage would decrease for some weird reason.
196229
+ options = options || {};
196230
+ metadata = new Metadata(metadata);
196231
+ metadata.selectNumberingPlan(input.country, input.countryCallingCode);
196232
+
196233
+ // By default, countries only have type regexps when it's required for
196234
+ // distinguishing different countries having the same `countryCallingCode`.
196235
+ if (metadata.hasTypes()) {
196236
+ return getNumberType(input, options, metadata.metadata) !== undefined;
196237
+ }
196238
+
196239
+ // If there are no type regexps for this country in metadata then use
196240
+ // `nationalNumberPattern` as a "better than nothing" replacement.
196241
+ var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
196242
+ return matchesEntirely(nationalNumber, metadata.nationalNumberPattern());
196243
+ }
196244
+
196245
+ /**
196246
+ * Returns a list of countries that the phone number could potentially belong to.
196247
+ * @param {string} callingCode — Calling code.
196248
+ * @param {string} nationalNumber — National (significant) number.
196249
+ * @param {object} metadata — Metadata.
196250
+ * @return {string[]} A list of possible countries.
196251
+ */
196252
+ function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {
196253
+ var _metadata = new Metadata(metadata);
196254
+ var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);
196255
+ if (!possibleCountries) {
196256
+ return [];
196257
+ }
196258
+ return possibleCountries.filter(function (country) {
196259
+ return couldNationalNumberBelongToCountry(nationalNumber, country, metadata);
196260
+ });
196261
+ }
196262
+ function couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {
196263
+ var _metadata = new Metadata(metadata);
196264
+ _metadata.selectNumberingPlan(country);
196265
+ if (_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0) {
196266
+ return true;
196267
+ }
196268
+ return false;
196269
+ }
196270
+
196271
+ // The minimum length of the national significant number.
196272
+ var MIN_LENGTH_FOR_NSN = 2;
196273
+
196274
+ // The ITU says the maximum length should be 15,
196275
+ // but one can find longer numbers in Germany.
196276
+ var MAX_LENGTH_FOR_NSN = 17;
196277
+
196278
+ // The maximum length of the country calling code.
196279
+ var MAX_LENGTH_COUNTRY_CODE = 3;
196280
+
196281
+ // Digits accepted in phone numbers
196282
+ // (ascii, fullwidth, arabic-indic, and eastern arabic digits).
196283
+ var VALID_DIGITS = "0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9";
196284
+
196285
+ // `DASHES` will be right after the opening square bracket of the "character class"
196286
+ var DASHES = "-\u2010-\u2015\u2212\u30FC\uFF0D";
196287
+ var SLASHES = "\uFF0F/";
196288
+ var DOTS = "\uFF0E.";
196289
+ var WHITESPACE = " \xA0\xAD\u200B\u2060\u3000";
196290
+ var BRACKETS = "()\uFF08\uFF09\uFF3B\uFF3D\\[\\]";
196291
+ // export const OPENING_BRACKETS = '(\uFF08\uFF3B\\\['
196292
+ var TILDES = "~\u2053\u223C\uFF5E";
196293
+
196294
+ // Regular expression of acceptable punctuation found in phone numbers. This
196295
+ // excludes punctuation found as a leading character only. This consists of dash
196296
+ // characters, white space characters, full stops, slashes, square brackets,
196297
+ // parentheses and tildes. Full-width variants are also present.
196298
+ var VALID_PUNCTUATION = "".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);
196299
+ var PLUS_CHARS = "+\uFF0B";
196300
+ // const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')
196301
+
196302
+ var CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');
196303
+ function stripIddPrefix(number, country, callingCode, metadata) {
196304
+ if (!country) {
196305
+ return;
196306
+ }
196307
+ // Check if the number is IDD-prefixed.
196308
+ var countryMetadata = new Metadata(metadata);
196309
+ countryMetadata.selectNumberingPlan(country, callingCode);
196310
+ var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());
196311
+ if (number.search(IDDPrefixPattern) !== 0) {
196312
+ return;
196313
+ }
196314
+ // Strip IDD prefix.
196315
+ number = number.slice(number.match(IDDPrefixPattern)[0].length);
196316
+ // If there're any digits after an IDD prefix,
196317
+ // then those digits are a country calling code.
196318
+ // Since no country code starts with a `0`,
196319
+ // the code below validates that the next digit (if present) is not `0`.
196320
+ var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);
196321
+ if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {
196322
+ if (matchedGroups[1] === '0') {
196323
+ return;
196324
+ }
196325
+ }
196326
+ return number;
196327
+ }
196328
+
196329
+ /**
196330
+ * Strips any national prefix (such as 0, 1) present in a
196331
+ * (possibly incomplete) number provided.
196332
+ * "Carrier codes" are only used in Colombia and Brazil,
196333
+ * and only when dialing within those countries from a mobile phone to a fixed line number.
196334
+ * Sometimes it won't actually strip national prefix
196335
+ * and will instead prepend some digits to the `number`:
196336
+ * for example, when number `2345678` is passed with `VI` country selected,
196337
+ * it will return `{ number: "3402345678" }`, because `340` area code is prepended.
196338
+ * @param {string} number — National number digits.
196339
+ * @param {object} metadata — Metadata with country selected.
196340
+ * @return {object} `{ nationalNumber: string, nationalPrefix: string? carrierCode: string? }`. Even if a national prefix was extracted, it's not necessarily present in the returned object, so don't rely on its presence in the returned object in order to find out whether a national prefix has been extracted or not.
196341
+ */
196342
+ function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {
196343
+ if (number && metadata.numberingPlan.nationalPrefixForParsing()) {
196344
+ // See METADATA.md for the description of
196345
+ // `national_prefix_for_parsing` and `national_prefix_transform_rule`.
196346
+ // Attempt to parse the first digits as a national prefix.
196347
+ var prefixPattern = new RegExp('^(?:' + metadata.numberingPlan.nationalPrefixForParsing() + ')');
196348
+ var prefixMatch = prefixPattern.exec(number);
196349
+ if (prefixMatch) {
196350
+ var nationalNumber;
196351
+ var carrierCode;
196352
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule
196353
+ // If a `national_prefix_for_parsing` has any "capturing groups"
196354
+ // then it means that the national (significant) number is equal to
196355
+ // those "capturing groups" transformed via `national_prefix_transform_rule`,
196356
+ // and nothing could be said about the actual national prefix:
196357
+ // what is it and was it even there.
196358
+ // If a `national_prefix_for_parsing` doesn't have any "capturing groups",
196359
+ // then everything it matches is a national prefix.
196360
+ // To determine whether `national_prefix_for_parsing` matched any
196361
+ // "capturing groups", the value of the result of calling `.exec()`
196362
+ // is looked at, and if it has non-undefined values where there're
196363
+ // "capturing groups" in the regular expression, then it means
196364
+ // that "capturing groups" have been matched.
196365
+ // It's not possible to tell whether there'll be any "capturing gropus"
196366
+ // before the matching process, because a `national_prefix_for_parsing`
196367
+ // could exhibit both behaviors.
196368
+ var capturedGroupsCount = prefixMatch.length - 1;
196369
+ var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount];
196370
+ if (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {
196371
+ nationalNumber = number.replace(prefixPattern, metadata.nationalPrefixTransformRule());
196372
+ // If there's more than one captured group,
196373
+ // then carrier code is the second one.
196374
+ if (capturedGroupsCount > 1) {
196375
+ carrierCode = prefixMatch[1];
196376
+ }
196377
+ }
196378
+ // If there're no "capturing groups",
196379
+ // or if there're "capturing groups" but no
196380
+ // `national_prefix_transform_rule`,
196381
+ // then just strip the national prefix from the number,
196382
+ // and possibly a carrier code.
196383
+ // Seems like there could be more.
196384
+ else {
196385
+ // `prefixBeforeNationalNumber` is the whole substring matched by
196386
+ // the `national_prefix_for_parsing` regular expression.
196387
+ // There seem to be no guarantees that it's just a national prefix.
196388
+ // For example, if there's a carrier code, it's gonna be a
196389
+ // part of `prefixBeforeNationalNumber` too.
196390
+ var prefixBeforeNationalNumber = prefixMatch[0];
196391
+ nationalNumber = number.slice(prefixBeforeNationalNumber.length);
196392
+ // If there's at least one captured group,
196393
+ // then carrier code is the first one.
196394
+ if (hasCapturedGroups) {
196395
+ carrierCode = prefixMatch[1];
196396
+ }
196397
+ }
196398
+ // Tries to guess whether a national prefix was present in the input.
196399
+ // This is not something copy-pasted from Google's library:
196400
+ // they don't seem to have an equivalent for that.
196401
+ // So this isn't an "officially approved" way of doing something like that.
196402
+ // But since there seems no other existing method, this library uses it.
196403
+ var nationalPrefix;
196404
+ if (hasCapturedGroups) {
196405
+ var possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1]);
196406
+ var possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup);
196407
+ // Example: an Argentinian (AR) phone number `0111523456789`.
196408
+ // `prefixMatch[0]` is `01115`, and `$1` is `11`,
196409
+ // and the rest of the phone number is `23456789`.
196410
+ // The national number is transformed via `9$1` to `91123456789`.
196411
+ // National prefix `0` is detected being present at the start.
196412
+ // if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {
196413
+ if (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {
196414
+ nationalPrefix = metadata.numberingPlan.nationalPrefix();
196415
+ }
196416
+ } else {
196417
+ nationalPrefix = prefixMatch[0];
196418
+ }
196419
+ return {
196420
+ nationalNumber: nationalNumber,
196421
+ nationalPrefix: nationalPrefix,
196422
+ carrierCode: carrierCode
196423
+ };
196424
+ }
196425
+ }
196426
+ return {
196427
+ nationalNumber: number
196428
+ };
196429
+ }
196430
+
196431
+ /**
196432
+ * Strips national prefix and carrier code from a complete phone number.
196433
+ * The difference from the non-"FromCompleteNumber" function is that
196434
+ * it won't extract national prefix if the resultant number is too short
196435
+ * to be a complete number for the selected phone numbering plan.
196436
+ * @param {string} number — Complete phone number digits.
196437
+ * @param {Metadata} metadata — Metadata with a phone numbering plan selected.
196438
+ * @return {object} `{ nationalNumber: string, carrierCode: string? }`.
196439
+ */
196440
+ function extractNationalNumber(number, metadata) {
196441
+ // Parsing national prefixes and carrier codes
196442
+ // is only required for local phone numbers
196443
+ // but some people don't understand that
196444
+ // and sometimes write international phone numbers
196445
+ // with national prefixes (or maybe even carrier codes).
196446
+ // http://ucken.blogspot.ru/2016/03/trunk-prefixes-in-skype4b.html
196447
+ // Google's original library forgives such mistakes
196448
+ // and so does this library, because it has been requested:
196449
+ // https://github.com/catamphetamine/libphonenumber-js/issues/127
196450
+ var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(number, metadata),
196451
+ carrierCode = _extractNationalNumbe.carrierCode,
196452
+ nationalNumber = _extractNationalNumbe.nationalNumber;
196453
+ if (nationalNumber !== number) {
196454
+ if (!shouldHaveExtractedNationalPrefix(number, nationalNumber, metadata)) {
196455
+ // Don't strip the national prefix.
196456
+ return {
196457
+ nationalNumber: number
196458
+ };
196459
+ }
196460
+ // Check the national (significant) number length after extracting national prefix and carrier code.
196461
+ // Legacy generated metadata (before `1.0.18`) didn't support the "possible lengths" feature.
196462
+ if (metadata.possibleLengths()) {
196463
+ // The number remaining after stripping the national prefix and carrier code
196464
+ // should be long enough to have a possible length for the country.
196465
+ // Otherwise, don't strip the national prefix and carrier code,
196466
+ // since the original number could be a valid number.
196467
+ // This check has been copy-pasted "as is" from Google's original library:
196468
+ // https://github.com/google/libphonenumber/blob/876268eb1ad6cdc1b7b5bef17fc5e43052702d57/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3236-L3250
196469
+ // It doesn't check for the "possibility" of the original `number`.
196470
+ // I guess it's fine not checking that one. It works as is anyway.
196471
+ if (!isPossibleIncompleteNationalNumber(nationalNumber, metadata)) {
196472
+ // Don't strip the national prefix.
196473
+ return {
196474
+ nationalNumber: number
196475
+ };
196476
+ }
196477
+ }
196478
+ }
196479
+ return {
196480
+ nationalNumber: nationalNumber,
196481
+ carrierCode: carrierCode
196482
+ };
196483
+ }
196484
+
196485
+ // In some countries, the same digit could be a national prefix
196486
+ // or a leading digit of a valid phone number.
196487
+ // For example, in Russia, national prefix is `8`,
196488
+ // and also `800 555 35 35` is a valid number
196489
+ // in which `8` is not a national prefix, but the first digit
196490
+ // of a national (significant) number.
196491
+ // Same's with Belarus:
196492
+ // `82004910060` is a valid national (significant) number,
196493
+ // but `2004910060` is not.
196494
+ // To support such cases (to prevent the code from always stripping
196495
+ // national prefix), a condition is imposed: a national prefix
196496
+ // is not extracted when the original number is "viable" and the
196497
+ // resultant number is not, a "viable" national number being the one
196498
+ // that matches `national_number_pattern`.
196499
+ function shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata) {
196500
+ // The equivalent in Google's code is:
196501
+ // https://github.com/google/libphonenumber/blob/e326fa1fc4283bb05eb35cb3c15c18f98a31af33/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L2969-L3004
196502
+ if (matchesEntirely(nationalNumberBefore, metadata.nationalNumberPattern()) && !matchesEntirely(nationalNumberAfter, metadata.nationalNumberPattern())) {
196503
+ return false;
196504
+ }
196505
+ // This "is possible" national number (length) check has been commented out
196506
+ // because it's superceded by the (effectively) same check done in the
196507
+ // `extractNationalNumber()` function after it calls `shouldHaveExtractedNationalPrefix()`.
196508
+ // In other words, why run the same check twice if it could only be run once.
196509
+ // // Check the national (significant) number length after extracting national prefix and carrier code.
196510
+ // // Fixes a minor "weird behavior" bug: https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/57
196511
+ // // (Legacy generated metadata (before `1.0.18`) didn't support the "possible lengths" feature).
196512
+ // if (metadata.possibleLengths()) {
196513
+ // if (isPossibleIncompleteNationalNumber(nationalNumberBefore, metadata) &&
196514
+ // !isPossibleIncompleteNationalNumber(nationalNumberAfter, metadata)) {
196515
+ // return false
196516
+ // }
196517
+ // }
196518
+ return true;
196519
+ }
196520
+ function isPossibleIncompleteNationalNumber(nationalNumber, metadata) {
196521
+ switch (checkNumberLength(nationalNumber, metadata)) {
196522
+ case 'TOO_SHORT':
196523
+ case 'INVALID_LENGTH':
196524
+ // This library ignores "local-only" phone numbers (for simplicity).
196525
+ // See the readme for more info on what are "local-only" phone numbers.
196526
+ // case 'IS_POSSIBLE_LOCAL_ONLY':
196527
+ return false;
196528
+ default:
196529
+ return true;
196530
+ }
196531
+ }
196532
+
196533
+ /**
196534
+ * Sometimes some people incorrectly input international phone numbers
196535
+ * without the leading `+`. This function corrects such input.
196536
+ * @param {string} number — Phone number digits.
196537
+ * @param {string?} country
196538
+ * @param {string?} callingCode
196539
+ * @param {object} metadata
196540
+ * @return {object} `{ countryCallingCode: string?, number: string }`.
196541
+ */
196542
+ function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata) {
196543
+ var countryCallingCode = country ? getCountryCallingCode(country, metadata) : callingCode;
196544
+ if (number.indexOf(countryCallingCode) === 0) {
196545
+ metadata = new Metadata(metadata);
196546
+ metadata.selectNumberingPlan(country, callingCode);
196547
+ var possibleShorterNumber = number.slice(countryCallingCode.length);
196548
+ var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, metadata),
196549
+ possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;
196550
+ var _extractNationalNumbe2 = extractNationalNumber(number, metadata),
196551
+ nationalNumber = _extractNationalNumbe2.nationalNumber;
196552
+ // If the number was not valid before but is valid now,
196553
+ // or if it was too long before, we consider the number
196554
+ // with the country calling code stripped to be a better result
196555
+ // and keep that instead.
196556
+ // For example, in Germany (+49), `49` is a valid area code,
196557
+ // so if a number starts with `49`, it could be both a valid
196558
+ // national German number or an international number without
196559
+ // a leading `+`.
196560
+ if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || checkNumberLength(nationalNumber, metadata) === 'TOO_LONG') {
196561
+ return {
196562
+ countryCallingCode: countryCallingCode,
196563
+ number: possibleShorterNumber
196564
+ };
196565
+ }
196566
+ }
196567
+ return {
196568
+ number: number
196569
+ };
196570
+ }
196571
+
196572
+ /**
196573
+ * Converts a phone number digits (possibly with a `+`)
196574
+ * into a calling code and the rest phone number digits.
196575
+ * The "rest phone number digits" could include
196576
+ * a national prefix, carrier code, and national
196577
+ * (significant) number.
196578
+ * @param {string} number — Phone number digits (possibly with a `+`).
196579
+ * @param {string} [country] — Default country.
196580
+ * @param {string} [callingCode] — Default calling code (some phone numbering plans are non-geographic).
196581
+ * @param {object} metadata
196582
+ * @return {object} `{ countryCallingCodeSource: string?, countryCallingCode: string?, number: string }`
196583
+ * @example
196584
+ * // Returns `{ countryCallingCode: "1", number: "2133734253" }`.
196585
+ * extractCountryCallingCode('2133734253', 'US', null, metadata)
196586
+ * extractCountryCallingCode('2133734253', null, '1', metadata)
196587
+ * extractCountryCallingCode('+12133734253', null, null, metadata)
196588
+ * extractCountryCallingCode('+12133734253', 'RU', null, metadata)
196589
+ */
196590
+ function extractCountryCallingCode(number, country, callingCode, metadata) {
196591
+ if (!number) {
196592
+ return {};
196593
+ }
196594
+ var isNumberWithIddPrefix;
196595
+
196596
+ // If this is not an international phone number,
196597
+ // then either extract an "IDD" prefix, or extract a
196598
+ // country calling code from a number by autocorrecting it
196599
+ // by prepending a leading `+` in cases when it starts
196600
+ // with the country calling code.
196601
+ // https://wikitravel.org/en/International_dialling_prefix
196602
+ // https://github.com/catamphetamine/libphonenumber-js/issues/376
196603
+ if (number[0] !== '+') {
196604
+ // Convert an "out-of-country" dialing phone number
196605
+ // to a proper international phone number.
196606
+ var numberWithoutIDD = stripIddPrefix(number, country, callingCode, metadata);
196607
+ // If an IDD prefix was stripped then
196608
+ // convert the number to international one
196609
+ // for subsequent parsing.
196610
+ if (numberWithoutIDD && numberWithoutIDD !== number) {
196611
+ isNumberWithIddPrefix = true;
196612
+ number = '+' + numberWithoutIDD;
196613
+ } else {
196614
+ // Check to see if the number starts with the country calling code
196615
+ // for the default country. If so, we remove the country calling code,
196616
+ // and do some checks on the validity of the number before and after.
196617
+ // https://github.com/catamphetamine/libphonenumber-js/issues/376
196618
+ if (country || callingCode) {
196619
+ var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata),
196620
+ countryCallingCode = _extractCountryCallin.countryCallingCode,
196621
+ shorterNumber = _extractCountryCallin.number;
196622
+ if (countryCallingCode) {
196623
+ return {
196624
+ countryCallingCodeSource: 'FROM_NUMBER_WITHOUT_PLUS_SIGN',
196625
+ countryCallingCode: countryCallingCode,
196626
+ number: shorterNumber
196627
+ };
196628
+ }
196629
+ }
196630
+ return {
196631
+ // No need to set it to `UNSPECIFIED`. It can be just `undefined`.
196632
+ // countryCallingCodeSource: 'UNSPECIFIED',
196633
+ number: number
196634
+ };
196635
+ }
196636
+ }
196637
+
196638
+ // Fast abortion: country codes do not begin with a '0'
196639
+ if (number[1] === '0') {
196640
+ return {};
196641
+ }
196642
+ metadata = new Metadata(metadata);
196643
+
196644
+ // The thing with country phone codes
196645
+ // is that they are orthogonal to each other
196646
+ // i.e. there's no such country phone code A
196647
+ // for which country phone code B exists
196648
+ // where B starts with A.
196649
+ // Therefore, while scanning digits,
196650
+ // if a valid country code is found,
196651
+ // that means that it is the country code.
196652
+ //
196653
+ var i = 2;
196654
+ while (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {
196655
+ var _countryCallingCode = number.slice(1, i);
196656
+ if (metadata.hasCallingCode(_countryCallingCode)) {
196657
+ metadata.selectNumberingPlan(_countryCallingCode);
196658
+ return {
196659
+ countryCallingCodeSource: isNumberWithIddPrefix ? 'FROM_NUMBER_WITH_IDD' : 'FROM_NUMBER_WITH_PLUS_SIGN',
196660
+ countryCallingCode: _countryCallingCode,
196661
+ number: number.slice(i)
196662
+ };
196663
+ }
196664
+ i++;
196665
+ }
196666
+ return {};
196667
+ }
196668
+
196669
+ // The possible values for the returned `countryCallingCodeSource` are:
196670
+ //
196671
+ // Copy-pasted from:
196672
+ // https://github.com/google/libphonenumber/blob/master/resources/phonenumber.proto
196673
+ //
196674
+ // // The source from which the country_code is derived. This is not set in the
196675
+ // // general parsing method, but in the method that parses and keeps raw_input.
196676
+ // // New fields could be added upon request.
196677
+ // enum CountryCodeSource {
196678
+ // // Default value returned if this is not set, because the phone number was
196679
+ // // created using parse, not parseAndKeepRawInput. hasCountryCodeSource will
196680
+ // // return false if this is the case.
196681
+ // UNSPECIFIED = 0;
196682
+ //
196683
+ // // The country_code is derived based on a phone number with a leading "+",
196684
+ // // e.g. the French number "+33 1 42 68 53 00".
196685
+ // FROM_NUMBER_WITH_PLUS_SIGN = 1;
196686
+ //
196687
+ // // The country_code is derived based on a phone number with a leading IDD,
196688
+ // // e.g. the French number "011 33 1 42 68 53 00", as it is dialled from US.
196689
+ // FROM_NUMBER_WITH_IDD = 5;
196690
+ //
196691
+ // // The country_code is derived based on a phone number without a leading
196692
+ // // "+", e.g. the French number "33 1 42 68 53 00" when defaultCountry is
196693
+ // // supplied as France.
196694
+ // FROM_NUMBER_WITHOUT_PLUS_SIGN = 10;
196695
+ //
196696
+ // // The country_code is derived NOT based on the phone number itself, but
196697
+ // // from the defaultCountry parameter provided in the parsing function by the
196698
+ // // clients. This happens mostly for numbers written in the national format
196699
+ // // (without country code). For example, this would be set when parsing the
196700
+ // // French number "01 42 68 53 00", when defaultCountry is supplied as
196701
+ // // France.
196702
+ // FROM_DEFAULT_COUNTRY = 20;
196703
+ // }
196704
+
196705
+ // Removes brackets and replaces dashes with spaces.
196706
+ //
196707
+ // E.g. "(999) 111-22-33" -> "999 111 22 33"
196708
+ //
196709
+ // For some reason Google's metadata contains `<intlFormat/>`s with brackets and dashes.
196710
+ // Meanwhile, there's no single opinion about using punctuation in international phone numbers.
196711
+ //
196712
+ // For example, Google's `<intlFormat/>` for USA is `+1 213-373-4253`.
196713
+ // And here's a quote from WikiPedia's "North American Numbering Plan" page:
196714
+ // https://en.wikipedia.org/wiki/North_American_Numbering_Plan
196715
+ //
196716
+ // "The country calling code for all countries participating in the NANP is 1.
196717
+ // In international format, an NANP number should be listed as +1 301 555 01 00,
196718
+ // where 301 is an area code (Maryland)."
196719
+ //
196720
+ // I personally prefer the international format without any punctuation.
196721
+ // For example, brackets are remnants of the old age, meaning that the
196722
+ // phone number part in brackets (so called "area code") can be omitted
196723
+ // if dialing within the same "area".
196724
+ // And hyphens were clearly introduced for splitting local numbers into memorizable groups.
196725
+ // For example, remembering "5553535" is difficult but "555-35-35" is much simpler.
196726
+ // Imagine a man taking a bus from home to work and seeing an ad with a phone number.
196727
+ // He has a couple of seconds to memorize that number until it passes by.
196728
+ // If it were spaces instead of hyphens the man wouldn't necessarily get it,
196729
+ // but with hyphens instead of spaces the grouping is more explicit.
196730
+ // I personally think that hyphens introduce visual clutter,
196731
+ // so I prefer replacing them with spaces in international numbers.
196732
+ // In the modern age all output is done on displays where spaces are clearly distinguishable
196733
+ // so hyphens can be safely replaced with spaces without losing any legibility.
196734
+ //
196735
+ function applyInternationalSeparatorStyle(formattedNumber) {
196736
+ return formattedNumber.replace(new RegExp("[".concat(VALID_PUNCTUATION, "]+"), 'g'), ' ').trim();
196737
+ }
196738
+
196739
+ // This was originally set to $1 but there are some countries for which the
196740
+ // first group is not used in the national pattern (e.g. Argentina) so the $1
196741
+ // group does not match correctly. Therefore, we use `\d`, so that the first
196742
+ // group actually used in the pattern will be matched.
196743
+ var FIRST_GROUP_PATTERN = /(\$\d)/;
196744
+ function formatNationalNumberUsingFormat(number, format, _ref) {
196745
+ var useInternationalFormat = _ref.useInternationalFormat,
196746
+ withNationalPrefix = _ref.withNationalPrefix;
196747
+ var formattedNumber = number.replace(new RegExp(format.pattern()), useInternationalFormat ? format.internationalFormat() :
196748
+ // This library doesn't use `domestic_carrier_code_formatting_rule`,
196749
+ // because that one is only used when formatting phone numbers
196750
+ // for dialing from a mobile phone, and this is not a dialing library.
196751
+ // carrierCode && format.domesticCarrierCodeFormattingRule()
196752
+ // // First, replace the $CC in the formatting rule with the desired carrier code.
196753
+ // // Then, replace the $FG in the formatting rule with the first group
196754
+ // // and the carrier code combined in the appropriate way.
196755
+ // ? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode))
196756
+ // : (
196757
+ // withNationalPrefix && format.nationalPrefixFormattingRule()
196758
+ // ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())
196759
+ // : format.format()
196760
+ // )
196761
+ withNationalPrefix && format.nationalPrefixFormattingRule() ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) : format.format());
196762
+ if (useInternationalFormat) {
196763
+ return applyInternationalSeparatorStyle(formattedNumber);
196764
+ }
196765
+ return formattedNumber;
196766
+ }
196767
+
196768
+ /**
196769
+ * Pattern that makes it easy to distinguish whether a region has a single
196770
+ * international dialing prefix or not. If a region has a single international
196771
+ * prefix (e.g. 011 in USA), it will be represented as a string that contains
196772
+ * a sequence of ASCII digits, and possibly a tilde, which signals waiting for
196773
+ * the tone. If there are multiple available international prefixes in a
196774
+ * region, they will be represented as a regex string that always contains one
196775
+ * or more characters that are not ASCII digits or a tilde.
196776
+ */
196777
+ var SINGLE_IDD_PREFIX_REG_EXP = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
196778
+
196779
+ // For regions that have multiple IDD prefixes
196780
+ // a preferred IDD prefix is returned.
196781
+ function getIddPrefix(country, callingCode, metadata) {
196782
+ var countryMetadata = new Metadata(metadata);
196783
+ countryMetadata.selectNumberingPlan(country, callingCode);
196784
+ if (countryMetadata.defaultIDDPrefix()) {
196785
+ return countryMetadata.defaultIDDPrefix();
196786
+ }
196787
+ if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {
196788
+ return countryMetadata.IDDPrefix();
196789
+ }
196790
+ }
196791
+
196792
+ // The RFC 3966 format for extensions.
196793
+ var RFC3966_EXTN_PREFIX = ';ext=';
196794
+
196795
+ /**
196796
+ * Helper method for constructing regular expressions for parsing. Creates
196797
+ * an expression that captures up to max_length digits.
196798
+ * @return {string} RegEx pattern to capture extension digits.
196799
+ */
196800
+ var getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {
196801
+ return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})");
196802
+ };
196803
+
196804
+ /**
196805
+ * Helper initialiser method to create the regular-expression pattern to match
196806
+ * extensions.
196807
+ * Copy-pasted from Google's `libphonenumber`:
196808
+ * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766
196809
+ * @return {string} RegEx pattern to capture extensions.
196810
+ */
196811
+ function createExtensionPattern(purpose) {
196812
+ // We cap the maximum length of an extension based on the ambiguity of the way
196813
+ // the extension is prefixed. As per ITU, the officially allowed length for
196814
+ // extensions is actually 40, but we don't support this since we haven't seen real
196815
+ // examples and this introduces many false interpretations as the extension labels
196816
+ // are not standardized.
196817
+ /** @type {string} */
196818
+ var extLimitAfterExplicitLabel = '20';
196819
+ /** @type {string} */
196820
+ var extLimitAfterLikelyLabel = '15';
196821
+ /** @type {string} */
196822
+ var extLimitAfterAmbiguousChar = '9';
196823
+ /** @type {string} */
196824
+ var extLimitWhenNotSure = '6';
196825
+
196826
+ /** @type {string} */
196827
+ var possibleSeparatorsBetweenNumberAndExtLabel = "[ \xA0\\t,]*";
196828
+ // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.
196829
+ /** @type {string} */
196830
+ var possibleCharsAfterExtLabel = "[:\\.\uFF0E]?[ \xA0\\t,-]*";
196831
+ /** @type {string} */
196832
+ var optionalExtnSuffix = "#?";
196833
+
196834
+ // Here the extension is called out in more explicit way, i.e mentioning it obvious
196835
+ // patterns like "ext.".
196836
+ /** @type {string} */
196837
+ var explicitExtLabels = "(?:e?xt(?:ensi(?:o\u0301?|\xF3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|\u0434\u043E\u0431|anexo)";
196838
+ // One-character symbols that can be used to indicate an extension, and less
196839
+ // commonly used or more ambiguous extension labels.
196840
+ /** @type {string} */
196841
+ var ambiguousExtLabels = "(?:[x\uFF58#\uFF03~\uFF5E]|int|\uFF49\uFF4E\uFF54)";
196842
+ // When extension is not separated clearly.
196843
+ /** @type {string} */
196844
+ var ambiguousSeparator = "[- ]+";
196845
+ // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching
196846
+ // comma as extension label may have it.
196847
+ /** @type {string} */
196848
+ var possibleSeparatorsNumberExtLabelNoComma = "[ \xA0\\t]*";
196849
+ // ",," is commonly used for auto dialling the extension when connected. First
196850
+ // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do
196851
+ // not repeat it here. Semi-colon works in Iphone and Android also to pop up a
196852
+ // button with the extension number following.
196853
+ /** @type {string} */
196854
+ var autoDiallingAndExtLabelsFound = "(?:,{2}|;)";
196855
+
196856
+ /** @type {string} */
196857
+ var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);
196858
+ /** @type {string} */
196859
+ var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;
196860
+ /** @type {string} */
196861
+ var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
196862
+ /** @type {string} */
196863
+ var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + "#";
196864
+
196865
+ /** @type {string} */
196866
+ var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;
196867
+ /** @type {string} */
196868
+ var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + "(?:,)+" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;
196869
+
196870
+ // The first regular expression covers RFC 3966 format, where the extension is added
196871
+ // using ";ext=". The second more generic where extension is mentioned with explicit
196872
+ // labels like "ext:". In both the above cases we allow more numbers in extension than
196873
+ // any other extension labels. The third one captures when single character extension
196874
+ // labels or less commonly used labels are used. In such cases we capture fewer
196875
+ // extension digits in order to reduce the chance of falsely interpreting two
196876
+ // numbers beside each other as a number + extension. The fourth one covers the
196877
+ // special case of American numbers where the extension is written with a hash
196878
+ // at the end, such as "- 503#". The fifth one is exclusively for extension
196879
+ // autodialling formats which are used when dialling and in this case we accept longer
196880
+ // extensions. The last one is more liberal on the number of commas that acts as
196881
+ // extension labels, so we have a strict cap on the number of digits in such extensions.
196882
+ return rfcExtn + "|" + explicitExtn + "|" + ambiguousExtn + "|" + americanStyleExtnWithSuffix + "|" + autoDiallingExtn + "|" + onlyCommasExtn;
196883
+ }
196884
+
196885
+ // Regular expression of viable phone numbers. This is location independent.
196886
+ // Checks we have at least three leading digits, and only valid punctuation,
196887
+ // alpha characters and digits in the phone number. Does not include extension
196888
+ // data. The symbol 'x' is allowed here as valid punctuation since it is often
196889
+ // used as a placeholder for carrier codes, for example in Brazilian phone
196890
+ // numbers. We also allow multiple '+' characters at the start.
196891
+ //
196892
+ // Corresponds to the following:
196893
+ // [digits]{minLengthNsn}|
196894
+ // plus_sign*
196895
+ // (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
196896
+ //
196897
+ // The first reg-ex is to allow short numbers (two digits long) to be parsed if
196898
+ // they are entered as "15" etc, but only if there is no punctuation in them.
196899
+ // The second expression restricts the number of digits to three or more, but
196900
+ // then allows them to be in international form, and to have alpha-characters
196901
+ // and punctuation. We split up the two reg-exes here and combine them when
196902
+ // creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it
196903
+ // with ^ and append $ to each branch.
196904
+ //
196905
+ // "Note VALID_PUNCTUATION starts with a -,
196906
+ // so must be the first in the range" (c) Google devs.
196907
+ // (wtf did they mean by saying that; probably nothing)
196908
+ //
196909
+ var MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}';
196910
+ //
196911
+ // And this is the second reg-exp:
196912
+ // (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)
196913
+ //
196914
+ var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*';
196915
+
196916
+ // This regular expression isn't present in Google's `libphonenumber`
196917
+ // and is only used to determine whether the phone number being input
196918
+ // is too short for it to even consider it a "valid" number.
196919
+ // This is just a way to differentiate between a really invalid phone
196920
+ // number like "abcde" and a valid phone number that a user has just
196921
+ // started inputting, like "+1" or "1": both these cases would be
196922
+ // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
196923
+ // library can provide a more detailed error message — whether it's
196924
+ // really "not a number", or is it just a start of a valid phone number.
196925
+ var VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');
196926
+ var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER +
196927
+ // Phone number extensions
196928
+ '(?:' + createExtensionPattern() + ')?';
196929
+
196930
+ // The combined regular expression for valid phone numbers:
196931
+ //
196932
+ var VALID_PHONE_NUMBER_PATTERN = new RegExp(
196933
+ // Either a short two-digit-only phone number
196934
+ '^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' +
196935
+ // Or a longer fully parsed phone number (min 3 characters)
196936
+ '^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i');
196937
+
196938
+ // Checks to see if the string of characters could possibly be a phone number at
196939
+ // all. At the moment, checks to see that the string begins with at least 2
196940
+ // digits, ignoring any punctuation commonly found in phone numbers. This method
196941
+ // does not require the number to be normalized in advance - but does assume
196942
+ // that leading non-number symbols have been removed, such as by the method
196943
+ // `extract_possible_number`.
196944
+ //
196945
+ function isViablePhoneNumber(number) {
196946
+ return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);
196947
+ }
196948
+
196949
+ // This is just a way to differentiate between a really invalid phone
196950
+ // number like "abcde" and a valid phone number that a user has just
196951
+ // started inputting, like "+1" or "1": both these cases would be
196952
+ // considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this
196953
+ // library can provide a more detailed error message — whether it's
196954
+ // really "not a number", or is it just a start of a valid phone number.
196955
+ function isViablePhoneNumberStart(number) {
196956
+ return VALID_PHONE_NUMBER_START_REG_EXP.test(number);
196957
+ }
196958
+
196959
+ /**
196960
+ * @param {object} - `{ ?number, ?extension }`.
196961
+ * @return {string} Phone URI (RFC 3966).
196962
+ */
196963
+ function formatRFC3966(_ref) {
196964
+ var number = _ref.number,
196965
+ ext = _ref.ext;
196966
+ if (!number) {
196967
+ return '';
196968
+ }
196969
+ if (number[0] !== '+') {
196970
+ throw new Error("\"formatRFC3966()\" expects \"number\" to be in E.164 format.");
196971
+ }
196972
+ return "tel:".concat(number).concat(ext ? ';ext=' + ext : '');
196973
+ }
196974
+
196975
+ function _typeof$4(o) { "@babel/helpers - typeof"; return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$4(o); }
196976
+ function _createForOfIteratorHelperLoose$2(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$3(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
196977
+ function _unsupportedIterableToArray$3(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$3(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; } }
196978
+ function _arrayLikeToArray$3(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
196979
+ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
196980
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty$3(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
196981
+ function _defineProperty$3(e, r, t) { return (r = _toPropertyKey$3(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
196982
+ function _toPropertyKey$3(t) { var i = _toPrimitive$3(t, "string"); return "symbol" == _typeof$4(i) ? i : i + ""; }
196983
+ function _toPrimitive$3(t, r) { if ("object" != _typeof$4(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$4(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
196984
+ var DEFAULT_OPTIONS = {
196985
+ formatExtension: function formatExtension(formattedNumber, extension, metadata) {
196986
+ return "".concat(formattedNumber).concat(metadata.ext()).concat(extension);
196987
+ }
196988
+ };
196989
+
196990
+ /**
196991
+ * Formats a phone number.
196992
+ *
196993
+ * format(phoneNumberInstance, 'INTERNATIONAL', { ..., v2: true }, metadata)
196994
+ * format(phoneNumberInstance, 'NATIONAL', { ..., v2: true }, metadata)
196995
+ *
196996
+ * format({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', { ... }, metadata)
196997
+ * format({ phone: '8005553535', country: 'RU' }, 'NATIONAL', undefined, metadata)
196998
+ *
196999
+ * @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.
197000
+ * @param {string} format
197001
+ * @param {object} [options]
197002
+ * @param {object} metadata
197003
+ * @return {string}
197004
+ */
197005
+ function formatNumber(input, format, options, metadata) {
197006
+ // Apply default options.
197007
+ if (options) {
197008
+ options = _objectSpread$3(_objectSpread$3({}, DEFAULT_OPTIONS), options);
197009
+ } else {
197010
+ options = DEFAULT_OPTIONS;
197011
+ }
197012
+ metadata = new Metadata(metadata);
197013
+ if (input.country && input.country !== '001') {
197014
+ // Validate `input.country`.
197015
+ if (!metadata.hasCountry(input.country)) {
197016
+ throw new Error("Unknown country: ".concat(input.country));
197017
+ }
197018
+ metadata.country(input.country);
197019
+ } else if (input.countryCallingCode) {
197020
+ metadata.selectNumberingPlan(input.countryCallingCode);
197021
+ } else return input.phone || '';
197022
+ var countryCallingCode = metadata.countryCallingCode();
197023
+ var nationalNumber = options.v2 ? input.nationalNumber : input.phone;
197024
+
197025
+ // This variable should have been declared inside `case`s
197026
+ // but Babel has a bug and it says "duplicate variable declaration".
197027
+ var number;
197028
+ switch (format) {
197029
+ case 'NATIONAL':
197030
+ // Legacy argument support.
197031
+ // (`{ country: ..., phone: '' }`)
197032
+ if (!nationalNumber) {
197033
+ return '';
197034
+ }
197035
+ number = formatNationalNumber(nationalNumber, input.carrierCode, 'NATIONAL', metadata, options);
197036
+ return addExtension(number, input.ext, metadata, options.formatExtension);
197037
+ case 'INTERNATIONAL':
197038
+ // Legacy argument support.
197039
+ // (`{ country: ..., phone: '' }`)
197040
+ if (!nationalNumber) {
197041
+ return "+".concat(countryCallingCode);
197042
+ }
197043
+ number = formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata, options);
197044
+ number = "+".concat(countryCallingCode, " ").concat(number);
197045
+ return addExtension(number, input.ext, metadata, options.formatExtension);
197046
+ case 'E.164':
197047
+ // `E.164` doesn't define "phone number extensions".
197048
+ return "+".concat(countryCallingCode).concat(nationalNumber);
197049
+ case 'RFC3966':
197050
+ return formatRFC3966({
197051
+ number: "+".concat(countryCallingCode).concat(nationalNumber),
197052
+ ext: input.ext
197053
+ });
197054
+
197055
+ // For reference, here's Google's IDD formatter:
197056
+ // https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546
197057
+ // Not saying that this IDD formatter replicates it 1:1, but it seems to work.
197058
+ // Who would even need to format phone numbers in IDD format anyway?
197059
+ case 'IDD':
197060
+ if (!options.fromCountry) {
197061
+ return;
197062
+ // throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')
197063
+ }
197064
+ var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options.fromCountry, metadata);
197065
+ return addExtension(formattedNumber, input.ext, metadata, options.formatExtension);
197066
+ default:
197067
+ throw new Error("Unknown \"format\" argument passed to \"formatNumber()\": \"".concat(format, "\""));
197068
+ }
197069
+ }
197070
+ function formatNationalNumber(number, carrierCode, formatAs, metadata, options) {
197071
+ var format = chooseFormatForNumber(metadata.formats(), number);
197072
+ if (!format) {
197073
+ return number;
197074
+ }
197075
+ return formatNationalNumberUsingFormat(number, format, {
197076
+ useInternationalFormat: formatAs === 'INTERNATIONAL',
197077
+ withNationalPrefix: format.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options && options.nationalPrefix === false ? false : true,
197078
+ carrierCode: carrierCode,
197079
+ metadata: metadata
197080
+ });
197081
+ }
197082
+ function chooseFormatForNumber(availableFormats, nationalNnumber) {
197083
+ for (var _iterator = _createForOfIteratorHelperLoose$2(availableFormats), _step; !(_step = _iterator()).done;) {
197084
+ var format = _step.value;
197085
+ // Validate leading digits.
197086
+ // The test case for "else path" could be found by searching for
197087
+ // "format.leadingDigitsPatterns().length === 0".
197088
+ if (format.leadingDigitsPatterns().length > 0) {
197089
+ // The last leading_digits_pattern is used here, as it is the most detailed
197090
+ var lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1];
197091
+ // If leading digits don't match then move on to the next phone number format
197092
+ if (nationalNnumber.search(lastLeadingDigitsPattern) !== 0) {
197093
+ continue;
197094
+ }
197095
+ }
197096
+ // Check that the national number matches the phone number format regular expression
197097
+ if (matchesEntirely(nationalNnumber, format.pattern())) {
197098
+ return format;
197099
+ }
197100
+ }
197101
+ }
197102
+ function addExtension(formattedNumber, ext, metadata, formatExtension) {
197103
+ return ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber;
197104
+ }
197105
+ function formatIDD(nationalNumber, carrierCode, countryCallingCode, fromCountry, metadata) {
197106
+ var fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata.metadata);
197107
+ // When calling within the same country calling code.
197108
+ if (fromCountryCallingCode === countryCallingCode) {
197109
+ var formattedNumber = formatNationalNumber(nationalNumber, carrierCode, 'NATIONAL', metadata);
197110
+ // For NANPA regions, return the national format for these regions
197111
+ // but prefix it with the country calling code.
197112
+ if (countryCallingCode === '1') {
197113
+ return countryCallingCode + ' ' + formattedNumber;
197114
+ }
197115
+ // If regions share a country calling code, the country calling code need
197116
+ // not be dialled. This also applies when dialling within a region, so this
197117
+ // if clause covers both these cases. Technically this is the case for
197118
+ // dialling from La Reunion to other overseas departments of France (French
197119
+ // Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover
197120
+ // this edge case for now and for those cases return the version including
197121
+ // country calling code. Details here:
197122
+ // http://www.petitfute.com/voyage/225-info-pratiques-reunion
197123
+ //
197124
+ return formattedNumber;
197125
+ }
197126
+ var iddPrefix = getIddPrefix(fromCountry, undefined, metadata.metadata);
197127
+ if (iddPrefix) {
197128
+ return "".concat(iddPrefix, " ").concat(countryCallingCode, " ").concat(formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata));
197129
+ }
197130
+ }
197131
+
197132
+ function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$3(o); }
197133
+ function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
197134
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
197135
+ function _defineProperty$2(e, r, t) { return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
197136
+ function _classCallCheck$1(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
197137
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$2(o.key), o); } }
197138
+ function _createClass$1(e, r, t) { return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
197139
+ function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$3(i) ? i : i + ""; }
197140
+ function _toPrimitive$2(t, r) { if ("object" != _typeof$3(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$3(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
197141
+ var PhoneNumber = /*#__PURE__*/function () {
197142
+ /**
197143
+ * @param {string} countryOrCountryCallingCode
197144
+ * @param {string} nationalNumber
197145
+ * @param {object} metadata — Metadata JSON
197146
+ * @return {PhoneNumber}
197147
+ */
197148
+ function PhoneNumber(countryOrCountryCallingCode, nationalNumber, metadata) {
197149
+ _classCallCheck$1(this, PhoneNumber);
197150
+ // Validate `countryOrCountryCallingCode` argument.
197151
+ if (!countryOrCountryCallingCode) {
197152
+ throw new TypeError('First argument is required');
197153
+ }
197154
+ if (typeof countryOrCountryCallingCode !== 'string') {
197155
+ throw new TypeError('First argument must be a string');
197156
+ }
197157
+
197158
+ // In case of public API use: `constructor(number, metadata)`.
197159
+ // Transform the arguments from `constructor(number, metadata)` to
197160
+ // `constructor(countryOrCountryCallingCode, nationalNumber, metadata)`.
197161
+ if (countryOrCountryCallingCode[0] === '+' && !nationalNumber) {
197162
+ throw new TypeError('`metadata` argument not passed');
197163
+ }
197164
+ if (isObject(nationalNumber) && isObject(nationalNumber.countries)) {
197165
+ metadata = nationalNumber;
197166
+ var e164Number = countryOrCountryCallingCode;
197167
+ if (!E164_NUMBER_REGEXP.test(e164Number)) {
197168
+ throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
197169
+ }
197170
+ var _extractCountryCallin = extractCountryCallingCode(e164Number, undefined, undefined, metadata),
197171
+ _countryCallingCode = _extractCountryCallin.countryCallingCode,
197172
+ number = _extractCountryCallin.number;
197173
+ nationalNumber = number;
197174
+ countryOrCountryCallingCode = _countryCallingCode;
197175
+ if (!nationalNumber) {
197176
+ throw new Error('Invalid `number` argument passed: too short');
197177
+ }
197178
+ }
197179
+
197180
+ // Validate `nationalNumber` argument.
197181
+ if (!nationalNumber) {
197182
+ throw new TypeError('`nationalNumber` argument is required');
197183
+ }
197184
+ if (typeof nationalNumber !== 'string') {
197185
+ throw new TypeError('`nationalNumber` argument must be a string');
197186
+ }
197187
+
197188
+ // Validate `metadata` argument.
197189
+ validateMetadata(metadata);
197190
+
197191
+ // Initialize properties.
197192
+ var _getCountryAndCountry = getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadata),
197193
+ country = _getCountryAndCountry.country,
197194
+ countryCallingCode = _getCountryAndCountry.countryCallingCode;
197195
+ this.country = country;
197196
+ this.countryCallingCode = countryCallingCode;
197197
+ this.nationalNumber = nationalNumber;
197198
+ this.number = '+' + this.countryCallingCode + this.nationalNumber;
197199
+ // Exclude `metadata` property output from `PhoneNumber.toString()`
197200
+ // so that it doesn't clutter the console output of Node.js.
197201
+ // Previously, when Node.js did `console.log(new PhoneNumber(...))`,
197202
+ // it would output the whole internal structure of the `metadata` object.
197203
+ this.getMetadata = function () {
197204
+ return metadata;
197205
+ };
197206
+ }
197207
+ return _createClass$1(PhoneNumber, [{
197208
+ key: "setExt",
197209
+ value: function setExt(ext) {
197210
+ this.ext = ext;
197211
+ }
197212
+ }, {
197213
+ key: "getPossibleCountries",
197214
+ value: function getPossibleCountries() {
197215
+ if (this.country) {
197216
+ return [this.country];
197217
+ }
197218
+ return getPossibleCountriesForNumber(this.countryCallingCode, this.nationalNumber, this.getMetadata());
197219
+ }
197220
+ }, {
197221
+ key: "isPossible",
197222
+ value: function isPossible() {
197223
+ return isPossiblePhoneNumber(this, {
197224
+ v2: true
197225
+ }, this.getMetadata());
197226
+ }
197227
+ }, {
197228
+ key: "isValid",
197229
+ value: function isValid() {
197230
+ return isValidNumber(this, {
197231
+ v2: true
197232
+ }, this.getMetadata());
197233
+ }
197234
+ }, {
197235
+ key: "isNonGeographic",
197236
+ value: function isNonGeographic() {
197237
+ var metadata = new Metadata(this.getMetadata());
197238
+ return metadata.isNonGeographicCallingCode(this.countryCallingCode);
197239
+ }
197240
+ }, {
197241
+ key: "isEqual",
197242
+ value: function isEqual(phoneNumber) {
197243
+ return this.number === phoneNumber.number && this.ext === phoneNumber.ext;
197244
+ }
197245
+
197246
+ // This function was originally meant to be an equivalent for `validatePhoneNumberLength()`,
197247
+ // but later it was found out that it doesn't include the possible `TOO_SHORT` result
197248
+ // returned from `parsePhoneNumberWithError()` in the original `validatePhoneNumberLength()`,
197249
+ // so eventually I simply commented out this method from the `PhoneNumber` class
197250
+ // and just left the `validatePhoneNumberLength()` function, even though that one would require
197251
+ // and additional step to also validate the actual country / calling code of the phone number.
197252
+ // validateLength() {
197253
+ // const metadata = new Metadata(this.getMetadata())
197254
+ // metadata.selectNumberingPlan(this.countryCallingCode)
197255
+ // const result = checkNumberLength(this.nationalNumber, metadata)
197256
+ // if (result !== 'IS_POSSIBLE') {
197257
+ // return result
197258
+ // }
197259
+ // }
197260
+ }, {
197261
+ key: "getType",
197262
+ value: function getType() {
197263
+ return getNumberType(this, {
197264
+ v2: true
197265
+ }, this.getMetadata());
197266
+ }
197267
+ }, {
197268
+ key: "format",
197269
+ value: function format(_format, options) {
197270
+ return formatNumber(this, _format, options ? _objectSpread$2(_objectSpread$2({}, options), {}, {
197271
+ v2: true
197272
+ }) : {
197273
+ v2: true
197274
+ }, this.getMetadata());
197275
+ }
197276
+ }, {
197277
+ key: "formatNational",
197278
+ value: function formatNational(options) {
197279
+ return this.format('NATIONAL', options);
197280
+ }
197281
+ }, {
197282
+ key: "formatInternational",
197283
+ value: function formatInternational(options) {
197284
+ return this.format('INTERNATIONAL', options);
197285
+ }
197286
+ }, {
197287
+ key: "getURI",
197288
+ value: function getURI(options) {
197289
+ return this.format('RFC3966', options);
197290
+ }
197291
+ }]);
197292
+ }();
197293
+ var isCountryCode = function isCountryCode(value) {
197294
+ return /^[A-Z]{2}$/.test(value);
197295
+ };
197296
+ function getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJson) {
197297
+ var country;
197298
+ var countryCallingCode;
197299
+ var metadata = new Metadata(metadataJson);
197300
+ // If country code is passed then derive `countryCallingCode` from it.
197301
+ // Also store the country code as `.country`.
197302
+ if (isCountryCode(countryOrCountryCallingCode)) {
197303
+ country = countryOrCountryCallingCode;
197304
+ metadata.selectNumberingPlan(country);
197305
+ countryCallingCode = metadata.countryCallingCode();
197306
+ } else {
197307
+ countryCallingCode = countryOrCountryCallingCode;
197308
+ }
197309
+ return {
197310
+ country: country,
197311
+ countryCallingCode: countryCallingCode
197312
+ };
197313
+ }
197314
+ var E164_NUMBER_REGEXP = /^\+\d+$/;
197315
+
197316
+ function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); }
197317
+ function _createClass(e, r, t) { return Object.defineProperty(e, "prototype", { writable: !1 }), e; }
197318
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
197319
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
197320
+ function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof$2(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
197321
+ function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
197322
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
197323
+ function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); }
197324
+ function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
197325
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
197326
+ function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } }
197327
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
197328
+ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
197329
+ // https://stackoverflow.com/a/46971044/970769
197330
+ // "Breaking changes in Typescript 2.1"
197331
+ // "Extending built-ins like Error, Array, and Map may no longer work."
197332
+ // "As a recommendation, you can manually adjust the prototype immediately after any super(...) calls."
197333
+ // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work
197334
+ var ParseError = /*#__PURE__*/function (_Error) {
197335
+ function ParseError(code) {
197336
+ var _this;
197337
+ _classCallCheck(this, ParseError);
197338
+ _this = _callSuper(this, ParseError, [code]);
197339
+ // Set the prototype explicitly.
197340
+ // Any subclass of FooError will have to manually set the prototype as well.
197341
+ Object.setPrototypeOf(_this, ParseError.prototype);
197342
+ _this.name = _this.constructor.name;
197343
+ return _this;
197344
+ }
197345
+ _inherits(ParseError, _Error);
197346
+ return _createClass(ParseError);
197347
+ }(/*#__PURE__*/_wrapNativeSuper(Error));
197348
+
197349
+ // Regexp of all known extension prefixes used by different regions followed by
197350
+ // 1 or more valid digits, for use when parsing.
197351
+ var EXTN_PATTERN = new RegExp('(?:' + createExtensionPattern() + ')$', 'i');
197352
+
197353
+ // Strips any extension (as in, the part of the number dialled after the call is
197354
+ // connected, usually indicated with extn, ext, x or similar) from the end of
197355
+ // the number, and returns it.
197356
+ function extractExtension(number) {
197357
+ var start = number.search(EXTN_PATTERN);
197358
+ if (start < 0) {
197359
+ return {};
197360
+ }
197361
+ // If we find a potential extension, and the number preceding this is a viable
197362
+ // number, we assume it is an extension.
197363
+ var numberWithoutExtension = number.slice(0, start);
197364
+ var matches = number.match(EXTN_PATTERN);
197365
+ var i = 1;
197366
+ while (i < matches.length) {
197367
+ if (matches[i]) {
197368
+ return {
197369
+ number: numberWithoutExtension,
197370
+ ext: matches[i]
197371
+ };
197372
+ }
197373
+ i++;
197374
+ }
197375
+ }
197376
+
197377
+ // These mappings map a character (key) to a specific digit that should
197378
+ // replace it for normalization purposes. Non-European digits that
197379
+ // may be used in phone numbers are mapped to a European equivalent.
197380
+ //
197381
+ // E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
197382
+ //
197383
+ var DIGITS = {
197384
+ '0': '0',
197385
+ '1': '1',
197386
+ '2': '2',
197387
+ '3': '3',
197388
+ '4': '4',
197389
+ '5': '5',
197390
+ '6': '6',
197391
+ '7': '7',
197392
+ '8': '8',
197393
+ '9': '9',
197394
+ "\uFF10": '0',
197395
+ // Fullwidth digit 0
197396
+ "\uFF11": '1',
197397
+ // Fullwidth digit 1
197398
+ "\uFF12": '2',
197399
+ // Fullwidth digit 2
197400
+ "\uFF13": '3',
197401
+ // Fullwidth digit 3
197402
+ "\uFF14": '4',
197403
+ // Fullwidth digit 4
197404
+ "\uFF15": '5',
197405
+ // Fullwidth digit 5
197406
+ "\uFF16": '6',
197407
+ // Fullwidth digit 6
197408
+ "\uFF17": '7',
197409
+ // Fullwidth digit 7
197410
+ "\uFF18": '8',
197411
+ // Fullwidth digit 8
197412
+ "\uFF19": '9',
197413
+ // Fullwidth digit 9
197414
+ "\u0660": '0',
197415
+ // Arabic-indic digit 0
197416
+ "\u0661": '1',
197417
+ // Arabic-indic digit 1
197418
+ "\u0662": '2',
197419
+ // Arabic-indic digit 2
197420
+ "\u0663": '3',
197421
+ // Arabic-indic digit 3
197422
+ "\u0664": '4',
197423
+ // Arabic-indic digit 4
197424
+ "\u0665": '5',
197425
+ // Arabic-indic digit 5
197426
+ "\u0666": '6',
197427
+ // Arabic-indic digit 6
197428
+ "\u0667": '7',
197429
+ // Arabic-indic digit 7
197430
+ "\u0668": '8',
197431
+ // Arabic-indic digit 8
197432
+ "\u0669": '9',
197433
+ // Arabic-indic digit 9
197434
+ "\u06F0": '0',
197435
+ // Eastern-Arabic digit 0
197436
+ "\u06F1": '1',
197437
+ // Eastern-Arabic digit 1
197438
+ "\u06F2": '2',
197439
+ // Eastern-Arabic digit 2
197440
+ "\u06F3": '3',
197441
+ // Eastern-Arabic digit 3
197442
+ "\u06F4": '4',
197443
+ // Eastern-Arabic digit 4
197444
+ "\u06F5": '5',
197445
+ // Eastern-Arabic digit 5
197446
+ "\u06F6": '6',
197447
+ // Eastern-Arabic digit 6
197448
+ "\u06F7": '7',
197449
+ // Eastern-Arabic digit 7
197450
+ "\u06F8": '8',
197451
+ // Eastern-Arabic digit 8
197452
+ "\u06F9": '9' // Eastern-Arabic digit 9
197453
+ };
197454
+ function parseDigit(character) {
197455
+ return DIGITS[character];
197456
+ }
197457
+
197458
+ function _createForOfIteratorHelperLoose$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
197459
+ function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
197460
+ function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
197461
+
197462
+ /**
197463
+ * Parses phone number characters from a string.
197464
+ * Drops all punctuation leaving only digits and the leading `+` sign (if any).
197465
+ * Also converts wide-ascii and arabic-indic numerals to conventional numerals.
197466
+ * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.
197467
+ * @param {string} string
197468
+ * @return {string}
197469
+ * @example
197470
+ * ```js
197471
+ * // Outputs '8800555'.
197472
+ * parseIncompletePhoneNumber('8 (800) 555')
197473
+ * // Outputs '+7800555'.
197474
+ * parseIncompletePhoneNumber('+7 800 555')
197475
+ * ```
197476
+ */
197477
+ function parseIncompletePhoneNumber(string) {
197478
+ var result = '';
197479
+ // Using `.split('')` here instead of normal `for ... of`
197480
+ // because the importing application doesn't neccessarily include an ES6 polyfill.
197481
+ // The `.split('')` approach discards "exotic" UTF-8 characters
197482
+ // (the ones consisting of four bytes) but digits
197483
+ // (including non-European ones) don't fall into that range
197484
+ // so such "exotic" characters would be discarded anyway.
197485
+ for (var _iterator = _createForOfIteratorHelperLoose$1(string.split('')), _step; !(_step = _iterator()).done;) {
197486
+ var character = _step.value;
197487
+ result += parsePhoneNumberCharacter(character, result) || '';
197488
+ }
197489
+ return result;
197490
+ }
197491
+
197492
+ /**
197493
+ * Parses next character while parsing phone number digits (including a `+`)
197494
+ * from text: discards everything except `+` and digits, and `+` is only allowed
197495
+ * at the start of a phone number.
197496
+ * For example, is used in `react-phone-number-input` where it uses
197497
+ * [`input-format`](https://gitlab.com/catamphetamine/input-format).
197498
+ * @param {string} character - Yet another character from raw input string.
197499
+ * @param {string?} prevParsedCharacters - Previous parsed characters.
197500
+ * @param {function?} emitEvent - An optional "emit event" function.
197501
+ * @return {string?} The parsed character.
197502
+ */
197503
+ function parsePhoneNumberCharacter(character, prevParsedCharacters, emitEvent) {
197504
+ // Only allow a leading `+`.
197505
+ if (character === '+') {
197506
+ // If this `+` is not the first parsed character
197507
+ // then discard it.
197508
+ if (prevParsedCharacters) {
197509
+ return;
197510
+ }
197511
+ return '+';
197512
+ }
197513
+ // Allow digits.
197514
+ return parseDigit(character);
197515
+ }
197516
+
197517
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
197518
+ function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
197519
+ function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
197520
+ function getCountryByNationalNumber(nationalPhoneNumber, _ref) {
197521
+ var countries = _ref.countries,
197522
+ metadata = _ref.metadata;
197523
+ // Re-create `metadata` because it will be selecting a `country`.
197524
+ metadata = new Metadata(metadata);
197525
+
197526
+ // const matchingCountries = []
197527
+
197528
+ for (var _iterator = _createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done;) {
197529
+ var country = _step.value;
197530
+ metadata.country(country);
197531
+ // "Leading digits" patterns are only defined for about 20% of all countries.
197532
+ // By definition, matching "leading digits" is a sufficient but not a necessary
197533
+ // condition for a phone number to belong to a country.
197534
+ // The point of "leading digits" check is that it's the fastest one to get a match.
197535
+ // https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits
197536
+ // I'd suppose that "leading digits" patterns are mutually exclusive for different countries
197537
+ // because of the intended use of that feature.
197538
+ if (metadata.leadingDigits()) {
197539
+ if (nationalPhoneNumber && nationalPhoneNumber.search(metadata.leadingDigits()) === 0) {
197540
+ return country;
197541
+ }
197542
+ }
197543
+ // Else perform full validation with all of those
197544
+ // fixed-line/mobile/etc regular expressions.
197545
+ else if (getNumberType({
197546
+ phone: nationalPhoneNumber,
197547
+ country: country
197548
+ }, undefined, metadata.metadata)) {
197549
+ // If both the `defaultCountry` and the "main" one match the phone number,
197550
+ // don't prefer the `defaultCountry` over the "main" one.
197551
+ // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/154
197552
+ return country;
197553
+ // // If the `defaultCountry` is among the `matchingCountries` then return it.
197554
+ // if (defaultCountry) {
197555
+ // if (country === defaultCountry) {
197556
+ // return country
197557
+ // }
197558
+ // matchingCountries.push(country)
197559
+ // } else {
197560
+ // return country
197561
+ // }
197562
+ }
197563
+ }
197564
+
197565
+ // // Return the first ("main") one of the `matchingCountries`.
197566
+ // if (matchingCountries.length > 0) {
197567
+ // return matchingCountries[0]
197568
+ // }
197569
+ }
197570
+
197571
+ function getCountryByCallingCode(callingCode, _ref) {
197572
+ var nationalPhoneNumber = _ref.nationalNumber,
197573
+ defaultCountry = _ref.defaultCountry,
197574
+ metadata = _ref.metadata;
197575
+ var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);
197576
+ if (!possibleCountries) {
197577
+ return;
197578
+ }
197579
+ // If there's just one country corresponding to the country code,
197580
+ // then just return it, without further phone number digits validation.
197581
+ if (possibleCountries.length === 1) {
197582
+ return possibleCountries[0];
197583
+ }
197584
+ return getCountryByNationalNumber(nationalPhoneNumber, {
197585
+ countries: possibleCountries,
197586
+ defaultCountry: defaultCountry,
197587
+ metadata: metadata.metadata
197588
+ });
197589
+ }
197590
+
197591
+ // When phone numbers are written in `RFC3966` format — `"tel:+12133734253"` —
197592
+ // they can have their "calling code" part written separately in a `phone-context` parameter.
197593
+ // Example: `"tel:12133734253;phone-context=+1"`.
197594
+ // This function parses the full phone number from the local number and the `phone-context`
197595
+ // when the `phone-context` contains a `+` sign.
197596
+
197597
+ var PLUS_SIGN = '+';
197598
+ var RFC3966_VISUAL_SEPARATOR_ = '[\\-\\.\\(\\)]?';
197599
+ var RFC3966_PHONE_DIGIT_ = '(' + '[' + VALID_DIGITS + ']' + '|' + RFC3966_VISUAL_SEPARATOR_ + ')';
197600
+ var RFC3966_GLOBAL_NUMBER_DIGITS_ = '^' + '\\' + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + '*' + '[' + VALID_DIGITS + ']' + RFC3966_PHONE_DIGIT_ + '*' + '$';
197601
+
197602
+ /**
197603
+ * Regular expression of valid global-number-digits for the phone-context
197604
+ * parameter, following the syntax defined in RFC3966.
197605
+ */
197606
+ var RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, 'g');
197607
+
197608
+ // In this port of Google's library, we don't accept alpha characters in phone numbers.
197609
+ // const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS
197610
+ var ALPHANUM_ = VALID_DIGITS;
197611
+ var RFC3966_DOMAINLABEL_ = '[' + ALPHANUM_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
197612
+ var VALID_ALPHA_ = 'a-zA-Z';
197613
+ var RFC3966_TOPLABEL_ = '[' + VALID_ALPHA_ + ']+((\\-)*[' + ALPHANUM_ + '])*';
197614
+ var RFC3966_DOMAINNAME_ = '^(' + RFC3966_DOMAINLABEL_ + '\\.)*' + RFC3966_TOPLABEL_ + '\\.?$';
197615
+
197616
+ /**
197617
+ * Regular expression of valid domainname for the phone-context parameter,
197618
+ * following the syntax defined in RFC3966.
197619
+ */
197620
+ var RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, 'g');
197621
+ var RFC3966_PREFIX_ = 'tel:';
197622
+ var RFC3966_PHONE_CONTEXT_ = ';phone-context=';
197623
+ var RFC3966_ISDN_SUBADDRESS_ = ';isub=';
197624
+
197625
+ /**
197626
+ * Extracts the value of the phone-context parameter of `numberToExtractFrom`,
197627
+ * following the syntax defined in RFC3966.
197628
+ *
197629
+ * @param {string} numberToExtractFrom
197630
+ * @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.
197631
+ */
197632
+ function extractPhoneContext(numberToExtractFrom) {
197633
+ var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_);
197634
+ // If no phone-context parameter is present
197635
+ if (indexOfPhoneContext < 0) {
197636
+ return null;
197637
+ }
197638
+ var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length;
197639
+ // If phone-context parameter is empty
197640
+ if (phoneContextStart >= numberToExtractFrom.length) {
197641
+ return '';
197642
+ }
197643
+ var phoneContextEnd = numberToExtractFrom.indexOf(';', phoneContextStart);
197644
+ // If phone-context is not the last parameter
197645
+ if (phoneContextEnd >= 0) {
197646
+ return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);
197647
+ } else {
197648
+ return numberToExtractFrom.substring(phoneContextStart);
197649
+ }
197650
+ }
197651
+
197652
+ /**
197653
+ * Returns whether the value of phoneContext follows the syntax defined in RFC3966.
197654
+ *
197655
+ * @param {string|null} phoneContext
197656
+ * @return {boolean}
197657
+ */
197658
+ function isPhoneContextValid(phoneContext) {
197659
+ if (phoneContext === null) {
197660
+ return true;
197661
+ }
197662
+ if (phoneContext.length === 0) {
197663
+ return false;
197664
+ }
197665
+
197666
+ // Does phone-context value match pattern of global-number-digits or domainname.
197667
+ return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);
197668
+ }
197669
+
197670
+ /**
197671
+ * @param {string} numberToParse
197672
+ * @param {string} nationalNumber
197673
+ * @return {}
197674
+ */
197675
+ function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {
197676
+ var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;
197677
+ var phoneContext = extractPhoneContext(numberToParse);
197678
+ if (!isPhoneContextValid(phoneContext)) {
197679
+ throw new ParseError('NOT_A_NUMBER');
197680
+ }
197681
+ var phoneNumberString;
197682
+ if (phoneContext === null) {
197683
+ // Extract a possible number from the string passed in.
197684
+ // (this strips leading characters that could not be the start of a phone number)
197685
+ phoneNumberString = extractFormattedPhoneNumber(numberToParse) || '';
197686
+ } else {
197687
+ phoneNumberString = '';
197688
+
197689
+ // If the phone context contains a phone number prefix, we need to capture
197690
+ // it, whereas domains will be ignored.
197691
+ if (phoneContext.charAt(0) === PLUS_SIGN) {
197692
+ phoneNumberString += phoneContext;
197693
+ }
197694
+
197695
+ // Now append everything between the "tel:" prefix and the phone-context.
197696
+ // This should include the national number, an optional extension or
197697
+ // isdn-subaddress component. Note we also handle the case when "tel:" is
197698
+ // missing, as we have seen in some of the phone number inputs.
197699
+ // In that case, we append everything from the beginning.
197700
+ var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);
197701
+ var indexOfNationalNumber;
197702
+ // RFC 3966 "tel:" prefix is preset at this stage because
197703
+ // `isPhoneContextValid()` requires it to be present.
197704
+ /* istanbul ignore else */
197705
+ if (indexOfRfc3966Prefix >= 0) {
197706
+ indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;
197707
+ } else {
197708
+ indexOfNationalNumber = 0;
197709
+ }
197710
+ var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);
197711
+ phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);
197712
+ }
197713
+
197714
+ // Delete the isdn-subaddress and everything after it if it is present.
197715
+ // Note extension won't appear at the same time with isdn-subaddress
197716
+ // according to paragraph 5.3 of the RFC3966 spec.
197717
+ var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);
197718
+ if (indexOfIsdn > 0) {
197719
+ phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);
197720
+ }
197721
+ // If both phone context and isdn-subaddress are absent but other
197722
+ // parameters are present, the parameters are left in nationalNumber.
197723
+ // This is because we are concerned about deleting content from a potential
197724
+ // number string when there is no strong evidence that the number is
197725
+ // actually written in RFC3966.
197726
+
197727
+ if (phoneNumberString !== '') {
197728
+ return phoneNumberString;
197729
+ }
197730
+ }
197731
+
197732
+ // This is a port of Google Android `libphonenumber`'s
197733
+ // `phonenumberutil.js` of December 31th, 2018.
197734
+ //
197735
+ // https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js
197736
+
197737
+
197738
+ // We don't allow input strings for parsing to be longer than 250 chars.
197739
+ // This prevents malicious input from consuming CPU.
197740
+ var MAX_INPUT_STRING_LENGTH = 250;
197741
+
197742
+ // This consists of the plus symbol, digits, and arabic-indic digits.
197743
+ var PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']');
197744
+
197745
+ // Regular expression of trailing characters that we want to remove.
197746
+ // A trailing `#` is sometimes used when writing phone numbers with extensions in US.
197747
+ // Example: "+1 (645) 123 1234-910#" number has extension "910".
197748
+ var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');
197749
+
197750
+ // Examples:
197751
+ //
197752
+ // ```js
197753
+ // parse('8 (800) 555-35-35', 'RU')
197754
+ // parse('8 (800) 555-35-35', 'RU', metadata)
197755
+ // parse('8 (800) 555-35-35', { country: { default: 'RU' } })
197756
+ // parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)
197757
+ // parse('+7 800 555 35 35')
197758
+ // parse('+7 800 555 35 35', metadata)
197759
+ // ```
197760
+ //
197761
+
197762
+ /**
197763
+ * Parses a phone number.
197764
+ *
197765
+ * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)
197766
+ * parse('123456789', { defaultCountry: 'RU' }, metadata)
197767
+ * parse('123456789', undefined, metadata)
197768
+ *
197769
+ * @param {string} input
197770
+ * @param {object} [options]
197771
+ * @param {object} metadata
197772
+ * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).
197773
+ */
197774
+ function parse$1(text, options, metadata) {
197775
+ // If assigning the `{}` default value is moved to the arguments above,
197776
+ // code coverage would decrease for some weird reason.
197777
+ options = options || {};
197778
+ metadata = new Metadata(metadata);
197779
+
197780
+ // Validate `defaultCountry`.
197781
+ if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {
197782
+ if (options.v2) {
197783
+ throw new ParseError('INVALID_COUNTRY');
197784
+ }
197785
+ throw new Error("Unknown country: ".concat(options.defaultCountry));
197786
+ }
197787
+
197788
+ // Parse the phone number.
197789
+ var _parseInput = parseInput(text, options.v2, options.extract),
197790
+ formattedPhoneNumber = _parseInput.number,
197791
+ ext = _parseInput.ext,
197792
+ error = _parseInput.error;
197793
+
197794
+ // If the phone number is not viable then return nothing.
197795
+ if (!formattedPhoneNumber) {
197796
+ if (options.v2) {
197797
+ if (error === 'TOO_SHORT') {
197798
+ throw new ParseError('TOO_SHORT');
197799
+ }
197800
+ throw new ParseError('NOT_A_NUMBER');
197801
+ }
197802
+ return {};
197803
+ }
197804
+ var _parsePhoneNumber = parsePhoneNumber(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),
197805
+ country = _parsePhoneNumber.country,
197806
+ nationalNumber = _parsePhoneNumber.nationalNumber,
197807
+ countryCallingCode = _parsePhoneNumber.countryCallingCode,
197808
+ countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,
197809
+ carrierCode = _parsePhoneNumber.carrierCode;
197810
+ if (!metadata.hasSelectedNumberingPlan()) {
197811
+ if (options.v2) {
197812
+ throw new ParseError('INVALID_COUNTRY');
197813
+ }
197814
+ return {};
197815
+ }
197816
+
197817
+ // Validate national (significant) number length.
197818
+ if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {
197819
+ // Won't throw here because the regexp already demands length > 1.
197820
+ /* istanbul ignore if */
197821
+ if (options.v2) {
197822
+ throw new ParseError('TOO_SHORT');
197823
+ }
197824
+ // Google's demo just throws an error in this case.
197825
+ return {};
197826
+ }
197827
+
197828
+ // Validate national (significant) number length.
197829
+ //
197830
+ // A sidenote:
197831
+ //
197832
+ // They say that sometimes national (significant) numbers
197833
+ // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).
197834
+ // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36
197835
+ // Such numbers will just be discarded.
197836
+ //
197837
+ if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {
197838
+ if (options.v2) {
197839
+ throw new ParseError('TOO_LONG');
197840
+ }
197841
+ // Google's demo just throws an error in this case.
197842
+ return {};
197843
+ }
197844
+ if (options.v2) {
197845
+ var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);
197846
+ if (country) {
197847
+ phoneNumber.country = country;
197848
+ }
197849
+ if (carrierCode) {
197850
+ phoneNumber.carrierCode = carrierCode;
197851
+ }
197852
+ if (ext) {
197853
+ phoneNumber.ext = ext;
197854
+ }
197855
+ phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;
197856
+ return phoneNumber;
197857
+ }
197858
+
197859
+ // Check if national phone number pattern matches the number.
197860
+ // National number pattern is different for each country,
197861
+ // even for those ones which are part of the "NANPA" group.
197862
+ var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;
197863
+ if (!options.extended) {
197864
+ return valid ? result(country, nationalNumber, ext) : {};
197865
+ }
197866
+
197867
+ // isInternational: countryCallingCode !== undefined
197868
+
197869
+ return {
197870
+ country: country,
197871
+ countryCallingCode: countryCallingCode,
197872
+ carrierCode: carrierCode,
197873
+ valid: valid,
197874
+ possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, metadata) ? true : false,
197875
+ phone: nationalNumber,
197876
+ ext: ext
197877
+ };
197878
+ }
197879
+
197880
+ /**
197881
+ * Extracts a formatted phone number from text.
197882
+ * Doesn't guarantee that the extracted phone number
197883
+ * is a valid phone number (for example, doesn't validate its length).
197884
+ * @param {string} text
197885
+ * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.
197886
+ * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.
197887
+ * @return {string}
197888
+ * @example
197889
+ * // Returns "(213) 373-4253".
197890
+ * extractFormattedPhoneNumber("Call (213) 373-4253 for assistance.")
197891
+ */
197892
+ function _extractFormattedPhoneNumber(text, extract, throwOnError) {
197893
+ if (!text) {
197894
+ return;
197895
+ }
197896
+ if (text.length > MAX_INPUT_STRING_LENGTH) {
197897
+ if (throwOnError) {
197898
+ throw new ParseError('TOO_LONG');
197899
+ }
197900
+ return;
197901
+ }
197902
+ if (extract === false) {
197903
+ return text;
197904
+ }
197905
+ // Attempt to extract a possible number from the string passed in
197906
+ var startsAt = text.search(PHONE_NUMBER_START_PATTERN);
197907
+ if (startsAt < 0) {
197908
+ return;
197909
+ }
197910
+ return text
197911
+ // Trim everything to the left of the phone number
197912
+ .slice(startsAt)
197913
+ // Remove trailing non-numerical characters
197914
+ .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');
197915
+ }
197916
+
197917
+ /**
197918
+ * @param {string} text - Input.
197919
+ * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.
197920
+ * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.
197921
+ * @return {object} `{ ?number, ?ext }`.
197922
+ */
197923
+ function parseInput(text, v2, extract) {
197924
+ // // Parse RFC 3966 phone number URI.
197925
+ // if (text && text.indexOf('tel:') === 0) {
197926
+ // return parseRFC3966(text)
197927
+ // }
197928
+ // let number = extractFormattedPhoneNumber(text, extract, v2)
197929
+ var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {
197930
+ extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {
197931
+ return _extractFormattedPhoneNumber(text, extract, v2);
197932
+ }
197933
+ });
197934
+ // If the phone number is not viable, then abort.
197935
+ if (!number) {
197936
+ return {};
197937
+ }
197938
+ if (!isViablePhoneNumber(number)) {
197939
+ if (isViablePhoneNumberStart(number)) {
197940
+ return {
197941
+ error: 'TOO_SHORT'
197942
+ };
197943
+ }
197944
+ return {};
197945
+ }
197946
+ // Attempt to parse extension first, since it doesn't require region-specific
197947
+ // data and we want to have the non-normalised number here.
197948
+ var withExtensionStripped = extractExtension(number);
197949
+ if (withExtensionStripped.ext) {
197950
+ return withExtensionStripped;
197951
+ }
197952
+ return {
197953
+ number: number
197954
+ };
197955
+ }
197956
+
197957
+ /**
197958
+ * Creates `parse()` result object.
197959
+ */
197960
+ function result(country, nationalNumber, ext) {
197961
+ var result = {
197962
+ country: country,
197963
+ phone: nationalNumber
197964
+ };
197965
+ if (ext) {
197966
+ result.ext = ext;
197967
+ }
197968
+ return result;
197969
+ }
197970
+
197971
+ /**
197972
+ * Parses a viable phone number.
197973
+ * @param {string} formattedPhoneNumber — Example: "(213) 373-4253".
197974
+ * @param {string} [defaultCountry]
197975
+ * @param {string} [defaultCallingCode]
197976
+ * @param {Metadata} metadata
197977
+ * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.
197978
+ */
197979
+ function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {
197980
+ // Extract calling code from phone number.
197981
+ var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), defaultCountry, defaultCallingCode, metadata.metadata),
197982
+ countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,
197983
+ countryCallingCode = _extractCountryCallin.countryCallingCode,
197984
+ number = _extractCountryCallin.number;
197985
+
197986
+ // Choose a country by `countryCallingCode`.
197987
+ var country;
197988
+ if (countryCallingCode) {
197989
+ metadata.selectNumberingPlan(countryCallingCode);
197990
+ }
197991
+ // If `formattedPhoneNumber` is passed in "national" format
197992
+ // then `number` is defined and `countryCallingCode` is `undefined`.
197993
+ else if (number && (defaultCountry || defaultCallingCode)) {
197994
+ metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);
197995
+ if (defaultCountry) {
197996
+ country = defaultCountry;
197997
+ }
197998
+ countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);
197999
+ } else return {};
198000
+ if (!number) {
198001
+ return {
198002
+ countryCallingCodeSource: countryCallingCodeSource,
198003
+ countryCallingCode: countryCallingCode
198004
+ };
198005
+ }
198006
+ var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), metadata),
198007
+ nationalNumber = _extractNationalNumbe.nationalNumber,
198008
+ carrierCode = _extractNationalNumbe.carrierCode;
198009
+
198010
+ // Sometimes there are several countries
198011
+ // corresponding to the same country phone code
198012
+ // (e.g. NANPA countries all having `1` country phone code).
198013
+ // Therefore, to reliably determine the exact country,
198014
+ // national (significant) number should have been parsed first.
198015
+ //
198016
+ // When `metadata.json` is generated, all "ambiguous" country phone codes
198017
+ // get their countries populated with the full set of
198018
+ // "phone number type" regular expressions.
198019
+ //
198020
+ var exactCountry = getCountryByCallingCode(countryCallingCode, {
198021
+ nationalNumber: nationalNumber,
198022
+ defaultCountry: defaultCountry,
198023
+ metadata: metadata
198024
+ });
198025
+ if (exactCountry) {
198026
+ country = exactCountry;
198027
+ /* istanbul ignore if */
198028
+ if (exactCountry === '001') ; else {
198029
+ metadata.country(country);
198030
+ }
198031
+ }
198032
+ return {
198033
+ country: country,
198034
+ countryCallingCode: countryCallingCode,
198035
+ countryCallingCodeSource: countryCallingCodeSource,
198036
+ nationalNumber: nationalNumber,
198037
+ carrierCode: carrierCode
198038
+ };
198039
+ }
198040
+
198041
+ function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); }
198042
+ function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
198043
+ function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
198044
+ function _defineProperty$1(e, r, t) { return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
198045
+ function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; }
198046
+ function _toPrimitive$1(t, r) { if ("object" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$1(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
198047
+ function parsePhoneNumberWithError$2(text, options, metadata) {
198048
+ return parse$1(text, _objectSpread$1(_objectSpread$1({}, options), {}, {
198049
+ v2: true
198050
+ }), metadata);
198051
+ }
198052
+
198053
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
198054
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
198055
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
198056
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
198057
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
198058
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
198059
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
198060
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
198061
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
198062
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
198063
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
198064
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
198065
+
198066
+ // Extracts the following properties from function arguments:
198067
+ // * input `text`
198068
+ // * `options` object
198069
+ // * `metadata` JSON
198070
+ function normalizeArguments(args) {
198071
+ var _Array$prototype$slic = Array.prototype.slice.call(args),
198072
+ _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),
198073
+ arg_1 = _Array$prototype$slic2[0],
198074
+ arg_2 = _Array$prototype$slic2[1],
198075
+ arg_3 = _Array$prototype$slic2[2],
198076
+ arg_4 = _Array$prototype$slic2[3];
198077
+ var text;
198078
+ var options;
198079
+ var metadata;
198080
+
198081
+ // If the phone number is passed as a string.
198082
+ // `parsePhoneNumber('88005553535', ...)`.
198083
+ if (typeof arg_1 === 'string') {
198084
+ text = arg_1;
198085
+ } else throw new TypeError('A text for parsing must be a string.');
198086
+
198087
+ // If "default country" argument is being passed then move it to `options`.
198088
+ // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.
198089
+ if (!arg_2 || typeof arg_2 === 'string') {
198090
+ if (arg_4) {
198091
+ options = arg_3;
198092
+ metadata = arg_4;
198093
+ } else {
198094
+ options = undefined;
198095
+ metadata = arg_3;
198096
+ }
198097
+ if (arg_2) {
198098
+ options = _objectSpread({
198099
+ defaultCountry: arg_2
198100
+ }, options);
198101
+ }
198102
+ }
198103
+ // `defaultCountry` is not passed.
198104
+ // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.
198105
+ else if (isObject(arg_2)) {
198106
+ if (arg_3) {
198107
+ options = arg_2;
198108
+ metadata = arg_3;
198109
+ } else {
198110
+ metadata = arg_2;
198111
+ }
198112
+ } else throw new Error("Invalid second argument: ".concat(arg_2));
198113
+ return {
198114
+ text: text,
198115
+ options: options,
198116
+ metadata: metadata
198117
+ };
198118
+ }
198119
+
198120
+ function parsePhoneNumberWithError$1() {
198121
+ var _normalizeArguments = normalizeArguments(arguments),
198122
+ text = _normalizeArguments.text,
198123
+ options = _normalizeArguments.options,
198124
+ metadata = _normalizeArguments.metadata;
198125
+ return parsePhoneNumberWithError$2(text, options, metadata);
198126
+ }
198127
+
198128
+ function parsePhoneNumberWithError() {
198129
+ return withMetadataArgument(parsePhoneNumberWithError$1, arguments)
198130
+ }
198131
+
198132
+ const getFormattedPhoneNumber = (countryName, phoneNumber) => {
198133
+ const country = neetoCist.findBy({ name: countryName }, PHONE_NUMBER_FORMATS);
198134
+ const number = parsePhoneNumberWithError(`${country.code}${phoneNumber}`);
198135
+ const formattedNumber = number.formatInternational();
198136
+ return `${country.flag}${formattedNumber}`;
198137
+ };
198138
+ const generatePhoneNumberDetails = () => {
198139
+ const country = neetoCist.randomPick(...PHONE_NUMBER_FORMATS);
198140
+ const number = country.format.replace(/#/g, () => faker.faker.number.int({ min: 2, max: 9 }).toString());
198141
+ return { flag: country.flag, name: country.name, code: country.code, number };
198142
+ };
198143
+
194905
198144
  var main$2 = {exports: {}};
194906
198145
 
194907
198146
  var name = "dotenv";
@@ -195587,14 +198826,17 @@ exports.EditorPage = EditorPage;
195587
198826
  exports.EmbedBase = EmbedBase;
195588
198827
  exports.FONT_SIZE_SELECTORS = FONT_SIZE_SELECTORS;
195589
198828
  exports.GLOBAL_TRANSLATIONS_PATTERN = GLOBAL_TRANSLATIONS_PATTERN;
198829
+ exports.GOOGLE_ANALYTICS_SELECTORS = GOOGLE_ANALYTICS_SELECTORS;
195590
198830
  exports.GOOGLE_CALENDAR_DATE_FORMAT = GOOGLE_CALENDAR_DATE_FORMAT;
195591
198831
  exports.GOOGLE_LOGIN_SELECTORS = GOOGLE_LOGIN_SELECTORS;
195592
198832
  exports.GOOGLE_LOGIN_TEXTS = GOOGLE_LOGIN_TEXTS;
198833
+ exports.GOOGLE_SHEETS_SELECTORS = GOOGLE_SHEETS_SELECTORS;
195593
198834
  exports.GooglePage = GooglePage;
195594
198835
  exports.HELP_CENTER_SELECTORS = HELP_CENTER_SELECTORS;
195595
198836
  exports.HelpAndProfilePage = HelpAndProfilePage;
195596
198837
  exports.INTEGRATIONS_TEXTS = INTEGRATIONS_TEXTS;
195597
198838
  exports.INTEGRATION_SELECTORS = INTEGRATION_SELECTORS;
198839
+ exports.IP_RESTRICTIONS_SELECTORS = IP_RESTRICTIONS_SELECTORS;
195598
198840
  exports.IS_STAGING_ENV = IS_STAGING_ENV;
195599
198841
  exports.ImageUploader = ImageUploader;
195600
198842
  exports.IntegrationBase = IntegrationBase;
@@ -195615,9 +198857,11 @@ exports.NEETO_FILTERS_SELECTORS = NEETO_FILTERS_SELECTORS;
195615
198857
  exports.NEETO_IMAGE_UPLOADER_SELECTORS = NEETO_IMAGE_UPLOADER_SELECTORS;
195616
198858
  exports.NEETO_ROUTES = NEETO_ROUTES;
195617
198859
  exports.NEETO_TEXT_MODIFIER_SELECTORS = NEETO_TEXT_MODIFIER_SELECTORS;
198860
+ exports.ONBOARDING_SELECTORS = ONBOARDING_SELECTORS;
195618
198861
  exports.ORGANIZATION_TEXTS = ORGANIZATION_TEXTS;
195619
198862
  exports.OTP_EMAIL_PATTERN = OTP_EMAIL_PATTERN;
195620
198863
  exports.OrganizationPage = OrganizationPage;
198864
+ exports.PHONE_NUMBER_FORMATS = PHONE_NUMBER_FORMATS;
195621
198865
  exports.PLURAL = PLURAL;
195622
198866
  exports.PROFILE_LINKS = PROFILE_LINKS;
195623
198867
  exports.PROFILE_SECTION_SELECTORS = PROFILE_SECTION_SELECTORS;
@@ -195647,6 +198891,7 @@ exports.THANK_YOU_SELECTORS = THANK_YOU_SELECTORS;
195647
198891
  exports.THEMES_SELECTORS = THEMES_SELECTORS;
195648
198892
  exports.THIRD_PARTY_ROUTES = THIRD_PARTY_ROUTES;
195649
198893
  exports.TOASTR_MESSAGES = TOASTR_MESSAGES;
198894
+ exports.TWILIO_SELECTORS = TWILIO_SELECTORS;
195650
198895
  exports.TagsApi = TagsApi$1;
195651
198896
  exports.TagsPage = TagsPage;
195652
198897
  exports.TeamMembers = TeamMembers;
@@ -195671,11 +198916,13 @@ exports.executeWithThrottledResources = executeWithThrottledResources;
195671
198916
  exports.extractSubdomainFromError = extractSubdomainFromError;
195672
198917
  exports.filterUtils = filterUtils;
195673
198918
  exports.generatePhoneNumber = generatePhoneNumber;
198919
+ exports.generatePhoneNumberDetails = generatePhoneNumberDetails;
195674
198920
  exports.generateRandomBypassEmail = generateRandomBypassEmail;
195675
198921
  exports.generateRandomFile = generateRandomFile;
195676
198922
  exports.generateStagingData = generateStagingData;
195677
198923
  exports.getByDataQA = getByDataQA;
195678
198924
  exports.getClipboardContent = getClipboardContent;
198925
+ exports.getFormattedPhoneNumber = getFormattedPhoneNumber;
195679
198926
  exports.getFullUrl = getFullUrl;
195680
198927
  exports.getGlobalUserProps = getGlobalUserProps;
195681
198928
  exports.getGlobalUserState = getGlobalUserState;