@samline/forms 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/browser/global.global.js +24 -6
- package/dist/browser/global.global.js.map +1 -1
- package/dist/index.cjs +24 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../node_modules/cleave-zen/src/common/utils.ts","../../node_modules/cleave-zen/src/credit-card/constants.ts","../../node_modules/cleave-zen/src/cursor-tracker/index.ts","../../node_modules/cleave-zen/src/general/index.ts","../../node_modules/cleave-zen/src/numeral/constants.ts","../../node_modules/cleave-zen/src/credit-card/index.ts","../../node_modules/cleave-zen/src/numeral/index.ts","../../node_modules/cleave-zen/src/date/constants.ts","../../node_modules/cleave-zen/src/date/index.ts","../../node_modules/cleave-zen/src/time/constants.ts","../../node_modules/cleave-zen/src/time/index.ts","../../node_modules/libphonenumber-js/metadata.min.json.js","../../node_modules/libphonenumber-js/source/tools/semver-compare.js","../../node_modules/libphonenumber-js/source/helpers/isObject.js","../../node_modules/libphonenumber-js/source/helpers/isCallingCode.js","../../node_modules/libphonenumber-js/source/metadata.js","../../node_modules/libphonenumber-js/source/helpers/mergeArrays.js","../../node_modules/libphonenumber-js/source/helpers/checkNumberLength.js","../../node_modules/libphonenumber-js/source/isPossible.js","../../node_modules/libphonenumber-js/source/helpers/matchesEntirely.js","../../node_modules/libphonenumber-js/source/helpers/getNumberType.js","../../node_modules/libphonenumber-js/source/isValid.js","../../node_modules/libphonenumber-js/source/helpers/isCountryCode.js","../../node_modules/libphonenumber-js/source/helpers/getCountryAndCallingCodeFromOneOfThem.js","../../node_modules/libphonenumber-js/source/helpers/getPossibleCountriesForNumber.js","../../node_modules/libphonenumber-js/source/constants.js","../../node_modules/libphonenumber-js/source/helpers/stripIddPrefix.js","../../node_modules/libphonenumber-js/source/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js","../../node_modules/libphonenumber-js/source/helpers/getCountryByNationalNumber.js","../../node_modules/libphonenumber-js/source/helpers/getCountryByCallingCode.js","../../node_modules/libphonenumber-js/source/helpers/extractNationalNumber.js","../../node_modules/libphonenumber-js/source/getCountryCallingCode.js","../../node_modules/libphonenumber-js/source/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js","../../node_modules/libphonenumber-js/source/helpers/extractCountryCallingCode.js","../../node_modules/libphonenumber-js/source/helpers/applyInternationalSeparatorStyle.js","../../node_modules/libphonenumber-js/source/helpers/formatNationalNumberUsingFormat.js","../../node_modules/libphonenumber-js/source/helpers/getIddPrefix.js","../../node_modules/libphonenumber-js/source/helpers/RFC3966.js","../../node_modules/libphonenumber-js/source/format.js","../../node_modules/libphonenumber-js/source/PhoneNumber.js","../../node_modules/libphonenumber-js/source/helpers/parseDigits.js","../../node_modules/libphonenumber-js/source/AsYouTypeState.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.util.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.complete.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.PatternParser.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.PatternMatcher.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.js","../../node_modules/libphonenumber-js/source/AsYouTypeParser.js","../../node_modules/libphonenumber-js/source/AsYouType.js","../../node_modules/libphonenumber-js/core/index.js","../../node_modules/libphonenumber-js/min/exports/AsYouType.js","../../node_modules/libphonenumber-js/index.js","../../node_modules/@samline/formatter/src/core/phone.ts","../../node_modules/@samline/formatter/src/core/raw.ts","../../node_modules/@samline/formatter/src/core/format.ts","../../node_modules/@samline/formatter/src/core/formatter.ts","../../node_modules/@samline/formatter/src/core/regex.ts","../../src/browser/global.ts","../../src/api/append.ts","../../src/api/auto-submit.ts","../../src/api/clear-errors.ts","../../src/core/format-helpers.ts","../../src/core/formatter-loader.ts","../../src/api/format.ts","../../src/api/destroy.ts","../../src/api/disable-auto-submit.ts","../../src/core/serialize.ts","../../src/api/get-data.ts","../../src/api/get-field.ts","../../src/core/state.ts","../../src/api/get-state.ts","../../src/core/dom.ts","../../src/api/get-value.ts","../../src/api/observe.ts","../../src/api/on-submit.ts","../../src/api/prefill.ts","../../src/api/reset.ts","../../src/api/validate.ts","../../src/api/revalidate.ts","../../src/api/set-errors.ts","../../src/api/set-value.ts","../../src/api/subscribe.ts","../../src/api/unwatch.ts","../../src/api/watch.ts","../../src/core/validation.ts","../../src/core/controller.ts","../../src/api/form.ts","../../src/browser/registry.ts"],"sourcesContent":["import type {\n StripDelimitersProps,\n GetFormattedValueProps,\n BlocksType,\n DelimiterType,\n} from './types'\n\n// const test = (): string => {\n// return 'test-eslint'\n// }\n\nexport const isString = (value: any): value is string =>\n typeof value === 'string'\n\nexport const stripNonNumeric = (value: string): string =>\n value.replace(/[^\\d]/g, '')\n\nexport const getMaxLength = (blocks: BlocksType): number =>\n blocks.reduce((previous: number, current: number) => previous + current, 0)\n\nexport const headStr = (str: string, length: number): string =>\n str.slice(0, length)\n\nexport const getDelimiterRegexByDelimiter = (delimiter: string): RegExp =>\n new RegExp(delimiter.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1'), 'g')\n\nexport const stripDelimiters = ({\n value,\n delimiters,\n}: StripDelimitersProps): string => {\n delimiters.forEach((current: DelimiterType) => {\n current.split('').forEach(letter => {\n value = value.replace(getDelimiterRegexByDelimiter(letter), '')\n })\n })\n\n return value\n}\n\nexport const getFormattedValue = ({\n value,\n blocks,\n delimiter = '',\n delimiters = [],\n delimiterLazyShow = false,\n}: GetFormattedValueProps): string => {\n let result = ''\n let valueRemaining = value\n let currentDelimiter = ''\n\n blocks.forEach((length: number, index: number) => {\n if (valueRemaining.length > 0) {\n const sub = valueRemaining.slice(0, length)\n const rest = valueRemaining.slice(length)\n\n if (delimiters.length > 0) {\n currentDelimiter =\n delimiters[delimiterLazyShow ? index - 1 : index] ?? currentDelimiter\n } else {\n currentDelimiter = delimiter\n }\n\n if (delimiterLazyShow) {\n if (index > 0) {\n result += currentDelimiter\n }\n\n result += sub\n } else {\n result += sub\n\n if (sub.length === length && index < blocks.length - 1) {\n result += currentDelimiter\n }\n }\n\n // update remaining string\n valueRemaining = rest\n }\n })\n\n return result\n}\n","import type { DelimiterType } from '../common/types'\nimport type { CreditCardBlocksType, CreditCardRegexType } from './types'\n\nexport const DefaultCreditCardDelimiter: DelimiterType = ' '\n\nexport enum CreditCardType {\n UATP = 'uatp',\n AMEX = 'amex',\n DINERS = 'diners',\n DISCOVER = 'discover',\n MASTERCARD = 'mastercard',\n DANKORT = 'dankort',\n INSTAPAYMENT = 'instapayment',\n JCB15 = 'jcb15',\n JCB = 'jcb',\n MAESTRO = 'maestro',\n VISA = 'visa',\n MIR = 'mir',\n UNIONPAY = 'unionpay',\n GENERAL = 'general',\n}\n\nexport const CreditCardBlocks: CreditCardBlocksType = {\n [CreditCardType.UATP]: [4, 5, 6],\n [CreditCardType.AMEX]: [4, 6, 5],\n [CreditCardType.DINERS]: [4, 6, 4],\n [CreditCardType.DISCOVER]: [4, 4, 4, 4],\n [CreditCardType.MASTERCARD]: [4, 4, 4, 4],\n [CreditCardType.DANKORT]: [4, 4, 4, 4],\n [CreditCardType.INSTAPAYMENT]: [4, 4, 4, 4],\n [CreditCardType.JCB15]: [4, 6, 5],\n [CreditCardType.JCB]: [4, 4, 4, 4],\n [CreditCardType.MAESTRO]: [4, 4, 4, 4],\n [CreditCardType.VISA]: [4, 4, 4, 4],\n [CreditCardType.MIR]: [4, 4, 4, 4],\n [CreditCardType.UNIONPAY]: [4, 4, 4, 4],\n [CreditCardType.GENERAL]: [4, 4, 4, 4],\n}\n\nexport const CreditCardRegex: CreditCardRegexType = {\n // starts with 1; 15 digits, not starts with 1800 (jcb card)\n [CreditCardType.UATP]: /^(?!1800)1\\d{0,14}/,\n\n // starts with 34/37; 15 digits\n [CreditCardType.AMEX]: /^3[47]\\d{0,13}/,\n\n // starts with 6011/65/644-649; 16 digits\n [CreditCardType.DISCOVER]: /^(?:6011|65\\d{0,2}|64[4-9]\\d?)\\d{0,12}/,\n\n // starts with 300-305/309 or 36/38/39; 14 digits\n [CreditCardType.DINERS]: /^3(?:0([0-5]|9)|[689]\\d?)\\d{0,11}/,\n\n // starts with 51-55/2221–2720; 16 digits\n [CreditCardType.MASTERCARD]:\n /^(5[1-5]\\d{0,2}|22[2-9]\\d{0,1}|2[3-7]\\d{0,2})\\d{0,12}/,\n\n // starts with 5019/4175/4571; 16 digits\n [CreditCardType.DANKORT]: /^(5019|4175|4571)\\d{0,12}/,\n\n // starts with 637-639; 16 digits\n [CreditCardType.INSTAPAYMENT]: /^63[7-9]\\d{0,13}/,\n\n // starts with 2131/1800; 15 digits\n [CreditCardType.JCB15]: /^(?:2131|1800)\\d{0,11}/,\n\n // starts with 2131/1800/35; 16 digits\n [CreditCardType.JCB]: /^(?:35\\d{0,2})\\d{0,12}/,\n\n // starts with 50/56-58/6304/67; 16 digits\n [CreditCardType.MAESTRO]: /^(?:5[0678]\\d{0,2}|6304|67\\d{0,2})\\d{0,12}/,\n\n // starts with 22; 16 digits\n [CreditCardType.MIR]: /^220[0-4]\\d{0,12}/,\n\n // starts with 4; 16 digits\n [CreditCardType.VISA]: /^4\\d{0,15}/,\n\n // starts with 62/81; 16 digits\n [CreditCardType.UNIONPAY]: /^(62|81)\\d{0,14}/,\n}\n","import type { DelimiterType } from '../common/types'\nimport { stripDelimiters } from '../common/utils'\nimport type {\n CalculeteCleanCursorIndexProps,\n CalculeteDirtyCursorIndexProps,\n RegisterCursorTrackerPropsType,\n CursorTrackerInputElement,\n CursorTrackerDestructor,\n} from './types'\n\nconst calculeteCleanCursorIndex = ({\n value,\n dirtyCursorIndex,\n delimiters,\n}: CalculeteCleanCursorIndexProps): number => {\n let index: number = dirtyCursorIndex\n for (let charIndex = 0; charIndex < dirtyCursorIndex; charIndex++) {\n if (delimiters.includes(value[charIndex])) {\n index--\n }\n }\n return index\n}\n\nconst calculeteDirtyCursorIndex = ({\n value,\n cleanCursorIndex,\n delimiters,\n}: CalculeteDirtyCursorIndexProps): number => {\n let index: number = cleanCursorIndex\n for (let charIndex = 0; charIndex < value.length; charIndex++) {\n if (delimiters.includes(value[charIndex])) {\n index++\n }\n if (charIndex === index - 1) {\n break\n }\n }\n\n return index\n}\n\nexport const registerCursorTracker = ({\n input,\n delimiter = '',\n delimiters = [],\n prefix = '',\n}: RegisterCursorTrackerPropsType): CursorTrackerDestructor => {\n const cursorTrackerInput: CursorTrackerInputElement =\n input as CursorTrackerInputElement\n\n if (cursorTrackerInput.CLEAVE_ZEN_cursor_tracker !== undefined) {\n return () => {\n cursorTrackerInput.removeEventListener(\n 'input',\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker\n )\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker = undefined\n }\n }\n\n const cursorTrackerDelimiters: DelimiterType[] = [delimiter, ...delimiters]\n\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker = (e: InputEvent) => {\n const isBackward = e.inputType === 'deleteContentBackward'\n\n const element: CursorTrackerInputElement =\n e.target as CursorTrackerInputElement\n\n // if typing from the end but not backward, do nothing\n if (!isBackward && element.value.length === element.selectionEnd) {\n return\n }\n element.CLEAVE_ZEN_cleanCursorIndex = calculeteCleanCursorIndex({\n value: element.value,\n dirtyCursorIndex: element.selectionEnd ?? 0,\n delimiters: cursorTrackerDelimiters,\n })\n setTimeout(() => {\n // if current value is only to add the delimiter after prefix, do nothing\n if (\n stripDelimiters({\n value: element.value,\n delimiters: cursorTrackerDelimiters,\n }) === prefix\n ) {\n return\n }\n const dirtyCursorIndex = calculeteDirtyCursorIndex({\n value: element.value,\n cleanCursorIndex: element.CLEAVE_ZEN_cleanCursorIndex ?? 0,\n delimiters: cursorTrackerDelimiters,\n })\n element.setSelectionRange(dirtyCursorIndex, dirtyCursorIndex)\n }, 0)\n }\n\n cursorTrackerInput.addEventListener(\n 'input',\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker\n )\n\n return () => {\n cursorTrackerInput.removeEventListener(\n 'input',\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker\n )\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker = undefined\n }\n}\n","import {\n getFormattedValue,\n stripDelimiters,\n stripNonNumeric,\n} from '../common/utils'\nimport type { FormatGeneralOptions, GetPrefixStrippedValueProps } from './types'\n\n// strip prefix\nconst stripPrefix = ({\n value,\n prefix,\n tailPrefix,\n}: GetPrefixStrippedValueProps): string => {\n const prefixLength: number = prefix.length\n\n // No prefix\n if (prefixLength === 0) {\n return value\n }\n\n // Value is prefix\n if (value === prefix && value !== '') {\n return ''\n }\n\n // result prefix string does not match pre-defined prefix\n if (value.slice(0, prefixLength) !== prefix && !tailPrefix) {\n return ''\n } else if (value.slice(-prefixLength) !== prefix && tailPrefix) {\n return ''\n }\n\n // No issue, strip prefix for new value\n return tailPrefix ? value.slice(0, -prefixLength) : value.slice(prefixLength)\n}\n\nexport const formatGeneral = (\n value: string,\n options: FormatGeneralOptions\n): string => {\n const {\n blocks,\n delimiter = '',\n delimiters = [],\n delimiterLazyShow = false,\n prefix = '',\n numericOnly = false,\n uppercase = false,\n lowercase = false,\n } = options\n\n const tailPrefix: boolean = false // This is too buggy to be true\n\n if (delimiter.length > 0) {\n delimiters.push(delimiter)\n }\n\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters,\n })\n\n // strip prefix\n value = stripPrefix({\n value,\n prefix,\n tailPrefix,\n })\n\n // strip non-numeric characters\n value = numericOnly ? stripNonNumeric(value) : value\n\n // convert case\n value = uppercase ? value.toUpperCase() : value\n value = lowercase ? value.toLowerCase() : value\n\n // prevent from showing prefix when no immediate option enabled with empty input value\n if (prefix.length > 0) {\n if (tailPrefix) {\n value = value + prefix\n } else {\n value = prefix + value\n }\n }\n\n // apply blocks\n value = getFormattedValue({\n value,\n blocks,\n delimiter,\n delimiters,\n delimiterLazyShow,\n })\n\n return value\n}\n\nexport const unformatGeneral = (\n value: string,\n options: Pick<FormatGeneralOptions, 'delimiter' | 'delimiters'>\n): string => {\n const { delimiter = '', delimiters = [] } = options\n return stripDelimiters({ value, delimiters: [...delimiters, delimiter] })\n}\n","import type { DelimiterType } from '../common/types'\n\nexport enum NumeralThousandGroupStyles {\n THOUSAND = 'thousand',\n LAKH = 'lakh',\n WAN = 'wan',\n NONE = 'none',\n}\nexport const DefaultNumeralDelimiter: DelimiterType = ','\nexport const DefaultNumeralDecimalMark: DelimiterType = '.'\nexport const DefaultNumeralThousandGroupStyle: NumeralThousandGroupStyles =\n NumeralThousandGroupStyles.THOUSAND\nexport const DefaultNumeralDecimalScale: number = 2\nexport const DefaultNumeralIntegerScale: number = 0 // no limit\n","import type { BlocksType, DelimiterType } from '../common/types'\nimport {\n getFormattedValue,\n getMaxLength,\n headStr,\n stripDelimiters,\n stripNonNumeric,\n} from '../common/utils'\nimport {\n CreditCardBlocks,\n CreditCardRegex,\n CreditCardType,\n DefaultCreditCardDelimiter,\n} from './constants'\nimport type {\n CreditCardInfoProps,\n FormatCreditCardOptions,\n GetCreditCardInfoProps,\n CreditCardExcludeGeneralType,\n} from './types'\n\nconst getStrictBlocks = (blocks: BlocksType): BlocksType => {\n const total: number = blocks.reduce(\n (prev: number, current: number) => prev + current,\n 0\n )\n\n return blocks.concat(19 - total)\n}\n\nconst getCreditCardInfo = ({\n value,\n strictMode,\n}: GetCreditCardInfoProps): CreditCardInfoProps => {\n // Some credit card can have up to 19 digits number.\n // Set strictMode to true will remove the 16 max-length restrain,\n // however, I never found any website validate card number like\n // this, hence probably you don't want to enable this option.\n for (const key of Object.keys(CreditCardRegex) as Array<\n CreditCardExcludeGeneralType<CreditCardType>\n >) {\n if (CreditCardRegex[key].test(value)) {\n const matchedBlocks: BlocksType = CreditCardBlocks[key]\n return {\n type: key,\n blocks:\n strictMode ?? false ? getStrictBlocks(matchedBlocks) : matchedBlocks,\n }\n }\n }\n\n return {\n type: CreditCardType.GENERAL,\n blocks:\n strictMode ?? false\n ? getStrictBlocks(CreditCardBlocks.general)\n : CreditCardBlocks.general,\n }\n}\n\nexport const formatCreditCard = (\n value: string,\n options?: FormatCreditCardOptions\n): string => {\n const {\n delimiter = DefaultCreditCardDelimiter,\n delimiterLazyShow = false,\n strictMode = false,\n } = options ?? {}\n\n // strip non-numeric characters\n value = stripNonNumeric(value)\n\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters: [delimiter],\n })\n\n const { blocks }: CreditCardInfoProps = getCreditCardInfo({\n value,\n strictMode,\n })\n\n // max length\n const maxLength = getMaxLength(blocks)\n value = headStr(value, maxLength)\n\n // calculate\n value = getFormattedValue({\n value,\n blocks,\n delimiter,\n delimiterLazyShow,\n })\n\n return value\n}\n\nexport const getCreditCardType = (\n value: string,\n delimiter?: DelimiterType\n): CreditCardType => {\n // strip non-numeric characters\n value = stripNonNumeric(value)\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters: [delimiter ?? DefaultCreditCardDelimiter],\n })\n\n const { type }: CreditCardInfoProps = getCreditCardInfo({ value })\n return type\n}\n\nexport const unformatCreditCard = (value: string): string =>\n stripNonNumeric(value)\n","import type { FormatNumeralRequiredProps, FormatNumeralOptions } from './types'\n\nimport {\n DefaultNumeralDecimalMark,\n DefaultNumeralDelimiter,\n DefaultNumeralThousandGroupStyle,\n DefaultNumeralDecimalScale,\n DefaultNumeralIntegerScale,\n NumeralThousandGroupStyles,\n} from './constants'\n\nconst format = ({\n value,\n delimiter,\n numeralDecimalMark,\n numeralDecimalScale,\n stripLeadingZeroes,\n numeralPositiveOnly,\n numeralIntegerScale,\n numeralThousandsGroupStyle,\n signBeforePrefix,\n tailPrefix,\n prefix,\n}: FormatNumeralRequiredProps): string => {\n let parts: string[]\n let partSignAndPrefix: string\n let partInteger: string\n let partDecimal: string = ''\n\n // strip alphabet letters\n let result: string = value\n .replace(/[A-Za-z]/g, '')\n\n // replace the first decimal mark with reserved placeholder\n .replace(numeralDecimalMark, 'M')\n\n // strip non numeric letters except minus and \"M\"\n // this is to ensure prefix has been stripped\n .replace(/[^\\dM-]/g, '')\n\n // replace the leading minus with reserved placeholder\n .replace(/^-/, 'N')\n\n // strip the other minus sign (if present)\n .replace(/-/g, '')\n\n // replace the minus sign (if present)\n .replace('N', numeralPositiveOnly ?? false ? '' : '-')\n\n // replace decimal mark\n .replace('M', numeralDecimalMark)\n\n // strip any leading zeros\n if (stripLeadingZeroes) {\n result = result.replace(/^(-)?0+(?=\\d)/, '$1')\n }\n\n const partSign: string = result.slice(0, 1) === '-' ? '-' : ''\n\n if (signBeforePrefix) {\n partSignAndPrefix = partSign + prefix\n } else {\n partSignAndPrefix = prefix + partSign\n }\n\n partInteger = result\n\n if (result.includes(numeralDecimalMark)) {\n parts = result.split(numeralDecimalMark)\n partInteger = parts[0]\n partDecimal = numeralDecimalMark + parts[1].slice(0, numeralDecimalScale)\n }\n\n if (partSign === '-') {\n partInteger = partInteger.slice(1)\n }\n\n if (numeralIntegerScale > 0) {\n partInteger = partInteger.slice(0, numeralIntegerScale)\n }\n\n switch (numeralThousandsGroupStyle) {\n case NumeralThousandGroupStyles.LAKH:\n partInteger = partInteger.replace(/(\\d)(?=(\\d\\d)+\\d$)/g, '$1' + delimiter)\n break\n\n case NumeralThousandGroupStyles.WAN:\n partInteger = partInteger.replace(/(\\d)(?=(\\d{4})+$)/g, '$1' + delimiter)\n break\n\n case NumeralThousandGroupStyles.THOUSAND:\n partInteger = partInteger.replace(/(\\d)(?=(\\d{3})+$)/g, '$1' + delimiter)\n break\n }\n\n if (tailPrefix) {\n return (\n partSign +\n partInteger +\n (numeralDecimalScale > 0 ? partDecimal : '') +\n prefix\n )\n }\n\n return (\n partSignAndPrefix +\n partInteger +\n (numeralDecimalScale > 0 ? partDecimal : '')\n )\n}\n\nexport const formatNumeral = (\n value: string,\n options?: FormatNumeralOptions\n): string => {\n const {\n delimiter = DefaultNumeralDelimiter,\n numeralThousandsGroupStyle = DefaultNumeralThousandGroupStyle,\n numeralIntegerScale = DefaultNumeralIntegerScale,\n numeralDecimalMark = DefaultNumeralDecimalMark,\n numeralDecimalScale = DefaultNumeralDecimalScale,\n stripLeadingZeroes = true,\n numeralPositiveOnly = false,\n tailPrefix = false,\n signBeforePrefix = false,\n prefix = '',\n } = options ?? {}\n\n value = format({\n value,\n delimiter,\n numeralIntegerScale,\n numeralDecimalMark,\n numeralDecimalScale,\n stripLeadingZeroes,\n numeralPositiveOnly,\n numeralThousandsGroupStyle,\n tailPrefix,\n signBeforePrefix,\n prefix,\n })\n\n return value\n}\n\nexport const unformatNumeral = (\n value: string,\n options?: Pick<FormatNumeralOptions, 'numeralDecimalMark'>\n): string => {\n const { numeralDecimalMark = DefaultNumeralDecimalMark } = options ?? {}\n\n return value\n .replace(numeralDecimalMark, 'M')\n .replace(/[^0-9-M]/g, '')\n .replace('M', '.')\n}\n","import type { DelimiterType } from '../common/types'\nimport type { DateUnit } from './types'\n\nexport const DefaultDateDelimiter: DelimiterType = '/'\nexport const DefaultDatePattern: DateUnit[] = ['d', 'm', 'Y']\n","import type { BlocksType } from '../common/types'\nimport {\n stripNonNumeric,\n stripDelimiters,\n getFormattedValue,\n getMaxLength,\n headStr,\n} from '../common/utils'\nimport { DefaultDateDelimiter, DefaultDatePattern } from './constants'\nimport type {\n DateUnit,\n InitDateRangeResults,\n DatePatternType,\n FormatDateOptions,\n DateCalculateOptions,\n} from './types'\n\nconst getBlocksByDatePattern = (datePattern: DatePatternType): BlocksType => {\n const blocks: BlocksType = []\n datePattern.forEach((value: DateUnit) => {\n if (value === 'Y') {\n blocks.push(4)\n } else {\n blocks.push(2)\n }\n })\n return blocks\n}\n\nconst getDateRange = ({\n dateMin,\n dateMax,\n}: {\n dateMin: string\n dateMax: string\n}): InitDateRangeResults => {\n const min: number[] = dateMin\n .split('-')\n .reverse()\n .map((x: string) => parseInt(x, 10))\n if (min.length === 2) min.unshift(0)\n\n const max: number[] = dateMax\n .split('-')\n .reverse()\n .map((x: string) => parseInt(x, 10))\n if (max.length === 2) max.unshift(0)\n\n return { min, max }\n}\n\nconst addLeadingZeroForYear = (\n number: number,\n fullYearMode: boolean\n): string => {\n if (fullYearMode) {\n return (\n (number < 10 ? '000' : number < 100 ? '00' : number < 1000 ? '0' : '') +\n number\n )\n }\n\n return (number < 10 ? '0' : '') + number\n}\n\nconst addLeadingZero = (number: number): string =>\n (number < 10 ? '0' : '') + number\n\nconst getValidatedDate = ({\n value = '',\n blocks = [],\n datePattern,\n min,\n max,\n}: DateCalculateOptions): string => {\n let result = ''\n\n blocks.forEach((length: number, index: number) => {\n if (value.length > 0) {\n let sub = value.slice(0, length)\n const sub0 = sub.slice(0, 1)\n const rest = value.slice(length)\n\n switch (datePattern[index]) {\n case 'd':\n if (sub === '00') {\n sub = '01'\n } else if (parseInt(sub0, 10) > 3) {\n sub = '0' + sub0\n } else if (parseInt(sub, 10) > 31) {\n sub = '31'\n }\n\n break\n\n case 'm':\n if (sub === '00') {\n sub = '01'\n } else if (parseInt(sub0, 10) > 1) {\n sub = '0' + sub0\n } else if (parseInt(sub, 10) > 12) {\n sub = '12'\n }\n\n break\n }\n\n result += sub\n\n // update remaining string\n value = rest\n }\n })\n\n return getFixedDateString({ value: result, datePattern, min, max })\n}\n\nconst getFixedDateString = ({\n value = '',\n datePattern,\n min,\n max,\n}: DateCalculateOptions): string => {\n let date: number[] = []\n let dayIndex = 0\n let monthIndex = 0\n let yearIndex = 0\n let dayStartIndex = 0\n let monthStartIndex = 0\n let yearStartIndex = 0\n let day\n let month\n let year\n let fullYearDone = false\n\n // mm-dd || dd-mm\n if (\n value.length === 4 &&\n datePattern[0].toLowerCase() !== 'y' &&\n datePattern[1].toLowerCase() !== 'y'\n ) {\n dayStartIndex = datePattern[0] === 'd' ? 0 : 2\n monthStartIndex = 2 - dayStartIndex\n day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10)\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10)\n\n date = getFixedDate(day, month, 0)\n }\n\n // yyyy-mm-dd || yyyy-dd-mm || mm-dd-yyyy || dd-mm-yyyy || dd-yyyy-mm || mm-yyyy-dd\n if (value.length === 8) {\n datePattern.forEach((type: DateUnit, index: number) => {\n switch (type) {\n case 'd':\n dayIndex = index\n break\n case 'm':\n monthIndex = index\n break\n default:\n yearIndex = index\n break\n }\n })\n\n yearStartIndex = yearIndex * 2\n dayStartIndex = dayIndex <= yearIndex ? dayIndex * 2 : dayIndex * 2 + 2\n monthStartIndex =\n monthIndex <= yearIndex ? monthIndex * 2 : monthIndex * 2 + 2\n\n day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10)\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10)\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10)\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4\n\n date = getFixedDate(day, month, year)\n }\n\n // mm-yy || yy-mm\n if (\n value.length === 4 &&\n (datePattern[0] === 'y' || datePattern[1] === 'y')\n ) {\n monthStartIndex = datePattern[0] === 'm' ? 0 : 2\n yearStartIndex = 2 - monthStartIndex\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10)\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 2), 10)\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 2).length === 2\n\n date = [0, month, year]\n }\n\n // mm-yyyy || yyyy-mm\n if (\n value.length === 6 &&\n (datePattern[0] === 'Y' || datePattern[1] === 'Y')\n ) {\n monthStartIndex = datePattern[0] === 'm' ? 0 : 4\n yearStartIndex = 2 - 0.5 * monthStartIndex\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10)\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10)\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4\n\n date = [0, month, year]\n }\n\n date = getRangeFixedDate({ date, datePattern, min, max })\n\n const result: string =\n date.length === 0\n ? value\n : datePattern.reduce((previous: string, current: DateUnit) => {\n switch (current) {\n case 'd':\n return previous + (date[0] === 0 ? '' : addLeadingZero(date[0]))\n case 'm':\n return previous + (date[1] === 0 ? '' : addLeadingZero(date[1]))\n case 'y':\n return (\n previous +\n (fullYearDone ? addLeadingZeroForYear(date[2], false) : '')\n )\n case 'Y':\n return (\n previous +\n (fullYearDone ? addLeadingZeroForYear(date[2], true) : '')\n )\n }\n return previous\n }, '')\n\n return result\n}\n\nconst isLeapYear = (year: number): boolean =>\n (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0\n\nconst getFixedDate = (day: number, month: number, year: number): number[] => {\n day = Math.min(day, 31)\n month = Math.min(month, 12)\n year = year ?? 0\n\n if ((month < 7 && month % 2 === 0) || (month > 8 && month % 2 === 1)) {\n day = Math.min(day, month === 2 ? (isLeapYear(year) ? 29 : 28) : 30)\n }\n\n return [day, month, year]\n}\n\nconst getRangeFixedDate = ({\n date = [],\n min,\n max,\n datePattern,\n}: DateCalculateOptions): number[] => {\n if (date.length === 0 || (min.length < 3 && max.length < 3)) return date\n\n const hasYearInPattern: boolean =\n datePattern.filter((x: DateUnit) => x.toLowerCase() === 'y').length > 0\n if (hasYearInPattern && date[2] === 0) {\n return date\n }\n\n if (\n max.length > 0 &&\n (max[2] < date[2] ||\n (max[2] === date[2] &&\n (max[1] < date[1] || (max[1] === date[1] && max[0] < date[0]))))\n ) {\n return max\n }\n\n if (\n min.length > 0 &&\n (min[2] > date[2] ||\n (min[2] === date[2] &&\n (min[1] > date[1] || (min[1] === date[1] && min[0] > date[0]))))\n ) {\n return min\n }\n\n return date\n}\n\nexport const formatDate = (\n value: string,\n options?: FormatDateOptions\n): string => {\n const {\n delimiterLazyShow = false,\n delimiter = DefaultDateDelimiter,\n datePattern = DefaultDatePattern,\n dateMax = '',\n dateMin = '',\n } = options ?? {}\n // strip non-numeric characters\n value = stripNonNumeric(value)\n\n const blocks: BlocksType = getBlocksByDatePattern(datePattern)\n const { min, max } = getDateRange({\n dateMax,\n dateMin,\n })\n\n value = getValidatedDate({\n value,\n blocks,\n datePattern,\n min,\n max,\n })\n\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters: [delimiter],\n })\n\n // max length\n const maxLength = getMaxLength(blocks)\n value = headStr(value, maxLength)\n\n // calculate\n value = getFormattedValue({\n value,\n blocks,\n delimiter,\n delimiterLazyShow,\n })\n\n return value\n}\n","import type { DelimiterType } from '../common/types'\nimport type { TimeFormatType, TimeUnit } from './types'\n\nexport const DefaultTimeFormat: TimeFormatType = '24'\nexport const DefaultTimeDelimiter: DelimiterType = ':'\nexport const DefaultTimePattern: TimeUnit[] = ['h', 'm', 's']\n","import type { BlocksType } from '../common/types'\nimport {\n stripNonNumeric,\n stripDelimiters,\n getFormattedValue,\n getMaxLength,\n headStr,\n} from '../common/utils'\nimport {\n DefaultTimeDelimiter,\n DefaultTimeFormat,\n DefaultTimePattern,\n} from './constants'\nimport type {\n FormatTimeOptions,\n TimeFormatType,\n TimeFormatOptions,\n TimePatternType,\n GetFixedTimeStringProps,\n GetValidatedTimeProps,\n TimeUnit,\n} from './types'\n\nconst getTimeFormatOptions = (\n timeFormat: TimeFormatType\n): TimeFormatOptions => {\n if (timeFormat === '12') {\n return {\n maxHourFirstDigit: 1,\n maxHours: 12,\n maxMinutesFirstDigit: 5,\n maxMinutes: 60,\n }\n }\n\n return {\n maxHourFirstDigit: 2,\n maxHours: 23,\n maxMinutesFirstDigit: 5,\n maxMinutes: 60,\n }\n}\n\nconst addLeadingZero = (number: number): string =>\n (number < 10 ? '0' : '') + number\n\nconst getBlocksByTimePattern = (timePattern: TimePatternType): BlocksType => {\n const blocks: BlocksType = []\n timePattern.forEach(() => {\n blocks.push(2)\n })\n return blocks\n}\n\nconst getFixedTime = (\n hour: number,\n minute: number,\n second: number\n): number[] => {\n second = Math.min(second, 60)\n minute = Math.min(minute, 60)\n hour = Math.min(hour, 60)\n\n return [hour, minute, second]\n}\n\nconst getFixedTimeString = ({\n value,\n timePattern,\n}: GetFixedTimeStringProps): string => {\n let time: number[] = []\n let secondIndex = 0\n let minuteIndex = 0\n let hourIndex = 0\n let secondStartIndex = 0\n let minuteStartIndex = 0\n let hourStartIndex = 0\n let second\n let minute\n let hour\n\n if (value.length === 6) {\n timePattern.forEach((type, index) => {\n switch (type) {\n case 's':\n secondIndex = index * 2\n break\n case 'm':\n minuteIndex = index * 2\n break\n case 'h':\n hourIndex = index * 2\n break\n }\n })\n\n hourStartIndex = hourIndex\n minuteStartIndex = minuteIndex\n secondStartIndex = secondIndex\n\n second = parseInt(value.slice(secondStartIndex, secondStartIndex + 2), 10)\n minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10)\n hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10)\n\n time = getFixedTime(hour, minute, second)\n }\n\n if (value.length === 4 && !timePattern.includes('s')) {\n timePattern.forEach((type: TimeUnit, index: number) => {\n switch (type) {\n case 'm':\n minuteIndex = index * 2\n break\n case 'h':\n hourIndex = index * 2\n break\n }\n })\n\n hourStartIndex = hourIndex\n minuteStartIndex = minuteIndex\n\n second = 0\n minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10)\n hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10)\n\n time = getFixedTime(hour, minute, second)\n }\n\n return time.length === 0\n ? value\n : timePattern.reduce((previous: string, current: TimeUnit): string => {\n switch (current) {\n case 's':\n return previous + addLeadingZero(time[2])\n case 'm':\n return previous + addLeadingZero(time[1])\n case 'h':\n return previous + addLeadingZero(time[0])\n }\n return previous\n }, '')\n}\n\nconst getValidatedTime = ({\n value,\n blocks,\n timePattern,\n timeFormat,\n}: GetValidatedTimeProps): string => {\n let result: string = ''\n\n const timeFormatOptions: TimeFormatOptions = getTimeFormatOptions(timeFormat)\n\n blocks.forEach((length: number, index: number) => {\n if (value.length > 0) {\n let sub = value.slice(0, length)\n const sub0 = sub.slice(0, 1)\n const rest = value.slice(length)\n\n switch (timePattern[index]) {\n case 'h':\n if (parseInt(sub0, 10) > timeFormatOptions.maxHourFirstDigit) {\n sub = '0' + sub0\n } else if (parseInt(sub, 10) > timeFormatOptions.maxHours) {\n sub = timeFormatOptions.maxHours + ''\n }\n\n break\n case 'm':\n case 's':\n if (parseInt(sub0, 10) > timeFormatOptions.maxMinutesFirstDigit) {\n sub = '0' + sub0\n } else if (parseInt(sub, 10) > timeFormatOptions.maxMinutes) {\n sub = timeFormatOptions.maxMinutes + ''\n }\n break\n }\n\n result += sub\n\n // update remaining string\n value = rest\n }\n })\n\n return getFixedTimeString({ value: result, timePattern })\n}\n\nexport const formatTime = (\n value: string,\n options?: FormatTimeOptions\n): string => {\n const {\n delimiterLazyShow = false,\n delimiter = DefaultTimeDelimiter,\n timePattern = DefaultTimePattern,\n timeFormat = DefaultTimeFormat,\n } = options ?? {}\n // strip non-numeric characters\n value = stripNonNumeric(value)\n\n const blocks: BlocksType = getBlocksByTimePattern(timePattern)\n value = getValidatedTime({\n value,\n blocks,\n timePattern,\n timeFormat,\n })\n\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters: [delimiter],\n })\n\n // max length\n const maxLength = getMaxLength(blocks)\n value = headStr(value, maxLength)\n\n // calculate\n value = getFormattedValue({\n value,\n blocks,\n delimiter,\n delimiterLazyShow,\n })\n\n return value\n}\n","// This file is a workaround for a bug in web browsers' \"native\"\n// ES6 importing system which is uncapable of importing \"*.json\" files.\n// https://github.com/catamphetamine/libphonenumber-js/issues/239\nexport default {\"version\":4,\"country_calling_codes\":{\"1\":[\"US\",\"AG\",\"AI\",\"AS\",\"BB\",\"BM\",\"BS\",\"CA\",\"DM\",\"DO\",\"GD\",\"GU\",\"JM\",\"KN\",\"KY\",\"LC\",\"MP\",\"MS\",\"PR\",\"SX\",\"TC\",\"TT\",\"VC\",\"VG\",\"VI\"],\"7\":[\"RU\",\"KZ\"],\"20\":[\"EG\"],\"27\":[\"ZA\"],\"30\":[\"GR\"],\"31\":[\"NL\"],\"32\":[\"BE\"],\"33\":[\"FR\"],\"34\":[\"ES\"],\"36\":[\"HU\"],\"39\":[\"IT\",\"VA\"],\"40\":[\"RO\"],\"41\":[\"CH\"],\"43\":[\"AT\"],\"44\":[\"GB\",\"GG\",\"IM\",\"JE\"],\"45\":[\"DK\"],\"46\":[\"SE\"],\"47\":[\"NO\",\"SJ\"],\"48\":[\"PL\"],\"49\":[\"DE\"],\"51\":[\"PE\"],\"52\":[\"MX\"],\"53\":[\"CU\"],\"54\":[\"AR\"],\"55\":[\"BR\"],\"56\":[\"CL\"],\"57\":[\"CO\"],\"58\":[\"VE\"],\"60\":[\"MY\"],\"61\":[\"AU\",\"CC\",\"CX\"],\"62\":[\"ID\"],\"63\":[\"PH\"],\"64\":[\"NZ\"],\"65\":[\"SG\"],\"66\":[\"TH\"],\"81\":[\"JP\"],\"82\":[\"KR\"],\"84\":[\"VN\"],\"86\":[\"CN\"],\"90\":[\"TR\"],\"91\":[\"IN\"],\"92\":[\"PK\"],\"93\":[\"AF\"],\"94\":[\"LK\"],\"95\":[\"MM\"],\"98\":[\"IR\"],\"211\":[\"SS\"],\"212\":[\"MA\",\"EH\"],\"213\":[\"DZ\"],\"216\":[\"TN\"],\"218\":[\"LY\"],\"220\":[\"GM\"],\"221\":[\"SN\"],\"222\":[\"MR\"],\"223\":[\"ML\"],\"224\":[\"GN\"],\"225\":[\"CI\"],\"226\":[\"BF\"],\"227\":[\"NE\"],\"228\":[\"TG\"],\"229\":[\"BJ\"],\"230\":[\"MU\"],\"231\":[\"LR\"],\"232\":[\"SL\"],\"233\":[\"GH\"],\"234\":[\"NG\"],\"235\":[\"TD\"],\"236\":[\"CF\"],\"237\":[\"CM\"],\"238\":[\"CV\"],\"239\":[\"ST\"],\"240\":[\"GQ\"],\"241\":[\"GA\"],\"242\":[\"CG\"],\"243\":[\"CD\"],\"244\":[\"AO\"],\"245\":[\"GW\"],\"246\":[\"IO\"],\"247\":[\"AC\"],\"248\":[\"SC\"],\"249\":[\"SD\"],\"250\":[\"RW\"],\"251\":[\"ET\"],\"252\":[\"SO\"],\"253\":[\"DJ\"],\"254\":[\"KE\"],\"255\":[\"TZ\"],\"256\":[\"UG\"],\"257\":[\"BI\"],\"258\":[\"MZ\"],\"260\":[\"ZM\"],\"261\":[\"MG\"],\"262\":[\"RE\",\"YT\"],\"263\":[\"ZW\"],\"264\":[\"NA\"],\"265\":[\"MW\"],\"266\":[\"LS\"],\"267\":[\"BW\"],\"268\":[\"SZ\"],\"269\":[\"KM\"],\"290\":[\"SH\",\"TA\"],\"291\":[\"ER\"],\"297\":[\"AW\"],\"298\":[\"FO\"],\"299\":[\"GL\"],\"350\":[\"GI\"],\"351\":[\"PT\"],\"352\":[\"LU\"],\"353\":[\"IE\"],\"354\":[\"IS\"],\"355\":[\"AL\"],\"356\":[\"MT\"],\"357\":[\"CY\"],\"358\":[\"FI\",\"AX\"],\"359\":[\"BG\"],\"370\":[\"LT\"],\"371\":[\"LV\"],\"372\":[\"EE\"],\"373\":[\"MD\"],\"374\":[\"AM\"],\"375\":[\"BY\"],\"376\":[\"AD\"],\"377\":[\"MC\"],\"378\":[\"SM\"],\"380\":[\"UA\"],\"381\":[\"RS\"],\"382\":[\"ME\"],\"383\":[\"XK\"],\"385\":[\"HR\"],\"386\":[\"SI\"],\"387\":[\"BA\"],\"389\":[\"MK\"],\"420\":[\"CZ\"],\"421\":[\"SK\"],\"423\":[\"LI\"],\"500\":[\"FK\"],\"501\":[\"BZ\"],\"502\":[\"GT\"],\"503\":[\"SV\"],\"504\":[\"HN\"],\"505\":[\"NI\"],\"506\":[\"CR\"],\"507\":[\"PA\"],\"508\":[\"PM\"],\"509\":[\"HT\"],\"590\":[\"GP\",\"BL\",\"MF\"],\"591\":[\"BO\"],\"592\":[\"GY\"],\"593\":[\"EC\"],\"594\":[\"GF\"],\"595\":[\"PY\"],\"596\":[\"MQ\"],\"597\":[\"SR\"],\"598\":[\"UY\"],\"599\":[\"CW\",\"BQ\"],\"670\":[\"TL\"],\"672\":[\"NF\"],\"673\":[\"BN\"],\"674\":[\"NR\"],\"675\":[\"PG\"],\"676\":[\"TO\"],\"677\":[\"SB\"],\"678\":[\"VU\"],\"679\":[\"FJ\"],\"680\":[\"PW\"],\"681\":[\"WF\"],\"682\":[\"CK\"],\"683\":[\"NU\"],\"685\":[\"WS\"],\"686\":[\"KI\"],\"687\":[\"NC\"],\"688\":[\"TV\"],\"689\":[\"PF\"],\"690\":[\"TK\"],\"691\":[\"FM\"],\"692\":[\"MH\"],\"850\":[\"KP\"],\"852\":[\"HK\"],\"853\":[\"MO\"],\"855\":[\"KH\"],\"856\":[\"LA\"],\"880\":[\"BD\"],\"886\":[\"TW\"],\"960\":[\"MV\"],\"961\":[\"LB\"],\"962\":[\"JO\"],\"963\":[\"SY\"],\"964\":[\"IQ\"],\"965\":[\"KW\"],\"966\":[\"SA\"],\"967\":[\"YE\"],\"968\":[\"OM\"],\"970\":[\"PS\"],\"971\":[\"AE\"],\"972\":[\"IL\"],\"973\":[\"BH\"],\"974\":[\"QA\"],\"975\":[\"BT\"],\"976\":[\"MN\"],\"977\":[\"NP\"],\"992\":[\"TJ\"],\"993\":[\"TM\"],\"994\":[\"AZ\"],\"995\":[\"GE\"],\"996\":[\"KG\"],\"998\":[\"UZ\"]},\"countries\":{\"AC\":[\"247\",\"00\",\"(?:[01589]\\\\d|[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,[[\"(?:(?:241|349)0\\\\d\\\\d|8(?:51(?:0(?:0[03-9]|[12479]\\\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\\\d|7[89]|9[0-4])|[34]\\\\d\\\\d)|91(?:(?:[0-58]\\\\d|6[0135-9])\\\\d|7(?:0[0-24-9]|[1-9]\\\\d)|9(?:[0-46-9]\\\\d|5[0-79]))))\\\\d{3}|(?:2(?:[0-26-9]\\\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\\\d|2[0-8])|8(?:55|6[0-8]|[78]\\\\d|9[02-9]))\\\\d{6}\",[9]],[\"4(?:79[01]|83[0-36-9]|95[0-3])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\\\d{6}\",[9]],[\"180(?:0\\\\d{3}|2)\\\\d{3}\",[7,10]],[\"190[0-26]\\\\d{6}\",[10]],0,0,0,[\"163\\\\d{2,6}\",[5,6,7,8,9]],[\"14(?:5(?:1[0458]|[23][458])|71\\\\d)\\\\d{4}\",[9]],[\"13(?:00\\\\d{6}(?:\\\\d{2})?|45[0-4]\\\\d{3})|13\\\\d{4}\",[6,8,10,12]]],\"0011\"],\"AW\":[\"297\",\"00\",\"(?:[25-79]\\\\d\\\\d|800)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[25-9]\"]]]],\"AX\":[\"358\",\"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))\",\"2\\\\d{4,9}|35\\\\d{4,5}|(?:60\\\\d\\\\d|800)\\\\d{4,6}|7\\\\d{5,11}|(?:[14]\\\\d|3[0-46-9]|50)\\\\d{4,8}\",[5,6,7,8,9,10,11,12],0,\"0\",0,0,0,0,\"18\",0,\"00\"],\"AZ\":[\"994\",\"00\",\"365\\\\d{6}|(?:[124579]\\\\d|60|88)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"90\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[28]|2|365|46\",\"1[28]|2|365[45]|46\",\"1[28]|2|365(?:4|5[02])|46\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[13-9]\"],\"0$1\"]],\"0\"],\"BA\":[\"387\",\"00\",\"6\\\\d{8}|(?:[35689]\\\\d|49|70)\\\\d{6}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6[1-3]|[7-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2-$3\",[\"[3-5]|6[56]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"6\"],\"0$1\"]],\"0\"],\"BB\":[\"1\",\"011\",\"(?:246|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"246$1\",0,\"246\"],\"BD\":[\"880\",\"00\",\"[1-469]\\\\d{9}|8[0-79]\\\\d{7,8}|[2-79]\\\\d{8}|[2-9]\\\\d{7}|[3-9]\\\\d{6}|[57-9]\\\\d{5}\",[6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1-$2\",[\"31[5-8]|[459]1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1-$2\",[\"3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|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\",\"[024-7]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[024-7]\"]]]],\"BG\":[\"359\",\"00\",\"00800\\\\d{7}|[2-7]\\\\d{6,7}|[89]\\\\d{6,8}|2\\\\d{5}\",[6,7,8,9,12],[[\"(\\\\d)(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"43[1-6]|70[1-9]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"(?:70|8)0\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3\",[\"43[1-7]|7\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[48]|9[08]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\"],\"BH\":[\"973\",\"00\",\"[136-9]\\\\d{7}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[13679]|8[02-4679]\"]]]],\"BI\":[\"257\",\"00\",\"(?:[267]\\\\d|31)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2367]\"]]]],\"BJ\":[\"229\",\"00\",\"(?:01\\\\d|8)\\\\d{7}\",[8,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"0\"]]]],\"BL\":[\"590\",\"00\",\"7090\\\\d{5}|(?:[56]9|[89]\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[[\"(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\\\d)|80[6-9]\\\\d\\\\d)\\\\d{4}\"],[\"(?:69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\\\d{4}\"],[\"80[0-5]\\\\d{6}\"],[\"8[129]\\\\d{7}\"],0,0,0,0,[\"9(?:(?:39[5-7]|76[018])\\\\d|475[0-6])\\\\d{4}\"]]],\"BM\":[\"1\",\"011\",\"(?:441|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"441$1\",0,\"441\"],\"BN\":[\"673\",\"00\",\"[2-578]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-578]\"]]]],\"BO\":[\"591\",\"00(?:1\\\\d)?\",\"(?:[2-7]\\\\d\\\\d|8001)\\\\d{5}\",[8,9],[[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"[23]|4[46]|50\"]],[\"(\\\\d{8})\",\"$1\",[\"[5-7]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]],\"0\",0,\"0(1\\\\d)?\"],\"BQ\":[\"599\",\"00\",\"(?:[34]1|7\\\\d)\\\\d{5}\",[7],0,0,0,0,0,0,\"[347]\"],\"BR\":[\"55\",\"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)\",\"[1-467]\\\\d{9,10}|55[0-46-9]\\\\d{8}|[34]\\\\d{7}|55\\\\d{7,8}|(?:5[0-46-9]|[89]\\\\d)\\\\d{7,9}\",[8,9,10,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"300|4(?:0[02]|37|86)\",\"300|4(?:0(?:0|20)|370|864)\"]],[\"(\\\\d{3})(\\\\d{2,3})(\\\\d{4})\",\"$1 $2 $3\",[\"(?:[358]|90)0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2-$3\",[\"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]\"],\"($1)\"],[\"(\\\\d{2})(\\\\d{5})(\\\\d{4})\",\"$1 $2-$3\",[\"[16][1-9]|[2-57-9]\"],\"($1)\"]],\"0\",0,\"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\\\d{10,11}))?\",\"$2\"],\"BS\":[\"1\",\"011\",\"(?:242|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([3-8]\\\\d{6})$|1\",\"242$1\",0,\"242\"],\"BT\":[\"975\",\"00\",\"[178]\\\\d{7}|[2-8]\\\\d{6}\",[7,8],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-6]|7[246]|8[2-4]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[67]|[78]\"]]]],\"BW\":[\"267\",\"00\",\"(?: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]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\\\d{6}\",[10]],0,[\"310\\\\d{4}\",[7]],0,[\"600[2-9]\\\\d{6}\",[10]]]],\"CC\":[\"61\",\"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011\",\"1(?:[0-79]\\\\d{8}(?:\\\\d{2})?|8[0-24-9]\\\\d{7})|[148]\\\\d{8}|1\\\\d{5,7}\",[6,7,8,9,10,12],0,\"0\",0,\"([59]\\\\d{7})$|0\",\"8$1\",0,0,[[\"8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\\\d|70[23]|959))\\\\d{3}\",[9]],[\"4(?:79[01]|83[0-36-9]|95[0-3])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\\\d{6}\",[9]],[\"180(?:0\\\\d{3}|2)\\\\d{3}\",[7,10]],[\"190[0-26]\\\\d{6}\",[10]],0,0,0,0,[\"14(?:5(?:1[0458]|[23][458])|71\\\\d)\\\\d{4}\",[9]],[\"13(?:00\\\\d{6}(?:\\\\d{2})?|45[0-4]\\\\d{3})|13\\\\d{4}\",[6,8,10,12]]],\"0011\"],\"CD\":[\"243\",\"00\",\"(?:(?:[189]|5\\\\d)\\\\d|2)\\\\d{7}|[1-68]\\\\d{6}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"88\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"[1-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"5\"],\"0$1\"]],\"0\"],\"CF\":[\"236\",\"00\",\"8776\\\\d{4}|(?:[27]\\\\d|61)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[26-8]\"]]]],\"CG\":[\"242\",\"00\",\"222\\\\d{6}|(?:0\\\\d|80)\\\\d{7}\",[9],[[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[02]\"]]]],\"CH\":[\"41\",\"00\",\"8\\\\d{11}|[2-9]\\\\d{8}\",[9,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8[047]|90\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-79]|81\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"8\"],\"0$1\"]],\"0\"],\"CI\":[\"225\",\"00\",\"[02]\\\\d{9}\",[10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d)(\\\\d{5})\",\"$1 $2 $3 $4\",[\"2\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"0\"]]]],\"CK\":[\"682\",\"00\",\"[2-578]\\\\d{4}\",[5],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"[2-578]\"]]]],\"CL\":[\"56\",\"(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0\",\"12300\\\\d{6}|6\\\\d{9,10}|[2-9]\\\\d{8}\",[9,10,11],[[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"219\",\"2196\"],\"($1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"60|809\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"44\"]],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2[1-36]\"],\"($1)\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"9(?:10|[2-9])\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])\"],\"($1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"60|8\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"60\"]]]],\"CM\":[\"237\",\"00\",\"[26]\\\\d{8}|88\\\\d{6,7}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"88\"]],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[26]|88\"]]]],\"CN\":[\"86\",\"00|1(?:[12]\\\\d|79)\\\\d\\\\d00\",\"(?:(?:1[03-689]|2\\\\d)\\\\d\\\\d|6)\\\\d{8}|1\\\\d{10}|[126]\\\\d{6}(?:\\\\d(?:\\\\d{2})?)?|86\\\\d{5,6}|(?:[3-579]\\\\d|8[0-57-9])\\\\d{5,9}\",[7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{5,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-36-9]|95[0-3])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\\\d{6}\",[9]],[\"180(?:0\\\\d{3}|2)\\\\d{3}\",[7,10]],[\"190[0-26]\\\\d{6}\",[10]],0,0,0,0,[\"14(?:5(?:1[0458]|[23][458])|71\\\\d)\\\\d{4}\",[9]],[\"13(?:00\\\\d{6}(?:\\\\d{2})?|45[0-4]\\\\d{3})|13\\\\d{4}\",[6,8,10,12]]],\"0011\"],\"CY\":[\"357\",\"00\",\"(?:[279]\\\\d|[58]0)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[257-9]\"]]]],\"CZ\":[\"420\",\"00\",\"(?:[2-578]\\\\d|60)\\\\d{7}|9\\\\d{8,11}\",[9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-8]|9[015-7]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"96\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]]]],\"DE\":[\"49\",\"00\",\"[2579]\\\\d{5,14}|49(?:[34]0|69|8\\\\d)\\\\d\\\\d?|49(?:37|49|60|7[089]|9\\\\d)\\\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\\\d{1,8}|(?:1|[368]\\\\d|4[0-8])\\\\d{3,13}|49(?:[015]\\\\d|2[13]|31|[46][1-8])\\\\d{1,9}\",[4,5,6,7,8,9,10,11,12,13,14,15],[[\"(\\\\d{2})(\\\\d{3,13})\",\"$1 $2\",[\"3[02]|40|[68]9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,12})\",\"$1 $2\",[\"2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1\",\"2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2,11})\",\"$1 $2\",[\"[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]\",\"[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"138\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{2,10})\",\"$1 $2\",[\"3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,11})\",\"$1 $2\",[\"181\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{4,10})\",\"$1 $2 $3\",[\"1(?:3|80)|9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7,8})\",\"$1 $2\",[\"1[67]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7,12})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{6})\",\"$1 $2\",[\"185\",\"1850\",\"18500\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{7})\",\"$1 $2\",[\"18[68]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{7})\",\"$1 $2\",[\"15[1279]\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{6})\",\"$1 $2\",[\"15[03568]\",\"15(?:[0568]|3[13])\"],\"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,0,[[\"528[89]\\\\d{5}\"],[\"(?:6(?:[0-79]\\\\d|8[0-247-9])|7(?:[016-8]\\\\d|2[0-8]|5[0-5]))\\\\d{6}\"],[\"80[0-7]\\\\d{6}\"],[\"89\\\\d{7}\"],0,0,0,0,[\"(?:592(?:4[0-2]|93)|80[89]\\\\d\\\\d)\\\\d{4}\"]]],\"ER\":[\"291\",\"00\",\"[178]\\\\d{6}\",[7],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[178]\"],\"0$1\"]],\"0\"],\"ES\":[\"34\",\"00\",\"(?:400|[5-9]\\\\d\\\\d)\\\\d{6}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]00\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[4-9]\"]]]],\"ET\":[\"251\",\"00\",\"(?:11|[2-57-9]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-57-9]\"],\"0$1\"]],\"0\"],\"FI\":[\"358\",\"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))\",\"[1-35689]\\\\d{4}|7\\\\d{10,11}|(?:[124-7]\\\\d|3[0-46-9])\\\\d{8}|[1-9]\\\\d{5,8}\",[5,6,7,8,9,10,11,12],[[\"(\\\\d{5})\",\"$1\",[\"20[2-59]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1 $2\",[\"(?:[1-3]0|[68])0|70[07-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4,8})\",\"$1 $2\",[\"[14]|2[09]|50|7[135]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{6,10})\",\"$1 $2\",[\"7\"],\"0$1\"],[\"(\\\\d)(\\\\d{4,9})\",\"$1 $2\",[\"(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9\"],\"0$1\"]],\"0\",0,0,0,0,\"1[03-79]|[2-9]\",0,\"00\"],\"FJ\":[\"679\",\"0(?:0|52)\",\"45\\\\d{5}|(?:0800\\\\d|[235-9])\\\\d{6}\",[7,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[235-9]|45\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"0\"]]],0,0,0,0,0,0,0,\"00\"],\"FK\":[\"500\",\"00\",\"[2-7]\\\\d{4}\",[5]],\"FM\":[\"691\",\"00\",\"(?:[39]\\\\d\\\\d|820)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[389]\"]]]],\"FO\":[\"298\",\"00\",\"[2-9]\\\\d{5}\",[6],[[\"(\\\\d{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|180020\",0,0,0,[[\"(?:1(?:1(?:3(?:[0-58]\\\\d\\\\d|73[0-5])|4(?:(?:[0-5]\\\\d|70)\\\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\\\d|6(?:[0-4]\\\\d|5[01]))\\\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\\\d)\\\\d|1(?:[0-7]\\\\d|8[0-3]))|(?:3(?:0\\\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\\\d)\\\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\\\d{3})\\\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\\\d)|76\\\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\\\d|7[4-79])|295[5-7]|35[34]\\\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\\\d{3}\",[9,10]],[\"7(?:457[0-57-9]|700[01]|911[028])\\\\d{5}|7(?:[1-3]\\\\d\\\\d|4(?:[0-46-9]\\\\d|5[0-689])|5(?:0[0-8]|[13-9]\\\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\\\d|8[02-9]|9[0-689])|8(?:[014-9]\\\\d|[23][0-8])|9(?:[024-9]\\\\d|1[02-9]|3[0-689]))\\\\d{6}\",[10]],[\"80[08]\\\\d{7}|800\\\\d{6}|8001111\"],[\"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\\\d|8[2-49]))\\\\d{7}|845464\\\\d\",[7,10]],[\"70\\\\d{8}\",[10]],0,[\"(?:3[0347]|55)\\\\d{8}\",[10]],[\"76(?:464|652)\\\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\\\d{6}\",[10]],[\"56\\\\d{8}\",[10]]],0,\" x\"],\"GD\":[\"1\",\"011\",\"(?:473|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"473$1\",0,\"473\"],\"GE\":[\"995\",\"00\",\"(?:[3-57]\\\\d\\\\d|800)\\\\d{6}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"70\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"32\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[57]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[348]\"],\"0$1\"]],\"0\"],\"GF\":[\"594\",\"00\",\"(?:694\\\\d|7093)\\\\d{5}|(?:59|[89]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-7]|80[6-9]|9[47]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[89]\"],\"0$1\"]],\"0\"],\"GG\":[\"44\",\"00\",\"(?:1481|[357-9]\\\\d{3})\\\\d{6}|8\\\\d{6}(?:\\\\d{2})?\",[7,9,10],0,\"0\",0,\"([25-9]\\\\d{5})$|0|180020\",\"1481$1\",0,0,[[\"1481[25-9]\\\\d{5}\",[10]],[\"7(?:(?:781|839)\\\\d|911[17])\\\\d{5}\",[10]],[\"80[08]\\\\d{7}|800\\\\d{6}|8001111\"],[\"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\\\d|8[0-3]))\\\\d{7}|845464\\\\d\",[7,10]],[\"70\\\\d{8}\",[10]],0,[\"(?:3[0347]|55)\\\\d{8}\",[10]],[\"76(?:464|652)\\\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\\\d{6}\",[10]],[\"56\\\\d{8}\",[10]]]],\"GH\":[\"233\",\"00\",\"[235]\\\\d{8}|800\\\\d{5,6}\",[8,9],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2358]\"],\"0$1\"]],\"0\"],\"GI\":[\"350\",\"00\",\"(?:[25]\\\\d|60)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"2\"]]]],\"GL\":[\"299\",\"00\",\"(?:19|[2-689]\\\\d|70)\\\\d{4}\",[6],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"19|[2-9]\"]]]],\"GM\":[\"220\",\"00\",\"[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\",\"7090\\\\d{5}|(?:[56]9|[89]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-79]|80[6-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[[\"(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\\\d)|87\\\\d)|80[6-9]\\\\d\\\\d)\\\\d{4}\"],[\"(?:69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\\\d{4}\"],[\"80[0-5]\\\\d{6}\"],[\"8[129]\\\\d{7}\"],0,0,0,0,[\"9(?:(?:39[5-7]|76[018])\\\\d|475[0-6])\\\\d{4}\"]]],\"GQ\":[\"240\",\"00\",\"222\\\\d{6}|(?:3\\\\d|55|[89]0)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[235]\"]],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[89]\"]]]],\"GR\":[\"30\",\"00\",\"5005000\\\\d{3}|8\\\\d{9,11}|(?:[269]\\\\d|70)\\\\d{8}\",[10,11,12],[[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"21|7\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2689]\"]],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{5})\",\"$1 $2 $3\",[\"8\"]]]],\"GT\":[\"502\",\"00\",\"80\\\\d{6}|(?:1\\\\d{3}|[2-7])\\\\d{7}\",[8,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-8]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]]]],\"GU\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|671|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"671$1\",0,\"671\"],\"GW\":[\"245\",\"00\",\"[49]\\\\d{8}|4\\\\d{6}\",[7,9],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"40\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[49]\"]]]],\"GY\":[\"592\",\"001\",\"(?:[2-8]\\\\d{3}|9008)\\\\d{3}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]]],\"HK\":[\"852\",\"00(?:30|5[09]|[126-9]?)\",\"8[0-46-9]\\\\d{6,7}|9\\\\d{4,7}|(?:[2-7]|9\\\\d{3})\\\\d{7}\",[5,6,7,8,9,11],[[\"(\\\\d{3})(\\\\d{2,5})\",\"$1 $2\",[\"900\",\"9003\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-7]|8[1-4]|9(?:0[1-9]|[1-8])\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]]],0,0,0,0,0,0,0,\"00\"],\"HN\":[\"504\",\"00\",\"8\\\\d{10}|[237-9]\\\\d{7}\",[8,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"[237-9]\"]]]],\"HR\":[\"385\",\"00\",\"[2-69]\\\\d{8}|80\\\\d{5,7}|[1-79]\\\\d{7}|6\\\\d{6}\",[7,8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"6[01]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"6|7[245]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-57]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\"],\"HT\":[\"509\",\"00\",\"[2-589]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-589]\"]]]],\"HU\":[\"36\",\"00\",\"[235-7]\\\\d{8}|[1-9]\\\\d{7}\",[8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"(06 $1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]\"],\"(06 $1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-9]\"],\"06 $1\"]],\"06\"],\"ID\":[\"62\",\"00[89]\",\"00[1-9]\\\\d{9,14}|(?:[1-36]|8\\\\d{5})\\\\d{6}|00\\\\d{9}|[1-9]\\\\d{8,10}|[2-9]\\\\d{7}\",[7,8,9,10,11,12,13,14,15,16,17],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"15\"]],[\"(\\\\d{2})(\\\\d{5,9})\",\"$1 $2\",[\"2[124]|[36]1\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5,7})\",\"$1 $2\",[\"800\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,8})\",\"$1 $2\",[\"[2-79]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{3})\",\"$1-$2-$3\",[\"8[1-35-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6,8})\",\"$1 $2\",[\"1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"804\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"80\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1-$2-$3\",[\"8\"],\"0$1\"]],\"0\"],\"IE\":[\"353\",\"00\",\"(?:1\\\\d|[2569])\\\\d{6,8}|4\\\\d{6,9}|7\\\\d{8}|8\\\\d{8,9}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"2[24-9]|47|58|6[237-9]|9[35-9]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[45]0\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2569]|4[1-69]|7[14]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"70\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"81\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"4\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"IL\":[\"972\",\"0(?:0|1[2-9])\",\"1\\\\d{6}(?:\\\\d{3,5})?|[57]\\\\d{8}|[1-489]\\\\d{7}\",[7,8,9,10,11,12],[[\"(\\\\d{4})(\\\\d{3})\",\"$1-$2\",[\"125\"]],[\"(\\\\d{4})(\\\\d{2})(\\\\d{2})\",\"$1-$2-$3\",[\"121\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[2-489]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[57]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3\",[\"12\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1-$2\",[\"159\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3-$4\",[\"1[7-9]\"]],[\"(\\\\d{3})(\\\\d{1,2})(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3-$4\",[\"15\"]]],\"0\"],\"IM\":[\"44\",\"00\",\"1624\\\\d{6}|(?:[3578]\\\\d|90)\\\\d{8}\",[10],0,\"0\",0,\"([25-8]\\\\d{5})$|0|180020\",\"1624$1\",0,\"74576|(?:16|7[56])24\"],\"IN\":[\"91\",\"00\",\"(?:000800|[2-9]\\\\d\\\\d)\\\\d{7}|1\\\\d{7,12}\",[8,9,10,11,12,13],[[\"(\\\\d{8})\",\"$1\",[\"5(?:0|2[23]|3[03]|[67]1|88)\",\"5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)\",\"5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)\"],0,1],[\"(\\\\d{4})(\\\\d{4,5})\",\"$1 $2\",[\"180\",\"1800\"],0,1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"140\"],0,1],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"11|2[02]|33|4[04]|79[1-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]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]\",\"1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]\",\"1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807\",\"1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]\",\"1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\\\d|7(?:[23569]\\\\d|8[0-57-9])|8(?:[14-6]\\\\d|2[0-79]))|7(?:1(?:[013-8]\\\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\\\d|5[0-367])|70[13-7]))[2-7]\"],\"0$1\",1],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"16|[6-9]\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{2,4})(\\\\d{4})\",\"$1 $2 $3\",[\"18[06]\",\"18[06]0\"],0,1],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"18\"],0,1]],\"0\"],\"IO\":[\"246\",\"00\",\"3\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"3\"]]]],\"IQ\":[\"964\",\"00\",\"(?:1|7\\\\d\\\\d)\\\\d{7}|[2-6]\\\\d{7,8}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-6]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\"],\"IR\":[\"98\",\"00\",\"[1-9]\\\\d{9}|(?:[1-8]\\\\d\\\\d|9)\\\\d{3,4}\",[4,5,6,7,10],[[\"(\\\\d{4,5})\",\"$1\",[\"96\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4,5})\",\"$1 $2\",[\"(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-8]\"],\"0$1\"]],\"0\"],\"IS\":[\"354\",\"00|1(?:0(?:01|[12]0)|100)\",\"(?:38\\\\d|[4-9])\\\\d{6}\",[7,9],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[4-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"3\"]]],0,0,0,0,0,0,0,\"00\"],\"IT\":[\"39\",\"00\",\"0\\\\d{5,11}|1\\\\d{8,10}|3(?:[0-8]\\\\d{7,10}|9\\\\d{7,8})|(?:43|55|70)\\\\d{8}|8\\\\d{5}(?:\\\\d{2,4})?\",[6,7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1 $2\",[\"0[26]\"]],[\"(\\\\d{3})(\\\\d{3,6})\",\"$1 $2\",[\"0[13-57-9][0159]|8(?:03|4[17]|9[2-5])\",\"0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))\"]],[\"(\\\\d{4})(\\\\d{2,6})\",\"$1 $2\",[\"0(?:[13-579][2-46-8]|8[236-8])\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"894\"]],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"0[26]|5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"1(?:44|[679])|[378]|43\"]],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"0[13-57-9][0159]|14\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{5})\",\"$1 $2 $3\",[\"0[26]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"[03]\"]]],0,0,0,0,0,0,[[\"0(?:669[0-79]\\\\d{1,6}|831\\\\d{2,8})|0(?:1(?:[0159]\\\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\\\d\\\\d|3(?:[0159]\\\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\\\d|6[0-8])|7(?:[0159]\\\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\\\d{2,7}\"],[\"3[2-9]\\\\d{7,8}|(?:31|43)\\\\d{8}\",[9,10]],[\"80(?:0\\\\d{3}|3)\\\\d{3}\",[6,9]],[\"(?:0878\\\\d{3}|89(?:2\\\\d|3[04]|4(?:[0-4]|[5-9]\\\\d\\\\d)|5[0-4]))\\\\d\\\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\\\d{6}\",[6,8,9,10]],[\"1(?:78\\\\d|99)\\\\d{6}\",[9,10]],[\"3[2-8]\\\\d{9,10}\",[11,12]],0,0,[\"55\\\\d{8}\",[10]],[\"84(?:[08]\\\\d{3}|[17])\\\\d{3}\",[6,9]]]],\"JE\":[\"44\",\"00\",\"1534\\\\d{6}|(?:[3578]\\\\d|90)\\\\d{8}\",[10],0,\"0\",0,\"([0-24-8]\\\\d{5})$|0|180020\",\"1534$1\",0,0,[[\"1534[0-24-8]\\\\d{5}\"],[\"7(?:(?:(?:50|82)9|937)\\\\d|7(?:00[378]|97\\\\d))\\\\d{5}\"],[\"80(?:07(?:35|81)|8901)\\\\d{4}\"],[\"(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\\\d{4}\"],[\"701511\\\\d{4}\"],0,[\"(?:3(?:0(?:07(?:35|81)|8901)|3\\\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\\\d{4})\\\\d{4}\"],[\"76(?:464|652)\\\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\\\d{6}\"],[\"56\\\\d{8}\"]]],\"JM\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|658|900)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"658|876\"],\"JO\":[\"962\",\"00\",\"(?:(?:[2689]|7\\\\d)\\\\d|32|427|53)\\\\d{6}\",[8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2356]|87\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"70\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[47]\"],\"0$1\"]],\"0\"],\"JP\":[\"81\",\"010\",\"00[1-9]\\\\d{6,14}|[25-9]\\\\d{9}|(?:00|[1-9]\\\\d\\\\d)\\\\d{6}\",[8,9,10,11,12,13,14,15,16,17],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3\",[\"(?:12|57|99)0\"],\"0$1\"],[\"(\\\\d{4})(\\\\d)(\\\\d{4})\",\"$1-$2-$3\",[\"1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])\",\"1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]\",\"1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"60\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"3|4(?:2[09]|7[01])|6[1-9]\",\"3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])\",\"1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]\",\"1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1-$2-$3\",[\"[14]|[289][2-9]|5[3-9]|7[2-4679]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"800\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"[25-9]\"],\"0$1\"]],\"0\",0,\"(000[2569]\\\\d{4,6})$|(?:(?:003768)0?)|0\",\"$1\"],\"KE\":[\"254\",\"000\",\"(?:[17]\\\\d\\\\d|900)\\\\d{6}|(?:2|80)0\\\\d{6,7}|[4-6]\\\\d{6,8}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5,7})\",\"$1 $2\",[\"[24-6]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[17]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"]],\"0\"],\"KG\":[\"996\",\"00\",\"8\\\\d{9}|[235-9]\\\\d{8}\",[9,10],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"3(?:1[346]|[24-79])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[235-79]|88\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d)(\\\\d{2,3})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"KH\":[\"855\",\"00[14-9]\",\"1\\\\d{9}|[1-9]\\\\d{7,8}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"KI\":[\"686\",\"00\",\"(?:[37]\\\\d|6[0-79])\\\\d{6}|(?:[2-48]\\\\d|50)\\\\d{3}\",[5,8],0,\"0\"],\"KM\":[\"269\",\"00\",\"[3478]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[3478]\"]]]],\"KN\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"869$1\",0,\"869\"],\"KP\":[\"850\",\"00|99\",\"85\\\\d{6}|(?:19\\\\d|[2-7])\\\\d{7}\",[8,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"]],\"0\"],\"KR\":[\"82\",\"00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))\",\"00[1-9]\\\\d{8,11}|(?:[12]|5\\\\d{3})\\\\d{7}|[13-6]\\\\d{9}|(?:[1-6]\\\\d|80)\\\\d{7}|[3-6]\\\\d{4,5}|(?:00|7)0\\\\d{8}\",[5,6,8,9,10,11,12,13,14],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1-$2\",[\"(?:3[1-3]|[46][1-4]|5[1-5])1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"1\"]],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1-$2-$3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[36]0|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1-$2-$3\",[\"[1346]|5[1-5]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"[57]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})(\\\\d{4})\",\"$1-$2-$3\",[\"5\"],\"0$1\"]],\"0\",0,\"0(8(?:[1-46-8]|5\\\\d\\\\d))?\"],\"KW\":[\"965\",\"00\",\"18\\\\d{5}|(?:[2569]\\\\d|41)\\\\d{6}\",[7,8],[[\"(\\\\d{4})(\\\\d{3,4})\",\"$1 $2\",[\"[169]|2(?:[235]|4[1-35-9])|52\"]],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[245]\"]]]],\"KY\":[\"1\",\"011\",\"(?:345|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"345$1\",0,\"345\"],\"KZ\":[\"7\",\"810\",\"8\\\\d{13}|[78]\\\\d{9}\",[10,14],0,\"8\",0,0,0,0,\"7\",0,\"8~10\"],\"LA\":[\"856\",\"00\",\"[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\",[\"20\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,5})\",\"$1 $2 $3 $4\",[\"[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"80[01]|90[015]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"20\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,2})\",\"$1 $2 $3 $4 $5\",[\"20\"]]],0,0,\"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\\\d)\"],\"LV\":[\"371\",\"00\",\"(?:[268]\\\\d|78|90)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2679]|8[01]\"]]]],\"LY\":[\"218\",\"00\",\"[2-9]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{7})\",\"$1-$2\",[\"[2-9]\"],\"0$1\"]],\"0\"],\"MA\":[\"212\",\"00\",\"[5-8]\\\\d{8}\",[9],[[\"(\\\\d{4})(\\\\d{5})\",\"$1-$2\",[\"892\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1-$2\",[\"8(?:0[0-7]|9)\"],\"0$1\"],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[5-8]\"],\"0$1\"]],\"0\",0,0,0,0,\"[5-8]\"],\"MC\":[\"377\",\"00\",\"(?:[3489]|[67]\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"4\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[389]\"]],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[67]\"],\"0$1\"]],\"0\"],\"MD\":[\"373\",\"00\",\"(?:[235-7]\\\\d|[89]0)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"22|3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"[25-7]\"],\"0$1\"]],\"0\"],\"ME\":[\"382\",\"00\",\"(?:20|[3-79]\\\\d)\\\\d{6}|80\\\\d{6,7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-9]\"],\"0$1\"]],\"0\"],\"MF\":[\"590\",\"00\",\"7090\\\\d{5}|(?:[56]9|[89]\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[[\"(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\\\d)|80[6-9]\\\\d\\\\d)\\\\d{4}\"],[\"(?:69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\\\d{4}\"],[\"80[0-5]\\\\d{6}\"],[\"8[129]\\\\d{7}\"],0,0,0,0,[\"9(?:(?:39[5-7]|76[018])\\\\d|475[0-6])\\\\d{4}\"]]],\"MG\":[\"261\",\"00\",\"[23]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[23]\"],\"0$1\"]],\"0\",0,\"([24-9]\\\\d{6})$|0\",\"20$1\"],\"MH\":[\"692\",\"011\",\"329\\\\d{4}|(?:[256]\\\\d|45)\\\\d{5}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[2-6]\"]]],\"1\"],\"MK\":[\"389\",\"00\",\"[2-578]\\\\d{7}\",[8],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2|34[47]|4(?:[37]7|5[47]|64)\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[347]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[58]\"],\"0$1\"]],\"0\"],\"ML\":[\"223\",\"00\",\"[24-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24-9]\"]]]],\"MM\":[\"95\",\"00\",\"1\\\\d{5,7}|95\\\\d{6}|(?:[4-7]|9[0-46-9])\\\\d{6,8}|(?:2|8\\\\d)\\\\d{5,8}\",[6,7,8,9,10],[[\"(\\\\d)(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"16|2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[12]|452|678|86\",\"[12]|452|6788|86\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[4-7]|8[1-35]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4,6})\",\"$1 $2 $3\",[\"9(?:2[0-4]|[35-9]|4[137-9])\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"92\"],\"0$1\"],[\"(\\\\d)(\\\\d{5})(\\\\d{4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\"],\"MN\":[\"976\",\"001\",\"[12]\\\\d{7,9}|[5-9]\\\\d{7}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"11|2[16]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[5-9]\"]],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"[12]2[1-3]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5,6})\",\"$1 $2\",[\"[12](?:27|3[2-8]|4[2-68]|5[1-4689])\",\"[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{4,5})\",\"$1 $2\",[\"[12]\"],\"0$1\"]],\"0\"],\"MO\":[\"853\",\"00\",\"0800\\\\d{3}|(?:28|[68]\\\\d)\\\\d{6}\",[7,8],[[\"(\\\\d{4})(\\\\d{3})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[268]\"]]]],\"MP\":[\"1\",\"011\",\"[58]\\\\d{9}|(?:67|90)0\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"670$1\",0,\"670\"],\"MQ\":[\"596\",\"00\",\"7091\\\\d{5}|(?:[56]9|[89]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-79]|8(?:0[6-9]|[36])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"MR\":[\"222\",\"00\",\"(?:[2-4]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-48]\"]]]],\"MS\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|664|900)\\\\d{7}\",[10],0,\"1\",0,\"([34]\\\\d{6})$|1\",\"664$1\",0,\"664\"],\"MT\":[\"356\",\"00\",\"3550\\\\d{4}|(?:[2579]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2357-9]\"]]]],\"MU\":[\"230\",\"0(?:0|[24-7]0|3[03])\",\"(?:[57]|8\\\\d\\\\d)\\\\d{7}|[2-468]\\\\d{6}\",[7,8,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-46]|8[013]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[57]\"]],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"8\"]]],0,0,0,0,0,0,0,\"020\"],\"MV\":[\"960\",\"0(?:0|19)\",\"(?:800|9[0-57-9]\\\\d)\\\\d{7}|[34679]\\\\d{6}\",[7,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[34679]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"]]],0,0,0,0,0,0,0,\"00\"],\"MW\":[\"265\",\"00\",\"(?:[1289]\\\\d|31|77)\\\\d{7}|1\\\\d{6}\",[7,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1[2-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[1-37-9]\"],\"0$1\"]],\"0\"],\"MX\":[\"52\",\"0[09]\",\"[2-9]\\\\d{9}\",[10],[[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"33|5[56]|81\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-9]\"]]],0,0,0,0,0,0,0,\"00\"],\"MY\":[\"60\",\"00\",\"1\\\\d{8,9}|(?:3\\\\d|[4-9])\\\\d{7}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3\",[\"[4-79]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1-$2 $3\",[\"1(?:[02469]|[378][1-9]|53)|8\",\"1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1-$2 $3\",[\"3\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1-$2-$3-$4\",[\"1(?:[367]|80)\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3\",[\"15\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2 $3\",[\"1\"],\"0$1\"]],\"0\"],\"MZ\":[\"258\",\"00\",\"(?:2|8\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2|8[2-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]]]],\"NA\":[\"264\",\"00\",\"[68]\\\\d{7,8}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"88\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"6\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"87\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\"],\"NC\":[\"687\",\"00\",\"(?:050|[2-57-9]\\\\d\\\\d)\\\\d{3}\",[6],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1.$2.$3\",[\"[02-57-9]\"]]]],\"NE\":[\"227\",\"00\",\"[027-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"08\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[089]|2[013]|7[0467]\"]]]],\"NF\":[\"672\",\"00\",\"[13]\\\\d{5}\",[6],[[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"1[0-3]\"]],[\"(\\\\d)(\\\\d{5})\",\"$1 $2\",[\"[13]\"]]],0,0,\"([0-258]\\\\d{4})$\",\"3$1\"],\"NG\":[\"234\",\"009\",\"(?:20|9\\\\d)\\\\d{8}|[78]\\\\d{9,13}\",[10,11,12,13,14],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[7-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"20[129]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})(\\\\d{5,6})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"]],\"0\"],\"NI\":[\"505\",\"00\",\"(?:1800|[25-8]\\\\d{3})\\\\d{4}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[125-8]\"]]]],\"NL\":[\"31\",\"00\",\"(?:[124-7]\\\\d\\\\d|3(?:[02-9]\\\\d|1[0-8]))\\\\d{6}|8\\\\d{6,9}|9\\\\d{6,10}|1\\\\d{4,5}\",[5,6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{4,7})\",\"$1 $2\",[\"[89]0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"66\"],\"0$1\"],[\"(\\\\d)(\\\\d{8})\",\"$1 $2\",[\"6\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1[16-8]|2[259]|3[124]|4[17-9]|5[124679]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-578]|91\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\"],\"NO\":[\"47\",\"00\",\"(?:0|[2-9]\\\\d{3})\\\\d{4}\",[5,8],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"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\",[\"30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1\",\"30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"64\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[2-8]|[2-7]|8[1-79]|9[145]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"8\"]]]],\"PM\":[\"508\",\"00\",\"[78]\\\\d{8}|[2-9]\\\\d{5}\",[6,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[2-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"7\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"PR\":[\"1\",\"011\",\"(?:[589]\\\\d\\\\d|787)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"787|939\"],\"PS\":[\"970\",\"00\",\"[2489]2\\\\d{6}|(?:1\\\\d|5)\\\\d{8}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2489]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"PT\":[\"351\",\"00\",\"1693\\\\d{5}|(?:[26-9]\\\\d|30)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2[12]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"16|[236-9]\"]]]],\"PW\":[\"680\",\"01[12]\",\"(?:[24-8]\\\\d\\\\d|345|900)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]]],\"PY\":[\"595\",\"00\",\"[36-8]\\\\d{5,8}|4\\\\d{6,8}|59\\\\d{6}|9\\\\d{5,10}|(?:2\\\\d|5[0-8])\\\\d{6,7}\",[6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{3,6})\",\"$1 $2\",[\"[2-9]0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"3[289]|4[246-8]|61|7[1-3]|8[1-36]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{4,5})\",\"$1 $2\",[\"2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"87\"]],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"9(?:[5-79]|8[1-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,[[\"2631[0-6]\\\\d{4}|26(?:2\\\\d|30|88)\\\\d{5}\"],[\"(?:69(?:2\\\\d\\\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\\\d{4}\"],[\"80\\\\d{7}\"],[\"89[1-37-9]\\\\d{6}\"],0,0,0,0,[\"9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\\\d{4}\"],[\"8(?:1[019]|2[0156]|84|90)\\\\d{6}\"]]],\"RO\":[\"40\",\"00\",\"(?:[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,\"[3489]\",0,\"8~10\"],\"RW\":[\"250\",\"00\",\"(?:06|[27]\\\\d\\\\d|[89]00)\\\\d{6}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"0\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[7-9]\"],\"0$1\"]],\"0\"],\"SA\":[\"966\",\"00\",\"(?:[15]\\\\d|800|92)\\\\d{7}\",[9,10],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"9\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]],\"0\"],\"SB\":[\"677\",\"0[01]\",\"[6-9]\\\\d{6}|[1-6]\\\\d{4}\",[5,7],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"6[89]|7|8[4-9]|9(?:[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[013]|51|6\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[1-57]\"],\"(0$1)\"]],\"0\",0,0,0,0,0,0,\"00\"],\"SJ\":[\"47\",\"00\",\"0\\\\d{4}|(?:[489]\\\\d|79)\\\\d{6}\",[5,8],0,0,0,0,0,0,\"79\"],\"SK\":[\"421\",\"00\",\"[2-689]\\\\d{8}|[2-59]\\\\d{6}|[2-5]\\\\d{5}\",[6,7,9],[[\"(\\\\d)(\\\\d{2})(\\\\d{3,4})\",\"$1 $2 $3\",[\"21\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"[3-5][1-8]1\",\"[3-5][1-8]1[67]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[689]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[3-5]\"],\"0$1\"]],\"0\"],\"SL\":[\"232\",\"00\",\"(?:[237-9]\\\\d|66)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[236-9]\"],\"(0$1)\"]],\"0\"],\"SM\":[\"378\",\"00\",\"(?:0549|[5-7]\\\\d)\\\\d{6}\",[8,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-7]\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"0\"]]],0,0,\"([89]\\\\d{5})$\",\"0549$1\"],\"SN\":[\"221\",\"00\",\"(?:[378]\\\\d|93)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[379]\"]]]],\"SO\":[\"252\",\"00\",\"[346-9]\\\\d{8}|[12679]\\\\d{7}|[1-5]\\\\d{6}|[1348]\\\\d{5}\",[6,7,8,9],[[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"8[125]\"]],[\"(\\\\d{6})\",\"$1\",[\"[134]\"]],[\"(\\\\d)(\\\\d{6})\",\"$1 $2\",[\"[15]|2[0-79]|3[0-46-8]|4[0-7]\"]],[\"(\\\\d{2})(\\\\d{5,7})\",\"$1 $2\",[\"1|28|9[2-9]\"]],[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"[267]|904\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[346-9]\"]]],\"0\"],\"SR\":[\"597\",\"00\",\"(?:[2-5]|[6-9]\\\\d)\\\\d{5}\",[6,7],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1-$2-$3\",[\"56\"]],[\"(\\\\d{3})(\\\\d{3})\",\"$1-$2\",[\"[2-5]\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[6-9]\"]]]],\"SS\":[\"211\",\"00\",\"[19]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[19]\"],\"0$1\"]],\"0\"],\"ST\":[\"239\",\"00\",\"(?:22|9\\\\d)\\\\d{5}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[29]\"]]]],\"SV\":[\"503\",\"00\",\"[25-7]\\\\d{7}|(?:80\\\\d|900)\\\\d{4}(?:\\\\d{4})?\",[7,8,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[89]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[25-7]\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"]]]],\"SX\":[\"1\",\"011\",\"7215\\\\d{6}|(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"(5\\\\d{6})$|1\",\"721$1\",0,\"721\"],\"SY\":[\"963\",\"00\",\"[1-359]\\\\d{8}|[1-5]\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-4]|5[1-3]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[59]\"],\"0$1\",1]],\"0\"],\"SZ\":[\"268\",\"00\",\"0800\\\\d{4}|(?:[237]\\\\d|900)\\\\d{6}\",[8,9],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[0237]\"]],[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"9\"]]]],\"TA\":[\"290\",\"00\",\"8\\\\d{3}\",[4],0,0,0,0,0,0,\"8\"],\"TC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|649|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-479]\\\\d{6})$|1\",\"649$1\",0,\"649\"],\"TD\":[\"235\",\"00|16\",\"(?:22|[3689]\\\\d|77)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[236-9]\"]]],0,0,0,0,0,0,0,\"00\"],\"TG\":[\"228\",\"00\",\"[279]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[279]\"]]]],\"TH\":[\"66\",\"00[1-9]\",\"(?:001800|[2-57]|[689]\\\\d)\\\\d{7}|1\\\\d{7,9}\",[8,9,10,13],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[13-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"TJ\":[\"992\",\"810\",\"(?:[0-57-9]\\\\d|66)\\\\d{7}\",[9],[[\"(\\\\d{6})(\\\\d)(\\\\d{2})\",\"$1 $2 $3\",[\"331\",\"3317\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"44[02-479]|[34]7\"]],[\"(\\\\d{4})(\\\\d)(\\\\d{4})\",\"$1 $2 $3\",[\"3(?:[1245]|3[12])\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"\\\\d\"]]],0,0,0,0,0,0,0,\"8~10\"],\"TK\":[\"690\",\"00\",\"[2-47]\\\\d{3,6}\",[4,5,6,7]],\"TL\":[\"670\",\"00\",\"7\\\\d{7}|(?:[2-47]\\\\d|[89]0)\\\\d{5}\",[7,8],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-489]|70\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"7\"]]]],\"TM\":[\"993\",\"810\",\"[1-7]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"12\"],\"(8 $1)\"],[\"(\\\\d{3})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"[1-5]\"],\"(8 $1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[67]\"],\"8 $1\"]],\"8\",0,0,0,0,0,0,\"8~10\"],\"TN\":[\"216\",\"00\",\"[2-57-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-57-9]\"]]]],\"TO\":[\"676\",\"00\",\"(?:0800|(?:[5-8]\\\\d\\\\d|999)\\\\d)\\\\d{3}|[2-8]\\\\d{4}\",[5,7],[[\"(\\\\d{2})(\\\\d{3})\",\"$1-$2\",[\"[2-4]|50|6[09]|7[0-24-69]|8[05]\"]],[\"(\\\\d{4})(\\\\d{3})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[5-9]\"]]]],\"TR\":[\"90\",\"00\",\"4\\\\d{6}|8\\\\d{11,12}|(?:[2-58]\\\\d\\\\d|900)\\\\d{7}\",[7,10,12,13],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"512|8[01589]|90\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"5[0-79]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24][1-8]|3[1-9]\"],\"(0$1)\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{6,7})\",\"$1 $2 $3\",[\"80\"],\"0$1\",1]],\"0\"],\"TT\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-46-8]\\\\d{6})$|1\",\"868$1\",0,\"868\"],\"TV\":[\"688\",\"00\",\"(?:2|7\\\\d\\\\d|90)\\\\d{4}\",[5,6,7],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"2\"]],[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"90\"]],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"7\"]]]],\"TW\":[\"886\",\"0(?:0[25-79]|19)\",\"[2-689]\\\\d{8}|7\\\\d{9,10}|[2-8]\\\\d{7}|2\\\\d{6}\",[7,8,9,10,11],[[\"(\\\\d{2})(\\\\d)(\\\\d{4})\",\"$1 $2 $3\",[\"202\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"826\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"83\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"82\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[25]0|37|49|8[09]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"[23568]|4(?:0[02-48]|[1-478])|7[1-9]\",\"[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[49]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\",0,0,0,0,0,0,0,\"#\"],\"TZ\":[\"255\",\"00[056]\",\"(?:[25-8]\\\\d|41|90)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[24]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[67]\"],\"0$1\"]],\"0\"],\"UA\":[\"380\",\"00\",\"[89]\\\\d{9}|[3-9]\\\\d{8}\",[9,10],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]\",\"6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])\",\"3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[3-7]|89|9[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"]],\"0\",0,0,0,0,0,0,\"0~0\"],\"UG\":[\"256\",\"00[057]\",\"800\\\\d{6}|(?:[29]0|[347]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"202\",\"2024\"],\"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,[[\"(?:472[2-47-9]|983[2-57-9])\\\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\\\d{6}\"],[\"\"],[\"8(?:00|33|44|55|66|77|88)[2-9]\\\\d{6}\"],[\"900[2-9]\\\\d{6}\"],[\"52(?:3(?:[2-46-9][02-9]\\\\d|5(?:[02-46-9]\\\\d|5[0-46-9]))|4(?:[2-478][02-9]\\\\d|5(?:[034]\\\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\\\d)|9(?:[05-9]\\\\d|2[0-5]|49)))\\\\d{4}|52[34][2-9]1[02-9]\\\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\\\d{6}\"]]],\"UY\":[\"598\",\"0(?:0|1[3-9]\\\\d)\",\"0004\\\\d{2,9}|[1249]\\\\d{7}|2\\\\d{3,4}|(?:[49]\\\\d|80)\\\\d{5}\",[4,5,6,7,8,9,10,11,12,13],[[\"(\\\\d{4,5})\",\"$1\",[\"21\"]],[\"(\\\\d{3})(\\\\d{3,4})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[49]0|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[124]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3 $4\",[\"0\"]]],\"0\",0,0,0,0,0,0,\"00\",\" int. \"],\"UZ\":[\"998\",\"00\",\"(?:20|33|[5-9]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[235-9]\"]]]],\"VA\":[\"39\",\"00\",\"0\\\\d{5,10}|3[0-8]\\\\d{7,10}|55\\\\d{8}|8\\\\d{5}(?:\\\\d{2,4})?|(?:1\\\\d|39)\\\\d{7,8}\",[6,7,8,9,10,11,12],0,0,0,0,0,0,\"06698\"],\"VC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|784|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"784$1\",0,\"784\"],\"VE\":[\"58\",\"00\",\"[68]00\\\\d{7}|(?:[24]\\\\d|[59]0)\\\\d{8}\",[10],[[\"(\\\\d{3})(\\\\d{7})\",\"$1-$2\",[\"[24-689]\"],\"0$1\"]],\"0\"],\"VG\":[\"1\",\"011\",\"(?:284|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-578]\\\\d{6})$|1\",\"284$1\",0,\"284\"],\"VI\":[\"1\",\"011\",\"[58]\\\\d{9}|(?:34|90)0\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"340$1\",0,\"340\"],\"VN\":[\"84\",\"00\",\"[12]\\\\d{9}|[135-9]\\\\d{8}|[16]\\\\d{6,7}|7\\\\d{6}\",[7,8,9,10],[[\"(\\\\d{4})(\\\\d{4,6})\",\"$1 $2\",[\"1(?:2[02]|[89])\"],0,1],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[26]|6\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[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\",\"(?:639\\\\d|7093)\\\\d{5}|(?:26|80|9\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[[\"26(?:89\\\\d|9(?:0[0-467]|15|5[0-4]|6\\\\d|[78]0))\\\\d{4}\"],[\"(?:639(?:0[0-79]|1[019]|[267]\\\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\\\d{4}\"],[\"80\\\\d{7}\"],0,0,0,0,0,[\"9(?:(?:39|47)8[01]|769\\\\d)\\\\d{4}\"]]],\"ZA\":[\"27\",\"00\",\"[1-79]\\\\d{8}|8\\\\d{4,9}\",[5,6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1 $2\",[\"8[1-4]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"8[1-4]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"860\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\"],\"ZM\":[\"260\",\"00\",\"800\\\\d{6}|(?:21|[579]\\\\d|63)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[28]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"[579]\"],\"0$1\"]],\"0\"],\"ZW\":[\"263\",\"00\",\"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|5[12]\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"34\"]],[\"(\\\\d{2})(\\\\d{4,5})(\\\\d{5})\",\"$1 $2 $3\",[\"[1-35]\"]]],0,0,0,0,0,0,[0,[\"342\\\\d{4}|(?:337|49)\\\\d{6}|(?:3(?:2|47|7\\\\d{3})|5(?:0\\\\d{3}|2[0-2]))\\\\d{7}\",[7,8,9,10,12]],0,0,0,[\"348[57]\\\\d{7}\",[11]],0,0,[\"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\\\d{4}|6\\\\d{5,10})|(?:345\\\\d|9[89])\\\\d{6}|(?:10|2(?:3|85\\\\d)|3(?:[15]|[69]\\\\d\\\\d)|4[15-8]|51)\\\\d{8}\"]]],\"883\":[\"883\",0,\"(?:[1-4]\\\\d|51)\\\\d{6,10}\",[8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,8})\",\"$1 $2 $3\",[\"[14]|2[24-689]|3[02-689]|51[24-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"510\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"21\"]],[\"(\\\\d{4})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"51[13]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"[235]\"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,[\"(?:2(?:00\\\\d\\\\d|10)|(?:370[1-9]|51\\\\d0)\\\\d)\\\\d{7}|51(?:00\\\\d{5}|[24-9]0\\\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\\\d{5,9}\"]]],\"888\":[\"888\",0,\"\\\\d{11}\",[11],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\"]],0,0,0,0,0,0,[0,0,0,0,0,0,[\"\\\\d{11}\"]]],\"979\":[\"979\",0,\"[1359]\\\\d{8}\",[9],[[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[1359]\"]]],0,0,0,0,0,0,[0,0,0,[\"[1359]\\\\d{8}\"]]]}}","// Copy-pasted from:\n// https://github.com/substack/semver-compare/blob/master/index.js\n//\n// Inlining this function because some users reported issues with\n// importing from `semver-compare` in a browser with ES6 \"native\" modules.\n//\n// Fixes `semver-compare` not being able to compare versions with alpha/beta/etc \"tags\".\n// https://github.com/catamphetamine/libphonenumber-js/issues/381\nexport default function(a, b) {\n a = a.split('-')\n b = b.split('-')\n var pa = a[0].split('.')\n var pb = b[0].split('.')\n for (var i = 0; i < 3; i++) {\n var na = Number(pa[i])\n var nb = Number(pb[i])\n if (na > nb) return 1\n if (nb > na) return -1\n if (!isNaN(na) && isNaN(nb)) return 1\n if (isNaN(na) && !isNaN(nb)) return -1\n }\n if (a[1] && b[1]) {\n return a[1] > b[1] ? 1 : (a[1] < b[1] ? -1 : 0)\n }\n return !a[1] && b[1] ? 1 : (a[1] && !b[1] ? -1 : 0)\n}","const objectConstructor = {}.constructor;\n\nexport default function isObject(object) {\n return object !== undefined && object !== null && object.constructor === objectConstructor;\n}\n","const CALLING_CODE_REG_EXP = /^\\d+$/\n\nexport default function isCallingCode(string) {\n\treturn CALLING_CODE_REG_EXP.test(string)\n}\n","import compare from './tools/semver-compare.js'\nimport isObject from './helpers/isObject.js'\nimport isCallingCode from './helpers/isCallingCode.js'\n\n// Added \"possibleLengths\" and renamed\n// \"country_phone_code_to_countries\" to \"country_calling_codes\".\nconst V2 = '1.0.18'\n\n// Added \"idd_prefix\" and \"default_idd_prefix\".\nconst V3 = '1.2.0'\n\n// Moved `001` country code to \"nonGeographic\" section of metadata.\nconst V4 = '1.7.35'\n\nconst DEFAULT_EXT_PREFIX = ' ext. '\n\n/**\n * See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md\n */\nexport default class Metadata {\n\t/**\n\t * @param {object} metadata — Metadata JSON.\n\t */\n\tconstructor(metadata) {\n\t\tvalidateMetadata(metadata)\n\t\tthis.metadata = metadata\n\t\tsetVersion.call(this, metadata)\n\t}\n\n\tgetCountries() {\n\t\treturn Object.keys(this.metadata.countries).filter(_ => _ !== '001')\n\t}\n\n\tgetCountryMetadata(countryCode) {\n\t\treturn this.metadata.countries[countryCode]\n\t}\n\n\tnonGeographic() {\n\t\tif (this.v1 || this.v2 || this.v3) return\n\t\t// `nonGeographical` was a typo.\n\t\t// It's present in metadata generated from `1.7.35` to `1.7.37`.\n\t\t// The test case could be found by searching for \"nonGeographical\".\n\t\treturn this.metadata.nonGeographic || this.metadata.nonGeographical\n\t}\n\n\thasCountry(country) {\n\t\treturn this.getCountryMetadata(country) !== undefined\n\t}\n\n\thasCallingCode(callingCode) {\n\t\tif (this.getCountryCodesForCallingCode(callingCode)) {\n\t\t\treturn true\n\t\t}\n\t\tif (this.nonGeographic()) {\n\t\t\tif (this.nonGeographic()[callingCode]) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t} else {\n\t\t\t// A hacky workaround for old custom metadata (generated before V4).\n\t\t\tconst countryCodes = this.countryCallingCodes()[callingCode]\n\t\t\tif (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\n\tisNonGeographicCallingCode(callingCode) {\n\t\tif (this.nonGeographic()) {\n\t\t\treturn this.nonGeographic()[callingCode] ? true : false\n\t\t} else {\n\t\t\treturn this.getCountryCodesForCallingCode(callingCode) ? false : true\n\t\t}\n\t}\n\n\t// Deprecated.\n\tcountry(countryCode) {\n\t\treturn this.selectNumberingPlan(countryCode)\n\t}\n\n\t/**\n\t * Selects a telephone numbering plan based on either a country code or a calling code.\n\t * @param {string} argument — Country code or calling code.\n\t * @param {string} legacyArgumentCallingCode — Legacy argument: calling code, if the first argument is not passed.\n\t */\n\tselectNumberingPlan(argument, legacyArgumentCallingCode) {\n\t\tlet countryCode\n\t\tlet callingCode\n\t\tif (argument) {\n\t\t\tif (isCallingCode(argument)) {\n\t\t\t\tcallingCode = argument\n\t\t\t} else {\n\t\t\t\tcountryCode = argument\n\t\t\t}\n\t\t}\n\t\t// Previously, the signature of this method was: `.selectNumberingPlan(country, callingCode)`.\n\t\t// And if `country` argument wasn't passed, it looked into the second argument `callingCode`.\n\t\t// Now it's preferred to only pass either `country` or `callingCode` as the first argument.\n\t\tif (legacyArgumentCallingCode) {\n\t\t\tcallingCode = legacyArgumentCallingCode\n\t\t}\n\n\t\t// Select a telephone numbering plan.\n\t\tif (countryCode && countryCode !== '001') {\n\t\t\tconst countryMetadata = this.getCountryMetadata(countryCode)\n\t\t\tif (!countryMetadata) {\n\t\t\t\tthrow new Error(`Unknown country: ${countryCode}`)\n\t\t\t}\n\t\t\tthis.numberingPlan = new NumberingPlan(countryMetadata, this)\n\t\t} else if (callingCode) {\n\t\t\tif (!this.hasCallingCode(callingCode)) {\n\t\t\t\tthrow new Error(`Unknown calling code: ${callingCode}`)\n\t\t\t}\n\t\t\tthis.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this)\n\t\t} else {\n\t\t\tthis.numberingPlan = undefined\n\t\t}\n\n\t\treturn this\n\t}\n\n\tgetCountryCodesForCallingCode(callingCode) {\n\t\tconst countryCodes = this.countryCallingCodes()[callingCode]\n\t\tif (countryCodes) {\n\t\t\t// Metadata before V4 included \"non-geographic entity\" calling codes\n\t\t\t// inside `country_calling_codes` (for example, `\"881\":[\"001\"]`).\n\t\t\t// Now the semantics of `country_calling_codes` has changed:\n\t\t\t// it's specifically for \"countries\" now.\n\t\t\t// Older versions of custom metadata will simply skip parsing\n\t\t\t// \"non-geographic entity\" phone numbers with new versions\n\t\t\t// of this library: it's not considered a bug,\n\t\t\t// because such numbers are extremely rare,\n\t\t\t// and developers extremely rarely use custom metadata.\n\t\t\tif (countryCodes.length === 1 && countryCodes[0].length === 3) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn countryCodes\n\t\t}\n\t}\n\n\tgetCountryCodeForCallingCode(callingCode) {\n\t\tconst countryCodes = this.getCountryCodesForCallingCode(callingCode)\n\t\tif (countryCodes) {\n\t\t\treturn countryCodes[0]\n\t\t}\n\t}\n\n\tgetNumberingPlanMetadata(callingCode) {\n\t\t// If a calling code is specified, choose the telephone numbering plan\n\t\t// of the \"default\" country for this calling code.\n\t\t// For example, if calling code `1` is passed,\n\t\t// the telephone numbering plan of `US` will be selected.\n\t\tconst countryCode = this.getCountryCodeForCallingCode(callingCode)\n\t\tif (countryCode) {\n\t\t\treturn this.getCountryMetadata(countryCode)\n\t\t}\n\t\tif (this.nonGeographic()) {\n\t\t\tconst metadata = this.nonGeographic()[callingCode]\n\t\t\tif (metadata) {\n\t\t\t\treturn metadata\n\t\t\t}\n\t\t} else {\n\t\t\t// A hacky workaround for old custom metadata (generated before V4).\n\t\t\t// In that metadata, there was no concept of \"non-geographic\" metadata\n\t\t\t// so metadata for `001` country code was stored along with other countries.\n\t\t\t// The test case can be found by searching for:\n\t\t\t// \"should work around `nonGeographic` metadata not existing\".\n\t\t\tconst countryCodes = this.countryCallingCodes()[callingCode]\n\t\t\tif (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n\t\t\t\treturn this.metadata.countries['001']\n\t\t\t}\n\t\t}\n\t}\n\n\t// Deprecated.\n\tcountryCallingCode() {\n\t\treturn this.numberingPlan.callingCode()\n\t}\n\n\t// Deprecated.\n\tIDDPrefix() {\n\t\treturn this.numberingPlan.IDDPrefix()\n\t}\n\n\t// Deprecated.\n\tdefaultIDDPrefix() {\n\t\treturn this.numberingPlan.defaultIDDPrefix()\n\t}\n\n\t// Deprecated.\n\tnationalNumberPattern() {\n\t\treturn this.numberingPlan.nationalNumberPattern()\n\t}\n\n\t// Deprecated.\n\tpossibleLengths() {\n\t\treturn this.numberingPlan.possibleLengths()\n\t}\n\n\t// Deprecated.\n\tformats() {\n\t\treturn this.numberingPlan.formats()\n\t}\n\n\t// Deprecated.\n\tnationalPrefixForParsing() {\n\t\treturn this.numberingPlan.nationalPrefixForParsing()\n\t}\n\n\t// Deprecated.\n\tnationalPrefixTransformRule() {\n\t\treturn this.numberingPlan.nationalPrefixTransformRule()\n\t}\n\n\t// Deprecated.\n\tleadingDigits() {\n\t\treturn this.numberingPlan.leadingDigits()\n\t}\n\n\t// Deprecated.\n\thasTypes() {\n\t\treturn this.numberingPlan.hasTypes()\n\t}\n\n\t// Deprecated.\n\ttype(type) {\n\t\treturn this.numberingPlan.type(type)\n\t}\n\n\t// Deprecated.\n\text() {\n\t\treturn this.numberingPlan.ext()\n\t}\n\n\tcountryCallingCodes() {\n\t\tif (this.v1) return this.metadata.country_phone_code_to_countries\n\t\treturn this.metadata.country_calling_codes\n\t}\n\n\t// Deprecated.\n\tchooseCountryByCountryCallingCode(callingCode) {\n\t\treturn this.selectNumberingPlan(callingCode)\n\t}\n\n\thasSelectedNumberingPlan() {\n\t\treturn this.numberingPlan !== undefined\n\t}\n}\n\nclass NumberingPlan {\n\tconstructor(metadata, globalMetadataObject) {\n\t\tthis.globalMetadataObject = globalMetadataObject\n\t\tthis.metadata = metadata\n\t\tsetVersion.call(this, globalMetadataObject.metadata)\n\t}\n\n\tcallingCode() {\n\t\treturn this.metadata[0]\n\t}\n\n\t// When multiple countries share the same calling code,\n\t// all phone number formatting rules are included in the metadata\n\t// of the \"default\" country for that calling code.\n\t// Any other countries' metdata doesn't include any formatting rules.\n\t// Google developers said that such storage architecture was chosen for performance reasons.\n\t//\n\t// For example, for NANPA region (\"North American Numbering Plan Administration\",\n\t// which includes USA, Canada, Cayman Islands, Bahamas, etc) all formatting rules\n\t// are contained in the metadata of `US` country.\n\t//\n\t// This is not public API.\n\t//\n\t_getDefaultCountryMetadataForThisCallingCode() {\n\t\treturn this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())\n\t}\n\n\t// Deprecated.\n\tgetDefaultCountryMetadataForRegion() {\n\t\treturn this._getDefaultCountryMetadataForThisCallingCode()\n\t}\n\n\t// Is always present.\n\tIDDPrefix() {\n\t\tif (this.v1 || this.v2) return\n\t\treturn this.metadata[1]\n\t}\n\n\t// Is only present when a country supports multiple IDD prefixes.\n\tdefaultIDDPrefix() {\n\t\tif (this.v1 || this.v2) return\n\t\treturn this.metadata[12]\n\t}\n\n\tnationalNumberPattern() {\n\t\tif (this.v1 || this.v2) return this.metadata[1]\n\t\treturn this.metadata[2]\n\t}\n\n\t// \"possible length\" data is always present in Google's metadata.\n\tpossibleLengths() {\n\t\tif (this.v1) return\n\t\treturn this.metadata[this.v2 ? 2 : 3]\n\t}\n\n\t_getFormats(metadata) {\n\t\treturn metadata[this.v1 ? 2 : this.v2 ? 3 : 4]\n\t}\n\n\t// For countries of the same region (e.g. NANPA)\n\t// formats are all stored in the \"main\" country for that region.\n\t// E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\tformats() {\n\t\tconst formats = this._getFormats(this.metadata) || this._getFormats(this._getDefaultCountryMetadataForThisCallingCode()) || []\n\t\treturn formats.map(_ => new Format(_, this))\n\t}\n\n\tnationalPrefix() {\n\t\treturn this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5]\n\t}\n\n\t_getNationalPrefixFormattingRule(metadata) {\n\t\treturn metadata[this.v1 ? 4 : this.v2 ? 5 : 6]\n\t}\n\n\t// For countries of the same region (e.g. NANPA)\n\t// national prefix formatting rule is stored in the \"main\" country for that region.\n\t// E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\tnationalPrefixFormattingRule() {\n\t\treturn this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())\n\t}\n\n\t_nationalPrefixForParsing() {\n\t\treturn this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7]\n\t}\n\n\tnationalPrefixForParsing() {\n\t\t// If `national_prefix_for_parsing` is not set explicitly,\n\t\t// then infer it from `national_prefix` (if any)\n\t\treturn this._nationalPrefixForParsing() || this.nationalPrefix()\n\t}\n\n\tnationalPrefixTransformRule() {\n\t\treturn this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8]\n\t}\n\n\t_getNationalPrefixIsOptionalWhenFormatting() {\n\t\treturn !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9]\n\t}\n\n\t// For countries of the same region (e.g. NANPA)\n\t// \"national prefix is optional when formatting\" flag is\n\t// stored in the \"main\" country for that region.\n\t// E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\tnationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n\t\treturn this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) ||\n\t\t\tthis._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())\n\t}\n\n\tleadingDigits() {\n\t\treturn this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10]\n\t}\n\n\ttypes() {\n\t\treturn this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11]\n\t}\n\n\thasTypes() {\n\t\t// Versions 1.2.0 - 1.2.4: can be `[]`.\n\t\t/* istanbul ignore next */\n\t\tif (this.types() && this.types().length === 0) {\n\t\t\treturn false\n\t\t}\n\t\t// Versions <= 1.2.4: can be `undefined`.\n\t\t// Version >= 1.2.5: can be `0`.\n\t\treturn !!this.types()\n\t}\n\n\ttype(type) {\n\t\tif (this.hasTypes() && getType(this.types(), type)) {\n\t\t\treturn new Type(getType(this.types(), type), this)\n\t\t}\n\t}\n\n\text() {\n\t\tif (this.v1 || this.v2) return DEFAULT_EXT_PREFIX\n\t\treturn this.metadata[13] || DEFAULT_EXT_PREFIX\n\t}\n}\n\nclass Format {\n\tconstructor(format, metadata) {\n\t\tthis._format = format\n\t\tthis.metadata = metadata\n\t}\n\n\tpattern() {\n\t\treturn this._format[0]\n\t}\n\n\tformat() {\n\t\treturn this._format[1]\n\t}\n\n\tleadingDigitsPatterns() {\n\t\treturn this._format[2] || []\n\t}\n\n\tnationalPrefixFormattingRule() {\n\t\treturn this._format[3] || this.metadata.nationalPrefixFormattingRule()\n\t}\n\n\tnationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n\t\treturn !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()\n\t}\n\n\tnationalPrefixIsMandatoryWhenFormattingInNationalFormat() {\n\t\t// National prefix is omitted if there's no national prefix formatting rule\n\t\t// set for this country, or when the national prefix formatting rule\n\t\t// contains no national prefix itself, or when this rule is set but\n\t\t// national prefix is optional for this phone number format\n\t\t// (and it is not enforced explicitly)\n\t\treturn this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()\n\t}\n\n\t// Checks whether national prefix formatting rule contains national prefix.\n\tusesNationalPrefix() {\n\t\treturn this.nationalPrefixFormattingRule() &&\n\t\t\t// Check that national prefix formatting rule is not a \"dummy\" one.\n\t\t\t!FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule())\n\t\t\t// In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`\n\t\t\t// when `national_prefix_formatting_rule` is not present.\n\t\t\t// So, `true` or `false` are returned explicitly here, so that\n\t\t\t// `0` number isn't returned.\n\t\t\t? true\n\t\t\t: false\n\t}\n\n\tinternationalFormat() {\n\t\treturn this._format[5] || this.format()\n\t}\n}\n\n/**\n * A pattern that is used to determine if the national prefix formatting rule\n * has the first group only, i.e., does not start with the national prefix.\n * Note that the pattern explicitly allows for unbalanced parentheses.\n */\nconst FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\\(?\\$1\\)?$/\n\nclass Type {\n\tconstructor(type, metadata) {\n\t\tthis.type = type\n\t\tthis.metadata = metadata\n\t}\n\n\tpattern() {\n\t\tif (this.metadata.v1) return this.type\n\t\treturn this.type[0]\n\t}\n\n\tpossibleLengths() {\n\t\tif (this.metadata.v1) return\n\t\treturn this.type[1] || this.metadata.possibleLengths()\n\t}\n}\n\nfunction getType(types, type) {\n\tswitch (type) {\n\t\tcase 'FIXED_LINE':\n\t\t\treturn types[0]\n\t\tcase 'MOBILE':\n\t\t\treturn types[1]\n\t\tcase 'TOLL_FREE':\n\t\t\treturn types[2]\n\t\tcase 'PREMIUM_RATE':\n\t\t\treturn types[3]\n\t\tcase 'PERSONAL_NUMBER':\n\t\t\treturn types[4]\n\t\tcase 'VOICEMAIL':\n\t\t\treturn types[5]\n\t\tcase 'UAN':\n\t\t\treturn types[6]\n\t\tcase 'PAGER':\n\t\t\treturn types[7]\n\t\tcase 'VOIP':\n\t\t\treturn types[8]\n\t\tcase 'SHARED_COST':\n\t\t\treturn types[9]\n\t}\n}\n\nexport function validateMetadata(metadata) {\n\tif (!metadata) {\n\t\tthrow new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.')\n\t}\n\n\t// `country_phone_code_to_countries` was renamed to `country_calling_codes` in `1.0.18`.\n\t// For that reason, it's not used in this detection algorithm.\n\t// Instead, it detects by `countries: {}` property existence.\n\tif (!isObject(metadata) || !isObject(metadata.countries)) {\n\t\tthrow 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 ${isObject(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + typeOf(metadata) + ': ' + metadata}.`)\n\t}\n}\n\n// Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n/* istanbul ignore next */\nconst typeOf = _ => typeof _\n\n/**\n * Returns extension prefix for a country.\n * @param {string} country\n * @param {object} metadata\n * @return {string?}\n * @example\n * // Returns \" ext. \"\n * getExtPrefix(\"US\")\n */\nexport function getExtPrefix(country, metadataJson) {\n\tconst metadata = new Metadata(metadataJson)\n\tif (metadata.hasCountry(country)) {\n\t\treturn metadata.selectNumberingPlan(country).ext()\n\t}\n\treturn DEFAULT_EXT_PREFIX\n}\n\n/**\n * Returns \"country calling code\" for a country.\n * Throws an error if the country doesn't exist or isn't supported by this library.\n * @param {string} country\n * @param {object} metadataJson\n * @return {string}\n * @example\n * // Returns \"44\"\n * getCountryCallingCode(\"GB\")\n */\nexport function getCountryCallingCode(country, metadataJson) {\n\tconst metadata = new Metadata(metadataJson)\n\tif (metadata.hasCountry(country)) {\n\t\treturn metadata.selectNumberingPlan(country).countryCallingCode()\n\t}\n\tthrow new Error(`Unknown country: ${country}`)\n}\n\n/**\n * Tells if a country code is supported.\n * @param {string} country\n * @param {object} metadataJson\n * @return {boolean}\n * @example\n * // Returns `true`\n * isSupportedCountry(\"GB\")\n */\nexport function isSupportedCountry(country, metadataJson) {\n\t// const metadata = new Metadata(metadataJson)\n\t// return metadata.hasCountry(country)\n\treturn metadataJson.countries.hasOwnProperty(country)\n}\n\n/**\n * Sets `v1`/`v2`/`v3`/`v4` properties on `this` object.\n * @param {object} metadata — Metadata JSON\n */\nfunction setVersion(metadata) {\n\tconst { version } = metadata\n\tif (typeof version === 'number') {\n\t\tthis.v1 = version === 1\n\t\tthis.v2 = version === 2\n\t\tthis.v3 = version === 3\n\t\tthis.v4 = version === 4\n\t} else {\n\t\tif (!version) {\n\t\t\tthis.v1 = true\n\t\t} else if (compare(version, V3) === -1) {\n\t\t\tthis.v2 = true\n\t\t} else if (compare(version, V4) === -1) {\n\t\t\tthis.v3 = true\n\t\t} else {\n\t\t\tthis.v4 = true\n\t\t}\n\t}\n}","/**\n * Merges two arrays.\n * @param {*} a\n * @param {*} b\n * @return {*}\n */\nexport default function mergeArrays(a, b) {\n\tconst merged = a.slice()\n\n\tfor (const element of b) {\n\t\tif (a.indexOf(element) < 0) {\n\t\t\tmerged.push(element)\n\t\t}\n\t}\n\n\treturn merged.sort((a, b) => a - b)\n\n\t// ES6 version, requires Set polyfill.\n\t// let merged = new Set(a)\n\t// for (const element of b) {\n\t// \tmerged.add(i)\n\t// }\n\t// return Array.from(merged).sort((a, b) => a - b)\n}","import Metadata from '../metadata.js'\nimport mergeArrays from './mergeArrays.js'\n\n/**\n * Checks phone number length against the phone numbering plan selected in metadata.\n * Optionally, it could be restrained by a specific country.\n * @param {string} nationalNumber\n * @param {string?} country — Specific country to use rather than the one that is pre-selected in the metadata instance.\n * @param {Metadata} metadata — Metadata instance with a selected numbering plan.\n * @returns {string}\n */\nexport default function checkNumberLength(nationalNumber, country, metadata) {\n\treturn checkNumberLengthForType(nationalNumber, undefined, country, metadata)\n}\n\n/**\n * Checks phone number length against the phone numbering plan selected in metadata.\n * Optionally, it could be restrained by a specific phone number type or a specific country.\n * @param {string} nationalNumber\n * @param {string?} type — Specific phone number type.\n * @param {string?} country — Specific country to use instead of the one that is pre-selected in the metadata instance.\n * @param {Metadata} metadata — Metadata instance with a selected numbering plan.\n * @returns {string} See the README on `validatePhoneNumberLength()` function, with an addition of a special case: when phone numbers of type `type` aren't possible in the telephone numbering plan, it will return \"INVALID_LENGTH\".\n */\n// Checks whether a number is possible for a certain `country` based on the number length.\n//\n// This function is not supported by metadata generated with ancient versions of\n// `libphonenumber-js` (before version `1.0.18`) which didn't include \"possible lengths\".\n//\n// There was also a known issue with `checkNumberLength()` function:\n// if a number is possible only in a certain `country` among several `countries`\n// that share the same \"country calling code\", that function would check\n// the possibility of the phone number only in the \"main\" `country` for the \"country calling code\"\n// and would not check if it's actually be possible in the speciifc `country`.\n//\n// For example, \"+1310xxxx\" numbers are valid in Canada.\n// However, they are not possible in the US due to being too short.\n// Since Canada and the US share the same country calling code — \"+1\" —\n// `checkNumberLength()` function used to return not \"IS_POSSIBLE\" for \"+1310xxxx\" numbers.\n//\n// In such cases, when using \"/max\" metadata, `isValid()` could output `true`\n// but at the same time `isPossible()` could output `false`, which was contradictory.\n//\n// See https://issuetracker.google.com/issues/335892662 for the discusson in Google's issues.\n//\n// The solution suggested by Google was implemented: an optional `country` argument\n// was added to `checkNumberLength()` function. If present, that `country` will be used\n// to check phone number length for that specific `country` rather than the \"main\" country\n// for the shared \"country calling code\".\n//\nexport function checkNumberLengthForType(nationalNumber, type, country, metadata) {\n\tif (country) {\n\t\t// If a specific `country` is specified, re-create a metadata instance with it.\n\t\tmetadata = new Metadata(metadata.metadata)\n\t\tmetadata.selectNumberingPlan(country)\n\t}\n\n\tconst type_info = metadata.type(type)\n\n\t// There should always be \"<possiblePengths/>\" set for every type element.\n\t// This is declared in the XML schema.\n\t// For size efficiency, where a sub-description (e.g. fixed-line)\n\t// has the same \"<possiblePengths/>\" as the \"general description\", this is missing,\n\t// so we fall back to the \"general description\". Where no numbers of the type\n\t// exist at all, there is one possible length (-1) which is guaranteed\n\t// not to match the length of any real phone number.\n\tlet possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths()\n\t// let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()\n\n\t// Metadata before version `1.0.18` didn't contain `possible_lengths`.\n\tif (!possible_lengths) {\n\t\treturn 'IS_POSSIBLE'\n\t}\n\n\tif (type === 'FIXED_LINE_OR_MOBILE') {\n\t\t// No such country in metadata.\n\t\t/* istanbul ignore next */\n\t\tif (!metadata.type('FIXED_LINE')) {\n\t\t\t// The rare case has been encountered where no fixedLine data is available\n\t\t\t// (true for some non-geographic entities), so we just check mobile.\n\t\t\treturn checkNumberLengthForType(nationalNumber, 'MOBILE', country, metadata)\n\t\t}\n\n\t\tconst mobile_type = metadata.type('MOBILE')\n\t\tif (mobile_type) {\n\t\t\t// Merge the mobile data in if there was any. \"Concat\" creates a new\n\t\t\t// array, it doesn't edit possible_lengths in place, so we don't need a copy.\n\t\t\t// Note that when adding the possible lengths from mobile, we have\n\t\t\t// to again check they aren't empty since if they are this indicates\n\t\t\t// they are the same as the general desc and should be obtained from there.\n\t\t\tpossible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths())\n\t\t\t// The current list is sorted; we need to merge in the new list and\n\t\t\t// re-sort (duplicates are okay). Sorting isn't so expensive because\n\t\t\t// the lists are very small.\n\n\t\t\t// if (local_lengths) {\n\t\t\t// \tlocal_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())\n\t\t\t// } else {\n\t\t\t// \tlocal_lengths = mobile_type.possibleLengthsLocal()\n\t\t\t// }\n\t\t}\n\t}\n\t// If the type doesn't exist then return 'INVALID_LENGTH'.\n\telse if (type && !type_info) {\n\t\treturn 'INVALID_LENGTH'\n\t}\n\n\tconst actual_length = nationalNumber.length\n\n\t// In `libphonenumber-js` all \"local-only\" formats are dropped for simplicity.\n\t// // This is safe because there is never an overlap beween the possible lengths\n\t// // and the local-only lengths; this is checked at build time.\n\t// if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)\n\t// {\n\t// \treturn 'IS_POSSIBLE_LOCAL_ONLY'\n\t// }\n\n\tconst minimum_length = possible_lengths[0]\n\n\tif (minimum_length === actual_length) {\n\t\treturn 'IS_POSSIBLE'\n\t}\n\n\tif (minimum_length > actual_length) {\n\t\treturn 'TOO_SHORT'\n\t}\n\n\tif (possible_lengths[possible_lengths.length - 1] < actual_length) {\n\t\treturn 'TOO_LONG'\n\t}\n\n\t// We skip the first element since we've already checked it.\n\treturn possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH'\n}","import Metadata from './metadata.js'\nimport checkNumberLength from './helpers/checkNumberLength.js'\n\n/**\n * Checks if a phone number is \"possible\" (basically just checks its length).\n *\n * isPossible(phoneNumberInstance, { ..., v2: true }, metadata)\n *\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\n *\n * @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: '...' }`.\n * @param {object} [options]\n * @param {object} metadataJson\n * @return {string}\n */\nexport default function isPossiblePhoneNumber(input, options, metadataJson) {\n\t/* istanbul ignore if */\n\tif (options === undefined) {\n\t\toptions = {}\n\t}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\tif (options.v2) {\n\t\tif (!input.countryCallingCode) {\n\t\t\tthrow new Error('Invalid phone number object passed')\n\t\t}\n\t\tmetadata.selectNumberingPlan(input.country || input.countryCallingCode)\n\t} else {\n\t\tif (!input.phone) {\n\t\t\treturn false\n\t\t}\n\t\tif (input.country) {\n\t\t\tif (!metadata.hasCountry(input.country)) {\n\t\t\t\tthrow new Error(`Unknown country: ${input.country}`)\n\t\t\t}\n\t\t\tmetadata.selectNumberingPlan(input.country)\n\t\t} else {\n\t\t\tif (!input.countryCallingCode) {\n\t\t\t\tthrow new Error('Invalid phone number object passed')\n\t\t\t}\n\t\t\tmetadata.selectNumberingPlan(input.countryCallingCode)\n\t\t}\n\t}\n\n\t// Old (legacy) metadata (< 1.0.18) had no \"possible length\" data.\n\t// So `isPossibleNumber()` function is supported only for non-legacy metadata.\n\tif (metadata.possibleLengths()) {\n\t\treturn isPossibleNumber(input.phone || input.nationalNumber, metadata)\n\t}\n\n\t// There was a bug in versions from `1.7.35` to `1.7.37` of `libphonenumber-js`\n\t// where \"possible_lengths\" property was missing from \"non-geographical\" numbering plans' metadata.\n\t// After that, the bug was noticed and fixed.\n\t// So for versions from `1.7.35` to `1.7.37`, just assume that all \"non=geotraphical\" numbers are possible.\n\t// The reason is that the bug was noticed relatively quickly (within a day or so)\n\t// and it's unlikely that anyone generated their custom metadata in that short time span.\n\t// And if they didn't generate any custom metadata then a follow-up package update would've silently fixed the bug.\n\tif (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {\n\t\treturn true\n\t}\n\n\t// `isPossibleNumber()` function is not supported.\n\tthrow new Error('Missing \"possibleLengths\" in metadata. Perhaps the metadata has been generated before v1.0.18.');\n}\n\n/**\n * Tells if a given national (significant) number is possible\n * @param {string} nationalNumber\n * @param {Metadata} metadata = Metadata instance with a pre-selected telephone numbering plan.\n * @returns {boolean}\n */\nexport function isPossibleNumber(nationalNumber, metadata) {\n\tswitch (checkNumberLength(nationalNumber, undefined, metadata)) {\n\t\tcase 'IS_POSSIBLE':\n\t\t\treturn true\n\t\t// This library ignores \"local-only\" phone numbers (for simplicity).\n\t\t// See the readme for more info on what are \"local-only\" phone numbers.\n\t\t// case 'IS_POSSIBLE_LOCAL_ONLY':\n\t\t// \treturn !isInternational\n\t\tdefault:\n\t\t\treturn false\n\t}\n}","/**\n * Checks whether the entire input sequence can be matched\n * against the regular expression.\n * @return {boolean}\n */\nexport default function matchesEntirely(text, regularExpressionText) {\n\t// If the assigning of the `''` default value is moved to the arguments above,\n\t// the code coverage would decrease for some weird reason.\n\ttext = text || ''\n\treturn new RegExp('^(?:' + regularExpressionText + ')$').test(text)\n}","import Metadata from '../metadata.js'\nimport matchesEntirely from './matchesEntirely.js'\n\nconst NON_FIXED_LINE_PHONE_TYPES = [\n\t'MOBILE',\n\t'PREMIUM_RATE',\n\t'TOLL_FREE',\n\t'SHARED_COST',\n\t'VOIP',\n\t'PERSONAL_NUMBER',\n\t'PAGER',\n\t'UAN',\n\t'VOICEMAIL'\n]\n\n// Finds out national phone number type (fixed line, mobile, etc)\nexport default function getNumberType(input, options, metadataJson)\n{\n\t// If assigning the `{}` default value is moved to the arguments above,\n\t// code coverage would decrease for some weird reason.\n\toptions = options || {}\n\n\t// When `parse()` returns an empty object — `{}` —\n\t// that means that the phone number is malformed,\n\t// so it can't possibly be valid.\n\tif (!input.country && !input.countryCallingCode) {\n\t\treturn\n\t}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\tmetadata.selectNumberingPlan(input.country || input.countryCallingCode)\n\n\tconst nationalNumber = options.v2 ? input.nationalNumber : input.phone\n\n\t// The following is copy-pasted from the original function:\n\t// https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835\n\n\t// Is this national number even valid for this country\n\tif (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {\n\t\treturn\n\t}\n\n\t// Is it fixed line number\n\tif (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {\n\t\t// Because duplicate regular expressions are removed\n\t\t// to reduce metadata size, if \"mobile\" pattern is \"\"\n\t\t// then it means it was removed due to being a duplicate of the fixed-line pattern.\n\t\t//\n\t\tif (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {\n\t\t\treturn 'FIXED_LINE_OR_MOBILE'\n\t\t}\n\n\t\t// `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.\n\t\t// For example, for \"US\" country.\n\t\t// Old metadata (< `1.0.18`) had a specific \"types\" data structure\n\t\t// that happened to be `undefined` for `MOBILE` in that case.\n\t\t// Newer metadata (>= `1.0.18`) has another data structure that is\n\t\t// not `undefined` for `MOBILE` in that case (it's just an empty array).\n\t\t// So this `if` is just for backwards compatibility with old metadata.\n\t\tif (!metadata.type('MOBILE')) {\n\t\t\treturn 'FIXED_LINE_OR_MOBILE'\n\t\t}\n\n\t\t// Check if the number happens to qualify as both fixed line and mobile.\n\t\t// (no such country in the minimal metadata set)\n\t\t/* istanbul ignore if */\n\t\tif (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {\n\t\t\treturn 'FIXED_LINE_OR_MOBILE'\n\t\t}\n\n\t\treturn 'FIXED_LINE'\n\t}\n\n\tfor (const type of NON_FIXED_LINE_PHONE_TYPES) {\n\t\tif (isNumberTypeEqualTo(nationalNumber, type, metadata)) {\n\t\t\treturn type\n\t\t}\n\t}\n}\n\nexport function isNumberTypeEqualTo(nationalNumber, type, metadata) {\n\tconst typeDefinition = metadata.type(type)\n\tif (!typeDefinition || !typeDefinition.pattern()) {\n\t\treturn false\n\t}\n\n\t// Check if any possible number lengths are present;\n\t// if so, we use them to avoid checking\n\t// the validation pattern if they don't match.\n\t// If they are absent, this means they match\n\t// the general description, which we have\n\t// already checked before a specific number type.\n\tif (\n\t\ttypeDefinition.possibleLengths() &&\n\t\ttypeDefinition.possibleLengths().indexOf(nationalNumber.length) < 0\n\t) {\n\t\treturn false\n\t}\n\n\treturn matchesEntirely(nationalNumber, typeDefinition.pattern())\n}","import Metadata from './metadata.js'\nimport matchesEntirely from './helpers/matchesEntirely.js'\nimport getNumberType from './helpers/getNumberType.js'\n\n/**\n * Checks if a given phone number is valid.\n *\n * isValid(phoneNumberInstance, { ..., v2: true }, metadata)\n *\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\n *\n * If the `number` is a string, it will be parsed to an object,\n * but only if it contains only valid phone number characters (including punctuation).\n * If the `number` is an object, it is used as is.\n *\n * The optional `defaultCountry` argument is the default country.\n * I.e. it does not restrict to just that country,\n * e.g. in those cases where several countries share\n * the same phone numbering rules (NANPA, Britain, etc).\n * For example, even though the number `07624 369230`\n * belongs to the Isle of Man (\"IM\" country code)\n * calling `isValidNumber('07624369230', 'GB', metadata)`\n * still returns `true` because the country is not restricted to `GB`,\n * it's just that `GB` is the default one for the phone numbering rules.\n * For restricting the country see `isValidNumberForRegion()`\n * though restricting a country might not be a good idea.\n * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion\n *\n * Examples:\n *\n * ```js\n * isValidNumber('+78005553535', metadata)\n * isValidNumber('8005553535', 'RU', metadata)\n * isValidNumber('88005553535', 'RU', metadata)\n * isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)\n * ```\n */\nexport default function isValidNumber(input, options, metadataJson)\n{\n\t// If assigning the `{}` default value is moved to the arguments above,\n\t// code coverage would decrease for some weird reason.\n\toptions = options || {}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\tmetadata.selectNumberingPlan(input.country || input.countryCallingCode)\n\n\t// By default, countries only have type regexps when it's required for\n\t// distinguishing different countries having the same `countryCallingCode`.\n\tif (metadata.hasTypes()) {\n\t\treturn getNumberType(input, options, metadata.metadata) !== undefined\n\t}\n\n\t// If there are no type regexps for this country in metadata then use\n\t// `nationalNumberPattern` as a \"better than nothing\" replacement.\n\tconst nationalNumber = options.v2 ? input.nationalNumber : input.phone\n\treturn matchesEntirely(nationalNumber, metadata.nationalNumberPattern())\n}","const COUNTRY_CODE_REG_EXP = /^[A-Z]{2}$/\n\nexport default function isCountryCode(string) {\n\treturn COUNTRY_CODE_REG_EXP.test(string)\n}\n","import Metadata from '../metadata.js'\nimport isCountryCode from './isCountryCode.js'\n\nconst USE_NON_GEOGRAPHIC_COUNTRY_CODE = false\n\nexport default function getCountryAndCallingCodeFromOneOfThem(countryOrCallingCode, metadataJson) {\n\tlet country\n\tlet callingCode\n\n\tconst metadata = new Metadata(metadataJson)\n\t// If country code is passed then derive `countryCallingCode` from it.\n\t// Also store the country code as `.country`.\n\tif (isCountryCode(countryOrCallingCode)) {\n\t\tcountry = countryOrCallingCode\n\t\tmetadata.selectNumberingPlan(country)\n\t\tcallingCode = metadata.countryCallingCode()\n\t} else {\n\t\tcallingCode = countryOrCallingCode\n\t\t/* istanbul ignore if */\n\t\tif (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n\t\t\tif (metadata.isNonGeographicCallingCode(callingCode)) {\n\t\t\t\tcountry = '001'\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tcountry,\n\t\tcallingCode\n\t}\n}","import Metadata from '../metadata.js'\n\n/**\n * Returns a list of countries that the phone number could potentially belong to.\n * @param {string} callingCode — Calling code.\n * @param {string} nationalNumber — National (significant) number.\n * @param {object} metadata — Metadata.\n * @return {string[]} A list of possible countries.\n */\nexport default function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {\n\tconst _metadata = new Metadata(metadata)\n\tlet possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode)\n\tif (!possibleCountries) {\n\t\treturn []\n\t}\n\treturn possibleCountries.filter((country) => {\n\t\treturn couldNationalNumberBelongToCountry(nationalNumber, country, metadata)\n\t})\n}\n\nfunction couldNationalNumberBelongToCountry(nationalNumber, country, metadataJson) {\n\tconst metadata = new Metadata(metadataJson)\n\tmetadata.selectNumberingPlan(country)\n\treturn metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0\n}","// The minimum length of the national significant number.\nexport const MIN_LENGTH_FOR_NSN = 2\n\n// The ITU says the maximum length should be 15,\n// but one can find longer numbers in Germany.\nexport const MAX_LENGTH_FOR_NSN = 17\n\n// The maximum length of the country calling code.\nexport const MAX_LENGTH_COUNTRY_CODE = 3\n\n// Digits accepted in phone numbers\n// (ascii, fullwidth, arabic-indic, and eastern arabic digits).\nexport const VALID_DIGITS = '0-9\\uFF10-\\uFF19\\u0660-\\u0669\\u06F0-\\u06F9'\n\n// `DASHES` will be right after the opening square bracket of the \"character class\"\nconst DASHES = '-\\u2010-\\u2015\\u2212\\u30FC\\uFF0D'\nconst SLASHES = '\\uFF0F/'\nconst DOTS = '\\uFF0E.'\nexport const WHITESPACE = ' \\u00A0\\u00AD\\u200B\\u2060\\u3000'\nconst BRACKETS = '()\\uFF08\\uFF09\\uFF3B\\uFF3D\\\\[\\\\]'\n// export const OPENING_BRACKETS = '(\\uFF08\\uFF3B\\\\\\['\nconst TILDES = '~\\u2053\\u223C\\uFF5E'\n\n// Regular expression of acceptable punctuation found in phone numbers. This\n// excludes punctuation found as a leading character only. This consists of dash\n// characters, white space characters, full stops, slashes, square brackets,\n// parentheses and tildes. Full-width variants are also present.\nexport const VALID_PUNCTUATION = `${DASHES}${SLASHES}${DOTS}${WHITESPACE}${BRACKETS}${TILDES}`\n\nexport const PLUS_CHARS = '+\\uFF0B'\n// const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')","import Metadata from '../metadata.js'\nimport { VALID_DIGITS } from '../constants.js'\n\nconst CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])')\n\nexport default function stripIddPrefix(number, country, callingCode, metadataJson) {\n\tif (!country) {\n\t\treturn\n\t}\n\n\t// Get the IDD prefix pattern.\n\tconst metadata = new Metadata(metadataJson)\n\tmetadata.selectNumberingPlan(country || callingCode)\n\tconst IDDPrefixPattern = new RegExp(metadata.IDDPrefix())\n\n\t// Check if the number is IDD-prefixed.\n\tif (number.search(IDDPrefixPattern) !== 0) {\n\t\treturn\n\t}\n\n\t// Strip IDD prefix.\n\tnumber = number.slice(number.match(IDDPrefixPattern)[0].length)\n\n\t// If there're any digits after an IDD prefix,\n\t// then those digits are a country calling code.\n\t// Since no country code starts with a `0`,\n\t// the code below validates that the next digit (if present) is not `0`.\n\tconst matchedGroups = number.match(CAPTURING_DIGIT_PATTERN)\n\tif (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {\n\t\tif (matchedGroups[1] === '0') {\n\t\t\treturn\n\t\t}\n\t}\n\n\treturn number\n}","/**\n * Strips any national prefix (such as 0, 1) present in a\n * (possibly incomplete) number provided.\n * \"Carrier codes\" are only used in Colombia and Brazil,\n * and only when dialing within those countries from a mobile phone to a fixed line number.\n * Sometimes it won't actually strip national prefix\n * and will instead prepend some digits to the `number`:\n * for example, when number `2345678` is passed with `VI` country selected,\n * it will return `{ number: \"3402345678\" }`, because `340` area code is prepended.\n * @param {string} number — National number digits.\n * @param {object} metadata — Metadata with country selected.\n * @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.\n */\nexport default function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {\n\tif (number && metadata.numberingPlan.nationalPrefixForParsing()) {\n\t\t// See METADATA.md for the description of\n\t\t// `national_prefix_for_parsing` and `national_prefix_transform_rule`.\n\t\t// Attempt to parse the first digits as a national prefix.\n\t\tconst prefixPattern = new RegExp('^(?:' + metadata.numberingPlan.nationalPrefixForParsing() + ')')\n\t\tconst prefixMatch = prefixPattern.exec(number)\n\t\tif (prefixMatch) {\n\t\t\tlet nationalNumber\n\t\t\tlet carrierCode\n\t\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n\t\t\t// If a `national_prefix_for_parsing` has any \"capturing groups\"\n\t\t\t// then it means that the national (significant) number is equal to\n\t\t\t// those \"capturing groups\" transformed via `national_prefix_transform_rule`,\n\t\t\t// and nothing could be said about the actual national prefix:\n\t\t\t// what is it and was it even there.\n\t\t\t// If a `national_prefix_for_parsing` doesn't have any \"capturing groups\",\n\t\t\t// then everything it matches is a national prefix.\n\t\t\t// To determine whether `national_prefix_for_parsing` matched any\n\t\t\t// \"capturing groups\", the value of the result of calling `.exec()`\n\t\t\t// is looked at, and if it has non-undefined values where there're\n\t\t\t// \"capturing groups\" in the regular expression, then it means\n\t\t\t// that \"capturing groups\" have been matched.\n\t\t\t// It's not possible to tell whether there'll be any \"capturing gropus\"\n\t\t\t// before the matching process, because a `national_prefix_for_parsing`\n\t\t\t// could exhibit both behaviors.\n\t\t\tconst capturedGroupsCount = prefixMatch.length - 1\n\t\t\tconst hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount]\n\t\t\tif (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {\n\t\t\t\tnationalNumber = number.replace(\n\t\t\t\t\tprefixPattern,\n\t\t\t\t\tmetadata.nationalPrefixTransformRule()\n\t\t\t\t)\n\t\t\t\t// If there's more than one captured group,\n\t\t\t\t// then carrier code is the second one.\n\t\t\t\tif (capturedGroupsCount > 1) {\n\t\t\t\t\tcarrierCode = prefixMatch[1]\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If there're no \"capturing groups\",\n\t\t\t// or if there're \"capturing groups\" but no\n\t\t\t// `national_prefix_transform_rule`,\n\t\t\t// then just strip the national prefix from the number,\n\t\t\t// and possibly a carrier code.\n\t\t\t// Seems like there could be more.\n\t\t\telse {\n\t\t\t\t// `prefixBeforeNationalNumber` is the whole substring matched by\n\t\t\t\t// the `national_prefix_for_parsing` regular expression.\n\t\t\t\t// There seem to be no guarantees that it's just a national prefix.\n\t\t\t\t// For example, if there's a carrier code, it's gonna be a\n\t\t\t\t// part of `prefixBeforeNationalNumber` too.\n\t\t\t\tconst prefixBeforeNationalNumber = prefixMatch[0]\n\t\t\t\tnationalNumber = number.slice(prefixBeforeNationalNumber.length)\n\t\t\t\t// If there's at least one captured group,\n\t\t\t\t// then carrier code is the first one.\n\t\t\t\tif (hasCapturedGroups) {\n\t\t\t\t\tcarrierCode = prefixMatch[1]\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Tries to guess whether a national prefix was present in the input.\n\t\t\t// This is not something copy-pasted from Google's library:\n\t\t\t// they don't seem to have an equivalent for that.\n\t\t\t// So this isn't an \"officially approved\" way of doing something like that.\n\t\t\t// But since there seems no other existing method, this library uses it.\n\t\t\tlet nationalPrefix\n\t\t\tif (hasCapturedGroups) {\n\t\t\t\tconst possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1])\n\t\t\t\tconst possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup)\n\t\t\t\t// Example: an Argentinian (AR) phone number `0111523456789`.\n\t\t\t\t// `prefixMatch[0]` is `01115`, and `$1` is `11`,\n\t\t\t\t// and the rest of the phone number is `23456789`.\n\t\t\t\t// The national number is transformed via `9$1` to `91123456789`.\n\t\t\t\t// National prefix `0` is detected being present at the start.\n\t\t\t\t// if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {\n\t\t\t\tif (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {\n\t\t\t\t\tnationalPrefix = metadata.numberingPlan.nationalPrefix()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnationalPrefix = prefixMatch[0]\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tnationalNumber,\n\t\t\t\tnationalPrefix,\n\t\t\t\tcarrierCode\n\t\t\t}\n\t\t}\n\t}\n return {\n \tnationalNumber: number\n }\n}","import Metadata from '../metadata.js'\nimport getNumberType from './getNumberType.js'\n\n/**\n * Returns the exact country that a given national (significant) number belongs to\n * in case of ambiguity, i.e. when multiple countries share the same \"country calling code\".\n * @param {string} [nationalNumber]\n * @param {string[]} countries — A list of countries that share the same calling code.\n * @param {object} metadata — Metadata JSON.\n * @returns {string?} Returns the exact country this number belongs to, or `undefined` if the exact country couldn't be determined.\n */\nexport default function getCountryByNationalNumber(nationalNumber, countries, metadataJson) {\n\t// Create a new `metadata` instance because it will be selecting a `country`.\n\tconst metadata = new Metadata(metadataJson)\n\n\t// const matchingCountries = []\n\n\tfor (const country of countries) {\n\t\tmetadata.selectNumberingPlan(country)\n\t\t// \"Leading digits\" patterns are only defined for about 20% of all countries.\n\t\t// By definition, matching \"leading digits\" is a sufficient but not a necessary\n\t\t// condition for a phone number to belong to a country.\n\t\t// The point of \"leading digits\" check is that it's the fastest one to get a match.\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits\n\t\t// I'd suppose that \"leading digits\" patterns are mutually exclusive for different countries\n\t\t// because of the intended use of that feature.\n\t\tif (metadata.leadingDigits()) {\n\t\t\tif (nationalNumber &&\n\t\t\t\tnationalNumber.search(metadata.leadingDigits()) === 0) {\n\t\t\t\treturn country\n\t\t\t}\n\t\t}\n\t\t// Else perform full validation with all of those\n\t\t// fixed-line/mobile/etc regular expressions.\n\t\telse if (getNumberType({ phone: nationalNumber, country }, undefined, metadata.metadata)) {\n\t\t\t// When multiple countries share the same \"country calling code\",\n\t\t\t// type patterns aren't guaranteed to be unique among them.\n\t\t\t// For example, both `US` and `CA` have the same pattern for `toll_free` numbers.\n\t\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417147572\n\t\t\t//\n\t\t\t// That means that this `if` condition could be `true` for multiple countries from the list.\n\t\t\t// Currently, it just returns the first one, which is also the \"main\" country for the \"country calling code\".\n\t\t\t// In an example with `toll_free` numbers above, `\"US\"` would be returned even though\n\t\t\t// it could as well be `\"CA\"`.\n\t\t\t//\n\t\t\t// There was also a time when this attempted to be overly smart\n\t\t\t// and kept track of all such multiple matching countries\n\t\t\t// and then picked the one that matched the `defaultCountry`, if provided.\n\t\t\t// For example, with `toll_free` numbers above, and with `defaultCountry: \"CA\"`,\n\t\t\t// it would've returned `\"CA\"` instead of `\"US\"`.\n\t\t\t// Later it turned out that such \"overly smart\" behavior turned out to be just confusing,\n\t\t\t// so this \"overly smart\" country detection was reverted to returning the \"main\" country\n\t\t\t// for the \"country calling code\".\n\t\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/154\n\t\t\t//\n\t\t\treturn country\n\t\t\t//\n\t\t\t// The \"overly smart\" behavior code:\n\t\t\t//\n\t\t\t// if (defaultCountry) {\n\t\t\t// \tif (country === defaultCountry) {\n\t\t\t// \t\treturn country\n\t\t\t// \t} else {\n\t\t\t// \t\tmatchingCountries.push(country)\n\t\t\t// \t}\n\t\t\t// } else {\n\t\t\t// \treturn country\n\t\t\t// }\n\t\t}\n\t}\n\n\t// // Return the first (\"main\") one of the `matchingCountries`.\n\t// if (matchingCountries.length > 0) {\n\t// \treturn matchingCountries[0]\n\t// }\n}","import getCountryByNationalNumber from './getCountryByNationalNumber.js'\n\nconst USE_NON_GEOGRAPHIC_COUNTRY_CODE = false\n\n/**\n * Returns the exact country that a given national (significant) number belongs to\n * in case of ambiguity, i.e. when multiple countries share the same \"country calling code\".\n * @param {string} [callingCode]\n * @param {string} [options.nationalNumber] — National (significant) number.\n * @param {Metadata} options.metadata — Metadata instance.\n * @returns {string?} Returns the most suitable country for this calling code and national (significant) number.\n */\nexport default function getCountryByCallingCode(callingCode, {\n\tnationalNumber,\n\tmetadata\n}) {\n\t/* istanbul ignore if */\n\tif (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n\t\tif (metadata.isNonGeographicCallingCode(callingCode)) {\n\t\t\treturn '001'\n\t\t}\n\t}\n\tconst possibleCountries = metadata.getCountryCodesForCallingCode(callingCode)\n\tif (!possibleCountries) {\n\t\treturn\n\t}\n\t// If there's just one country corresponding to the country code,\n\t// then just return it, without further phone number digits validation.\n\tif (possibleCountries.length === 1) {\n\t\treturn possibleCountries[0]\n\t}\n\treturn getCountryByNationalNumber(nationalNumber, possibleCountries, metadata.metadata)\n}","import extractNationalNumberFromPossiblyIncompleteNumber from './extractNationalNumberFromPossiblyIncompleteNumber.js'\nimport matchesEntirely from './matchesEntirely.js'\nimport checkNumberLength from './checkNumberLength.js'\nimport getCountryByCallingCode from './getCountryByCallingCode.js'\n\n/**\n * Strips national prefix and carrier code from a complete phone number.\n * The difference from the non-\"FromCompleteNumber\" function is that\n * it won't extract national prefix if the resultant number is too short\n * to be a complete number for the selected phone numbering plan.\n * @param {string} number — Complete phone number digits.\n * @param {string?} country — Specific country to use instead of the one that is pre-selected in the metadata instance.\n * @param {Metadata} metadata — Metadata instance with a selected numbering plan.\n * @return {object} `{ nationalNumber: string, carrierCode: string? }`.\n */\nexport default function extractNationalNumber(number, country, metadata) {\n\t// Parsing national prefixes and carrier codes\n\t// is only required for local phone numbers\n\t// but some people don't understand that\n\t// and sometimes write international phone numbers\n\t// with national prefixes (or maybe even carrier codes).\n\t// http://ucken.blogspot.ru/2016/03/trunk-prefixes-in-skype4b.html\n\t// Google's original library forgives such mistakes\n\t// and so does this library, because it has been requested:\n\t// https://github.com/catamphetamine/libphonenumber-js/issues/127\n\tconst {\n\t\tcarrierCode,\n\t\tnationalNumber\n\t} = extractNationalNumberFromPossiblyIncompleteNumber(\n\t\tnumber,\n\t\tmetadata\n\t)\n\n\tif (nationalNumber !== number) {\n\t\tif (!shouldHaveExtractedNationalPrefix(number, nationalNumber, metadata)) {\n\t\t\t// Don't strip the national prefix.\n\t\t\treturn { nationalNumber: number }\n\t\t}\n\t\t// Check the national (significant) number length after extracting national prefix and carrier code.\n\t\t// Legacy generated metadata (before `1.0.18`) didn't support the \"possible lengths\" feature,\n\t\t// so this `if` will only be executed with newer metadata.\n\t\tif (metadata.numberingPlan.possibleLengths()) {\n\t\t\t// If an exact `country` is not specified, attempt to detect it from the assumed national number.\n\t\t\tif (!country) {\n\t\t\t\tcountry = getCountryByCallingCode(metadata.numberingPlan.callingCode(), {\n\t\t\t\t\tnationalNumber,\n\t\t\t\t\tmetadata\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// The number remaining after stripping the national prefix and carrier code\n\t\t\t// should be long enough to have a possible length for the country.\n\t\t\t// Otherwise, don't strip the national prefix and carrier code,\n\t\t\t// since the original number could be a valid number.\n\t\t\t// This check has been copy-pasted \"as is\" from Google's original library:\n\t\t\t// https://github.com/google/libphonenumber/blob/876268eb1ad6cdc1b7b5bef17fc5e43052702d57/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3236-L3250\n\t\t\t// It doesn't check for the \"possibility\" of the original `number`.\n\t\t\t// I guess it's fine not checking that one. It works as is anyway.\n\t\t\tif (!isPossibleIncompleteNationalNumber(nationalNumber, country, metadata)) {\n\t\t\t\t// Don't strip the national prefix.\n\t\t\t\treturn { nationalNumber: number }\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { nationalNumber, carrierCode }\n}\n\n// In some countries, the same digit could be a national prefix\n// or a leading digit of a valid phone number.\n// For example, in Russia, national prefix is `8`,\n// and also `800 555 35 35` is a valid number\n// in which `8` is not a national prefix, but the first digit\n// of a national (significant) number.\n// Same's with Belarus:\n// `82004910060` is a valid national (significant) number,\n// but `2004910060` is not.\n// To support such cases (to prevent the code from always stripping\n// national prefix), a condition is imposed: a national prefix\n// is not extracted when the original number is \"viable\" and the\n// resultant number is not, a \"viable\" national number being the one\n// that matches `national_number_pattern`.\nfunction shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata) {\n\t// The equivalent in Google's code is:\n\t// https://github.com/google/libphonenumber/blob/e326fa1fc4283bb05eb35cb3c15c18f98a31af33/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L2969-L3004\n\tif (matchesEntirely(nationalNumberBefore, metadata.nationalNumberPattern()) &&\n\t\t!matchesEntirely(nationalNumberAfter, metadata.nationalNumberPattern())) {\n\t\treturn false\n\t}\n\t// This \"is possible\" national number (length) check has been commented out\n\t// because it's superceded by the (effectively) same check done in the\n\t// `extractNationalNumber()` function after it calls `shouldHaveExtractedNationalPrefix()`.\n\t// In other words, why run the same check twice if it could only be run once.\n\t// // Check the national (significant) number length after extracting national prefix and carrier code.\n\t// // Fixes a minor \"weird behavior\" bug: https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/57\n\t// // (Legacy generated metadata (before `1.0.18`) didn't support the \"possible lengths\" feature).\n\t// if (metadata.possibleLengths()) {\n\t// \tif (isPossibleIncompleteNationalNumber(nationalNumberBefore, metadata) &&\n\t// \t\t!isPossibleIncompleteNationalNumber(nationalNumberAfter, metadata)) {\n\t// \t\treturn false\n\t// \t}\n\t// }\n\treturn true\n}\n\n/**\n * Tells if a given incomplete national number is possible or not.\n * @param {string} nationalNumber\n * @param {string?} country — Specific country rather than the one that is pre-selected in the metadata instance.\n * @param {Metadata} metadata — Metadata instance with a selected numbering plan.\n * @returns {boolean}\n */\nfunction isPossibleIncompleteNationalNumber(nationalNumber, country, metadata) {\n\tswitch (checkNumberLength(nationalNumber, country, metadata)) {\n\t\tcase 'TOO_SHORT':\n\t\tcase 'INVALID_LENGTH':\n\t\t// This library ignores \"local-only\" phone numbers (for simplicity).\n\t\t// See the readme for more info on what are \"local-only\" phone numbers.\n\t\t// case 'IS_POSSIBLE_LOCAL_ONLY':\n\t\t\treturn false\n\t\tdefault:\n\t\t\treturn true\n\t}\n}","// Deprecated. Import from 'metadata.js' directly instead.\nexport { getCountryCallingCode as default } from './metadata.js'","import Metadata from '../metadata.js'\nimport matchesEntirely from './matchesEntirely.js'\nimport extractNationalNumber from './extractNationalNumber.js'\nimport checkNumberLength from './checkNumberLength.js'\nimport getCountryCallingCode from '../getCountryCallingCode.js'\n\n/**\n * Sometimes some people incorrectly input international phone numbers\n * without the leading `+`. This function corrects such input.\n * @param {string} number — Phone number digits (only digits, no `+`).\n * @param {string} [country] — Exact country of the phone number.\n * @param {string} [defaultCountry]\n * @param {string} [defaultCallingCode]\n * @param {object} metadataJson\n * @return {object} `{ countryCallingCode: string?, number: string }`, where `countryCallingCode` is the calling code that was extracted from the input `number` string, and `number` is the originally passed `number` without the extracted calling code.\n */\nexport default function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(\n\tnumber,\n\tcountry,\n\tdefaultCountry,\n\tdefaultCallingCode,\n\tmetadataJson\n) {\n\t// Validate arguments.\n\t// The `number` is known to be in a non-international form\n\t// because there's no leading \"+\" character.\n\t// Therefore, there must be either `country` or `defaultCountry` or `defaultCallingCode`.\n\t// Otherwise, there'd be no source for the calling code to search for in the `number`.\n\tif (!(country || defaultCountry || defaultCallingCode)) {\n\t\t// There's no source for the calling code to search for in the `number`.\n\t\treturn { number }\n\t}\n\n\tconst countryCallingCode = country || defaultCountry\n\t\t? getCountryCallingCode(country || defaultCountry, metadataJson)\n\t\t: defaultCallingCode\n\n\tif (number.indexOf(countryCallingCode) === 0) {\n\t\tconst metadata = new Metadata(metadataJson)\n\t\tmetadata.selectNumberingPlan(country || defaultCountry || defaultCallingCode)\n\n\t\tconst possibleShorterNumber = number.slice(countryCallingCode.length)\n\n\t\tconst {\n\t\t\tnationalNumber: possibleShorterNationalNumber,\n\t\t} = extractNationalNumber(\n\t\t\tpossibleShorterNumber,\n\t\t\tundefined,\n\t\t\tmetadata\n\t\t)\n\n\t\tconst {\n\t\t\tnationalNumber\n\t\t} = extractNationalNumber(\n\t\t\tnumber,\n\t\t\tundefined,\n\t\t\tmetadata\n\t\t)\n\n\t\t// If the number was not valid before but is valid now,\n\t\t// or if it was too long before, we consider the number\n\t\t// with the country calling code stripped to be a better result\n\t\t// and keep that instead.\n\t\t// For example, in Germany (+49), `49` is a valid area code,\n\t\t// so if a number starts with `49`, it could be both a valid\n\t\t// national German number or an international number without\n\t\t// a leading `+`.\n\t\tif (\n\t\t\t(\n\t\t\t\t!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) &&\n\t\t\t\tmatchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern())\n\t\t\t)\n\t\t\t||\n\t\t\tcheckNumberLength(nationalNumber, undefined, metadata) === 'TOO_LONG'\n\t\t) {\n\t\t\treturn {\n\t\t\t\tcountryCallingCode,\n\t\t\t\tnumber: possibleShorterNumber\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { number }\n}","import stripIddPrefix from './stripIddPrefix.js'\nimport extractCountryCallingCodeFromInternationalNumberWithoutPlusSign from './extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js'\nimport Metadata from '../metadata.js'\nimport { MAX_LENGTH_COUNTRY_CODE } from '../constants.js'\n\n/**\n * Attempts to extract a calling code from a phone number.\n * * If the phone number is found to be \"international\":\n * * It will attempt to identify the calling code part of it and whether that part is complete and valid.\n * * If the calling code part is complete and valid, it will return two properties:\n * that calling code part (without `+`) and the rest of the digits.\n * * Otherwise, i.e. if the calling code part is incomplete or invalid,\n * it will return an empty object.\n * * Otherwise, i.e. if the phone number is national, there's no callind code to extract\n * so it will just return the originally-passed `number` string as the only property.\n * @param {string} number — Phone number digits (possibly with a `+`).\n * @param {string} [country] — Country.\n * @param {string} [defaultCountry] — Default country.\n * @param {string} [defaultCallingCode] — Default calling code (some phone numbering plans are non-geographic).\n * @param {object} metadataJson\n * @return {object} `{ countryCallingCodeSource: string?, countryCallingCode: string?, number: string }`, where `countryCallingCodeSource` tells how the returned calling code was extracted (if it was extracted), `countryCallingCode` is the calling code that was extracted from the input `number` string, and `number` is the originally passed `number` without the extracted calling code (and without a `+`). If the calling code is present but incomplete or invalid, it will return an empty object.\n * @example\n * // Returns `{ countryCallingCode: \"1\", number: \"2133734253\" }`.\n * extractCountryCallingCode('2133734253', 'US', null, null, metadata)\n * extractCountryCallingCode('2133734253', null, 'US', null, metadata)\n * extractCountryCallingCode('2133734253', null, null, '1', metadata)\n * extractCountryCallingCode('+12133734253', null, null, null, metadata)\n * extractCountryCallingCode('+12133734253', null, 'RU', null, metadata)\n */\nexport default function extractCountryCallingCode(\n\tnumber,\n\tcountry,\n\tdefaultCountry,\n\tdefaultCallingCode,\n\tmetadataJson\n) {\n\tif (!number) {\n\t\treturn {}\n\t}\n\n\tlet isNumberWithIddPrefix\n\n\t// If this is not an international phone number,\n\t// then either extract an \"IDD\" prefix, or extract a\n\t// country calling code from a number by autocorrecting it\n\t// by prepending a leading `+` in cases when it starts\n\t// with the country calling code.\n\t// https://wikitravel.org/en/International_dialling_prefix\n\t// https://github.com/catamphetamine/libphonenumber-js/issues/376\n\tif (number[0] !== '+') {\n\t\t// Convert an \"out-of-country\" dialing phone number\n\t\t// to a proper international phone number.\n\t\tconst numberWithoutIDD = stripIddPrefix(number, country || defaultCountry, defaultCallingCode, metadataJson)\n\t\t// If an IDD prefix was stripped then\n\t\t// convert the number to international one\n\t\t// for subsequent parsing.\n\t\tif (numberWithoutIDD && numberWithoutIDD !== number) {\n\t\t\tisNumberWithIddPrefix = true\n\t\t\tnumber = '+' + numberWithoutIDD\n\t\t} else {\n\t\t\t// Check to see if the number starts with the country calling code\n\t\t\t// for the default country. If so, we remove the country calling code,\n\t\t\t// and do some checks on the validity of the number before and after.\n\t\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/376\n\t\t\tif (country || defaultCountry || defaultCallingCode) {\n\t\t\t\tconst {\n\t\t\t\t\tcountryCallingCode,\n\t\t\t\t\tnumber: shorterNumber\n\t\t\t\t} = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(\n\t\t\t\t\tnumber,\n\t\t\t\t\tcountry,\n\t\t\t\t\tdefaultCountry,\n\t\t\t\t\tdefaultCallingCode,\n\t\t\t\t\tmetadataJson\n\t\t\t\t)\n\t\t\t\tif (countryCallingCode) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcountryCallingCodeSource: 'FROM_NUMBER_WITHOUT_PLUS_SIGN',\n\t\t\t\t\t\tcountryCallingCode,\n\t\t\t\t\t\tnumber: shorterNumber\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t// No need to set it to `UNSPECIFIED`. It can be just `undefined`.\n\t\t\t\t// countryCallingCodeSource: 'UNSPECIFIED',\n\t\t\t\tnumber\n\t\t\t}\n\t\t}\n\t}\n\n\t// `number` can only be international at this point.\n\n\t// Fast abortion: country codes do not begin with a '0'\n\tif (number[1] === '0') {\n\t\treturn {}\n\t}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\t// The thing with country phone codes\n\t// is that they are orthogonal to each other\n\t// i.e. there's no such country phone code A\n\t// for which country phone code B exists\n\t// where B starts with A.\n\t// Therefore, while scanning digits,\n\t// if a valid country code is found,\n\t// that means that it is the country code.\n\t//\n\tlet i = 2\n\twhile (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {\n\t\tconst countryCallingCode = number.slice(1, i)\n\t\tif (metadata.hasCallingCode(countryCallingCode)) {\n\t\t\tmetadata.selectNumberingPlan(countryCallingCode)\n\t\t\treturn {\n\t\t\t\tcountryCallingCodeSource: isNumberWithIddPrefix ? 'FROM_NUMBER_WITH_IDD' : 'FROM_NUMBER_WITH_PLUS_SIGN',\n\t\t\t\tcountryCallingCode,\n\t\t\t\tnumber: number.slice(i)\n\t\t\t}\n\t\t}\n\t\ti++\n\t}\n\n\treturn {}\n}\n\n// The possible values for the returned `countryCallingCodeSource` are:\n//\n// Copy-pasted from:\n// https://github.com/google/libphonenumber/blob/master/resources/phonenumber.proto\n//\n// // The source from which the country_code is derived. This is not set in the\n// // general parsing method, but in the method that parses and keeps raw_input.\n// // New fields could be added upon request.\n// enum CountryCodeSource {\n// // Default value returned if this is not set, because the phone number was\n// // created using parse, not parseAndKeepRawInput. hasCountryCodeSource will\n// // return false if this is the case.\n// UNSPECIFIED = 0;\n//\n// // The country_code is derived based on a phone number with a leading \"+\",\n// // e.g. the French number \"+33 1 42 68 53 00\".\n// FROM_NUMBER_WITH_PLUS_SIGN = 1;\n//\n// // The country_code is derived based on a phone number with a leading IDD,\n// // e.g. the French number \"011 33 1 42 68 53 00\", as it is dialled from US.\n// FROM_NUMBER_WITH_IDD = 5;\n//\n// // The country_code is derived based on a phone number without a leading\n// // \"+\", e.g. the French number \"33 1 42 68 53 00\" when defaultCountry is\n// // supplied as France.\n// FROM_NUMBER_WITHOUT_PLUS_SIGN = 10;\n//\n// // The country_code is derived NOT based on the phone number itself, but\n// // from the defaultCountry parameter provided in the parsing function by the\n// // clients. This happens mostly for numbers written in the national format\n// // (without country code). For example, this would be set when parsing the\n// // French number \"01 42 68 53 00\", when defaultCountry is supplied as\n// // France.\n// FROM_DEFAULT_COUNTRY = 20;\n// }","import { VALID_PUNCTUATION } from '../constants.js'\n\n// Removes brackets and replaces dashes with spaces.\n//\n// E.g. \"(999) 111-22-33\" -> \"999 111 22 33\"\n//\n// For some reason Google's metadata contains `<intlFormat/>`s with brackets and dashes.\n// Meanwhile, there's no single opinion about using punctuation in international phone numbers.\n//\n// For example, Google's `<intlFormat/>` for USA is `+1 213-373-4253`.\n// And here's a quote from WikiPedia's \"North American Numbering Plan\" page:\n// https://en.wikipedia.org/wiki/North_American_Numbering_Plan\n//\n// \"The country calling code for all countries participating in the NANP is 1.\n// In international format, an NANP number should be listed as +1 301 555 01 00,\n// where 301 is an area code (Maryland).\"\n//\n// I personally prefer the international format without any punctuation.\n// For example, brackets are remnants of the old age, meaning that the\n// phone number part in brackets (so called \"area code\") can be omitted\n// if dialing within the same \"area\".\n// And hyphens were clearly introduced for splitting local numbers into memorizable groups.\n// For example, remembering \"5553535\" is difficult but \"555-35-35\" is much simpler.\n// Imagine a man taking a bus from home to work and seeing an ad with a phone number.\n// He has a couple of seconds to memorize that number until it passes by.\n// If it were spaces instead of hyphens the man wouldn't necessarily get it,\n// but with hyphens instead of spaces the grouping is more explicit.\n// I personally think that hyphens introduce visual clutter,\n// so I prefer replacing them with spaces in international numbers.\n// In the modern age all output is done on displays where spaces are clearly distinguishable\n// so hyphens can be safely replaced with spaces without losing any legibility.\n//\nexport default function applyInternationalSeparatorStyle(formattedNumber) {\n\treturn formattedNumber.replace(new RegExp(`[${VALID_PUNCTUATION}]+`, 'g'), ' ').trim()\n}","import applyInternationalSeparatorStyle from './applyInternationalSeparatorStyle.js'\n\n// This was originally set to $1 but there are some countries for which the\n// first group is not used in the national pattern (e.g. Argentina) so the $1\n// group does not match correctly. Therefore, we use `\\d`, so that the first\n// group actually used in the pattern will be matched.\nexport const FIRST_GROUP_PATTERN = /(\\$\\d)/\n\nexport default function formatNationalNumberUsingFormat(\n\tnumber,\n\tformat,\n\t{\n\t\tuseInternationalFormat,\n\t\twithNationalPrefix,\n\t\tcarrierCode,\n\t\tmetadata\n\t}\n) {\n\tconst formattedNumber = number.replace(\n\t\tnew RegExp(format.pattern()),\n\t\tuseInternationalFormat\n\t\t\t? format.internationalFormat()\n\t\t\t: (\n\t\t\t\t// This library doesn't use `domestic_carrier_code_formatting_rule`,\n\t\t\t\t// because that one is only used when formatting phone numbers\n\t\t\t\t// for dialing from a mobile phone, and this is not a dialing library.\n\t\t\t\t// carrierCode && format.domesticCarrierCodeFormattingRule()\n\t\t\t\t// \t// First, replace the $CC in the formatting rule with the desired carrier code.\n\t\t\t\t// \t// Then, replace the $FG in the formatting rule with the first group\n\t\t\t\t// \t// and the carrier code combined in the appropriate way.\n\t\t\t\t// \t? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode))\n\t\t\t\t// \t: (\n\t\t\t\t// \t\twithNationalPrefix && format.nationalPrefixFormattingRule()\n\t\t\t\t// \t\t\t? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())\n\t\t\t\t// \t\t\t: format.format()\n\t\t\t\t// \t)\n\t\t\t\twithNationalPrefix && format.nationalPrefixFormattingRule()\n\t\t\t\t\t? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())\n\t\t\t\t\t: format.format()\n\t\t\t)\n\t)\n\tif (useInternationalFormat) {\n\t\treturn applyInternationalSeparatorStyle(formattedNumber)\n\t}\n\treturn formattedNumber\n}","import Metadata from '../metadata.js'\n\n/**\n * Pattern that makes it easy to distinguish whether a region has a single\n * international dialing prefix or not. If a region has a single international\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\n * the tone. If there are multiple available international prefixes in a\n * region, they will be represented as a regex string that always contains one\n * or more characters that are not ASCII digits or a tilde.\n */\nconst SINGLE_IDD_PREFIX_REG_EXP = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/\n\n// If the `country` supports IDD calling, it returns a preferred IDD prefix.\n// If the `country` doesn't support IDD calling, it returns `undefined`.\nexport default function getIddPrefix(country, callingCode, metadata) {\n\tconst countryMetadata = new Metadata(metadata)\n\tcountryMetadata.selectNumberingPlan(country || callingCode)\n\tif (countryMetadata.defaultIDDPrefix()) {\n\t\treturn countryMetadata.defaultIDDPrefix()\n\t}\n\tif (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {\n\t\treturn countryMetadata.IDDPrefix()\n\t}\n}\n","import isViablePhoneNumber from './isViablePhoneNumber.js'\n\n// https://www.ietf.org/rfc/rfc3966.txt\n\n/**\n * @param {string} text - Phone URI (RFC 3966).\n * @return {object} `{ ?number, ?ext }`.\n */\nexport function parseRFC3966(text) {\n\tlet number\n\tlet ext\n\n\t// Replace \"tel:\" with \"tel=\" for parsing convenience.\n\ttext = text.replace(/^tel:/, 'tel=')\n\n\tfor (const part of text.split(';')) {\n\t\tconst [name, value] = part.split('=')\n\t\tswitch (name) {\n\t\t\tcase 'tel':\n\t\t\t\tnumber = value\n\t\t\t\tbreak\n\t\t\tcase 'ext':\n\t\t\t\text = value\n\t\t\t\tbreak\n\t\t\tcase 'phone-context':\n\t\t\t\t// Only \"country contexts\" are supported.\n\t\t\t\t// \"Domain contexts\" are ignored.\n\t\t\t\tif (value[0] === '+') {\n\t\t\t\t\tnumber = value + number\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t// If the phone number is not viable, then abort.\n\tif (!isViablePhoneNumber(number)) {\n\t\treturn {}\n\t}\n\n\tconst result = { number }\n\tif (ext) {\n\t\tresult.ext = ext\n\t}\n\treturn result\n}\n\n/**\n * @param {object} - `{ ?number, ?extension }`.\n * @return {string} Phone URI (RFC 3966).\n */\nexport function formatRFC3966({ number, ext }) {\n\tif (!number) {\n\t\treturn ''\n\t}\n\tif (number[0] !== '+') {\n\t\tthrow new Error(`\"formatRFC3966()\" expects \"number\" to be in E.164 format.`)\n\t}\n\treturn `tel:${number}${ext ? ';ext=' + ext : ''}`\n}","// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\n\nimport matchesEntirely from './helpers/matchesEntirely.js'\nimport formatNationalNumberUsingFormat from './helpers/formatNationalNumberUsingFormat.js'\nimport Metadata, { getCountryCallingCode } from './metadata.js'\nimport getIddPrefix from './helpers/getIddPrefix.js'\nimport { formatRFC3966 } from './helpers/RFC3966.js'\n\nconst DEFAULT_OPTIONS = {\n\tformatExtension: (formattedNumber, extension, metadata) => `${formattedNumber}${metadata.ext()}${extension}`\n}\n\n/**\n * Formats a phone number.\n *\n * format(phoneNumberInstance, 'INTERNATIONAL', { ..., v2: true }, metadata)\n * format(phoneNumberInstance, 'NATIONAL', { ..., v2: true }, metadata)\n *\n * format({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', { ... }, metadata)\n * format({ phone: '8005553535', country: 'RU' }, 'NATIONAL', undefined, metadata)\n *\n * @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: '...' }`.\n * @param {string} format\n * @param {object} [options]\n * @param {object} metadataJson\n * @return {string}\n */\nexport default function formatNumber(input, format, options, metadataJson) {\n\t// Apply default options.\n\tif (options) {\n\t\t// Using ES6 \"rest spread\" syntax here didn't work with `babel`/`istanbul`\n\t\t// for some weird reason: this line of code would cause the code coverage\n\t\t// to show as not 100%. That's because `babel`/`istanbul`, for some weird reason,\n\t\t// apparently doesn't know how to properly exclude Babel polyfills from code coverage.\n\t\t//\n\t\t// options = { ...DEFAULT_OPTIONS, ...options }\n\t\t//\n\t\toptions = merge({}, DEFAULT_OPTIONS, options)\n\t} else {\n\t\toptions = DEFAULT_OPTIONS\n\t}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\t// Normally, the `input` object is supposed to be a `PhoneNumber` class instance.\n\t// Also, according to the `PhoneNumber` class source code, `country` can't be \"001\".\n\t// It means that normally `input.country` or `input.countryCallingCode` is supposed\n\t// to be present because either of the two is always required to exist in a `PhoneNumber` instance.\n\t// This means that realistically, it's gonna step into either the first `if`\n\t// or the following `else if`, and normally it won't even reach the legacy-compatibility\n\t// `else return input.phone || ''` part.\n\t// So normally, it won't ever return an empty string here.\n\tif (input.country && input.country !== '001') {\n\t\t// Validate `input.country`.\n\t\tif (!metadata.hasCountry(input.country)) {\n\t\t\tthrow new Error(`Unknown country: ${input.country}`)\n\t\t}\n\t\tmetadata.selectNumberingPlan(input.country)\n\t}\n\telse if (input.countryCallingCode) {\n\t\tmetadata.selectNumberingPlan(input.countryCallingCode)\n\t}\n\telse return input.phone || ''\n\n\tconst countryCallingCode = metadata.countryCallingCode()\n\n\tconst nationalNumber = options.v2 ? input.nationalNumber : input.phone\n\n\t// This variable should have been declared inside `case`s\n\t// but Babel has a bug and it says \"duplicate variable declaration\".\n\tlet number\n\n\tswitch (format) {\n\t\tcase 'NATIONAL':\n\t\t\t// Normally, the `input` object is supposed to be a `PhoneNumber` class instance,\n\t\t\t// and a `PhoneNumber` class instance is always required to have a `nationalNumber`.\n\t\t\t// This means that the `if (!nationalNumber)` below is just for legacy-compatibility\n\t\t\t// and it normally can't really happen, so normally it won't ever return an empty string here.\n\t\t\tif (!nationalNumber) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tnumber = formatNationalNumber(nationalNumber, input.carrierCode, 'NATIONAL', metadata, options)\n\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension)\n\n\t\tcase 'INTERNATIONAL':\n\t\t\t// Legacy argument support.\n\t\t\t// (`{ country: ..., phone: '' }`)\n\t\t\tif (!nationalNumber) {\n\t\t\t\treturn `+${countryCallingCode}`\n\t\t\t}\n\t\t\tnumber = formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata, options)\n\t\t\tnumber = `+${countryCallingCode} ${number}`\n\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension)\n\n\t\tcase 'E.164':\n\t\t\t// `E.164` doesn't define \"phone number extensions\".\n\t\t\treturn `+${countryCallingCode}${nationalNumber}`\n\n\t\tcase 'RFC3966':\n\t\t\treturn formatRFC3966({\n\t\t\t\tnumber: `+${countryCallingCode}${nationalNumber}`,\n\t\t\t\text: input.ext\n\t\t\t})\n\n\t\t// For reference, here's Google's IDD formatter:\n\t\t// https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546\n\t\t// Not saying that this IDD formatter replicates it 1:1, but it seems to work.\n\t\t// Who would even need to format phone numbers in IDD format anyway?\n\t\tcase 'IDD':\n\t\t\t// If the required `fromCountry` parameter is not passed, it will return `undefined`.\n\t\t\tif (!options.fromCountry) {\n\t\t\t\treturn\n\t\t\t\t// throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')\n\t\t\t}\n\t\t\tconst formattedNumber = formatIDD(\n\t\t\t\tnationalNumber,\n\t\t\t\tinput.carrierCode,\n\t\t\t\tcountryCallingCode,\n\t\t\t\toptions.fromCountry,\n\t\t\t\tmetadata\n\t\t\t)\n\t\t\t// If the country of the phone number doesn't support IDD calling, it will return `undefined`.\n\t\t\tif (!formattedNumber) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn addExtension(formattedNumber, input.ext, metadata, options.formatExtension)\n\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown \"format\" argument passed to \"formatNumber()\": \"${format}\"`)\n\t}\n}\n\nfunction formatNationalNumber(number, carrierCode, formatAs, metadata, options) {\n\tconst format = chooseFormatForNumber(metadata.formats(), number)\n\tif (!format) {\n\t\treturn number\n\t}\n\treturn formatNationalNumberUsingFormat(\n\t\tnumber,\n\t\tformat,\n\t\t{\n\t\t\tuseInternationalFormat: formatAs === 'INTERNATIONAL',\n\t\t\twithNationalPrefix: format.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && (options && options.nationalPrefix === false) ? false : true,\n\t\t\tcarrierCode,\n\t\t\tmetadata\n\t\t}\n\t)\n}\n\nexport function chooseFormatForNumber(availableFormats, nationalNumber) {\n\t// Using a `for ... of` loop here didn't work with `babel`/`istanbul`:\n\t// for some weird reason, it showed code coverage less than 100%.\n\t// That's because `babel`/`istanbul`, for some weird reason,\n\t// apparently doesn't know how to properly exclude Babel polyfills from code coverage.\n\t//\n\t// for (const format of availableFormats) { ... }\n\t//\n\treturn pickFirstMatchingElement(availableFormats, (format) => {\n\t\t// Validate leading digits.\n\t\t// The test case for \"else path\" could be found by searching for\n\t\t// \"format.leadingDigitsPatterns().length === 0\".\n\t\tif (format.leadingDigitsPatterns().length > 0) {\n\t\t\t// The last leading_digits_pattern is used here, as it is the most detailed\n\t\t\tconst lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1]\n\t\t\t// If leading digits don't match then move on to the next phone number format\n\t\t\tif (nationalNumber.search(lastLeadingDigitsPattern) !== 0) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\t// Check that the national number matches the phone number format regular expression\n\t\treturn matchesEntirely(nationalNumber, format.pattern())\n\t})\n}\n\nfunction addExtension(formattedNumber, ext, metadata, formatExtension) {\n\treturn ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber\n}\n\nfunction formatIDD(\n\tnationalNumber,\n\tcarrierCode,\n\tcountryCallingCode,\n\tfromCountry,\n\tmetadata\n) {\n\tconst fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata.metadata)\n\t// When calling within the same country calling code.\n\tif (fromCountryCallingCode === countryCallingCode) {\n\t\tconst formattedNumber = formatNationalNumber(nationalNumber, carrierCode, 'NATIONAL', metadata)\n\t\t// For NANPA regions, return the national format for these regions\n\t\t// but prefix it with the country calling code.\n\t\tif (countryCallingCode === '1') {\n\t\t\treturn countryCallingCode + ' ' + formattedNumber\n\t\t}\n\t\t// If regions share a country calling code, the country calling code need\n\t\t// not be dialled. This also applies when dialling within a region, so this\n\t\t// if clause covers both these cases. Technically this is the case for\n\t\t// dialling from La Reunion to other overseas departments of France (French\n\t\t// Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover\n\t\t// this edge case for now and for those cases return the version including\n\t\t// country calling code. Details here:\n\t\t// http://www.petitfute.com/voyage/225-info-pratiques-reunion\n\t\t//\n\t\treturn formattedNumber\n\t}\n\tconst iddPrefix = getIddPrefix(fromCountry, undefined, metadata.metadata)\n\tif (iddPrefix) {\n\t\treturn `${iddPrefix} ${countryCallingCode} ${formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata)}`\n\t}\n}\n\nfunction merge(...objects) {\n\tlet i = 1\n\twhile (i < objects.length) {\n\t\tif (objects[i]) {\n\t\t\tfor (const key in objects[i]) {\n\t\t\t\tobjects[0][key] = objects[i][key]\n\t\t\t}\n\t\t}\n\t\ti++\n\t}\n\treturn objects[0]\n}\n\nfunction pickFirstMatchingElement(elements, testFunction) {\n\tlet i = 0\n\twhile (i < elements.length) {\n\t\tif (testFunction(elements[i])) {\n\t\t\treturn elements[i]\n\t\t}\n\t\ti++\n\t}\n}","import Metadata, { validateMetadata } from './metadata.js'\nimport isPossibleNumber from './isPossible.js'\nimport isValidNumber from './isValid.js'\nimport getNumberType from './helpers/getNumberType.js'\nimport getCountryAndCallingCodeFromOneOfThem from './helpers/getCountryAndCallingCodeFromOneOfThem.js'\nimport getPossibleCountriesForNumber from './helpers/getPossibleCountriesForNumber.js'\nimport extractCountryCallingCode from './helpers/extractCountryCallingCode.js'\nimport isObject from './helpers/isObject.js'\nimport formatNumber from './format.js'\n\nconst USE_NON_GEOGRAPHIC_COUNTRY_CODE = false\n\nexport default class PhoneNumber {\n\t/**\n\t * @param {string} countryOrCountryCallingCode\n\t * @param {string} nationalNumber\n\t * @param {object} metadata — Metadata JSON\n\t * @return {PhoneNumber}\n\t */\n\tconstructor(countryOrCountryCallingCode, nationalNumber, metadata) {\n\t\t// Validate `countryOrCountryCallingCode` argument.\n\t\tif (!countryOrCountryCallingCode) {\n\t\t\tthrow new TypeError('First argument is required')\n\t\t}\n\t\tif (typeof countryOrCountryCallingCode !== 'string') {\n\t\t\tthrow new TypeError('First argument must be a string')\n\t\t}\n\n\t\t// In case of public API use: `constructor(number, metadata)`.\n\t\t// Transform the arguments from `constructor(number, metadata)` to\n\t\t// `constructor(countryOrCountryCallingCode, nationalNumber, metadata)`.\n\t\tif (countryOrCountryCallingCode[0] === '+' && !nationalNumber) {\n\t\t\tthrow new TypeError('`metadata` argument not passed')\n\t\t}\n\t\tif (isObject(nationalNumber) && isObject(nationalNumber.countries)) {\n\t\t\tmetadata = nationalNumber\n\t\t\tconst e164Number = countryOrCountryCallingCode\n\t\t\tif (!E164_NUMBER_REGEXP.test(e164Number)) {\n\t\t\t\tthrow new Error('Invalid `number` argument passed: must consist of a \"+\" followed by digits')\n\t\t\t}\n\t\t\tconst { countryCallingCode, number } = extractCountryCallingCode(e164Number, undefined, undefined, undefined, metadata)\n\t\t\tnationalNumber = number\n\t\t\tcountryOrCountryCallingCode = countryCallingCode\n\t\t\tif (!nationalNumber) {\n\t\t\t\tthrow new Error('Invalid `number` argument passed: too short')\n\t\t\t}\n\t\t}\n\n\t\t// Validate `nationalNumber` argument.\n\t\tif (!nationalNumber) {\n\t\t\tthrow new TypeError('`nationalNumber` argument is required')\n\t\t}\n\t\tif (typeof nationalNumber !== 'string') {\n\t\t\tthrow new TypeError('`nationalNumber` argument must be a string')\n\t\t}\n\n\t\t// Validate `metadata` argument.\n\t\tvalidateMetadata(metadata)\n\n\t\t// Initialize properties.\n\t\tconst { country, callingCode: countryCallingCode } = getCountryAndCallingCodeFromOneOfThem(\n\t\t\tcountryOrCountryCallingCode,\n\t\t\tmetadata\n\t\t)\n\t\tthis.country = country\n\t\tthis.countryCallingCode = countryCallingCode\n\t\tthis.nationalNumber = nationalNumber\n\t\tthis.number = '+' + this.countryCallingCode + this.nationalNumber\n\t\t// Exclude `metadata` property output from `PhoneNumber.toString()`\n\t\t// so that it doesn't clutter the console output of Node.js.\n\t\t// Previously, when Node.js did `console.log(new PhoneNumber(...))`,\n\t\t// it would output the whole internal structure of the `metadata` object.\n\t\tthis.getMetadata = () => metadata\n\t}\n\n\tsetExt(ext) {\n\t\tthis.ext = ext\n\t}\n\n\tgetPossibleCountries() {\n\t\tif (this.country) {\n\t\t\treturn [this.country]\n\t\t}\n\t\treturn getPossibleCountriesForNumber(\n\t\t\tthis.countryCallingCode,\n\t\t\tthis.nationalNumber,\n\t\t\tthis.getMetadata()\n\t\t)\n\t}\n\n\tisPossible() {\n\t\treturn isPossibleNumber(this, { v2: true }, this.getMetadata())\n\t}\n\n\tisValid() {\n\t\treturn isValidNumber(this, { v2: true }, this.getMetadata())\n\t}\n\n\tisNonGeographic() {\n\t\tconst metadata = new Metadata(this.getMetadata())\n\t\treturn metadata.isNonGeographicCallingCode(this.countryCallingCode)\n\t}\n\n\tisEqual(phoneNumber) {\n\t\treturn this.number === phoneNumber.number && this.ext === phoneNumber.ext\n\t}\n\n\t// `validateLength()` method was originally meant to be an equivalent for `validatePhoneNumberLength()`.\n\t//\n\t// Later, it became apparent that it's not really a true equivalent.\n\t// The reason is that a `PhoneNumber` instance is not created\n\t// when the phone number string is too short for it to be considered a valid phone number:\n\t// * When there must be at least 2 national (significant) number digits: `\"1\"`.\n // * When the country calling code part of an international number is incomplete: `\"+12\"`.\n\t//\n\t// So leaving this `validateLength()` method here would suggest a hidden anti-pattern\n\t// of using it instead of `validatePhoneNumberLength()` while ignoring\n\t// the \"too short to be even possible\" case from phone number length validation.\n\t// And ignoring that case wouldn't make any sense in a real-world application\n\t// because it would still be a valid case that should be handled.\n\t//\n\t// Because of that, this method was eventually commented out in order to not introduce\n\t// that kind of an anti-pattern.\n\t//\n\t// validateLength() {\n\t// \tconst result = checkNumberLength(\n\t// \t\tthis.nationalNumber,\n\t// \t\tundefined,\n\t// \t\tthis.getMetadata()\n\t// \t)\n\t// \tif (result !== 'IS_POSSIBLE') {\n\t// \t\treturn result\n\t// \t}\n\t// }\n\n\tgetType() {\n\t\treturn getNumberType(this, { v2: true }, this.getMetadata())\n\t}\n\n\tformat(format, options) {\n\t\treturn formatNumber(\n\t\t\tthis,\n\t\t\tformat,\n\t\t\toptions ? { ...options, v2: true } : { v2: true },\n\t\t\tthis.getMetadata()\n\t\t)\n\t}\n\n\tformatNational(options) {\n\t\treturn this.format('NATIONAL', options)\n\t}\n\n\tformatInternational(options) {\n\t\treturn this.format('INTERNATIONAL', options)\n\t}\n\n\tgetURI(options) {\n\t\treturn this.format('RFC3966', options)\n\t}\n}\n\nconst E164_NUMBER_REGEXP = /^\\+\\d+$/","// These mappings map a character (key) to a specific digit that should\n// replace it for normalization purposes. Non-European digits that\n// may be used in phone numbers are mapped to a European equivalent.\n//\n// E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\n//\nexport const DIGITS = {\n\t'0': '0',\n\t'1': '1',\n\t'2': '2',\n\t'3': '3',\n\t'4': '4',\n\t'5': '5',\n\t'6': '6',\n\t'7': '7',\n\t'8': '8',\n\t'9': '9',\n\t'\\uFF10': '0', // Fullwidth digit 0\n\t'\\uFF11': '1', // Fullwidth digit 1\n\t'\\uFF12': '2', // Fullwidth digit 2\n\t'\\uFF13': '3', // Fullwidth digit 3\n\t'\\uFF14': '4', // Fullwidth digit 4\n\t'\\uFF15': '5', // Fullwidth digit 5\n\t'\\uFF16': '6', // Fullwidth digit 6\n\t'\\uFF17': '7', // Fullwidth digit 7\n\t'\\uFF18': '8', // Fullwidth digit 8\n\t'\\uFF19': '9', // Fullwidth digit 9\n\t'\\u0660': '0', // Arabic-indic digit 0\n\t'\\u0661': '1', // Arabic-indic digit 1\n\t'\\u0662': '2', // Arabic-indic digit 2\n\t'\\u0663': '3', // Arabic-indic digit 3\n\t'\\u0664': '4', // Arabic-indic digit 4\n\t'\\u0665': '5', // Arabic-indic digit 5\n\t'\\u0666': '6', // Arabic-indic digit 6\n\t'\\u0667': '7', // Arabic-indic digit 7\n\t'\\u0668': '8', // Arabic-indic digit 8\n\t'\\u0669': '9', // Arabic-indic digit 9\n\t'\\u06F0': '0', // Eastern-Arabic digit 0\n\t'\\u06F1': '1', // Eastern-Arabic digit 1\n\t'\\u06F2': '2', // Eastern-Arabic digit 2\n\t'\\u06F3': '3', // Eastern-Arabic digit 3\n\t'\\u06F4': '4', // Eastern-Arabic digit 4\n\t'\\u06F5': '5', // Eastern-Arabic digit 5\n\t'\\u06F6': '6', // Eastern-Arabic digit 6\n\t'\\u06F7': '7', // Eastern-Arabic digit 7\n\t'\\u06F8': '8', // Eastern-Arabic digit 8\n\t'\\u06F9': '9' // Eastern-Arabic digit 9\n}\n\nexport function parseDigit(character) {\n\treturn DIGITS[character]\n}\n\n/**\n * Parses phone number digits from a string.\n * Drops all punctuation leaving only digits.\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\n * @param {string} string\n * @return {string}\n * @example\n * ```js\n * parseDigits('8 (800) 555')\n * // Outputs '8800555'.\n * ```\n */\nexport default function parseDigits(string) {\n\tlet result = ''\n\t// Using `.split('')` here instead of normal `for ... of`\n\t// because the importing application doesn't neccessarily include an ES6 polyfill.\n\t// The `.split('')` approach discards \"exotic\" UTF-8 characters\n\t// (the ones consisting of four bytes) but digits\n\t// (including non-European ones) don't fall into that range\n\t// so such \"exotic\" characters would be discarded anyway.\n\tfor (const character of string.split('')) {\n\t\tconst digit = parseDigit(character)\n\t\tif (digit) {\n\t\t\tresult += digit\n\t\t}\n\t}\n\treturn result\n}","// This \"state\" object simply holds the state of the \"AsYouType\" parser:\n//\n// Sidenote:\n// `state.callingCode` and `state.country` are somewhat independent from one another\n// and there could be situations when one is defined but the other is not.\n// * Situations when `state.country` would be defined but `state.callingCode` would be `undefined`:\n// \t\t * When `defaultCountry` is specified and inputting a phone number not in \"international\" format.\n// * When `defaultCountry` is specified and inputting a phone number in \"international\" format,\n// but before the `+` character has been input.\n// * Situations when `state.country` would be `undefined` but `state.callingCode` would be defined:\n// * When `defaultCountry` is not specified and inputting a phone number in \"international\" format,\n// and the \"calling code\" part is already complete, but multiple countries share this \"calling code\"\n// and there's not enough national (significant) number digits yet to determine the exact country.\n// * In any other sigutations, `state.country` and `state.callingCode` are either both defined or both `undefined`.\n// * When they're both defined, `state.callingCode` always corresponds to `state.country`.\n// So both are always consistent in this case.\n//\n// * `country?: string` — The exact country of the phone number, if it could be determined.\n// When inputting a phone number in \"international\" format, it will derive the `country` from \"country calling code\" and the phone number digits.\n// When inputting a phone number in \"national\" format, it will derive the `country` from `defaultCountry` that was specified when creating the `AsYouType` formatter.\n// Sidenote: If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` flag was `true`, then for \"non-geographic phone numbers\" `state.country` would've been \"001\".\n// * `callingCode?: string` — \"Country calling code\" that has been extracted from the input phone number.\n// When inputting a phone number in \"international\" format, it will extract the \"country calling code\" from the digits that follow the \"+\" character.\n// When inputting a phone number in \"national\" format, `callingCode` will be `undefined`.\n// * `digits: string` — Phone number digits that have been input so far, including the \"+\" character, if present. In case of inputting non-arabic digits, those will be converted to arabic ones.\n// * `international: boolean` — Whether the phone number is being input in \"international\" format, i.e. with a \"+\" character.\n// * `missingPlus: boolean` — Whether it's a phone number in \"international\" format that is missing the leading \"+\" character for some reason — apparently, Google thinks that it's a common mistake when inputting a phone number.\n// * `IDDPrefix?: string` — An \"IDD prefix\", when the phone number is being input in an \"out-of-country dialing\" format. https://wikitravel.org/en/International_dialling_prefix\n// * `carrierCode?: string` — A \"carrier code\", if the phone number contains it. Normally, those can only be present in Colombia or Brazil, and only when calling from mobile phones to fixed-line numbers.\n// * `nationalPrefix?: string` — \"National prefix\", if present in the phone number input.\n// * `nationalSignificantNumber?: string` — National (significant) number digits that have been input so far.\n// * `nationalSignificantNumberIsModified: boolean` — Tells if the parsed national (significant) number is present as-is in the input string. For example, when inputting \"0343515551212999\" Argentinian mobile number, the parsed national (significant) number is \"93435551212999\". There, one can see how it stripped \"0\" national prefix and prepended a \"9\", because that's how it is instructed to do in Argentina's metadata. So in the described example, the parsed national (significant) number is not present as-is in the input string. Instead, it's \"modified\" in the input string. https://gitlab.com/caamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n// * `prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix?: string` — In some countries, a phone number could have a prefix that is not a \"national prefix\" but rather some other type of \"utility\" prefix.\n// For example, when calling within Australia, one could prepend `1831` prefix to hide caller's phone number.\n// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n//\nexport default class AsYouTypeState {\n\tconstructor({ onCountryChange, onCallingCodeChange }) {\n\t\tthis.onCountryChange = onCountryChange\n\t\tthis.onCallingCodeChange = onCallingCodeChange\n\t}\n\n\treset({ country, callingCode }) {\n\t\tthis.international = false\n\t\tthis.missingPlus = false\n\t\tthis.IDDPrefix = undefined\n\t\tthis.callingCode = undefined\n\t\tthis.digits = ''\n\t\tthis.resetNationalSignificantNumber()\n\t\tthis.initCountryAndCallingCode(country, callingCode)\n\t}\n\n\tresetNationalSignificantNumber() {\n\t\tthis.nationalSignificantNumber = this.getNationalDigits()\n\t\tthis.nationalSignificantNumberIsModified = false\n\t\tthis.nationalPrefix = undefined\n\t\tthis.carrierCode = undefined\n\t\tthis.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = undefined\n\t}\n\n\tupdate(properties) {\n\t\tfor (const key of Object.keys(properties)) {\n\t\t\tthis[key] = properties[key]\n\t\t}\n\t}\n\n\tinitCountryAndCallingCode(country, callingCode) {\n\t\tthis.setCountry(country)\n\t\tthis.setCallingCode(callingCode)\n\t}\n\n\tsetCountry(country) {\n\t\tthis.country = country\n\t\tthis.onCountryChange(country)\n\t}\n\n\tsetCallingCode(callingCode) {\n\t\tthis.callingCode = callingCode\n\t\tthis.onCallingCodeChange(callingCode, this.country)\n\t}\n\n\tstartInternationalNumber(country, callingCode) {\n\t\t// Prepend the `+` to parsed input.\n\t\tthis.international = true\n\t\t// If a default country was set then reset it\n\t\t// because an explicitly international phone\n\t\t// number is being entered.\n\t\tthis.initCountryAndCallingCode(country, callingCode)\n\t}\n\n\tappendDigits(nextDigits) {\n\t\tthis.digits += nextDigits\n\t}\n\n\tappendNationalSignificantNumberDigits(nextDigits) {\n\t\tthis.nationalSignificantNumber += nextDigits\n\t}\n\n\t/**\n\t * Returns the part of `this.digits` that corresponds to the national number.\n\t * Basically, all digits that have been input by the user, except for the\n\t * international prefix and the country calling code part\n\t * (if the number is an international one).\n\t * @return {string}\n\t */\n\tgetNationalDigits() {\n\t\tif (this.international) {\n\t\t\treturn this.digits.slice(\n\t\t\t\t(this.IDDPrefix ? this.IDDPrefix.length : 0) +\n\t\t\t\t(this.callingCode ? this.callingCode.length : 0)\n\t\t\t)\n\t\t}\n\t\treturn this.digits\n\t}\n\n\tgetDigitsWithoutInternationalPrefix() {\n\t\tif (this.international) {\n\t\t\tif (this.IDDPrefix) {\n\t\t\t\treturn this.digits.slice(this.IDDPrefix.length)\n\t\t\t}\n\t\t}\n\t\treturn this.digits\n\t}\n}","// Should be the same as `DIGIT_PLACEHOLDER` in `libphonenumber-metadata-generator`.\nexport const DIGIT_PLACEHOLDER = 'x' // '\\u2008' (punctuation space)\nconst DIGIT_PLACEHOLDER_MATCHER = new RegExp(DIGIT_PLACEHOLDER)\n\n// Counts all occurences of a symbol in a string.\n// Unicode-unsafe (because using `.split()`).\nexport function countOccurences(symbol, string) {\n\tlet count = 0\n\t// Using `.split('')` to iterate through a string here\n\t// to avoid requiring `Symbol.iterator` polyfill.\n\t// `.split('')` is generally not safe for Unicode,\n\t// but in this particular case for counting brackets it is safe.\n\t// for (const character of string)\n\tfor (const character of string.split('')) {\n\t\tif (character === symbol) {\n\t\t\tcount++\n\t\t}\n\t}\n\treturn count\n}\n\n// Repeats a string (or a symbol) N times.\n// http://stackoverflow.com/questions/202605/repeat-string-javascript\nexport function repeat(string, times) {\n\tif (times < 1) {\n\t\treturn ''\n\t}\n\tlet result = ''\n\twhile (times > 1) {\n\t\tif (times & 1) {\n\t\t\tresult += string\n\t\t}\n\t\ttimes >>= 1\n\t\tstring += string\n\t}\n\treturn result + string\n}\n\nexport function cutAndStripNonPairedParens(string, cutBeforeIndex) {\n\tif (string[cutBeforeIndex] === ')') {\n\t\tcutBeforeIndex++\n\t}\n\treturn stripNonPairedParens(string.slice(0, cutBeforeIndex))\n}\n\nexport function closeNonPairedParens(template, cut_before) {\n\tconst retained_template = template.slice(0, cut_before)\n\tconst opening_braces = countOccurences('(', retained_template)\n\tconst closing_braces = countOccurences(')', retained_template)\n\tlet dangling_braces = opening_braces - closing_braces\n\twhile (dangling_braces > 0 && cut_before < template.length) {\n\t\tif (template[cut_before] === ')') {\n\t\t\tdangling_braces--\n\t\t}\n\t\tcut_before++\n\t}\n\treturn template.slice(0, cut_before)\n}\n\nexport function stripNonPairedParens(string) {\n\tconst dangling_braces =[]\n\tlet i = 0\n\twhile (i < string.length) {\n\t\tif (string[i] === '(') {\n\t\t\tdangling_braces.push(i)\n\t\t}\n\t\telse if (string[i] === ')') {\n\t\t\tdangling_braces.pop()\n\t\t}\n\t\ti++\n\t}\n\tlet start = 0\n\tlet cleared_string = ''\n\tdangling_braces.push(string.length)\n\tfor (const index of dangling_braces) {\n\t\tcleared_string += string.slice(start, index)\n\t\tstart = index + 1\n\t}\n\treturn cleared_string\n}\n\nexport function populateTemplateWithDigits(template, position, digits) {\n\t// Using `.split('')` to iterate through a string here\n\t// to avoid requiring `Symbol.iterator` polyfill.\n\t// `.split('')` is generally not safe for Unicode,\n\t// but in this particular case for `digits` it is safe.\n\t// for (const digit of digits)\n\tfor (const digit of digits.split('')) {\n\t\t// If there is room for more digits in current `template`,\n\t\t// then set the next digit in the `template`,\n\t\t// and return the formatted digits so far.\n\t\t// If more digits are entered than the current format could handle.\n\t\tif (template.slice(position + 1).search(DIGIT_PLACEHOLDER_MATCHER) < 0) {\n\t\t\treturn\n\t\t}\n\t\tposition = template.search(DIGIT_PLACEHOLDER_MATCHER)\n\t\ttemplate = template.replace(DIGIT_PLACEHOLDER_MATCHER, digit)\n\t}\n\treturn [template, position]\n}","import checkNumberLength from './helpers/checkNumberLength.js'\nimport parseDigits from './helpers/parseDigits.js'\nimport formatNationalNumberUsingFormat from './helpers/formatNationalNumberUsingFormat.js'\n\nexport default function formatCompleteNumber(state, format, {\n\tmetadata,\n\tshouldTryNationalPrefixFormattingRule,\n\tgetSeparatorAfterNationalPrefix\n}) {\n\tconst matcher = new RegExp(`^(?:${format.pattern()})$`)\n\tif (matcher.test(state.nationalSignificantNumber)) {\n\t\treturn formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(\n\t\t\tstate,\n\t\t\tformat,\n\t\t\t{\n\t\t\t\tmetadata,\n\t\t\t\tshouldTryNationalPrefixFormattingRule,\n\t\t\t\tgetSeparatorAfterNationalPrefix\n\t\t\t}\n\t\t)\n\t}\n}\n\nexport function canFormatCompleteNumber(nationalSignificantNumber, metadata) {\n\treturn checkNumberLength(nationalSignificantNumber, undefined, metadata) === 'IS_POSSIBLE'\n}\n\nfunction formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, {\n\tmetadata,\n\tshouldTryNationalPrefixFormattingRule,\n\tgetSeparatorAfterNationalPrefix\n}) {\n\t// `format` has already been checked for `nationalPrefix` requirement.\n\n\tconst {\n\t\tnationalSignificantNumber,\n\t\tinternational,\n\t\tnationalPrefix,\n\t\tcarrierCode\n\t} = state\n\n\t// Format the number with using `national_prefix_formatting_rule`.\n\t// If the resulting formatted number is a valid formatted number, then return it.\n\t//\n\t// Google's AsYouType formatter is different in a way that it doesn't try\n\t// to format using the \"national prefix formatting rule\", and instead it\n\t// simply prepends a national prefix followed by a \" \" character.\n\t// This code does that too, but as a fallback.\n\t// The reason is that \"national prefix formatting rule\" may use parentheses,\n\t// which wouldn't be included has it used the simpler Google's way.\n\t//\n\tif (shouldTryNationalPrefixFormattingRule(format)) {\n\t\tconst formattedNumber = formatNationalNumber(state, format, {\n\t\t\tuseNationalPrefixFormattingRule: true,\n\t\t\tgetSeparatorAfterNationalPrefix,\n\t\t\tmetadata\n\t\t})\n\t\tif (formattedNumber) {\n\t\t\treturn formattedNumber\n\t\t}\n\t}\n\n\t// Format the number without using `national_prefix_formatting_rule`.\n\treturn formatNationalNumber(state, format, {\n\t\tuseNationalPrefixFormattingRule: false,\n\t\tgetSeparatorAfterNationalPrefix,\n\t\tmetadata\n\t})\n}\n\nfunction formatNationalNumber(state, format, {\n\tmetadata,\n\tuseNationalPrefixFormattingRule,\n\tgetSeparatorAfterNationalPrefix\n}) {\n\tlet formattedNationalNumber = formatNationalNumberUsingFormat(\n\t\tstate.nationalSignificantNumber,\n\t\tformat,\n\t\t{\n\t\t\tcarrierCode: state.carrierCode,\n\t\t\tuseInternationalFormat: state.international,\n\t\t\twithNationalPrefix: useNationalPrefixFormattingRule,\n\t\t\tmetadata\n\t\t}\n\t)\n\tif (!useNationalPrefixFormattingRule) {\n\t\tif (state.nationalPrefix) {\n\t\t\t// If a national prefix was extracted, then just prepend it,\n\t\t\t// followed by a \" \" character.\n\t\t\tformattedNationalNumber = state.nationalPrefix +\n\t\t\t\tgetSeparatorAfterNationalPrefix(format) +\n\t\t\t\tformattedNationalNumber\n\t\t} else if (state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) {\n\t\t\tformattedNationalNumber = state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix +\n\t\t\t\t' ' +\n\t\t\t\tformattedNationalNumber\n\t\t}\n\t}\n\tif (isValidFormattedNationalNumber(formattedNationalNumber, state)) {\n\t\treturn formattedNationalNumber\n\t}\n}\n\n// Check that the formatted phone number contains exactly\n// the same digits that have been input by the user.\n// For example, when \"0111523456789\" is input for `AR` country,\n// the extracted `this.nationalSignificantNumber` is \"91123456789\",\n// which means that the national part of `this.digits` isn't simply equal to\n// `this.nationalPrefix` + `this.nationalSignificantNumber`.\n//\n// Also, a `format` can add extra digits to the `this.nationalSignificantNumber`\n// being formatted via `metadata[country].national_prefix_transform_rule`.\n// For example, for `VI` country, it prepends `340` to the national number,\n// and if this check hasn't been implemented, then there would be a bug\n// when `340` \"area coude\" is \"duplicated\" during input for `VI` country:\n// https://github.com/catamphetamine/libphonenumber-js/issues/318\n//\n// So, all these \"gotchas\" are filtered out.\n//\n// In the original Google's code, the comments say:\n// \"Check that we didn't remove nor add any extra digits when we matched\n// this formatting pattern. This usually happens after we entered the last\n// digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when\n// formatted but AYTF should retain all the number entered and not change\n// in order to match a format (of same leading digits and length) display\n// in that way.\"\n// \"If it's the same (i.e entered number and format is same), then it's\n// safe to return this in formatted number as nothing is lost / added.\"\n// Otherwise, don't use this format.\n// https://github.com/google/libphonenumber/commit/3e7c1f04f5e7200f87fb131e6f85c6e99d60f510#diff-9149457fa9f5d608a11bb975c6ef4bc5\n// https://github.com/google/libphonenumber/commit/3ac88c7106e7dcb553bcc794b15f19185928a1c6#diff-2dcb77e833422ee304da348b905cde0b\n//\nfunction isValidFormattedNationalNumber(formattedNationalNumber, state) {\n\treturn parseDigits(formattedNationalNumber) === state.getNationalDigits()\n}","export default class PatternParser {\n\tparse(pattern) {\n\t\tthis.context = [{\n\t\t\tor: true,\n\t\t\tinstructions: []\n\t\t}]\n\n\t\tthis.parsePattern(pattern)\n\n\t\tif (this.context.length !== 1) {\n\t\t\tthrow new Error('Non-finalized contexts left when pattern parse ended')\n\t\t}\n\n\t\tconst { branches, instructions } = this.context[0]\n\n\t\tif (branches) {\n\t\t\treturn {\n\t\t\t\top: '|',\n\t\t\t\targs: branches.concat([\n\t\t\t\t\texpandSingleElementArray(instructions)\n\t\t\t\t])\n\t\t\t}\n\t\t}\n\n\t\t/* istanbul ignore if */\n\t\tif (instructions.length === 0) {\n\t\t\tthrow new Error('Pattern is required')\n\t\t}\n\n\t\tif (instructions.length === 1) {\n\t\t\treturn instructions[0]\n\t\t}\n\n\t\treturn instructions\n\t}\n\n\tstartContext(context) {\n\t\tthis.context.push(context)\n\t}\n\n\tendContext() {\n\t\tthis.context.pop()\n\t}\n\n\tgetContext() {\n\t\treturn this.context[this.context.length - 1]\n\t}\n\n\tparsePattern(pattern) {\n\t\tif (!pattern) {\n\t\t\tthrow new Error('Pattern is required')\n\t\t}\n\n\t\tconst match = pattern.match(OPERATOR)\n\t\tif (!match) {\n\t\t\tif (ILLEGAL_CHARACTER_REGEXP.test(pattern)) {\n\t\t\t\tthrow new Error(`Illegal characters found in a pattern: ${pattern}`)\n\t\t\t}\n\t\t\tthis.getContext().instructions = this.getContext().instructions.concat(\n\t\t\t\tpattern.split('')\n\t\t\t)\n\t\t\treturn\n\t\t}\n\n\t\tconst operator = match[1]\n\t\tconst before = pattern.slice(0, match.index)\n\t\tconst rightPart = pattern.slice(match.index + operator.length)\n\n\t\tswitch (operator) {\n\t\t\tcase '(?:':\n\t\t\t\tif (before) {\n\t\t\t\t\tthis.parsePattern(before)\n\t\t\t\t}\n\t\t\t\tthis.startContext({\n\t\t\t\t\tor: true,\n\t\t\t\t\tinstructions: [],\n\t\t\t\t\tbranches: []\n\t\t\t\t})\n\t\t\t\tbreak\n\n\t\t\tcase ')':\n\t\t\t\tif (!this.getContext().or) {\n\t\t\t\t\tthrow new Error('\")\" operator must be preceded by \"(?:\" operator')\n\t\t\t\t}\n\t\t\t\tif (before) {\n\t\t\t\t\tthis.parsePattern(before)\n\t\t\t\t}\n\t\t\t\tif (this.getContext().instructions.length === 0) {\n\t\t\t\t\tthrow new Error('No instructions found after \"|\" operator in an \"or\" group')\n\t\t\t\t}\n\t\t\t\tconst { branches } = this.getContext()\n\t\t\t\tbranches.push(\n\t\t\t\t\texpandSingleElementArray(\n\t\t\t\t\t\tthis.getContext().instructions\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tthis.endContext()\n\t\t\t\tthis.getContext().instructions.push({\n\t\t\t\t\top: '|',\n\t\t\t\t\targs: branches\n\t\t\t\t})\n\t\t\t\tbreak\n\n\t\t\tcase '|':\n\t\t\t\tif (!this.getContext().or) {\n\t\t\t\t\tthrow new Error('\"|\" operator can only be used inside \"or\" groups')\n\t\t\t\t}\n\t\t\t\tif (before) {\n\t\t\t\t\tthis.parsePattern(before)\n\t\t\t\t}\n\t\t\t\t// The top-level is an implicit \"or\" group, if required.\n\t\t\t\tif (!this.getContext().branches) {\n\t\t\t\t\t// `branches` are not defined only for the root implicit \"or\" operator.\n\t\t\t\t\t/* istanbul ignore else */\n\t\t\t\t\tif (this.context.length === 1) {\n\t\t\t\t\t\tthis.getContext().branches = []\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error('\"branches\" not found in an \"or\" group context')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.getContext().branches.push(\n\t\t\t\t\texpandSingleElementArray(\n\t\t\t\t\t\tthis.getContext().instructions\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tthis.getContext().instructions = []\n\t\t\t\tbreak\n\n\t\t\tcase '[':\n\t\t\t\tif (before) {\n\t\t\t\t\tthis.parsePattern(before)\n\t\t\t\t}\n\t\t\t\tthis.startContext({\n\t\t\t\t\toneOfSet: true\n\t\t\t\t})\n\t\t\t\tbreak\n\n\t\t\tcase ']':\n\t\t\t\tif (!this.getContext().oneOfSet) {\n\t\t\t\t\tthrow new Error('\"]\" operator must be preceded by \"[\" operator')\n\t\t\t\t}\n\t\t\t\tthis.endContext()\n\t\t\t\tthis.getContext().instructions.push({\n\t\t\t\t\top: '[]',\n\t\t\t\t\targs: parseOneOfSet(before)\n\t\t\t\t})\n\t\t\t\tbreak\n\n\t\t\t/* istanbul ignore next */\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unknown operator: ${operator}`)\n\t\t}\n\n\t\tif (rightPart) {\n\t\t\tthis.parsePattern(rightPart)\n\t\t}\n\t}\n}\n\nfunction parseOneOfSet(pattern) {\n\tconst values = []\n\tlet i = 0\n\twhile (i < pattern.length) {\n\t\tif (pattern[i] === '-') {\n\t\t\tif (i === 0 || i === pattern.length - 1) {\n\t\t\t\tthrow new Error(`Couldn't parse a one-of set pattern: ${pattern}`)\n\t\t\t}\n\t\t\tconst prevValue = pattern[i - 1].charCodeAt(0) + 1\n\t\t\tconst nextValue = pattern[i + 1].charCodeAt(0) - 1\n\t\t\tlet value = prevValue\n\t\t\twhile (value <= nextValue) {\n\t\t\t\tvalues.push(String.fromCharCode(value))\n\t\t\t\tvalue++\n\t\t\t}\n\t\t} else {\n\t\t\tvalues.push(pattern[i])\n\t\t}\n\t\ti++\n\t}\n\treturn values\n}\n\nconst ILLEGAL_CHARACTER_REGEXP = /[\\(\\)\\[\\]\\?\\:\\|]/\n\nconst OPERATOR = new RegExp(\n\t// any of:\n\t'(' +\n\t\t// or operator\n\t\t'\\\\|' +\n\t\t// or\n\t\t'|' +\n\t\t// or group start\n\t\t'\\\\(\\\\?\\\\:' +\n\t\t// or\n\t\t'|' +\n\t\t// or group end\n\t\t'\\\\)' +\n\t\t// or\n\t\t'|' +\n\t\t// one-of set start\n\t\t'\\\\[' +\n\t\t// or\n\t\t'|' +\n\t\t// one-of set end\n\t\t'\\\\]' +\n\t')'\n)\n\nfunction expandSingleElementArray(array) {\n\tif (array.length === 1) {\n\t\treturn array[0]\n\t}\n\treturn array\n}","import PatternParser from './AsYouTypeFormatter.PatternParser.js'\n\nexport default class PatternMatcher {\n\tconstructor(pattern) {\n\t\tthis.matchTree = new PatternParser().parse(pattern)\n\t}\n\n\tmatch(string, { allowOverflow } = {}) {\n\t\tif (!string) {\n\t\t\tthrow new Error('String is required')\n\t\t}\n\t\tconst result = match(string.split(''), this.matchTree, true)\n\t\tif (result && result.match) {\n\t\t\tdelete result.matchedChars\n\t\t}\n\t\tif (result && result.overflow) {\n\t\t\tif (!allowOverflow) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\treturn result\n\t}\n}\n\n/**\n * Matches `characters` against a pattern compiled into a `tree`.\n * @param {string[]} characters\n * @param {Tree} tree — A pattern compiled into a `tree`. See the `*.d.ts` file for the description of the `tree` structure.\n * @param {boolean} last — Whether it's the last (rightmost) subtree on its level of the match tree.\n * @return {object} See the `*.d.ts` file for the description of the result object.\n */\nfunction match(characters, tree, last) {\n\t// If `tree` is a string, then `tree` is a single character.\n\t// That's because when a pattern is parsed, multi-character-string parts\n\t// of a pattern are compiled into arrays of single characters.\n\t// I still wrote this piece of code for a \"general\" hypothetical case\n\t// when `tree` could be a string of several characters, even though\n\t// such case is not possible with the current implementation.\n\tif (typeof tree === 'string') {\n\t\tconst characterString = characters.join('')\n\t\tif (tree.indexOf(characterString) === 0) {\n\t\t\t// `tree` is always a single character.\n\t\t\t// If `tree.indexOf(characterString) === 0`\n\t\t\t// then `characters.length === tree.length`.\n\t\t\t/* istanbul ignore else */\n\t\t\tif (characters.length === tree.length) {\n\t\t\t\treturn {\n\t\t\t\t\tmatch: true,\n\t\t\t\t\tmatchedChars: characters\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `tree` is always a single character.\n\t\t\t// If `tree.indexOf(characterString) === 0`\n\t\t\t// then `characters.length === tree.length`.\n\t\t\t/* istanbul ignore next */\n\t\t\treturn {\n\t\t\t\tpartialMatch: true,\n\t\t\t\t// matchedChars: characters\n\t\t\t}\n\t\t}\n\t\tif (characterString.indexOf(tree) === 0) {\n\t\t\tif (last) {\n\t\t\t\t// The `else` path is not possible because `tree` is always a single character.\n\t\t\t\t// The `else` case for `characters.length > tree.length` would be\n\t\t\t\t// `characters.length <= tree.length` which means `characters.length <= 1`.\n\t\t\t\t// `characters` array can't be empty, so that means `characters === [tree]`,\n\t\t\t\t// which would also mean `tree.indexOf(characterString) === 0` and that'd mean\n\t\t\t\t// that the `if (tree.indexOf(characterString) === 0)` condition before this\n\t\t\t\t// `if` condition would be entered, and returned from there, not reaching this code.\n\t\t\t\t/* istanbul ignore else */\n\t\t\t\tif (characters.length > tree.length) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\toverflow: true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatch: true,\n\t\t\t\tmatchedChars: characters.slice(0, tree.length)\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\n\tif (Array.isArray(tree)) {\n\t\tlet restCharacters = characters.slice()\n\t\tlet i = 0\n\t\twhile (i < tree.length) {\n\t\t\tconst subtree = tree[i]\n\t\t\tconst result = match(restCharacters, subtree, last && (i === tree.length - 1))\n\t\t\tif (!result) {\n\t\t\t\treturn\n\t\t\t} else if (result.overflow) {\n\t\t\t\treturn result\n\t\t\t} else if (result.match) {\n\t\t\t\t// Continue with the next subtree with the rest of the characters.\n\t\t\t\trestCharacters = restCharacters.slice(result.matchedChars.length)\n\t\t\t\tif (restCharacters.length === 0) {\n\t\t\t\t\tif (i === tree.length - 1) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tmatch: true,\n\t\t\t\t\t\t\tmatchedChars: characters\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tpartialMatch: true,\n\t\t\t\t\t\t\t// matchedChars: characters\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/* istanbul ignore else */\n\t\t\t\tif (result.partialMatch) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpartialMatch: true,\n\t\t\t\t\t\t// matchedChars: characters\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Unsupported match result:\\n${JSON.stringify(result, null, 2)}`)\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++\n\t\t}\n\t\t// If `last` then overflow has already been checked\n\t\t// by the last element of the `tree` array.\n\t\t/* istanbul ignore if */\n\t\tif (last) {\n\t\t\treturn {\n\t\t\t\toverflow: true\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tmatch: true,\n\t\t\tmatchedChars: characters.slice(0, characters.length - restCharacters.length)\n\t\t}\n\t}\n\n\tswitch (tree.op) {\n\t\tcase '|':\n\t\t\tlet partialMatch\n\t\t\tfor (const branch of tree.args) {\n\t\t\t\tconst result = match(characters, branch, last)\n\t\t\t\tif (result) {\n\t\t\t\t\tif (result.overflow) {\n\t\t\t\t\t\treturn result\n\t\t\t\t\t} else if (result.match) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tmatch: true,\n\t\t\t\t\t\t\tmatchedChars: result.matchedChars\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/* istanbul ignore else */\n\t\t\t\t\t\tif (result.partialMatch) {\n\t\t\t\t\t\t\tpartialMatch = true\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new Error(`Unsupported match result:\\n${JSON.stringify(result, null, 2)}`)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (partialMatch) {\n\t\t\t\treturn {\n\t\t\t\t\tpartialMatch: true,\n\t\t\t\t\t// matchedChars: ...\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Not even a partial match.\n\t\t\treturn\n\n\t\tcase '[]':\n\t\t\tfor (const char of tree.args) {\n\t\t\t\tif (characters[0] === char) {\n\t\t\t\t\tif (characters.length === 1) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tmatch: true,\n\t\t\t\t\t\t\tmatchedChars: characters\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (last) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\toverflow: true\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tmatch: true,\n\t\t\t\t\t\tmatchedChars: [char]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// No character matches.\n\t\t\treturn\n\n\t\t/* istanbul ignore next */\n\t\tdefault:\n\t\t\tthrow new Error(`Unsupported instruction tree: ${tree}`)\n\t}\n}","import {\n\tDIGIT_PLACEHOLDER,\n\tcountOccurences,\n\trepeat,\n\tcutAndStripNonPairedParens,\n\tcloseNonPairedParens,\n\tstripNonPairedParens,\n\tpopulateTemplateWithDigits\n} from './AsYouTypeFormatter.util.js'\n\nimport formatCompleteNumber, {\n\tcanFormatCompleteNumber\n} from './AsYouTypeFormatter.complete.js'\n\nimport PatternMatcher from './AsYouTypeFormatter.PatternMatcher.js'\n\nimport parseDigits from './helpers/parseDigits.js'\nexport { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.util.js'\nimport { FIRST_GROUP_PATTERN } from './helpers/formatNationalNumberUsingFormat.js'\nimport { VALID_PUNCTUATION } from './constants.js'\nimport applyInternationalSeparatorStyle from './helpers/applyInternationalSeparatorStyle.js'\n\n// Used in phone number format template creation.\n// Could be any digit, I guess.\nconst DUMMY_DIGIT = '9'\n// I don't know why is it exactly `15`\nconst LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15\n// Create a phone number consisting only of the digit 9 that matches the\n// `number_pattern` by applying the pattern to the \"longest phone number\" string.\nconst LONGEST_DUMMY_PHONE_NUMBER = repeat(DUMMY_DIGIT, LONGEST_NATIONAL_PHONE_NUMBER_LENGTH)\n\n// A set of characters that, if found in a national prefix formatting rules, are an indicator to\n// us that we should separate the national prefix from the number when formatting.\nconst NATIONAL_PREFIX_SEPARATORS_PATTERN = /[- ]/\n\n// Deprecated: Google has removed some formatting pattern related code from their repo.\n// https://github.com/googlei18n/libphonenumber/commit/a395b4fef3caf57c4bc5f082e1152a4d2bd0ba4c\n// \"We no longer have numbers in formatting matching patterns, only \\d.\"\n// Because this library supports generating custom metadata\n// some users may still be using old metadata so the relevant\n// code seems to stay until some next major version update.\nconst SUPPORT_LEGACY_FORMATTING_PATTERNS = true\n\n// A pattern that is used to match character classes in regular expressions.\n// An example of a character class is \"[1-4]\".\nconst CREATE_CHARACTER_CLASS_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && (() => /\\[([^\\[\\]])*\\]/g)\n\n// Any digit in a regular expression that actually denotes a digit. For\n// example, in the regular expression \"80[0-2]\\d{6,10}\", the first 2 digits\n// (8 and 0) are standalone digits, but the rest are not.\n// Two look-aheads are needed because the number following \\\\d could be a\n// two-digit number, since the phone number can be as long as 15 digits.\nconst CREATE_STANDALONE_DIGIT_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && (() => /\\d(?=[^,}][^,}])/g)\n\n// A regular expression that is used to determine if a `format` is\n// suitable to be used in the \"as you type formatter\".\n// A `format` is suitable when the resulting formatted number has\n// the same digits as the user has entered.\n//\n// In the simplest case, that would mean that the format\n// doesn't add any additional digits when formatting a number.\n// Google says that it also shouldn't add \"star\" (`*`) characters,\n// like it does in some Israeli formats.\n// Such basic format would only contain \"valid punctuation\"\n// and \"captured group\" identifiers ($1, $2, etc).\n//\n// An example of a format that adds additional digits:\n//\n// Country: `AR` (Argentina).\n// Format:\n// {\n// \"pattern\": \"(\\\\d)(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\n// \"leading_digits_patterns\": [\"91\"],\n// \"national_prefix_formatting_rule\": \"0$1\",\n// \"format\": \"$2 15-$3-$4\",\n// \"international_format\": \"$1 $2 $3-$4\"\n// }\n//\n// In the format above, the `format` adds `15` to the digits when formatting a number.\n// A sidenote: this format actually is suitable because `national_prefix_for_parsing`\n// has previously removed `15` from a national number, so re-adding `15` in `format`\n// doesn't actually result in any extra digits added to user's input.\n// But verifying that would be a complex procedure, so the code chooses a simpler path:\n// it simply filters out all `format`s that contain anything but \"captured group\" ids.\n//\n// This regular expression is called `ELIGIBLE_FORMAT_PATTERN` in Google's\n// `libphonenumber` code.\n//\nconst NON_ALTERING_FORMAT_REG_EXP = new RegExp(\n\t'[' + VALID_PUNCTUATION + ']*' +\n\t// Google developers say:\n\t// \"We require that the first matching group is present in the\n\t// output pattern to ensure no data is lost while formatting.\"\n\t'\\\\$1' +\n\t'[' + VALID_PUNCTUATION + ']*' +\n\t'(\\\\$\\\\d[' + VALID_PUNCTUATION + ']*)*' +\n\t'$'\n)\n\n// This is the minimum length of the leading digits of a phone number\n// to guarantee the first \"leading digits pattern\" for a phone number format\n// to be preemptive.\nconst MIN_LEADING_DIGITS_LENGTH = 3\n\nexport default class AsYouTypeFormatter {\n\tconstructor({\n\t\tstate,\n\t\tmetadata\n\t}) {\n\t\tthis.metadata = metadata\n\t\tthis.resetFormat()\n\t}\n\n\tresetFormat() {\n\t\tthis.chosenFormat = undefined\n\t\tthis.template = undefined\n\t\tthis.nationalNumberTemplate = undefined\n\t\tthis.populatedNationalNumberTemplate = undefined\n\t\tthis.populatedNationalNumberTemplatePosition = -1\n\t}\n\n\treset(numberingPlan, state) {\n\t\tthis.resetFormat()\n\t\tif (numberingPlan) {\n\t\t\tthis.isNANP = numberingPlan.callingCode() === '1'\n\t\t\tthis.matchingFormats = numberingPlan.formats()\n\t\t\tif (state.nationalSignificantNumber) {\n\t\t\t\tthis.narrowDownMatchingFormats(state)\n\t\t\t}\n\t\t} else {\n\t\t\tthis.isNANP = undefined\n\t\t\tthis.matchingFormats = []\n\t\t}\n\t}\n\n\t/**\n\t * Formats an updated phone number.\n\t * @param {string} nextDigits — Additional phone number digits.\n\t * @param {object} state — `AsYouType` state.\n\t * @return {[string]} Returns undefined if the updated phone number can't be formatted using any of the available formats.\n\t */\n\tformat(nextDigits, state) {\n\t\t// See if the phone number digits can be formatted as a complete phone number.\n\t\t// If not, use the results from `formatNationalNumberWithNextDigits()`,\n\t\t// which formats based on the chosen formatting pattern.\n\t\t//\n\t\t// Attempting to format complete phone number first is how it's done\n\t\t// in Google's `libphonenumber`, so this library just follows it.\n\t\t// Google's `libphonenumber` code doesn't explain in detail why does it\n\t\t// attempt to format digits as a complete phone number\n\t\t// instead of just going with a previoulsy (or newly) chosen `format`:\n\t\t//\n\t\t// \"Checks to see if there is an exact pattern match for these digits.\n\t\t// If so, we should use this instead of any other formatting template\n\t\t// whose leadingDigitsPattern also matches the input.\"\n\t\t//\n\t\tif (canFormatCompleteNumber(state.nationalSignificantNumber, this.metadata)) {\n\t\t\tfor (const format of this.matchingFormats) {\n\t\t\t\tconst formattedCompleteNumber = formatCompleteNumber(\n\t\t\t\t\tstate,\n\t\t\t\t\tformat,\n\t\t\t\t\t{\n\t\t\t\t\t\tmetadata: this.metadata,\n\t\t\t\t\t\tshouldTryNationalPrefixFormattingRule: (format) => this.shouldTryNationalPrefixFormattingRule(format, {\n\t\t\t\t\t\t\tinternational: state.international,\n\t\t\t\t\t\t\tnationalPrefix: state.nationalPrefix\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tgetSeparatorAfterNationalPrefix: (format) => this.getSeparatorAfterNationalPrefix(format)\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t\tif (formattedCompleteNumber) {\n\t\t\t\t\tthis.resetFormat()\n\t\t\t\t\tthis.chosenFormat = format\n\t\t\t\t\tthis.setNationalNumberTemplate(formattedCompleteNumber.replace(/\\d/g, DIGIT_PLACEHOLDER), state)\n\t\t\t\t\tthis.populatedNationalNumberTemplate = formattedCompleteNumber\n\t\t\t\t\t// With a new formatting template, the matched position\n\t\t\t\t\t// using the old template needs to be reset.\n\t\t\t\t\tthis.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(DIGIT_PLACEHOLDER)\n\t\t\t\t\treturn formattedCompleteNumber\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t// Format the digits as a partial (incomplete) phone number\n\t\t// using the previously chosen formatting pattern (or a newly chosen one).\n\t\treturn this.formatNationalNumberWithNextDigits(nextDigits, state)\n\t}\n\n\t// Formats the next phone number digits.\n\tformatNationalNumberWithNextDigits(nextDigits, state) {\n\t\tconst previouslyChosenFormat = this.chosenFormat\n\n\t\t// Choose a format from the list of matching ones.\n\t\tconst newlyChosenFormat = this.chooseFormat(state)\n\n\t\tif (newlyChosenFormat) {\n\t\t\tif (newlyChosenFormat === previouslyChosenFormat) {\n\t\t\t\t// If it can format the next (current) digits\n\t\t\t\t// using the previously chosen phone number format\n\t\t\t\t// then return the updated formatted number.\n\t\t\t\treturn this.formatNextNationalNumberDigits(nextDigits)\n\t\t\t} else {\n\t\t\t\t// If a more appropriate phone number format\n\t\t\t\t// has been chosen for these \"leading digits\",\n\t\t\t\t// then re-format the national phone number part\n\t\t\t\t// using the newly selected format.\n\t\t\t\treturn this.formatNextNationalNumberDigits(state.getNationalDigits())\n\t\t\t}\n\t\t}\n\t}\n\n\tnarrowDownMatchingFormats({\n\t\tnationalSignificantNumber,\n\t\tnationalPrefix,\n\t\tinternational\n\t}) {\n\t\tconst leadingDigits = nationalSignificantNumber\n\n\t\t// \"leading digits\" pattern list starts with a\n\t\t// \"leading digits\" pattern fitting a maximum of 3 leading digits.\n\t\t// So, after a user inputs 3 digits of a national (significant) phone number\n\t\t// this national (significant) number can already be formatted.\n\t\t// The next \"leading digits\" pattern is for 4 leading digits max,\n\t\t// and the \"leading digits\" pattern after it is for 5 leading digits max, etc.\n\n\t\t// This implementation is different from Google's\n\t\t// in that it searches for a fitting format\n\t\t// even if the user has entered less than\n\t\t// `MIN_LEADING_DIGITS_LENGTH` digits of a national number.\n\t\t// Because some leading digit patterns already match for a single first digit.\n\t\tlet leadingDigitsPatternIndex = leadingDigits.length - MIN_LEADING_DIGITS_LENGTH\n\t\tif (leadingDigitsPatternIndex < 0) {\n\t\t\tleadingDigitsPatternIndex = 0\n\t\t}\n\n\t\tthis.matchingFormats = this.matchingFormats.filter(\n\t\t\tformat => this.formatSuits(format, international, nationalPrefix)\n\t\t\t\t&& this.formatMatches(format, leadingDigits, leadingDigitsPatternIndex)\n\t\t)\n\n\t\t// If there was a phone number format chosen\n\t\t// and it no longer holds given the new leading digits then reset it.\n\t\t// The test for this `if` condition is marked as:\n\t\t// \"Reset a chosen format when it no longer holds given the new leading digits\".\n\t\t// To construct a valid test case for this one can find a country\n\t\t// in `PhoneNumberMetadata.xml` yielding one format for 3 `<leadingDigits>`\n\t\t// and yielding another format for 4 `<leadingDigits>` (Australia in this case).\n\t\tif (this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1) {\n\t\t\tthis.resetFormat()\n\t\t}\n\t}\n\n\tformatSuits(format, international, nationalPrefix) {\n\t\t// When a prefix before a national (significant) number is\n\t\t// simply a national prefix, then it's parsed as `this.nationalPrefix`.\n\t\t// In more complex cases, a prefix before national (significant) number\n\t\t// could include a national prefix as well as some \"capturing groups\",\n\t\t// and in that case there's no info whether a national prefix has been parsed.\n\t\t// If national prefix is not used when formatting a phone number\n\t\t// using this format, but a national prefix has been entered by the user,\n\t\t// and was extracted, then discard such phone number format.\n\t\t// In Google's \"AsYouType\" formatter code, the equivalent would be this part:\n\t\t// https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L175-L184\n\t\tif (nationalPrefix &&\n\t\t\t!format.usesNationalPrefix() &&\n\t\t\t// !format.domesticCarrierCodeFormattingRule() &&\n\t\t\t!format.nationalPrefixIsOptionalWhenFormattingInNationalFormat()) {\n\t\t\treturn false\n\t\t}\n\t\t// If national prefix is mandatory for this phone number format\n\t\t// and there're no guarantees that a national prefix is present in user input\n\t\t// then discard this phone number format as not suitable.\n\t\t// In Google's \"AsYouType\" formatter code, the equivalent would be this part:\n\t\t// https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L185-L193\n\t\tif (!international &&\n\t\t\t!nationalPrefix &&\n\t\t\tformat.nationalPrefixIsMandatoryWhenFormattingInNationalFormat()) {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n\n\tformatMatches(format, leadingDigits, leadingDigitsPatternIndex) {\n\t\tconst leadingDigitsPatternsCount = format.leadingDigitsPatterns().length\n\n\t\t// If this format is not restricted to a certain\n\t\t// leading digits pattern then it fits.\n\t\t// The test case could be found by searching for \"leadingDigitsPatternsCount === 0\".\n\t\tif (leadingDigitsPatternsCount === 0) {\n\t\t\treturn true\n\t\t}\n\n\t\t// Start narrowing down the list of possible formats based on the leading digits.\n\t\t// (only previously matched formats take part in the narrowing down process)\n\n\t\t// `leading_digits_patterns` start with 3 digits min\n\t\t// and then go up from there one digit at a time.\n\t\tleadingDigitsPatternIndex = Math.min(leadingDigitsPatternIndex, leadingDigitsPatternsCount - 1)\n\t\tconst leadingDigitsPattern = format.leadingDigitsPatterns()[leadingDigitsPatternIndex]\n\n\t\t// Google imposes a requirement on the leading digits\n\t\t// to be minimum 3 digits long in order to be eligible\n\t\t// for checking those with a leading digits pattern.\n\t\t//\n\t\t// Since `leading_digits_patterns` start with 3 digits min,\n\t\t// Google's original `libphonenumber` library only starts\n\t\t// excluding any non-matching formats only when the\n\t\t// national number entered so far is at least 3 digits long,\n\t\t// otherwise format matching would give false negatives.\n\t\t//\n\t\t// For example, when the digits entered so far are `2`\n\t\t// and the leading digits pattern is `21` –\n\t\t// it's quite obvious in this case that the format could be the one\n\t\t// but due to the absence of further digits it would give false negative.\n\t\t//\n\t\t// Also, `leading_digits_patterns` doesn't always correspond to a single\n\t\t// digits count. For example, `60|8` pattern would already match `8`\n\t\t// but the `60` part would require having at least two leading digits,\n\t\t// so the whole pattern would require inputting two digits first in order to\n\t\t// decide on whether it matches the input, even when the input is \"80\".\n\t\t//\n\t\t// This library — `libphonenumber-js` — allows filtering by `leading_digits_patterns`\n\t\t// even when there's only 1 or 2 digits of the national (significant) number.\n\t\t// To do that, it uses a non-strict pattern matcher written specifically for that.\n\t\t//\n\t\tif (leadingDigits.length < MIN_LEADING_DIGITS_LENGTH) {\n\t\t\t// Before leading digits < 3 matching was implemented:\n\t\t\t// return true\n\t\t\t//\n\t\t\t// After leading digits < 3 matching was implemented:\n\t\t\ttry {\n\t\t\t\treturn new PatternMatcher(leadingDigitsPattern).match(leadingDigits, { allowOverflow: true }) !== undefined\n\t\t\t} catch (error) /* istanbul ignore next */ {\n\t\t\t\t// There's a slight possibility that there could be some undiscovered bug\n\t\t\t\t// in the pattern matcher code. Since the \"leading digits < 3 matching\"\n\t\t\t\t// feature is not \"essential\" for operation, it can fall back to the old way\n\t\t\t\t// in case of any issues rather than halting the application's execution.\n\t\t\t\tconsole.error(error)\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\t// If at least `MIN_LEADING_DIGITS_LENGTH` digits of a national number are\n\t\t// available then use the usual regular expression matching.\n\t\t//\n\t\t// The whole pattern is wrapped in round brackets (`()`) because\n\t\t// the pattern can use \"or\" operator (`|`) at the top level of the pattern.\n\t\t//\n\t\treturn new RegExp(`^(${leadingDigitsPattern})`).test(leadingDigits)\n\t}\n\n\tgetFormatFormat(format, international) {\n\t\treturn international ? format.internationalFormat() : format.format()\n\t}\n\n\tchooseFormat(state) {\n\t\t// When there are multiple available formats, the formatter uses the first\n\t\t// format where a formatting template could be created.\n\t\t//\n\t\t// For some weird reason, `istanbul` says \"else path not taken\"\n\t\t// for the `for of` line below. Supposedly that means that\n\t\t// the loop doesn't ever go over the last element in the list.\n\t\t// That's true because there always is `this.chosenFormat`\n\t\t// when `this.matchingFormats` is non-empty.\n\t\t// And, for some weird reason, it doesn't think that the case\n\t\t// with empty `this.matchingFormats` qualifies for a valid \"else\" path.\n\t\t// So simply muting this `istanbul` warning.\n\t\t// It doesn't skip the contents of the `for of` loop,\n\t\t// it just skips the `for of` line.\n\t\t//\n\t\t/* istanbul ignore next */\n\t\tfor (const format of this.matchingFormats.slice()) {\n\t\t\t// If this format is currently being used\n\t\t\t// and is still suitable, then stick to it.\n\t\t\tif (this.chosenFormat === format) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// Sometimes, a formatting rule inserts additional digits in a phone number,\n\t\t\t// and \"as you type\" formatter can't do that: it should only use the digits\n\t\t\t// that the user has input.\n\t\t\t//\n\t\t\t// For example, in Argentina, there's a format for mobile phone numbers:\n\t\t\t//\n\t\t\t// {\n\t\t\t// \"pattern\": \"(\\\\d)(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\n\t\t\t// \"leading_digits_patterns\": [\"91\"],\n\t\t\t// \"national_prefix_formatting_rule\": \"0$1\",\n\t\t\t// \"format\": \"$2 15-$3-$4\",\n\t\t\t// \"international_format\": \"$1 $2 $3-$4\"\n\t\t\t// }\n\t\t\t//\n\t\t\t// In that format, `international_format` is used instead of `format`\n\t\t\t// because `format` inserts `15` in the formatted number,\n\t\t\t// and `AsYouType` formatter should only use the digits\n\t\t\t// the user has actually input, without adding any extra digits.\n\t\t\t// In this case, it wouldn't make a difference, because the `15`\n\t\t\t// is first stripped when applying `national_prefix_for_parsing`\n\t\t\t// and then re-added when using `format`, so in reality it doesn't\n\t\t\t// add any new digits to the number, but to detect that, the code\n\t\t\t// would have to be more complex: it would have to try formatting\n\t\t\t// the digits using the format and then see if any digits have\n\t\t\t// actually been added or removed, and then, every time a new digit\n\t\t\t// is input, it should re-check whether the chosen format doesn't\n\t\t\t// alter the digits.\n\t\t\t//\n\t\t\t// Google's code doesn't go that far, and so does this library:\n\t\t\t// it simply requires that a `format` doesn't add any additonal\n\t\t\t// digits to user's input.\n\t\t\t//\n\t\t\t// Also, people in general should move from inputting phone numbers\n\t\t\t// in national format (possibly with national prefixes)\n\t\t\t// and use international phone number format instead:\n\t\t\t// it's a logical thing in the modern age of mobile phones,\n\t\t\t// globalization and the internet.\n\t\t\t//\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!NON_ALTERING_FORMAT_REG_EXP.test(this.getFormatFormat(format, state.international))) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (!this.createTemplateForFormat(format, state)) {\n\t\t\t\t// Remove the format if it can't generate a template.\n\t\t\t\tthis.matchingFormats = this.matchingFormats.filter(_ => _ !== format)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tthis.chosenFormat = format\n\t\t\tbreak\n\t\t}\n\t\tif (!this.chosenFormat) {\n\t\t\t// No format matches the national (significant) phone number.\n\t\t\tthis.resetFormat()\n\t\t}\n\t\treturn this.chosenFormat\n\t}\n\n\tcreateTemplateForFormat(format, state) {\n\t\t// The formatter doesn't format numbers when numberPattern contains '|', e.g.\n\t\t// (20|3)\\d{4}. In those cases we quickly return.\n\t\t// (Though there's no such format in current metadata)\n\t\t/* istanbul ignore if */\n\t\tif (SUPPORT_LEGACY_FORMATTING_PATTERNS && format.pattern().indexOf('|') >= 0) {\n\t\t\treturn\n\t\t}\n\t\t// Get formatting template for this phone number format\n\t\tconst template = this.getTemplateForFormat(format, state)\n\t\t// If the national number entered is too long\n\t\t// for any phone number format, then abort.\n\t\tif (template) {\n\t\t\tthis.setNationalNumberTemplate(template, state)\n\t\t\treturn true\n\t\t}\n\t}\n\n\tgetSeparatorAfterNationalPrefix(format) {\n\t\t// `US` metadata doesn't have a `national_prefix_formatting_rule`,\n\t\t// so the `if` condition below doesn't apply to `US`,\n\t\t// but in reality there shoudl be a separator\n\t\t// between a national prefix and a national (significant) number.\n\t\t// So `US` national prefix separator is a \"special\" \"hardcoded\" case.\n\t\tif (this.isNANP) {\n\t\t\treturn ' '\n\t\t}\n\t\t// If a `format` has a `national_prefix_formatting_rule`\n\t\t// and that rule has a separator after a national prefix,\n\t\t// then it means that there should be a separator\n\t\t// between a national prefix and a national (significant) number.\n\t\tif (format &&\n\t\t\tformat.nationalPrefixFormattingRule() &&\n\t\t\tNATIONAL_PREFIX_SEPARATORS_PATTERN.test(format.nationalPrefixFormattingRule())) {\n\t\t\treturn ' '\n\t\t}\n\t\t// At this point, there seems to be no clear evidence that\n\t\t// there should be a separator between a national prefix\n\t\t// and a national (significant) number. So don't insert one.\n\t\treturn ''\n\t}\n\n\tgetInternationalPrefixBeforeCountryCallingCode({ IDDPrefix, missingPlus }, options) {\n\t\tif (IDDPrefix) {\n\t\t\treturn options && options.spacing === false ? IDDPrefix : IDDPrefix + ' '\n\t\t}\n\t\tif (missingPlus) {\n\t\t\treturn ''\n\t\t}\n\t\treturn '+'\n\t}\n\n\tgetTemplate(state) {\n\t\tif (!this.template) {\n\t\t\treturn\n\t\t}\n\t\t// `this.template` holds the template for a \"complete\" phone number.\n\t\t// The currently entered phone number is most likely not \"complete\",\n\t\t// so trim all non-populated digits.\n\t\tlet index = -1\n\t\tlet i = 0\n\t\tconst internationalPrefix = state.international ? this.getInternationalPrefixBeforeCountryCallingCode(state, { spacing: false }) : ''\n\t\twhile (i < internationalPrefix.length + state.getDigitsWithoutInternationalPrefix().length) {\n\t\t\tindex = this.template.indexOf(DIGIT_PLACEHOLDER, index + 1)\n\t\t\ti++\n\t\t}\n\t\treturn cutAndStripNonPairedParens(this.template, index + 1)\n\t}\n\n\tsetNationalNumberTemplate(template, state) {\n\t\tthis.nationalNumberTemplate = template\n\t\tthis.populatedNationalNumberTemplate = template\n\t\t// With a new formatting template, the matched position\n\t\t// using the old template needs to be reset.\n\t\tthis.populatedNationalNumberTemplatePosition = -1\n\t\t// For convenience, the public `.template` property\n\t\t// contains the whole international number\n\t\t// if the phone number being input is international:\n\t\t// 'x' for the '+' sign, 'x'es for the country phone code,\n\t\t// a spacebar and then the template for the formatted national number.\n\t\tif (state.international) {\n\t\t\tthis.template =\n\t\t\t\tthis.getInternationalPrefixBeforeCountryCallingCode(state).replace(/[\\d\\+]/g, DIGIT_PLACEHOLDER) +\n\t\t\t\trepeat(DIGIT_PLACEHOLDER, state.callingCode.length) +\n\t\t\t\t' ' +\n\t\t\t\ttemplate\n\t\t} else {\n\t\t\tthis.template = template\n\t\t}\n\t}\n\n\t/**\n\t * Generates formatting template for a national phone number,\n\t * optionally containing a national prefix, for a format.\n\t * @param {Format} format\n\t * @param {string} nationalPrefix\n\t * @return {string}\n\t */\n\tgetTemplateForFormat(format, {\n\t\tnationalSignificantNumber,\n\t\tinternational,\n\t\tnationalPrefix,\n\t\tprefixBeforeNationalSignificantNumberThatIsNotNationalPrefix\n\t}) {\n\t\tlet pattern = format.pattern()\n\n\t\t/* istanbul ignore else */\n\t\tif (SUPPORT_LEGACY_FORMATTING_PATTERNS) {\n\t\t\tpattern = pattern\n\t\t\t\t// Replace anything in the form of [..] with \\d\n\t\t\t\t.replace(CREATE_CHARACTER_CLASS_PATTERN(), '\\\\d')\n\t\t\t\t// Replace any standalone digit (not the one in `{}`) with \\d\n\t\t\t\t.replace(CREATE_STANDALONE_DIGIT_PATTERN(), '\\\\d')\n\t\t}\n\n\t\t// Generate a dummy national number (consisting of `9`s)\n\t\t// that fits this format's `pattern`.\n\t\t//\n\t\t// This match will always succeed,\n\t\t// because the \"longest dummy phone number\"\n\t\t// has enough length to accomodate any possible\n\t\t// national phone number format pattern.\n\t\t//\n\t\tlet digits = LONGEST_DUMMY_PHONE_NUMBER.match(pattern)[0]\n\n\t\t// If the national number entered is too long\n\t\t// for any phone number format, then abort.\n\t\tif (nationalSignificantNumber.length > digits.length) {\n\t\t\treturn\n\t\t}\n\n\t\t// Get a formatting template which can be used to efficiently format\n\t\t// a partial number where digits are added one by one.\n\n\t\t// Below `strictPattern` is used for the\n\t\t// regular expression (with `^` and `$`).\n\t\t// This wasn't originally in Google's `libphonenumber`\n\t\t// and I guess they don't really need it\n\t\t// because they're not using \"templates\" to format phone numbers\n\t\t// but I added `strictPattern` after encountering\n\t\t// South Korean phone number formatting bug.\n\t\t//\n\t\t// Non-strict regular expression bug demonstration:\n\t\t//\n\t\t// this.nationalSignificantNumber : `111111111` (9 digits)\n\t\t//\n\t\t// pattern : (\\d{2})(\\d{3,4})(\\d{4})\n\t\t// format : `$1 $2 $3`\n\t\t// digits : `9999999999` (10 digits)\n\t\t//\n\t\t// '9999999999'.replace(new RegExp(/(\\d{2})(\\d{3,4})(\\d{4})/g), '$1 $2 $3') = \"99 9999 9999\"\n\t\t//\n\t\t// template : xx xxxx xxxx\n\t\t//\n\t\t// But the correct template in this case is `xx xxx xxxx`.\n\t\t// The template was generated incorrectly because of the\n\t\t// `{3,4}` variability in the `pattern`.\n\t\t//\n\t\t// The fix is, if `this.nationalSignificantNumber` has already sufficient length\n\t\t// to satisfy the `pattern` completely then `this.nationalSignificantNumber`\n\t\t// is used instead of `digits`.\n\n\t\tconst strictPattern = new RegExp('^' + pattern + '$')\n\t\tconst nationalNumberDummyDigits = nationalSignificantNumber.replace(/\\d/g, DUMMY_DIGIT)\n\n\t\t// If `this.nationalSignificantNumber` has already sufficient length\n\t\t// to satisfy the `pattern` completely then use it\n\t\t// instead of `digits`.\n\t\tif (strictPattern.test(nationalNumberDummyDigits)) {\n\t\t\tdigits = nationalNumberDummyDigits\n\t\t}\n\n\t\tlet numberFormat = this.getFormatFormat(format, international)\n\t\tlet nationalPrefixIncludedInTemplate\n\n\t\t// If a user did input a national prefix (and that's guaranteed),\n\t\t// and if a `format` does have a national prefix formatting rule,\n\t\t// then see if that national prefix formatting rule\n\t\t// prepends exactly the same national prefix the user has input.\n\t\t// If that's the case, then use the `format` with the national prefix formatting rule.\n\t\t// Otherwise, use the `format` without the national prefix formatting rule,\n\t\t// and prepend a national prefix manually to it.\n\t\tif (this.shouldTryNationalPrefixFormattingRule(format, { international, nationalPrefix })) {\n\t\t\tconst numberFormatWithNationalPrefix = numberFormat.replace(\n\t\t\t\tFIRST_GROUP_PATTERN,\n\t\t\t\tformat.nationalPrefixFormattingRule()\n\t\t\t)\n\t\t\t// If `national_prefix_formatting_rule` of a `format` simply prepends\n\t\t\t// national prefix at the start of a national (significant) number,\n\t\t\t// then such formatting can be used with `AsYouType` formatter.\n\t\t\t// There seems to be no `else` case: everywhere in metadata,\n\t\t\t// national prefix formatting rule is national prefix + $1,\n\t\t\t// or `($1)`, in which case such format isn't even considered\n\t\t\t// when the user has input a national prefix.\n\t\t\t/* istanbul ignore else */\n\t\t\tif (parseDigits(format.nationalPrefixFormattingRule()) === (nationalPrefix || '') + parseDigits('$1')) {\n\t\t\t\tnumberFormat = numberFormatWithNationalPrefix\n\t\t\t\tnationalPrefixIncludedInTemplate = true\n\t\t\t\t// Replace all digits of the national prefix in the formatting template\n\t\t\t\t// with `DIGIT_PLACEHOLDER`s.\n\t\t\t\tif (nationalPrefix) {\n\t\t\t\t\tlet i = nationalPrefix.length\n\t\t\t\t\twhile (i > 0) {\n\t\t\t\t\t\tnumberFormat = numberFormat.replace(/\\d/, DIGIT_PLACEHOLDER)\n\t\t\t\t\t\ti--\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Generate formatting template for this phone number format.\n\t\tlet template = digits\n\t\t\t// Format the dummy phone number according to the format.\n\t\t\t.replace(new RegExp(pattern), numberFormat)\n\t\t\t// Replace each dummy digit with a DIGIT_PLACEHOLDER.\n\t\t\t.replace(new RegExp(DUMMY_DIGIT, 'g'), DIGIT_PLACEHOLDER)\n\n\t\t// If a prefix of a national (significant) number is not as simple\n\t\t// as just a basic national prefix, then just prepend such prefix\n\t\t// before the national (significant) number, optionally spacing\n\t\t// the two with a whitespace.\n\t\tif (!nationalPrefixIncludedInTemplate) {\n\t\t\tif (prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) {\n\t\t\t\t// Prepend the prefix to the template manually.\n\t\t\t\ttemplate = repeat(DIGIT_PLACEHOLDER, prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix.length) +\n\t\t\t\t\t' ' +\n\t\t\t\t\ttemplate\n\t\t\t} else if (nationalPrefix) {\n\t\t\t\t// Prepend national prefix to the template manually.\n\t\t\t\ttemplate = repeat(DIGIT_PLACEHOLDER, nationalPrefix.length) +\n\t\t\t\t\tthis.getSeparatorAfterNationalPrefix(format) +\n\t\t\t\t\ttemplate\n\t\t\t}\n\t\t}\n\n\t\tif (international) {\n\t\t\ttemplate = applyInternationalSeparatorStyle(template)\n\t\t}\n\n\t\treturn template\n\t}\n\n\tformatNextNationalNumberDigits(digits) {\n\t\tconst result = populateTemplateWithDigits(\n\t\t\tthis.populatedNationalNumberTemplate,\n\t\t\tthis.populatedNationalNumberTemplatePosition,\n\t\t\tdigits\n\t\t)\n\n\t\tif (!result) {\n\t\t\t// Reset the format.\n\t\t\tthis.resetFormat()\n\t\t\treturn\n\t\t}\n\n\t\tthis.populatedNationalNumberTemplate = result[0]\n\t\tthis.populatedNationalNumberTemplatePosition = result[1]\n\n\t\t// Return the formatted phone number so far.\n\t\treturn cutAndStripNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1)\n\n\t\t// The old way which was good for `input-format` but is not so good\n\t\t// for `react-phone-number-input`'s default input (`InputBasic`).\n\t\t// return closeNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1)\n\t\t// \t.replace(new RegExp(DIGIT_PLACEHOLDER, 'g'), ' ')\n\t}\n\n\tshouldTryNationalPrefixFormattingRule(format, { international, nationalPrefix }) {\n\t\tif (format.nationalPrefixFormattingRule()) {\n\t\t\t// In some countries, `national_prefix_formatting_rule` is `($1)`,\n\t\t\t// so it applies even if the user hasn't input a national prefix.\n\t\t\t// `format.usesNationalPrefix()` detects such cases.\n\t\t\tconst usesNationalPrefix = format.usesNationalPrefix()\n\t\t\tif ((usesNationalPrefix && nationalPrefix) ||\n\t\t\t\t(!usesNationalPrefix && !international)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n}","import extractCountryCallingCode from './helpers/extractCountryCallingCode.js'\nimport extractCountryCallingCodeFromInternationalNumberWithoutPlusSign from './helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js'\nimport extractNationalNumberFromPossiblyIncompleteNumber from './helpers/extractNationalNumberFromPossiblyIncompleteNumber.js'\nimport stripIddPrefix from './helpers/stripIddPrefix.js'\nimport parseDigits from './helpers/parseDigits.js'\n\nimport {\n\tVALID_DIGITS,\n\tVALID_PUNCTUATION,\n\tPLUS_CHARS\n} from './constants.js'\n\nconst VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART =\n\t'[' +\n\t\tVALID_PUNCTUATION +\n\t\tVALID_DIGITS +\n\t']+'\n\nconst VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp('^' + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + '$', 'i')\n\nconst VALID_FORMATTED_PHONE_NUMBER_PART =\n\t'(?:' +\n\t\t'[' + PLUS_CHARS + ']' +\n\t\t'[' +\n\t\t\tVALID_PUNCTUATION +\n\t\t\tVALID_DIGITS +\n\t\t']*' +\n\t\t'|' +\n\t\t'[' +\n\t\t\tVALID_PUNCTUATION +\n\t\t\tVALID_DIGITS +\n\t\t']+' +\n\t')'\n\nconst AFTER_PHONE_NUMBER_DIGITS_END_PATTERN = new RegExp(\n\t'[^' +\n\t\tVALID_PUNCTUATION +\n\t\tVALID_DIGITS +\n\t']+' +\n\t'.*' +\n\t'$'\n)\n\n// Tests whether `national_prefix_for_parsing` could match\n// different national prefixes.\n// Matches anything that's not a digit or a square bracket.\nconst COMPLEX_NATIONAL_PREFIX = /[^\\d\\[\\]]/\n\nexport default class AsYouTypeParser {\n\tconstructor({\n\t\tdefaultCountry,\n\t\tdefaultCallingCode,\n\t\tmetadata,\n\t\tonNationalSignificantNumberChange\n\t}) {\n\t\tthis.defaultCountry = defaultCountry\n\t\tthis.defaultCallingCode = defaultCallingCode\n\t\tthis.metadata = metadata\n\t\tthis.onNationalSignificantNumberChange = onNationalSignificantNumberChange\n\t}\n\n\tinput(text, state) {\n\t\tconst [formattedDigits, hasPlus] = extractFormattedDigitsAndPlus(text)\n\t\tconst digits = parseDigits(formattedDigits)\n\t\t// Checks for a special case: just a leading `+` has been entered.\n\t\tlet justLeadingPlus\n\t\tif (hasPlus) {\n\t\t\tif (!state.digits) {\n\t\t\t\tstate.startInternationalNumber(undefined, undefined)\n\t\t\t\tif (!digits) {\n\t\t\t\t\tjustLeadingPlus = true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (digits) {\n\t\t\tthis.inputDigits(digits, state)\n\t\t}\n\t\treturn {\n\t\t\tdigits,\n\t\t\tjustLeadingPlus\n\t\t}\n\t}\n\n\t/**\n\t * Inputs \"next\" phone number digits.\n\t * @param {string} digits\n\t * @return {string} [formattedNumber] Formatted national phone number (if it can be formatted at this stage). Returning `undefined` means \"don't format the national phone number at this stage\".\n\t */\n\tinputDigits(nextDigits, state) {\n\t\tconst { digits } = state\n\t\tconst hasReceivedThreeLeadingDigits = digits.length < 3 && digits.length + nextDigits.length >= 3\n\n\t\t// Append phone number digits.\n\t\tstate.appendDigits(nextDigits)\n\n\t\t// Attempt to extract IDD prefix:\n\t\t// Some users input their phone number in international format,\n\t\t// but in an \"out-of-country\" dialing format instead of using the leading `+`.\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/185\n\t\t// Detect such numbers as soon as there're at least 3 digits.\n\t\t// Google's library attempts to extract IDD prefix at 3 digits,\n\t\t// so this library just copies that behavior.\n\t\t// I guess that's because the most commot IDD prefixes are\n\t\t// `00` (Europe) and `011` (US).\n\t\t// There exist really long IDD prefixes too:\n\t\t// for example, in Australia the default IDD prefix is `0011`,\n\t\t// and it could even be as long as `14880011`.\n\t\t// An IDD prefix is extracted here, and then every time when\n\t\t// there's a new digit and the number couldn't be formatted.\n\t\tif (hasReceivedThreeLeadingDigits) {\n\t\t\tthis.extractIddPrefix(state)\n\t\t}\n\n\t\tif (this.isWaitingForCountryCallingCode(state)) {\n\t\t\tif (!this.extractCountryCallingCode(state)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t} else {\n\t\t\tstate.appendNationalSignificantNumberDigits(nextDigits)\n\t\t}\n\n\t\t// If a phone number is being input in international format,\n\t\t// then it's not valid for it to have a national prefix.\n\t\t// Still, some people incorrectly input such numbers with a national prefix.\n\t\t// In such cases, only attempt to strip a national prefix if the number becomes too long.\n\t\t// (but that is done later, not here)\n\t\tif (!state.international) {\n\t\t\tif (!this.hasExtractedNationalSignificantNumber) {\n\t\t\t\tthis.extractNationalSignificantNumber(\n\t\t\t\t\tstate.getNationalDigits(),\n\t\t\t\t\t(stateUpdate) => state.update(stateUpdate)\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\n\tisWaitingForCountryCallingCode({ international, callingCode }) {\n\t\treturn international && !callingCode\n\t}\n\n\t// Extracts a country calling code from a number\n\t// being entered in internatonal format.\n\textractCountryCallingCode(state) {\n\t\tconst { countryCallingCode, number } = extractCountryCallingCode(\n\t\t\t'+' + state.getDigitsWithoutInternationalPrefix(),\n\t\t\tstate.country,\n\t\t\tthis.defaultCountry,\n\t\t\tthis.defaultCallingCode,\n\t\t\tthis.metadata.metadata\n\t\t)\n\t\tif (countryCallingCode) {\n\t\t\tstate.setCallingCode(countryCallingCode)\n\t\t\tstate.update({\n\t\t\t\tnationalSignificantNumber: number\n\t\t\t})\n\t\t\treturn true\n\t\t}\n\t}\n\n\treset(numberingPlan) {\n\t\tif (numberingPlan) {\n\t\t\tthis.hasSelectedNumberingPlan = true\n\t\t\tconst nationalPrefixForParsing = numberingPlan._nationalPrefixForParsing()\n\t\t\tthis.couldPossiblyExtractAnotherNationalSignificantNumber = nationalPrefixForParsing && COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing)\n\t\t} else {\n\t\t\tthis.hasSelectedNumberingPlan = undefined\n\t\t\tthis.couldPossiblyExtractAnotherNationalSignificantNumber = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Extracts a national (significant) number from user input.\n\t * Google's library is different in that it only applies `national_prefix_for_parsing`\n\t * and doesn't apply `national_prefix_transform_rule` after that.\n\t * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539\n\t * @return {boolean} [extracted]\n\t */\n\textractNationalSignificantNumber(nationalDigits, setState) {\n\t\tif (!this.hasSelectedNumberingPlan) {\n\t\t\treturn\n\t\t}\n\t\tconst {\n\t\t\tnationalPrefix,\n\t\t\tnationalNumber,\n\t\t\tcarrierCode\n\t\t} = extractNationalNumberFromPossiblyIncompleteNumber(\n\t\t\tnationalDigits,\n\t\t\tthis.metadata\n\t\t)\n\t\tif (nationalNumber === nationalDigits) {\n\t\t\treturn\n\t\t}\n\t\tthis.onExtractedNationalNumber(\n\t\t\tnationalPrefix,\n\t\t\tcarrierCode,\n\t\t\tnationalNumber,\n\t\t\tnationalDigits,\n\t\t\tsetState\n\t\t)\n\t\treturn true\n\t}\n\n\t/**\n\t * In Google's code this function is called \"attempt to extract longer NDD\".\n\t * \"Some national prefixes are a substring of others\", they say.\n\t * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were.\n\t */\n\textractAnotherNationalSignificantNumber(nationalDigits, prevNationalSignificantNumber, setState) {\n\t\tif (!this.hasExtractedNationalSignificantNumber) {\n\t\t\treturn this.extractNationalSignificantNumber(nationalDigits, setState)\n\t\t}\n\t\tif (!this.couldPossiblyExtractAnotherNationalSignificantNumber) {\n\t\t\treturn\n\t\t}\n\t\tconst {\n\t\t\tnationalPrefix,\n\t\t\tnationalNumber,\n\t\t\tcarrierCode\n\t\t} = extractNationalNumberFromPossiblyIncompleteNumber(\n\t\t\tnationalDigits,\n\t\t\tthis.metadata\n\t\t)\n\t\t// If a national prefix has been extracted previously,\n\t\t// then it's always extracted as additional digits are added.\n\t\t// That's assuming `extractNationalNumberFromPossiblyIncompleteNumber()`\n\t\t// doesn't do anything different from what it currently does.\n\t\t// So, just in case, here's this check, though it doesn't occur.\n\t\t/* istanbul ignore if */\n\t\tif (nationalNumber === prevNationalSignificantNumber) {\n\t\t\treturn\n\t\t}\n\t\tthis.onExtractedNationalNumber(\n\t\t\tnationalPrefix,\n\t\t\tcarrierCode,\n\t\t\tnationalNumber,\n\t\t\tnationalDigits,\n\t\t\tsetState\n\t\t)\n\t\treturn true\n\t}\n\n\tonExtractedNationalNumber(\n\t\tnationalPrefix,\n\t\tcarrierCode,\n\t\tnationalSignificantNumber,\n\t\tnationalDigits,\n\t\tsetState\n\t) {\n\t\t// Tells if the parsed national (significant) number is present as-is in the input string.\n\t\t// For example, when inputting \"0343515551212999\" Argentinian mobile number,\n\t\t// the parsed national (significant) number is \"93435551212999\".\n\t\t// There, one can see how it stripped \"0\" national prefix and prepended a \"9\",\n\t\t// because that's how it is instructed to do in Argentina's metadata.\n\t\t// So in the described example, the parsed national (significant) number is not present\n\t\t// as-is in the input string. Instead, it's \"modified\" in the input string.\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n\t\tlet nationalSignificantNumberIsModified = false\n\n\t\t// In some countries, a phone number could have a prefix that is not a \"national prefix\"\n\t\t// but rather some other type of \"utility\" prefix.\n\t\t// For example, when calling within Australia, one could prepend `1831` prefix to hide\n\t\t// caller's phone number.\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n\t\tlet prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix\n\n\t\t// `nationalSignificantNumber` could be empty. In that case, `.lastIndexOf()` still works correctly.\n\t\tconst nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber)\n\n\t\t// If the parsed national (significant) number is the last substring of the `nationalDigits`,\n\t\t// then it means that it's present as-is in the input string.\n\t\t// In any other case, the parsed national (significant) number is \"modified\" in the input string.\n\t\tif (\n\t\t\tnationalSignificantNumberIndex < 0 ||\n\t\t\tnationalSignificantNumberIndex !== nationalDigits.length - nationalSignificantNumber.length\n\t\t) {\n\t\t\tnationalSignificantNumberIsModified = true\n\t\t} else {\n\t\t\tconst prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex)\n\t\t\t// When national (significant) number is equal to the `nationalDigits`,\n\t\t\t// this `onExtractedNationalNumber()` function simply doesn't get called.\n\t\t\t// This means that at this point, `prefixBeforeNationalNumber` is always non-empty.\n\t\t\t// Still, added this `if` check just to prevent potential silly bugs.\n\t\t\t// The `!prefixBeforeNationalNumber` case is not really testable\n\t\t\t// so this line is exluded from the code coverage.\n\t\t\t/* istanbul ignore if */\n\t\t\tif (prefixBeforeNationalNumber) {\n\t\t\t\tif (prefixBeforeNationalNumber !== nationalPrefix) {\n\t\t\t\t\tprefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = prefixBeforeNationalNumber\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsetState({\n\t\t\tnationalPrefix,\n\t\t\tcarrierCode,\n\t\t\tnationalSignificantNumber,\n\t\t\tnationalSignificantNumberIsModified,\n\t\t\tprefixBeforeNationalSignificantNumberThatIsNotNationalPrefix\n\t\t})\n\t\t// `onExtractedNationalNumber()` is only called when\n\t\t// the national (significant) number actually did change.\n\t\tthis.hasExtractedNationalSignificantNumber = true\n\t\tthis.onNationalSignificantNumberChange()\n\t}\n\n\treExtractNationalSignificantNumber(state) {\n\t\t// Attempt to extract a national prefix.\n\t\t//\n\t\t// Some people incorrectly input national prefix\n\t\t// in an international phone number.\n\t\t// For example, some people write British phone numbers as `+44(0)...`.\n\t\t//\n\t\t// Also, in some rare cases, it is valid for a national prefix\n\t\t// to be a part of an international phone number.\n\t\t// For example, mobile phone numbers in Mexico are supposed to be\n\t\t// dialled internationally using a `1` national prefix,\n\t\t// so the national prefix will be part of an international number.\n\t\t//\n\t\t// Quote from:\n\t\t// https://www.mexperience.com/dialing-cell-phones-in-mexico/\n\t\t//\n\t\t// \"Dialing a Mexican cell phone from abroad\n\t\t// When you are calling a cell phone number in Mexico from outside Mexico,\n\t\t// it’s necessary to dial an additional “1” after Mexico’s country code\n\t\t// (which is “52”) and before the area code.\n\t\t// You also ignore the 045, and simply dial the area code and the\n\t\t// cell phone’s number.\n\t\t//\n\t\t// If you don’t add the “1”, you’ll receive a recorded announcement\n\t\t// asking you to redial using it.\n\t\t//\n\t\t// For example, if you are calling from the USA to a cell phone\n\t\t// in Mexico City, you would dial +52 – 1 – 55 – 1234 5678.\n\t\t// (Note that this is different to calling a land line in Mexico City\n\t\t// from abroad, where the number dialed would be +52 – 55 – 1234 5678)\".\n\t\t//\n\t\t// Google's demo output:\n\t\t// https://libphonenumber.appspot.com/phonenumberparser?number=%2b5215512345678&country=MX\n\t\t//\n\t\tif (this.extractAnotherNationalSignificantNumber(\n\t\t\tstate.getNationalDigits(),\n\t\t\tstate.nationalSignificantNumber,\n\t\t\t(stateUpdate) => state.update(stateUpdate)\n\t\t)) {\n\t\t\treturn true\n\t\t}\n\t\t// If no format matches the phone number, then it could be\n\t\t// \"a really long IDD\" (quote from a comment in Google's library).\n\t\t// An IDD prefix is first extracted when the user has entered at least 3 digits,\n\t\t// and then here — every time when there's a new digit and the number\n\t\t// couldn't be formatted.\n\t\t// For example, in Australia the default IDD prefix is `0011`,\n\t\t// and it could even be as long as `14880011`.\n\t\t//\n\t\t// Could also check `!hasReceivedThreeLeadingDigits` here\n\t\t// to filter out the case when this check duplicates the one\n\t\t// already performed when there're 3 leading digits,\n\t\t// but it's not a big deal, and in most cases there\n\t\t// will be a suitable `format` when there're 3 leading digits.\n\t\t//\n\t\tif (this.extractIddPrefix(state)) {\n\t\t\tthis.extractCallingCodeAndNationalSignificantNumber(state)\n\t\t\treturn true\n\t\t}\n\t\t// Google's AsYouType formatter supports sort of an \"autocorrection\" feature\n\t\t// when it \"autocorrects\" numbers that have been input for a country\n\t\t// with that country's calling code.\n\t\t// Such \"autocorrection\" feature looks weird, but different people have been requesting it:\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/376\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/375\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/316\n\t\tif (this.fixMissingPlus(state)) {\n\t\t\tthis.extractCallingCodeAndNationalSignificantNumber(state)\n\t\t\treturn true\n\t\t}\n\t}\n\n\textractIddPrefix(state) {\n\t\t// An IDD prefix can't be present in a number written with a `+`.\n\t\t// Also, don't re-extract an IDD prefix if has already been extracted.\n\t\tconst {\n\t\t\tinternational,\n\t\t\tIDDPrefix,\n\t\t\tdigits,\n\t\t\tnationalSignificantNumber\n\t\t} = state\n\t\tif (international || IDDPrefix) {\n\t\t\treturn\n\t\t}\n\t\t// Some users input their phone number in \"out-of-country\"\n\t\t// dialing format instead of using the leading `+`.\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/185\n\t\t// Detect such numbers.\n\t\tconst numberWithoutIDD = stripIddPrefix(\n\t\t\tdigits,\n\t\t\tthis.defaultCountry,\n\t\t\tthis.defaultCallingCode,\n\t\t\tthis.metadata.metadata\n\t\t)\n\t\tif (numberWithoutIDD !== undefined && numberWithoutIDD !== digits) {\n\t\t\t// If an IDD prefix was stripped then convert the IDD-prefixed number\n\t\t\t// to international number for subsequent parsing.\n\t\t\tstate.update({\n\t\t\t\tIDDPrefix: digits.slice(0, digits.length - numberWithoutIDD.length)\n\t\t\t})\n\t\t\tthis.startInternationalNumber(state, {\n\t\t\t\tcountry: undefined,\n\t\t\t\tcallingCode: undefined\n\t\t\t})\n\t\t\treturn true\n\t\t}\n\t}\n\n\tfixMissingPlus(state) {\n\t\tif (!state.international) {\n\t\t\tconst {\n\t\t\t\tcountryCallingCode: newCallingCode\n\t\t\t} = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(\n\t\t\t\tstate.digits,\n\t\t\t\tstate.country,\n\t\t\t\tthis.defaultCountry,\n\t\t\t\tthis.defaultCallingCode,\n\t\t\t\tthis.metadata.metadata\n\t\t\t)\n\t\t\tif (newCallingCode) {\n\t\t\t\tstate.update({\n\t\t\t\t\tmissingPlus: true\n\t\t\t\t})\n\t\t\t\tthis.startInternationalNumber(state, {\n\t\t\t\t\tcountry: state.country,\n\t\t\t\t\tcallingCode: newCallingCode\n\t\t\t\t})\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\n\tstartInternationalNumber(state, { country, callingCode }) {\n\t\tstate.startInternationalNumber(country, callingCode)\n\t\t// If a national (significant) number has been extracted before, reset it.\n\t\tif (state.nationalSignificantNumber) {\n\t\t\tstate.resetNationalSignificantNumber()\n\t\t\tthis.onNationalSignificantNumberChange()\n\t\t\tthis.hasExtractedNationalSignificantNumber = undefined\n\t\t}\n\t}\n\n\textractCallingCodeAndNationalSignificantNumber(state) {\n\t\tif (this.extractCountryCallingCode(state)) {\n\t\t\t// `this.extractCallingCode()` is currently called when the number\n\t\t\t// couldn't be formatted during the standard procedure.\n\t\t\t// Normally, the national prefix would be re-extracted\n\t\t\t// for an international number if such number couldn't be formatted,\n\t\t\t// but since it's already not able to be formatted,\n\t\t\t// there won't be yet another retry, so also extract national prefix here.\n\t\t\tthis.extractNationalSignificantNumber(\n\t\t\t\tstate.getNationalDigits(),\n\t\t\t\t(stateUpdate) => state.update(stateUpdate)\n\t\t\t)\n\t\t}\n\t}\n}\n\n/**\n * Extracts formatted phone number from text (if there's any).\n * @param {string} text\n * @return {string} [formattedPhoneNumber]\n */\nfunction extractFormattedPhoneNumber(text) {\n\t// Attempt to extract a possible number from the string passed in.\n\tconst startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART)\n\tif (startsAt < 0) {\n\t\treturn\n\t}\n\t// Trim everything to the left of the phone number.\n\ttext = text.slice(startsAt)\n\t// Trim the `+`.\n\tlet hasPlus\n\tif (text[0] === '+') {\n\t\thasPlus = true\n\t\ttext = text.slice('+'.length)\n\t}\n\t// Trim everything to the right of the phone number.\n\ttext = text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN, '')\n\t// Re-add the previously trimmed `+`.\n\tif (hasPlus) {\n\t\ttext = '+' + text\n\t}\n\treturn text\n}\n\n/**\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\n * @param {string} text\n * @return {any[]}\n */\nfunction _extractFormattedDigitsAndPlus(text) {\n\t// Extract a formatted phone number part from text.\n\tconst extractedNumber = extractFormattedPhoneNumber(text) || ''\n\t// Trim a `+`.\n\tif (extractedNumber[0] === '+') {\n\t\treturn [extractedNumber.slice('+'.length), true]\n\t}\n\treturn [extractedNumber]\n}\n\n/**\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\n * @param {string} text\n * @return {any[]}\n */\nexport function extractFormattedDigitsAndPlus(text) {\n\tlet [formattedDigits, hasPlus] = _extractFormattedDigitsAndPlus(text)\n\t// If the extracted phone number part\n\t// can possibly be a part of some valid phone number\n\t// then parse phone number characters from a formatted phone number.\n\tif (!VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)) {\n\t\tformattedDigits = ''\n\t}\n\treturn [formattedDigits, hasPlus]\n}","import Metadata from './metadata.js'\nimport PhoneNumber from './PhoneNumber.js'\nimport checkNumberLength from './helpers/checkNumberLength.js'\nimport AsYouTypeState from './AsYouTypeState.js'\nimport AsYouTypeFormatter, { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.js'\nimport AsYouTypeParser, { extractFormattedDigitsAndPlus } from './AsYouTypeParser.js'\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js'\nimport getCountryByNationalNumber from './helpers/getCountryByNationalNumber.js'\nimport isObject from './helpers/isObject.js'\n\nconst USE_NON_GEOGRAPHIC_COUNTRY_CODE = false\n\nexport default class AsYouType {\n\t/**\n\t * @param {(string|object)?} [optionsOrDefaultCountry] - The default country used for parsing non-international phone numbers. Can also be an `options` object.\n\t * @param {Object} metadata\n\t */\n\tconstructor(optionsOrDefaultCountry, metadata) {\n\t\t// Metadata instance is created once and stays constant.\n\t\t// This is required because other utility classes such as `AsYouTypeFormatter`\n\t\t// will use this metadata instance \"reference\" and will assume that it stays constant.\n\t\tthis.metadata = new Metadata(metadata)\n\t\tconst [defaultCountry, defaultCallingCode] = this.getCountryAndCallingCode(optionsOrDefaultCountry)\n\t\t// `this.defaultCountry` and `this.defaultCallingCode` aren't required to be in sync.\n\t\t// For example, `this.defaultCountry` could be `\"AR\"` and `this.defaultCallingCode` could be `undefined`.\n\t\t// So `this.defaultCountry` and `this.defaultCallingCode` are totally independent.\n\t\tthis.defaultCountry = defaultCountry\n\t\tthis.defaultCallingCode = defaultCallingCode\n\t\tthis.reset()\n\t}\n\n\tgetCountryAndCallingCode(optionsOrDefaultCountry) {\n\t\t// Set `defaultCountry` and `defaultCallingCode` options.\n\t\tlet defaultCountry\n\t\tlet defaultCallingCode\n\t\t// Turns out `null` also has type \"object\". Weird.\n\t\tif (optionsOrDefaultCountry) {\n\t\t\tif (isObject(optionsOrDefaultCountry)) {\n\t\t\t\tdefaultCountry = optionsOrDefaultCountry.defaultCountry\n\t\t\t\tdefaultCallingCode = optionsOrDefaultCountry.defaultCallingCode\n\t\t\t} else {\n\t\t\t\tdefaultCountry = optionsOrDefaultCountry\n\t\t\t}\n\t\t}\n\t\tif (defaultCountry && !this.metadata.hasCountry(defaultCountry)) {\n\t\t\tdefaultCountry = undefined\n\t\t}\n\t\tif (defaultCallingCode) {\n\t\t\t/* istanbul ignore if */\n\t\t\tif (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n\t\t\t\tif (this.metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n\t\t\t\t\tdefaultCountry = '001'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [defaultCountry, defaultCallingCode]\n\t}\n\n\t/**\n\t * Inputs \"next\" phone number characters.\n\t * @param {string} text\n\t * @return {string} Formatted phone number characters that have been input so far.\n\t */\n\tinput(text) {\n\t\tconst {\n\t\t\tdigits,\n\t\t\tjustLeadingPlus\n\t\t} = this.parser.input(text, this.state)\n\t\tif (justLeadingPlus) {\n\t\t\tthis.formattedOutput = '+'\n\t\t} else if (digits) {\n\t\t\tthis.determineTheCountryIfNeeded()\n\t\t\t// Match the available formats by the currently available leading digits.\n\t\t\tif (this.state.nationalSignificantNumber) {\n\t\t\t\tthis.formatter.narrowDownMatchingFormats(this.state)\n\t\t\t}\n\t\t\tlet formattedNationalNumber\n\t\t\tif (this.metadata.hasSelectedNumberingPlan()) {\n\t\t\t\tformattedNationalNumber = this.formatter.format(digits, this.state)\n\t\t\t}\n\t\t\tif (formattedNationalNumber === undefined) {\n\t\t\t\t// See if another national (significant) number could be re-extracted.\n\t\t\t\tif (this.parser.reExtractNationalSignificantNumber(this.state)) {\n\t\t\t\t\tthis.determineTheCountryIfNeeded()\n\t\t\t\t\t// If it could, then re-try formatting the new national (significant) number.\n\t\t\t\t\tconst nationalDigits = this.state.getNationalDigits()\n\t\t\t\t\tif (nationalDigits) {\n\t\t\t\t\t\tformattedNationalNumber = this.formatter.format(nationalDigits, this.state)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.formattedOutput = formattedNationalNumber\n\t\t\t\t? this.getFullNumber(formattedNationalNumber)\n\t\t\t\t: this.getNonFormattedNumber()\n\t\t}\n\t\treturn this.formattedOutput\n\t}\n\n\treset() {\n\t\tthis.state = new AsYouTypeState({\n\t\t\tonCountryChange: (country) => {\n\t\t\t\t// Before version `1.6.0`, the official `AsYouType` formatter API\n\t\t\t\t// included a `.country` property on an `AsYouType` instance.\n\t\t\t\t// Since that property (along with the others) have been moved to\n\t\t\t\t// `this.state`, `this.country` property is emulated for compatibility\n\t\t\t\t// with the old versions.\n\t\t\t\tthis.country = country\n\t\t\t},\n\t\t\tonCallingCodeChange: (callingCode, country) => {\n\t\t\t\tthis.metadata.selectNumberingPlan(country || callingCode)\n\t\t\t\tthis.formatter.reset(this.metadata.numberingPlan, this.state)\n\t\t\t\tthis.parser.reset(this.metadata.numberingPlan)\n\t\t\t}\n\t\t})\n\t\tthis.formatter = new AsYouTypeFormatter({\n\t\t\tstate: this.state,\n\t\t\tmetadata: this.metadata\n\t\t})\n\t\tthis.parser = new AsYouTypeParser({\n\t\t\tdefaultCountry: this.defaultCountry,\n\t\t\tdefaultCallingCode: this.defaultCallingCode,\n\t\t\tmetadata: this.metadata,\n\t\t\tstate: this.state,\n\t\t\tonNationalSignificantNumberChange: () => {\n\t\t\t\tthis.determineTheCountryIfNeeded()\n\t\t\t\tthis.formatter.reset(this.metadata.numberingPlan, this.state)\n\t\t\t}\n\t\t})\n\t\tthis.state.reset({\n\t\t\tcountry: this.defaultCountry,\n\t\t\tcallingCode: this.defaultCallingCode\n\t\t})\n\t\tthis.formattedOutput = ''\n\t\treturn this\n\t}\n\n\t/**\n\t * Returns `true` if the phone number is being input in international format.\n\t * In other words, returns `true` if and only if the parsed phone number starts with a `\"+\"`.\n\t * @return {boolean}\n\t */\n\tisInternational() {\n\t\treturn this.state.international\n\t}\n\n\t/**\n\t * Returns the \"calling code\" part of the phone number when it's being input\n\t * in an international format.\n\t * If no valid calling code has been entered so far, returns `undefined`.\n\t * @return {string} [callingCode]\n\t */\n\tgetCallingCode() {\n\t\t // If the number is being input in national format and some \"default calling code\"\n\t\t // has been passed to `AsYouType` constructor, then `this.state.callingCode`\n\t\t // is equal to that \"default calling code\".\n\t\t //\n\t\t // If the number is being input in national format and no \"default calling code\"\n\t\t // has been passed to `AsYouType` constructor, then returns `undefined`,\n\t\t // even if a \"default country\" has been passed to `AsYouType` constructor.\n\t\t //\n\t\tif (this.isInternational()) {\n\t\t\treturn this.state.callingCode\n\t\t}\n\t}\n\n\t// A legacy alias.\n\tgetCountryCallingCode() {\n\t\treturn this.getCallingCode()\n\t}\n\n\t/**\n\t * Returns a two-letter country code of the phone number.\n\t * Returns `undefined` for \"non-geographic\" phone numbering plans.\n\t * Returns `undefined` if no phone number has been input yet.\n\t * @return {string} [country]\n\t */\n\tgetCountry() {\n\t\tconst { digits } = this.state\n\t\t// Return `undefined` if no digits have been input yet.\n\t\tif (digits) {\n\t\t\treturn this._getCountry()\n\t\t}\n\t}\n\n\t/**\n\t * Returns a two-letter country code of the phone number.\n\t * Returns `undefined` for \"non-geographic\" phone numbering plans.\n\t * @return {string} [country]\n\t */\n\t_getCountry() {\n\t\tconst { country } = this.state\n\t\t/* istanbul ignore if */\n\t\tif (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n\t\t\t// `AsYouType.getCountry()` returns `undefined`\n\t\t\t// for \"non-geographic\" phone numbering plans.\n\t\t\tif (country === '001') {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\treturn country\n\t}\n\n\tdetermineTheCountryIfNeeded() {\n\t\t// Suppose a user enters a phone number in international format,\n\t\t// and there're several countries corresponding to that country calling code,\n\t\t// and a country has been derived from the number, and then\n\t\t// a user enters one more digit and the number is no longer\n\t\t// valid for the derived country, so the country should be re-derived\n\t\t// on every new digit in those cases.\n\t\t//\n\t\t// If the phone number is being input in national format,\n\t\t// then it could be a case when `defaultCountry` wasn't specified\n\t\t// when creating `AsYouType` instance, and just `defaultCallingCode` was specified,\n\t\t// and that \"calling code\" could correspond to a \"non-geographic entity\",\n\t\t// or there could be several countries corresponding to that country calling code.\n\t\t// In those cases, `this.country` is `undefined` and should be derived\n\t\t// from the number. Again, if country calling code is ambiguous, then\n\t\t// `this.country` should be re-derived with each new digit.\n\t\t//\n\t\tif (!this.state.country || this.isCountryCallingCodeAmbiguous()) {\n\t\t\tthis.determineTheCountry()\n\t\t}\n\t}\n\n\t// Prepends `+CountryCode ` in case of an international phone number\n\tgetFullNumber(formattedNationalNumber) {\n\t\tif (this.isInternational()) {\n\t\t\tconst prefix = (text) => this.formatter.getInternationalPrefixBeforeCountryCallingCode(this.state, {\n\t\t\t\tspacing: text ? true : false\n\t\t\t}) + text\n\t\t\tconst { callingCode } = this.state\n\t\t\tif (!callingCode) {\n\t\t\t\treturn prefix(`${this.state.getDigitsWithoutInternationalPrefix()}`)\n\t\t\t}\n\t\t\tif (!formattedNationalNumber) {\n\t\t\t\treturn prefix(callingCode)\n\t\t\t}\n\t\t\treturn prefix(`${callingCode} ${formattedNationalNumber}`)\n\t\t}\n\t\treturn formattedNationalNumber\n\t}\n\n\tgetNonFormattedNationalNumberWithPrefix() {\n\t\tconst {\n\t\t\tnationalSignificantNumber,\n\t\t\tprefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,\n\t\t\tnationalPrefix\n\t\t} = this.state\n\t\tlet number = nationalSignificantNumber\n\t\tconst prefix = prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix || nationalPrefix\n\t\tif (prefix) {\n\t\t\tnumber = prefix + number\n\t\t}\n\t\treturn number\n\t}\n\n\tgetNonFormattedNumber() {\n\t\tconst { nationalSignificantNumberIsModified } = this.state\n\t\treturn this.getFullNumber(\n\t\t\tnationalSignificantNumberIsModified\n\t\t\t\t? this.state.getNationalDigits()\n\t\t\t\t: this.getNonFormattedNationalNumberWithPrefix()\n\t\t)\n\t}\n\n\tgetNonFormattedTemplate() {\n\t\tconst number = this.getNonFormattedNumber()\n\t\tif (number) {\n\t\t\treturn number.replace(/[\\+\\d]/g, DIGIT_PLACEHOLDER)\n\t\t}\n\t}\n\n\tisCountryCallingCodeAmbiguous() {\n\t\tconst { callingCode } = this.state\n\t\tconst countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode)\n\t\treturn countryCodes && countryCodes.length > 1\n\t}\n\n\t// Determines the exact country of the phone number\n\t// entered so far based on the country phone code\n\t// and the national phone number.\n\tdetermineTheCountry() {\n\t\t// Get a more precise country code for this national number.\n\t\t// It is possible that the precise country couldn't be determined\n\t\t// in cases when there're multiple countries sharing the same calling code.\n\t\t// In that case, `country` will be `undefined`.\n\t\tconst country = getCountryByCallingCode(\n\t\t\tthis.isInternational() ? this.state.callingCode : this.defaultCallingCode,\n\t\t\t{\n\t\t\t\tnationalNumber: this.state.nationalSignificantNumber,\n\t\t\t\tmetadata: this.metadata\n\t\t\t}\n\t\t)\n\t\t// If the derived country is indeed more precise,\n\t\t// or if no country could be derived for the updated phone number.\n\t\tif (country !== this.state.country) {\n\t\t\t// Set (or reset) the more precise country.\n\t\t\tthis.state.setCountry(country)\n\t\t\t// If a more precise country could be derived.\n\t\t\tif (country) {\n\t\t\t\t// Select a more precise telephone numbering plan.\n\t\t\t\t// For example, consider that `AsYouType` instance was created with `defaultCountry: \"US\"` argument.\n\t\t\t\t// In that case, the metadata instance will be using \"US\" metadata.\n\t\t\t\t// But then the user could input a Canadian phone number, in which case\n\t\t\t\t// the metadata instance should be switched to Canadian telephone numbering plan.\n\t\t\t\t// It is required to do that because later `canFormatCompleteNumber()` function will be called,\n\t\t\t\t// and that function relies on the precise country being pre-selected in the metadata instance.\n\t\t\t\t// Or, for example, `checkNumberLength()` function also relies on same thing.\n\t\t\t\tthis.metadata.selectNumberingPlan(country)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a E.164 phone number value for the user's input.\n\t *\n\t * For example, for country `\"US\"` and input `\"(222) 333-4444\"`\n\t * it will return `\"+12223334444\"`.\n\t *\n\t * For international phone number input, it will also auto-correct\n\t * some minor errors such as using a national prefix when writing\n\t * an international phone number. For example, if the user inputs\n\t * `\"+44 0 7400 000000\"` then it will return an auto-corrected\n\t * `\"+447400000000\"` phone number value.\n\t *\n\t * Will return `undefined` if no digits have been input,\n\t * or when inputting a phone number in national format and no\n\t * default country or default \"country calling code\" have been set.\n\t *\n\t * @return {string} [value]\n\t */\n\tgetNumberValue() {\n\t\tconst {\n\t\t\tdigits,\n\t\t\tcallingCode,\n\t\t\tcountry,\n\t\t\tnationalSignificantNumber\n\t\t} = this.state\n\n\t \t// Will return `undefined` if no digits have been input.\n\t\tif (!digits) {\n\t\t\treturn\n\t\t}\n\n\t\tif (this.isInternational()) {\n\t\t\tif (callingCode) {\n\t\t\t\treturn '+' + callingCode + nationalSignificantNumber\n\t\t\t} else {\n\t\t\t\treturn '+' + digits\n\t\t\t}\n\t\t} else {\n\t\t\tif (country || callingCode) {\n\t\t\t\tconst callingCode_ = country ? this.metadata.countryCallingCode() : callingCode\n\t\t\t\treturn '+' + callingCode_ + nationalSignificantNumber\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns an instance of `PhoneNumber` class.\n\t * Will return `undefined` if no national (significant) number\n\t * digits have been entered so far, or if no `defaultCountry` has been\n\t * set and the user enters a phone number not in international format.\n\t */\n\tgetNumber() {\n\t\tconst {\n\t\t\tnationalSignificantNumber,\n\t\t\tcarrierCode,\n\t\t\tcallingCode\n\t\t} = this.state\n\n\t\tif (!nationalSignificantNumber) {\n\t\t\treturn\n\t\t}\n\n\t\t// `this._getCountry()` is basically same as `this.state.country`\n\t\t// with the only change that it returns `undefined` in case of a\n\t\t// \"non-geographic\" numbering plan instead of `\"001\"` \"internal use\" value.\n\t\tlet country = this._getCountry()\n\n\t\t// Sidenote:\n\t\t// `state.callingCode` and `state.country` are somewhat independent from one another\n\t\t// and there could be situations when one is defined but the other is not.\n\t\t// See the comment in `AsYouTypeState.js` for more info on when that is possible.\n\n\t\tif (!country && !callingCode) {\n\t\t\treturn\n\t\t}\n\n\t\t// By default, if `defaultCountry` parameter was passed when\n\t\t// creating `AsYouType` instance, `state.country` is gonna be\n\t\t// that `defaultCountry`, which doesn't entirely conform with\n\t\t// `parsePhoneNumber()`'s behavior where it attempts to determine\n\t\t// the country more precisely in cases when multiple countries\n\t\t// could correspond to the same `countryCallingCode`.\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417192969\n\t\t//\n\t\t// Because `AsYouType.getNumber()` method is supposed to be a 1:1\n\t\t// equivalent for `parsePhoneNumber(AsYouType.getNumberValue())`,\n\t\t// it means that it should also behave accordingly in such cases of `country` ambiguity.\n\t\t// That's how users of this library would expect it to behave anyway.\n\t\t//\n\t\t// So here it checks if `state.country` is same as the `defaultCountry`,\n\t\t// and if it is, it attempts to get rid of any potential ambiguity.\n\t\t//\n\t\tif (country) {\n\t\t\tif (country === this.defaultCountry) {\n\t\t\t\t// // Create a `Metadata` instance just to get the calling code of the `country`.\n\t\t\t\t// const metadata = new Metadata(this.metadata.metadata)\n\t\t\t\t// // `state.callingCode` and `state.country` are somewhat independent from one another\n\t\t\t\t// // and there could be situations when one is defined but the other is not.\n\t\t\t\t// // See the comment in `AsYouTypeState.js` for more info on when that is possible.\n\t\t\t\t// // Here, it only passes `state.country` because there's no need to pass `state.callingCode`\n\t\t\t\t// // because `state.country` is known to be defined.\n\t\t\t\t// metadata.selectNumberingPlan(country)\n\t\t\t\t// const countryCallingCode = metadata.numberingPlan.callingCode()\n\n\t\t\t\t// Instead of getting `countryCallingCode` value above,\n\t\t\t\t// it could simply read it from the existing metadata instance.\n\t\t\t\tconst countryCallingCode = this.metadata.numberingPlan.callingCode()\n\n\t\t\t\t// Attempt to rule out any potential country code ambiguity, if present.\n\t\t\t\tconst exactCountry = getExactCountryForMultiCountryCallingCode(\n\t\t\t\t\tcountryCallingCode,\n\t\t\t\t\tnationalSignificantNumber,\n\t\t\t\t\tthis.metadata\n\t\t\t\t)\n\t\t\t\tif (exactCountry) {\n\t\t\t\t\tcountry = exactCountry\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst phoneNumber = new PhoneNumber(\n\t\t\tcountry || callingCode,\n\t\t\tnationalSignificantNumber,\n\t\t\tthis.metadata.metadata\n\t\t)\n\t\tif (carrierCode) {\n\t\t\tphoneNumber.carrierCode = carrierCode\n\t\t}\n\t\t// Phone number extensions are not supported by \"As You Type\" formatter.\n\t\treturn phoneNumber\n\t}\n\n\t/**\n\t * Returns `true` if the phone number is \"possible\".\n\t * Is just a shortcut for `PhoneNumber.isPossible()`.\n\t * @return {boolean}\n\t */\n\tisPossible() {\n\t\tconst phoneNumber = this.getNumber()\n\t\tif (!phoneNumber) {\n\t\t\treturn false\n\t\t}\n\t\treturn phoneNumber.isPossible()\n\t}\n\n\t/**\n\t * Returns `true` if the phone number is \"valid\".\n\t * Is just a shortcut for `PhoneNumber.isValid()`.\n\t * @return {boolean}\n\t */\n\tisValid() {\n\t\tconst phoneNumber = this.getNumber()\n\t\tif (!phoneNumber) {\n\t\t\treturn false\n\t\t}\n\t\treturn phoneNumber.isValid()\n\t}\n\n\t/**\n\t * Checks if the phone number length is valid.\n\t * If it is, nothing is returned.\n\t * Otherwise, a rejection reason is returned.\n\t * @return {string?}\n\t */\n\tvalidateLength() {\n\t\tconst {\n\t\t\tdigits,\n\t\t\tnationalSignificantNumber\n\t\t} = this.state\n\n\t\tif (!digits) {\n\t\t\treturn 'NOT_A_NUMBER'\n\t\t}\n\n\t\tif (!this.metadata.numberingPlan) {\n\t\t\treturn 'INVALID_COUNTRY'\n\t\t}\n\n\t\tif (!nationalSignificantNumber) {\n\t\t\t return 'TOO_SHORT'\n\t\t}\n\n\t\t// `state.callingCode` and `state.country` are somewhat independent from one another\n\t\t// and there could be situations when one is defined but the other is not.\n\t\t// See the comment in `AsYouTypeState.js` for more info on when that is possible.\n\t\t// Here, it uses both: if `country` is defined then it will use that,\n\t\t// otherwise it will use `callingCode`.\n\t\tconst result = checkNumberLength(nationalSignificantNumber, undefined, this.metadata)\n\t\tif (result !== 'IS_POSSIBLE') {\n\t\t\treturn result\n\t\t}\n\t}\n\n\t/**\n\t * @deprecated\n\t * This method is used in `react-phone-number-input/source/input-control.js`\n\t * in versions before `3.0.16`.\n\t */\n\tgetNationalNumber() {\n\t\treturn this.state.nationalSignificantNumber\n\t}\n\n\t/**\n\t * Returns the phone number characters entered by the user.\n\t * @return {string}\n\t */\n\tgetChars() {\n\t\treturn (this.state.international ? '+' : '') + this.state.digits\n\t}\n\n\t/**\n\t * Returns the template for the formatted phone number.\n\t * @return {string}\n\t */\n\tgetTemplate() {\n\t\treturn this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || ''\n\t}\n}\n\n// In situations when multiple countries use the same calling code,\n// this function tells what exact country does a given national (significant) number belong to.\nfunction getExactCountryForMultiCountryCallingCode(callingCode, nationalSignificantNumber, metadata) {\n\tconst ambiguousCountries = metadata.getCountryCodesForCallingCode(callingCode)\n\tif (ambiguousCountries.length > 1) {\n\t\treturn getCountryByNationalNumber(nationalSignificantNumber, ambiguousCountries, metadata.metadata)\n\t}\n}","export { default as PhoneNumber } from '../es6/PhoneNumber.js'\nexport { default as ParseError } from '../es6/ParseError.js'\n// `parsePhoneNumber()` named export has been renamed to `parsePhoneNumberWithError()`.\nexport { default as parsePhoneNumberWithError, default as parsePhoneNumber } from '../es6/parsePhoneNumberWithError.js'\n\n// `parsePhoneNumberFromString()` named export is now considered legacy:\n// it has been promoted to a default export due to being too verbose.\nexport { default as default, default as parsePhoneNumberFromString } from '../es6/parsePhoneNumber.js'\n\nexport { default as isValidPhoneNumber } from '../es6/isValidPhoneNumber.js'\nexport { default as isPossiblePhoneNumber } from '../es6/isPossiblePhoneNumber.js'\nexport { default as validatePhoneNumberLength } from '../es6/validatePhoneNumberLength.js'\n\n// Deprecated.\nexport { default as findNumbers } from '../es6/legacy/findNumbers.js'\nexport { default as searchNumbers } from '../es6/legacy/searchNumbers.js'\n\nexport { default as findPhoneNumbersInText } from '../es6/findPhoneNumbersInText.js'\nexport { default as searchPhoneNumbersInText } from '../es6/searchPhoneNumbersInText.js'\nexport { default as PhoneNumberMatcher } from '../es6/PhoneNumberMatcher.js'\n\nexport { default as AsYouType } from '../es6/AsYouType.js'\n\n// Deprecated:\n// `DIGIT_PLACEHOLDER` is the character that `AsYouType` formatter uses in a phone number template.\n// It's basically an \"x\" character. I guess, there's no point in exporting it as a constant\n// because the established convention is that it's an \"x\" character so everyone just assumes \"x\".\nexport { DIGIT_PLACEHOLDER } from '../es6/AsYouTypeFormatter.js'\n\nexport { default as getCountries } from '../es6/getCountries.js'\nexport { default as Metadata, isSupportedCountry, getCountryCallingCode, getExtPrefix } from '../es6/metadata.js'\n\nexport { default as getExampleNumber } from '../es6/getExampleNumber.js'\n\nexport { default as formatIncompletePhoneNumber } from '../es6/formatIncompletePhoneNumber.js'\nexport { default as parseIncompletePhoneNumber, parsePhoneNumberCharacter } from '../es6/parseIncompletePhoneNumber.js'\nexport { default as parseDigits } from '../es6/helpers/parseDigits.js'\n\nexport { parseRFC3966, formatRFC3966 } from '../es6/helpers/RFC3966.js'\n","// Importing from a \".js\" file is a workaround for Node.js \"ES Modules\"\n// importing system which is even uncapable of importing \"*.json\" files.\nimport metadata from '../../metadata.min.json.js'\n\nimport { AsYouType as _AsYouType } from '../../core/index.js'\n\nexport function AsYouType(country) {\n\treturn _AsYouType.call(this, country, metadata)\n}\n\nAsYouType.prototype = Object.create(_AsYouType.prototype, {})\nAsYouType.prototype.constructor = AsYouType","// `parsePhoneNumber()` named export has been renamed to `parsePhoneNumberWithError()`.\nexport { parsePhoneNumberWithError, parsePhoneNumberWithError as parsePhoneNumber } from './min/exports/parsePhoneNumberWithError.js'\n// `parsePhoneNumberFromString()` named export is now considered legacy:\n// it has been promoted to a default export due to being too verbose.\nexport { parsePhoneNumber as parsePhoneNumberFromString, parsePhoneNumber as default } from './min/exports/parsePhoneNumber.js'\n\nexport { isValidPhoneNumber } from './min/exports/isValidPhoneNumber.js'\nexport { isPossiblePhoneNumber } from './min/exports/isPossiblePhoneNumber.js'\nexport { validatePhoneNumberLength } from './min/exports/validatePhoneNumberLength.js'\n\n// Deprecated.\nexport { findNumbers } from './min/exports/findNumbers.js'\nexport { searchNumbers } from './min/exports/searchNumbers.js'\n\nexport { findPhoneNumbersInText } from './min/exports/findPhoneNumbersInText.js'\nexport { searchPhoneNumbersInText } from './min/exports/searchPhoneNumbersInText.js'\nexport { PhoneNumberMatcher } from './min/exports/PhoneNumberMatcher.js'\n\nexport { AsYouType } from './min/exports/AsYouType.js'\n\n// Deprecated:\n// `DIGIT_PLACEHOLDER` is the character that `AsYouType` formatter uses in a phone number template.\n// It's basically an \"x\" character. I guess, there's no point in exporting it as a constant\n// because the established convention is that it's an \"x\" character so everyone just assumes \"x\".\nexport { DIGIT_PLACEHOLDER } from './es6/AsYouTypeFormatter.js'\n\nexport { isSupportedCountry } from './min/exports/isSupportedCountry.js'\nexport { getCountries } from './min/exports/getCountries.js'\n// `getPhoneCode` name is deprecated, use `getCountryCallingCode` instead.\nexport { getCountryCallingCode, getCountryCallingCode as getPhoneCode } from './min/exports/getCountryCallingCode.js'\nexport { getExtPrefix } from './min/exports/getExtPrefix.js'\n\nexport { Metadata } from './min/exports/Metadata.js'\nexport { getExampleNumber } from './min/exports/getExampleNumber.js'\n\nexport { formatIncompletePhoneNumber } from './min/exports/formatIncompletePhoneNumber.js'\nexport { PhoneNumber } from './min/exports/PhoneNumber.js'\n\nexport {\n\tParseError,\n\tparseIncompletePhoneNumber,\n\tparsePhoneNumberCharacter,\n\tparseDigits,\n\tparseRFC3966,\n\tformatRFC3966\n} from './core/index.js'\n\n// Deprecated (old) exports.\nexport { parse as parseNumber, parse } from './index.es6.exports/parse.js'\nexport { format as formatNumber, format } from './index.es6.exports/format.js'\nexport { getNumberType } from './index.es6.exports/getNumberType.js'\nexport { isPossibleNumber } from './index.es6.exports/isPossibleNumber.js'\nexport { isValidNumber } from './index.es6.exports/isValidNumber.js'\nexport { isValidNumberForRegion } from './index.es6.exports/isValidNumberForRegion.js'\nexport { findPhoneNumbers } from './index.es6.exports/findPhoneNumbers.js'\nexport { searchPhoneNumbers } from './index.es6.exports/searchPhoneNumbers.js'\nexport { PhoneNumberSearch } from './index.es6.exports/PhoneNumberSearch.js'\n\n// Deprecated DIGITS export.\n// (it was used in `react-phone-number-input`)\nexport { DIGITS } from './es6/helpers/parseDigits.js'\n\n// Deprecated \"custom\" exports.\nexport { default as parseCustom } from './es6/legacy/parse.js'\nexport { default as formatCustom } from './es6/legacy/format.js'\nexport { default as isValidNumberCustom } from './es6/legacy/isValidNumber.js'\nexport { default as findPhoneNumbersCustom } from './es6/legacy/findPhoneNumbers.js'\nexport { searchPhoneNumbers as searchPhoneNumbersCustom } from './es6/legacy/findPhoneNumbers.js'\nexport { default as PhoneNumberSearchCustom } from './es6/legacy/PhoneNumberSearch.js'\nexport { default as getNumberTypeCustom } from './es6/legacy/getNumberType.js'\nexport { default as getCountryCallingCodeCustom, default as getPhoneCodeCustom } from './es6/getCountryCallingCode.js'\nexport { default as AsYouTypeCustom } from './es6/AsYouType.js'\n","import { AsYouType, type CountryCode } from 'libphonenumber-js'\n\n/**\n * Format a phone number string using `libphonenumber-js`'s `AsYouType`.\n *\n * Non-digit characters are stripped before formatting (the leading `+` is\n * preserved so international numbers keep their country prefix). After\n * formatting, spaces produced by `AsYouType` are swapped for `delimiter` when\n * a custom delimiter is provided.\n *\n * @param value - The raw input (digits, `+`, spaces, dashes, parentheses, etc.).\n * @param country - ISO 3166-1 alpha-2 country code (e.g. `'MX'`, `'US'`).\n * @param delimiter - Character used to separate groups in the output.\n * @returns The formatted phone string, or `''` when `value` is empty.\n */\nexport const formatPhone = (\n value: string,\n country: string = 'MX',\n delimiter: string = ' '\n): string => {\n if (!value) return ''\n\n // Preserve '+' so international numbers keep their prefix.\n const digits = value.replace(/[^\\d+]/g, '')\n const formatter = new AsYouType(country as CountryCode)\n const formatted = formatter.input(digits)\n\n if (delimiter !== ' ') {\n return formatted.replace(/ /g, delimiter)\n }\n\n return formatted\n}","import {\n unformatCreditCard,\n unformatGeneral,\n unformatNumeral,\n type DatePatternType,\n type DateUnit,\n type FormatCreditCardOptions,\n type FormatDateOptions,\n type FormatGeneralOptions,\n type FormatNumeralOptions,\n type FormatTimeOptions,\n type TimePatternType,\n type TimeUnit\n} from 'cleave-zen'\n\nexport type FormatType =\n | 'general'\n | 'phone'\n | 'numeral'\n | 'date'\n | 'time'\n | 'creditCard'\n | 'creditCardType'\n\ntype ExtraFormatOptions = {\n country?: string\n dateRawPattern?: DatePatternType\n dateRawPatternDelimiter?: string\n timeRawPattern?: TimePatternType\n timeRawPatternDelimiter?: string\n tailPrefix?: boolean\n}\n\nexport type FormatOptions = Partial<\nFormatGeneralOptions &\nFormatNumeralOptions &\nFormatDateOptions &\nFormatTimeOptions &\nFormatCreditCardOptions\n> &\nExtraFormatOptions\n\ntype DateSegmentKey = 'day' | 'month' | 'year'\ntype TimeSegmentKey = 'hours' | 'minutes' | 'seconds'\n\nconst DEFAULT_DATE_PATTERN: DatePatternType = ['d', 'm', 'Y']\nconst DEFAULT_DATE_RAW_PATTERN: DatePatternType = ['Y', 'm', 'd']\nconst DEFAULT_DATE_RAW_PATTERN_DELIMITER = '-'\nconst DEFAULT_TIME_PATTERN: TimePatternType = ['h', 'm', 's']\nconst DEFAULT_TIME_RAW_PATTERN: TimePatternType = ['h', 'm']\nconst DEFAULT_TIME_RAW_PATTERN_DELIMITER = ':'\n\nconst getDateSegmentKey = (unit: DateUnit): DateSegmentKey => {\n switch (unit.toLowerCase()) {\n case 'd':\n return 'day'\n case 'm':\n return 'month'\n default:\n return 'year'\n }\n}\n\nconst getDateUnitLength = (unit: DateUnit): 2 | 4 =>\n unit === 'Y' ? 4 : 2\n\nconst normalizeDateSegment = (segment: string, unit: DateUnit): string => {\n if (!segment) return ''\n\n switch (unit) {\n case 'y':\n return segment.slice(-2)\n case 'Y':\n return segment.slice(0, 4)\n default:\n return segment.slice(0, 2)\n }\n}\n\nconst getDateSegments = (\n value: string,\n pattern: DatePatternType\n): Partial<Record<DateSegmentKey, string>> => {\n const digits = value.replace(/[^\\d]/g, '')\n const segments: Partial<Record<DateSegmentKey, string>> = {}\n let start = 0\n\n for (const unit of pattern) {\n const end = start + getDateUnitLength(unit)\n const segment = digits.slice(start, end)\n\n if (segment) {\n segments[getDateSegmentKey(unit)] = segment\n }\n\n start = end\n }\n\n return segments\n}\n\nconst formatDateSegments = (\n segments: Partial<Record<DateSegmentKey, string>>,\n pattern: DatePatternType,\n delimiter = ''\n): string =>\n pattern\n .map((unit) =>\n normalizeDateSegment(segments[getDateSegmentKey(unit)] ?? '', unit)\n )\n .filter(Boolean)\n .join(delimiter)\n\nconst getTimeSegmentKey = (unit: TimeUnit): TimeSegmentKey => {\n switch (unit) {\n case 'h':\n return 'hours'\n case 'm':\n return 'minutes'\n default:\n return 'seconds'\n }\n}\n\nconst getTimeSegments = (\n value: string,\n pattern: TimePatternType\n): Partial<Record<TimeSegmentKey, string>> => {\n const digits = value.replace(/[^\\d]/g, '')\n const segments: Partial<Record<TimeSegmentKey, string>> = {}\n let start = 0\n\n for (const unit of pattern) {\n const end = start + 2\n const segment = digits.slice(start, end)\n\n if (segment) {\n segments[getTimeSegmentKey(unit)] = segment\n }\n\n start = end\n }\n\n return segments\n}\n\nconst formatTimeSegments = (\n segments: Partial<Record<TimeSegmentKey, string>>,\n pattern: TimePatternType,\n delimiter = ''\n): string =>\n pattern\n .map((unit) => (segments[getTimeSegmentKey(unit)] ?? '').slice(0, 2))\n .filter(Boolean)\n .join(delimiter)\n\n/**\n * Convert a raw date string (e.g. `2026-05-12`) into the digit order of the\n * display pattern (e.g. `12/05/2026` → `12052026`).\n *\n * The output is intentionally digits-only and un-delimited — the caller is\n * expected to pass the result through `cleave-zen`'s `formatDate` (or an\n * equivalent) to add the configured delimiter. The source pattern is\n * `dateRawPattern`; the target pattern is `datePattern`.\n */\nexport const getDateValueFromRaw = (\n value: string,\n options: FormatOptions = {}\n): string => {\n const sourcePattern = options.dateRawPattern ?? DEFAULT_DATE_RAW_PATTERN\n const targetPattern = options.datePattern ?? DEFAULT_DATE_PATTERN\n\n return formatDateSegments(\n getDateSegments(value, sourcePattern),\n targetPattern\n )\n}\n\n/**\n * Convert a raw time string (e.g. `14:30`) into the digit order of the\n * display pattern (e.g. `14:30:00` → `1430`).\n *\n * The output is intentionally digits-only and un-delimited — the caller is\n * expected to pass the result through `cleave-zen`'s `formatTime` (or an\n * equivalent) to add the configured delimiter and pad missing segments.\n * The source pattern is `timeRawPattern`; the target pattern is\n * `timePattern`.\n */\nexport const getTimeValueFromRaw = (\n value: string,\n options: FormatOptions = {}\n): string => {\n const sourcePattern =\n options.timeRawPattern ?? options.timePattern ?? DEFAULT_TIME_RAW_PATTERN\n const targetPattern = options.timePattern ?? DEFAULT_TIME_PATTERN\n\n return formatTimeSegments(\n getTimeSegments(value, sourcePattern),\n targetPattern\n )\n}\n\nconst getDateRawValue = (\n value: string,\n options: FormatOptions = {}\n): string => {\n const sourcePattern = options.datePattern ?? DEFAULT_DATE_PATTERN\n const targetPattern = options.dateRawPattern ?? DEFAULT_DATE_RAW_PATTERN\n const delimiter =\n options.dateRawPatternDelimiter ?? DEFAULT_DATE_RAW_PATTERN_DELIMITER\n\n return formatDateSegments(\n getDateSegments(value, sourcePattern),\n targetPattern,\n delimiter\n )\n}\n\nconst getTimeRawValue = (\n value: string,\n options: FormatOptions = {}\n): string => {\n const sourcePattern = options.timePattern ?? DEFAULT_TIME_PATTERN\n const targetPattern =\n options.timeRawPattern ?? options.timePattern ?? DEFAULT_TIME_RAW_PATTERN\n const delimiter =\n options.timeRawPatternDelimiter ?? DEFAULT_TIME_RAW_PATTERN_DELIMITER\n\n return formatTimeSegments(\n getTimeSegments(value, sourcePattern),\n targetPattern,\n delimiter\n )\n}\n\n/**\n * Strip a configured `prefix` from either the start or the end of `value`.\n * `tailPrefix: true` treats the prefix as a suffix.\n */\nexport const stripPrefixAndSuffix = (\n value: string,\n options: FormatOptions = {}\n): string => {\n if (!value || !options.prefix) return value\n\n const { prefix } = options\n const tailPrefix = options.tailPrefix ?? false\n\n if (tailPrefix && value.endsWith(prefix)) {\n return value.slice(0, -prefix.length)\n }\n\n if (!tailPrefix && value.startsWith(prefix)) {\n return value.slice(prefix.length)\n }\n\n return value\n}\n\n/**\n * Convert a formatted value back into its raw counterpart (digits only,\n * canonical structure ready to ship to a backend).\n */\nexport const getRawValue = (\n value: string,\n formatType: FormatType,\n options: FormatOptions = {}\n): string => {\n if (!value) return ''\n\n const cleanValue = stripPrefixAndSuffix(value, options)\n\n switch (formatType) {\n case 'numeral': {\n const numeralOpts: { numeralDecimalMark?: string } = {}\n if (options.numeralDecimalMark !== undefined) {\n numeralOpts.numeralDecimalMark = options.numeralDecimalMark\n }\n return unformatNumeral(cleanValue, numeralOpts)\n }\n\n case 'creditCard':\n case 'creditCardType':\n return unformatCreditCard(cleanValue)\n\n case 'general': {\n const generalOpts: {\n delimiter?: string\n delimiters?: string[]\n } = {}\n if (options.delimiter !== undefined) generalOpts.delimiter = options.delimiter\n if (options.delimiters !== undefined) generalOpts.delimiters = options.delimiters\n return unformatGeneral(cleanValue, generalOpts)\n }\n\n case 'date':\n return getDateRawValue(cleanValue, options)\n\n case 'time':\n return getTimeRawValue(cleanValue, options)\n\n case 'phone':\n return cleanValue.replace(/[^\\d+]/g, '')\n\n default:\n return cleanValue.replace(/\\s+/g, '')\n }\n}","import {\n formatCreditCard,\n formatDate,\n formatGeneral,\n formatNumeral,\n formatTime,\n getCreditCardType,\n type FormatGeneralOptions\n} from 'cleave-zen'\n\nimport { formatPhone } from './phone.js'\nimport {\n getDateValueFromRaw,\n getTimeValueFromRaw,\n type FormatOptions,\n type FormatType\n} from './raw.js'\n\nexport type { FormatOptions, FormatType }\n\nexport const FORMAT_TYPES = [\n 'general',\n 'phone',\n 'numeral',\n 'date',\n 'time',\n 'creditCard',\n 'creditCardType'\n] as const satisfies readonly FormatType[]\n\nexport const isFormatType = (value: unknown): value is FormatType =>\n typeof value === 'string' &&\n (FORMAT_TYPES as readonly string[]).includes(value)\n\ntype RuntimeOptions = FormatOptions & {\n country: string\n delimiter?: string\n}\n\n// Per-type defaults applied only when the caller does not pass their own.\n// `phone` overrides cleave-zen because libphonenumber emits spaces natively;\n// every other type lets cleave-zen pick its own idiomatic delimiter\n// (`/`, `:`, `,`, etc.) by leaving `delimiter` undefined on the runtime\n// options object passed downstream.\nconst PHONE_DEFAULT_DELIMITER = ' '\nconst PHONE_DEFAULT_COUNTRY = 'MX'\n\n/**\n * Internal: pick a country/delimiter-aware runtime options object with\n * phone-specific defaults applied. For non-phone formats the `delimiter`\n * is left as the user supplied it (or absent) so cleave-zen falls back to\n * its idiomatic defaults.\n */\nconst resolveRuntimeOptions = (\n formatType: FormatType,\n options: FormatOptions = {}\n): RuntimeOptions => {\n const isPhone = formatType === 'phone'\n const country = options.country ?? (isPhone ? PHONE_DEFAULT_COUNTRY : '')\n\n // Build the runtime options without ever assigning `undefined` to optional\n // fields (so `exactOptionalPropertyTypes` stays happy) and without ever\n // adding an explicit empty-string `delimiter` for non-phone types (so\n // cleave-zen falls back to its own idiomatic default).\n const runtime: RuntimeOptions = {\n ...options,\n country\n }\n\n if (options.delimiter !== undefined) {\n runtime.delimiter = options.delimiter\n } else if (isPhone) {\n runtime.delimiter = PHONE_DEFAULT_DELIMITER\n }\n\n return runtime\n}\n\n/**\n * Internal: format a pre-processed value into its display representation\n * by delegating to the matching `cleave-zen` (or `formatPhone`) helper.\n */\nconst formatValue = (\n value: string,\n formatType: FormatType,\n options: RuntimeOptions\n): string => {\n switch (formatType) {\n case 'phone':\n return formatPhone(value, options.country, options.delimiter)\n\n case 'numeral':\n return formatNumeral(value, options)\n\n case 'date':\n return formatDate(value, options)\n\n case 'time':\n return formatTime(value, options)\n\n case 'creditCard':\n return formatCreditCard(value, options)\n\n case 'creditCardType':\n return getCreditCardType(value, options.delimiter)\n\n case 'general':\n // cleave-zen's `formatGeneral` requires `blocks` in its options;\n // `FormatOptions` does not declare it (consumers pick blocks via\n // their own configuration). This cast is the documented seam.\n return formatGeneral(\n value,\n options as unknown as FormatGeneralOptions\n )\n }\n}\n\n/**\n * Internal: pre-process `value` before passing it to the per-type formatter.\n * Date and time inputs are first converted from raw to the display pattern\n * (so users can type either formatted or raw and still get sensible output).\n */\nconst getValueForFormatting = (\n value: string,\n formatType: FormatType,\n options: RuntimeOptions\n): string => {\n if (formatType === 'date') {\n return getDateValueFromRaw(value, options)\n }\n\n if (formatType === 'time') {\n return getTimeValueFromRaw(value, options)\n }\n\n return value\n}\n\nexport { formatValue, getValueForFormatting, resolveRuntimeOptions }","import {\n formatValue,\n getValueForFormatting,\n resolveRuntimeOptions,\n FORMAT_TYPES,\n isFormatType,\n type FormatType\n} from './format.js'\n\nimport { getRawValue, stripPrefixAndSuffix } from './raw.js'\n\nimport type { FormatterResult, FormatOptions } from './types.js'\n\nexport type { FormatOptions, FormatType, FormatterResult }\nexport { FORMAT_TYPES, isFormatType, stripPrefixAndSuffix }\n\n/**\n * Format `value` according to `formatType`, returning both a presentable\n * `formatted` string and a backend-ready `raw` string.\n *\n * The function is pure: it never touches the DOM and never reads from the\n * network. Pair it with your own input wiring (React, Vue, Svelte, vanilla)\n * to drive the visible field; mirror `result.raw` into a hidden input when\n * shipping to a server that expects clean digits.\n *\n * @param value - The raw value typed by the user (`null`/`undefined`/`''` return an empty result).\n * @param formatType - One of the supported `FormatType` values.\n * @param options - Per-type options (see `FormatOptions`).\n * @returns A `FormatterResult` with `formatted`, `raw`, and the echoed `type`.\n * @throws {TypeError} When `formatType` is not one of the supported types.\n */\nexport const format = (\n value: unknown,\n formatType: FormatType,\n options: FormatOptions = {}\n): FormatterResult => {\n if (!isFormatType(formatType)) {\n throw new TypeError(\n `Invalid formatType: ${String(formatType)}. Expected one of: ${FORMAT_TYPES.join(', ')}`\n )\n }\n\n if (value === null || value === undefined || value === '') {\n return { formatted: '', raw: '', type: formatType }\n }\n\n const runtime = resolveRuntimeOptions(formatType, options)\n const stringValue = typeof value === 'string' ? value : String(value)\n const cleanValue = stripPrefixAndSuffix(stringValue, runtime)\n const preValue = getValueForFormatting(cleanValue, formatType, runtime)\n const formatted = formatValue(preValue, formatType, runtime)\n // `getRawValue` normally consumes the *formatted* display string (mirrors\n // the original `syncRawInputValue` pipeline). The one exception is\n // `creditCardType`, where `formatted` is the card brand name (e.g. \"visa\")\n // rather than the card number — the raw needs to come from the cleaned\n // input directly.\n const raw =\n formatType === 'creditCardType'\n ? getRawValue(cleanValue, formatType, runtime)\n : getRawValue(formatted, formatType, runtime)\n\n return { formatted, raw, type: formatType }\n}","/**\n * # Regex Module\n *\n * Validation patterns exposed as public API for form consumers that pair\n * formatting with validation. Each entry bundles the regex with a ready-to-use\n * error message so consumers do not have to keep them in sync.\n *\n * ## Usage\n *\n * **Static (backward compatible):**\n * ```ts\n * regex.phone.pattern.test('5512345678') // true\n * regex.email.errorMessage // 'Please enter a valid email address.'\n * ```\n *\n * **Parametric (dynamic):**\n * ```ts\n * regex.digits(10).pattern.test('1234567890') // true\n * regex.digits(7).pattern.test('1234567') // true\n * regex.phone({ length: 10 }).pattern.test('1234567890')\n * regex.phone({ length: 7 }).pattern.test('1234567')\n * ```\n *\n * **Custom regex:**\n * ```ts\n * regex.custom(/^[A-Z]{5}$/, 'Must be 5 uppercase letters').pattern.test('HELLO')\n * ```\n *\n * ## Available Patterns\n *\n * | Key | Static | Parametric | Description |\n * | --- | --- | --- | --- |\n * | `phone` | ✅ | ✅ `({ length })` | Phone numbers |\n * | `email` | ✅ | — | Email addresses |\n * | `rfc` | ✅ | — | Mexican RFC |\n * | `curp` | ✅ | — | Mexican CURP |\n * | `cp` | ✅ | — | Mexican postal code (5 digits) |\n * | `numeral` | ✅ | — | Numbers with separators |\n * | `onlyNumbers` | ✅ | ✅ `({ length })` | Digits only |\n * | `digits` | — | ✅ `({ length, min, max })` | Variable digit count |\n * | `creditCard` | ✅ | ✅ `({ min, max })` | Card numbers |\n * | `expirationDate` | ✅ | — | MM/YY format |\n * | `cardCvc` | ✅ | — | 3-4 digit CVC |\n * | `onlyLetters` | ✅ | — | Letters only |\n * | `onlyAlphanumeric` | ✅ | — | Letters and numbers |\n * | `url` | ✅ | ✅ `({ protocol })` | URLs |\n * | `ipv4` | ✅ | — | IPv4 addresses |\n * | `ipv6` | ✅ | — | IPv6 addresses |\n * | `uuid` | ✅ | — | UUID v4 |\n * | `hexColor` | ✅ | — | Hex color codes |\n * | `hashtag` | ✅ | — | Social media hashtags |\n * | `mention` | ✅ | — | Social media mentions |\n * | `password` | — | ✅ `({ min, max, rules })` | Password strength |\n * | `custom` | — | ✅ `({ pattern, errorMessage })` | User-defined regex |\n */\n\n// ─── Types ─────────────────────────────────────────────────────────────────\n\nexport interface RegexEntry {\n pattern: RegExp\n errorMessage: string\n}\n\ninterface PhoneParams {\n length?: number\n}\n\ninterface DigitsParams {\n length?: number\n min?: number\n max?: number\n}\n\ninterface CreditCardParams {\n min?: number\n max?: number\n}\n\ninterface UrlParams {\n protocol?: 'http' | 'https' | 'ftp' | 'all'\n}\n\ninterface PasswordParams {\n min?: number\n max?: number\n uppercase?: boolean\n lowercase?: boolean\n numbers?: boolean\n special?: boolean\n}\n\ninterface CustomParams {\n pattern: RegExp\n errorMessage: string\n}\n\n\n// ─── Internal Factories ──────────────────────────────────────────────────────\n\nfunction createDigits(min: number, max: number, errorMsg: string): RegexEntry {\n return {\n pattern: new RegExp(`^\\\\d{${min},${max}}$`),\n errorMessage: errorMsg\n }\n}\n\nfunction createPhone(length: number): RegexEntry {\n return {\n pattern: new RegExp(`^(?:\\\\D*\\\\d){${length}}\\\\D*$`),\n errorMessage: `Please enter a valid ${length}-digit phone number.`\n }\n}\n\nfunction createCreditCard(min: number, max: number): RegexEntry {\n return {\n pattern: new RegExp(`^(?:\\\\D*\\\\d){${min},${max}}\\\\D*$`),\n errorMessage: `Please enter a valid card number (${min}-${max} digits).`\n }\n}\n\nfunction createUrl(requireProtocol: 'http' | 'https' | 'ftp' | 'all'): RegexEntry {\n const protocol = requireProtocol === 'all' ? 'https?' : requireProtocol\n return {\n pattern: new RegExp(`^${protocol}://[^\\\\s]+$`),\n errorMessage: `Please enter a valid URL${requireProtocol !== 'all' ? ` (${requireProtocol}://...)` : ''}.`\n }\n}\n\nfunction createPassword(params: PasswordParams): RegexEntry {\n const {\n min = 8,\n max = 128,\n uppercase = true,\n lowercase = true,\n numbers = true,\n special = false\n } = params\n\n // Build the character class with proper escaping (put - last to avoid range issues)\n let chars = ''\n if (uppercase) chars += 'A-Z'\n if (lowercase) chars += 'a-z'\n if (numbers) chars += '0-9'\n if (special) chars += '!@#$%^&*()_+\\\\-=\\\\[\\\\]{}|;:\\'\",.<>?/'\n\n const ruleParts: string[] = []\n if (uppercase) ruleParts.push('uppercase letter')\n if (lowercase) ruleParts.push('lowercase letter')\n if (numbers) ruleParts.push('number')\n if (special) ruleParts.push('special character')\n\n const rulesText = ruleParts.length > 2\n ? ruleParts.slice(0, -1).join(', ') + ' and ' + ruleParts.slice(-1)\n : ruleParts.join(' and ')\n\n return {\n pattern: new RegExp(`^[${chars}]{${min},${max}}$`),\n errorMessage: `Password must be ${min}-${max} characters with at least one ${rulesText}.`\n }\n}\n\n// ─── Static Patterns ─────────────────────────────────────────────────────────\n\nconst _regex = {\n phone: {\n pattern: /^(?:\\D*\\d){10}\\D*$/,\n errorMessage: 'Please enter a valid 10-digit phone number.'\n },\n email: {\n // Simple but effective email validation\n pattern: /^[^\\s@]+@[^\\s@]+\\.[a-zA-Z]{2,}$/,\n errorMessage: 'Please enter a valid email address.'\n },\n rfc: {\n // Mexican RFC ( Personas Morales y Físicas )\n pattern: /^([A-ZÑ&]{3,4})\\d{6}([A-Z0-9]{0,3})$/i,\n errorMessage: 'Please enter a valid RFC.'\n },\n curp: {\n // Mexican CURP (18 characters)\n pattern: /^[A-Z]{4}\\d{6}[A-Z]{6}[0-9A-Z]\\d$/i,\n errorMessage: 'Please enter a valid CURP.'\n },\n cp: {\n // Mexican postal code (5 digits)\n pattern: /^\\d{5}$/,\n errorMessage: 'Please enter a valid 5-digit postal code.'\n },\n numeral: {\n // Numbers with optional thousand separators and decimal points\n pattern: /\\d{1,3}(,\\d{3})*(\\.\\d+)?/,\n errorMessage: 'Please enter a valid number.'\n },\n onlyNumbers: {\n pattern: /^\\d+$/,\n errorMessage: 'Please enter only numbers.'\n },\n creditCard: {\n // 15 or 16 digits, allowing spaces or delimiters\n pattern: /^(?:\\D*\\d){15,16}\\D*$/,\n errorMessage: 'Please enter a valid card number (15-16 digits).'\n },\n expirationDate: {\n // MM/YY or MM/YYYY format\n pattern: /^(0[1-9]|1[0-2])\\/(\\d{2}|\\d{4})$/,\n errorMessage: 'Please enter a valid expiration date (MM/YY or MM/YYYY).'\n },\n cardCvc: {\n // 3 or 4 digit card security codes\n pattern: /^\\d{3,4}$/,\n errorMessage: 'Please enter a valid CVC (3-4 digits).'\n },\n onlyLetters: {\n // Letters only (including accented characters and spaces)\n pattern: /^[A-Za-zÁÉÍÓÚáéíóúÑñ\\s]+$/,\n errorMessage: 'Please enter only letters.'\n },\n onlyAlphanumeric: {\n // Letters and numbers (including accented characters and spaces)\n pattern: /^[A-Za-zÁÉÍÓÚáéíóúÑñ0-9\\s]+$/,\n errorMessage: 'Please enter only letters and numbers.'\n },\n url: {\n // Accepts http, https, ftp\n pattern: /^(?:https?|ftp):\\/\\/[^\\s]+$/,\n errorMessage: 'Please enter a valid URL.'\n },\n ipv4: {\n // IPv4 addresses (0-255 per octet)\n pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,\n errorMessage: 'Please enter a valid IPv4 address.'\n },\n ipv6: {\n // IPv6 addresses (simplified)\n pattern: /^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/,\n errorMessage: 'Please enter a valid IPv6 address.'\n },\n uuid: {\n // UUID v4\n pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n errorMessage: 'Please enter a valid UUID.'\n },\n hexColor: {\n // Hex color codes (#RGB or #RRGGBB)\n pattern: /^#(?:[0-9a-fA-F]{3}){1,2}$/,\n errorMessage: 'Please enter a valid hex color code (e.g., #FFF or #FFFFFF).'\n },\n hashtag: {\n // Social media hashtags\n pattern: /^#[a-zA-Z_][a-zA-Z0-9_]*$/,\n errorMessage: 'Please enter a valid hashtag (e.g., #example).'\n },\n mention: {\n // Social media mentions\n pattern: /^@[a-zA-Z_][a-zA-Z0-9_]*$/,\n errorMessage: 'Please enter a valid mention (e.g., @username).'\n },\n postalCode: {\n // Generic 5-digit postal code (US-style ZIP / MX CP)\n pattern: /^\\d{5}(?:-\\d{4})?$/,\n errorMessage: 'Please enter a valid postal code (e.g., 90210 or 90210-1234).'\n },\n time24: {\n // 24-hour time HH:MM\n pattern: /^([01]\\d|2[0-3]):([0-5]\\d)$/,\n errorMessage: 'Please enter a valid 24-hour time (HH:MM).'\n },\n date: {\n // ISO-like date YYYY-MM-DD (loose)\n pattern: /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/,\n errorMessage: 'Please enter a valid date (YYYY-MM-DD).'\n },\n slug: {\n // URL slug (lowercase, hyphens, no spaces)\n pattern: /^[a-z0-9]+(?:-[a-z0-9]+)*$/,\n errorMessage: 'Please enter a valid slug (lowercase, hyphens, no spaces).'\n },\n username: {\n // Username: 3-20 chars, alphanumeric, underscore, hyphen\n pattern: /^[a-zA-Z0-9_-]{3,20}$/,\n errorMessage: 'Please enter a valid username (3-20 chars, letters, numbers, _ or -).'\n },\n macAddress: {\n // MAC address (colon or hyphen separated)\n pattern: /^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/,\n errorMessage: 'Please enter a valid MAC address (e.g., 00:1B:44:11:3A:B7).'\n },\n semver: {\n // Semantic version (X.Y.Z with optional -prerelease)\n pattern: /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-[a-zA-Z0-9.-]+)?$/,\n errorMessage: 'Please enter a valid semantic version (e.g., 1.2.3).'\n },\n base64: {\n // Base64 encoded string\n pattern: /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,\n errorMessage: 'Please enter a valid Base64 encoded string.'\n }\n} as const\n\n// ─── Parametric Extensions ───────────────────────────────────────────────────\n\n/**\n * Digits with configurable length.\n * @example\n * regex.digits(10).pattern.test('1234567890') // true\n * regex.digits({ length: 7 }).pattern.test('1234567') // true\n * regex.digits({ min: 3, max: 10 }).pattern.test('12345') // true\n */\nfunction digits(params?: number | DigitsParams): RegexEntry {\n if (typeof params === 'number') {\n return createDigits(params, params, `Please enter exactly ${params} digits.`)\n }\n const { length, min = 1, max = 20 } = params ?? {}\n const actualMin = length ?? min\n const actualMax = length ?? max\n if (actualMin === actualMax) {\n return createDigits(actualMin, actualMax, `Please enter exactly ${actualMin} digits.`)\n }\n return createDigits(actualMin, actualMax, `Please enter ${actualMin}-${actualMax} digits.`)\n}\n\n/**\n * Phone with configurable digit count.\n *\n * Also available as static entry: regex.phone.pattern (10 digits)\n * @example\n * regex.phone().pattern.test('5512345678') // true (10 digits)\n * regex.phone({ length: 7 }).pattern.test('1234567') // true (7 digits)\n */\nfunction _phoneFn(params?: PhoneParams): RegexEntry {\n const length = params?.length ?? 10\n return createPhone(length)\n}\n\n/**\n * Credit card with configurable digit range.\n *\n * Also available as static entry: regex.creditCard.pattern (15-16 digits)\n * @example\n * regex.creditCard().pattern.test('4111111111111111') // true (15-16)\n * regex.creditCard({ min: 13, max: 19 }).pattern.test('1234567890123') // true\n */\nfunction _creditCardFn(params?: CreditCardParams): RegexEntry {\n const min = params?.min ?? 15\n const max = params?.max ?? 16\n return createCreditCard(min, max)\n}\n\n/**\n * URL with configurable protocol.\n *\n * Also available as static entry: regex.url.pattern (any protocol)\n * @example\n * regex.url().pattern.test('https://example.com') // true\n * regex.url({ protocol: 'https' }).pattern.test('https://example.com') // true\n * regex.url({ protocol: 'https' }).pattern.test('ftp://example.com') // false\n */\nfunction _urlFn(params?: UrlParams): RegexEntry {\n const protocol = params?.protocol ?? 'all'\n return createUrl(protocol)\n}\n\n/**\n * Password with configurable strength rules.\n * @example\n * regex.password().pattern.test('Passw0rd!') // true (default: 8+ chars, upper, lower, number)\n * regex.password({ min: 12, special: true }).pattern.test('MyP@ssw0rd!') // true\n */\nfunction _passwordFn(params?: PasswordParams): RegexEntry {\n return createPassword(params ?? {})\n}\n\n/**\n * Custom regex provided by the user.\n * @example\n * regex.custom(/^[A-Z]{5}$/, 'Must be 5 uppercase letters').pattern.test('HELLO') // true\n * regex.custom({ pattern: /^\\d+$/, errorMessage: 'Numbers only' }).pattern.test('123') // true\n */\nfunction _customFn(pattern: RegExp, errorMessage?: string): RegexEntry\nfunction _customFn(params: CustomParams): RegexEntry\nfunction _customFn(\n arg1: RegExp | CustomParams,\n arg2?: string\n): RegexEntry {\n if (arg1 instanceof RegExp) {\n return { pattern: arg1, errorMessage: arg2 ?? 'Invalid value.' }\n }\n return { pattern: arg1.pattern, errorMessage: arg1.errorMessage }\n}\n\n// ─── Callable Objects with Attached Pattern ──────────────────────────────────\n\n// These are callable functions that also have .pattern and .errorMessage attached\n// This allows both: regex.phone({ length: 7 }) AND regex.phone.pattern\n\nconst phoneFn = _phoneFn as typeof _phoneFn & RegexEntry\nphoneFn.pattern = _regex.phone.pattern\nphoneFn.errorMessage = _regex.phone.errorMessage\n\nconst creditCardFn = _creditCardFn as typeof _creditCardFn & RegexEntry\ncreditCardFn.pattern = _regex.creditCard.pattern\ncreditCardFn.errorMessage = _regex.creditCard.errorMessage\n\nconst urlFn = _urlFn as typeof _urlFn & RegexEntry\nurlFn.pattern = _regex.url.pattern\nurlFn.errorMessage = _regex.url.errorMessage\n\n// Parametric-only functions need default error messages\nconst digitsFn = digits as typeof digits & RegexEntry\ndigitsFn.errorMessage = 'Please enter a valid number.'\n\nconst passwordFn = _passwordFn as typeof _passwordFn & RegexEntry\npasswordFn.errorMessage = 'Please enter a valid password.'\n\nconst customFn = _customFn as typeof _customFn & RegexEntry\ncustomFn.errorMessage = 'Please enter a valid value.'\n\n// ─── Final Export ─────────────────────────────────────────────────────────────\n\nexport const regex = {\n // Static entries (backward compatible - spread first)\n ..._regex,\n\n // Parametric functions\n digits: digitsFn,\n phone: phoneFn,\n creditCard: creditCardFn,\n url: urlFn,\n password: passwordFn,\n custom: customFn\n} as const\n\nexport type RegexKey = keyof typeof _regex\nexport type Regex = typeof regex","// Browser entrypoint. Exposes a minimal surface as a single global\n// accessible via `window.Forms` (or `globalThis.Forms`).\n//\n// Public shape:\n// - Forms.form(target, options)\n// - Forms.newForm({ id, options })\n// - Forms.destroyForm(id)\n// - Forms.available (registry keyed by form id)\n//\n// The IIFE bundle consumes the same `browser` singleton as the vanilla\n// entrypoint — single source of truth for the registry helpers.\n\nimport { browser } from './registry'\nimport type { FormsApi } from './registry'\n\nconst Forms: FormsApi = browser\n\ndeclare global {\n interface Window {\n Forms: FormsApi\n }\n}\n\nif (typeof globalThis !== 'undefined') {\n ;(globalThis as typeof globalThis & { Forms: FormsApi }).Forms = Forms\n}\n\nexport default Forms","// api/append.ts\n// Appends DOM content to the bound form. If a class is provided, removes\n// any existing node with that class first to avoid duplicates.\n// Returns the created node or null when no element is bound.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { AppendContentOptions } from '../core/types'\n\nexport const createAppend =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n ({ tag, content, class: className, atStart = false }: AppendContentOptions) => {\n if (!state.element) return null\n\n helpers.clearFieldCache()\n\n if (className) {\n const classSelector = className.trim().split(/\\s+/)[0]\n const existing = classSelector\n ? state.element.querySelector(`.${classSelector}`)\n : null\n existing?.remove()\n }\n\n const node = document.createElement(tag)\n if (className) node.className = className\n node.innerHTML = content\n\n if (atStart && state.element.firstChild) {\n state.element.insertBefore(node, state.element.firstChild)\n } else {\n state.element.appendChild(node)\n }\n\n return node\n }\n","// api/auto-submit.ts\n// Enables native auto-submit. Pass `true` to enable, `false` to disable,\n// or an { debounce } object to delay.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createAutoSubmit =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (next: boolean | { debounce?: number } = true) => {\n state.autoSubmitEnabled = next !== false\n state.autoSubmitDebounce =\n typeof next === 'object' && next ? next.debounce ?? 0 : 0\n helpers.notifySubscribers()\n return state.api!\n }\n","// api/clear-errors.ts\n// Clears manual errors. With no args, clears every manual error. With a\n// list, clears only those fields.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createClearErrors =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (fields?: string[]) => {\n if (!fields) {\n state.manualErrors = {}\n helpers.syncVisualState()\n helpers.notifySubscribers()\n return state.api!\n }\n\n for (const field of fields) {\n delete state.manualErrors[field]\n }\n helpers.syncVisualState(fields)\n helpers.notifySubscribers()\n return state.api!\n }\n","// Low-level helpers used by `api/format.ts`:\n// - DOM cursor tracking equivalent to cleave.js' `getNextCursorPosition`\n// (so typing/backspacing inside formatted inputs keeps the caret\n// in a sensible place, even when delimiters are inserted or removed).\n// - Raw-mirror lookup & creation: each formatted input gets a hidden\n// sibling (`type=\"hidden\"`) that holds the backend-ready `raw`\n// value. The mirror is created on first `format()` call and reused\n// on subsequent calls so re-binding the controller does not duplicate\n// hidden inputs.\n//\n// The helpers here are pure DOM utilities — they do not know about the\n// controller state.\n\nimport type { FormFieldElement } from './types'\n\nexport const FORMATTER_RAW_ATTRIBUTE = 'data-formatter-raw-for'\n\n// Resolve a field by name (used to read the original input that owns the\n// raw mirror). Returns the first matching element or `null`.\nexport const getFormatterField = (\n form: HTMLFormElement,\n name: string\n): HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null => {\n const selector = `[name=\"${cssEscape(name)}\"]`\n const node = form.querySelector(selector)\n if (\n node instanceof HTMLInputElement ||\n node instanceof HTMLTextAreaElement ||\n node instanceof HTMLSelectElement\n ) {\n return node\n }\n return null\n}\n\n// Minimal CSS.escape polyfill for selectors that may contain special\n// characters (`[1].phone`, `email[primary]`, etc.).\nconst cssEscape = (value: string): string => {\n if (typeof CSS !== 'undefined' && typeof CSS.escape === 'function') {\n return CSS.escape(value)\n }\n return value.replace(/([!\"#$%&'()*+,./:;<=>?@\\[\\\\\\]^`{|}~])/g, '\\\\$1')\n}\n\n// Find the hidden input that mirrors `raw` for the given field name.\n// Returns the existing element or `null`.\nexport const findRawMirror = (\n form: HTMLFormElement,\n fieldName: string\n): HTMLInputElement | null => {\n const byAttr = form.querySelector<HTMLInputElement>(\n `[${FORMATTER_RAW_ATTRIBUTE}=\"${cssEscape(fieldName)}\"]`\n )\n if (byAttr) return byAttr\n\n // Backwards-compatible lookup: existing deployments may have used\n // `<input name=\"<field>_raw\">` or `<input name=\"<field>Raw\">` to carry the raw value. Reuse it.\n const byName = form.querySelector<HTMLInputElement>(\n `[name=\"${cssEscape(`${fieldName}_raw`)}\"]`\n )\n if (byName) return byName\n const byNameOld = form.querySelector<HTMLInputElement>(\n `[name=\"${cssEscape(`${fieldName}Raw`)}\"]`\n )\n if (byNameOld) return byNameOld\n\n return null\n}\n\n// Create a hidden input that will mirror the raw value of `fieldName`.\n// Idempotent: if a mirror already exists it is returned as-is.\nexport const ensureRawMirror = (\n form: HTMLFormElement,\n fieldName: string\n): HTMLInputElement => {\n const existing = findRawMirror(form, fieldName)\n if (existing) return existing\n\n const input = document.createElement('input')\n input.type = 'hidden'\n input.name = `${fieldName}_raw`\n input.setAttribute('aria-hidden', 'true')\n input.tabIndex = -1\n input.setAttribute(FORMATTER_RAW_ATTRIBUTE, fieldName)\n form.appendChild(input)\n return input\n}\n\n// Remove every raw mirror owned by `format()`. Mirrors created by this\n// controller carry the `data-formatter-raw-for` attribute; mirrors that\n// existed before are left untouched.\nexport const removeOwnedRawMirrors = (form: HTMLFormElement): void => {\n form\n .querySelectorAll<HTMLInputElement>(`[${FORMATTER_RAW_ATTRIBUTE}]`)\n .forEach(node => node.remove())\n}\n\n// Write `formatted` into the visible field and `raw` into the hidden\n// mirror, preserving the cursor as best as possible.\n//\n// Returns the new caret position so callers can debug or run additional\n// assertions. The function avoids triggering `MutationObserver` cascades\n// for the hidden mirror by setting `.value` directly (the controller's\n// own delegated handler ignores hidden inputs via `isFieldElement`).\nexport const applyFormattedValue = (\n visible: HTMLInputElement | HTMLTextAreaElement,\n mirror: HTMLInputElement | null,\n formatted: string,\n raw: string\n): number => {\n // Capture the caret in the **raw** input the user just typed — this\n // is what cleave's `getNextCursorPosition` does. Using the formatted\n // previous value would lose information when the user edits in the\n // middle of a masked field (deletion adjacent to delimiters, etc.).\n const rawInput = visible.value\n const caret = clamp(\n visible.selectionStart ?? rawInput.length,\n 0,\n rawInput.length\n )\n\n if (rawInput === formatted) {\n if (mirror && mirror.value !== raw) mirror.value = raw\n return caret\n }\n\n visible.value = formatted\n\n if (mirror) mirror.value = raw\n\n const newCaret = computeCursorPosition(caret, rawInput, formatted)\n restoreCursor(visible, newCaret)\n return newCaret\n}\n\nconst clamp = (value: number, min: number, max: number): number =>\n Math.max(min, Math.min(max, value))\n\n// `computeCursorPosition` is a cleave-style implementation:\n// - count \"non-format\" characters (digits / letters) between the caret\n// and the start of the **raw input the user just typed**, then\n// locate that same logical index in the new formatted value\n// (jumping over inserted delimiters).\n// - when the caret is at (or past) the end of the raw input, place\n// it at the end of the formatted value.\n//\n// The algorithm intentionally avoids any cleave-zen dependency so this\n// file is pure DOM arithmetic.\nexport const computeCursorPosition = (\n caretPos: number,\n rawInput: string,\n newValue: string\n): number => {\n if (newValue.length === 0) return 0\n\n // Caret at (or past) the end of the raw input — place at new end.\n if (caretPos >= rawInput.length) return newValue.length\n\n // Caret within the raw input: count non-format characters to its\n // LEFT (i.e. how many real characters are before the caret) and\n // find that same count in the new formatted value.\n const targetNonFormat = countNonFormat(rawInput.slice(0, caretPos))\n\n if (targetNonFormat === 0) {\n // Skip leading delimiters / prefix symbols (`$`, `+`, …) so the\n // caret lands at the first real character of the new value.\n let i = 0\n while (i < newValue.length && isFormatChar(newValue[i]!)) i += 1\n return i\n }\n\n let seen = 0\n for (let i = 0; i < newValue.length; i += 1) {\n if (!isFormatChar(newValue[i]!)) {\n seen += 1\n if (seen === targetNonFormat) {\n return Math.min(i + 1, newValue.length)\n }\n }\n }\n\n return newValue.length\n}\n\nconst countNonFormat = (value: string): number => {\n let count = 0\n for (const char of value) {\n if (!isFormatChar(char)) count += 1\n }\n return count\n}\n\n// \"Format characters\" are delimiters, prefix symbols, and other\n// non-alphanumeric separators that the formatter may insert or remove.\n// We deliberately keep this conservative — anything that is not a digit\n// or ASCII letter counts as a format character.\nexport const isFormatChar = (char: string): boolean => {\n if (!char) return false\n if (char >= '0' && char <= '9') return false\n if ((char >= 'a' && char <= 'z') || (char >= 'A' && char <= 'Z')) return false\n return true\n}\n\nconst restoreCursor = (\n field: HTMLInputElement | HTMLTextAreaElement,\n position: number\n): void => {\n const max = field.value.length\n const safe = clamp(position, 0, max)\n\n const apply = () => {\n try {\n field.setSelectionRange(safe, safe)\n } catch {\n // Some input types (number, email) throw on setSelectionRange.\n // Ignore — the caret just stays where the browser put it.\n }\n }\n\n // Android keyboard fix: defer one frame so the IME catches up before\n // we re-position the caret. Mirrors cleave.js' `isAndroid` branch.\n if (typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent)) {\n if (typeof requestAnimationFrame === 'function') {\n requestAnimationFrame(apply)\n } else {\n setTimeout(apply, 1)\n }\n return\n }\n\n apply()\n}\n\n// `getFormatterField` re-exported above is the canonical entry point,\n// but it is intentionally restricted to controller-owned fields. This\n// looser helper accepts a wider set of inputs for test fixtures.\nexport const isFormatterFieldElement = (node: Element): node is FormFieldElement =>\n node instanceof HTMLInputElement ||\n node instanceof HTMLTextAreaElement ||\n node instanceof HTMLSelectElement","// Lazy singleton loader for the optional `@samline/formatter` peer.\n// The formatter is imported dynamically so the package stays usable\n// even when the peer is not installed: callers receive `null` and a\n// single console.error explaining the missing dependency.\n//\n// The first failure is cached so the warning is printed exactly once\n// per process, not on every `format(...)` call.\n\nexport interface FormatterModule {\n format: (\n value: unknown,\n formatType: string,\n options?: Record<string, unknown>\n ) => { formatted: string; raw: string; type: string }\n FORMAT_TYPES?: readonly string[]\n isFormatType?: (value: unknown) => boolean\n regex?: Record<string, { pattern: RegExp; errorMessage: string }>\n}\n\ntype LoaderState =\n | { status: 'pending'; promise: Promise<FormatterModule | null> }\n | { status: 'resolved'; module: FormatterModule | null }\n\nlet state: LoaderState | null = null\n\nconst MISSING_MESSAGE =\n '[samline/forms] The `format()` and `formatAll()` methods require the ' +\n '@samline/formatter package. Install it with: npm i @samline/formatter ' +\n '(or pnpm/bun/yarn equivalent).'\n\nlet warned = false\n\nconst warnOnce = () => {\n if (warned) return\n warned = true\n console.error(MISSING_MESSAGE)\n}\n\nexport const loadFormatter = (): Promise<FormatterModule | null> => {\n if (state && state.status === 'resolved') {\n if (!state.module) warnOnce()\n return Promise.resolve(state.module)\n }\n\n if (state && state.status === 'pending') {\n return state.promise\n }\n\n const promise = (async () => {\n try {\n // Dynamic import keeps the optional peer out of the eager build graph.\n // The consumer's bundler is responsible for resolving the peer at\n // build time — `tsup` treats `@samline/formatter` as `external` so it\n // does not try to pre-bundle it. Do NOT re-add `/* @vite-ignore */`\n // here: in production it leaves the bare specifier as a literal in\n // the bundle, browsers cannot resolve it, and the formatter silently\n // never loads (the catch below masks the failure).\n const mod = (await import('@samline/formatter')) as FormatterModule\n state = { status: 'resolved', module: mod }\n return mod\n } catch {\n warnOnce()\n state = { status: 'resolved', module: null }\n return null\n }\n })()\n\n state = { status: 'pending', promise }\n return promise\n}\n\n// Test-only helper: reset the cached loader so unit tests can swap the\n// dynamic import between \"installed\" and \"missing\" scenarios.\nexport const __resetFormatterLoaderForTests = (): void => {\n state = null\n warned = false\n}\n\n// Test-only helper: inject a formatter implementation directly,\n// bypassing the dynamic import. Pass `null` to simulate the\n// \"peer not installed\" branch.\nexport const __setFormatterModuleForTests = (\n module: FormatterModule | null\n): void => {\n state = { status: 'resolved', module }\n}","// api/format.ts\n// Applies the optional `@samline/formatter` peer to one or many form\n// fields, with cleave-style cursor tracking and an auto-managed hidden\n// raw mirror.\n//\n// Public surface lives on `FormController` as `format()` and\n// `formatAll()`. Both are chainable and both behave identically — the\n// alias exists only to read naturally when the caller wants to apply\n// the same configuration to several inputs.\n//\n// When `@samline/formatter` is not installed the methods log a single\n// `console.error` (via `loadFormatter`) and return the controller\n// unchanged so the rest of the app keeps working.\n\nimport type { FieldFormatConfig, FormController, FormFieldElement } from '../core/types'\nimport {\n applyFormattedValue,\n ensureRawMirror,\n findRawMirror,\n FORMATTER_RAW_ATTRIBUTE\n} from '../core/format-helpers'\nimport { loadFormatter } from '../core/formatter-loader'\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\n// Listeners added on demand; tracked here so a future `unformat(field)`\n// (out of scope for v1) can detach them without trawling `state.listeners`.\ntype FormatEntry = {\n fields: Set<HTMLInputElement | HTMLTextAreaElement>\n mirrorName: string\n handler: (event: Event) => void\n mirrorIsOwned: boolean\n}\n\nconst registry = new WeakMap<FormControllerState, Map<string, FormatEntry>>()\n\nconst getRegistry = (state: FormControllerState): Map<string, FormatEntry> => {\n let bucket = registry.get(state)\n if (!bucket) {\n bucket = new Map<string, FormatEntry>()\n registry.set(state, bucket)\n }\n return bucket\n}\n\nconst resolveFieldNames = (config: FieldFormatConfig): string[] =>\n Array.isArray(config.field) ? config.field : [config.field]\n\nconst addListener = (\n state: FormControllerState,\n target: EventTarget,\n type: string,\n handler: EventListener\n): void => {\n target.addEventListener(type, handler)\n state.listeners.push({ element: target, type, handler })\n}\n\nconst buildHandler = (\n field: HTMLInputElement | HTMLTextAreaElement,\n mirror: HTMLInputElement | null,\n formatFn: NonNullable<Awaited<ReturnType<typeof loadFormatter>>>['format'],\n formatType: FieldFormatConfig['type'],\n formatOptions: Record<string, unknown> | undefined,\n mirrorFieldName: string\n): ((event: Event) => void) => {\n const handler = (event: Event) => {\n if (!field.isConnected) return\n // Bug #1 fix: ensure the event actually came from this field,\n // since the listener is delegated to the form.\n if (event.target !== field) return\n const rawInput = (event.target as HTMLInputElement | HTMLTextAreaElement).value\n const { formatted, raw } = formatFn(rawInput, formatType, formatOptions)\n\n if (!formatted && !raw) {\n field.value = ''\n if (mirror && mirror.value !== '') mirror.value = ''\n return\n }\n\n applyFormattedValue(field, mirror, formatted, raw)\n // Keep the registry mirror pointer alive for in-place cleanup.\n void mirrorFieldName\n }\n return handler\n}\n\n// Internal: core apply routine shared by `format()` and `formatAll()`.\n// Returns the controller to preserve chainability even on the missing\n// peer path.\nconst applyFormat = async (\n state: FormControllerState,\n helpers: FormControllerHelpers,\n config: FieldFormatConfig\n): Promise<void> => {\n if (!state.element || !state.api) return\n\n const formatter = await loadFormatter()\n if (!formatter) return\n\n const formatType = config.type\n const formatOptions = config.options\n const fieldNames = resolveFieldNames(config)\n const bucket = getRegistry(state)\n\n for (const fieldName of fieldNames) {\n const fields = helpers.getFieldsByName(fieldName) as FormFieldElement[]\n if (fields.length === 0) continue\n\n // Filter to text-like inputs — the formatter does not work on\n // checkboxes, radios, files, etc.\n const writable = fields.filter(\n (f): f is HTMLInputElement | HTMLTextAreaElement =>\n (f instanceof HTMLInputElement &&\n f.type !== 'checkbox' &&\n f.type !== 'radio' &&\n f.type !== 'file' &&\n f.type !== 'submit' &&\n f.type !== 'button') ||\n f instanceof HTMLTextAreaElement\n )\n\n if (writable.length === 0) continue\n\n for (const field of writable) {\n // Idempotency: a second `format()` call for the same field\n // refreshes the configuration in `state.formattedFields` but\n // does not double-bind listeners or duplicate the hidden mirror.\n const existing = bucket.get(fieldName)\n const mirrorName = config.rawField ?? `${fieldName}_raw`\n // Bug #2a fix: search by fieldName (the data-formatter-raw-for value),\n // not mirrorName (the input name). findRawMirror looks for\n // data-formatter-raw-for=\"<fieldName>\", not data-formatter-raw-for=\"<fieldName>Raw\".\n let mirror = findRawMirror(state.element, fieldName) ?? null\n const mirrorIsOwned = !mirror\n if (!mirror) mirror = ensureRawMirror(state.element, fieldName)\n // Sync the mirror's `name` attribute when the user overrides it\n // via `config.rawField` (default `<field>Raw`).\n if (mirror && mirror.name !== mirrorName) mirror.name = mirrorName\n const trackerMirrorName = mirror?.name ?? mirrorName\n\n if (existing) {\n // Refresh the stored config so `destroy()` knows the entry is\n // still active, but do not re-attach listeners.\n existing.mirrorName = trackerMirrorName\n existing.mirrorIsOwned = mirrorIsOwned\n state.formattedFields.set(fieldName, {\n config,\n mirrorName: trackerMirrorName,\n mirrorIsOwned\n })\n // Bug #2b fix: re-format the current value with the new options\n // (e.g. country_code change needs to re-format the phone).\n // Only re-format when the field has a value; when the field is\n // empty we leave the mirror untouched so pre-existing raw values\n // (set before format() was called) are preserved.\n const current = field.value\n if (current !== '') {\n const { formatted, raw } = formatter.format(current, formatType, formatOptions)\n applyFormattedValue(field, mirror, formatted, raw)\n }\n continue\n }\n\n const handler = buildHandler(\n field,\n mirror,\n formatter.format,\n formatType,\n formatOptions,\n trackerMirrorName\n )\n\n addListener(state, state.element, 'input', handler)\n bucket.set(fieldName, {\n fields: new Set([field]),\n mirrorName: trackerMirrorName,\n handler,\n mirrorIsOwned\n })\n state.formattedFields.set(fieldName, {\n config,\n mirrorName: trackerMirrorName,\n mirrorIsOwned\n })\n\n // Apply the formatter to the current value so pre-filled data\n // (e.g. coming from `setValue`, `prefill`, or server-rendered\n // HTML) is normalised immediately and the hidden mirror is\n // populated without waiting for a user keystroke.\n const initial = field.value\n if (initial !== '') {\n const { formatted, raw } = formatter.format(initial, formatType, formatOptions)\n applyFormattedValue(field, mirror, formatted, raw)\n } else if (mirrorIsOwned && mirror && mirror.value !== '') {\n // Only clear an owned mirror when the field is empty. Pre-existing\n // mirrors are left untouched so their values are preserved.\n mirror.value = ''\n }\n }\n }\n}\n\nexport const createFormat =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (config: FieldFormatConfig): FormController => {\n if (state.isDestroyed) return state.api!\n if (!state.element) return state.api!\n\n // Fire and forget: the loader surfaces a single console.error if\n // the peer is missing, then resolves with `null`.\n void applyFormat(state, helpers, config)\n\n return state.api!\n }\n\nexport const createFormatAll = createFormat\n\n// Cleanup hook consumed by `api/destroy.ts`. Removes every listener\n// registered through this module and drops the owned raw mirrors that\n// were created during the controller's lifetime. Mirrors that already\n// existed in the DOM (i.e. `mirrorIsOwned === false`) are left alone.\nexport const cleanupFormatRegistry = (state: FormControllerState): void => {\n if (!state.element) {\n registry.delete(state)\n return\n }\n\n const bucket = registry.get(state)\n if (!bucket) {\n state.element\n .querySelectorAll<HTMLInputElement>(`[${FORMATTER_RAW_ATTRIBUTE}]`)\n .forEach(node => node.remove())\n return\n }\n\n for (const [fieldName, entry] of bucket) {\n state.element.removeEventListener('input', entry.handler)\n if (entry.mirrorIsOwned) {\n const mirror = findRawMirror(state.element, entry.mirrorName)\n mirror?.remove()\n }\n bucket.delete(fieldName)\n state.formattedFields.delete(fieldName)\n }\n\n // Catch any leftover owned mirrors (defensive — should not happen\n // because every `applyFormat` path registers in the bucket, but the\n // second pass guarantees no orphans escape `destroy()`).\n state.element\n .querySelectorAll<HTMLInputElement>(`[${FORMATTER_RAW_ATTRIBUTE}]`)\n .forEach(node => node.remove())\n}","// api/destroy.ts\n// Tears down the controller: removes DOM listeners, disconnects the\n// mutation observer, clears caches, and resets internal state.\n// Safe to call multiple times.\n\nimport { cleanupFormatRegistry } from './format'\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createDestroy =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n () => {\n if (state.isDestroyed) return\n\n state.isDestroyed = true\n for (const listener of state.listeners) {\n listener.element.removeEventListener(listener.type, listener.handler)\n }\n state.listeners.length = 0\n\n if (state.autoSubmitTimer) {\n clearTimeout(state.autoSubmitTimer)\n state.autoSubmitTimer = null\n }\n\n state.mutationObserver?.disconnect()\n state.mutationObserver = null\n state.watchedFields.clear()\n state.subscribers.clear()\n state.submitHandlers.clear()\n state.fieldCache.clear()\n state.manualErrors = {}\n state.validationErrors = {}\n\n // Detach format listeners and drop the hidden raw mirrors that\n // `format()` created for this controller. Mirrors that pre-existed\n // in the DOM (i.e. not owned by us) are preserved.\n cleanupFormatRegistry(state)\n }\n","// api/disable-auto-submit.ts\n// Disables autoSubmit and cancels any pending debounce timer.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createDisableAutoSubmit =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n () => {\n state.autoSubmitEnabled = false\n if (state.autoSubmitTimer) {\n clearTimeout(state.autoSubmitTimer)\n state.autoSubmitTimer = null\n }\n helpers.notifySubscribers()\n return state.api!\n }\n","// Pure serialization helpers for HTMLFormElement.\n// No DOM mutation, no controller state — safe to tree-shake into any bundle.\n\nimport type { SerializedFormResult, SerializedFormValue } from './types'\n\nconst isEmptyFile = (value: FormDataEntryValue): value is File =>\n value instanceof File && value.size === 0 && value.name === ''\n\nconst appendValue = (\n data: Record<string, SerializedFormValue>,\n key: string,\n value: FormDataEntryValue\n): void => {\n const current = data[key]\n if (current === undefined) {\n data[key] = value\n return\n }\n if (Array.isArray(current)) {\n current.push(value)\n return\n }\n data[key] = [current, value]\n}\n\nexport const parseFormData = (formElement: HTMLFormElement): SerializedFormResult => {\n const raw = new FormData(formElement)\n const formData = new FormData()\n const data: Record<string, SerializedFormValue> = {}\n\n raw.forEach((value, key) => {\n if (isEmptyFile(value)) return\n formData.append(key, value)\n appendValue(data, key, value)\n })\n\n return { data, formData }\n}\n","// api/get-data.ts\n// Returns the form serialized as both a plain object and a fresh\n// FormData instance. Empty file inputs are filtered out.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { SerializedFormResult } from '../core/types'\nimport { parseFormData } from '../core/serialize'\n\nexport const createGetData =\n (_state: FormControllerState, _helpers: FormControllerHelpers) =>\n (): SerializedFormResult => {\n if (!_state.element) return { data: {}, formData: new FormData() }\n return parseFormData(_state.element)\n }\n","// api/get-field.ts\n// Returns the underlying DOM field(s) for a given name:\n// - null when no field matches\n// - a single element when there's exactly one\n// - an array when there are multiple (radios, checkbox groups)\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldElement } from '../core/types'\n\nexport const createGetField =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (name: string): FormFieldElement | FormFieldElement[] | null => {\n const fields = helpers.getFieldsByName(name)\n if (fields.length === 0) return null\n return fields.length === 1 ? fields[0]! : fields\n }\n","// Shared mutable state for the controller plus the small pure helpers used\n// by both core utilities and the api method factories.\n\nimport type {\n FieldFormatConfig,\n FormController,\n FormControllerOptions,\n FormErrors,\n FormFieldElement,\n FormFieldWatcher,\n FormStateListener,\n FormStateSnapshot,\n FormValues,\n ValidationResult,\n ValidationSchema,\n VisualAttributes\n} from './types'\n\nexport interface FormControllerState {\n element: HTMLFormElement | null\n options: FormControllerOptions\n attributes: Required<VisualAttributes>\n validators: ValidationSchema\n watchedFields: Map<string, Set<FormFieldWatcher>>\n subscribers: Set<FormStateListener>\n submitHandlers: Set<{\n callback: import('./types').FormSubmitHandler\n preventDefault: boolean\n }>\n fieldCache: Map<string, FormFieldElement[]>\n manualErrors: FormErrors\n validationErrors: FormErrors\n isValidated: boolean\n autoSubmitEnabled: boolean\n autoSubmitDebounce: number\n submitCount: number\n autoSubmitTimer: ReturnType<typeof setTimeout> | null\n isDestroyed: boolean\n listeners: Array<{\n element: EventTarget\n type: string\n handler: EventListenerOrEventListenerObject\n }>\n mutationObserver: MutationObserver | null\n // Tracks every field that `format()` is currently formatting, so\n // re-bindings are idempotent and `destroy()` can clean up the\n // associated listeners + hidden raw mirrors.\n formattedFields: Map<\n string,\n {\n config: FieldFormatConfig\n mirrorName: string\n mirrorIsOwned: boolean\n }\n >\n // Back-reference to the assembled public controller. Populated by the\n // controller orchestrator after the api method factories are wired.\n api: FormController | null\n}\n\n// Internal helpers bound by the controller orchestrator and consumed by\n// the api method factories. Kept here so api/*.ts only depends on the\n// shape, not on the orchestrator implementation.\nexport interface FormControllerHelpers {\n notifySubscribers: () => void\n clearFieldCache: () => void\n getFieldsByName: (name: string) => FormFieldElement[]\n getTrackedFieldNames: () => string[]\n getValues: () => FormValues\n getMergedErrors: () => FormErrors\n syncVisualState: (names?: string[]) => void\n validateNames: (names?: string[]) => ValidationResult\n emitFieldWatchers: (name: string) => void\n scheduleAutoSubmit: () => void\n}\n\nexport const createEmptyFormState = (): FormStateSnapshot => ({\n values: {},\n errors: {},\n filledFields: [],\n isValid: true,\n isValidated: false,\n autoSubmit: false,\n submitCount: 0\n})\n\nexport const cloneErrors = (errors: FormErrors): FormErrors =>\n Object.fromEntries(\n Object.entries(errors).map(([field, messages]) => [field, [...messages]])\n )\n\nexport const mergeErrors = (left: FormErrors, right: FormErrors): FormErrors => {\n const merged: FormErrors = { ...left }\n for (const [field, messages] of Object.entries(right)) {\n merged[field] = merged[field] ? [...merged[field], ...messages] : [...messages]\n }\n return merged\n}\n","// api/get-state.ts\n// Builds a snapshot of values, errors, filled fields and submission\n// metadata. Pure read — does not mutate controller state.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormStateSnapshot } from '../core/types'\nimport { cloneErrors, createEmptyFormState } from '../core/state'\n\nexport const createGetState =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (): FormStateSnapshot => {\n const values = helpers.getValues()\n const errors = cloneErrors(helpers.getMergedErrors())\n const filledFields = helpers.getTrackedFieldNames().filter(name => {\n const value = values[name]\n if (Array.isArray(value)) return value.length > 0\n if (typeof value === 'string') return value.trim().length > 0\n return value !== undefined\n })\n\n return {\n ...createEmptyFormState(),\n values,\n errors,\n filledFields,\n isValid: Object.keys(errors).length === 0,\n isValidated: state.isValidated,\n autoSubmit: state.autoSubmitEnabled,\n submitCount: state.submitCount\n }\n }\n","// Low-level DOM helpers used by the controller orchestrator and by api\n// methods that need direct DOM access. Pure: no controller state.\n\nimport type { FormFieldElement, FormFieldValue, FormTarget } from './types'\n\nconst isFormFieldElement = (value: Element): value is FormFieldElement =>\n value instanceof HTMLInputElement ||\n value instanceof HTMLSelectElement ||\n value instanceof HTMLTextAreaElement\n\nexport const resolveFormElement = (target: FormTarget): HTMLFormElement | null => {\n if (!target) return null\n if (target instanceof HTMLFormElement) return target\n if (typeof target === 'string') {\n const node = document.getElementById(target)\n return node instanceof HTMLFormElement ? node : null\n }\n if ('current' in target) {\n return target.current instanceof HTMLFormElement ? target.current : null\n }\n return null\n}\n\nexport const getNamedFields = (form: HTMLFormElement): FormFieldElement[] =>\n Array.from(form.querySelectorAll('input[name], select[name], textarea[name]')).filter(\n isFormFieldElement\n )\n\nexport const queryNamedFields = (\n form: HTMLFormElement,\n name: string\n): FormFieldElement[] => getNamedFields(form).filter(field => field.name === name)\n\nexport const isFieldElement = (value: Element): value is FormFieldElement =>\n isFormFieldElement(value)\n\nexport const isFieldFilled = (field: FormFieldElement): boolean => {\n if (field instanceof HTMLInputElement) {\n if (field.type === 'checkbox' || field.type === 'radio') return field.checked\n if (field.type === 'file') return Boolean(field.files && field.files.length > 0)\n return field.value.trim() !== ''\n }\n return field.value !== ''\n}\n\nexport const applyBooleanAttribute = (\n field: FormFieldElement,\n attribute: string,\n enabled: boolean\n): void => {\n if (enabled) {\n field.setAttribute(attribute, '')\n } else {\n field.removeAttribute(attribute)\n }\n}\n\nexport const readFieldValue = (fields: FormFieldElement[]): FormFieldValue => {\n if (fields.length === 0) return undefined\n const first = fields[0]\n if (!first) return undefined\n\n if (first instanceof HTMLSelectElement || first instanceof HTMLTextAreaElement) {\n return first.value\n }\n\n if (first instanceof HTMLInputElement) {\n if (first.type === 'radio') {\n const checked = fields.find(\n (f): f is HTMLInputElement =>\n f instanceof HTMLInputElement && f.checked\n )\n return checked?.value ?? ''\n }\n\n if (first.type === 'checkbox') {\n const values = fields\n .filter(\n (f): f is HTMLInputElement =>\n f instanceof HTMLInputElement && f.checked\n )\n .map(f => f.value)\n return values.length > 1 ? values : (values[0] ?? '')\n }\n\n if (first.type === 'file') {\n return first.files ? Array.from(first.files) : []\n }\n }\n\n return first.value\n}\n\nexport const writeFieldValue = (fields: FormFieldElement[], value: unknown): void => {\n const normalizedArray = Array.isArray(value)\n ? value.map(item => String(item))\n : null\n const normalizedValue = value === undefined || value === null ? '' : String(value)\n\n for (const field of fields) {\n if (field instanceof HTMLInputElement) {\n if (field.type === 'checkbox') {\n field.checked = normalizedArray\n ? normalizedArray.includes(field.value)\n : normalizedValue === field.value\n continue\n }\n if (field.type === 'radio') {\n field.checked = field.value === normalizedValue\n continue\n }\n if (field.type === 'file') {\n if (Array.isArray(value) && value.length === 0) field.value = ''\n continue\n }\n field.value = normalizedValue\n continue\n }\n\n field.value = normalizedValue\n }\n}\n\nexport const clearAttributes = (form: HTMLFormElement, attributes: string[]): void => {\n for (const attribute of attributes) {\n form\n .querySelectorAll(`[${attribute}]`)\n .forEach(node => node.removeAttribute(attribute))\n }\n}\n\nexport const submitForm = (form: HTMLFormElement): void => {\n if (typeof form.requestSubmit === 'function') {\n form.requestSubmit()\n return\n }\n const submitButton = form.querySelector(\n 'button[type=\"submit\"], input[type=\"submit\"]'\n ) as HTMLButtonElement | HTMLInputElement | null\n if (submitButton) {\n submitButton.click()\n return\n }\n form.submit()\n}\n","// api/get-value.ts\n// Returns the current value of a field, with normalization for checkboxes,\n// radios, files, and multi-value inputs.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldValue } from '../core/types'\nimport { readFieldValue } from '../core/dom'\n\nexport const createGetValue =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (name: string): FormFieldValue => readFieldValue(helpers.getFieldsByName(name))\n","// api/observe.ts\n// Registers a callback that runs on mount and whenever the field changes.\n// Returns an unsubscribe function.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldWatcher } from '../core/types'\n\nexport const createObserve =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (field: string, callback: FormFieldWatcher) => {\n const callbacks = state.watchedFields.get(field) ?? new Set<FormFieldWatcher>()\n callbacks.add(callback)\n state.watchedFields.set(field, callbacks)\n\n if (state.element) {\n callback(state.api!.getValue(field), state.api!.getField(field), state.element, state.api!.getState())\n }\n\n return () => {\n const current = state.watchedFields.get(field)\n current?.delete(callback)\n if (current && current.size === 0) {\n state.watchedFields.delete(field)\n }\n }\n }\n","// api/on-submit.ts\n// Registers a submit handler. preventDefault=true intercepts valid submits,\n// which is the right choice for AJAX/fetch flows. Invalid submits are\n// always prevented regardless of the flag.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormSubmitHandler } from '../core/types'\n\nexport const createOnSubmit =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n (callback: FormSubmitHandler, preventDefault = true) => {\n state.submitHandlers.add({ callback, preventDefault })\n return state.api!\n }\n","// api/prefill.ts\n// Reads window.location.search and writes matching values into the form.\n// Pass a field name to scope prefill to a single field.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createPrefill =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n (fieldName?: string) => {\n if (!state.element) return state.api!\n\n const params = new URLSearchParams(window.location.search)\n params.forEach((value, key) => {\n if (fieldName && fieldName !== key) return\n state.api!.setValue(key, value)\n })\n return state.api!\n }\n","// api/reset.ts\n// Resets the native form, clears manual and validation errors, strips\n// css-filled/css-error attributes, and notifies subscribers.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport { clearAttributes } from '../core/dom'\n\nexport const createReset =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n () => {\n if (!state.element) return state.api!\n\n state.element.reset()\n state.manualErrors = {}\n state.validationErrors = {}\n clearAttributes(state.element, [state.attributes.error, state.attributes.filled])\n\n if (state.isValidated) helpers.syncVisualState()\n helpers.notifySubscribers()\n return state.api!\n }\n","// api/validate.ts\n// Runs validation. Marks the form as validated, syncs visual state, and\n// returns the validation result for callers that want it.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { ValidationResult } from '../core/types'\n\nexport const createValidate =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (fields?: string[]): ValidationResult => {\n state.isValidated = true\n helpers.syncVisualState(fields)\n return helpers.validateNames(fields)\n }\n","// api/revalidate.ts\n// Alias of validate(); kept separate for readability at call sites that\n// want to express \"re-run validation now\".\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport { createValidate } from './validate'\n\nexport const createRevalidate = createValidate\n","// api/set-errors.ts\n// Sets manual errors. Accepts an array of field names (each gets a\n// generic message) or a FormErrors map with per-field messages.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormErrors } from '../core/types'\nimport { cloneErrors } from '../core/state'\n\nexport const createSetErrors =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (fields: string[] | FormErrors) => {\n if (Array.isArray(fields)) {\n state.manualErrors = {\n ...state.manualErrors,\n ...Object.fromEntries(fields.map(field => [field, ['Invalid value.']]))\n }\n } else {\n state.manualErrors = {\n ...state.manualErrors,\n ...cloneErrors(fields)\n }\n }\n\n helpers.syncVisualState(Array.isArray(fields) ? fields : Object.keys(fields))\n helpers.notifySubscribers()\n return state.api!\n }\n","// api/set-value.ts\n// Writes a value into a field and dispatches the correct DOM event so\n// listeners, validators, and visual state run as if a user typed.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport { writeFieldValue } from '../core/dom'\n\nexport const createSetValue =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (name: string, value: unknown) => {\n const fields = helpers.getFieldsByName(name)\n if (fields.length === 0) return state.api!\n\n writeFieldValue(fields, value)\n const firstField = fields[0]\n if (!firstField) return state.api!\n\n const eventType =\n firstField instanceof HTMLSelectElement ||\n (firstField instanceof HTMLInputElement &&\n (firstField.type === 'checkbox' || firstField.type === 'radio'))\n ? 'change'\n : 'input'\n\n firstField.dispatchEvent(new Event(eventType, { bubbles: true }))\n return state.api!\n }\n","// api/subscribe.ts\n// Subscribes to global form state. Listener fires once immediately with\n// the current snapshot, then on every state mutation. Returns an\n// unsubscribe function.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormStateListener } from '../core/types'\n\nexport const createSubscribe =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n (listener: FormStateListener) => {\n state.subscribers.add(listener)\n listener(state.api!.getState())\n return () => {\n state.subscribers.delete(listener)\n }\n }\n","// api/unwatch.ts\n// Removes watched callbacks. With no args, clears every watcher. With only\n// a field, removes all callbacks for that field. With field + callback,\n// removes just that callback.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldWatcher } from '../core/types'\n\nexport const createUnwatch =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n (field?: string, callback?: FormFieldWatcher) => {\n if (!field) {\n state.watchedFields.clear()\n return state.api!\n }\n\n if (!callback) {\n state.watchedFields.delete(field)\n return state.api!\n }\n\n const callbacks = state.watchedFields.get(field)\n callbacks?.delete(callback)\n if (callbacks && callbacks.size === 0) {\n state.watchedFields.delete(field)\n }\n return state.api!\n }\n","// api/watch.ts\n// Chainable alias over `observe`. Use this when you want a fluent setup\n// without holding the returned unsubscribe function.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldWatcher } from '../core/types'\nimport { createObserve } from './observe'\n\nexport const createWatch = (state: FormControllerState, helpers: FormControllerHelpers) =>\n (field: string, callback: FormFieldWatcher) => {\n const observe = createObserve(state, helpers)\n observe(field, callback)\n return state.api!\n }\n","// Pure validation routines. No DOM, no controller state.\n\nimport type {\n FieldValidationContext,\n FieldValidationRules,\n FormErrors,\n FormFieldValue,\n FormValues,\n RuleConfig,\n ValidationResult,\n ValidationSchema\n} from './types'\n\nconst resolveRule = <T>(rule: RuleConfig<T> | undefined) => {\n if (rule === undefined) {\n return { value: undefined as T | undefined, message: undefined as string | undefined }\n }\n if (typeof rule === 'object' && rule !== null && 'value' in rule) {\n return { value: rule.value, message: rule.message }\n }\n return { value: rule, message: undefined as string | undefined }\n}\n\nconst hasValue = (value: FormFieldValue): boolean => {\n if (Array.isArray(value)) return value.length > 0\n if (typeof value === 'string') return value.trim().length > 0\n return value !== undefined\n}\n\nconst getValueLength = (value: FormFieldValue): number => {\n if (Array.isArray(value)) return value.length\n if (typeof value === 'string') return value.length\n return 0\n}\n\nconst toPatternTarget = (value: FormFieldValue): string => {\n if (typeof value === 'string') return value\n if (Array.isArray(value)) {\n return value\n .map(entry => (typeof entry === 'string' ? entry : entry.name))\n .join(',')\n }\n return ''\n}\n\nexport const validateFieldValue = (\n field: string,\n value: FormFieldValue,\n rules: FieldValidationRules,\n values: FormValues\n): string[] => {\n const errors: string[] = []\n const context: FieldValidationContext = { field, value, values }\n const required = resolveRule(rules.required)\n const minLength = resolveRule(rules.minLength)\n const maxLength = resolveRule(rules.maxLength)\n const pattern = resolveRule(rules.pattern)\n\n if (required.value && !hasValue(value)) {\n errors.push(required.message ?? 'This field is required.')\n }\n if (minLength.value !== undefined && getValueLength(value) < minLength.value) {\n errors.push(minLength.message ?? `Minimum length is ${minLength.value}.`)\n }\n if (maxLength.value !== undefined && getValueLength(value) > maxLength.value) {\n errors.push(maxLength.message ?? `Maximum length is ${maxLength.value}.`)\n }\n if (pattern.value && hasValue(value) && !pattern.value.test(toPatternTarget(value))) {\n errors.push(pattern.message ?? 'Value does not match the required pattern.')\n }\n\n const custom = rules.validate\n ? Array.isArray(rules.validate)\n ? rules.validate\n : [rules.validate]\n : []\n\n for (const validator of custom) {\n const result = validator(context)\n if (typeof result === 'string' && result.length > 0) errors.push(result)\n if (result === false) errors.push('Validation failed.')\n }\n\n return errors\n}\n\nexport const validateValues = (\n values: FormValues,\n schema: ValidationSchema\n): ValidationResult => {\n const errors: FormErrors = {}\n for (const [field, rules] of Object.entries(schema)) {\n const messages = validateFieldValue(field, values[field], rules, values)\n if (messages.length > 0) errors[field] = messages\n }\n return {\n isValid: Object.keys(errors).length === 0,\n errors\n }\n}\n","// Core orchestrator. Wires shared state, internal helpers and the public\n// api method factories into a single FormController instance.\n//\n// Internal event handlers and DOM wiring live here. Every public method\n// lives in `../api/<method>.ts` as an isolated factory.\n\nimport { createAppend } from '../api/append'\nimport { createAutoSubmit } from '../api/auto-submit'\nimport { createClearErrors } from '../api/clear-errors'\nimport { createDestroy } from '../api/destroy'\nimport { createDisableAutoSubmit } from '../api/disable-auto-submit'\nimport { createFormat, createFormatAll } from '../api/format'\nimport { createGetData } from '../api/get-data'\nimport { createGetField } from '../api/get-field'\nimport { createGetState } from '../api/get-state'\nimport { createGetValue } from '../api/get-value'\nimport { createObserve } from '../api/observe'\nimport { createOnSubmit } from '../api/on-submit'\nimport { createPrefill } from '../api/prefill'\nimport { createReset } from '../api/reset'\nimport { createRevalidate } from '../api/revalidate'\nimport { createSetErrors } from '../api/set-errors'\nimport { createSetValue } from '../api/set-value'\nimport { createSubscribe } from '../api/subscribe'\nimport { createUnwatch } from '../api/unwatch'\nimport { createValidate } from '../api/validate'\nimport { createWatch } from '../api/watch'\nimport { validateFieldValue } from '../core/validation'\nimport {\n applyBooleanAttribute,\n getNamedFields,\n isFieldElement,\n isFieldFilled,\n queryNamedFields,\n readFieldValue,\n resolveFormElement,\n submitForm,\n writeFieldValue\n} from './dom'\nimport { cloneErrors, mergeErrors } from './state'\nimport type {\n FormController,\n FormControllerOptions,\n FormFieldElement,\n FormFieldValue,\n FormTarget,\n ValidationResult,\n VisualAttributes\n} from './types'\nimport type { FormControllerHelpers, FormControllerState } from './state'\n\nconst DEFAULT_ATTRIBUTES: Required<VisualAttributes> = {\n filled: 'css-filled',\n error: 'css-error'\n}\n\nconst DEFAULT_OPTIONS = {\n autoValidate: true,\n clearErrorsOnSubmit: true,\n clearManualErrorsOnChange: true\n} satisfies Pick<\n FormControllerOptions,\n 'autoValidate' | 'clearErrorsOnSubmit' | 'clearManualErrorsOnChange'\n>\n\nexport const createFormController = (\n target: FormTarget,\n options: FormControllerOptions = {}\n): FormController => {\n const element = resolveFormElement(target)\n const attributes = { ...DEFAULT_ATTRIBUTES, ...options.attributes }\n const normalizedOptions: FormControllerOptions = {\n ...DEFAULT_OPTIONS,\n ...options,\n attributes\n }\n\n const state: FormControllerState = {\n element,\n options: normalizedOptions,\n attributes,\n validators: normalizedOptions.validators ?? {},\n watchedFields: new Map(),\n subscribers: new Set(),\n submitHandlers: new Set(),\n fieldCache: new Map(),\n manualErrors: {},\n validationErrors: {},\n isValidated: Boolean(normalizedOptions.autoValidate),\n autoSubmitEnabled: false,\n autoSubmitDebounce: 0,\n submitCount: 0,\n autoSubmitTimer: null,\n isDestroyed: false,\n listeners: [],\n mutationObserver: null,\n formattedFields: new Map(),\n api: null\n }\n\n // ------- Internal helpers (no DOM wiring of their own) -----------------\n\n const notifySubscribers = () => {\n if (!state.api) return\n const snapshot = state.api.getState()\n state.subscribers.forEach(listener => listener(snapshot))\n }\n\n const addListener = (\n node: EventTarget,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) => {\n node.addEventListener(type, handler)\n state.listeners.push({ element: node, type, handler })\n }\n\n const clearFieldCache = () => state.fieldCache.clear()\n\n const getFieldsByName = (name: string): FormFieldElement[] => {\n if (!state.element) return []\n if (!state.fieldCache.has(name)) {\n state.fieldCache.set(name, queryNamedFields(state.element, name))\n }\n return state.fieldCache.get(name) ?? []\n }\n\n const getTrackedFieldNames = (): string[] => {\n if (!state.element) return Object.keys(state.validators)\n const names = new Set<string>(Object.keys(state.validators))\n for (const field of getNamedFields(state.element)) {\n names.add(field.name)\n }\n return Array.from(names)\n }\n\n const getValues = () => {\n const values: Record<string, FormFieldValue> = {}\n for (const name of getTrackedFieldNames()) {\n values[name] = readFieldValue(getFieldsByName(name))\n }\n return values\n }\n\n const getMergedErrors = () => mergeErrors(state.validationErrors, state.manualErrors)\n\n const syncVisualState = (names?: string[]) => {\n if (!state.element) return\n const targetNames = names ?? getTrackedFieldNames()\n const errors = getMergedErrors()\n for (const name of targetNames) {\n const fields = getFieldsByName(name)\n const hasError = Boolean(errors[name]?.length)\n for (const field of fields) {\n applyBooleanAttribute(field, attributes.filled, isFieldFilled(field))\n applyBooleanAttribute(field, attributes.error, hasError)\n }\n }\n }\n\n // readFieldValue/writeFieldValue are exported from core/dom for direct\n // callers; referenced here so the linter keeps them as part of the\n // controlled API surface.\n void readFieldValue\n void writeFieldValue\n\n const validateNames = (names?: string[]): ValidationResult => {\n const targetNames = names ?? Object.keys(state.validators)\n const values = getValues()\n const nextValidationErrors = names ? cloneErrors(state.validationErrors) : {}\n\n for (const name of targetNames) {\n const rules = state.validators[name]\n if (!rules) {\n delete nextValidationErrors[name]\n continue\n }\n const messages = validateFieldValue(name, values[name], rules, values)\n if (messages.length > 0) nextValidationErrors[name] = messages\n else delete nextValidationErrors[name]\n }\n\n state.validationErrors = nextValidationErrors\n syncVisualState(names)\n\n return {\n isValid: Object.keys(getMergedErrors()).length === 0,\n errors: cloneErrors(getMergedErrors())\n }\n }\n\n const emitFieldWatchers = (name: string) => {\n if (!state.element || !state.api) return\n const callbacks = state.watchedFields.get(name)\n if (!callbacks || callbacks.size === 0) return\n const value = state.api.getValue(name)\n const fieldElement = state.api.getField(name)\n const snapshot = state.api.getState()\n callbacks.forEach(callback => callback(value, fieldElement, state.element!, snapshot))\n }\n\n const scheduleAutoSubmit = () => {\n if (!state.element || !state.autoSubmitEnabled) return\n if (state.autoSubmitTimer) clearTimeout(state.autoSubmitTimer)\n if (state.autoSubmitDebounce > 0) {\n state.autoSubmitTimer = setTimeout(\n () => submitForm(state.element!),\n state.autoSubmitDebounce\n )\n return\n }\n submitForm(state.element)\n }\n\n const helpers: FormControllerHelpers = {\n notifySubscribers,\n clearFieldCache,\n getFieldsByName,\n getTrackedFieldNames,\n getValues,\n getMergedErrors,\n syncVisualState,\n validateNames,\n emitFieldWatchers,\n scheduleAutoSubmit\n }\n\n // ------- DOM event wiring ---------------------------------------------\n\n const handleDelegatedEvent = (event: Event) => {\n const target = event.target\n if (!(target instanceof Element) || !isFieldElement(target)) return\n const name = target.name\n if (!name) return\n\n clearFieldCache()\n\n if (normalizedOptions.clearManualErrorsOnChange) {\n delete state.manualErrors[name]\n }\n\n syncVisualState([name])\n\n if (state.isValidated && state.validators[name]) {\n validateNames([name])\n }\n\n emitFieldWatchers(name)\n notifySubscribers()\n scheduleAutoSubmit()\n }\n\n const handleSubmitEvent = (event: Event) => {\n if (!state.element || state.isDestroyed || !state.api) return\n\n if (normalizedOptions.clearErrorsOnSubmit) state.manualErrors = {}\n\n const validation = state.api.validate()\n const handlers = Array.from(state.submitHandlers)\n const shouldPrevent = validation.isValid\n ? handlers.some(handler => handler.preventDefault)\n : true\n\n if (shouldPrevent) event.preventDefault()\n\n state.submitCount += 1\n notifySubscribers()\n\n if (!validation.isValid) return\n\n const { data, formData } = state.api.getData()\n const snapshot = state.api.getState()\n handlers.forEach(handler =>\n handler.callback(state.element!, data, formData, snapshot)\n )\n }\n\n const startMutationObserver = () => {\n if (!state.element || typeof MutationObserver === 'undefined') return\n\n state.mutationObserver = new MutationObserver(() => {\n clearFieldCache()\n if (state.isValidated) {\n syncVisualState()\n validateNames()\n }\n notifySubscribers()\n })\n\n state.mutationObserver.observe(state.element, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['name', 'type']\n })\n }\n\n // ------- Public api composition --------------------------------------\n\n const api: FormController = {\n get element() {\n return state.element\n },\n get f() {\n return state.element\n },\n get options() {\n return state.options\n },\n onSubmit: createOnSubmit(state, helpers),\n watch: createWatch(state, helpers),\n observe: createObserve(state, helpers),\n unwatch: createUnwatch(state, helpers),\n subscribe: createSubscribe(state, helpers),\n prefill: createPrefill(state, helpers),\n append: createAppend(state, helpers),\n setErrors: createSetErrors(state, helpers),\n clearErrors: createClearErrors(state, helpers),\n setValue: createSetValue(state, helpers),\n getValue: createGetValue(state, helpers),\n getField: createGetField(state, helpers),\n validate: createValidate(state, helpers),\n revalidate: createRevalidate(state, helpers),\n reset: createReset(state, helpers),\n autoSubmit: createAutoSubmit(state, helpers),\n disableAutoSubmit: createDisableAutoSubmit(state, helpers),\n getData: createGetData(state, helpers),\n getState: createGetState(state, helpers),\n format: createFormat(state, helpers),\n formatAll: createFormatAll(state, helpers),\n destroy: createDestroy(state, helpers)\n }\n\n state.api = api\n\n // ------- Lifecycle hooks ---------------------------------------------\n\n if (state.element) {\n addListener(state.element, 'input', handleDelegatedEvent)\n addListener(state.element, 'change', handleDelegatedEvent)\n addListener(state.element, 'submit', handleSubmitEvent)\n startMutationObserver()\n }\n\n if (normalizedOptions.autoSubmit) {\n api.autoSubmit(normalizedOptions.autoSubmit)\n }\n\n if (normalizedOptions.formats) {\n for (const config of Object.values(normalizedOptions.formats)) {\n api.format(config)\n }\n }\n\n if (state.isValidated) {\n syncVisualState()\n validateNames()\n }\n\n return api\n}\n","// api/form.ts\n// Public entry point: the `form(target, options)` factory.\n// Thin wrapper around the core orchestrator for ergonomic imports.\n\nimport { createFormController } from '../core/controller'\nimport type { FormControllerOptions, FormTarget } from '../core/types'\n\nexport const form = (\n target: FormTarget,\n options: FormControllerOptions = {}\n) => createFormController(target, options)\n","// Vanilla mirror of the browser IIFE registry helpers.\n// Module-level singleton: the same shape as `window.Forms`, but\n// importable from any bundler. Consumers can spread it into their own\n// globals (`{ ...browser, regex }`) or use it directly.\n//\n// The IIFE bundle (`./global.ts`) consumes this same object — single\n// source of truth for the registry helpers.\n\nimport { form } from '../api/form'\nimport type {\n FormController,\n FormControllerOptions,\n FormTarget\n} from '../core/types'\n\nexport interface NewFormInput {\n id: string\n options?: FormControllerOptions\n}\n\nexport interface FormsAvailable {\n [id: string]: FormController\n}\n\nexport interface FormsApi {\n form: (\n target: FormTarget,\n options?: FormControllerOptions\n ) => FormController\n newForm: (input: NewFormInput) => FormController | undefined\n destroyForm: (id: string) => void\n available: FormsAvailable\n}\n\nconst available: FormsAvailable = {}\n\nconst newForm = (input: NewFormInput): FormController | undefined => {\n const { id, options } = input\n if (!id) {\n console.error('Form ID is required')\n return\n }\n const controller = form(id, { ...options })\n available[id] = controller\n return controller\n}\n\nconst destroyForm = (id: string): void => {\n if (!id) {\n console.error('Form ID is required')\n return\n }\n const controller = available[id]\n if (controller) {\n controller.destroy()\n delete available[id]\n } else {\n console.warn(`Form with ID ${id} not found`)\n }\n}\n\nexport const browser: FormsApi = {\n form,\n newForm,\n destroyForm,\n available\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAca,MAAA,GAAA,GCTDA,GDSCC,GAGAC,GAGAC,GAMAC,GAaAC,GGHAC,GA8DAC,GChGDC,GHoBCC,GAiBAC,GIlBPC,GASAC,GA8BOC,GAuCAC,GAgBAC,GDzGAC,GEqGAC,GAkCAC,GC7IAC,GC+CPC,GAcAC,GA+KAC,GA+COC,GC1RAC,GCsCPH,GAWAI,GAuIOC;AV/KA;;;MAAAzB,IAAkB,SAAC0B,IAAAA;AAAAA,eAC9BA,GAAMC,QAAQ,UAAU,EAAA;MAAG;AADhB,MAGA1B,IAAe,SAAC2B,IAAAA;AAAkB,eAC7CA,GAAOC,OAAO,SAACC,IAAkBC,IAAAA;AAAAA,iBAAoBD,KAAWC;QAAO,GAAE,CAAA;MAAE;AAJhE,MAMA7B,IAAU,SAAC8B,IAAaC,IAAAA;AAAc,eACjDD,GAAIE,MAAM,GAAGD,EAAAA;MAAO;AAPT,MAYA9B,IAAkB,SAAHgC,IAAAA;AAAAA,YAC1BT,KAAKS,GAALT;AASA,eARUS,GAAVC,WAEWC,QAAQ,SAACN,IAAAA;AAClBA,UAAAA,GAAQO,MAAM,EAAA,EAAID,QAAQ,SAAAE,IAAAA;AACxBb,YAAAA,KAAQA,GAAMC,QARd,IAAAa,OAQmDD,GARlCZ,QAAQ,0BAA0B,MAAA,GAAS,GAAA,GAQA,EAAA;UAC9D,CAAA;QACF,CAAA,GAEOD;MACT;AAvBa,MAyBAtB,IAAoB,SAAHqC,IAAAA;AAMO,YAJnCb,KAAMa,GAANb,QAAMc,KAAAD,GACNE,WAAAA,KAAAA,WAASD,KAAG,KAAEA,IAAAE,KAAAH,GACdL,YAAAA,KAAAA,WAAUQ,KAAG,CAAA,IAAEA,IAAAC,KAAAJ,GACfK,m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AM,QAAkB;AAQxB,MAAI,OAAO,eAAe,aAAa;AACrC;AAAC,IAAC,WAAuD,QAAQ;AAAA,EACnE;AAEA,MAAO,iBAAQ;","names":["CreditCardType","stripNonNumeric","getMaxLength","headStr","stripDelimiters","getFormattedValue","formatGeneral","unformatGeneral","NumeralThousandGroupStyles","CreditCardBlocks","CreditCardRegex","getStrictBlocks","getCreditCardInfo","formatCreditCard","getCreditCardType","unformatCreditCard","DefaultNumeralThousandGroupStyle","formatNumeral","unformatNumeral","DefaultDatePattern","addLeadingZeroForYear","addLeadingZero","getFixedDate","formatDate","DefaultTimePattern","getFixedTime","formatTime","value","replace","blocks","reduce","previous","current","str","length","slice","_ref","delimiters","forEach","split","letter","RegExp","_ref2","_ref2$delimiter","delimiter","_ref2$delimiters","_ref2$delimiterLazySh","delimiterLazyShow","result","valueRemaining","currentDelimiter","index","_delimiters","sub","rest","options","_options$delimiter","_options$delimiters","_options$delimiterLaz","_options$prefix","prefix","_options$numericOnly","numericOnly","_options$uppercase","uppercase","_options$lowercase","lowercase","push","tailPrefix","prefixLength","toUpperCase","toLowerCase","_options$delimiter2","_options$delimiters2","concat","_CreditCardBlocks","UATP","AMEX","DINERS","DISCOVER","MASTERCARD","DANKORT","INSTAPAYMENT","JCB15","JCB","MAESTRO","VISA","MIR","UNIONPAY","GENERAL","_CreditCardRegex","total","prev","strictMode","_i","_Object$keys","Object","keys","key","test","matchedBlocks","type","general","_ref2$strictMode","maxLength","THOUSAND","_ref2$numeralThousand","numeralThousandsGroupStyle","_ref2$numeralIntegerS","numeralIntegerScale","_ref2$numeralDecimalM","numeralDecimalMark","_ref2$numeralDecimalS","numeralDecimalScale","_ref2$stripLeadingZer","stripLeadingZeroes","_ref2$numeralPositive","numeralPositiveOnly","_ref2$tailPrefix","_ref2$signBeforePrefi","signBeforePrefix","_ref2$prefix","parts","partSignAndPrefix","partInteger","partDecimal","partSign","includes","LAKH","WAN","_ref3$numeralDecimalM","number","fullYearMode","day","month","year","_year","Math","min","_ref5","_ref5$delimiterLazySh","_ref5$delimiter","_ref5$datePattern","datePattern","_ref5$dateMax","dateMax","_ref5$dateMin","dateMin","_getDateRange","reverse","map","x","parseInt","unshift","max","_ref2$value","_ref2$blocks","sub0","_ref3","_ref3$value","date","dayIndex","monthIndex","yearIndex","dayStartIndex","monthStartIndex","yearStartIndex","fullYearDone","_ref4","_ref4$date","filter","hour","minute","second","_ref3$delimiterLazySh","_ref3$delimiter","_ref3$timePattern","timePattern","_ref3$timeFormat","timeFormat","timeFormatOptions","maxHourFirstDigit","maxHours","maxMinutesFirstDigit","maxMinutes","time","secondIndex","minuteIndex","hourIndex","secondStartIndex","minuteStartIndex","hourStartIndex","a","b","split","pa","pb","i","na","Number","nb","isNaN","object","undefined","constructor","objectConstructor","string","CALLING_CODE_REG_EXP","test","getType","types","type","validateMetadata","metadata","Error","isObject","countries","concat","Object","keys","join","typeOf","getCountryCallingCode","country","metadataJson","Metadata","hasCountry","selectNumberingPlan","countryCallingCode","setVersion","version","v1","v2","v3","v4","compare","V3","V4","DEFAULT_EXT_PREFIX","NumberingPlan","Format","FIRST_GROUP_ONLY_PREFIX_PATTERN","Type","_classCallCheck","call","_createClass","key","value","getCountries","filter","_","getCountryMetadata","countryCode","nonGeographic","nonGeographical","undefined","hasCallingCode","callingCode","getCountryCodesForCallingCode","countryCodes","countryCallingCodes","length","isNonGeographicCallingCode","argument","legacyArgumentCallingCode","isCallingCode","countryMetadata","numberingPlan","getNumberingPlanMetadata","getCountryCodeForCallingCode","IDDPrefix","defaultIDDPrefix","nationalNumberPattern","possibleLengths","formats","nationalPrefixForParsing","nationalPrefixTransformRule","leadingDigits","hasTypes","ext","country_phone_code_to_countries","country_calling_codes","chooseCountryByCountryCallingCode","hasSelectedNumberingPlan","globalMetadataObject","_getDefaultCountryMetadataForThisCallingCode","getDefaultCountryMetadataForRegion","_getFormats","_this","map","nationalPrefix","_getNationalPrefixFormattingRule","nationalPrefixFormattingRule","_nationalPrefixForParsing","_getNationalPrefixIsOptionalWhenFormatting","nationalPrefixIsOptionalWhenFormattingInNationalFormat","format","_format","pattern","leadingDigitsPatterns","nationalPrefixIsMandatoryWhenFormattingInNationalFormat","usesNationalPrefix","test","internationalFormat","_typeof","a","b","merged","slice","_iterator","_createForOfIteratorHelperLoose","_step","done","element","value","indexOf","push","sort","nationalNumber","country","metadata","checkNumberLengthForType","undefined","type","Metadata","selectNumberingPlan","type_info","possible_lengths","possibleLengths","mobile_type","mergeArrays","actual_length","length","minimum_length","indexOf","input","options","metadataJson","undefined","metadata","Metadata","v2","countryCallingCode","Error","selectNumberingPlan","country","phone","hasCountry","concat","possibleLengths","isPossibleNumber","nationalNumber","isNonGeographicCallingCode","checkNumberLength","text","regularExpressionText","RegExp","test","input","options","metadataJson","country","countryCallingCode","metadata","Metadata","selectNumberingPlan","nationalNumber","v2","phone","matchesEntirely","nationalNumberPattern","isNumberTypeEqualTo","type","pattern","_iterator","_createForOfIteratorHelperLoose","NON_FIXED_LINE_PHONE_TYPES","_step","done","value","typeDefinition","possibleLengths","indexOf","length","input","options","metadataJson","metadata","Metadata","selectNumberingPlan","country","countryCallingCode","hasTypes","getNumberType","undefined","nationalNumber","v2","phone","matchesEntirely","nationalNumberPattern","string","COUNTRY_CODE_REG_EXP","test","countryOrCallingCode","metadataJson","country","callingCode","metadata","Metadata","isCountryCode","selectNumberingPlan","countryCallingCode","USE_NON_GEOGRAPHIC_COUNTRY_CODE","isNonGeographicCallingCode","callingCode","nationalNumber","metadata","_metadata","Metadata","possibleCountries","getCountryCodesForCallingCode","filter","country","couldNationalNumberBelongToCountry","metadataJson","selectNumberingPlan","numberingPlan","possibleLengths","indexOf","length","MAX_LENGTH_COUNTRY_CODE","VALID_DIGITS","DASHES","SLASHES","DOTS","WHITESPACE","BRACKETS","TILDES","VALID_PUNCTUATION","PLUS_CHARS","concat","number","country","callingCode","metadataJson","metadata","Metadata","selectNumberingPlan","IDDPrefixPattern","RegExp","IDDPrefix","search","slice","match","length","matchedGroups","CAPTURING_DIGIT_PATTERN","VALID_DIGITS","number","metadata","numberingPlan","nationalPrefixForParsing","prefixPattern","RegExp","prefixMatch","exec","nationalNumber","carrierCode","capturedGroupsCount","length","hasCapturedGroups","nationalPrefixTransformRule","replace","prefixBeforeNationalNumber","slice","nationalPrefix","possiblePositionOfTheFirstCapturedGroup","indexOf","possibleNationalPrefix","nationalNumber","countries","metadataJson","metadata","Metadata","_iterator","_createForOfIteratorHelperLoose","_step","done","country","value","selectNumberingPlan","leadingDigits","search","getNumberType","phone","undefined","callingCode","_ref","nationalNumber","metadata","USE_NON_GEOGRAPHIC_COUNTRY_CODE","isNonGeographicCallingCode","possibleCountries","getCountryCodesForCallingCode","length","getCountryByNationalNumber","number","country","metadata","_extractNationalNumbe","extractNationalNumberFromPossiblyIncompleteNumber","carrierCode","nationalNumber","shouldHaveExtractedNationalPrefix","numberingPlan","possibleLengths","getCountryByCallingCode","callingCode","isPossibleIncompleteNationalNumber","nationalNumberBefore","nationalNumberAfter","matchesEntirely","nationalNumberPattern","checkNumberLength","number","country","defaultCountry","defaultCallingCode","metadataJson","countryCallingCode","getCountryCallingCode","indexOf","metadata","Metadata","selectNumberingPlan","possibleShorterNumber","slice","length","_extractNationalNumbe","extractNationalNumber","undefined","possibleShorterNationalNumber","nationalNumber","_extractNationalNumbe2","matchesEntirely","nationalNumberPattern","checkNumberLength","number","country","defaultCountry","defaultCallingCode","metadataJson","isNumberWithIddPrefix","numberWithoutIDD","stripIddPrefix","_extractCountryCallin","extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","countryCallingCode","shorterNumber","countryCallingCodeSource","metadata","Metadata","i","MAX_LENGTH_COUNTRY_CODE","length","slice","hasCallingCode","selectNumberingPlan","formattedNumber","replace","RegExp","concat","VALID_PUNCTUATION","trim","number","format","_ref","useInternationalFormat","withNationalPrefix","carrierCode","metadata","formattedNumber","replace","RegExp","pattern","internationalFormat","nationalPrefixFormattingRule","FIRST_GROUP_PATTERN","applyInternationalSeparatorStyle","country","callingCode","metadata","countryMetadata","Metadata","selectNumberingPlan","defaultIDDPrefix","SINGLE_IDD_PREFIX_REG_EXP","test","IDDPrefix","formatRFC3966","_ref","number","ext","Error","concat","input","format","options","metadataJson","merge","DEFAULT_OPTIONS","metadata","Metadata","country","hasCountry","Error","concat","selectNumberingPlan","countryCallingCode","phone","nationalNumber","v2","number","formatNationalNumber","carrierCode","addExtension","ext","formatExtension","formatRFC3966","fromCountry","formattedNumber","formatIDD","formatAs","chooseFormatForNumber","formats","formatNationalNumberUsingFormat","useInternationalFormat","withNationalPrefix","nationalPrefixIsOptionalWhenFormattingInNationalFormat","nationalPrefix","availableFormats","pickFirstMatchingElement","leadingDigitsPatterns","length","lastLeadingDigitsPattern","search","matchesEntirely","pattern","fromCountryCallingCode","getCountryCallingCode","iddPrefix","getIddPrefix","undefined","i","_len","arguments","objects","Array","_key","key","elements","testFunction","extension","PhoneNumber","E164_NUMBER_REGEXP","countryOrCountryCallingCode","nationalNumber","metadata","_classCallCheck","TypeError","isObject","countries","e164Number","test","Error","_extractCountryCallin","extractCountryCallingCode","undefined","countryCallingCode","number","validateMetadata","_getCountryAndCalling","getCountryAndCallingCodeFromOneOfThem","country","callingCode","getMetadata","_createClass","key","value","setExt","ext","getPossibleCountries","getPossibleCountriesForNumber","isPossible","isPossibleNumber","v2","isValid","isValidNumber","isNonGeographic","Metadata","isNonGeographicCallingCode","isEqual","phoneNumber","getType","getNumberType","format","options","formatNumber","_objectSpread","formatNational","formatInternational","getURI","parseDigit","character","DIGITS","string","result","_iterator","_createForOfIteratorHelperLoose","split","_step","done","value","digit","AsYouTypeState","_ref","onCountryChange","onCallingCodeChange","_classCallCheck","_createClass","key","value","reset","_ref2","country","callingCode","international","missingPlus","IDDPrefix","undefined","digits","resetNationalSignificantNumber","initCountryAndCallingCode","nationalSignificantNumber","getNationalDigits","nationalSignificantNumberIsModified","nationalPrefix","carrierCode","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","update","properties","_i","_Object$keys","Object","keys","length","setCountry","setCallingCode","startInternationalNumber","appendDigits","nextDigits","appendNationalSignificantNumberDigits","slice","getDigitsWithoutInternationalPrefix","repeat","string","times","result","cutAndStripNonPairedParens","cutBeforeIndex","stripNonPairedParens","slice","dangling_braces","i","length","push","pop","start","cleared_string","_i","_dangling_braces","index","populateTemplateWithDigits","template","position","digits","_iterator2","_createForOfIteratorHelperLoose","split","_step2","done","digit","value","search","DIGIT_PLACEHOLDER_MATCHER","replace","DIGIT_PLACEHOLDER","RegExp","state","format","_ref","metadata","shouldTryNationalPrefixFormattingRule","getSeparatorAfterNationalPrefix","matcher","RegExp","concat","pattern","test","nationalSignificantNumber","formatNationalNumberWithAndWithoutNationalPrefixFormattingRule","canFormatCompleteNumber","checkNumberLength","undefined","_ref2","international","nationalPrefix","carrierCode","formattedNumber","formatNationalNumber","useNationalPrefixFormattingRule","_ref3","formattedNationalNumber","formatNationalNumberUsingFormat","useInternationalFormat","withNationalPrefix","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","isValidFormattedNationalNumber","parseDigits","getNationalDigits","parseOneOfSet","pattern","values","i","length","Error","concat","prevValue","charCodeAt","nextValue","value","push","String","fromCharCode","expandSingleElementArray","array","PatternParser","ILLEGAL_CHARACTER_REGEXP","OPERATOR","_classCallCheck","_createClass","key","parse","context","or","instructions","parsePattern","_this$context$","branches","op","args","startContext","endContext","pop","getContext","match","test","split","operator","before","slice","index","rightPart","_this$getContext","oneOfSet","RegExp","match","characters","tree","last","characterString","join","indexOf","length","matchedChars","partialMatch","overflow","slice","Array","isArray","restCharacters","i","subtree","result","Error","concat","JSON","stringify","op","_iterator","_createForOfIteratorHelperLoose","args","_step","done","branch","value","_iterator2","_step2","char","PatternMatcher","pattern","_classCallCheck","matchTree","PatternParser","parse","_createClass","key","string","_ref","arguments","undefined","allowOverflow","split","DUMMY_DIGIT","LONGEST_NATIONAL_PHONE_NUMBER_LENGTH","LONGEST_DUMMY_PHONE_NUMBER","NATIONAL_PREFIX_SEPARATORS_PATTERN","SUPPORT_LEGACY_FORMATTING_PATTERNS","CREATE_CHARACTER_CLASS_PATTERN","CREATE_STANDALONE_DIGIT_PATTERN","NON_ALTERING_FORMAT_REG_EXP","MIN_LEADING_DIGITS_LENGTH","AsYouTypeFormatter","repeat","RegExp","VALID_PUNCTUATION","_ref","state","metadata","_classCallCheck","resetFormat","_createClass","key","value","chosenFormat","undefined","template","nationalNumberTemplate","populatedNationalNumberTemplate","populatedNationalNumberTemplatePosition","reset","numberingPlan","isNANP","callingCode","matchingFormats","formats","nationalSignificantNumber","narrowDownMatchingFormats","format","nextDigits","_this","canFormatCompleteNumber","_iterator","_createForOfIteratorHelperLoose","_step","done","formattedCompleteNumber","formatCompleteNumber","shouldTryNationalPrefixFormattingRule","international","nationalPrefix","getSeparatorAfterNationalPrefix","setNationalNumberTemplate","replace","DIGIT_PLACEHOLDER","lastIndexOf","formatNationalNumberWithNextDigits","previouslyChosenFormat","newlyChosenFormat","chooseFormat","formatNextNationalNumberDigits","getNationalDigits","_ref2","_this2","leadingDigits","leadingDigitsPatternIndex","length","filter","formatSuits","formatMatches","indexOf","usesNationalPrefix","nationalPrefixIsOptionalWhenFormattingInNationalFormat","nationalPrefixIsMandatoryWhenFormattingInNationalFormat","leadingDigitsPatternsCount","leadingDigitsPatterns","Math","min","leadingDigitsPattern","PatternMatcher","match","allowOverflow","error","console","concat","test","getFormatFormat","internationalFormat","_this3","_loop","_step2","createTemplateForFormat","_","_ret","_iterator2","slice","pattern","getTemplateForFormat","nationalPrefixFormattingRule","getInternationalPrefixBeforeCountryCallingCode","_ref3","options","IDDPrefix","missingPlus","spacing","getTemplate","index","i","internationalPrefix","getDigitsWithoutInternationalPrefix","cutAndStripNonPairedParens","_ref4","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","digits","strictPattern","nationalNumberDummyDigits","numberFormat","nationalPrefixIncludedInTemplate","numberFormatWithNationalPrefix","FIRST_GROUP_PATTERN","parseDigits","applyInternationalSeparatorStyle","result","populateTemplateWithDigits","_ref5","extractFormattedPhoneNumber","text","startsAt","search","VALID_FORMATTED_PHONE_NUMBER_PART","slice","hasPlus","length","replace","AFTER_PHONE_NUMBER_DIGITS_END_PATTERN","_extractFormattedDigitsAndPlus","extractedNumber","extractFormattedDigitsAndPlus","_extractFormattedDigi3","_extractFormattedDigi4","_slicedToArray","formattedDigits","VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN","test","VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART","COMPLEX_NATIONAL_PREFIX","AsYouTypeParser","VALID_PUNCTUATION","VALID_DIGITS","RegExp","PLUS_CHARS","_ref","defaultCountry","defaultCallingCode","metadata","onNationalSignificantNumberChange","_classCallCheck","_createClass","key","value","input","state","_extractFormattedDigi","_extractFormattedDigi2","digits","parseDigits","justLeadingPlus","startInternationalNumber","undefined","inputDigits","nextDigits","hasReceivedThreeLeadingDigits","appendDigits","extractIddPrefix","isWaitingForCountryCallingCode","extractCountryCallingCode","appendNationalSignificantNumberDigits","international","hasExtractedNationalSignificantNumber","extractNationalSignificantNumber","getNationalDigits","stateUpdate","update","_ref2","callingCode","_extractCountryCallin","getDigitsWithoutInternationalPrefix","country","countryCallingCode","number","setCallingCode","nationalSignificantNumber","reset","numberingPlan","hasSelectedNumberingPlan","nationalPrefixForParsing","_nationalPrefixForParsing","couldPossiblyExtractAnotherNationalSignificantNumber","nationalDigits","setState","_extractNationalNumbe","extractNationalNumberFromPossiblyIncompleteNumber","nationalPrefix","nationalNumber","carrierCode","onExtractedNationalNumber","extractAnotherNationalSignificantNumber","prevNationalSignificantNumber","_extractNationalNumbe2","nationalSignificantNumberIsModified","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","nationalSignificantNumberIndex","lastIndexOf","prefixBeforeNationalNumber","reExtractNationalSignificantNumber","extractCallingCodeAndNationalSignificantNumber","fixMissingPlus","IDDPrefix","numberWithoutIDD","stripIddPrefix","_extractCountryCallin2","extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","newCallingCode","missingPlus","_ref3","resetNationalSignificantNumber","getExactCountryForMultiCountryCallingCode","callingCode","nationalSignificantNumber","metadata","ambiguousCountries","getCountryCodesForCallingCode","length","getCountryByNationalNumber","USE_NON_GEOGRAPHIC_COUNTRY_CODE","AsYouType","optionsOrDefaultCountry","_classCallCheck","Metadata","_this$getCountryAndCa","getCountryAndCallingCode","_this$getCountryAndCa2","_slicedToArray","defaultCountry","defaultCallingCode","reset","_createClass","key","value","isObject","hasCountry","undefined","isNonGeographicCallingCode","input","text","_this$parser$input","parser","state","digits","justLeadingPlus","formattedOutput","determineTheCountryIfNeeded","formatter","narrowDownMatchingFormats","formattedNationalNumber","hasSelectedNumberingPlan","format","reExtractNationalSignificantNumber","nationalDigits","getNationalDigits","getFullNumber","getNonFormattedNumber","_this","AsYouTypeState","onCountryChange","country","onCallingCodeChange","selectNumberingPlan","numberingPlan","AsYouTypeFormatter","AsYouTypeParser","onNationalSignificantNumberChange","isInternational","international","getCallingCode","getCountryCallingCode","getCountry","_getCountry","isCountryCallingCodeAmbiguous","determineTheCountry","_this2","prefix","getInternationalPrefixBeforeCountryCallingCode","spacing","concat","getDigitsWithoutInternationalPrefix","getNonFormattedNationalNumberWithPrefix","_this$state","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","nationalPrefix","number","nationalSignificantNumberIsModified","getNonFormattedTemplate","replace","DIGIT_PLACEHOLDER","countryCodes","getCountryByCallingCode","nationalNumber","setCountry","getNumberValue","_this$state2","callingCode_","countryCallingCode","getNumber","_this$state3","carrierCode","exactCountry","phoneNumber","PhoneNumber","isPossible","isValid","validateLength","_this$state4","result","checkNumberLength","getNationalNumber","getChars","getTemplate","AsYouType","init_AsYouType","init_AsYouType","digits","AsYouType","state","state","state","form","i","state","f","state","state","state","state","form","f","state","state","state","state","state","state","state","state","state","state","state","DEFAULT_OPTIONS","state","addListener","target"]}
|
|
1
|
+
{"version":3,"sources":["../../node_modules/cleave-zen/src/common/utils.ts","../../node_modules/cleave-zen/src/credit-card/constants.ts","../../node_modules/cleave-zen/src/cursor-tracker/index.ts","../../node_modules/cleave-zen/src/general/index.ts","../../node_modules/cleave-zen/src/numeral/constants.ts","../../node_modules/cleave-zen/src/credit-card/index.ts","../../node_modules/cleave-zen/src/numeral/index.ts","../../node_modules/cleave-zen/src/date/constants.ts","../../node_modules/cleave-zen/src/date/index.ts","../../node_modules/cleave-zen/src/time/constants.ts","../../node_modules/cleave-zen/src/time/index.ts","../../node_modules/libphonenumber-js/metadata.min.json.js","../../node_modules/libphonenumber-js/source/tools/semver-compare.js","../../node_modules/libphonenumber-js/source/helpers/isObject.js","../../node_modules/libphonenumber-js/source/helpers/isCallingCode.js","../../node_modules/libphonenumber-js/source/metadata.js","../../node_modules/libphonenumber-js/source/helpers/mergeArrays.js","../../node_modules/libphonenumber-js/source/helpers/checkNumberLength.js","../../node_modules/libphonenumber-js/source/isPossible.js","../../node_modules/libphonenumber-js/source/helpers/matchesEntirely.js","../../node_modules/libphonenumber-js/source/helpers/getNumberType.js","../../node_modules/libphonenumber-js/source/isValid.js","../../node_modules/libphonenumber-js/source/helpers/isCountryCode.js","../../node_modules/libphonenumber-js/source/helpers/getCountryAndCallingCodeFromOneOfThem.js","../../node_modules/libphonenumber-js/source/helpers/getPossibleCountriesForNumber.js","../../node_modules/libphonenumber-js/source/constants.js","../../node_modules/libphonenumber-js/source/helpers/stripIddPrefix.js","../../node_modules/libphonenumber-js/source/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js","../../node_modules/libphonenumber-js/source/helpers/getCountryByNationalNumber.js","../../node_modules/libphonenumber-js/source/helpers/getCountryByCallingCode.js","../../node_modules/libphonenumber-js/source/helpers/extractNationalNumber.js","../../node_modules/libphonenumber-js/source/getCountryCallingCode.js","../../node_modules/libphonenumber-js/source/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js","../../node_modules/libphonenumber-js/source/helpers/extractCountryCallingCode.js","../../node_modules/libphonenumber-js/source/helpers/applyInternationalSeparatorStyle.js","../../node_modules/libphonenumber-js/source/helpers/formatNationalNumberUsingFormat.js","../../node_modules/libphonenumber-js/source/helpers/getIddPrefix.js","../../node_modules/libphonenumber-js/source/helpers/RFC3966.js","../../node_modules/libphonenumber-js/source/format.js","../../node_modules/libphonenumber-js/source/PhoneNumber.js","../../node_modules/libphonenumber-js/source/helpers/parseDigits.js","../../node_modules/libphonenumber-js/source/AsYouTypeState.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.util.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.complete.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.PatternParser.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.PatternMatcher.js","../../node_modules/libphonenumber-js/source/AsYouTypeFormatter.js","../../node_modules/libphonenumber-js/source/AsYouTypeParser.js","../../node_modules/libphonenumber-js/source/AsYouType.js","../../node_modules/libphonenumber-js/core/index.js","../../node_modules/libphonenumber-js/min/exports/AsYouType.js","../../node_modules/libphonenumber-js/index.js","../../node_modules/@samline/formatter/src/core/phone.ts","../../node_modules/@samline/formatter/src/core/raw.ts","../../node_modules/@samline/formatter/src/core/format.ts","../../node_modules/@samline/formatter/src/core/formatter.ts","../../node_modules/@samline/formatter/src/core/regex.ts","../../src/browser/global.ts","../../src/api/append.ts","../../src/api/auto-submit.ts","../../src/api/clear-errors.ts","../../src/core/format-helpers.ts","../../src/core/formatter-loader.ts","../../src/api/format.ts","../../src/api/destroy.ts","../../src/api/disable-auto-submit.ts","../../src/core/serialize.ts","../../src/api/get-data.ts","../../src/api/get-field.ts","../../src/core/state.ts","../../src/api/get-state.ts","../../src/core/dom.ts","../../src/api/get-value.ts","../../src/api/observe.ts","../../src/api/on-submit.ts","../../src/api/prefill.ts","../../src/api/reset.ts","../../src/api/validate.ts","../../src/api/revalidate.ts","../../src/api/set-errors.ts","../../src/api/set-value.ts","../../src/api/subscribe.ts","../../src/api/unwatch.ts","../../src/api/watch.ts","../../src/core/validation.ts","../../src/core/controller.ts","../../src/api/form.ts","../../src/browser/registry.ts"],"sourcesContent":["import type {\n StripDelimitersProps,\n GetFormattedValueProps,\n BlocksType,\n DelimiterType,\n} from './types'\n\n// const test = (): string => {\n// return 'test-eslint'\n// }\n\nexport const isString = (value: any): value is string =>\n typeof value === 'string'\n\nexport const stripNonNumeric = (value: string): string =>\n value.replace(/[^\\d]/g, '')\n\nexport const getMaxLength = (blocks: BlocksType): number =>\n blocks.reduce((previous: number, current: number) => previous + current, 0)\n\nexport const headStr = (str: string, length: number): string =>\n str.slice(0, length)\n\nexport const getDelimiterRegexByDelimiter = (delimiter: string): RegExp =>\n new RegExp(delimiter.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1'), 'g')\n\nexport const stripDelimiters = ({\n value,\n delimiters,\n}: StripDelimitersProps): string => {\n delimiters.forEach((current: DelimiterType) => {\n current.split('').forEach(letter => {\n value = value.replace(getDelimiterRegexByDelimiter(letter), '')\n })\n })\n\n return value\n}\n\nexport const getFormattedValue = ({\n value,\n blocks,\n delimiter = '',\n delimiters = [],\n delimiterLazyShow = false,\n}: GetFormattedValueProps): string => {\n let result = ''\n let valueRemaining = value\n let currentDelimiter = ''\n\n blocks.forEach((length: number, index: number) => {\n if (valueRemaining.length > 0) {\n const sub = valueRemaining.slice(0, length)\n const rest = valueRemaining.slice(length)\n\n if (delimiters.length > 0) {\n currentDelimiter =\n delimiters[delimiterLazyShow ? index - 1 : index] ?? currentDelimiter\n } else {\n currentDelimiter = delimiter\n }\n\n if (delimiterLazyShow) {\n if (index > 0) {\n result += currentDelimiter\n }\n\n result += sub\n } else {\n result += sub\n\n if (sub.length === length && index < blocks.length - 1) {\n result += currentDelimiter\n }\n }\n\n // update remaining string\n valueRemaining = rest\n }\n })\n\n return result\n}\n","import type { DelimiterType } from '../common/types'\nimport type { CreditCardBlocksType, CreditCardRegexType } from './types'\n\nexport const DefaultCreditCardDelimiter: DelimiterType = ' '\n\nexport enum CreditCardType {\n UATP = 'uatp',\n AMEX = 'amex',\n DINERS = 'diners',\n DISCOVER = 'discover',\n MASTERCARD = 'mastercard',\n DANKORT = 'dankort',\n INSTAPAYMENT = 'instapayment',\n JCB15 = 'jcb15',\n JCB = 'jcb',\n MAESTRO = 'maestro',\n VISA = 'visa',\n MIR = 'mir',\n UNIONPAY = 'unionpay',\n GENERAL = 'general',\n}\n\nexport const CreditCardBlocks: CreditCardBlocksType = {\n [CreditCardType.UATP]: [4, 5, 6],\n [CreditCardType.AMEX]: [4, 6, 5],\n [CreditCardType.DINERS]: [4, 6, 4],\n [CreditCardType.DISCOVER]: [4, 4, 4, 4],\n [CreditCardType.MASTERCARD]: [4, 4, 4, 4],\n [CreditCardType.DANKORT]: [4, 4, 4, 4],\n [CreditCardType.INSTAPAYMENT]: [4, 4, 4, 4],\n [CreditCardType.JCB15]: [4, 6, 5],\n [CreditCardType.JCB]: [4, 4, 4, 4],\n [CreditCardType.MAESTRO]: [4, 4, 4, 4],\n [CreditCardType.VISA]: [4, 4, 4, 4],\n [CreditCardType.MIR]: [4, 4, 4, 4],\n [CreditCardType.UNIONPAY]: [4, 4, 4, 4],\n [CreditCardType.GENERAL]: [4, 4, 4, 4],\n}\n\nexport const CreditCardRegex: CreditCardRegexType = {\n // starts with 1; 15 digits, not starts with 1800 (jcb card)\n [CreditCardType.UATP]: /^(?!1800)1\\d{0,14}/,\n\n // starts with 34/37; 15 digits\n [CreditCardType.AMEX]: /^3[47]\\d{0,13}/,\n\n // starts with 6011/65/644-649; 16 digits\n [CreditCardType.DISCOVER]: /^(?:6011|65\\d{0,2}|64[4-9]\\d?)\\d{0,12}/,\n\n // starts with 300-305/309 or 36/38/39; 14 digits\n [CreditCardType.DINERS]: /^3(?:0([0-5]|9)|[689]\\d?)\\d{0,11}/,\n\n // starts with 51-55/2221–2720; 16 digits\n [CreditCardType.MASTERCARD]:\n /^(5[1-5]\\d{0,2}|22[2-9]\\d{0,1}|2[3-7]\\d{0,2})\\d{0,12}/,\n\n // starts with 5019/4175/4571; 16 digits\n [CreditCardType.DANKORT]: /^(5019|4175|4571)\\d{0,12}/,\n\n // starts with 637-639; 16 digits\n [CreditCardType.INSTAPAYMENT]: /^63[7-9]\\d{0,13}/,\n\n // starts with 2131/1800; 15 digits\n [CreditCardType.JCB15]: /^(?:2131|1800)\\d{0,11}/,\n\n // starts with 2131/1800/35; 16 digits\n [CreditCardType.JCB]: /^(?:35\\d{0,2})\\d{0,12}/,\n\n // starts with 50/56-58/6304/67; 16 digits\n [CreditCardType.MAESTRO]: /^(?:5[0678]\\d{0,2}|6304|67\\d{0,2})\\d{0,12}/,\n\n // starts with 22; 16 digits\n [CreditCardType.MIR]: /^220[0-4]\\d{0,12}/,\n\n // starts with 4; 16 digits\n [CreditCardType.VISA]: /^4\\d{0,15}/,\n\n // starts with 62/81; 16 digits\n [CreditCardType.UNIONPAY]: /^(62|81)\\d{0,14}/,\n}\n","import type { DelimiterType } from '../common/types'\nimport { stripDelimiters } from '../common/utils'\nimport type {\n CalculeteCleanCursorIndexProps,\n CalculeteDirtyCursorIndexProps,\n RegisterCursorTrackerPropsType,\n CursorTrackerInputElement,\n CursorTrackerDestructor,\n} from './types'\n\nconst calculeteCleanCursorIndex = ({\n value,\n dirtyCursorIndex,\n delimiters,\n}: CalculeteCleanCursorIndexProps): number => {\n let index: number = dirtyCursorIndex\n for (let charIndex = 0; charIndex < dirtyCursorIndex; charIndex++) {\n if (delimiters.includes(value[charIndex])) {\n index--\n }\n }\n return index\n}\n\nconst calculeteDirtyCursorIndex = ({\n value,\n cleanCursorIndex,\n delimiters,\n}: CalculeteDirtyCursorIndexProps): number => {\n let index: number = cleanCursorIndex\n for (let charIndex = 0; charIndex < value.length; charIndex++) {\n if (delimiters.includes(value[charIndex])) {\n index++\n }\n if (charIndex === index - 1) {\n break\n }\n }\n\n return index\n}\n\nexport const registerCursorTracker = ({\n input,\n delimiter = '',\n delimiters = [],\n prefix = '',\n}: RegisterCursorTrackerPropsType): CursorTrackerDestructor => {\n const cursorTrackerInput: CursorTrackerInputElement =\n input as CursorTrackerInputElement\n\n if (cursorTrackerInput.CLEAVE_ZEN_cursor_tracker !== undefined) {\n return () => {\n cursorTrackerInput.removeEventListener(\n 'input',\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker\n )\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker = undefined\n }\n }\n\n const cursorTrackerDelimiters: DelimiterType[] = [delimiter, ...delimiters]\n\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker = (e: InputEvent) => {\n const isBackward = e.inputType === 'deleteContentBackward'\n\n const element: CursorTrackerInputElement =\n e.target as CursorTrackerInputElement\n\n // if typing from the end but not backward, do nothing\n if (!isBackward && element.value.length === element.selectionEnd) {\n return\n }\n element.CLEAVE_ZEN_cleanCursorIndex = calculeteCleanCursorIndex({\n value: element.value,\n dirtyCursorIndex: element.selectionEnd ?? 0,\n delimiters: cursorTrackerDelimiters,\n })\n setTimeout(() => {\n // if current value is only to add the delimiter after prefix, do nothing\n if (\n stripDelimiters({\n value: element.value,\n delimiters: cursorTrackerDelimiters,\n }) === prefix\n ) {\n return\n }\n const dirtyCursorIndex = calculeteDirtyCursorIndex({\n value: element.value,\n cleanCursorIndex: element.CLEAVE_ZEN_cleanCursorIndex ?? 0,\n delimiters: cursorTrackerDelimiters,\n })\n element.setSelectionRange(dirtyCursorIndex, dirtyCursorIndex)\n }, 0)\n }\n\n cursorTrackerInput.addEventListener(\n 'input',\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker\n )\n\n return () => {\n cursorTrackerInput.removeEventListener(\n 'input',\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker\n )\n cursorTrackerInput.CLEAVE_ZEN_cursor_tracker = undefined\n }\n}\n","import {\n getFormattedValue,\n stripDelimiters,\n stripNonNumeric,\n} from '../common/utils'\nimport type { FormatGeneralOptions, GetPrefixStrippedValueProps } from './types'\n\n// strip prefix\nconst stripPrefix = ({\n value,\n prefix,\n tailPrefix,\n}: GetPrefixStrippedValueProps): string => {\n const prefixLength: number = prefix.length\n\n // No prefix\n if (prefixLength === 0) {\n return value\n }\n\n // Value is prefix\n if (value === prefix && value !== '') {\n return ''\n }\n\n // result prefix string does not match pre-defined prefix\n if (value.slice(0, prefixLength) !== prefix && !tailPrefix) {\n return ''\n } else if (value.slice(-prefixLength) !== prefix && tailPrefix) {\n return ''\n }\n\n // No issue, strip prefix for new value\n return tailPrefix ? value.slice(0, -prefixLength) : value.slice(prefixLength)\n}\n\nexport const formatGeneral = (\n value: string,\n options: FormatGeneralOptions\n): string => {\n const {\n blocks,\n delimiter = '',\n delimiters = [],\n delimiterLazyShow = false,\n prefix = '',\n numericOnly = false,\n uppercase = false,\n lowercase = false,\n } = options\n\n const tailPrefix: boolean = false // This is too buggy to be true\n\n if (delimiter.length > 0) {\n delimiters.push(delimiter)\n }\n\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters,\n })\n\n // strip prefix\n value = stripPrefix({\n value,\n prefix,\n tailPrefix,\n })\n\n // strip non-numeric characters\n value = numericOnly ? stripNonNumeric(value) : value\n\n // convert case\n value = uppercase ? value.toUpperCase() : value\n value = lowercase ? value.toLowerCase() : value\n\n // prevent from showing prefix when no immediate option enabled with empty input value\n if (prefix.length > 0) {\n if (tailPrefix) {\n value = value + prefix\n } else {\n value = prefix + value\n }\n }\n\n // apply blocks\n value = getFormattedValue({\n value,\n blocks,\n delimiter,\n delimiters,\n delimiterLazyShow,\n })\n\n return value\n}\n\nexport const unformatGeneral = (\n value: string,\n options: Pick<FormatGeneralOptions, 'delimiter' | 'delimiters'>\n): string => {\n const { delimiter = '', delimiters = [] } = options\n return stripDelimiters({ value, delimiters: [...delimiters, delimiter] })\n}\n","import type { DelimiterType } from '../common/types'\n\nexport enum NumeralThousandGroupStyles {\n THOUSAND = 'thousand',\n LAKH = 'lakh',\n WAN = 'wan',\n NONE = 'none',\n}\nexport const DefaultNumeralDelimiter: DelimiterType = ','\nexport const DefaultNumeralDecimalMark: DelimiterType = '.'\nexport const DefaultNumeralThousandGroupStyle: NumeralThousandGroupStyles =\n NumeralThousandGroupStyles.THOUSAND\nexport const DefaultNumeralDecimalScale: number = 2\nexport const DefaultNumeralIntegerScale: number = 0 // no limit\n","import type { BlocksType, DelimiterType } from '../common/types'\nimport {\n getFormattedValue,\n getMaxLength,\n headStr,\n stripDelimiters,\n stripNonNumeric,\n} from '../common/utils'\nimport {\n CreditCardBlocks,\n CreditCardRegex,\n CreditCardType,\n DefaultCreditCardDelimiter,\n} from './constants'\nimport type {\n CreditCardInfoProps,\n FormatCreditCardOptions,\n GetCreditCardInfoProps,\n CreditCardExcludeGeneralType,\n} from './types'\n\nconst getStrictBlocks = (blocks: BlocksType): BlocksType => {\n const total: number = blocks.reduce(\n (prev: number, current: number) => prev + current,\n 0\n )\n\n return blocks.concat(19 - total)\n}\n\nconst getCreditCardInfo = ({\n value,\n strictMode,\n}: GetCreditCardInfoProps): CreditCardInfoProps => {\n // Some credit card can have up to 19 digits number.\n // Set strictMode to true will remove the 16 max-length restrain,\n // however, I never found any website validate card number like\n // this, hence probably you don't want to enable this option.\n for (const key of Object.keys(CreditCardRegex) as Array<\n CreditCardExcludeGeneralType<CreditCardType>\n >) {\n if (CreditCardRegex[key].test(value)) {\n const matchedBlocks: BlocksType = CreditCardBlocks[key]\n return {\n type: key,\n blocks:\n strictMode ?? false ? getStrictBlocks(matchedBlocks) : matchedBlocks,\n }\n }\n }\n\n return {\n type: CreditCardType.GENERAL,\n blocks:\n strictMode ?? false\n ? getStrictBlocks(CreditCardBlocks.general)\n : CreditCardBlocks.general,\n }\n}\n\nexport const formatCreditCard = (\n value: string,\n options?: FormatCreditCardOptions\n): string => {\n const {\n delimiter = DefaultCreditCardDelimiter,\n delimiterLazyShow = false,\n strictMode = false,\n } = options ?? {}\n\n // strip non-numeric characters\n value = stripNonNumeric(value)\n\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters: [delimiter],\n })\n\n const { blocks }: CreditCardInfoProps = getCreditCardInfo({\n value,\n strictMode,\n })\n\n // max length\n const maxLength = getMaxLength(blocks)\n value = headStr(value, maxLength)\n\n // calculate\n value = getFormattedValue({\n value,\n blocks,\n delimiter,\n delimiterLazyShow,\n })\n\n return value\n}\n\nexport const getCreditCardType = (\n value: string,\n delimiter?: DelimiterType\n): CreditCardType => {\n // strip non-numeric characters\n value = stripNonNumeric(value)\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters: [delimiter ?? DefaultCreditCardDelimiter],\n })\n\n const { type }: CreditCardInfoProps = getCreditCardInfo({ value })\n return type\n}\n\nexport const unformatCreditCard = (value: string): string =>\n stripNonNumeric(value)\n","import type { FormatNumeralRequiredProps, FormatNumeralOptions } from './types'\n\nimport {\n DefaultNumeralDecimalMark,\n DefaultNumeralDelimiter,\n DefaultNumeralThousandGroupStyle,\n DefaultNumeralDecimalScale,\n DefaultNumeralIntegerScale,\n NumeralThousandGroupStyles,\n} from './constants'\n\nconst format = ({\n value,\n delimiter,\n numeralDecimalMark,\n numeralDecimalScale,\n stripLeadingZeroes,\n numeralPositiveOnly,\n numeralIntegerScale,\n numeralThousandsGroupStyle,\n signBeforePrefix,\n tailPrefix,\n prefix,\n}: FormatNumeralRequiredProps): string => {\n let parts: string[]\n let partSignAndPrefix: string\n let partInteger: string\n let partDecimal: string = ''\n\n // strip alphabet letters\n let result: string = value\n .replace(/[A-Za-z]/g, '')\n\n // replace the first decimal mark with reserved placeholder\n .replace(numeralDecimalMark, 'M')\n\n // strip non numeric letters except minus and \"M\"\n // this is to ensure prefix has been stripped\n .replace(/[^\\dM-]/g, '')\n\n // replace the leading minus with reserved placeholder\n .replace(/^-/, 'N')\n\n // strip the other minus sign (if present)\n .replace(/-/g, '')\n\n // replace the minus sign (if present)\n .replace('N', numeralPositiveOnly ?? false ? '' : '-')\n\n // replace decimal mark\n .replace('M', numeralDecimalMark)\n\n // strip any leading zeros\n if (stripLeadingZeroes) {\n result = result.replace(/^(-)?0+(?=\\d)/, '$1')\n }\n\n const partSign: string = result.slice(0, 1) === '-' ? '-' : ''\n\n if (signBeforePrefix) {\n partSignAndPrefix = partSign + prefix\n } else {\n partSignAndPrefix = prefix + partSign\n }\n\n partInteger = result\n\n if (result.includes(numeralDecimalMark)) {\n parts = result.split(numeralDecimalMark)\n partInteger = parts[0]\n partDecimal = numeralDecimalMark + parts[1].slice(0, numeralDecimalScale)\n }\n\n if (partSign === '-') {\n partInteger = partInteger.slice(1)\n }\n\n if (numeralIntegerScale > 0) {\n partInteger = partInteger.slice(0, numeralIntegerScale)\n }\n\n switch (numeralThousandsGroupStyle) {\n case NumeralThousandGroupStyles.LAKH:\n partInteger = partInteger.replace(/(\\d)(?=(\\d\\d)+\\d$)/g, '$1' + delimiter)\n break\n\n case NumeralThousandGroupStyles.WAN:\n partInteger = partInteger.replace(/(\\d)(?=(\\d{4})+$)/g, '$1' + delimiter)\n break\n\n case NumeralThousandGroupStyles.THOUSAND:\n partInteger = partInteger.replace(/(\\d)(?=(\\d{3})+$)/g, '$1' + delimiter)\n break\n }\n\n if (tailPrefix) {\n return (\n partSign +\n partInteger +\n (numeralDecimalScale > 0 ? partDecimal : '') +\n prefix\n )\n }\n\n return (\n partSignAndPrefix +\n partInteger +\n (numeralDecimalScale > 0 ? partDecimal : '')\n )\n}\n\nexport const formatNumeral = (\n value: string,\n options?: FormatNumeralOptions\n): string => {\n const {\n delimiter = DefaultNumeralDelimiter,\n numeralThousandsGroupStyle = DefaultNumeralThousandGroupStyle,\n numeralIntegerScale = DefaultNumeralIntegerScale,\n numeralDecimalMark = DefaultNumeralDecimalMark,\n numeralDecimalScale = DefaultNumeralDecimalScale,\n stripLeadingZeroes = true,\n numeralPositiveOnly = false,\n tailPrefix = false,\n signBeforePrefix = false,\n prefix = '',\n } = options ?? {}\n\n value = format({\n value,\n delimiter,\n numeralIntegerScale,\n numeralDecimalMark,\n numeralDecimalScale,\n stripLeadingZeroes,\n numeralPositiveOnly,\n numeralThousandsGroupStyle,\n tailPrefix,\n signBeforePrefix,\n prefix,\n })\n\n return value\n}\n\nexport const unformatNumeral = (\n value: string,\n options?: Pick<FormatNumeralOptions, 'numeralDecimalMark'>\n): string => {\n const { numeralDecimalMark = DefaultNumeralDecimalMark } = options ?? {}\n\n return value\n .replace(numeralDecimalMark, 'M')\n .replace(/[^0-9-M]/g, '')\n .replace('M', '.')\n}\n","import type { DelimiterType } from '../common/types'\nimport type { DateUnit } from './types'\n\nexport const DefaultDateDelimiter: DelimiterType = '/'\nexport const DefaultDatePattern: DateUnit[] = ['d', 'm', 'Y']\n","import type { BlocksType } from '../common/types'\nimport {\n stripNonNumeric,\n stripDelimiters,\n getFormattedValue,\n getMaxLength,\n headStr,\n} from '../common/utils'\nimport { DefaultDateDelimiter, DefaultDatePattern } from './constants'\nimport type {\n DateUnit,\n InitDateRangeResults,\n DatePatternType,\n FormatDateOptions,\n DateCalculateOptions,\n} from './types'\n\nconst getBlocksByDatePattern = (datePattern: DatePatternType): BlocksType => {\n const blocks: BlocksType = []\n datePattern.forEach((value: DateUnit) => {\n if (value === 'Y') {\n blocks.push(4)\n } else {\n blocks.push(2)\n }\n })\n return blocks\n}\n\nconst getDateRange = ({\n dateMin,\n dateMax,\n}: {\n dateMin: string\n dateMax: string\n}): InitDateRangeResults => {\n const min: number[] = dateMin\n .split('-')\n .reverse()\n .map((x: string) => parseInt(x, 10))\n if (min.length === 2) min.unshift(0)\n\n const max: number[] = dateMax\n .split('-')\n .reverse()\n .map((x: string) => parseInt(x, 10))\n if (max.length === 2) max.unshift(0)\n\n return { min, max }\n}\n\nconst addLeadingZeroForYear = (\n number: number,\n fullYearMode: boolean\n): string => {\n if (fullYearMode) {\n return (\n (number < 10 ? '000' : number < 100 ? '00' : number < 1000 ? '0' : '') +\n number\n )\n }\n\n return (number < 10 ? '0' : '') + number\n}\n\nconst addLeadingZero = (number: number): string =>\n (number < 10 ? '0' : '') + number\n\nconst getValidatedDate = ({\n value = '',\n blocks = [],\n datePattern,\n min,\n max,\n}: DateCalculateOptions): string => {\n let result = ''\n\n blocks.forEach((length: number, index: number) => {\n if (value.length > 0) {\n let sub = value.slice(0, length)\n const sub0 = sub.slice(0, 1)\n const rest = value.slice(length)\n\n switch (datePattern[index]) {\n case 'd':\n if (sub === '00') {\n sub = '01'\n } else if (parseInt(sub0, 10) > 3) {\n sub = '0' + sub0\n } else if (parseInt(sub, 10) > 31) {\n sub = '31'\n }\n\n break\n\n case 'm':\n if (sub === '00') {\n sub = '01'\n } else if (parseInt(sub0, 10) > 1) {\n sub = '0' + sub0\n } else if (parseInt(sub, 10) > 12) {\n sub = '12'\n }\n\n break\n }\n\n result += sub\n\n // update remaining string\n value = rest\n }\n })\n\n return getFixedDateString({ value: result, datePattern, min, max })\n}\n\nconst getFixedDateString = ({\n value = '',\n datePattern,\n min,\n max,\n}: DateCalculateOptions): string => {\n let date: number[] = []\n let dayIndex = 0\n let monthIndex = 0\n let yearIndex = 0\n let dayStartIndex = 0\n let monthStartIndex = 0\n let yearStartIndex = 0\n let day\n let month\n let year\n let fullYearDone = false\n\n // mm-dd || dd-mm\n if (\n value.length === 4 &&\n datePattern[0].toLowerCase() !== 'y' &&\n datePattern[1].toLowerCase() !== 'y'\n ) {\n dayStartIndex = datePattern[0] === 'd' ? 0 : 2\n monthStartIndex = 2 - dayStartIndex\n day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10)\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10)\n\n date = getFixedDate(day, month, 0)\n }\n\n // yyyy-mm-dd || yyyy-dd-mm || mm-dd-yyyy || dd-mm-yyyy || dd-yyyy-mm || mm-yyyy-dd\n if (value.length === 8) {\n datePattern.forEach((type: DateUnit, index: number) => {\n switch (type) {\n case 'd':\n dayIndex = index\n break\n case 'm':\n monthIndex = index\n break\n default:\n yearIndex = index\n break\n }\n })\n\n yearStartIndex = yearIndex * 2\n dayStartIndex = dayIndex <= yearIndex ? dayIndex * 2 : dayIndex * 2 + 2\n monthStartIndex =\n monthIndex <= yearIndex ? monthIndex * 2 : monthIndex * 2 + 2\n\n day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10)\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10)\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10)\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4\n\n date = getFixedDate(day, month, year)\n }\n\n // mm-yy || yy-mm\n if (\n value.length === 4 &&\n (datePattern[0] === 'y' || datePattern[1] === 'y')\n ) {\n monthStartIndex = datePattern[0] === 'm' ? 0 : 2\n yearStartIndex = 2 - monthStartIndex\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10)\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 2), 10)\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 2).length === 2\n\n date = [0, month, year]\n }\n\n // mm-yyyy || yyyy-mm\n if (\n value.length === 6 &&\n (datePattern[0] === 'Y' || datePattern[1] === 'Y')\n ) {\n monthStartIndex = datePattern[0] === 'm' ? 0 : 4\n yearStartIndex = 2 - 0.5 * monthStartIndex\n month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10)\n year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10)\n\n fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4\n\n date = [0, month, year]\n }\n\n date = getRangeFixedDate({ date, datePattern, min, max })\n\n const result: string =\n date.length === 0\n ? value\n : datePattern.reduce((previous: string, current: DateUnit) => {\n switch (current) {\n case 'd':\n return previous + (date[0] === 0 ? '' : addLeadingZero(date[0]))\n case 'm':\n return previous + (date[1] === 0 ? '' : addLeadingZero(date[1]))\n case 'y':\n return (\n previous +\n (fullYearDone ? addLeadingZeroForYear(date[2], false) : '')\n )\n case 'Y':\n return (\n previous +\n (fullYearDone ? addLeadingZeroForYear(date[2], true) : '')\n )\n }\n return previous\n }, '')\n\n return result\n}\n\nconst isLeapYear = (year: number): boolean =>\n (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0\n\nconst getFixedDate = (day: number, month: number, year: number): number[] => {\n day = Math.min(day, 31)\n month = Math.min(month, 12)\n year = year ?? 0\n\n if ((month < 7 && month % 2 === 0) || (month > 8 && month % 2 === 1)) {\n day = Math.min(day, month === 2 ? (isLeapYear(year) ? 29 : 28) : 30)\n }\n\n return [day, month, year]\n}\n\nconst getRangeFixedDate = ({\n date = [],\n min,\n max,\n datePattern,\n}: DateCalculateOptions): number[] => {\n if (date.length === 0 || (min.length < 3 && max.length < 3)) return date\n\n const hasYearInPattern: boolean =\n datePattern.filter((x: DateUnit) => x.toLowerCase() === 'y').length > 0\n if (hasYearInPattern && date[2] === 0) {\n return date\n }\n\n if (\n max.length > 0 &&\n (max[2] < date[2] ||\n (max[2] === date[2] &&\n (max[1] < date[1] || (max[1] === date[1] && max[0] < date[0]))))\n ) {\n return max\n }\n\n if (\n min.length > 0 &&\n (min[2] > date[2] ||\n (min[2] === date[2] &&\n (min[1] > date[1] || (min[1] === date[1] && min[0] > date[0]))))\n ) {\n return min\n }\n\n return date\n}\n\nexport const formatDate = (\n value: string,\n options?: FormatDateOptions\n): string => {\n const {\n delimiterLazyShow = false,\n delimiter = DefaultDateDelimiter,\n datePattern = DefaultDatePattern,\n dateMax = '',\n dateMin = '',\n } = options ?? {}\n // strip non-numeric characters\n value = stripNonNumeric(value)\n\n const blocks: BlocksType = getBlocksByDatePattern(datePattern)\n const { min, max } = getDateRange({\n dateMax,\n dateMin,\n })\n\n value = getValidatedDate({\n value,\n blocks,\n datePattern,\n min,\n max,\n })\n\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters: [delimiter],\n })\n\n // max length\n const maxLength = getMaxLength(blocks)\n value = headStr(value, maxLength)\n\n // calculate\n value = getFormattedValue({\n value,\n blocks,\n delimiter,\n delimiterLazyShow,\n })\n\n return value\n}\n","import type { DelimiterType } from '../common/types'\nimport type { TimeFormatType, TimeUnit } from './types'\n\nexport const DefaultTimeFormat: TimeFormatType = '24'\nexport const DefaultTimeDelimiter: DelimiterType = ':'\nexport const DefaultTimePattern: TimeUnit[] = ['h', 'm', 's']\n","import type { BlocksType } from '../common/types'\nimport {\n stripNonNumeric,\n stripDelimiters,\n getFormattedValue,\n getMaxLength,\n headStr,\n} from '../common/utils'\nimport {\n DefaultTimeDelimiter,\n DefaultTimeFormat,\n DefaultTimePattern,\n} from './constants'\nimport type {\n FormatTimeOptions,\n TimeFormatType,\n TimeFormatOptions,\n TimePatternType,\n GetFixedTimeStringProps,\n GetValidatedTimeProps,\n TimeUnit,\n} from './types'\n\nconst getTimeFormatOptions = (\n timeFormat: TimeFormatType\n): TimeFormatOptions => {\n if (timeFormat === '12') {\n return {\n maxHourFirstDigit: 1,\n maxHours: 12,\n maxMinutesFirstDigit: 5,\n maxMinutes: 60,\n }\n }\n\n return {\n maxHourFirstDigit: 2,\n maxHours: 23,\n maxMinutesFirstDigit: 5,\n maxMinutes: 60,\n }\n}\n\nconst addLeadingZero = (number: number): string =>\n (number < 10 ? '0' : '') + number\n\nconst getBlocksByTimePattern = (timePattern: TimePatternType): BlocksType => {\n const blocks: BlocksType = []\n timePattern.forEach(() => {\n blocks.push(2)\n })\n return blocks\n}\n\nconst getFixedTime = (\n hour: number,\n minute: number,\n second: number\n): number[] => {\n second = Math.min(second, 60)\n minute = Math.min(minute, 60)\n hour = Math.min(hour, 60)\n\n return [hour, minute, second]\n}\n\nconst getFixedTimeString = ({\n value,\n timePattern,\n}: GetFixedTimeStringProps): string => {\n let time: number[] = []\n let secondIndex = 0\n let minuteIndex = 0\n let hourIndex = 0\n let secondStartIndex = 0\n let minuteStartIndex = 0\n let hourStartIndex = 0\n let second\n let minute\n let hour\n\n if (value.length === 6) {\n timePattern.forEach((type, index) => {\n switch (type) {\n case 's':\n secondIndex = index * 2\n break\n case 'm':\n minuteIndex = index * 2\n break\n case 'h':\n hourIndex = index * 2\n break\n }\n })\n\n hourStartIndex = hourIndex\n minuteStartIndex = minuteIndex\n secondStartIndex = secondIndex\n\n second = parseInt(value.slice(secondStartIndex, secondStartIndex + 2), 10)\n minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10)\n hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10)\n\n time = getFixedTime(hour, minute, second)\n }\n\n if (value.length === 4 && !timePattern.includes('s')) {\n timePattern.forEach((type: TimeUnit, index: number) => {\n switch (type) {\n case 'm':\n minuteIndex = index * 2\n break\n case 'h':\n hourIndex = index * 2\n break\n }\n })\n\n hourStartIndex = hourIndex\n minuteStartIndex = minuteIndex\n\n second = 0\n minute = parseInt(value.slice(minuteStartIndex, minuteStartIndex + 2), 10)\n hour = parseInt(value.slice(hourStartIndex, hourStartIndex + 2), 10)\n\n time = getFixedTime(hour, minute, second)\n }\n\n return time.length === 0\n ? value\n : timePattern.reduce((previous: string, current: TimeUnit): string => {\n switch (current) {\n case 's':\n return previous + addLeadingZero(time[2])\n case 'm':\n return previous + addLeadingZero(time[1])\n case 'h':\n return previous + addLeadingZero(time[0])\n }\n return previous\n }, '')\n}\n\nconst getValidatedTime = ({\n value,\n blocks,\n timePattern,\n timeFormat,\n}: GetValidatedTimeProps): string => {\n let result: string = ''\n\n const timeFormatOptions: TimeFormatOptions = getTimeFormatOptions(timeFormat)\n\n blocks.forEach((length: number, index: number) => {\n if (value.length > 0) {\n let sub = value.slice(0, length)\n const sub0 = sub.slice(0, 1)\n const rest = value.slice(length)\n\n switch (timePattern[index]) {\n case 'h':\n if (parseInt(sub0, 10) > timeFormatOptions.maxHourFirstDigit) {\n sub = '0' + sub0\n } else if (parseInt(sub, 10) > timeFormatOptions.maxHours) {\n sub = timeFormatOptions.maxHours + ''\n }\n\n break\n case 'm':\n case 's':\n if (parseInt(sub0, 10) > timeFormatOptions.maxMinutesFirstDigit) {\n sub = '0' + sub0\n } else if (parseInt(sub, 10) > timeFormatOptions.maxMinutes) {\n sub = timeFormatOptions.maxMinutes + ''\n }\n break\n }\n\n result += sub\n\n // update remaining string\n value = rest\n }\n })\n\n return getFixedTimeString({ value: result, timePattern })\n}\n\nexport const formatTime = (\n value: string,\n options?: FormatTimeOptions\n): string => {\n const {\n delimiterLazyShow = false,\n delimiter = DefaultTimeDelimiter,\n timePattern = DefaultTimePattern,\n timeFormat = DefaultTimeFormat,\n } = options ?? {}\n // strip non-numeric characters\n value = stripNonNumeric(value)\n\n const blocks: BlocksType = getBlocksByTimePattern(timePattern)\n value = getValidatedTime({\n value,\n blocks,\n timePattern,\n timeFormat,\n })\n\n // strip delimiters\n value = stripDelimiters({\n value,\n delimiters: [delimiter],\n })\n\n // max length\n const maxLength = getMaxLength(blocks)\n value = headStr(value, maxLength)\n\n // calculate\n value = getFormattedValue({\n value,\n blocks,\n delimiter,\n delimiterLazyShow,\n })\n\n return value\n}\n","// This file is a workaround for a bug in web browsers' \"native\"\n// ES6 importing system which is uncapable of importing \"*.json\" files.\n// https://github.com/catamphetamine/libphonenumber-js/issues/239\nexport default {\"version\":4,\"country_calling_codes\":{\"1\":[\"US\",\"AG\",\"AI\",\"AS\",\"BB\",\"BM\",\"BS\",\"CA\",\"DM\",\"DO\",\"GD\",\"GU\",\"JM\",\"KN\",\"KY\",\"LC\",\"MP\",\"MS\",\"PR\",\"SX\",\"TC\",\"TT\",\"VC\",\"VG\",\"VI\"],\"7\":[\"RU\",\"KZ\"],\"20\":[\"EG\"],\"27\":[\"ZA\"],\"30\":[\"GR\"],\"31\":[\"NL\"],\"32\":[\"BE\"],\"33\":[\"FR\"],\"34\":[\"ES\"],\"36\":[\"HU\"],\"39\":[\"IT\",\"VA\"],\"40\":[\"RO\"],\"41\":[\"CH\"],\"43\":[\"AT\"],\"44\":[\"GB\",\"GG\",\"IM\",\"JE\"],\"45\":[\"DK\"],\"46\":[\"SE\"],\"47\":[\"NO\",\"SJ\"],\"48\":[\"PL\"],\"49\":[\"DE\"],\"51\":[\"PE\"],\"52\":[\"MX\"],\"53\":[\"CU\"],\"54\":[\"AR\"],\"55\":[\"BR\"],\"56\":[\"CL\"],\"57\":[\"CO\"],\"58\":[\"VE\"],\"60\":[\"MY\"],\"61\":[\"AU\",\"CC\",\"CX\"],\"62\":[\"ID\"],\"63\":[\"PH\"],\"64\":[\"NZ\"],\"65\":[\"SG\"],\"66\":[\"TH\"],\"81\":[\"JP\"],\"82\":[\"KR\"],\"84\":[\"VN\"],\"86\":[\"CN\"],\"90\":[\"TR\"],\"91\":[\"IN\"],\"92\":[\"PK\"],\"93\":[\"AF\"],\"94\":[\"LK\"],\"95\":[\"MM\"],\"98\":[\"IR\"],\"211\":[\"SS\"],\"212\":[\"MA\",\"EH\"],\"213\":[\"DZ\"],\"216\":[\"TN\"],\"218\":[\"LY\"],\"220\":[\"GM\"],\"221\":[\"SN\"],\"222\":[\"MR\"],\"223\":[\"ML\"],\"224\":[\"GN\"],\"225\":[\"CI\"],\"226\":[\"BF\"],\"227\":[\"NE\"],\"228\":[\"TG\"],\"229\":[\"BJ\"],\"230\":[\"MU\"],\"231\":[\"LR\"],\"232\":[\"SL\"],\"233\":[\"GH\"],\"234\":[\"NG\"],\"235\":[\"TD\"],\"236\":[\"CF\"],\"237\":[\"CM\"],\"238\":[\"CV\"],\"239\":[\"ST\"],\"240\":[\"GQ\"],\"241\":[\"GA\"],\"242\":[\"CG\"],\"243\":[\"CD\"],\"244\":[\"AO\"],\"245\":[\"GW\"],\"246\":[\"IO\"],\"247\":[\"AC\"],\"248\":[\"SC\"],\"249\":[\"SD\"],\"250\":[\"RW\"],\"251\":[\"ET\"],\"252\":[\"SO\"],\"253\":[\"DJ\"],\"254\":[\"KE\"],\"255\":[\"TZ\"],\"256\":[\"UG\"],\"257\":[\"BI\"],\"258\":[\"MZ\"],\"260\":[\"ZM\"],\"261\":[\"MG\"],\"262\":[\"RE\",\"YT\"],\"263\":[\"ZW\"],\"264\":[\"NA\"],\"265\":[\"MW\"],\"266\":[\"LS\"],\"267\":[\"BW\"],\"268\":[\"SZ\"],\"269\":[\"KM\"],\"290\":[\"SH\",\"TA\"],\"291\":[\"ER\"],\"297\":[\"AW\"],\"298\":[\"FO\"],\"299\":[\"GL\"],\"350\":[\"GI\"],\"351\":[\"PT\"],\"352\":[\"LU\"],\"353\":[\"IE\"],\"354\":[\"IS\"],\"355\":[\"AL\"],\"356\":[\"MT\"],\"357\":[\"CY\"],\"358\":[\"FI\",\"AX\"],\"359\":[\"BG\"],\"370\":[\"LT\"],\"371\":[\"LV\"],\"372\":[\"EE\"],\"373\":[\"MD\"],\"374\":[\"AM\"],\"375\":[\"BY\"],\"376\":[\"AD\"],\"377\":[\"MC\"],\"378\":[\"SM\"],\"380\":[\"UA\"],\"381\":[\"RS\"],\"382\":[\"ME\"],\"383\":[\"XK\"],\"385\":[\"HR\"],\"386\":[\"SI\"],\"387\":[\"BA\"],\"389\":[\"MK\"],\"420\":[\"CZ\"],\"421\":[\"SK\"],\"423\":[\"LI\"],\"500\":[\"FK\"],\"501\":[\"BZ\"],\"502\":[\"GT\"],\"503\":[\"SV\"],\"504\":[\"HN\"],\"505\":[\"NI\"],\"506\":[\"CR\"],\"507\":[\"PA\"],\"508\":[\"PM\"],\"509\":[\"HT\"],\"590\":[\"GP\",\"BL\",\"MF\"],\"591\":[\"BO\"],\"592\":[\"GY\"],\"593\":[\"EC\"],\"594\":[\"GF\"],\"595\":[\"PY\"],\"596\":[\"MQ\"],\"597\":[\"SR\"],\"598\":[\"UY\"],\"599\":[\"CW\",\"BQ\"],\"670\":[\"TL\"],\"672\":[\"NF\"],\"673\":[\"BN\"],\"674\":[\"NR\"],\"675\":[\"PG\"],\"676\":[\"TO\"],\"677\":[\"SB\"],\"678\":[\"VU\"],\"679\":[\"FJ\"],\"680\":[\"PW\"],\"681\":[\"WF\"],\"682\":[\"CK\"],\"683\":[\"NU\"],\"685\":[\"WS\"],\"686\":[\"KI\"],\"687\":[\"NC\"],\"688\":[\"TV\"],\"689\":[\"PF\"],\"690\":[\"TK\"],\"691\":[\"FM\"],\"692\":[\"MH\"],\"850\":[\"KP\"],\"852\":[\"HK\"],\"853\":[\"MO\"],\"855\":[\"KH\"],\"856\":[\"LA\"],\"880\":[\"BD\"],\"886\":[\"TW\"],\"960\":[\"MV\"],\"961\":[\"LB\"],\"962\":[\"JO\"],\"963\":[\"SY\"],\"964\":[\"IQ\"],\"965\":[\"KW\"],\"966\":[\"SA\"],\"967\":[\"YE\"],\"968\":[\"OM\"],\"970\":[\"PS\"],\"971\":[\"AE\"],\"972\":[\"IL\"],\"973\":[\"BH\"],\"974\":[\"QA\"],\"975\":[\"BT\"],\"976\":[\"MN\"],\"977\":[\"NP\"],\"992\":[\"TJ\"],\"993\":[\"TM\"],\"994\":[\"AZ\"],\"995\":[\"GE\"],\"996\":[\"KG\"],\"998\":[\"UZ\"]},\"countries\":{\"AC\":[\"247\",\"00\",\"(?:[01589]\\\\d|[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,[[\"(?:(?:241|349)0\\\\d\\\\d|8(?:51(?:0(?:0[03-9]|[12479]\\\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\\\d|7[89]|9[0-4])|[34]\\\\d\\\\d)|91(?:(?:[0-58]\\\\d|6[0135-9])\\\\d|7(?:0[0-24-9]|[1-9]\\\\d)|9(?:[0-46-9]\\\\d|5[0-79]))))\\\\d{3}|(?:2(?:[0-26-9]\\\\d|3[0-8]|4[02-9]|5[0135-9])|3(?:[0-3589]\\\\d|4[0-578]|6[1-9]|7[0-35-9])|7(?:[013-57-9]\\\\d|2[0-8])|8(?:55|6[0-8]|[78]\\\\d|9[02-9]))\\\\d{6}\",[9]],[\"4(?:79[01]|83[0-36-9]|95[0-3])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\\\d{6}\",[9]],[\"180(?:0\\\\d{3}|2)\\\\d{3}\",[7,10]],[\"190[0-26]\\\\d{6}\",[10]],0,0,0,[\"163\\\\d{2,6}\",[5,6,7,8,9]],[\"14(?:5(?:1[0458]|[23][458])|71\\\\d)\\\\d{4}\",[9]],[\"13(?:00\\\\d{6}(?:\\\\d{2})?|45[0-4]\\\\d{3})|13\\\\d{4}\",[6,8,10,12]]],\"0011\"],\"AW\":[\"297\",\"00\",\"(?:[25-79]\\\\d\\\\d|800)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[25-9]\"]]]],\"AX\":[\"358\",\"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))\",\"2\\\\d{4,9}|35\\\\d{4,5}|(?:60\\\\d\\\\d|800)\\\\d{4,6}|7\\\\d{5,11}|(?:[14]\\\\d|3[0-46-9]|50)\\\\d{4,8}\",[5,6,7,8,9,10,11,12],0,\"0\",0,0,0,0,\"18\",0,\"00\"],\"AZ\":[\"994\",\"00\",\"365\\\\d{6}|(?:[124579]\\\\d|60|88)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"90\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[28]|2|365|46\",\"1[28]|2|365[45]|46\",\"1[28]|2|365(?:4|5[02])|46\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[13-9]\"],\"0$1\"]],\"0\"],\"BA\":[\"387\",\"00\",\"6\\\\d{8}|(?:[35689]\\\\d|49|70)\\\\d{6}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6[1-3]|[7-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2-$3\",[\"[3-5]|6[56]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"6\"],\"0$1\"]],\"0\"],\"BB\":[\"1\",\"011\",\"(?:246|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"246$1\",0,\"246\"],\"BD\":[\"880\",\"00\",\"[1-469]\\\\d{9}|8[0-79]\\\\d{7,8}|[2-79]\\\\d{8}|[2-9]\\\\d{7}|[3-9]\\\\d{6}|[57-9]\\\\d{5}\",[6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1-$2\",[\"31[5-8]|[459]1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1-$2\",[\"3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|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\",\"[024-7]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[024-7]\"]]]],\"BG\":[\"359\",\"00\",\"00800\\\\d{7}|[2-7]\\\\d{6,7}|[89]\\\\d{6,8}|2\\\\d{5}\",[6,7,8,9,12],[[\"(\\\\d)(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"43[1-6]|70[1-9]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"(?:70|8)0\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3\",[\"43[1-7]|7\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[48]|9[08]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\"],\"BH\":[\"973\",\"00\",\"[136-9]\\\\d{7}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[13679]|8[02-4679]\"]]]],\"BI\":[\"257\",\"00\",\"(?:[267]\\\\d|31)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2367]\"]]]],\"BJ\":[\"229\",\"00\",\"(?:01\\\\d|8)\\\\d{7}\",[8,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"0\"]]]],\"BL\":[\"590\",\"00\",\"7090\\\\d{5}|(?:[56]9|[89]\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[[\"(?:59(?:0(?:2[7-9]|3[3-7]|5[12]|87)|87\\\\d)|80[6-9]\\\\d\\\\d)\\\\d{4}\"],[\"(?:69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\\\d{4}\"],[\"80[0-5]\\\\d{6}\"],[\"8[129]\\\\d{7}\"],0,0,0,0,[\"9(?:(?:39[5-7]|76[018])\\\\d|475[0-6])\\\\d{4}\"]]],\"BM\":[\"1\",\"011\",\"(?:441|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"441$1\",0,\"441\"],\"BN\":[\"673\",\"00\",\"[2-578]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-578]\"]]]],\"BO\":[\"591\",\"00(?:1\\\\d)?\",\"(?:[2-7]\\\\d\\\\d|8001)\\\\d{5}\",[8,9],[[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"[23]|4[46]|50\"]],[\"(\\\\d{8})\",\"$1\",[\"[5-7]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]],\"0\",0,\"0(1\\\\d)?\"],\"BQ\":[\"599\",\"00\",\"(?:[34]1|7\\\\d)\\\\d{5}\",[7],0,0,0,0,0,0,\"[347]\"],\"BR\":[\"55\",\"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)\",\"[1-467]\\\\d{9,10}|55[0-46-9]\\\\d{8}|[34]\\\\d{7}|55\\\\d{7,8}|(?:5[0-46-9]|[89]\\\\d)\\\\d{7,9}\",[8,9,10,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"300|4(?:0[02]|37|86)\",\"300|4(?:0(?:0|20)|370|864)\"]],[\"(\\\\d{3})(\\\\d{2,3})(\\\\d{4})\",\"$1 $2 $3\",[\"(?:[358]|90)0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2-$3\",[\"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]\"],\"($1)\"],[\"(\\\\d{2})(\\\\d{5})(\\\\d{4})\",\"$1 $2-$3\",[\"[16][1-9]|[2-57-9]\"],\"($1)\"]],\"0\",0,\"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\\\d{10,11}))?\",\"$2\"],\"BS\":[\"1\",\"011\",\"(?:242|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([3-8]\\\\d{6})$|1\",\"242$1\",0,\"242\"],\"BT\":[\"975\",\"00\",\"[178]\\\\d{7}|[2-8]\\\\d{6}\",[7,8],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-6]|7[246]|8[2-4]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[67]|[78]\"]]]],\"BW\":[\"267\",\"00\",\"(?: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]|3[23]|44|66|77|88)|6(?:22|33))[2-9]\\\\d{6}\",[10]],0,[\"310\\\\d{4}\",[7]],0,[\"600[2-9]\\\\d{6}\",[10]]]],\"CC\":[\"61\",\"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011\",\"1(?:[0-79]\\\\d{8}(?:\\\\d{2})?|8[0-24-9]\\\\d{7})|[148]\\\\d{8}|1\\\\d{5,7}\",[6,7,8,9,10,12],0,\"0\",0,\"([59]\\\\d{7})$|0\",\"8$1\",0,0,[[\"8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\\\d|70[23]|959))\\\\d{3}\",[9]],[\"4(?:79[01]|83[0-36-9]|95[0-3])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\\\d{6}\",[9]],[\"180(?:0\\\\d{3}|2)\\\\d{3}\",[7,10]],[\"190[0-26]\\\\d{6}\",[10]],0,0,0,0,[\"14(?:5(?:1[0458]|[23][458])|71\\\\d)\\\\d{4}\",[9]],[\"13(?:00\\\\d{6}(?:\\\\d{2})?|45[0-4]\\\\d{3})|13\\\\d{4}\",[6,8,10,12]]],\"0011\"],\"CD\":[\"243\",\"00\",\"(?:(?:[189]|5\\\\d)\\\\d|2)\\\\d{7}|[1-68]\\\\d{6}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"88\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"[1-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"5\"],\"0$1\"]],\"0\"],\"CF\":[\"236\",\"00\",\"8776\\\\d{4}|(?:[27]\\\\d|61)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[26-8]\"]]]],\"CG\":[\"242\",\"00\",\"222\\\\d{6}|(?:0\\\\d|80)\\\\d{7}\",[9],[[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[02]\"]]]],\"CH\":[\"41\",\"00\",\"8\\\\d{11}|[2-9]\\\\d{8}\",[9,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8[047]|90\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-79]|81\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"8\"],\"0$1\"]],\"0\"],\"CI\":[\"225\",\"00\",\"[02]\\\\d{9}\",[10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d)(\\\\d{5})\",\"$1 $2 $3 $4\",[\"2\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"0\"]]]],\"CK\":[\"682\",\"00\",\"[2-578]\\\\d{4}\",[5],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"[2-578]\"]]]],\"CL\":[\"56\",\"(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0\",\"12300\\\\d{6}|6\\\\d{9,10}|[2-9]\\\\d{8}\",[9,10,11],[[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"219\",\"2196\"],\"($1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"60|809\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"44\"]],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2[1-36]\"],\"($1)\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"9(?:10|[2-9])\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-8]|[1-9])\"],\"($1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"60|8\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"60\"]]]],\"CM\":[\"237\",\"00\",\"[26]\\\\d{8}|88\\\\d{6,7}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"88\"]],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[26]|88\"]]]],\"CN\":[\"86\",\"00|1(?:[12]\\\\d|79)\\\\d\\\\d00\",\"(?:(?:1[03-689]|2\\\\d)\\\\d\\\\d|6)\\\\d{8}|1\\\\d{10}|[126]\\\\d{6}(?:\\\\d(?:\\\\d{2})?)?|86\\\\d{5,6}|(?:[3-579]\\\\d|8[0-57-9])\\\\d{5,9}\",[7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{5,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-36-9]|95[0-3])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|[58][0-24-9]|7[02-8]|9[0-47-9])\\\\d{6}\",[9]],[\"180(?:0\\\\d{3}|2)\\\\d{3}\",[7,10]],[\"190[0-26]\\\\d{6}\",[10]],0,0,0,0,[\"14(?:5(?:1[0458]|[23][458])|71\\\\d)\\\\d{4}\",[9]],[\"13(?:00\\\\d{6}(?:\\\\d{2})?|45[0-4]\\\\d{3})|13\\\\d{4}\",[6,8,10,12]]],\"0011\"],\"CY\":[\"357\",\"00\",\"(?:[279]\\\\d|[58]0)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[257-9]\"]]]],\"CZ\":[\"420\",\"00\",\"(?:[2-578]\\\\d|60)\\\\d{7}|9\\\\d{8,11}\",[9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-8]|9[015-7]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"96\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]]]],\"DE\":[\"49\",\"00\",\"[2579]\\\\d{5,14}|49(?:[34]0|69|8\\\\d)\\\\d\\\\d?|49(?:37|49|60|7[089]|9\\\\d)\\\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\\\d{1,8}|(?:1|[368]\\\\d|4[0-8])\\\\d{3,13}|49(?:[015]\\\\d|2[13]|31|[46][1-8])\\\\d{1,9}\",[4,5,6,7,8,9,10,11,12,13,14,15],[[\"(\\\\d{2})(\\\\d{3,13})\",\"$1 $2\",[\"3[02]|40|[68]9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,12})\",\"$1 $2\",[\"2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1\",\"2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2,11})\",\"$1 $2\",[\"[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]\",\"[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"138\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{2,10})\",\"$1 $2\",[\"3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,11})\",\"$1 $2\",[\"181\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{4,10})\",\"$1 $2 $3\",[\"1(?:3|80)|9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7,8})\",\"$1 $2\",[\"1[67]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7,12})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{6})\",\"$1 $2\",[\"185\",\"1850\",\"18500\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{7})\",\"$1 $2\",[\"18[68]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{7})\",\"$1 $2\",[\"15[1279]\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{6})\",\"$1 $2\",[\"15[03568]\",\"15(?:[0568]|3[13])\"],\"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,0,[[\"528[89]\\\\d{5}\"],[\"(?:6(?:[0-79]\\\\d|8[0-247-9])|7(?:[016-8]\\\\d|2[0-8]|5[0-5]))\\\\d{6}\"],[\"80[0-7]\\\\d{6}\"],[\"89\\\\d{7}\"],0,0,0,0,[\"(?:592(?:4[0-2]|93)|80[89]\\\\d\\\\d)\\\\d{4}\"]]],\"ER\":[\"291\",\"00\",\"[178]\\\\d{6}\",[7],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[178]\"],\"0$1\"]],\"0\"],\"ES\":[\"34\",\"00\",\"(?:400|[5-9]\\\\d\\\\d)\\\\d{6}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]00\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[4-9]\"]]]],\"ET\":[\"251\",\"00\",\"(?:11|[2-57-9]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-57-9]\"],\"0$1\"]],\"0\"],\"FI\":[\"358\",\"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))\",\"[1-35689]\\\\d{4}|7\\\\d{10,11}|(?:[124-7]\\\\d|3[0-46-9])\\\\d{8}|[1-9]\\\\d{5,8}\",[5,6,7,8,9,10,11,12],[[\"(\\\\d{5})\",\"$1\",[\"20[2-59]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1 $2\",[\"(?:[1-3]0|[68])0|70[07-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4,8})\",\"$1 $2\",[\"[14]|2[09]|50|7[135]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{6,10})\",\"$1 $2\",[\"7\"],\"0$1\"],[\"(\\\\d)(\\\\d{4,9})\",\"$1 $2\",[\"(?:19|[2568])[1-8]|3(?:0[1-9]|[1-9])|9\"],\"0$1\"]],\"0\",0,0,0,0,\"1[03-79]|[2-9]\",0,\"00\"],\"FJ\":[\"679\",\"0(?:0|52)\",\"45\\\\d{5}|(?:0800\\\\d|[235-9])\\\\d{6}\",[7,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[235-9]|45\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"0\"]]],0,0,0,0,0,0,0,\"00\"],\"FK\":[\"500\",\"00\",\"[2-7]\\\\d{4}\",[5]],\"FM\":[\"691\",\"00\",\"(?:[39]\\\\d\\\\d|820)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[389]\"]]]],\"FO\":[\"298\",\"00\",\"[2-9]\\\\d{5}\",[6],[[\"(\\\\d{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|180020\",0,0,0,[[\"(?:1(?:1(?:3(?:[0-58]\\\\d\\\\d|73[0-5])|4(?:(?:[0-5]\\\\d|70)\\\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\\\d|6(?:[0-4]\\\\d|5[01]))\\\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\\\d)\\\\d|1(?:[0-7]\\\\d|8[0-3]))|(?:3(?:0\\\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\\\d)\\\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\\\d{3})\\\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\\\d)|76\\\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\\\d|7[4-79])|295[5-7]|35[34]\\\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\\\d{3}\",[9,10]],[\"7(?:457[0-57-9]|700[01]|911[028])\\\\d{5}|7(?:[1-3]\\\\d\\\\d|4(?:[0-46-9]\\\\d|5[0-689])|5(?:0[0-8]|[13-9]\\\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\\\d|8[02-9]|9[0-689])|8(?:[014-9]\\\\d|[23][0-8])|9(?:[024-9]\\\\d|1[02-9]|3[0-689]))\\\\d{6}\",[10]],[\"80[08]\\\\d{7}|800\\\\d{6}|8001111\"],[\"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\\\d|8[2-49]))\\\\d{7}|845464\\\\d\",[7,10]],[\"70\\\\d{8}\",[10]],0,[\"(?:3[0347]|55)\\\\d{8}\",[10]],[\"76(?:464|652)\\\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\\\d{6}\",[10]],[\"56\\\\d{8}\",[10]]],0,\" x\"],\"GD\":[\"1\",\"011\",\"(?:473|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"473$1\",0,\"473\"],\"GE\":[\"995\",\"00\",\"(?:[3-57]\\\\d\\\\d|800)\\\\d{6}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"70\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"32\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[57]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[348]\"],\"0$1\"]],\"0\"],\"GF\":[\"594\",\"00\",\"(?:694\\\\d|7093)\\\\d{5}|(?:59|[89]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-7]|80[6-9]|9[47]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[89]\"],\"0$1\"]],\"0\"],\"GG\":[\"44\",\"00\",\"(?:1481|[357-9]\\\\d{3})\\\\d{6}|8\\\\d{6}(?:\\\\d{2})?\",[7,9,10],0,\"0\",0,\"([25-9]\\\\d{5})$|0|180020\",\"1481$1\",0,0,[[\"1481[25-9]\\\\d{5}\",[10]],[\"7(?:(?:781|839)\\\\d|911[17])\\\\d{5}\",[10]],[\"80[08]\\\\d{7}|800\\\\d{6}|8001111\"],[\"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\\\d|8[0-3]))\\\\d{7}|845464\\\\d\",[7,10]],[\"70\\\\d{8}\",[10]],0,[\"(?:3[0347]|55)\\\\d{8}\",[10]],[\"76(?:464|652)\\\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\\\d{6}\",[10]],[\"56\\\\d{8}\",[10]]]],\"GH\":[\"233\",\"00\",\"[235]\\\\d{8}|800\\\\d{5,6}\",[8,9],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2358]\"],\"0$1\"]],\"0\"],\"GI\":[\"350\",\"00\",\"(?:[25]\\\\d|60)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"2\"]]]],\"GL\":[\"299\",\"00\",\"(?:19|[2-689]\\\\d|70)\\\\d{4}\",[6],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"19|[2-9]\"]]]],\"GM\":[\"220\",\"00\",\"[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\",\"7090\\\\d{5}|(?:[56]9|[89]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-79]|80[6-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[[\"(?:59(?:0(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\\\d)|87\\\\d)|80[6-9]\\\\d\\\\d)\\\\d{4}\"],[\"(?:69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\\\d{4}\"],[\"80[0-5]\\\\d{6}\"],[\"8[129]\\\\d{7}\"],0,0,0,0,[\"9(?:(?:39[5-7]|76[018])\\\\d|475[0-6])\\\\d{4}\"]]],\"GQ\":[\"240\",\"00\",\"222\\\\d{6}|(?:3\\\\d|55|[89]0)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[235]\"]],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[89]\"]]]],\"GR\":[\"30\",\"00\",\"5005000\\\\d{3}|8\\\\d{9,11}|(?:[269]\\\\d|70)\\\\d{8}\",[10,11,12],[[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"21|7\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2689]\"]],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{5})\",\"$1 $2 $3\",[\"8\"]]]],\"GT\":[\"502\",\"00\",\"80\\\\d{6}|(?:1\\\\d{3}|[2-7])\\\\d{7}\",[8,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-8]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]]]],\"GU\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|671|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"671$1\",0,\"671\"],\"GW\":[\"245\",\"00\",\"[49]\\\\d{8}|4\\\\d{6}\",[7,9],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"40\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[49]\"]]]],\"GY\":[\"592\",\"001\",\"(?:[2-8]\\\\d{3}|9008)\\\\d{3}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]]],\"HK\":[\"852\",\"00(?:30|5[09]|[126-9]?)\",\"8[0-46-9]\\\\d{6,7}|9\\\\d{4,7}|(?:[2-7]|9\\\\d{3})\\\\d{7}\",[5,6,7,8,9,11],[[\"(\\\\d{3})(\\\\d{2,5})\",\"$1 $2\",[\"900\",\"9003\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-7]|8[1-4]|9(?:0[1-9]|[1-8])\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]]],0,0,0,0,0,0,0,\"00\"],\"HN\":[\"504\",\"00\",\"8\\\\d{10}|[237-9]\\\\d{7}\",[8,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"[237-9]\"]]]],\"HR\":[\"385\",\"00\",\"[2-69]\\\\d{8}|80\\\\d{5,7}|[1-79]\\\\d{7}|6\\\\d{6}\",[7,8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"6[01]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"6|7[245]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-57]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\"],\"HT\":[\"509\",\"00\",\"[2-589]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-589]\"]]]],\"HU\":[\"36\",\"00\",\"[235-7]\\\\d{8}|[1-9]\\\\d{7}\",[8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"(06 $1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]\"],\"(06 $1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-9]\"],\"06 $1\"]],\"06\"],\"ID\":[\"62\",\"00[89]\",\"00[1-9]\\\\d{9,14}|(?:[1-36]|8\\\\d{5})\\\\d{6}|00\\\\d{9}|[1-9]\\\\d{8,10}|[2-9]\\\\d{7}\",[7,8,9,10,11,12,13,14,15,16,17],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"15\"]],[\"(\\\\d{2})(\\\\d{5,9})\",\"$1 $2\",[\"2[124]|[36]1\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5,7})\",\"$1 $2\",[\"800\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,8})\",\"$1 $2\",[\"[2-79]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{3})\",\"$1-$2-$3\",[\"8[1-35-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6,8})\",\"$1 $2\",[\"1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"804\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"80\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1-$2-$3\",[\"8\"],\"0$1\"]],\"0\"],\"IE\":[\"353\",\"00\",\"(?:1\\\\d|[2569])\\\\d{6,8}|4\\\\d{6,9}|7\\\\d{8}|8\\\\d{8,9}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"2[24-9]|47|58|6[237-9]|9[35-9]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[45]0\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2569]|4[1-69]|7[14]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"70\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"81\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"4\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"IL\":[\"972\",\"0(?:0|1[2-9])\",\"1\\\\d{6}(?:\\\\d{3,5})?|[57]\\\\d{8}|[1-489]\\\\d{7}\",[7,8,9,10,11,12],[[\"(\\\\d{4})(\\\\d{3})\",\"$1-$2\",[\"125\"]],[\"(\\\\d{4})(\\\\d{2})(\\\\d{2})\",\"$1-$2-$3\",[\"121\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[2-489]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[57]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3\",[\"12\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1-$2\",[\"159\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3-$4\",[\"1[7-9]\"]],[\"(\\\\d{3})(\\\\d{1,2})(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3-$4\",[\"15\"]]],\"0\"],\"IM\":[\"44\",\"00\",\"1624\\\\d{6}|(?:[3578]\\\\d|90)\\\\d{8}\",[10],0,\"0\",0,\"([25-8]\\\\d{5})$|0|180020\",\"1624$1\",0,\"74576|(?:16|7[56])24\"],\"IN\":[\"91\",\"00\",\"(?:000800|[2-9]\\\\d\\\\d)\\\\d{7}|1\\\\d{7,12}\",[8,9,10,11,12,13],[[\"(\\\\d{8})\",\"$1\",[\"5(?:0|2[23]|3[03]|[67]1|88)\",\"5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)\",\"5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)\"],0,1],[\"(\\\\d{4})(\\\\d{4,5})\",\"$1 $2\",[\"180\",\"1800\"],0,1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"140\"],0,1],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"11|2[02]|33|4[04]|79[1-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]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67)[14]\",\"1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31)|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]\",\"1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:3171|5[15][2-6]|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|8(?:16|2[014]|3[126]|6[136]|7[78]|83)(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|3[129]|5[29]|6[02-5]|70)|807\",\"1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7(?:[23569]|8[0-57-9])|8[1-6])|7(?:1(?:[013-8]|9[6-9])|3(?:17|2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]\",\"1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|8(?:28[235-7]|3))|73179|807(?:1|9[1-3])|(?:1552|6(?:(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578])\\\\d|7(?:[23569]\\\\d|8[0-57-9])|8(?:[14-6]\\\\d|2[0-79]))|7(?:1(?:[013-8]\\\\d|9[6-9])|3(?:2[0-49]|9[2-57])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\\\d|5[0-367])|70[13-7]))[2-7]\"],\"0$1\",1],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"16|[6-9]\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{2,4})(\\\\d{4})\",\"$1 $2 $3\",[\"18[06]\",\"18[06]0\"],0,1],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"18\"],0,1]],\"0\"],\"IO\":[\"246\",\"00\",\"3\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"3\"]]]],\"IQ\":[\"964\",\"00\",\"(?:1|7\\\\d\\\\d)\\\\d{7}|[2-6]\\\\d{7,8}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-6]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\"],\"IR\":[\"98\",\"00\",\"[1-9]\\\\d{9}|(?:[1-8]\\\\d\\\\d|9)\\\\d{3,4}\",[4,5,6,7,10],[[\"(\\\\d{4,5})\",\"$1\",[\"96\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4,5})\",\"$1 $2\",[\"(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-8]\"],\"0$1\"]],\"0\"],\"IS\":[\"354\",\"00|1(?:0(?:01|[12]0)|100)\",\"(?:38\\\\d|[4-9])\\\\d{6}\",[7,9],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[4-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"3\"]]],0,0,0,0,0,0,0,\"00\"],\"IT\":[\"39\",\"00\",\"0\\\\d{5,11}|1\\\\d{8,10}|3(?:[0-8]\\\\d{7,10}|9\\\\d{7,8})|(?:43|55|70)\\\\d{8}|8\\\\d{5}(?:\\\\d{2,4})?\",[6,7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1 $2\",[\"0[26]\"]],[\"(\\\\d{3})(\\\\d{3,6})\",\"$1 $2\",[\"0[13-57-9][0159]|8(?:03|4[17]|9[2-5])\",\"0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))\"]],[\"(\\\\d{4})(\\\\d{2,6})\",\"$1 $2\",[\"0(?:[13-579][2-46-8]|8[236-8])\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"894\"]],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"0[26]|5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"1(?:44|[679])|[378]|43\"]],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"0[13-57-9][0159]|14\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{5})\",\"$1 $2 $3\",[\"0[26]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"[03]\"]]],0,0,0,0,0,0,[[\"0(?:669[0-79]\\\\d{1,6}|831\\\\d{2,8})|0(?:1(?:[0159]\\\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\\\d\\\\d|3(?:[0159]\\\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\\\d|6[0-8])|7(?:[0159]\\\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\\\d|2[3-578]|3[2356]|[6-8][1-5])|9(?:[0159]\\\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\\\d{2,7}\"],[\"3[2-9]\\\\d{7,8}|(?:31|43)\\\\d{8}\",[9,10]],[\"80(?:0\\\\d{3}|3)\\\\d{3}\",[6,9]],[\"(?:0878\\\\d{3}|89(?:2\\\\d|3[04]|4(?:[0-4]|[5-9]\\\\d\\\\d)|5[0-4]))\\\\d\\\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\\\d{6}\",[6,8,9,10]],[\"1(?:78\\\\d|99)\\\\d{6}\",[9,10]],[\"3[2-8]\\\\d{9,10}\",[11,12]],0,0,[\"55\\\\d{8}\",[10]],[\"84(?:[08]\\\\d{3}|[17])\\\\d{3}\",[6,9]]]],\"JE\":[\"44\",\"00\",\"1534\\\\d{6}|(?:[3578]\\\\d|90)\\\\d{8}\",[10],0,\"0\",0,\"([0-24-8]\\\\d{5})$|0|180020\",\"1534$1\",0,0,[[\"1534[0-24-8]\\\\d{5}\"],[\"7(?:(?:(?:50|82)9|937)\\\\d|7(?:00[378]|97\\\\d))\\\\d{5}\"],[\"80(?:07(?:35|81)|8901)\\\\d{4}\"],[\"(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\\\d{4}\"],[\"701511\\\\d{4}\"],0,[\"(?:3(?:0(?:07(?:35|81)|8901)|3\\\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\\\d{4})\\\\d{4}\"],[\"76(?:464|652)\\\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\\\d{6}\"],[\"56\\\\d{8}\"]]],\"JM\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|658|900)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"658|876\"],\"JO\":[\"962\",\"00\",\"(?:(?:[2689]|7\\\\d)\\\\d|32|427|53)\\\\d{6}\",[8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2356]|87\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"70\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[47]\"],\"0$1\"]],\"0\"],\"JP\":[\"81\",\"010\",\"00[1-9]\\\\d{6,14}|[25-9]\\\\d{9}|(?:00|[1-9]\\\\d\\\\d)\\\\d{6}\",[8,9,10,11,12,13,14,15,16,17],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3\",[\"(?:12|57|99)0\"],\"0$1\"],[\"(\\\\d{4})(\\\\d)(\\\\d{4})\",\"$1-$2-$3\",[\"1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])\",\"1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]\",\"1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"60\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"3|4(?:2[09]|7[01])|6[1-9]\",\"3|4(?:2(?:0|9[02-69])|7(?:0[019]|1))|6[1-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])\",\"1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]\",\"1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1-$2-$3\",[\"[14]|[289][2-9]|5[3-9]|7[2-4679]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"800\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"[25-9]\"],\"0$1\"]],\"0\",0,\"(000[2569]\\\\d{4,6})$|(?:(?:003768)0?)|0\",\"$1\"],\"KE\":[\"254\",\"000\",\"(?:[17]\\\\d\\\\d|900)\\\\d{6}|(?:2|80)0\\\\d{6,7}|[4-6]\\\\d{6,8}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5,7})\",\"$1 $2\",[\"[24-6]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[17]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"]],\"0\"],\"KG\":[\"996\",\"00\",\"8\\\\d{9}|[235-9]\\\\d{8}\",[9,10],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"3(?:1[346]|[24-79])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[235-79]|88\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d)(\\\\d{2,3})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"KH\":[\"855\",\"00[14-9]\",\"1\\\\d{9}|[1-9]\\\\d{7,8}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"KI\":[\"686\",\"00\",\"(?:[37]\\\\d|6[0-79])\\\\d{6}|(?:[2-48]\\\\d|50)\\\\d{3}\",[5,8],0,\"0\"],\"KM\":[\"269\",\"00\",\"[3478]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[3478]\"]]]],\"KN\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"869$1\",0,\"869\"],\"KP\":[\"850\",\"00|99\",\"85\\\\d{6}|(?:19\\\\d|[2-7])\\\\d{7}\",[8,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"]],\"0\"],\"KR\":[\"82\",\"00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))\",\"00[1-9]\\\\d{8,11}|(?:[12]|5\\\\d{3})\\\\d{7}|[13-6]\\\\d{9}|(?:[1-6]\\\\d|80)\\\\d{7}|[3-6]\\\\d{4,5}|(?:00|7)0\\\\d{8}\",[5,6,8,9,10,11,12,13,14],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1-$2\",[\"(?:3[1-3]|[46][1-4]|5[1-5])1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"1\"]],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1-$2-$3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[36]0|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1-$2-$3\",[\"[1346]|5[1-5]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"[57]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})(\\\\d{4})\",\"$1-$2-$3\",[\"5\"],\"0$1\"]],\"0\",0,\"0(8(?:[1-46-8]|5\\\\d\\\\d))?\"],\"KW\":[\"965\",\"00\",\"18\\\\d{5}|(?:[2569]\\\\d|41)\\\\d{6}\",[7,8],[[\"(\\\\d{4})(\\\\d{3,4})\",\"$1 $2\",[\"[169]|2(?:[235]|4[1-35-9])|52\"]],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[245]\"]]]],\"KY\":[\"1\",\"011\",\"(?:345|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"345$1\",0,\"345\"],\"KZ\":[\"7\",\"810\",\"8\\\\d{13}|[78]\\\\d{9}\",[10,14],0,\"8\",0,0,0,0,\"7\",0,\"8~10\"],\"LA\":[\"856\",\"00\",\"[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\",[\"20\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,5})\",\"$1 $2 $3 $4\",[\"[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"80[01]|90[015]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"20\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,2})\",\"$1 $2 $3 $4 $5\",[\"20\"]]],0,0,\"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\\\d)\"],\"LV\":[\"371\",\"00\",\"(?:[268]\\\\d|78|90)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2679]|8[01]\"]]]],\"LY\":[\"218\",\"00\",\"[2-9]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{7})\",\"$1-$2\",[\"[2-9]\"],\"0$1\"]],\"0\"],\"MA\":[\"212\",\"00\",\"[5-8]\\\\d{8}\",[9],[[\"(\\\\d{4})(\\\\d{5})\",\"$1-$2\",[\"892\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1-$2\",[\"8(?:0[0-7]|9)\"],\"0$1\"],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[5-8]\"],\"0$1\"]],\"0\",0,0,0,0,\"[5-8]\"],\"MC\":[\"377\",\"00\",\"(?:[3489]|[67]\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"4\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[389]\"]],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[67]\"],\"0$1\"]],\"0\"],\"MD\":[\"373\",\"00\",\"(?:[235-7]\\\\d|[89]0)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"22|3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"[25-7]\"],\"0$1\"]],\"0\"],\"ME\":[\"382\",\"00\",\"(?:20|[3-79]\\\\d)\\\\d{6}|80\\\\d{6,7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-9]\"],\"0$1\"]],\"0\"],\"MF\":[\"590\",\"00\",\"7090\\\\d{5}|(?:[56]9|[89]\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[[\"(?:59(?:0(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)|87\\\\d)|80[6-9]\\\\d\\\\d)\\\\d{4}\"],[\"(?:69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5]))|7090[0-4])\\\\d{4}\"],[\"80[0-5]\\\\d{6}\"],[\"8[129]\\\\d{7}\"],0,0,0,0,[\"9(?:(?:39[5-7]|76[018])\\\\d|475[0-6])\\\\d{4}\"]]],\"MG\":[\"261\",\"00\",\"[23]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[23]\"],\"0$1\"]],\"0\",0,\"([24-9]\\\\d{6})$|0\",\"20$1\"],\"MH\":[\"692\",\"011\",\"329\\\\d{4}|(?:[256]\\\\d|45)\\\\d{5}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[2-6]\"]]],\"1\"],\"MK\":[\"389\",\"00\",\"[2-578]\\\\d{7}\",[8],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2|34[47]|4(?:[37]7|5[47]|64)\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[347]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[58]\"],\"0$1\"]],\"0\"],\"ML\":[\"223\",\"00\",\"[24-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24-9]\"]]]],\"MM\":[\"95\",\"00\",\"1\\\\d{5,7}|95\\\\d{6}|(?:[4-7]|9[0-46-9])\\\\d{6,8}|(?:2|8\\\\d)\\\\d{5,8}\",[6,7,8,9,10],[[\"(\\\\d)(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"16|2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"4(?:[2-46]|5[3-5])|5|6(?:[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-5]|(?:60|86)[23]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[12]|452|678|86\",\"[12]|452|6788|86\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[4-7]|8[1-35]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4,6})\",\"$1 $2 $3\",[\"9(?:2[0-4]|[35-9]|4[137-9])\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"92\"],\"0$1\"],[\"(\\\\d)(\\\\d{5})(\\\\d{4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\"],\"MN\":[\"976\",\"001\",\"[12]\\\\d{7,9}|[5-9]\\\\d{7}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"11|2[16]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[5-9]\"]],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"[12]2[1-3]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5,6})\",\"$1 $2\",[\"[12](?:27|3[2-8]|4[2-68]|5[1-4689])\",\"[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{4,5})\",\"$1 $2\",[\"[12]\"],\"0$1\"]],\"0\"],\"MO\":[\"853\",\"00\",\"0800\\\\d{3}|(?:28|[68]\\\\d)\\\\d{6}\",[7,8],[[\"(\\\\d{4})(\\\\d{3})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[268]\"]]]],\"MP\":[\"1\",\"011\",\"[58]\\\\d{9}|(?:67|90)0\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"670$1\",0,\"670\"],\"MQ\":[\"596\",\"00\",\"7091\\\\d{5}|(?:[56]9|[89]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-79]|8(?:0[6-9]|[36])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"MR\":[\"222\",\"00\",\"(?:[2-4]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-48]\"]]]],\"MS\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|664|900)\\\\d{7}\",[10],0,\"1\",0,\"([34]\\\\d{6})$|1\",\"664$1\",0,\"664\"],\"MT\":[\"356\",\"00\",\"3550\\\\d{4}|(?:[2579]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2357-9]\"]]]],\"MU\":[\"230\",\"0(?:0|[24-7]0|3[03])\",\"(?:[57]|8\\\\d\\\\d)\\\\d{7}|[2-468]\\\\d{6}\",[7,8,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-46]|8[013]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[57]\"]],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"8\"]]],0,0,0,0,0,0,0,\"020\"],\"MV\":[\"960\",\"0(?:0|19)\",\"(?:800|9[0-57-9]\\\\d)\\\\d{7}|[34679]\\\\d{6}\",[7,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[34679]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"]]],0,0,0,0,0,0,0,\"00\"],\"MW\":[\"265\",\"00\",\"(?:[1289]\\\\d|31|77)\\\\d{7}|1\\\\d{6}\",[7,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1[2-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[1-37-9]\"],\"0$1\"]],\"0\"],\"MX\":[\"52\",\"0[09]\",\"[2-9]\\\\d{9}\",[10],[[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"33|5[56]|81\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-9]\"]]],0,0,0,0,0,0,0,\"00\"],\"MY\":[\"60\",\"00\",\"1\\\\d{8,9}|(?:3\\\\d|[4-9])\\\\d{7}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3\",[\"[4-79]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1-$2 $3\",[\"1(?:[02469]|[378][1-9]|53)|8\",\"1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1-$2 $3\",[\"3\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1-$2-$3-$4\",[\"1(?:[367]|80)\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3\",[\"15\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2 $3\",[\"1\"],\"0$1\"]],\"0\"],\"MZ\":[\"258\",\"00\",\"(?:2|8\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2|8[2-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]]]],\"NA\":[\"264\",\"00\",\"[68]\\\\d{7,8}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"88\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"6\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"87\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\"],\"NC\":[\"687\",\"00\",\"(?:050|[2-57-9]\\\\d\\\\d)\\\\d{3}\",[6],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1.$2.$3\",[\"[02-57-9]\"]]]],\"NE\":[\"227\",\"00\",\"[027-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"08\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[089]|2[013]|7[0467]\"]]]],\"NF\":[\"672\",\"00\",\"[13]\\\\d{5}\",[6],[[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"1[0-3]\"]],[\"(\\\\d)(\\\\d{5})\",\"$1 $2\",[\"[13]\"]]],0,0,\"([0-258]\\\\d{4})$\",\"3$1\"],\"NG\":[\"234\",\"009\",\"(?:20|9\\\\d)\\\\d{8}|[78]\\\\d{9,13}\",[10,11,12,13,14],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[7-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"20[129]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})(\\\\d{5,6})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"]],\"0\"],\"NI\":[\"505\",\"00\",\"(?:1800|[25-8]\\\\d{3})\\\\d{4}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[125-8]\"]]]],\"NL\":[\"31\",\"00\",\"(?:[124-7]\\\\d\\\\d|3(?:[02-9]\\\\d|1[0-8]))\\\\d{6}|8\\\\d{6,9}|9\\\\d{6,10}|1\\\\d{4,5}\",[5,6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{4,7})\",\"$1 $2\",[\"[89]0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"66\"],\"0$1\"],[\"(\\\\d)(\\\\d{8})\",\"$1 $2\",[\"6\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1[16-8]|2[259]|3[124]|4[17-9]|5[124679]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-578]|91\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\"],\"NO\":[\"47\",\"00\",\"(?:0|[2-9]\\\\d{3})\\\\d{4}\",[5,8],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"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\",[\"30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1\",\"30|(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"64\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[2-8]|[2-7]|8[1-79]|9[145]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"8\"]]]],\"PM\":[\"508\",\"00\",\"[78]\\\\d{8}|[2-9]\\\\d{5}\",[6,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[2-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"7\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"PR\":[\"1\",\"011\",\"(?:[589]\\\\d\\\\d|787)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"787|939\"],\"PS\":[\"970\",\"00\",\"[2489]2\\\\d{6}|(?:1\\\\d|5)\\\\d{8}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2489]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"PT\":[\"351\",\"00\",\"1693\\\\d{5}|(?:[26-9]\\\\d|30)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2[12]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"16|[236-9]\"]]]],\"PW\":[\"680\",\"01[12]\",\"(?:[24-8]\\\\d\\\\d|345|900)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]]],\"PY\":[\"595\",\"00\",\"[36-8]\\\\d{5,8}|4\\\\d{6,8}|59\\\\d{6}|9\\\\d{5,10}|(?:2\\\\d|5[0-8])\\\\d{6,7}\",[6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{3,6})\",\"$1 $2\",[\"[2-9]0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"3[289]|4[246-8]|61|7[1-3]|8[1-36]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{4,5})\",\"$1 $2\",[\"2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"87\"]],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"9(?:[5-79]|8[1-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,[[\"2631[0-6]\\\\d{4}|26(?:2\\\\d|30|88)\\\\d{5}\"],[\"(?:69(?:2\\\\d\\\\d|3(?:[06][0-6]|1[0-3]|2[0-2]|3[0-39]|4\\\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))|7092[0-3])\\\\d{4}\"],[\"80\\\\d{7}\"],[\"89[1-37-9]\\\\d{6}\"],0,0,0,0,[\"9(?:399[0-3]|479[0-6]|76(?:2[278]|3[0-37]))\\\\d{4}\"],[\"8(?:1[019]|2[0156]|84|90)\\\\d{6}\"]]],\"RO\":[\"40\",\"00\",\"(?:[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,\"[3489]\",0,\"8~10\"],\"RW\":[\"250\",\"00\",\"(?:06|[27]\\\\d\\\\d|[89]00)\\\\d{6}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"0\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[7-9]\"],\"0$1\"]],\"0\"],\"SA\":[\"966\",\"00\",\"(?:[15]\\\\d|800|92)\\\\d{7}\",[9,10],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"9\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]],\"0\"],\"SB\":[\"677\",\"0[01]\",\"[6-9]\\\\d{6}|[1-6]\\\\d{4}\",[5,7],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"6[89]|7|8[4-9]|9(?:[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[013]|51|6\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[1-57]\"],\"(0$1)\"]],\"0\",0,0,0,0,0,0,\"00\"],\"SJ\":[\"47\",\"00\",\"0\\\\d{4}|(?:[489]\\\\d|79)\\\\d{6}\",[5,8],0,0,0,0,0,0,\"79\"],\"SK\":[\"421\",\"00\",\"[2-689]\\\\d{8}|[2-59]\\\\d{6}|[2-5]\\\\d{5}\",[6,7,9],[[\"(\\\\d)(\\\\d{2})(\\\\d{3,4})\",\"$1 $2 $3\",[\"21\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"[3-5][1-8]1\",\"[3-5][1-8]1[67]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[689]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[3-5]\"],\"0$1\"]],\"0\"],\"SL\":[\"232\",\"00\",\"(?:[237-9]\\\\d|66)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[236-9]\"],\"(0$1)\"]],\"0\"],\"SM\":[\"378\",\"00\",\"(?:0549|[5-7]\\\\d)\\\\d{6}\",[8,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-7]\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"0\"]]],0,0,\"([89]\\\\d{5})$\",\"0549$1\"],\"SN\":[\"221\",\"00\",\"(?:[378]\\\\d|93)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[379]\"]]]],\"SO\":[\"252\",\"00\",\"[346-9]\\\\d{8}|[12679]\\\\d{7}|[1-5]\\\\d{6}|[1348]\\\\d{5}\",[6,7,8,9],[[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"8[125]\"]],[\"(\\\\d{6})\",\"$1\",[\"[134]\"]],[\"(\\\\d)(\\\\d{6})\",\"$1 $2\",[\"[15]|2[0-79]|3[0-46-8]|4[0-7]\"]],[\"(\\\\d{2})(\\\\d{5,7})\",\"$1 $2\",[\"1|28|9[2-9]\"]],[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"[267]|904\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[346-9]\"]]],\"0\"],\"SR\":[\"597\",\"00\",\"(?:[2-5]|[6-9]\\\\d)\\\\d{5}\",[6,7],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1-$2-$3\",[\"56\"]],[\"(\\\\d{3})(\\\\d{3})\",\"$1-$2\",[\"[2-5]\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[6-9]\"]]]],\"SS\":[\"211\",\"00\",\"[19]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[19]\"],\"0$1\"]],\"0\"],\"ST\":[\"239\",\"00\",\"(?:22|9\\\\d)\\\\d{5}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[29]\"]]]],\"SV\":[\"503\",\"00\",\"[25-7]\\\\d{7}|(?:80\\\\d|900)\\\\d{4}(?:\\\\d{4})?\",[7,8,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[89]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[25-7]\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"]]]],\"SX\":[\"1\",\"011\",\"7215\\\\d{6}|(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"(5\\\\d{6})$|1\",\"721$1\",0,\"721\"],\"SY\":[\"963\",\"00\",\"[1-359]\\\\d{8}|[1-5]\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-4]|5[1-3]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[59]\"],\"0$1\",1]],\"0\"],\"SZ\":[\"268\",\"00\",\"0800\\\\d{4}|(?:[237]\\\\d|900)\\\\d{6}\",[8,9],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[0237]\"]],[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"9\"]]]],\"TA\":[\"290\",\"00\",\"8\\\\d{3}\",[4],0,0,0,0,0,0,\"8\"],\"TC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|649|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-479]\\\\d{6})$|1\",\"649$1\",0,\"649\"],\"TD\":[\"235\",\"00|16\",\"(?:22|[3689]\\\\d|77)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[236-9]\"]]],0,0,0,0,0,0,0,\"00\"],\"TG\":[\"228\",\"00\",\"[279]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[279]\"]]]],\"TH\":[\"66\",\"00[1-9]\",\"(?:001800|[2-57]|[689]\\\\d)\\\\d{7}|1\\\\d{7,9}\",[8,9,10,13],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[13-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"TJ\":[\"992\",\"810\",\"(?:[0-57-9]\\\\d|66)\\\\d{7}\",[9],[[\"(\\\\d{6})(\\\\d)(\\\\d{2})\",\"$1 $2 $3\",[\"331\",\"3317\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"44[02-479]|[34]7\"]],[\"(\\\\d{4})(\\\\d)(\\\\d{4})\",\"$1 $2 $3\",[\"3(?:[1245]|3[12])\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"\\\\d\"]]],0,0,0,0,0,0,0,\"8~10\"],\"TK\":[\"690\",\"00\",\"[2-47]\\\\d{3,6}\",[4,5,6,7]],\"TL\":[\"670\",\"00\",\"7\\\\d{7}|(?:[2-47]\\\\d|[89]0)\\\\d{5}\",[7,8],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-489]|70\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"7\"]]]],\"TM\":[\"993\",\"810\",\"[1-7]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"12\"],\"(8 $1)\"],[\"(\\\\d{3})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"[1-5]\"],\"(8 $1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[67]\"],\"8 $1\"]],\"8\",0,0,0,0,0,0,\"8~10\"],\"TN\":[\"216\",\"00\",\"[2-57-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-57-9]\"]]]],\"TO\":[\"676\",\"00\",\"(?:0800|(?:[5-8]\\\\d\\\\d|999)\\\\d)\\\\d{3}|[2-8]\\\\d{4}\",[5,7],[[\"(\\\\d{2})(\\\\d{3})\",\"$1-$2\",[\"[2-4]|50|6[09]|7[0-24-69]|8[05]\"]],[\"(\\\\d{4})(\\\\d{3})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[5-9]\"]]]],\"TR\":[\"90\",\"00\",\"4\\\\d{6}|8\\\\d{11,12}|(?:[2-58]\\\\d\\\\d|900)\\\\d{7}\",[7,10,12,13],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"512|8[01589]|90\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"5[0-79]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24][1-8]|3[1-9]\"],\"(0$1)\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{6,7})\",\"$1 $2 $3\",[\"80\"],\"0$1\",1]],\"0\"],\"TT\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-46-8]\\\\d{6})$|1\",\"868$1\",0,\"868\"],\"TV\":[\"688\",\"00\",\"(?:2|7\\\\d\\\\d|90)\\\\d{4}\",[5,6,7],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"2\"]],[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"90\"]],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"7\"]]]],\"TW\":[\"886\",\"0(?:0[25-79]|19)\",\"[2-689]\\\\d{8}|7\\\\d{9,10}|[2-8]\\\\d{7}|2\\\\d{6}\",[7,8,9,10,11],[[\"(\\\\d{2})(\\\\d)(\\\\d{4})\",\"$1 $2 $3\",[\"202\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"826\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"83\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"82\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[25]0|37|49|8[09]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"[23568]|4(?:0[02-48]|[1-478])|7[1-9]\",\"[23568]|4(?:0[2-48]|[1-478])|(?:400|7)[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[49]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\",0,0,0,0,0,0,0,\"#\"],\"TZ\":[\"255\",\"00[056]\",\"(?:[25-8]\\\\d|41|90)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[24]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[67]\"],\"0$1\"]],\"0\"],\"UA\":[\"380\",\"00\",\"[89]\\\\d{9}|[3-9]\\\\d{8}\",[9,10],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]\",\"6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])\",\"3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[3-7]|89|9[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"]],\"0\",0,0,0,0,0,0,\"0~0\"],\"UG\":[\"256\",\"00[057]\",\"800\\\\d{6}|(?:[29]0|[347]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"202\",\"2024\"],\"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,[[\"(?:472[2-47-9]|983[2-57-9])\\\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[02469]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013-79]|3[0-24679]|4[167]|5[0-3]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-269])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[0-2478]|4[0378]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[0168]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-3589]|8[04-69]))[2-9]\\\\d{6}\"],[\"\"],[\"8(?:00|33|44|55|66|77|88)[2-9]\\\\d{6}\"],[\"900[2-9]\\\\d{6}\"],[\"52(?:3(?:[2-46-9][02-9]\\\\d|5(?:[02-46-9]\\\\d|5[0-46-9]))|4(?:[2-478][02-9]\\\\d|5(?:[034]\\\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\\\d)|9(?:[05-9]\\\\d|2[0-5]|49)))\\\\d{4}|52[34][2-9]1[02-9]\\\\d{4}|5(?:00|2[125-9]|3[23]|44|66|77|88)[2-9]\\\\d{6}\"]]],\"UY\":[\"598\",\"0(?:0|1[3-9]\\\\d)\",\"0004\\\\d{2,9}|[1249]\\\\d{7}|2\\\\d{3,4}|(?:[49]\\\\d|80)\\\\d{5}\",[4,5,6,7,8,9,10,11,12,13],[[\"(\\\\d{4,5})\",\"$1\",[\"21\"]],[\"(\\\\d{3})(\\\\d{3,4})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[49]0|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[124]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3 $4\",[\"0\"]]],\"0\",0,0,0,0,0,0,\"00\",\" int. \"],\"UZ\":[\"998\",\"00\",\"(?:20|33|[5-9]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[235-9]\"]]]],\"VA\":[\"39\",\"00\",\"0\\\\d{5,10}|3[0-8]\\\\d{7,10}|55\\\\d{8}|8\\\\d{5}(?:\\\\d{2,4})?|(?:1\\\\d|39)\\\\d{7,8}\",[6,7,8,9,10,11,12],0,0,0,0,0,0,\"06698\"],\"VC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|784|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"784$1\",0,\"784\"],\"VE\":[\"58\",\"00\",\"[68]00\\\\d{7}|(?:[24]\\\\d|[59]0)\\\\d{8}\",[10],[[\"(\\\\d{3})(\\\\d{7})\",\"$1-$2\",[\"[24-689]\"],\"0$1\"]],\"0\"],\"VG\":[\"1\",\"011\",\"(?:284|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-578]\\\\d{6})$|1\",\"284$1\",0,\"284\"],\"VI\":[\"1\",\"011\",\"[58]\\\\d{9}|(?:34|90)0\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"340$1\",0,\"340\"],\"VN\":[\"84\",\"00\",\"[12]\\\\d{9}|[135-9]\\\\d{8}|[16]\\\\d{6,7}|7\\\\d{6}\",[7,8,9,10],[[\"(\\\\d{4})(\\\\d{4,6})\",\"$1 $2\",[\"1(?:2[02]|[89])\"],0,1],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[26]|6\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[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\",\"(?:639\\\\d|7093)\\\\d{5}|(?:26|80|9\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[[\"26(?:89\\\\d|9(?:0[0-467]|15|5[0-4]|6\\\\d|[78]0))\\\\d{4}\"],[\"(?:639(?:0[0-79]|1[019]|[267]\\\\d|3[09]|40|5[05-9]|9[04-79])|7093[5-7])\\\\d{4}\"],[\"80\\\\d{7}\"],0,0,0,0,0,[\"9(?:(?:39|47)8[01]|769\\\\d)\\\\d{4}\"]]],\"ZA\":[\"27\",\"00\",\"[1-79]\\\\d{8}|8\\\\d{4,9}\",[5,6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1 $2\",[\"8[1-4]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"8[1-4]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"860\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\"],\"ZM\":[\"260\",\"00\",\"800\\\\d{6}|(?:21|[579]\\\\d|63)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[28]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"[579]\"],\"0$1\"]],\"0\"],\"ZW\":[\"263\",\"00\",\"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|5[12]\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"34\"]],[\"(\\\\d{2})(\\\\d{4,5})(\\\\d{5})\",\"$1 $2 $3\",[\"[1-35]\"]]],0,0,0,0,0,0,[0,[\"342\\\\d{4}|(?:337|49)\\\\d{6}|(?:3(?:2|47|7\\\\d{3})|5(?:0\\\\d{3}|2[0-2]))\\\\d{7}\",[7,8,9,10,12]],0,0,0,[\"348[57]\\\\d{7}\",[11]],0,0,[\"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\\\d{4}|6\\\\d{5,10})|(?:345\\\\d|9[89])\\\\d{6}|(?:10|2(?:3|85\\\\d)|3(?:[15]|[69]\\\\d\\\\d)|4[15-8]|51)\\\\d{8}\"]]],\"883\":[\"883\",0,\"(?:[1-4]\\\\d|51)\\\\d{6,10}\",[8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,8})\",\"$1 $2 $3\",[\"[14]|2[24-689]|3[02-689]|51[24-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"510\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"21\"]],[\"(\\\\d{4})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"51[13]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"[235]\"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,[\"(?:2(?:00\\\\d\\\\d|10)|(?:370[1-9]|51\\\\d0)\\\\d)\\\\d{7}|51(?:00\\\\d{5}|[24-9]0\\\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\\\d{5,9}\"]]],\"888\":[\"888\",0,\"\\\\d{11}\",[11],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\"]],0,0,0,0,0,0,[0,0,0,0,0,0,[\"\\\\d{11}\"]]],\"979\":[\"979\",0,\"[1359]\\\\d{8}\",[9],[[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[1359]\"]]],0,0,0,0,0,0,[0,0,0,[\"[1359]\\\\d{8}\"]]]}}","// Copy-pasted from:\n// https://github.com/substack/semver-compare/blob/master/index.js\n//\n// Inlining this function because some users reported issues with\n// importing from `semver-compare` in a browser with ES6 \"native\" modules.\n//\n// Fixes `semver-compare` not being able to compare versions with alpha/beta/etc \"tags\".\n// https://github.com/catamphetamine/libphonenumber-js/issues/381\nexport default function(a, b) {\n a = a.split('-')\n b = b.split('-')\n var pa = a[0].split('.')\n var pb = b[0].split('.')\n for (var i = 0; i < 3; i++) {\n var na = Number(pa[i])\n var nb = Number(pb[i])\n if (na > nb) return 1\n if (nb > na) return -1\n if (!isNaN(na) && isNaN(nb)) return 1\n if (isNaN(na) && !isNaN(nb)) return -1\n }\n if (a[1] && b[1]) {\n return a[1] > b[1] ? 1 : (a[1] < b[1] ? -1 : 0)\n }\n return !a[1] && b[1] ? 1 : (a[1] && !b[1] ? -1 : 0)\n}","const objectConstructor = {}.constructor;\n\nexport default function isObject(object) {\n return object !== undefined && object !== null && object.constructor === objectConstructor;\n}\n","const CALLING_CODE_REG_EXP = /^\\d+$/\n\nexport default function isCallingCode(string) {\n\treturn CALLING_CODE_REG_EXP.test(string)\n}\n","import compare from './tools/semver-compare.js'\nimport isObject from './helpers/isObject.js'\nimport isCallingCode from './helpers/isCallingCode.js'\n\n// Added \"possibleLengths\" and renamed\n// \"country_phone_code_to_countries\" to \"country_calling_codes\".\nconst V2 = '1.0.18'\n\n// Added \"idd_prefix\" and \"default_idd_prefix\".\nconst V3 = '1.2.0'\n\n// Moved `001` country code to \"nonGeographic\" section of metadata.\nconst V4 = '1.7.35'\n\nconst DEFAULT_EXT_PREFIX = ' ext. '\n\n/**\n * See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md\n */\nexport default class Metadata {\n\t/**\n\t * @param {object} metadata — Metadata JSON.\n\t */\n\tconstructor(metadata) {\n\t\tvalidateMetadata(metadata)\n\t\tthis.metadata = metadata\n\t\tsetVersion.call(this, metadata)\n\t}\n\n\tgetCountries() {\n\t\treturn Object.keys(this.metadata.countries).filter(_ => _ !== '001')\n\t}\n\n\tgetCountryMetadata(countryCode) {\n\t\treturn this.metadata.countries[countryCode]\n\t}\n\n\tnonGeographic() {\n\t\tif (this.v1 || this.v2 || this.v3) return\n\t\t// `nonGeographical` was a typo.\n\t\t// It's present in metadata generated from `1.7.35` to `1.7.37`.\n\t\t// The test case could be found by searching for \"nonGeographical\".\n\t\treturn this.metadata.nonGeographic || this.metadata.nonGeographical\n\t}\n\n\thasCountry(country) {\n\t\treturn this.getCountryMetadata(country) !== undefined\n\t}\n\n\thasCallingCode(callingCode) {\n\t\tif (this.getCountryCodesForCallingCode(callingCode)) {\n\t\t\treturn true\n\t\t}\n\t\tif (this.nonGeographic()) {\n\t\t\tif (this.nonGeographic()[callingCode]) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t} else {\n\t\t\t// A hacky workaround for old custom metadata (generated before V4).\n\t\t\tconst countryCodes = this.countryCallingCodes()[callingCode]\n\t\t\tif (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\n\tisNonGeographicCallingCode(callingCode) {\n\t\tif (this.nonGeographic()) {\n\t\t\treturn this.nonGeographic()[callingCode] ? true : false\n\t\t} else {\n\t\t\treturn this.getCountryCodesForCallingCode(callingCode) ? false : true\n\t\t}\n\t}\n\n\t// Deprecated.\n\tcountry(countryCode) {\n\t\treturn this.selectNumberingPlan(countryCode)\n\t}\n\n\t/**\n\t * Selects a telephone numbering plan based on either a country code or a calling code.\n\t * @param {string} argument — Country code or calling code.\n\t * @param {string} legacyArgumentCallingCode — Legacy argument: calling code, if the first argument is not passed.\n\t */\n\tselectNumberingPlan(argument, legacyArgumentCallingCode) {\n\t\tlet countryCode\n\t\tlet callingCode\n\t\tif (argument) {\n\t\t\tif (isCallingCode(argument)) {\n\t\t\t\tcallingCode = argument\n\t\t\t} else {\n\t\t\t\tcountryCode = argument\n\t\t\t}\n\t\t}\n\t\t// Previously, the signature of this method was: `.selectNumberingPlan(country, callingCode)`.\n\t\t// And if `country` argument wasn't passed, it looked into the second argument `callingCode`.\n\t\t// Now it's preferred to only pass either `country` or `callingCode` as the first argument.\n\t\tif (legacyArgumentCallingCode) {\n\t\t\tcallingCode = legacyArgumentCallingCode\n\t\t}\n\n\t\t// Select a telephone numbering plan.\n\t\tif (countryCode && countryCode !== '001') {\n\t\t\tconst countryMetadata = this.getCountryMetadata(countryCode)\n\t\t\tif (!countryMetadata) {\n\t\t\t\tthrow new Error(`Unknown country: ${countryCode}`)\n\t\t\t}\n\t\t\tthis.numberingPlan = new NumberingPlan(countryMetadata, this)\n\t\t} else if (callingCode) {\n\t\t\tif (!this.hasCallingCode(callingCode)) {\n\t\t\t\tthrow new Error(`Unknown calling code: ${callingCode}`)\n\t\t\t}\n\t\t\tthis.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this)\n\t\t} else {\n\t\t\tthis.numberingPlan = undefined\n\t\t}\n\n\t\treturn this\n\t}\n\n\tgetCountryCodesForCallingCode(callingCode) {\n\t\tconst countryCodes = this.countryCallingCodes()[callingCode]\n\t\tif (countryCodes) {\n\t\t\t// Metadata before V4 included \"non-geographic entity\" calling codes\n\t\t\t// inside `country_calling_codes` (for example, `\"881\":[\"001\"]`).\n\t\t\t// Now the semantics of `country_calling_codes` has changed:\n\t\t\t// it's specifically for \"countries\" now.\n\t\t\t// Older versions of custom metadata will simply skip parsing\n\t\t\t// \"non-geographic entity\" phone numbers with new versions\n\t\t\t// of this library: it's not considered a bug,\n\t\t\t// because such numbers are extremely rare,\n\t\t\t// and developers extremely rarely use custom metadata.\n\t\t\tif (countryCodes.length === 1 && countryCodes[0].length === 3) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn countryCodes\n\t\t}\n\t}\n\n\tgetCountryCodeForCallingCode(callingCode) {\n\t\tconst countryCodes = this.getCountryCodesForCallingCode(callingCode)\n\t\tif (countryCodes) {\n\t\t\treturn countryCodes[0]\n\t\t}\n\t}\n\n\tgetNumberingPlanMetadata(callingCode) {\n\t\t// If a calling code is specified, choose the telephone numbering plan\n\t\t// of the \"default\" country for this calling code.\n\t\t// For example, if calling code `1` is passed,\n\t\t// the telephone numbering plan of `US` will be selected.\n\t\tconst countryCode = this.getCountryCodeForCallingCode(callingCode)\n\t\tif (countryCode) {\n\t\t\treturn this.getCountryMetadata(countryCode)\n\t\t}\n\t\tif (this.nonGeographic()) {\n\t\t\tconst metadata = this.nonGeographic()[callingCode]\n\t\t\tif (metadata) {\n\t\t\t\treturn metadata\n\t\t\t}\n\t\t} else {\n\t\t\t// A hacky workaround for old custom metadata (generated before V4).\n\t\t\t// In that metadata, there was no concept of \"non-geographic\" metadata\n\t\t\t// so metadata for `001` country code was stored along with other countries.\n\t\t\t// The test case can be found by searching for:\n\t\t\t// \"should work around `nonGeographic` metadata not existing\".\n\t\t\tconst countryCodes = this.countryCallingCodes()[callingCode]\n\t\t\tif (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n\t\t\t\treturn this.metadata.countries['001']\n\t\t\t}\n\t\t}\n\t}\n\n\t// Deprecated.\n\tcountryCallingCode() {\n\t\treturn this.numberingPlan.callingCode()\n\t}\n\n\t// Deprecated.\n\tIDDPrefix() {\n\t\treturn this.numberingPlan.IDDPrefix()\n\t}\n\n\t// Deprecated.\n\tdefaultIDDPrefix() {\n\t\treturn this.numberingPlan.defaultIDDPrefix()\n\t}\n\n\t// Deprecated.\n\tnationalNumberPattern() {\n\t\treturn this.numberingPlan.nationalNumberPattern()\n\t}\n\n\t// Deprecated.\n\tpossibleLengths() {\n\t\treturn this.numberingPlan.possibleLengths()\n\t}\n\n\t// Deprecated.\n\tformats() {\n\t\treturn this.numberingPlan.formats()\n\t}\n\n\t// Deprecated.\n\tnationalPrefixForParsing() {\n\t\treturn this.numberingPlan.nationalPrefixForParsing()\n\t}\n\n\t// Deprecated.\n\tnationalPrefixTransformRule() {\n\t\treturn this.numberingPlan.nationalPrefixTransformRule()\n\t}\n\n\t// Deprecated.\n\tleadingDigits() {\n\t\treturn this.numberingPlan.leadingDigits()\n\t}\n\n\t// Deprecated.\n\thasTypes() {\n\t\treturn this.numberingPlan.hasTypes()\n\t}\n\n\t// Deprecated.\n\ttype(type) {\n\t\treturn this.numberingPlan.type(type)\n\t}\n\n\t// Deprecated.\n\text() {\n\t\treturn this.numberingPlan.ext()\n\t}\n\n\tcountryCallingCodes() {\n\t\tif (this.v1) return this.metadata.country_phone_code_to_countries\n\t\treturn this.metadata.country_calling_codes\n\t}\n\n\t// Deprecated.\n\tchooseCountryByCountryCallingCode(callingCode) {\n\t\treturn this.selectNumberingPlan(callingCode)\n\t}\n\n\thasSelectedNumberingPlan() {\n\t\treturn this.numberingPlan !== undefined\n\t}\n}\n\nclass NumberingPlan {\n\tconstructor(metadata, globalMetadataObject) {\n\t\tthis.globalMetadataObject = globalMetadataObject\n\t\tthis.metadata = metadata\n\t\tsetVersion.call(this, globalMetadataObject.metadata)\n\t}\n\n\tcallingCode() {\n\t\treturn this.metadata[0]\n\t}\n\n\t// When multiple countries share the same calling code,\n\t// all phone number formatting rules are included in the metadata\n\t// of the \"default\" country for that calling code.\n\t// Any other countries' metdata doesn't include any formatting rules.\n\t// Google developers said that such storage architecture was chosen for performance reasons.\n\t//\n\t// For example, for NANPA region (\"North American Numbering Plan Administration\",\n\t// which includes USA, Canada, Cayman Islands, Bahamas, etc) all formatting rules\n\t// are contained in the metadata of `US` country.\n\t//\n\t// This is not public API.\n\t//\n\t_getDefaultCountryMetadataForThisCallingCode() {\n\t\treturn this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())\n\t}\n\n\t// Deprecated.\n\tgetDefaultCountryMetadataForRegion() {\n\t\treturn this._getDefaultCountryMetadataForThisCallingCode()\n\t}\n\n\t// Is always present.\n\tIDDPrefix() {\n\t\tif (this.v1 || this.v2) return\n\t\treturn this.metadata[1]\n\t}\n\n\t// Is only present when a country supports multiple IDD prefixes.\n\tdefaultIDDPrefix() {\n\t\tif (this.v1 || this.v2) return\n\t\treturn this.metadata[12]\n\t}\n\n\tnationalNumberPattern() {\n\t\tif (this.v1 || this.v2) return this.metadata[1]\n\t\treturn this.metadata[2]\n\t}\n\n\t// \"possible length\" data is always present in Google's metadata.\n\tpossibleLengths() {\n\t\tif (this.v1) return\n\t\treturn this.metadata[this.v2 ? 2 : 3]\n\t}\n\n\t_getFormats(metadata) {\n\t\treturn metadata[this.v1 ? 2 : this.v2 ? 3 : 4]\n\t}\n\n\t// For countries of the same region (e.g. NANPA)\n\t// formats are all stored in the \"main\" country for that region.\n\t// E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\tformats() {\n\t\tconst formats = this._getFormats(this.metadata) || this._getFormats(this._getDefaultCountryMetadataForThisCallingCode()) || []\n\t\treturn formats.map(_ => new Format(_, this))\n\t}\n\n\tnationalPrefix() {\n\t\treturn this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5]\n\t}\n\n\t_getNationalPrefixFormattingRule(metadata) {\n\t\treturn metadata[this.v1 ? 4 : this.v2 ? 5 : 6]\n\t}\n\n\t// For countries of the same region (e.g. NANPA)\n\t// national prefix formatting rule is stored in the \"main\" country for that region.\n\t// E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\tnationalPrefixFormattingRule() {\n\t\treturn this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this._getDefaultCountryMetadataForThisCallingCode())\n\t}\n\n\t_nationalPrefixForParsing() {\n\t\treturn this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7]\n\t}\n\n\tnationalPrefixForParsing() {\n\t\t// If `national_prefix_for_parsing` is not set explicitly,\n\t\t// then infer it from `national_prefix` (if any)\n\t\treturn this._nationalPrefixForParsing() || this.nationalPrefix()\n\t}\n\n\tnationalPrefixTransformRule() {\n\t\treturn this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8]\n\t}\n\n\t_getNationalPrefixIsOptionalWhenFormatting() {\n\t\treturn !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9]\n\t}\n\n\t// For countries of the same region (e.g. NANPA)\n\t// \"national prefix is optional when formatting\" flag is\n\t// stored in the \"main\" country for that region.\n\t// E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\tnationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n\t\treturn this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) ||\n\t\t\tthis._getNationalPrefixIsOptionalWhenFormatting(this._getDefaultCountryMetadataForThisCallingCode())\n\t}\n\n\tleadingDigits() {\n\t\treturn this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10]\n\t}\n\n\ttypes() {\n\t\treturn this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11]\n\t}\n\n\thasTypes() {\n\t\t// Versions 1.2.0 - 1.2.4: can be `[]`.\n\t\t/* istanbul ignore next */\n\t\tif (this.types() && this.types().length === 0) {\n\t\t\treturn false\n\t\t}\n\t\t// Versions <= 1.2.4: can be `undefined`.\n\t\t// Version >= 1.2.5: can be `0`.\n\t\treturn !!this.types()\n\t}\n\n\ttype(type) {\n\t\tif (this.hasTypes() && getType(this.types(), type)) {\n\t\t\treturn new Type(getType(this.types(), type), this)\n\t\t}\n\t}\n\n\text() {\n\t\tif (this.v1 || this.v2) return DEFAULT_EXT_PREFIX\n\t\treturn this.metadata[13] || DEFAULT_EXT_PREFIX\n\t}\n}\n\nclass Format {\n\tconstructor(format, metadata) {\n\t\tthis._format = format\n\t\tthis.metadata = metadata\n\t}\n\n\tpattern() {\n\t\treturn this._format[0]\n\t}\n\n\tformat() {\n\t\treturn this._format[1]\n\t}\n\n\tleadingDigitsPatterns() {\n\t\treturn this._format[2] || []\n\t}\n\n\tnationalPrefixFormattingRule() {\n\t\treturn this._format[3] || this.metadata.nationalPrefixFormattingRule()\n\t}\n\n\tnationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n\t\treturn !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()\n\t}\n\n\tnationalPrefixIsMandatoryWhenFormattingInNationalFormat() {\n\t\t// National prefix is omitted if there's no national prefix formatting rule\n\t\t// set for this country, or when the national prefix formatting rule\n\t\t// contains no national prefix itself, or when this rule is set but\n\t\t// national prefix is optional for this phone number format\n\t\t// (and it is not enforced explicitly)\n\t\treturn this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()\n\t}\n\n\t// Checks whether national prefix formatting rule contains national prefix.\n\tusesNationalPrefix() {\n\t\treturn this.nationalPrefixFormattingRule() &&\n\t\t\t// Check that national prefix formatting rule is not a \"dummy\" one.\n\t\t\t!FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule())\n\t\t\t// In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`\n\t\t\t// when `national_prefix_formatting_rule` is not present.\n\t\t\t// So, `true` or `false` are returned explicitly here, so that\n\t\t\t// `0` number isn't returned.\n\t\t\t? true\n\t\t\t: false\n\t}\n\n\tinternationalFormat() {\n\t\treturn this._format[5] || this.format()\n\t}\n}\n\n/**\n * A pattern that is used to determine if the national prefix formatting rule\n * has the first group only, i.e., does not start with the national prefix.\n * Note that the pattern explicitly allows for unbalanced parentheses.\n */\nconst FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\\(?\\$1\\)?$/\n\nclass Type {\n\tconstructor(type, metadata) {\n\t\tthis.type = type\n\t\tthis.metadata = metadata\n\t}\n\n\tpattern() {\n\t\tif (this.metadata.v1) return this.type\n\t\treturn this.type[0]\n\t}\n\n\tpossibleLengths() {\n\t\tif (this.metadata.v1) return\n\t\treturn this.type[1] || this.metadata.possibleLengths()\n\t}\n}\n\nfunction getType(types, type) {\n\tswitch (type) {\n\t\tcase 'FIXED_LINE':\n\t\t\treturn types[0]\n\t\tcase 'MOBILE':\n\t\t\treturn types[1]\n\t\tcase 'TOLL_FREE':\n\t\t\treturn types[2]\n\t\tcase 'PREMIUM_RATE':\n\t\t\treturn types[3]\n\t\tcase 'PERSONAL_NUMBER':\n\t\t\treturn types[4]\n\t\tcase 'VOICEMAIL':\n\t\t\treturn types[5]\n\t\tcase 'UAN':\n\t\t\treturn types[6]\n\t\tcase 'PAGER':\n\t\t\treturn types[7]\n\t\tcase 'VOIP':\n\t\t\treturn types[8]\n\t\tcase 'SHARED_COST':\n\t\t\treturn types[9]\n\t}\n}\n\nexport function validateMetadata(metadata) {\n\tif (!metadata) {\n\t\tthrow new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.')\n\t}\n\n\t// `country_phone_code_to_countries` was renamed to `country_calling_codes` in `1.0.18`.\n\t// For that reason, it's not used in this detection algorithm.\n\t// Instead, it detects by `countries: {}` property existence.\n\tif (!isObject(metadata) || !isObject(metadata.countries)) {\n\t\tthrow 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 ${isObject(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + typeOf(metadata) + ': ' + metadata}.`)\n\t}\n}\n\n// Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n/* istanbul ignore next */\nconst typeOf = _ => typeof _\n\n/**\n * Returns extension prefix for a country.\n * @param {string} country\n * @param {object} metadata\n * @return {string?}\n * @example\n * // Returns \" ext. \"\n * getExtPrefix(\"US\")\n */\nexport function getExtPrefix(country, metadataJson) {\n\tconst metadata = new Metadata(metadataJson)\n\tif (metadata.hasCountry(country)) {\n\t\treturn metadata.selectNumberingPlan(country).ext()\n\t}\n\treturn DEFAULT_EXT_PREFIX\n}\n\n/**\n * Returns \"country calling code\" for a country.\n * Throws an error if the country doesn't exist or isn't supported by this library.\n * @param {string} country\n * @param {object} metadataJson\n * @return {string}\n * @example\n * // Returns \"44\"\n * getCountryCallingCode(\"GB\")\n */\nexport function getCountryCallingCode(country, metadataJson) {\n\tconst metadata = new Metadata(metadataJson)\n\tif (metadata.hasCountry(country)) {\n\t\treturn metadata.selectNumberingPlan(country).countryCallingCode()\n\t}\n\tthrow new Error(`Unknown country: ${country}`)\n}\n\n/**\n * Tells if a country code is supported.\n * @param {string} country\n * @param {object} metadataJson\n * @return {boolean}\n * @example\n * // Returns `true`\n * isSupportedCountry(\"GB\")\n */\nexport function isSupportedCountry(country, metadataJson) {\n\t// const metadata = new Metadata(metadataJson)\n\t// return metadata.hasCountry(country)\n\treturn metadataJson.countries.hasOwnProperty(country)\n}\n\n/**\n * Sets `v1`/`v2`/`v3`/`v4` properties on `this` object.\n * @param {object} metadata — Metadata JSON\n */\nfunction setVersion(metadata) {\n\tconst { version } = metadata\n\tif (typeof version === 'number') {\n\t\tthis.v1 = version === 1\n\t\tthis.v2 = version === 2\n\t\tthis.v3 = version === 3\n\t\tthis.v4 = version === 4\n\t} else {\n\t\tif (!version) {\n\t\t\tthis.v1 = true\n\t\t} else if (compare(version, V3) === -1) {\n\t\t\tthis.v2 = true\n\t\t} else if (compare(version, V4) === -1) {\n\t\t\tthis.v3 = true\n\t\t} else {\n\t\t\tthis.v4 = true\n\t\t}\n\t}\n}","/**\n * Merges two arrays.\n * @param {*} a\n * @param {*} b\n * @return {*}\n */\nexport default function mergeArrays(a, b) {\n\tconst merged = a.slice()\n\n\tfor (const element of b) {\n\t\tif (a.indexOf(element) < 0) {\n\t\t\tmerged.push(element)\n\t\t}\n\t}\n\n\treturn merged.sort((a, b) => a - b)\n\n\t// ES6 version, requires Set polyfill.\n\t// let merged = new Set(a)\n\t// for (const element of b) {\n\t// \tmerged.add(i)\n\t// }\n\t// return Array.from(merged).sort((a, b) => a - b)\n}","import Metadata from '../metadata.js'\nimport mergeArrays from './mergeArrays.js'\n\n/**\n * Checks phone number length against the phone numbering plan selected in metadata.\n * Optionally, it could be restrained by a specific country.\n * @param {string} nationalNumber\n * @param {string?} country — Specific country to use rather than the one that is pre-selected in the metadata instance.\n * @param {Metadata} metadata — Metadata instance with a selected numbering plan.\n * @returns {string}\n */\nexport default function checkNumberLength(nationalNumber, country, metadata) {\n\treturn checkNumberLengthForType(nationalNumber, undefined, country, metadata)\n}\n\n/**\n * Checks phone number length against the phone numbering plan selected in metadata.\n * Optionally, it could be restrained by a specific phone number type or a specific country.\n * @param {string} nationalNumber\n * @param {string?} type — Specific phone number type.\n * @param {string?} country — Specific country to use instead of the one that is pre-selected in the metadata instance.\n * @param {Metadata} metadata — Metadata instance with a selected numbering plan.\n * @returns {string} See the README on `validatePhoneNumberLength()` function, with an addition of a special case: when phone numbers of type `type` aren't possible in the telephone numbering plan, it will return \"INVALID_LENGTH\".\n */\n// Checks whether a number is possible for a certain `country` based on the number length.\n//\n// This function is not supported by metadata generated with ancient versions of\n// `libphonenumber-js` (before version `1.0.18`) which didn't include \"possible lengths\".\n//\n// There was also a known issue with `checkNumberLength()` function:\n// if a number is possible only in a certain `country` among several `countries`\n// that share the same \"country calling code\", that function would check\n// the possibility of the phone number only in the \"main\" `country` for the \"country calling code\"\n// and would not check if it's actually be possible in the speciifc `country`.\n//\n// For example, \"+1310xxxx\" numbers are valid in Canada.\n// However, they are not possible in the US due to being too short.\n// Since Canada and the US share the same country calling code — \"+1\" —\n// `checkNumberLength()` function used to return not \"IS_POSSIBLE\" for \"+1310xxxx\" numbers.\n//\n// In such cases, when using \"/max\" metadata, `isValid()` could output `true`\n// but at the same time `isPossible()` could output `false`, which was contradictory.\n//\n// See https://issuetracker.google.com/issues/335892662 for the discusson in Google's issues.\n//\n// The solution suggested by Google was implemented: an optional `country` argument\n// was added to `checkNumberLength()` function. If present, that `country` will be used\n// to check phone number length for that specific `country` rather than the \"main\" country\n// for the shared \"country calling code\".\n//\nexport function checkNumberLengthForType(nationalNumber, type, country, metadata) {\n\tif (country) {\n\t\t// If a specific `country` is specified, re-create a metadata instance with it.\n\t\tmetadata = new Metadata(metadata.metadata)\n\t\tmetadata.selectNumberingPlan(country)\n\t}\n\n\tconst type_info = metadata.type(type)\n\n\t// There should always be \"<possiblePengths/>\" set for every type element.\n\t// This is declared in the XML schema.\n\t// For size efficiency, where a sub-description (e.g. fixed-line)\n\t// has the same \"<possiblePengths/>\" as the \"general description\", this is missing,\n\t// so we fall back to the \"general description\". Where no numbers of the type\n\t// exist at all, there is one possible length (-1) which is guaranteed\n\t// not to match the length of any real phone number.\n\tlet possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths()\n\t// let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()\n\n\t// Metadata before version `1.0.18` didn't contain `possible_lengths`.\n\tif (!possible_lengths) {\n\t\treturn 'IS_POSSIBLE'\n\t}\n\n\tif (type === 'FIXED_LINE_OR_MOBILE') {\n\t\t// No such country in metadata.\n\t\t/* istanbul ignore next */\n\t\tif (!metadata.type('FIXED_LINE')) {\n\t\t\t// The rare case has been encountered where no fixedLine data is available\n\t\t\t// (true for some non-geographic entities), so we just check mobile.\n\t\t\treturn checkNumberLengthForType(nationalNumber, 'MOBILE', country, metadata)\n\t\t}\n\n\t\tconst mobile_type = metadata.type('MOBILE')\n\t\tif (mobile_type) {\n\t\t\t// Merge the mobile data in if there was any. \"Concat\" creates a new\n\t\t\t// array, it doesn't edit possible_lengths in place, so we don't need a copy.\n\t\t\t// Note that when adding the possible lengths from mobile, we have\n\t\t\t// to again check they aren't empty since if they are this indicates\n\t\t\t// they are the same as the general desc and should be obtained from there.\n\t\t\tpossible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths())\n\t\t\t// The current list is sorted; we need to merge in the new list and\n\t\t\t// re-sort (duplicates are okay). Sorting isn't so expensive because\n\t\t\t// the lists are very small.\n\n\t\t\t// if (local_lengths) {\n\t\t\t// \tlocal_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())\n\t\t\t// } else {\n\t\t\t// \tlocal_lengths = mobile_type.possibleLengthsLocal()\n\t\t\t// }\n\t\t}\n\t}\n\t// If the type doesn't exist then return 'INVALID_LENGTH'.\n\telse if (type && !type_info) {\n\t\treturn 'INVALID_LENGTH'\n\t}\n\n\tconst actual_length = nationalNumber.length\n\n\t// In `libphonenumber-js` all \"local-only\" formats are dropped for simplicity.\n\t// // This is safe because there is never an overlap beween the possible lengths\n\t// // and the local-only lengths; this is checked at build time.\n\t// if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)\n\t// {\n\t// \treturn 'IS_POSSIBLE_LOCAL_ONLY'\n\t// }\n\n\tconst minimum_length = possible_lengths[0]\n\n\tif (minimum_length === actual_length) {\n\t\treturn 'IS_POSSIBLE'\n\t}\n\n\tif (minimum_length > actual_length) {\n\t\treturn 'TOO_SHORT'\n\t}\n\n\tif (possible_lengths[possible_lengths.length - 1] < actual_length) {\n\t\treturn 'TOO_LONG'\n\t}\n\n\t// We skip the first element since we've already checked it.\n\treturn possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH'\n}","import Metadata from './metadata.js'\nimport checkNumberLength from './helpers/checkNumberLength.js'\n\n/**\n * Checks if a phone number is \"possible\" (basically just checks its length).\n *\n * isPossible(phoneNumberInstance, { ..., v2: true }, metadata)\n *\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\n *\n * @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: '...' }`.\n * @param {object} [options]\n * @param {object} metadataJson\n * @return {string}\n */\nexport default function isPossiblePhoneNumber(input, options, metadataJson) {\n\t/* istanbul ignore if */\n\tif (options === undefined) {\n\t\toptions = {}\n\t}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\tif (options.v2) {\n\t\tif (!input.countryCallingCode) {\n\t\t\tthrow new Error('Invalid phone number object passed')\n\t\t}\n\t\tmetadata.selectNumberingPlan(input.country || input.countryCallingCode)\n\t} else {\n\t\tif (!input.phone) {\n\t\t\treturn false\n\t\t}\n\t\tif (input.country) {\n\t\t\tif (!metadata.hasCountry(input.country)) {\n\t\t\t\tthrow new Error(`Unknown country: ${input.country}`)\n\t\t\t}\n\t\t\tmetadata.selectNumberingPlan(input.country)\n\t\t} else {\n\t\t\tif (!input.countryCallingCode) {\n\t\t\t\tthrow new Error('Invalid phone number object passed')\n\t\t\t}\n\t\t\tmetadata.selectNumberingPlan(input.countryCallingCode)\n\t\t}\n\t}\n\n\t// Old (legacy) metadata (< 1.0.18) had no \"possible length\" data.\n\t// So `isPossibleNumber()` function is supported only for non-legacy metadata.\n\tif (metadata.possibleLengths()) {\n\t\treturn isPossibleNumber(input.phone || input.nationalNumber, metadata)\n\t}\n\n\t// There was a bug in versions from `1.7.35` to `1.7.37` of `libphonenumber-js`\n\t// where \"possible_lengths\" property was missing from \"non-geographical\" numbering plans' metadata.\n\t// After that, the bug was noticed and fixed.\n\t// So for versions from `1.7.35` to `1.7.37`, just assume that all \"non=geotraphical\" numbers are possible.\n\t// The reason is that the bug was noticed relatively quickly (within a day or so)\n\t// and it's unlikely that anyone generated their custom metadata in that short time span.\n\t// And if they didn't generate any custom metadata then a follow-up package update would've silently fixed the bug.\n\tif (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {\n\t\treturn true\n\t}\n\n\t// `isPossibleNumber()` function is not supported.\n\tthrow new Error('Missing \"possibleLengths\" in metadata. Perhaps the metadata has been generated before v1.0.18.');\n}\n\n/**\n * Tells if a given national (significant) number is possible\n * @param {string} nationalNumber\n * @param {Metadata} metadata = Metadata instance with a pre-selected telephone numbering plan.\n * @returns {boolean}\n */\nexport function isPossibleNumber(nationalNumber, metadata) {\n\tswitch (checkNumberLength(nationalNumber, undefined, metadata)) {\n\t\tcase 'IS_POSSIBLE':\n\t\t\treturn true\n\t\t// This library ignores \"local-only\" phone numbers (for simplicity).\n\t\t// See the readme for more info on what are \"local-only\" phone numbers.\n\t\t// case 'IS_POSSIBLE_LOCAL_ONLY':\n\t\t// \treturn !isInternational\n\t\tdefault:\n\t\t\treturn false\n\t}\n}","/**\n * Checks whether the entire input sequence can be matched\n * against the regular expression.\n * @return {boolean}\n */\nexport default function matchesEntirely(text, regularExpressionText) {\n\t// If the assigning of the `''` default value is moved to the arguments above,\n\t// the code coverage would decrease for some weird reason.\n\ttext = text || ''\n\treturn new RegExp('^(?:' + regularExpressionText + ')$').test(text)\n}","import Metadata from '../metadata.js'\nimport matchesEntirely from './matchesEntirely.js'\n\nconst NON_FIXED_LINE_PHONE_TYPES = [\n\t'MOBILE',\n\t'PREMIUM_RATE',\n\t'TOLL_FREE',\n\t'SHARED_COST',\n\t'VOIP',\n\t'PERSONAL_NUMBER',\n\t'PAGER',\n\t'UAN',\n\t'VOICEMAIL'\n]\n\n// Finds out national phone number type (fixed line, mobile, etc)\nexport default function getNumberType(input, options, metadataJson)\n{\n\t// If assigning the `{}` default value is moved to the arguments above,\n\t// code coverage would decrease for some weird reason.\n\toptions = options || {}\n\n\t// When `parse()` returns an empty object — `{}` —\n\t// that means that the phone number is malformed,\n\t// so it can't possibly be valid.\n\tif (!input.country && !input.countryCallingCode) {\n\t\treturn\n\t}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\tmetadata.selectNumberingPlan(input.country || input.countryCallingCode)\n\n\tconst nationalNumber = options.v2 ? input.nationalNumber : input.phone\n\n\t// The following is copy-pasted from the original function:\n\t// https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835\n\n\t// Is this national number even valid for this country\n\tif (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {\n\t\treturn\n\t}\n\n\t// Is it fixed line number\n\tif (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {\n\t\t// Because duplicate regular expressions are removed\n\t\t// to reduce metadata size, if \"mobile\" pattern is \"\"\n\t\t// then it means it was removed due to being a duplicate of the fixed-line pattern.\n\t\t//\n\t\tif (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {\n\t\t\treturn 'FIXED_LINE_OR_MOBILE'\n\t\t}\n\n\t\t// `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.\n\t\t// For example, for \"US\" country.\n\t\t// Old metadata (< `1.0.18`) had a specific \"types\" data structure\n\t\t// that happened to be `undefined` for `MOBILE` in that case.\n\t\t// Newer metadata (>= `1.0.18`) has another data structure that is\n\t\t// not `undefined` for `MOBILE` in that case (it's just an empty array).\n\t\t// So this `if` is just for backwards compatibility with old metadata.\n\t\tif (!metadata.type('MOBILE')) {\n\t\t\treturn 'FIXED_LINE_OR_MOBILE'\n\t\t}\n\n\t\t// Check if the number happens to qualify as both fixed line and mobile.\n\t\t// (no such country in the minimal metadata set)\n\t\t/* istanbul ignore if */\n\t\tif (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {\n\t\t\treturn 'FIXED_LINE_OR_MOBILE'\n\t\t}\n\n\t\treturn 'FIXED_LINE'\n\t}\n\n\tfor (const type of NON_FIXED_LINE_PHONE_TYPES) {\n\t\tif (isNumberTypeEqualTo(nationalNumber, type, metadata)) {\n\t\t\treturn type\n\t\t}\n\t}\n}\n\nexport function isNumberTypeEqualTo(nationalNumber, type, metadata) {\n\tconst typeDefinition = metadata.type(type)\n\tif (!typeDefinition || !typeDefinition.pattern()) {\n\t\treturn false\n\t}\n\n\t// Check if any possible number lengths are present;\n\t// if so, we use them to avoid checking\n\t// the validation pattern if they don't match.\n\t// If they are absent, this means they match\n\t// the general description, which we have\n\t// already checked before a specific number type.\n\tif (\n\t\ttypeDefinition.possibleLengths() &&\n\t\ttypeDefinition.possibleLengths().indexOf(nationalNumber.length) < 0\n\t) {\n\t\treturn false\n\t}\n\n\treturn matchesEntirely(nationalNumber, typeDefinition.pattern())\n}","import Metadata from './metadata.js'\nimport matchesEntirely from './helpers/matchesEntirely.js'\nimport getNumberType from './helpers/getNumberType.js'\n\n/**\n * Checks if a given phone number is valid.\n *\n * isValid(phoneNumberInstance, { ..., v2: true }, metadata)\n *\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\n *\n * If the `number` is a string, it will be parsed to an object,\n * but only if it contains only valid phone number characters (including punctuation).\n * If the `number` is an object, it is used as is.\n *\n * The optional `defaultCountry` argument is the default country.\n * I.e. it does not restrict to just that country,\n * e.g. in those cases where several countries share\n * the same phone numbering rules (NANPA, Britain, etc).\n * For example, even though the number `07624 369230`\n * belongs to the Isle of Man (\"IM\" country code)\n * calling `isValidNumber('07624369230', 'GB', metadata)`\n * still returns `true` because the country is not restricted to `GB`,\n * it's just that `GB` is the default one for the phone numbering rules.\n * For restricting the country see `isValidNumberForRegion()`\n * though restricting a country might not be a good idea.\n * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion\n *\n * Examples:\n *\n * ```js\n * isValidNumber('+78005553535', metadata)\n * isValidNumber('8005553535', 'RU', metadata)\n * isValidNumber('88005553535', 'RU', metadata)\n * isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)\n * ```\n */\nexport default function isValidNumber(input, options, metadataJson)\n{\n\t// If assigning the `{}` default value is moved to the arguments above,\n\t// code coverage would decrease for some weird reason.\n\toptions = options || {}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\tmetadata.selectNumberingPlan(input.country || input.countryCallingCode)\n\n\t// By default, countries only have type regexps when it's required for\n\t// distinguishing different countries having the same `countryCallingCode`.\n\tif (metadata.hasTypes()) {\n\t\treturn getNumberType(input, options, metadata.metadata) !== undefined\n\t}\n\n\t// If there are no type regexps for this country in metadata then use\n\t// `nationalNumberPattern` as a \"better than nothing\" replacement.\n\tconst nationalNumber = options.v2 ? input.nationalNumber : input.phone\n\treturn matchesEntirely(nationalNumber, metadata.nationalNumberPattern())\n}","const COUNTRY_CODE_REG_EXP = /^[A-Z]{2}$/\n\nexport default function isCountryCode(string) {\n\treturn COUNTRY_CODE_REG_EXP.test(string)\n}\n","import Metadata from '../metadata.js'\nimport isCountryCode from './isCountryCode.js'\n\nconst USE_NON_GEOGRAPHIC_COUNTRY_CODE = false\n\nexport default function getCountryAndCallingCodeFromOneOfThem(countryOrCallingCode, metadataJson) {\n\tlet country\n\tlet callingCode\n\n\tconst metadata = new Metadata(metadataJson)\n\t// If country code is passed then derive `countryCallingCode` from it.\n\t// Also store the country code as `.country`.\n\tif (isCountryCode(countryOrCallingCode)) {\n\t\tcountry = countryOrCallingCode\n\t\tmetadata.selectNumberingPlan(country)\n\t\tcallingCode = metadata.countryCallingCode()\n\t} else {\n\t\tcallingCode = countryOrCallingCode\n\t\t/* istanbul ignore if */\n\t\tif (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n\t\t\tif (metadata.isNonGeographicCallingCode(callingCode)) {\n\t\t\t\tcountry = '001'\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\tcountry,\n\t\tcallingCode\n\t}\n}","import Metadata from '../metadata.js'\n\n/**\n * Returns a list of countries that the phone number could potentially belong to.\n * @param {string} callingCode — Calling code.\n * @param {string} nationalNumber — National (significant) number.\n * @param {object} metadata — Metadata.\n * @return {string[]} A list of possible countries.\n */\nexport default function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {\n\tconst _metadata = new Metadata(metadata)\n\tlet possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode)\n\tif (!possibleCountries) {\n\t\treturn []\n\t}\n\treturn possibleCountries.filter((country) => {\n\t\treturn couldNationalNumberBelongToCountry(nationalNumber, country, metadata)\n\t})\n}\n\nfunction couldNationalNumberBelongToCountry(nationalNumber, country, metadataJson) {\n\tconst metadata = new Metadata(metadataJson)\n\tmetadata.selectNumberingPlan(country)\n\treturn metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0\n}","// The minimum length of the national significant number.\nexport const MIN_LENGTH_FOR_NSN = 2\n\n// The ITU says the maximum length should be 15,\n// but one can find longer numbers in Germany.\nexport const MAX_LENGTH_FOR_NSN = 17\n\n// The maximum length of the country calling code.\nexport const MAX_LENGTH_COUNTRY_CODE = 3\n\n// Digits accepted in phone numbers\n// (ascii, fullwidth, arabic-indic, and eastern arabic digits).\nexport const VALID_DIGITS = '0-9\\uFF10-\\uFF19\\u0660-\\u0669\\u06F0-\\u06F9'\n\n// `DASHES` will be right after the opening square bracket of the \"character class\"\nconst DASHES = '-\\u2010-\\u2015\\u2212\\u30FC\\uFF0D'\nconst SLASHES = '\\uFF0F/'\nconst DOTS = '\\uFF0E.'\nexport const WHITESPACE = ' \\u00A0\\u00AD\\u200B\\u2060\\u3000'\nconst BRACKETS = '()\\uFF08\\uFF09\\uFF3B\\uFF3D\\\\[\\\\]'\n// export const OPENING_BRACKETS = '(\\uFF08\\uFF3B\\\\\\['\nconst TILDES = '~\\u2053\\u223C\\uFF5E'\n\n// Regular expression of acceptable punctuation found in phone numbers. This\n// excludes punctuation found as a leading character only. This consists of dash\n// characters, white space characters, full stops, slashes, square brackets,\n// parentheses and tildes. Full-width variants are also present.\nexport const VALID_PUNCTUATION = `${DASHES}${SLASHES}${DOTS}${WHITESPACE}${BRACKETS}${TILDES}`\n\nexport const PLUS_CHARS = '+\\uFF0B'\n// const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')","import Metadata from '../metadata.js'\nimport { VALID_DIGITS } from '../constants.js'\n\nconst CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])')\n\nexport default function stripIddPrefix(number, country, callingCode, metadataJson) {\n\tif (!country) {\n\t\treturn\n\t}\n\n\t// Get the IDD prefix pattern.\n\tconst metadata = new Metadata(metadataJson)\n\tmetadata.selectNumberingPlan(country || callingCode)\n\tconst IDDPrefixPattern = new RegExp(metadata.IDDPrefix())\n\n\t// Check if the number is IDD-prefixed.\n\tif (number.search(IDDPrefixPattern) !== 0) {\n\t\treturn\n\t}\n\n\t// Strip IDD prefix.\n\tnumber = number.slice(number.match(IDDPrefixPattern)[0].length)\n\n\t// If there're any digits after an IDD prefix,\n\t// then those digits are a country calling code.\n\t// Since no country code starts with a `0`,\n\t// the code below validates that the next digit (if present) is not `0`.\n\tconst matchedGroups = number.match(CAPTURING_DIGIT_PATTERN)\n\tif (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {\n\t\tif (matchedGroups[1] === '0') {\n\t\t\treturn\n\t\t}\n\t}\n\n\treturn number\n}","/**\n * Strips any national prefix (such as 0, 1) present in a\n * (possibly incomplete) number provided.\n * \"Carrier codes\" are only used in Colombia and Brazil,\n * and only when dialing within those countries from a mobile phone to a fixed line number.\n * Sometimes it won't actually strip national prefix\n * and will instead prepend some digits to the `number`:\n * for example, when number `2345678` is passed with `VI` country selected,\n * it will return `{ number: \"3402345678\" }`, because `340` area code is prepended.\n * @param {string} number — National number digits.\n * @param {object} metadata — Metadata with country selected.\n * @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.\n */\nexport default function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {\n\tif (number && metadata.numberingPlan.nationalPrefixForParsing()) {\n\t\t// See METADATA.md for the description of\n\t\t// `national_prefix_for_parsing` and `national_prefix_transform_rule`.\n\t\t// Attempt to parse the first digits as a national prefix.\n\t\tconst prefixPattern = new RegExp('^(?:' + metadata.numberingPlan.nationalPrefixForParsing() + ')')\n\t\tconst prefixMatch = prefixPattern.exec(number)\n\t\tif (prefixMatch) {\n\t\t\tlet nationalNumber\n\t\t\tlet carrierCode\n\t\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n\t\t\t// If a `national_prefix_for_parsing` has any \"capturing groups\"\n\t\t\t// then it means that the national (significant) number is equal to\n\t\t\t// those \"capturing groups\" transformed via `national_prefix_transform_rule`,\n\t\t\t// and nothing could be said about the actual national prefix:\n\t\t\t// what is it and was it even there.\n\t\t\t// If a `national_prefix_for_parsing` doesn't have any \"capturing groups\",\n\t\t\t// then everything it matches is a national prefix.\n\t\t\t// To determine whether `national_prefix_for_parsing` matched any\n\t\t\t// \"capturing groups\", the value of the result of calling `.exec()`\n\t\t\t// is looked at, and if it has non-undefined values where there're\n\t\t\t// \"capturing groups\" in the regular expression, then it means\n\t\t\t// that \"capturing groups\" have been matched.\n\t\t\t// It's not possible to tell whether there'll be any \"capturing gropus\"\n\t\t\t// before the matching process, because a `national_prefix_for_parsing`\n\t\t\t// could exhibit both behaviors.\n\t\t\tconst capturedGroupsCount = prefixMatch.length - 1\n\t\t\tconst hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount]\n\t\t\tif (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {\n\t\t\t\tnationalNumber = number.replace(\n\t\t\t\t\tprefixPattern,\n\t\t\t\t\tmetadata.nationalPrefixTransformRule()\n\t\t\t\t)\n\t\t\t\t// If there's more than one captured group,\n\t\t\t\t// then carrier code is the second one.\n\t\t\t\tif (capturedGroupsCount > 1) {\n\t\t\t\t\tcarrierCode = prefixMatch[1]\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If there're no \"capturing groups\",\n\t\t\t// or if there're \"capturing groups\" but no\n\t\t\t// `national_prefix_transform_rule`,\n\t\t\t// then just strip the national prefix from the number,\n\t\t\t// and possibly a carrier code.\n\t\t\t// Seems like there could be more.\n\t\t\telse {\n\t\t\t\t// `prefixBeforeNationalNumber` is the whole substring matched by\n\t\t\t\t// the `national_prefix_for_parsing` regular expression.\n\t\t\t\t// There seem to be no guarantees that it's just a national prefix.\n\t\t\t\t// For example, if there's a carrier code, it's gonna be a\n\t\t\t\t// part of `prefixBeforeNationalNumber` too.\n\t\t\t\tconst prefixBeforeNationalNumber = prefixMatch[0]\n\t\t\t\tnationalNumber = number.slice(prefixBeforeNationalNumber.length)\n\t\t\t\t// If there's at least one captured group,\n\t\t\t\t// then carrier code is the first one.\n\t\t\t\tif (hasCapturedGroups) {\n\t\t\t\t\tcarrierCode = prefixMatch[1]\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Tries to guess whether a national prefix was present in the input.\n\t\t\t// This is not something copy-pasted from Google's library:\n\t\t\t// they don't seem to have an equivalent for that.\n\t\t\t// So this isn't an \"officially approved\" way of doing something like that.\n\t\t\t// But since there seems no other existing method, this library uses it.\n\t\t\tlet nationalPrefix\n\t\t\tif (hasCapturedGroups) {\n\t\t\t\tconst possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1])\n\t\t\t\tconst possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup)\n\t\t\t\t// Example: an Argentinian (AR) phone number `0111523456789`.\n\t\t\t\t// `prefixMatch[0]` is `01115`, and `$1` is `11`,\n\t\t\t\t// and the rest of the phone number is `23456789`.\n\t\t\t\t// The national number is transformed via `9$1` to `91123456789`.\n\t\t\t\t// National prefix `0` is detected being present at the start.\n\t\t\t\t// if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {\n\t\t\t\tif (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {\n\t\t\t\t\tnationalPrefix = metadata.numberingPlan.nationalPrefix()\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnationalPrefix = prefixMatch[0]\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tnationalNumber,\n\t\t\t\tnationalPrefix,\n\t\t\t\tcarrierCode\n\t\t\t}\n\t\t}\n\t}\n return {\n \tnationalNumber: number\n }\n}","import Metadata from '../metadata.js'\nimport getNumberType from './getNumberType.js'\n\n/**\n * Returns the exact country that a given national (significant) number belongs to\n * in case of ambiguity, i.e. when multiple countries share the same \"country calling code\".\n * @param {string} [nationalNumber]\n * @param {string[]} countries — A list of countries that share the same calling code.\n * @param {object} metadata — Metadata JSON.\n * @returns {string?} Returns the exact country this number belongs to, or `undefined` if the exact country couldn't be determined.\n */\nexport default function getCountryByNationalNumber(nationalNumber, countries, metadataJson) {\n\t// Create a new `metadata` instance because it will be selecting a `country`.\n\tconst metadata = new Metadata(metadataJson)\n\n\t// const matchingCountries = []\n\n\tfor (const country of countries) {\n\t\tmetadata.selectNumberingPlan(country)\n\t\t// \"Leading digits\" patterns are only defined for about 20% of all countries.\n\t\t// By definition, matching \"leading digits\" is a sufficient but not a necessary\n\t\t// condition for a phone number to belong to a country.\n\t\t// The point of \"leading digits\" check is that it's the fastest one to get a match.\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits\n\t\t// I'd suppose that \"leading digits\" patterns are mutually exclusive for different countries\n\t\t// because of the intended use of that feature.\n\t\tif (metadata.leadingDigits()) {\n\t\t\tif (nationalNumber &&\n\t\t\t\tnationalNumber.search(metadata.leadingDigits()) === 0) {\n\t\t\t\treturn country\n\t\t\t}\n\t\t}\n\t\t// Else perform full validation with all of those\n\t\t// fixed-line/mobile/etc regular expressions.\n\t\telse if (getNumberType({ phone: nationalNumber, country }, undefined, metadata.metadata)) {\n\t\t\t// When multiple countries share the same \"country calling code\",\n\t\t\t// type patterns aren't guaranteed to be unique among them.\n\t\t\t// For example, both `US` and `CA` have the same pattern for `toll_free` numbers.\n\t\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417147572\n\t\t\t//\n\t\t\t// That means that this `if` condition could be `true` for multiple countries from the list.\n\t\t\t// Currently, it just returns the first one, which is also the \"main\" country for the \"country calling code\".\n\t\t\t// In an example with `toll_free` numbers above, `\"US\"` would be returned even though\n\t\t\t// it could as well be `\"CA\"`.\n\t\t\t//\n\t\t\t// There was also a time when this attempted to be overly smart\n\t\t\t// and kept track of all such multiple matching countries\n\t\t\t// and then picked the one that matched the `defaultCountry`, if provided.\n\t\t\t// For example, with `toll_free` numbers above, and with `defaultCountry: \"CA\"`,\n\t\t\t// it would've returned `\"CA\"` instead of `\"US\"`.\n\t\t\t// Later it turned out that such \"overly smart\" behavior turned out to be just confusing,\n\t\t\t// so this \"overly smart\" country detection was reverted to returning the \"main\" country\n\t\t\t// for the \"country calling code\".\n\t\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/154\n\t\t\t//\n\t\t\treturn country\n\t\t\t//\n\t\t\t// The \"overly smart\" behavior code:\n\t\t\t//\n\t\t\t// if (defaultCountry) {\n\t\t\t// \tif (country === defaultCountry) {\n\t\t\t// \t\treturn country\n\t\t\t// \t} else {\n\t\t\t// \t\tmatchingCountries.push(country)\n\t\t\t// \t}\n\t\t\t// } else {\n\t\t\t// \treturn country\n\t\t\t// }\n\t\t}\n\t}\n\n\t// // Return the first (\"main\") one of the `matchingCountries`.\n\t// if (matchingCountries.length > 0) {\n\t// \treturn matchingCountries[0]\n\t// }\n}","import getCountryByNationalNumber from './getCountryByNationalNumber.js'\n\nconst USE_NON_GEOGRAPHIC_COUNTRY_CODE = false\n\n/**\n * Returns the exact country that a given national (significant) number belongs to\n * in case of ambiguity, i.e. when multiple countries share the same \"country calling code\".\n * @param {string} [callingCode]\n * @param {string} [options.nationalNumber] — National (significant) number.\n * @param {Metadata} options.metadata — Metadata instance.\n * @returns {string?} Returns the most suitable country for this calling code and national (significant) number.\n */\nexport default function getCountryByCallingCode(callingCode, {\n\tnationalNumber,\n\tmetadata\n}) {\n\t/* istanbul ignore if */\n\tif (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n\t\tif (metadata.isNonGeographicCallingCode(callingCode)) {\n\t\t\treturn '001'\n\t\t}\n\t}\n\tconst possibleCountries = metadata.getCountryCodesForCallingCode(callingCode)\n\tif (!possibleCountries) {\n\t\treturn\n\t}\n\t// If there's just one country corresponding to the country code,\n\t// then just return it, without further phone number digits validation.\n\tif (possibleCountries.length === 1) {\n\t\treturn possibleCountries[0]\n\t}\n\treturn getCountryByNationalNumber(nationalNumber, possibleCountries, metadata.metadata)\n}","import extractNationalNumberFromPossiblyIncompleteNumber from './extractNationalNumberFromPossiblyIncompleteNumber.js'\nimport matchesEntirely from './matchesEntirely.js'\nimport checkNumberLength from './checkNumberLength.js'\nimport getCountryByCallingCode from './getCountryByCallingCode.js'\n\n/**\n * Strips national prefix and carrier code from a complete phone number.\n * The difference from the non-\"FromCompleteNumber\" function is that\n * it won't extract national prefix if the resultant number is too short\n * to be a complete number for the selected phone numbering plan.\n * @param {string} number — Complete phone number digits.\n * @param {string?} country — Specific country to use instead of the one that is pre-selected in the metadata instance.\n * @param {Metadata} metadata — Metadata instance with a selected numbering plan.\n * @return {object} `{ nationalNumber: string, carrierCode: string? }`.\n */\nexport default function extractNationalNumber(number, country, metadata) {\n\t// Parsing national prefixes and carrier codes\n\t// is only required for local phone numbers\n\t// but some people don't understand that\n\t// and sometimes write international phone numbers\n\t// with national prefixes (or maybe even carrier codes).\n\t// http://ucken.blogspot.ru/2016/03/trunk-prefixes-in-skype4b.html\n\t// Google's original library forgives such mistakes\n\t// and so does this library, because it has been requested:\n\t// https://github.com/catamphetamine/libphonenumber-js/issues/127\n\tconst {\n\t\tcarrierCode,\n\t\tnationalNumber\n\t} = extractNationalNumberFromPossiblyIncompleteNumber(\n\t\tnumber,\n\t\tmetadata\n\t)\n\n\tif (nationalNumber !== number) {\n\t\tif (!shouldHaveExtractedNationalPrefix(number, nationalNumber, metadata)) {\n\t\t\t// Don't strip the national prefix.\n\t\t\treturn { nationalNumber: number }\n\t\t}\n\t\t// Check the national (significant) number length after extracting national prefix and carrier code.\n\t\t// Legacy generated metadata (before `1.0.18`) didn't support the \"possible lengths\" feature,\n\t\t// so this `if` will only be executed with newer metadata.\n\t\tif (metadata.numberingPlan.possibleLengths()) {\n\t\t\t// If an exact `country` is not specified, attempt to detect it from the assumed national number.\n\t\t\tif (!country) {\n\t\t\t\tcountry = getCountryByCallingCode(metadata.numberingPlan.callingCode(), {\n\t\t\t\t\tnationalNumber,\n\t\t\t\t\tmetadata\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// The number remaining after stripping the national prefix and carrier code\n\t\t\t// should be long enough to have a possible length for the country.\n\t\t\t// Otherwise, don't strip the national prefix and carrier code,\n\t\t\t// since the original number could be a valid number.\n\t\t\t// This check has been copy-pasted \"as is\" from Google's original library:\n\t\t\t// https://github.com/google/libphonenumber/blob/876268eb1ad6cdc1b7b5bef17fc5e43052702d57/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3236-L3250\n\t\t\t// It doesn't check for the \"possibility\" of the original `number`.\n\t\t\t// I guess it's fine not checking that one. It works as is anyway.\n\t\t\tif (!isPossibleIncompleteNationalNumber(nationalNumber, country, metadata)) {\n\t\t\t\t// Don't strip the national prefix.\n\t\t\t\treturn { nationalNumber: number }\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { nationalNumber, carrierCode }\n}\n\n// In some countries, the same digit could be a national prefix\n// or a leading digit of a valid phone number.\n// For example, in Russia, national prefix is `8`,\n// and also `800 555 35 35` is a valid number\n// in which `8` is not a national prefix, but the first digit\n// of a national (significant) number.\n// Same's with Belarus:\n// `82004910060` is a valid national (significant) number,\n// but `2004910060` is not.\n// To support such cases (to prevent the code from always stripping\n// national prefix), a condition is imposed: a national prefix\n// is not extracted when the original number is \"viable\" and the\n// resultant number is not, a \"viable\" national number being the one\n// that matches `national_number_pattern`.\nfunction shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata) {\n\t// The equivalent in Google's code is:\n\t// https://github.com/google/libphonenumber/blob/e326fa1fc4283bb05eb35cb3c15c18f98a31af33/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L2969-L3004\n\tif (matchesEntirely(nationalNumberBefore, metadata.nationalNumberPattern()) &&\n\t\t!matchesEntirely(nationalNumberAfter, metadata.nationalNumberPattern())) {\n\t\treturn false\n\t}\n\t// This \"is possible\" national number (length) check has been commented out\n\t// because it's superceded by the (effectively) same check done in the\n\t// `extractNationalNumber()` function after it calls `shouldHaveExtractedNationalPrefix()`.\n\t// In other words, why run the same check twice if it could only be run once.\n\t// // Check the national (significant) number length after extracting national prefix and carrier code.\n\t// // Fixes a minor \"weird behavior\" bug: https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/57\n\t// // (Legacy generated metadata (before `1.0.18`) didn't support the \"possible lengths\" feature).\n\t// if (metadata.possibleLengths()) {\n\t// \tif (isPossibleIncompleteNationalNumber(nationalNumberBefore, metadata) &&\n\t// \t\t!isPossibleIncompleteNationalNumber(nationalNumberAfter, metadata)) {\n\t// \t\treturn false\n\t// \t}\n\t// }\n\treturn true\n}\n\n/**\n * Tells if a given incomplete national number is possible or not.\n * @param {string} nationalNumber\n * @param {string?} country — Specific country rather than the one that is pre-selected in the metadata instance.\n * @param {Metadata} metadata — Metadata instance with a selected numbering plan.\n * @returns {boolean}\n */\nfunction isPossibleIncompleteNationalNumber(nationalNumber, country, metadata) {\n\tswitch (checkNumberLength(nationalNumber, country, metadata)) {\n\t\tcase 'TOO_SHORT':\n\t\tcase 'INVALID_LENGTH':\n\t\t// This library ignores \"local-only\" phone numbers (for simplicity).\n\t\t// See the readme for more info on what are \"local-only\" phone numbers.\n\t\t// case 'IS_POSSIBLE_LOCAL_ONLY':\n\t\t\treturn false\n\t\tdefault:\n\t\t\treturn true\n\t}\n}","// Deprecated. Import from 'metadata.js' directly instead.\nexport { getCountryCallingCode as default } from './metadata.js'","import Metadata from '../metadata.js'\nimport matchesEntirely from './matchesEntirely.js'\nimport extractNationalNumber from './extractNationalNumber.js'\nimport checkNumberLength from './checkNumberLength.js'\nimport getCountryCallingCode from '../getCountryCallingCode.js'\n\n/**\n * Sometimes some people incorrectly input international phone numbers\n * without the leading `+`. This function corrects such input.\n * @param {string} number — Phone number digits (only digits, no `+`).\n * @param {string} [country] — Exact country of the phone number.\n * @param {string} [defaultCountry]\n * @param {string} [defaultCallingCode]\n * @param {object} metadataJson\n * @return {object} `{ countryCallingCode: string?, number: string }`, where `countryCallingCode` is the calling code that was extracted from the input `number` string, and `number` is the originally passed `number` without the extracted calling code.\n */\nexport default function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(\n\tnumber,\n\tcountry,\n\tdefaultCountry,\n\tdefaultCallingCode,\n\tmetadataJson\n) {\n\t// Validate arguments.\n\t// The `number` is known to be in a non-international form\n\t// because there's no leading \"+\" character.\n\t// Therefore, there must be either `country` or `defaultCountry` or `defaultCallingCode`.\n\t// Otherwise, there'd be no source for the calling code to search for in the `number`.\n\tif (!(country || defaultCountry || defaultCallingCode)) {\n\t\t// There's no source for the calling code to search for in the `number`.\n\t\treturn { number }\n\t}\n\n\tconst countryCallingCode = country || defaultCountry\n\t\t? getCountryCallingCode(country || defaultCountry, metadataJson)\n\t\t: defaultCallingCode\n\n\tif (number.indexOf(countryCallingCode) === 0) {\n\t\tconst metadata = new Metadata(metadataJson)\n\t\tmetadata.selectNumberingPlan(country || defaultCountry || defaultCallingCode)\n\n\t\tconst possibleShorterNumber = number.slice(countryCallingCode.length)\n\n\t\tconst {\n\t\t\tnationalNumber: possibleShorterNationalNumber,\n\t\t} = extractNationalNumber(\n\t\t\tpossibleShorterNumber,\n\t\t\tundefined,\n\t\t\tmetadata\n\t\t)\n\n\t\tconst {\n\t\t\tnationalNumber\n\t\t} = extractNationalNumber(\n\t\t\tnumber,\n\t\t\tundefined,\n\t\t\tmetadata\n\t\t)\n\n\t\t// If the number was not valid before but is valid now,\n\t\t// or if it was too long before, we consider the number\n\t\t// with the country calling code stripped to be a better result\n\t\t// and keep that instead.\n\t\t// For example, in Germany (+49), `49` is a valid area code,\n\t\t// so if a number starts with `49`, it could be both a valid\n\t\t// national German number or an international number without\n\t\t// a leading `+`.\n\t\tif (\n\t\t\t(\n\t\t\t\t!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) &&\n\t\t\t\tmatchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern())\n\t\t\t)\n\t\t\t||\n\t\t\tcheckNumberLength(nationalNumber, undefined, metadata) === 'TOO_LONG'\n\t\t) {\n\t\t\treturn {\n\t\t\t\tcountryCallingCode,\n\t\t\t\tnumber: possibleShorterNumber\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { number }\n}","import stripIddPrefix from './stripIddPrefix.js'\nimport extractCountryCallingCodeFromInternationalNumberWithoutPlusSign from './extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js'\nimport Metadata from '../metadata.js'\nimport { MAX_LENGTH_COUNTRY_CODE } from '../constants.js'\n\n/**\n * Attempts to extract a calling code from a phone number.\n * * If the phone number is found to be \"international\":\n * * It will attempt to identify the calling code part of it and whether that part is complete and valid.\n * * If the calling code part is complete and valid, it will return two properties:\n * that calling code part (without `+`) and the rest of the digits.\n * * Otherwise, i.e. if the calling code part is incomplete or invalid,\n * it will return an empty object.\n * * Otherwise, i.e. if the phone number is national, there's no callind code to extract\n * so it will just return the originally-passed `number` string as the only property.\n * @param {string} number — Phone number digits (possibly with a `+`).\n * @param {string} [country] — Country.\n * @param {string} [defaultCountry] — Default country.\n * @param {string} [defaultCallingCode] — Default calling code (some phone numbering plans are non-geographic).\n * @param {object} metadataJson\n * @return {object} `{ countryCallingCodeSource: string?, countryCallingCode: string?, number: string }`, where `countryCallingCodeSource` tells how the returned calling code was extracted (if it was extracted), `countryCallingCode` is the calling code that was extracted from the input `number` string, and `number` is the originally passed `number` without the extracted calling code (and without a `+`). If the calling code is present but incomplete or invalid, it will return an empty object.\n * @example\n * // Returns `{ countryCallingCode: \"1\", number: \"2133734253\" }`.\n * extractCountryCallingCode('2133734253', 'US', null, null, metadata)\n * extractCountryCallingCode('2133734253', null, 'US', null, metadata)\n * extractCountryCallingCode('2133734253', null, null, '1', metadata)\n * extractCountryCallingCode('+12133734253', null, null, null, metadata)\n * extractCountryCallingCode('+12133734253', null, 'RU', null, metadata)\n */\nexport default function extractCountryCallingCode(\n\tnumber,\n\tcountry,\n\tdefaultCountry,\n\tdefaultCallingCode,\n\tmetadataJson\n) {\n\tif (!number) {\n\t\treturn {}\n\t}\n\n\tlet isNumberWithIddPrefix\n\n\t// If this is not an international phone number,\n\t// then either extract an \"IDD\" prefix, or extract a\n\t// country calling code from a number by autocorrecting it\n\t// by prepending a leading `+` in cases when it starts\n\t// with the country calling code.\n\t// https://wikitravel.org/en/International_dialling_prefix\n\t// https://github.com/catamphetamine/libphonenumber-js/issues/376\n\tif (number[0] !== '+') {\n\t\t// Convert an \"out-of-country\" dialing phone number\n\t\t// to a proper international phone number.\n\t\tconst numberWithoutIDD = stripIddPrefix(number, country || defaultCountry, defaultCallingCode, metadataJson)\n\t\t// If an IDD prefix was stripped then\n\t\t// convert the number to international one\n\t\t// for subsequent parsing.\n\t\tif (numberWithoutIDD && numberWithoutIDD !== number) {\n\t\t\tisNumberWithIddPrefix = true\n\t\t\tnumber = '+' + numberWithoutIDD\n\t\t} else {\n\t\t\t// Check to see if the number starts with the country calling code\n\t\t\t// for the default country. If so, we remove the country calling code,\n\t\t\t// and do some checks on the validity of the number before and after.\n\t\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/376\n\t\t\tif (country || defaultCountry || defaultCallingCode) {\n\t\t\t\tconst {\n\t\t\t\t\tcountryCallingCode,\n\t\t\t\t\tnumber: shorterNumber\n\t\t\t\t} = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(\n\t\t\t\t\tnumber,\n\t\t\t\t\tcountry,\n\t\t\t\t\tdefaultCountry,\n\t\t\t\t\tdefaultCallingCode,\n\t\t\t\t\tmetadataJson\n\t\t\t\t)\n\t\t\t\tif (countryCallingCode) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcountryCallingCodeSource: 'FROM_NUMBER_WITHOUT_PLUS_SIGN',\n\t\t\t\t\t\tcountryCallingCode,\n\t\t\t\t\t\tnumber: shorterNumber\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t// No need to set it to `UNSPECIFIED`. It can be just `undefined`.\n\t\t\t\t// countryCallingCodeSource: 'UNSPECIFIED',\n\t\t\t\tnumber\n\t\t\t}\n\t\t}\n\t}\n\n\t// `number` can only be international at this point.\n\n\t// Fast abortion: country codes do not begin with a '0'\n\tif (number[1] === '0') {\n\t\treturn {}\n\t}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\t// The thing with country phone codes\n\t// is that they are orthogonal to each other\n\t// i.e. there's no such country phone code A\n\t// for which country phone code B exists\n\t// where B starts with A.\n\t// Therefore, while scanning digits,\n\t// if a valid country code is found,\n\t// that means that it is the country code.\n\t//\n\tlet i = 2\n\twhile (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {\n\t\tconst countryCallingCode = number.slice(1, i)\n\t\tif (metadata.hasCallingCode(countryCallingCode)) {\n\t\t\tmetadata.selectNumberingPlan(countryCallingCode)\n\t\t\treturn {\n\t\t\t\tcountryCallingCodeSource: isNumberWithIddPrefix ? 'FROM_NUMBER_WITH_IDD' : 'FROM_NUMBER_WITH_PLUS_SIGN',\n\t\t\t\tcountryCallingCode,\n\t\t\t\tnumber: number.slice(i)\n\t\t\t}\n\t\t}\n\t\ti++\n\t}\n\n\treturn {}\n}\n\n// The possible values for the returned `countryCallingCodeSource` are:\n//\n// Copy-pasted from:\n// https://github.com/google/libphonenumber/blob/master/resources/phonenumber.proto\n//\n// // The source from which the country_code is derived. This is not set in the\n// // general parsing method, but in the method that parses and keeps raw_input.\n// // New fields could be added upon request.\n// enum CountryCodeSource {\n// // Default value returned if this is not set, because the phone number was\n// // created using parse, not parseAndKeepRawInput. hasCountryCodeSource will\n// // return false if this is the case.\n// UNSPECIFIED = 0;\n//\n// // The country_code is derived based on a phone number with a leading \"+\",\n// // e.g. the French number \"+33 1 42 68 53 00\".\n// FROM_NUMBER_WITH_PLUS_SIGN = 1;\n//\n// // The country_code is derived based on a phone number with a leading IDD,\n// // e.g. the French number \"011 33 1 42 68 53 00\", as it is dialled from US.\n// FROM_NUMBER_WITH_IDD = 5;\n//\n// // The country_code is derived based on a phone number without a leading\n// // \"+\", e.g. the French number \"33 1 42 68 53 00\" when defaultCountry is\n// // supplied as France.\n// FROM_NUMBER_WITHOUT_PLUS_SIGN = 10;\n//\n// // The country_code is derived NOT based on the phone number itself, but\n// // from the defaultCountry parameter provided in the parsing function by the\n// // clients. This happens mostly for numbers written in the national format\n// // (without country code). For example, this would be set when parsing the\n// // French number \"01 42 68 53 00\", when defaultCountry is supplied as\n// // France.\n// FROM_DEFAULT_COUNTRY = 20;\n// }","import { VALID_PUNCTUATION } from '../constants.js'\n\n// Removes brackets and replaces dashes with spaces.\n//\n// E.g. \"(999) 111-22-33\" -> \"999 111 22 33\"\n//\n// For some reason Google's metadata contains `<intlFormat/>`s with brackets and dashes.\n// Meanwhile, there's no single opinion about using punctuation in international phone numbers.\n//\n// For example, Google's `<intlFormat/>` for USA is `+1 213-373-4253`.\n// And here's a quote from WikiPedia's \"North American Numbering Plan\" page:\n// https://en.wikipedia.org/wiki/North_American_Numbering_Plan\n//\n// \"The country calling code for all countries participating in the NANP is 1.\n// In international format, an NANP number should be listed as +1 301 555 01 00,\n// where 301 is an area code (Maryland).\"\n//\n// I personally prefer the international format without any punctuation.\n// For example, brackets are remnants of the old age, meaning that the\n// phone number part in brackets (so called \"area code\") can be omitted\n// if dialing within the same \"area\".\n// And hyphens were clearly introduced for splitting local numbers into memorizable groups.\n// For example, remembering \"5553535\" is difficult but \"555-35-35\" is much simpler.\n// Imagine a man taking a bus from home to work and seeing an ad with a phone number.\n// He has a couple of seconds to memorize that number until it passes by.\n// If it were spaces instead of hyphens the man wouldn't necessarily get it,\n// but with hyphens instead of spaces the grouping is more explicit.\n// I personally think that hyphens introduce visual clutter,\n// so I prefer replacing them with spaces in international numbers.\n// In the modern age all output is done on displays where spaces are clearly distinguishable\n// so hyphens can be safely replaced with spaces without losing any legibility.\n//\nexport default function applyInternationalSeparatorStyle(formattedNumber) {\n\treturn formattedNumber.replace(new RegExp(`[${VALID_PUNCTUATION}]+`, 'g'), ' ').trim()\n}","import applyInternationalSeparatorStyle from './applyInternationalSeparatorStyle.js'\n\n// This was originally set to $1 but there are some countries for which the\n// first group is not used in the national pattern (e.g. Argentina) so the $1\n// group does not match correctly. Therefore, we use `\\d`, so that the first\n// group actually used in the pattern will be matched.\nexport const FIRST_GROUP_PATTERN = /(\\$\\d)/\n\nexport default function formatNationalNumberUsingFormat(\n\tnumber,\n\tformat,\n\t{\n\t\tuseInternationalFormat,\n\t\twithNationalPrefix,\n\t\tcarrierCode,\n\t\tmetadata\n\t}\n) {\n\tconst formattedNumber = number.replace(\n\t\tnew RegExp(format.pattern()),\n\t\tuseInternationalFormat\n\t\t\t? format.internationalFormat()\n\t\t\t: (\n\t\t\t\t// This library doesn't use `domestic_carrier_code_formatting_rule`,\n\t\t\t\t// because that one is only used when formatting phone numbers\n\t\t\t\t// for dialing from a mobile phone, and this is not a dialing library.\n\t\t\t\t// carrierCode && format.domesticCarrierCodeFormattingRule()\n\t\t\t\t// \t// First, replace the $CC in the formatting rule with the desired carrier code.\n\t\t\t\t// \t// Then, replace the $FG in the formatting rule with the first group\n\t\t\t\t// \t// and the carrier code combined in the appropriate way.\n\t\t\t\t// \t? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode))\n\t\t\t\t// \t: (\n\t\t\t\t// \t\twithNationalPrefix && format.nationalPrefixFormattingRule()\n\t\t\t\t// \t\t\t? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())\n\t\t\t\t// \t\t\t: format.format()\n\t\t\t\t// \t)\n\t\t\t\twithNationalPrefix && format.nationalPrefixFormattingRule()\n\t\t\t\t\t? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())\n\t\t\t\t\t: format.format()\n\t\t\t)\n\t)\n\tif (useInternationalFormat) {\n\t\treturn applyInternationalSeparatorStyle(formattedNumber)\n\t}\n\treturn formattedNumber\n}","import Metadata from '../metadata.js'\n\n/**\n * Pattern that makes it easy to distinguish whether a region has a single\n * international dialing prefix or not. If a region has a single international\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\n * the tone. If there are multiple available international prefixes in a\n * region, they will be represented as a regex string that always contains one\n * or more characters that are not ASCII digits or a tilde.\n */\nconst SINGLE_IDD_PREFIX_REG_EXP = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/\n\n// If the `country` supports IDD calling, it returns a preferred IDD prefix.\n// If the `country` doesn't support IDD calling, it returns `undefined`.\nexport default function getIddPrefix(country, callingCode, metadata) {\n\tconst countryMetadata = new Metadata(metadata)\n\tcountryMetadata.selectNumberingPlan(country || callingCode)\n\tif (countryMetadata.defaultIDDPrefix()) {\n\t\treturn countryMetadata.defaultIDDPrefix()\n\t}\n\tif (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {\n\t\treturn countryMetadata.IDDPrefix()\n\t}\n}\n","import isViablePhoneNumber from './isViablePhoneNumber.js'\n\n// https://www.ietf.org/rfc/rfc3966.txt\n\n/**\n * @param {string} text - Phone URI (RFC 3966).\n * @return {object} `{ ?number, ?ext }`.\n */\nexport function parseRFC3966(text) {\n\tlet number\n\tlet ext\n\n\t// Replace \"tel:\" with \"tel=\" for parsing convenience.\n\ttext = text.replace(/^tel:/, 'tel=')\n\n\tfor (const part of text.split(';')) {\n\t\tconst [name, value] = part.split('=')\n\t\tswitch (name) {\n\t\t\tcase 'tel':\n\t\t\t\tnumber = value\n\t\t\t\tbreak\n\t\t\tcase 'ext':\n\t\t\t\text = value\n\t\t\t\tbreak\n\t\t\tcase 'phone-context':\n\t\t\t\t// Only \"country contexts\" are supported.\n\t\t\t\t// \"Domain contexts\" are ignored.\n\t\t\t\tif (value[0] === '+') {\n\t\t\t\t\tnumber = value + number\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t// If the phone number is not viable, then abort.\n\tif (!isViablePhoneNumber(number)) {\n\t\treturn {}\n\t}\n\n\tconst result = { number }\n\tif (ext) {\n\t\tresult.ext = ext\n\t}\n\treturn result\n}\n\n/**\n * @param {object} - `{ ?number, ?extension }`.\n * @return {string} Phone URI (RFC 3966).\n */\nexport function formatRFC3966({ number, ext }) {\n\tif (!number) {\n\t\treturn ''\n\t}\n\tif (number[0] !== '+') {\n\t\tthrow new Error(`\"formatRFC3966()\" expects \"number\" to be in E.164 format.`)\n\t}\n\treturn `tel:${number}${ext ? ';ext=' + ext : ''}`\n}","// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\n\nimport matchesEntirely from './helpers/matchesEntirely.js'\nimport formatNationalNumberUsingFormat from './helpers/formatNationalNumberUsingFormat.js'\nimport Metadata, { getCountryCallingCode } from './metadata.js'\nimport getIddPrefix from './helpers/getIddPrefix.js'\nimport { formatRFC3966 } from './helpers/RFC3966.js'\n\nconst DEFAULT_OPTIONS = {\n\tformatExtension: (formattedNumber, extension, metadata) => `${formattedNumber}${metadata.ext()}${extension}`\n}\n\n/**\n * Formats a phone number.\n *\n * format(phoneNumberInstance, 'INTERNATIONAL', { ..., v2: true }, metadata)\n * format(phoneNumberInstance, 'NATIONAL', { ..., v2: true }, metadata)\n *\n * format({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', { ... }, metadata)\n * format({ phone: '8005553535', country: 'RU' }, 'NATIONAL', undefined, metadata)\n *\n * @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: '...' }`.\n * @param {string} format\n * @param {object} [options]\n * @param {object} metadataJson\n * @return {string}\n */\nexport default function formatNumber(input, format, options, metadataJson) {\n\t// Apply default options.\n\tif (options) {\n\t\t// Using ES6 \"rest spread\" syntax here didn't work with `babel`/`istanbul`\n\t\t// for some weird reason: this line of code would cause the code coverage\n\t\t// to show as not 100%. That's because `babel`/`istanbul`, for some weird reason,\n\t\t// apparently doesn't know how to properly exclude Babel polyfills from code coverage.\n\t\t//\n\t\t// options = { ...DEFAULT_OPTIONS, ...options }\n\t\t//\n\t\toptions = merge({}, DEFAULT_OPTIONS, options)\n\t} else {\n\t\toptions = DEFAULT_OPTIONS\n\t}\n\n\tconst metadata = new Metadata(metadataJson)\n\n\t// Normally, the `input` object is supposed to be a `PhoneNumber` class instance.\n\t// Also, according to the `PhoneNumber` class source code, `country` can't be \"001\".\n\t// It means that normally `input.country` or `input.countryCallingCode` is supposed\n\t// to be present because either of the two is always required to exist in a `PhoneNumber` instance.\n\t// This means that realistically, it's gonna step into either the first `if`\n\t// or the following `else if`, and normally it won't even reach the legacy-compatibility\n\t// `else return input.phone || ''` part.\n\t// So normally, it won't ever return an empty string here.\n\tif (input.country && input.country !== '001') {\n\t\t// Validate `input.country`.\n\t\tif (!metadata.hasCountry(input.country)) {\n\t\t\tthrow new Error(`Unknown country: ${input.country}`)\n\t\t}\n\t\tmetadata.selectNumberingPlan(input.country)\n\t}\n\telse if (input.countryCallingCode) {\n\t\tmetadata.selectNumberingPlan(input.countryCallingCode)\n\t}\n\telse return input.phone || ''\n\n\tconst countryCallingCode = metadata.countryCallingCode()\n\n\tconst nationalNumber = options.v2 ? input.nationalNumber : input.phone\n\n\t// This variable should have been declared inside `case`s\n\t// but Babel has a bug and it says \"duplicate variable declaration\".\n\tlet number\n\n\tswitch (format) {\n\t\tcase 'NATIONAL':\n\t\t\t// Normally, the `input` object is supposed to be a `PhoneNumber` class instance,\n\t\t\t// and a `PhoneNumber` class instance is always required to have a `nationalNumber`.\n\t\t\t// This means that the `if (!nationalNumber)` below is just for legacy-compatibility\n\t\t\t// and it normally can't really happen, so normally it won't ever return an empty string here.\n\t\t\tif (!nationalNumber) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tnumber = formatNationalNumber(nationalNumber, input.carrierCode, 'NATIONAL', metadata, options)\n\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension)\n\n\t\tcase 'INTERNATIONAL':\n\t\t\t// Legacy argument support.\n\t\t\t// (`{ country: ..., phone: '' }`)\n\t\t\tif (!nationalNumber) {\n\t\t\t\treturn `+${countryCallingCode}`\n\t\t\t}\n\t\t\tnumber = formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata, options)\n\t\t\tnumber = `+${countryCallingCode} ${number}`\n\t\t\treturn addExtension(number, input.ext, metadata, options.formatExtension)\n\n\t\tcase 'E.164':\n\t\t\t// `E.164` doesn't define \"phone number extensions\".\n\t\t\treturn `+${countryCallingCode}${nationalNumber}`\n\n\t\tcase 'RFC3966':\n\t\t\treturn formatRFC3966({\n\t\t\t\tnumber: `+${countryCallingCode}${nationalNumber}`,\n\t\t\t\text: input.ext\n\t\t\t})\n\n\t\t// For reference, here's Google's IDD formatter:\n\t\t// https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546\n\t\t// Not saying that this IDD formatter replicates it 1:1, but it seems to work.\n\t\t// Who would even need to format phone numbers in IDD format anyway?\n\t\tcase 'IDD':\n\t\t\t// If the required `fromCountry` parameter is not passed, it will return `undefined`.\n\t\t\tif (!options.fromCountry) {\n\t\t\t\treturn\n\t\t\t\t// throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')\n\t\t\t}\n\t\t\tconst formattedNumber = formatIDD(\n\t\t\t\tnationalNumber,\n\t\t\t\tinput.carrierCode,\n\t\t\t\tcountryCallingCode,\n\t\t\t\toptions.fromCountry,\n\t\t\t\tmetadata\n\t\t\t)\n\t\t\t// If the country of the phone number doesn't support IDD calling, it will return `undefined`.\n\t\t\tif (!formattedNumber) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\treturn addExtension(formattedNumber, input.ext, metadata, options.formatExtension)\n\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown \"format\" argument passed to \"formatNumber()\": \"${format}\"`)\n\t}\n}\n\nfunction formatNationalNumber(number, carrierCode, formatAs, metadata, options) {\n\tconst format = chooseFormatForNumber(metadata.formats(), number)\n\tif (!format) {\n\t\treturn number\n\t}\n\treturn formatNationalNumberUsingFormat(\n\t\tnumber,\n\t\tformat,\n\t\t{\n\t\t\tuseInternationalFormat: formatAs === 'INTERNATIONAL',\n\t\t\twithNationalPrefix: format.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && (options && options.nationalPrefix === false) ? false : true,\n\t\t\tcarrierCode,\n\t\t\tmetadata\n\t\t}\n\t)\n}\n\nexport function chooseFormatForNumber(availableFormats, nationalNumber) {\n\t// Using a `for ... of` loop here didn't work with `babel`/`istanbul`:\n\t// for some weird reason, it showed code coverage less than 100%.\n\t// That's because `babel`/`istanbul`, for some weird reason,\n\t// apparently doesn't know how to properly exclude Babel polyfills from code coverage.\n\t//\n\t// for (const format of availableFormats) { ... }\n\t//\n\treturn pickFirstMatchingElement(availableFormats, (format) => {\n\t\t// Validate leading digits.\n\t\t// The test case for \"else path\" could be found by searching for\n\t\t// \"format.leadingDigitsPatterns().length === 0\".\n\t\tif (format.leadingDigitsPatterns().length > 0) {\n\t\t\t// The last leading_digits_pattern is used here, as it is the most detailed\n\t\t\tconst lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1]\n\t\t\t// If leading digits don't match then move on to the next phone number format\n\t\t\tif (nationalNumber.search(lastLeadingDigitsPattern) !== 0) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t}\n\t\t// Check that the national number matches the phone number format regular expression\n\t\treturn matchesEntirely(nationalNumber, format.pattern())\n\t})\n}\n\nfunction addExtension(formattedNumber, ext, metadata, formatExtension) {\n\treturn ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber\n}\n\nfunction formatIDD(\n\tnationalNumber,\n\tcarrierCode,\n\tcountryCallingCode,\n\tfromCountry,\n\tmetadata\n) {\n\tconst fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata.metadata)\n\t// When calling within the same country calling code.\n\tif (fromCountryCallingCode === countryCallingCode) {\n\t\tconst formattedNumber = formatNationalNumber(nationalNumber, carrierCode, 'NATIONAL', metadata)\n\t\t// For NANPA regions, return the national format for these regions\n\t\t// but prefix it with the country calling code.\n\t\tif (countryCallingCode === '1') {\n\t\t\treturn countryCallingCode + ' ' + formattedNumber\n\t\t}\n\t\t// If regions share a country calling code, the country calling code need\n\t\t// not be dialled. This also applies when dialling within a region, so this\n\t\t// if clause covers both these cases. Technically this is the case for\n\t\t// dialling from La Reunion to other overseas departments of France (French\n\t\t// Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover\n\t\t// this edge case for now and for those cases return the version including\n\t\t// country calling code. Details here:\n\t\t// http://www.petitfute.com/voyage/225-info-pratiques-reunion\n\t\t//\n\t\treturn formattedNumber\n\t}\n\tconst iddPrefix = getIddPrefix(fromCountry, undefined, metadata.metadata)\n\tif (iddPrefix) {\n\t\treturn `${iddPrefix} ${countryCallingCode} ${formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata)}`\n\t}\n}\n\nfunction merge(...objects) {\n\tlet i = 1\n\twhile (i < objects.length) {\n\t\tif (objects[i]) {\n\t\t\tfor (const key in objects[i]) {\n\t\t\t\tobjects[0][key] = objects[i][key]\n\t\t\t}\n\t\t}\n\t\ti++\n\t}\n\treturn objects[0]\n}\n\nfunction pickFirstMatchingElement(elements, testFunction) {\n\tlet i = 0\n\twhile (i < elements.length) {\n\t\tif (testFunction(elements[i])) {\n\t\t\treturn elements[i]\n\t\t}\n\t\ti++\n\t}\n}","import Metadata, { validateMetadata } from './metadata.js'\nimport isPossibleNumber from './isPossible.js'\nimport isValidNumber from './isValid.js'\nimport getNumberType from './helpers/getNumberType.js'\nimport getCountryAndCallingCodeFromOneOfThem from './helpers/getCountryAndCallingCodeFromOneOfThem.js'\nimport getPossibleCountriesForNumber from './helpers/getPossibleCountriesForNumber.js'\nimport extractCountryCallingCode from './helpers/extractCountryCallingCode.js'\nimport isObject from './helpers/isObject.js'\nimport formatNumber from './format.js'\n\nconst USE_NON_GEOGRAPHIC_COUNTRY_CODE = false\n\nexport default class PhoneNumber {\n\t/**\n\t * @param {string} countryOrCountryCallingCode\n\t * @param {string} nationalNumber\n\t * @param {object} metadata — Metadata JSON\n\t * @return {PhoneNumber}\n\t */\n\tconstructor(countryOrCountryCallingCode, nationalNumber, metadata) {\n\t\t// Validate `countryOrCountryCallingCode` argument.\n\t\tif (!countryOrCountryCallingCode) {\n\t\t\tthrow new TypeError('First argument is required')\n\t\t}\n\t\tif (typeof countryOrCountryCallingCode !== 'string') {\n\t\t\tthrow new TypeError('First argument must be a string')\n\t\t}\n\n\t\t// In case of public API use: `constructor(number, metadata)`.\n\t\t// Transform the arguments from `constructor(number, metadata)` to\n\t\t// `constructor(countryOrCountryCallingCode, nationalNumber, metadata)`.\n\t\tif (countryOrCountryCallingCode[0] === '+' && !nationalNumber) {\n\t\t\tthrow new TypeError('`metadata` argument not passed')\n\t\t}\n\t\tif (isObject(nationalNumber) && isObject(nationalNumber.countries)) {\n\t\t\tmetadata = nationalNumber\n\t\t\tconst e164Number = countryOrCountryCallingCode\n\t\t\tif (!E164_NUMBER_REGEXP.test(e164Number)) {\n\t\t\t\tthrow new Error('Invalid `number` argument passed: must consist of a \"+\" followed by digits')\n\t\t\t}\n\t\t\tconst { countryCallingCode, number } = extractCountryCallingCode(e164Number, undefined, undefined, undefined, metadata)\n\t\t\tnationalNumber = number\n\t\t\tcountryOrCountryCallingCode = countryCallingCode\n\t\t\tif (!nationalNumber) {\n\t\t\t\tthrow new Error('Invalid `number` argument passed: too short')\n\t\t\t}\n\t\t}\n\n\t\t// Validate `nationalNumber` argument.\n\t\tif (!nationalNumber) {\n\t\t\tthrow new TypeError('`nationalNumber` argument is required')\n\t\t}\n\t\tif (typeof nationalNumber !== 'string') {\n\t\t\tthrow new TypeError('`nationalNumber` argument must be a string')\n\t\t}\n\n\t\t// Validate `metadata` argument.\n\t\tvalidateMetadata(metadata)\n\n\t\t// Initialize properties.\n\t\tconst { country, callingCode: countryCallingCode } = getCountryAndCallingCodeFromOneOfThem(\n\t\t\tcountryOrCountryCallingCode,\n\t\t\tmetadata\n\t\t)\n\t\tthis.country = country\n\t\tthis.countryCallingCode = countryCallingCode\n\t\tthis.nationalNumber = nationalNumber\n\t\tthis.number = '+' + this.countryCallingCode + this.nationalNumber\n\t\t// Exclude `metadata` property output from `PhoneNumber.toString()`\n\t\t// so that it doesn't clutter the console output of Node.js.\n\t\t// Previously, when Node.js did `console.log(new PhoneNumber(...))`,\n\t\t// it would output the whole internal structure of the `metadata` object.\n\t\tthis.getMetadata = () => metadata\n\t}\n\n\tsetExt(ext) {\n\t\tthis.ext = ext\n\t}\n\n\tgetPossibleCountries() {\n\t\tif (this.country) {\n\t\t\treturn [this.country]\n\t\t}\n\t\treturn getPossibleCountriesForNumber(\n\t\t\tthis.countryCallingCode,\n\t\t\tthis.nationalNumber,\n\t\t\tthis.getMetadata()\n\t\t)\n\t}\n\n\tisPossible() {\n\t\treturn isPossibleNumber(this, { v2: true }, this.getMetadata())\n\t}\n\n\tisValid() {\n\t\treturn isValidNumber(this, { v2: true }, this.getMetadata())\n\t}\n\n\tisNonGeographic() {\n\t\tconst metadata = new Metadata(this.getMetadata())\n\t\treturn metadata.isNonGeographicCallingCode(this.countryCallingCode)\n\t}\n\n\tisEqual(phoneNumber) {\n\t\treturn this.number === phoneNumber.number && this.ext === phoneNumber.ext\n\t}\n\n\t// `validateLength()` method was originally meant to be an equivalent for `validatePhoneNumberLength()`.\n\t//\n\t// Later, it became apparent that it's not really a true equivalent.\n\t// The reason is that a `PhoneNumber` instance is not created\n\t// when the phone number string is too short for it to be considered a valid phone number:\n\t// * When there must be at least 2 national (significant) number digits: `\"1\"`.\n // * When the country calling code part of an international number is incomplete: `\"+12\"`.\n\t//\n\t// So leaving this `validateLength()` method here would suggest a hidden anti-pattern\n\t// of using it instead of `validatePhoneNumberLength()` while ignoring\n\t// the \"too short to be even possible\" case from phone number length validation.\n\t// And ignoring that case wouldn't make any sense in a real-world application\n\t// because it would still be a valid case that should be handled.\n\t//\n\t// Because of that, this method was eventually commented out in order to not introduce\n\t// that kind of an anti-pattern.\n\t//\n\t// validateLength() {\n\t// \tconst result = checkNumberLength(\n\t// \t\tthis.nationalNumber,\n\t// \t\tundefined,\n\t// \t\tthis.getMetadata()\n\t// \t)\n\t// \tif (result !== 'IS_POSSIBLE') {\n\t// \t\treturn result\n\t// \t}\n\t// }\n\n\tgetType() {\n\t\treturn getNumberType(this, { v2: true }, this.getMetadata())\n\t}\n\n\tformat(format, options) {\n\t\treturn formatNumber(\n\t\t\tthis,\n\t\t\tformat,\n\t\t\toptions ? { ...options, v2: true } : { v2: true },\n\t\t\tthis.getMetadata()\n\t\t)\n\t}\n\n\tformatNational(options) {\n\t\treturn this.format('NATIONAL', options)\n\t}\n\n\tformatInternational(options) {\n\t\treturn this.format('INTERNATIONAL', options)\n\t}\n\n\tgetURI(options) {\n\t\treturn this.format('RFC3966', options)\n\t}\n}\n\nconst E164_NUMBER_REGEXP = /^\\+\\d+$/","// These mappings map a character (key) to a specific digit that should\n// replace it for normalization purposes. Non-European digits that\n// may be used in phone numbers are mapped to a European equivalent.\n//\n// E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\n//\nexport const DIGITS = {\n\t'0': '0',\n\t'1': '1',\n\t'2': '2',\n\t'3': '3',\n\t'4': '4',\n\t'5': '5',\n\t'6': '6',\n\t'7': '7',\n\t'8': '8',\n\t'9': '9',\n\t'\\uFF10': '0', // Fullwidth digit 0\n\t'\\uFF11': '1', // Fullwidth digit 1\n\t'\\uFF12': '2', // Fullwidth digit 2\n\t'\\uFF13': '3', // Fullwidth digit 3\n\t'\\uFF14': '4', // Fullwidth digit 4\n\t'\\uFF15': '5', // Fullwidth digit 5\n\t'\\uFF16': '6', // Fullwidth digit 6\n\t'\\uFF17': '7', // Fullwidth digit 7\n\t'\\uFF18': '8', // Fullwidth digit 8\n\t'\\uFF19': '9', // Fullwidth digit 9\n\t'\\u0660': '0', // Arabic-indic digit 0\n\t'\\u0661': '1', // Arabic-indic digit 1\n\t'\\u0662': '2', // Arabic-indic digit 2\n\t'\\u0663': '3', // Arabic-indic digit 3\n\t'\\u0664': '4', // Arabic-indic digit 4\n\t'\\u0665': '5', // Arabic-indic digit 5\n\t'\\u0666': '6', // Arabic-indic digit 6\n\t'\\u0667': '7', // Arabic-indic digit 7\n\t'\\u0668': '8', // Arabic-indic digit 8\n\t'\\u0669': '9', // Arabic-indic digit 9\n\t'\\u06F0': '0', // Eastern-Arabic digit 0\n\t'\\u06F1': '1', // Eastern-Arabic digit 1\n\t'\\u06F2': '2', // Eastern-Arabic digit 2\n\t'\\u06F3': '3', // Eastern-Arabic digit 3\n\t'\\u06F4': '4', // Eastern-Arabic digit 4\n\t'\\u06F5': '5', // Eastern-Arabic digit 5\n\t'\\u06F6': '6', // Eastern-Arabic digit 6\n\t'\\u06F7': '7', // Eastern-Arabic digit 7\n\t'\\u06F8': '8', // Eastern-Arabic digit 8\n\t'\\u06F9': '9' // Eastern-Arabic digit 9\n}\n\nexport function parseDigit(character) {\n\treturn DIGITS[character]\n}\n\n/**\n * Parses phone number digits from a string.\n * Drops all punctuation leaving only digits.\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\n * @param {string} string\n * @return {string}\n * @example\n * ```js\n * parseDigits('8 (800) 555')\n * // Outputs '8800555'.\n * ```\n */\nexport default function parseDigits(string) {\n\tlet result = ''\n\t// Using `.split('')` here instead of normal `for ... of`\n\t// because the importing application doesn't neccessarily include an ES6 polyfill.\n\t// The `.split('')` approach discards \"exotic\" UTF-8 characters\n\t// (the ones consisting of four bytes) but digits\n\t// (including non-European ones) don't fall into that range\n\t// so such \"exotic\" characters would be discarded anyway.\n\tfor (const character of string.split('')) {\n\t\tconst digit = parseDigit(character)\n\t\tif (digit) {\n\t\t\tresult += digit\n\t\t}\n\t}\n\treturn result\n}","// This \"state\" object simply holds the state of the \"AsYouType\" parser:\n//\n// Sidenote:\n// `state.callingCode` and `state.country` are somewhat independent from one another\n// and there could be situations when one is defined but the other is not.\n// * Situations when `state.country` would be defined but `state.callingCode` would be `undefined`:\n// \t\t * When `defaultCountry` is specified and inputting a phone number not in \"international\" format.\n// * When `defaultCountry` is specified and inputting a phone number in \"international\" format,\n// but before the `+` character has been input.\n// * Situations when `state.country` would be `undefined` but `state.callingCode` would be defined:\n// * When `defaultCountry` is not specified and inputting a phone number in \"international\" format,\n// and the \"calling code\" part is already complete, but multiple countries share this \"calling code\"\n// and there's not enough national (significant) number digits yet to determine the exact country.\n// * In any other sigutations, `state.country` and `state.callingCode` are either both defined or both `undefined`.\n// * When they're both defined, `state.callingCode` always corresponds to `state.country`.\n// So both are always consistent in this case.\n//\n// * `country?: string` — The exact country of the phone number, if it could be determined.\n// When inputting a phone number in \"international\" format, it will derive the `country` from \"country calling code\" and the phone number digits.\n// When inputting a phone number in \"national\" format, it will derive the `country` from `defaultCountry` that was specified when creating the `AsYouType` formatter.\n// Sidenote: If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` flag was `true`, then for \"non-geographic phone numbers\" `state.country` would've been \"001\".\n// * `callingCode?: string` — \"Country calling code\" that has been extracted from the input phone number.\n// When inputting a phone number in \"international\" format, it will extract the \"country calling code\" from the digits that follow the \"+\" character.\n// When inputting a phone number in \"national\" format, `callingCode` will be `undefined`.\n// * `digits: string` — Phone number digits that have been input so far, including the \"+\" character, if present. In case of inputting non-arabic digits, those will be converted to arabic ones.\n// * `international: boolean` — Whether the phone number is being input in \"international\" format, i.e. with a \"+\" character.\n// * `missingPlus: boolean` — Whether it's a phone number in \"international\" format that is missing the leading \"+\" character for some reason — apparently, Google thinks that it's a common mistake when inputting a phone number.\n// * `IDDPrefix?: string` — An \"IDD prefix\", when the phone number is being input in an \"out-of-country dialing\" format. https://wikitravel.org/en/International_dialling_prefix\n// * `carrierCode?: string` — A \"carrier code\", if the phone number contains it. Normally, those can only be present in Colombia or Brazil, and only when calling from mobile phones to fixed-line numbers.\n// * `nationalPrefix?: string` — \"National prefix\", if present in the phone number input.\n// * `nationalSignificantNumber?: string` — National (significant) number digits that have been input so far.\n// * `nationalSignificantNumberIsModified: boolean` — Tells if the parsed national (significant) number is present as-is in the input string. For example, when inputting \"0343515551212999\" Argentinian mobile number, the parsed national (significant) number is \"93435551212999\". There, one can see how it stripped \"0\" national prefix and prepended a \"9\", because that's how it is instructed to do in Argentina's metadata. So in the described example, the parsed national (significant) number is not present as-is in the input string. Instead, it's \"modified\" in the input string. https://gitlab.com/caamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n// * `prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix?: string` — In some countries, a phone number could have a prefix that is not a \"national prefix\" but rather some other type of \"utility\" prefix.\n// For example, when calling within Australia, one could prepend `1831` prefix to hide caller's phone number.\n// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n//\nexport default class AsYouTypeState {\n\tconstructor({ onCountryChange, onCallingCodeChange }) {\n\t\tthis.onCountryChange = onCountryChange\n\t\tthis.onCallingCodeChange = onCallingCodeChange\n\t}\n\n\treset({ country, callingCode }) {\n\t\tthis.international = false\n\t\tthis.missingPlus = false\n\t\tthis.IDDPrefix = undefined\n\t\tthis.callingCode = undefined\n\t\tthis.digits = ''\n\t\tthis.resetNationalSignificantNumber()\n\t\tthis.initCountryAndCallingCode(country, callingCode)\n\t}\n\n\tresetNationalSignificantNumber() {\n\t\tthis.nationalSignificantNumber = this.getNationalDigits()\n\t\tthis.nationalSignificantNumberIsModified = false\n\t\tthis.nationalPrefix = undefined\n\t\tthis.carrierCode = undefined\n\t\tthis.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = undefined\n\t}\n\n\tupdate(properties) {\n\t\tfor (const key of Object.keys(properties)) {\n\t\t\tthis[key] = properties[key]\n\t\t}\n\t}\n\n\tinitCountryAndCallingCode(country, callingCode) {\n\t\tthis.setCountry(country)\n\t\tthis.setCallingCode(callingCode)\n\t}\n\n\tsetCountry(country) {\n\t\tthis.country = country\n\t\tthis.onCountryChange(country)\n\t}\n\n\tsetCallingCode(callingCode) {\n\t\tthis.callingCode = callingCode\n\t\tthis.onCallingCodeChange(callingCode, this.country)\n\t}\n\n\tstartInternationalNumber(country, callingCode) {\n\t\t// Prepend the `+` to parsed input.\n\t\tthis.international = true\n\t\t// If a default country was set then reset it\n\t\t// because an explicitly international phone\n\t\t// number is being entered.\n\t\tthis.initCountryAndCallingCode(country, callingCode)\n\t}\n\n\tappendDigits(nextDigits) {\n\t\tthis.digits += nextDigits\n\t}\n\n\tappendNationalSignificantNumberDigits(nextDigits) {\n\t\tthis.nationalSignificantNumber += nextDigits\n\t}\n\n\t/**\n\t * Returns the part of `this.digits` that corresponds to the national number.\n\t * Basically, all digits that have been input by the user, except for the\n\t * international prefix and the country calling code part\n\t * (if the number is an international one).\n\t * @return {string}\n\t */\n\tgetNationalDigits() {\n\t\tif (this.international) {\n\t\t\treturn this.digits.slice(\n\t\t\t\t(this.IDDPrefix ? this.IDDPrefix.length : 0) +\n\t\t\t\t(this.callingCode ? this.callingCode.length : 0)\n\t\t\t)\n\t\t}\n\t\treturn this.digits\n\t}\n\n\tgetDigitsWithoutInternationalPrefix() {\n\t\tif (this.international) {\n\t\t\tif (this.IDDPrefix) {\n\t\t\t\treturn this.digits.slice(this.IDDPrefix.length)\n\t\t\t}\n\t\t}\n\t\treturn this.digits\n\t}\n}","// Should be the same as `DIGIT_PLACEHOLDER` in `libphonenumber-metadata-generator`.\nexport const DIGIT_PLACEHOLDER = 'x' // '\\u2008' (punctuation space)\nconst DIGIT_PLACEHOLDER_MATCHER = new RegExp(DIGIT_PLACEHOLDER)\n\n// Counts all occurences of a symbol in a string.\n// Unicode-unsafe (because using `.split()`).\nexport function countOccurences(symbol, string) {\n\tlet count = 0\n\t// Using `.split('')` to iterate through a string here\n\t// to avoid requiring `Symbol.iterator` polyfill.\n\t// `.split('')` is generally not safe for Unicode,\n\t// but in this particular case for counting brackets it is safe.\n\t// for (const character of string)\n\tfor (const character of string.split('')) {\n\t\tif (character === symbol) {\n\t\t\tcount++\n\t\t}\n\t}\n\treturn count\n}\n\n// Repeats a string (or a symbol) N times.\n// http://stackoverflow.com/questions/202605/repeat-string-javascript\nexport function repeat(string, times) {\n\tif (times < 1) {\n\t\treturn ''\n\t}\n\tlet result = ''\n\twhile (times > 1) {\n\t\tif (times & 1) {\n\t\t\tresult += string\n\t\t}\n\t\ttimes >>= 1\n\t\tstring += string\n\t}\n\treturn result + string\n}\n\nexport function cutAndStripNonPairedParens(string, cutBeforeIndex) {\n\tif (string[cutBeforeIndex] === ')') {\n\t\tcutBeforeIndex++\n\t}\n\treturn stripNonPairedParens(string.slice(0, cutBeforeIndex))\n}\n\nexport function closeNonPairedParens(template, cut_before) {\n\tconst retained_template = template.slice(0, cut_before)\n\tconst opening_braces = countOccurences('(', retained_template)\n\tconst closing_braces = countOccurences(')', retained_template)\n\tlet dangling_braces = opening_braces - closing_braces\n\twhile (dangling_braces > 0 && cut_before < template.length) {\n\t\tif (template[cut_before] === ')') {\n\t\t\tdangling_braces--\n\t\t}\n\t\tcut_before++\n\t}\n\treturn template.slice(0, cut_before)\n}\n\nexport function stripNonPairedParens(string) {\n\tconst dangling_braces =[]\n\tlet i = 0\n\twhile (i < string.length) {\n\t\tif (string[i] === '(') {\n\t\t\tdangling_braces.push(i)\n\t\t}\n\t\telse if (string[i] === ')') {\n\t\t\tdangling_braces.pop()\n\t\t}\n\t\ti++\n\t}\n\tlet start = 0\n\tlet cleared_string = ''\n\tdangling_braces.push(string.length)\n\tfor (const index of dangling_braces) {\n\t\tcleared_string += string.slice(start, index)\n\t\tstart = index + 1\n\t}\n\treturn cleared_string\n}\n\nexport function populateTemplateWithDigits(template, position, digits) {\n\t// Using `.split('')` to iterate through a string here\n\t// to avoid requiring `Symbol.iterator` polyfill.\n\t// `.split('')` is generally not safe for Unicode,\n\t// but in this particular case for `digits` it is safe.\n\t// for (const digit of digits)\n\tfor (const digit of digits.split('')) {\n\t\t// If there is room for more digits in current `template`,\n\t\t// then set the next digit in the `template`,\n\t\t// and return the formatted digits so far.\n\t\t// If more digits are entered than the current format could handle.\n\t\tif (template.slice(position + 1).search(DIGIT_PLACEHOLDER_MATCHER) < 0) {\n\t\t\treturn\n\t\t}\n\t\tposition = template.search(DIGIT_PLACEHOLDER_MATCHER)\n\t\ttemplate = template.replace(DIGIT_PLACEHOLDER_MATCHER, digit)\n\t}\n\treturn [template, position]\n}","import checkNumberLength from './helpers/checkNumberLength.js'\nimport parseDigits from './helpers/parseDigits.js'\nimport formatNationalNumberUsingFormat from './helpers/formatNationalNumberUsingFormat.js'\n\nexport default function formatCompleteNumber(state, format, {\n\tmetadata,\n\tshouldTryNationalPrefixFormattingRule,\n\tgetSeparatorAfterNationalPrefix\n}) {\n\tconst matcher = new RegExp(`^(?:${format.pattern()})$`)\n\tif (matcher.test(state.nationalSignificantNumber)) {\n\t\treturn formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(\n\t\t\tstate,\n\t\t\tformat,\n\t\t\t{\n\t\t\t\tmetadata,\n\t\t\t\tshouldTryNationalPrefixFormattingRule,\n\t\t\t\tgetSeparatorAfterNationalPrefix\n\t\t\t}\n\t\t)\n\t}\n}\n\nexport function canFormatCompleteNumber(nationalSignificantNumber, metadata) {\n\treturn checkNumberLength(nationalSignificantNumber, undefined, metadata) === 'IS_POSSIBLE'\n}\n\nfunction formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, {\n\tmetadata,\n\tshouldTryNationalPrefixFormattingRule,\n\tgetSeparatorAfterNationalPrefix\n}) {\n\t// `format` has already been checked for `nationalPrefix` requirement.\n\n\tconst {\n\t\tnationalSignificantNumber,\n\t\tinternational,\n\t\tnationalPrefix,\n\t\tcarrierCode\n\t} = state\n\n\t// Format the number with using `national_prefix_formatting_rule`.\n\t// If the resulting formatted number is a valid formatted number, then return it.\n\t//\n\t// Google's AsYouType formatter is different in a way that it doesn't try\n\t// to format using the \"national prefix formatting rule\", and instead it\n\t// simply prepends a national prefix followed by a \" \" character.\n\t// This code does that too, but as a fallback.\n\t// The reason is that \"national prefix formatting rule\" may use parentheses,\n\t// which wouldn't be included has it used the simpler Google's way.\n\t//\n\tif (shouldTryNationalPrefixFormattingRule(format)) {\n\t\tconst formattedNumber = formatNationalNumber(state, format, {\n\t\t\tuseNationalPrefixFormattingRule: true,\n\t\t\tgetSeparatorAfterNationalPrefix,\n\t\t\tmetadata\n\t\t})\n\t\tif (formattedNumber) {\n\t\t\treturn formattedNumber\n\t\t}\n\t}\n\n\t// Format the number without using `national_prefix_formatting_rule`.\n\treturn formatNationalNumber(state, format, {\n\t\tuseNationalPrefixFormattingRule: false,\n\t\tgetSeparatorAfterNationalPrefix,\n\t\tmetadata\n\t})\n}\n\nfunction formatNationalNumber(state, format, {\n\tmetadata,\n\tuseNationalPrefixFormattingRule,\n\tgetSeparatorAfterNationalPrefix\n}) {\n\tlet formattedNationalNumber = formatNationalNumberUsingFormat(\n\t\tstate.nationalSignificantNumber,\n\t\tformat,\n\t\t{\n\t\t\tcarrierCode: state.carrierCode,\n\t\t\tuseInternationalFormat: state.international,\n\t\t\twithNationalPrefix: useNationalPrefixFormattingRule,\n\t\t\tmetadata\n\t\t}\n\t)\n\tif (!useNationalPrefixFormattingRule) {\n\t\tif (state.nationalPrefix) {\n\t\t\t// If a national prefix was extracted, then just prepend it,\n\t\t\t// followed by a \" \" character.\n\t\t\tformattedNationalNumber = state.nationalPrefix +\n\t\t\t\tgetSeparatorAfterNationalPrefix(format) +\n\t\t\t\tformattedNationalNumber\n\t\t} else if (state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) {\n\t\t\tformattedNationalNumber = state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix +\n\t\t\t\t' ' +\n\t\t\t\tformattedNationalNumber\n\t\t}\n\t}\n\tif (isValidFormattedNationalNumber(formattedNationalNumber, state)) {\n\t\treturn formattedNationalNumber\n\t}\n}\n\n// Check that the formatted phone number contains exactly\n// the same digits that have been input by the user.\n// For example, when \"0111523456789\" is input for `AR` country,\n// the extracted `this.nationalSignificantNumber` is \"91123456789\",\n// which means that the national part of `this.digits` isn't simply equal to\n// `this.nationalPrefix` + `this.nationalSignificantNumber`.\n//\n// Also, a `format` can add extra digits to the `this.nationalSignificantNumber`\n// being formatted via `metadata[country].national_prefix_transform_rule`.\n// For example, for `VI` country, it prepends `340` to the national number,\n// and if this check hasn't been implemented, then there would be a bug\n// when `340` \"area coude\" is \"duplicated\" during input for `VI` country:\n// https://github.com/catamphetamine/libphonenumber-js/issues/318\n//\n// So, all these \"gotchas\" are filtered out.\n//\n// In the original Google's code, the comments say:\n// \"Check that we didn't remove nor add any extra digits when we matched\n// this formatting pattern. This usually happens after we entered the last\n// digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when\n// formatted but AYTF should retain all the number entered and not change\n// in order to match a format (of same leading digits and length) display\n// in that way.\"\n// \"If it's the same (i.e entered number and format is same), then it's\n// safe to return this in formatted number as nothing is lost / added.\"\n// Otherwise, don't use this format.\n// https://github.com/google/libphonenumber/commit/3e7c1f04f5e7200f87fb131e6f85c6e99d60f510#diff-9149457fa9f5d608a11bb975c6ef4bc5\n// https://github.com/google/libphonenumber/commit/3ac88c7106e7dcb553bcc794b15f19185928a1c6#diff-2dcb77e833422ee304da348b905cde0b\n//\nfunction isValidFormattedNationalNumber(formattedNationalNumber, state) {\n\treturn parseDigits(formattedNationalNumber) === state.getNationalDigits()\n}","export default class PatternParser {\n\tparse(pattern) {\n\t\tthis.context = [{\n\t\t\tor: true,\n\t\t\tinstructions: []\n\t\t}]\n\n\t\tthis.parsePattern(pattern)\n\n\t\tif (this.context.length !== 1) {\n\t\t\tthrow new Error('Non-finalized contexts left when pattern parse ended')\n\t\t}\n\n\t\tconst { branches, instructions } = this.context[0]\n\n\t\tif (branches) {\n\t\t\treturn {\n\t\t\t\top: '|',\n\t\t\t\targs: branches.concat([\n\t\t\t\t\texpandSingleElementArray(instructions)\n\t\t\t\t])\n\t\t\t}\n\t\t}\n\n\t\t/* istanbul ignore if */\n\t\tif (instructions.length === 0) {\n\t\t\tthrow new Error('Pattern is required')\n\t\t}\n\n\t\tif (instructions.length === 1) {\n\t\t\treturn instructions[0]\n\t\t}\n\n\t\treturn instructions\n\t}\n\n\tstartContext(context) {\n\t\tthis.context.push(context)\n\t}\n\n\tendContext() {\n\t\tthis.context.pop()\n\t}\n\n\tgetContext() {\n\t\treturn this.context[this.context.length - 1]\n\t}\n\n\tparsePattern(pattern) {\n\t\tif (!pattern) {\n\t\t\tthrow new Error('Pattern is required')\n\t\t}\n\n\t\tconst match = pattern.match(OPERATOR)\n\t\tif (!match) {\n\t\t\tif (ILLEGAL_CHARACTER_REGEXP.test(pattern)) {\n\t\t\t\tthrow new Error(`Illegal characters found in a pattern: ${pattern}`)\n\t\t\t}\n\t\t\tthis.getContext().instructions = this.getContext().instructions.concat(\n\t\t\t\tpattern.split('')\n\t\t\t)\n\t\t\treturn\n\t\t}\n\n\t\tconst operator = match[1]\n\t\tconst before = pattern.slice(0, match.index)\n\t\tconst rightPart = pattern.slice(match.index + operator.length)\n\n\t\tswitch (operator) {\n\t\t\tcase '(?:':\n\t\t\t\tif (before) {\n\t\t\t\t\tthis.parsePattern(before)\n\t\t\t\t}\n\t\t\t\tthis.startContext({\n\t\t\t\t\tor: true,\n\t\t\t\t\tinstructions: [],\n\t\t\t\t\tbranches: []\n\t\t\t\t})\n\t\t\t\tbreak\n\n\t\t\tcase ')':\n\t\t\t\tif (!this.getContext().or) {\n\t\t\t\t\tthrow new Error('\")\" operator must be preceded by \"(?:\" operator')\n\t\t\t\t}\n\t\t\t\tif (before) {\n\t\t\t\t\tthis.parsePattern(before)\n\t\t\t\t}\n\t\t\t\tif (this.getContext().instructions.length === 0) {\n\t\t\t\t\tthrow new Error('No instructions found after \"|\" operator in an \"or\" group')\n\t\t\t\t}\n\t\t\t\tconst { branches } = this.getContext()\n\t\t\t\tbranches.push(\n\t\t\t\t\texpandSingleElementArray(\n\t\t\t\t\t\tthis.getContext().instructions\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tthis.endContext()\n\t\t\t\tthis.getContext().instructions.push({\n\t\t\t\t\top: '|',\n\t\t\t\t\targs: branches\n\t\t\t\t})\n\t\t\t\tbreak\n\n\t\t\tcase '|':\n\t\t\t\tif (!this.getContext().or) {\n\t\t\t\t\tthrow new Error('\"|\" operator can only be used inside \"or\" groups')\n\t\t\t\t}\n\t\t\t\tif (before) {\n\t\t\t\t\tthis.parsePattern(before)\n\t\t\t\t}\n\t\t\t\t// The top-level is an implicit \"or\" group, if required.\n\t\t\t\tif (!this.getContext().branches) {\n\t\t\t\t\t// `branches` are not defined only for the root implicit \"or\" operator.\n\t\t\t\t\t/* istanbul ignore else */\n\t\t\t\t\tif (this.context.length === 1) {\n\t\t\t\t\t\tthis.getContext().branches = []\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error('\"branches\" not found in an \"or\" group context')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.getContext().branches.push(\n\t\t\t\t\texpandSingleElementArray(\n\t\t\t\t\t\tthis.getContext().instructions\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\tthis.getContext().instructions = []\n\t\t\t\tbreak\n\n\t\t\tcase '[':\n\t\t\t\tif (before) {\n\t\t\t\t\tthis.parsePattern(before)\n\t\t\t\t}\n\t\t\t\tthis.startContext({\n\t\t\t\t\toneOfSet: true\n\t\t\t\t})\n\t\t\t\tbreak\n\n\t\t\tcase ']':\n\t\t\t\tif (!this.getContext().oneOfSet) {\n\t\t\t\t\tthrow new Error('\"]\" operator must be preceded by \"[\" operator')\n\t\t\t\t}\n\t\t\t\tthis.endContext()\n\t\t\t\tthis.getContext().instructions.push({\n\t\t\t\t\top: '[]',\n\t\t\t\t\targs: parseOneOfSet(before)\n\t\t\t\t})\n\t\t\t\tbreak\n\n\t\t\t/* istanbul ignore next */\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unknown operator: ${operator}`)\n\t\t}\n\n\t\tif (rightPart) {\n\t\t\tthis.parsePattern(rightPart)\n\t\t}\n\t}\n}\n\nfunction parseOneOfSet(pattern) {\n\tconst values = []\n\tlet i = 0\n\twhile (i < pattern.length) {\n\t\tif (pattern[i] === '-') {\n\t\t\tif (i === 0 || i === pattern.length - 1) {\n\t\t\t\tthrow new Error(`Couldn't parse a one-of set pattern: ${pattern}`)\n\t\t\t}\n\t\t\tconst prevValue = pattern[i - 1].charCodeAt(0) + 1\n\t\t\tconst nextValue = pattern[i + 1].charCodeAt(0) - 1\n\t\t\tlet value = prevValue\n\t\t\twhile (value <= nextValue) {\n\t\t\t\tvalues.push(String.fromCharCode(value))\n\t\t\t\tvalue++\n\t\t\t}\n\t\t} else {\n\t\t\tvalues.push(pattern[i])\n\t\t}\n\t\ti++\n\t}\n\treturn values\n}\n\nconst ILLEGAL_CHARACTER_REGEXP = /[\\(\\)\\[\\]\\?\\:\\|]/\n\nconst OPERATOR = new RegExp(\n\t// any of:\n\t'(' +\n\t\t// or operator\n\t\t'\\\\|' +\n\t\t// or\n\t\t'|' +\n\t\t// or group start\n\t\t'\\\\(\\\\?\\\\:' +\n\t\t// or\n\t\t'|' +\n\t\t// or group end\n\t\t'\\\\)' +\n\t\t// or\n\t\t'|' +\n\t\t// one-of set start\n\t\t'\\\\[' +\n\t\t// or\n\t\t'|' +\n\t\t// one-of set end\n\t\t'\\\\]' +\n\t')'\n)\n\nfunction expandSingleElementArray(array) {\n\tif (array.length === 1) {\n\t\treturn array[0]\n\t}\n\treturn array\n}","import PatternParser from './AsYouTypeFormatter.PatternParser.js'\n\nexport default class PatternMatcher {\n\tconstructor(pattern) {\n\t\tthis.matchTree = new PatternParser().parse(pattern)\n\t}\n\n\tmatch(string, { allowOverflow } = {}) {\n\t\tif (!string) {\n\t\t\tthrow new Error('String is required')\n\t\t}\n\t\tconst result = match(string.split(''), this.matchTree, true)\n\t\tif (result && result.match) {\n\t\t\tdelete result.matchedChars\n\t\t}\n\t\tif (result && result.overflow) {\n\t\t\tif (!allowOverflow) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\treturn result\n\t}\n}\n\n/**\n * Matches `characters` against a pattern compiled into a `tree`.\n * @param {string[]} characters\n * @param {Tree} tree — A pattern compiled into a `tree`. See the `*.d.ts` file for the description of the `tree` structure.\n * @param {boolean} last — Whether it's the last (rightmost) subtree on its level of the match tree.\n * @return {object} See the `*.d.ts` file for the description of the result object.\n */\nfunction match(characters, tree, last) {\n\t// If `tree` is a string, then `tree` is a single character.\n\t// That's because when a pattern is parsed, multi-character-string parts\n\t// of a pattern are compiled into arrays of single characters.\n\t// I still wrote this piece of code for a \"general\" hypothetical case\n\t// when `tree` could be a string of several characters, even though\n\t// such case is not possible with the current implementation.\n\tif (typeof tree === 'string') {\n\t\tconst characterString = characters.join('')\n\t\tif (tree.indexOf(characterString) === 0) {\n\t\t\t// `tree` is always a single character.\n\t\t\t// If `tree.indexOf(characterString) === 0`\n\t\t\t// then `characters.length === tree.length`.\n\t\t\t/* istanbul ignore else */\n\t\t\tif (characters.length === tree.length) {\n\t\t\t\treturn {\n\t\t\t\t\tmatch: true,\n\t\t\t\t\tmatchedChars: characters\n\t\t\t\t}\n\t\t\t}\n\t\t\t// `tree` is always a single character.\n\t\t\t// If `tree.indexOf(characterString) === 0`\n\t\t\t// then `characters.length === tree.length`.\n\t\t\t/* istanbul ignore next */\n\t\t\treturn {\n\t\t\t\tpartialMatch: true,\n\t\t\t\t// matchedChars: characters\n\t\t\t}\n\t\t}\n\t\tif (characterString.indexOf(tree) === 0) {\n\t\t\tif (last) {\n\t\t\t\t// The `else` path is not possible because `tree` is always a single character.\n\t\t\t\t// The `else` case for `characters.length > tree.length` would be\n\t\t\t\t// `characters.length <= tree.length` which means `characters.length <= 1`.\n\t\t\t\t// `characters` array can't be empty, so that means `characters === [tree]`,\n\t\t\t\t// which would also mean `tree.indexOf(characterString) === 0` and that'd mean\n\t\t\t\t// that the `if (tree.indexOf(characterString) === 0)` condition before this\n\t\t\t\t// `if` condition would be entered, and returned from there, not reaching this code.\n\t\t\t\t/* istanbul ignore else */\n\t\t\t\tif (characters.length > tree.length) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\toverflow: true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tmatch: true,\n\t\t\t\tmatchedChars: characters.slice(0, tree.length)\n\t\t\t}\n\t\t}\n\t\treturn\n\t}\n\n\tif (Array.isArray(tree)) {\n\t\tlet restCharacters = characters.slice()\n\t\tlet i = 0\n\t\twhile (i < tree.length) {\n\t\t\tconst subtree = tree[i]\n\t\t\tconst result = match(restCharacters, subtree, last && (i === tree.length - 1))\n\t\t\tif (!result) {\n\t\t\t\treturn\n\t\t\t} else if (result.overflow) {\n\t\t\t\treturn result\n\t\t\t} else if (result.match) {\n\t\t\t\t// Continue with the next subtree with the rest of the characters.\n\t\t\t\trestCharacters = restCharacters.slice(result.matchedChars.length)\n\t\t\t\tif (restCharacters.length === 0) {\n\t\t\t\t\tif (i === tree.length - 1) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tmatch: true,\n\t\t\t\t\t\t\tmatchedChars: characters\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tpartialMatch: true,\n\t\t\t\t\t\t\t// matchedChars: characters\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/* istanbul ignore else */\n\t\t\t\tif (result.partialMatch) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpartialMatch: true,\n\t\t\t\t\t\t// matchedChars: characters\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Unsupported match result:\\n${JSON.stringify(result, null, 2)}`)\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++\n\t\t}\n\t\t// If `last` then overflow has already been checked\n\t\t// by the last element of the `tree` array.\n\t\t/* istanbul ignore if */\n\t\tif (last) {\n\t\t\treturn {\n\t\t\t\toverflow: true\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tmatch: true,\n\t\t\tmatchedChars: characters.slice(0, characters.length - restCharacters.length)\n\t\t}\n\t}\n\n\tswitch (tree.op) {\n\t\tcase '|':\n\t\t\tlet partialMatch\n\t\t\tfor (const branch of tree.args) {\n\t\t\t\tconst result = match(characters, branch, last)\n\t\t\t\tif (result) {\n\t\t\t\t\tif (result.overflow) {\n\t\t\t\t\t\treturn result\n\t\t\t\t\t} else if (result.match) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tmatch: true,\n\t\t\t\t\t\t\tmatchedChars: result.matchedChars\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t/* istanbul ignore else */\n\t\t\t\t\t\tif (result.partialMatch) {\n\t\t\t\t\t\t\tpartialMatch = true\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new Error(`Unsupported match result:\\n${JSON.stringify(result, null, 2)}`)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (partialMatch) {\n\t\t\t\treturn {\n\t\t\t\t\tpartialMatch: true,\n\t\t\t\t\t// matchedChars: ...\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Not even a partial match.\n\t\t\treturn\n\n\t\tcase '[]':\n\t\t\tfor (const char of tree.args) {\n\t\t\t\tif (characters[0] === char) {\n\t\t\t\t\tif (characters.length === 1) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tmatch: true,\n\t\t\t\t\t\t\tmatchedChars: characters\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (last) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\toverflow: true\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tmatch: true,\n\t\t\t\t\t\tmatchedChars: [char]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// No character matches.\n\t\t\treturn\n\n\t\t/* istanbul ignore next */\n\t\tdefault:\n\t\t\tthrow new Error(`Unsupported instruction tree: ${tree}`)\n\t}\n}","import {\n\tDIGIT_PLACEHOLDER,\n\tcountOccurences,\n\trepeat,\n\tcutAndStripNonPairedParens,\n\tcloseNonPairedParens,\n\tstripNonPairedParens,\n\tpopulateTemplateWithDigits\n} from './AsYouTypeFormatter.util.js'\n\nimport formatCompleteNumber, {\n\tcanFormatCompleteNumber\n} from './AsYouTypeFormatter.complete.js'\n\nimport PatternMatcher from './AsYouTypeFormatter.PatternMatcher.js'\n\nimport parseDigits from './helpers/parseDigits.js'\nexport { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.util.js'\nimport { FIRST_GROUP_PATTERN } from './helpers/formatNationalNumberUsingFormat.js'\nimport { VALID_PUNCTUATION } from './constants.js'\nimport applyInternationalSeparatorStyle from './helpers/applyInternationalSeparatorStyle.js'\n\n// Used in phone number format template creation.\n// Could be any digit, I guess.\nconst DUMMY_DIGIT = '9'\n// I don't know why is it exactly `15`\nconst LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15\n// Create a phone number consisting only of the digit 9 that matches the\n// `number_pattern` by applying the pattern to the \"longest phone number\" string.\nconst LONGEST_DUMMY_PHONE_NUMBER = repeat(DUMMY_DIGIT, LONGEST_NATIONAL_PHONE_NUMBER_LENGTH)\n\n// A set of characters that, if found in a national prefix formatting rules, are an indicator to\n// us that we should separate the national prefix from the number when formatting.\nconst NATIONAL_PREFIX_SEPARATORS_PATTERN = /[- ]/\n\n// Deprecated: Google has removed some formatting pattern related code from their repo.\n// https://github.com/googlei18n/libphonenumber/commit/a395b4fef3caf57c4bc5f082e1152a4d2bd0ba4c\n// \"We no longer have numbers in formatting matching patterns, only \\d.\"\n// Because this library supports generating custom metadata\n// some users may still be using old metadata so the relevant\n// code seems to stay until some next major version update.\nconst SUPPORT_LEGACY_FORMATTING_PATTERNS = true\n\n// A pattern that is used to match character classes in regular expressions.\n// An example of a character class is \"[1-4]\".\nconst CREATE_CHARACTER_CLASS_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && (() => /\\[([^\\[\\]])*\\]/g)\n\n// Any digit in a regular expression that actually denotes a digit. For\n// example, in the regular expression \"80[0-2]\\d{6,10}\", the first 2 digits\n// (8 and 0) are standalone digits, but the rest are not.\n// Two look-aheads are needed because the number following \\\\d could be a\n// two-digit number, since the phone number can be as long as 15 digits.\nconst CREATE_STANDALONE_DIGIT_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && (() => /\\d(?=[^,}][^,}])/g)\n\n// A regular expression that is used to determine if a `format` is\n// suitable to be used in the \"as you type formatter\".\n// A `format` is suitable when the resulting formatted number has\n// the same digits as the user has entered.\n//\n// In the simplest case, that would mean that the format\n// doesn't add any additional digits when formatting a number.\n// Google says that it also shouldn't add \"star\" (`*`) characters,\n// like it does in some Israeli formats.\n// Such basic format would only contain \"valid punctuation\"\n// and \"captured group\" identifiers ($1, $2, etc).\n//\n// An example of a format that adds additional digits:\n//\n// Country: `AR` (Argentina).\n// Format:\n// {\n// \"pattern\": \"(\\\\d)(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\n// \"leading_digits_patterns\": [\"91\"],\n// \"national_prefix_formatting_rule\": \"0$1\",\n// \"format\": \"$2 15-$3-$4\",\n// \"international_format\": \"$1 $2 $3-$4\"\n// }\n//\n// In the format above, the `format` adds `15` to the digits when formatting a number.\n// A sidenote: this format actually is suitable because `national_prefix_for_parsing`\n// has previously removed `15` from a national number, so re-adding `15` in `format`\n// doesn't actually result in any extra digits added to user's input.\n// But verifying that would be a complex procedure, so the code chooses a simpler path:\n// it simply filters out all `format`s that contain anything but \"captured group\" ids.\n//\n// This regular expression is called `ELIGIBLE_FORMAT_PATTERN` in Google's\n// `libphonenumber` code.\n//\nconst NON_ALTERING_FORMAT_REG_EXP = new RegExp(\n\t'[' + VALID_PUNCTUATION + ']*' +\n\t// Google developers say:\n\t// \"We require that the first matching group is present in the\n\t// output pattern to ensure no data is lost while formatting.\"\n\t'\\\\$1' +\n\t'[' + VALID_PUNCTUATION + ']*' +\n\t'(\\\\$\\\\d[' + VALID_PUNCTUATION + ']*)*' +\n\t'$'\n)\n\n// This is the minimum length of the leading digits of a phone number\n// to guarantee the first \"leading digits pattern\" for a phone number format\n// to be preemptive.\nconst MIN_LEADING_DIGITS_LENGTH = 3\n\nexport default class AsYouTypeFormatter {\n\tconstructor({\n\t\tstate,\n\t\tmetadata\n\t}) {\n\t\tthis.metadata = metadata\n\t\tthis.resetFormat()\n\t}\n\n\tresetFormat() {\n\t\tthis.chosenFormat = undefined\n\t\tthis.template = undefined\n\t\tthis.nationalNumberTemplate = undefined\n\t\tthis.populatedNationalNumberTemplate = undefined\n\t\tthis.populatedNationalNumberTemplatePosition = -1\n\t}\n\n\treset(numberingPlan, state) {\n\t\tthis.resetFormat()\n\t\tif (numberingPlan) {\n\t\t\tthis.isNANP = numberingPlan.callingCode() === '1'\n\t\t\tthis.matchingFormats = numberingPlan.formats()\n\t\t\tif (state.nationalSignificantNumber) {\n\t\t\t\tthis.narrowDownMatchingFormats(state)\n\t\t\t}\n\t\t} else {\n\t\t\tthis.isNANP = undefined\n\t\t\tthis.matchingFormats = []\n\t\t}\n\t}\n\n\t/**\n\t * Formats an updated phone number.\n\t * @param {string} nextDigits — Additional phone number digits.\n\t * @param {object} state — `AsYouType` state.\n\t * @return {[string]} Returns undefined if the updated phone number can't be formatted using any of the available formats.\n\t */\n\tformat(nextDigits, state) {\n\t\t// See if the phone number digits can be formatted as a complete phone number.\n\t\t// If not, use the results from `formatNationalNumberWithNextDigits()`,\n\t\t// which formats based on the chosen formatting pattern.\n\t\t//\n\t\t// Attempting to format complete phone number first is how it's done\n\t\t// in Google's `libphonenumber`, so this library just follows it.\n\t\t// Google's `libphonenumber` code doesn't explain in detail why does it\n\t\t// attempt to format digits as a complete phone number\n\t\t// instead of just going with a previoulsy (or newly) chosen `format`:\n\t\t//\n\t\t// \"Checks to see if there is an exact pattern match for these digits.\n\t\t// If so, we should use this instead of any other formatting template\n\t\t// whose leadingDigitsPattern also matches the input.\"\n\t\t//\n\t\tif (canFormatCompleteNumber(state.nationalSignificantNumber, this.metadata)) {\n\t\t\tfor (const format of this.matchingFormats) {\n\t\t\t\tconst formattedCompleteNumber = formatCompleteNumber(\n\t\t\t\t\tstate,\n\t\t\t\t\tformat,\n\t\t\t\t\t{\n\t\t\t\t\t\tmetadata: this.metadata,\n\t\t\t\t\t\tshouldTryNationalPrefixFormattingRule: (format) => this.shouldTryNationalPrefixFormattingRule(format, {\n\t\t\t\t\t\t\tinternational: state.international,\n\t\t\t\t\t\t\tnationalPrefix: state.nationalPrefix\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tgetSeparatorAfterNationalPrefix: (format) => this.getSeparatorAfterNationalPrefix(format)\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t\tif (formattedCompleteNumber) {\n\t\t\t\t\tthis.resetFormat()\n\t\t\t\t\tthis.chosenFormat = format\n\t\t\t\t\tthis.setNationalNumberTemplate(formattedCompleteNumber.replace(/\\d/g, DIGIT_PLACEHOLDER), state)\n\t\t\t\t\tthis.populatedNationalNumberTemplate = formattedCompleteNumber\n\t\t\t\t\t// With a new formatting template, the matched position\n\t\t\t\t\t// using the old template needs to be reset.\n\t\t\t\t\tthis.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(DIGIT_PLACEHOLDER)\n\t\t\t\t\treturn formattedCompleteNumber\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\t// Format the digits as a partial (incomplete) phone number\n\t\t// using the previously chosen formatting pattern (or a newly chosen one).\n\t\treturn this.formatNationalNumberWithNextDigits(nextDigits, state)\n\t}\n\n\t// Formats the next phone number digits.\n\tformatNationalNumberWithNextDigits(nextDigits, state) {\n\t\tconst previouslyChosenFormat = this.chosenFormat\n\n\t\t// Choose a format from the list of matching ones.\n\t\tconst newlyChosenFormat = this.chooseFormat(state)\n\n\t\tif (newlyChosenFormat) {\n\t\t\tif (newlyChosenFormat === previouslyChosenFormat) {\n\t\t\t\t// If it can format the next (current) digits\n\t\t\t\t// using the previously chosen phone number format\n\t\t\t\t// then return the updated formatted number.\n\t\t\t\treturn this.formatNextNationalNumberDigits(nextDigits)\n\t\t\t} else {\n\t\t\t\t// If a more appropriate phone number format\n\t\t\t\t// has been chosen for these \"leading digits\",\n\t\t\t\t// then re-format the national phone number part\n\t\t\t\t// using the newly selected format.\n\t\t\t\treturn this.formatNextNationalNumberDigits(state.getNationalDigits())\n\t\t\t}\n\t\t}\n\t}\n\n\tnarrowDownMatchingFormats({\n\t\tnationalSignificantNumber,\n\t\tnationalPrefix,\n\t\tinternational\n\t}) {\n\t\tconst leadingDigits = nationalSignificantNumber\n\n\t\t// \"leading digits\" pattern list starts with a\n\t\t// \"leading digits\" pattern fitting a maximum of 3 leading digits.\n\t\t// So, after a user inputs 3 digits of a national (significant) phone number\n\t\t// this national (significant) number can already be formatted.\n\t\t// The next \"leading digits\" pattern is for 4 leading digits max,\n\t\t// and the \"leading digits\" pattern after it is for 5 leading digits max, etc.\n\n\t\t// This implementation is different from Google's\n\t\t// in that it searches for a fitting format\n\t\t// even if the user has entered less than\n\t\t// `MIN_LEADING_DIGITS_LENGTH` digits of a national number.\n\t\t// Because some leading digit patterns already match for a single first digit.\n\t\tlet leadingDigitsPatternIndex = leadingDigits.length - MIN_LEADING_DIGITS_LENGTH\n\t\tif (leadingDigitsPatternIndex < 0) {\n\t\t\tleadingDigitsPatternIndex = 0\n\t\t}\n\n\t\tthis.matchingFormats = this.matchingFormats.filter(\n\t\t\tformat => this.formatSuits(format, international, nationalPrefix)\n\t\t\t\t&& this.formatMatches(format, leadingDigits, leadingDigitsPatternIndex)\n\t\t)\n\n\t\t// If there was a phone number format chosen\n\t\t// and it no longer holds given the new leading digits then reset it.\n\t\t// The test for this `if` condition is marked as:\n\t\t// \"Reset a chosen format when it no longer holds given the new leading digits\".\n\t\t// To construct a valid test case for this one can find a country\n\t\t// in `PhoneNumberMetadata.xml` yielding one format for 3 `<leadingDigits>`\n\t\t// and yielding another format for 4 `<leadingDigits>` (Australia in this case).\n\t\tif (this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1) {\n\t\t\tthis.resetFormat()\n\t\t}\n\t}\n\n\tformatSuits(format, international, nationalPrefix) {\n\t\t// When a prefix before a national (significant) number is\n\t\t// simply a national prefix, then it's parsed as `this.nationalPrefix`.\n\t\t// In more complex cases, a prefix before national (significant) number\n\t\t// could include a national prefix as well as some \"capturing groups\",\n\t\t// and in that case there's no info whether a national prefix has been parsed.\n\t\t// If national prefix is not used when formatting a phone number\n\t\t// using this format, but a national prefix has been entered by the user,\n\t\t// and was extracted, then discard such phone number format.\n\t\t// In Google's \"AsYouType\" formatter code, the equivalent would be this part:\n\t\t// https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L175-L184\n\t\tif (nationalPrefix &&\n\t\t\t!format.usesNationalPrefix() &&\n\t\t\t// !format.domesticCarrierCodeFormattingRule() &&\n\t\t\t!format.nationalPrefixIsOptionalWhenFormattingInNationalFormat()) {\n\t\t\treturn false\n\t\t}\n\t\t// If national prefix is mandatory for this phone number format\n\t\t// and there're no guarantees that a national prefix is present in user input\n\t\t// then discard this phone number format as not suitable.\n\t\t// In Google's \"AsYouType\" formatter code, the equivalent would be this part:\n\t\t// https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L185-L193\n\t\tif (!international &&\n\t\t\t!nationalPrefix &&\n\t\t\tformat.nationalPrefixIsMandatoryWhenFormattingInNationalFormat()) {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n\n\tformatMatches(format, leadingDigits, leadingDigitsPatternIndex) {\n\t\tconst leadingDigitsPatternsCount = format.leadingDigitsPatterns().length\n\n\t\t// If this format is not restricted to a certain\n\t\t// leading digits pattern then it fits.\n\t\t// The test case could be found by searching for \"leadingDigitsPatternsCount === 0\".\n\t\tif (leadingDigitsPatternsCount === 0) {\n\t\t\treturn true\n\t\t}\n\n\t\t// Start narrowing down the list of possible formats based on the leading digits.\n\t\t// (only previously matched formats take part in the narrowing down process)\n\n\t\t// `leading_digits_patterns` start with 3 digits min\n\t\t// and then go up from there one digit at a time.\n\t\tleadingDigitsPatternIndex = Math.min(leadingDigitsPatternIndex, leadingDigitsPatternsCount - 1)\n\t\tconst leadingDigitsPattern = format.leadingDigitsPatterns()[leadingDigitsPatternIndex]\n\n\t\t// Google imposes a requirement on the leading digits\n\t\t// to be minimum 3 digits long in order to be eligible\n\t\t// for checking those with a leading digits pattern.\n\t\t//\n\t\t// Since `leading_digits_patterns` start with 3 digits min,\n\t\t// Google's original `libphonenumber` library only starts\n\t\t// excluding any non-matching formats only when the\n\t\t// national number entered so far is at least 3 digits long,\n\t\t// otherwise format matching would give false negatives.\n\t\t//\n\t\t// For example, when the digits entered so far are `2`\n\t\t// and the leading digits pattern is `21` –\n\t\t// it's quite obvious in this case that the format could be the one\n\t\t// but due to the absence of further digits it would give false negative.\n\t\t//\n\t\t// Also, `leading_digits_patterns` doesn't always correspond to a single\n\t\t// digits count. For example, `60|8` pattern would already match `8`\n\t\t// but the `60` part would require having at least two leading digits,\n\t\t// so the whole pattern would require inputting two digits first in order to\n\t\t// decide on whether it matches the input, even when the input is \"80\".\n\t\t//\n\t\t// This library — `libphonenumber-js` — allows filtering by `leading_digits_patterns`\n\t\t// even when there's only 1 or 2 digits of the national (significant) number.\n\t\t// To do that, it uses a non-strict pattern matcher written specifically for that.\n\t\t//\n\t\tif (leadingDigits.length < MIN_LEADING_DIGITS_LENGTH) {\n\t\t\t// Before leading digits < 3 matching was implemented:\n\t\t\t// return true\n\t\t\t//\n\t\t\t// After leading digits < 3 matching was implemented:\n\t\t\ttry {\n\t\t\t\treturn new PatternMatcher(leadingDigitsPattern).match(leadingDigits, { allowOverflow: true }) !== undefined\n\t\t\t} catch (error) /* istanbul ignore next */ {\n\t\t\t\t// There's a slight possibility that there could be some undiscovered bug\n\t\t\t\t// in the pattern matcher code. Since the \"leading digits < 3 matching\"\n\t\t\t\t// feature is not \"essential\" for operation, it can fall back to the old way\n\t\t\t\t// in case of any issues rather than halting the application's execution.\n\t\t\t\tconsole.error(error)\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\t// If at least `MIN_LEADING_DIGITS_LENGTH` digits of a national number are\n\t\t// available then use the usual regular expression matching.\n\t\t//\n\t\t// The whole pattern is wrapped in round brackets (`()`) because\n\t\t// the pattern can use \"or\" operator (`|`) at the top level of the pattern.\n\t\t//\n\t\treturn new RegExp(`^(${leadingDigitsPattern})`).test(leadingDigits)\n\t}\n\n\tgetFormatFormat(format, international) {\n\t\treturn international ? format.internationalFormat() : format.format()\n\t}\n\n\tchooseFormat(state) {\n\t\t// When there are multiple available formats, the formatter uses the first\n\t\t// format where a formatting template could be created.\n\t\t//\n\t\t// For some weird reason, `istanbul` says \"else path not taken\"\n\t\t// for the `for of` line below. Supposedly that means that\n\t\t// the loop doesn't ever go over the last element in the list.\n\t\t// That's true because there always is `this.chosenFormat`\n\t\t// when `this.matchingFormats` is non-empty.\n\t\t// And, for some weird reason, it doesn't think that the case\n\t\t// with empty `this.matchingFormats` qualifies for a valid \"else\" path.\n\t\t// So simply muting this `istanbul` warning.\n\t\t// It doesn't skip the contents of the `for of` loop,\n\t\t// it just skips the `for of` line.\n\t\t//\n\t\t/* istanbul ignore next */\n\t\tfor (const format of this.matchingFormats.slice()) {\n\t\t\t// If this format is currently being used\n\t\t\t// and is still suitable, then stick to it.\n\t\t\tif (this.chosenFormat === format) {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// Sometimes, a formatting rule inserts additional digits in a phone number,\n\t\t\t// and \"as you type\" formatter can't do that: it should only use the digits\n\t\t\t// that the user has input.\n\t\t\t//\n\t\t\t// For example, in Argentina, there's a format for mobile phone numbers:\n\t\t\t//\n\t\t\t// {\n\t\t\t// \"pattern\": \"(\\\\d)(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\n\t\t\t// \"leading_digits_patterns\": [\"91\"],\n\t\t\t// \"national_prefix_formatting_rule\": \"0$1\",\n\t\t\t// \"format\": \"$2 15-$3-$4\",\n\t\t\t// \"international_format\": \"$1 $2 $3-$4\"\n\t\t\t// }\n\t\t\t//\n\t\t\t// In that format, `international_format` is used instead of `format`\n\t\t\t// because `format` inserts `15` in the formatted number,\n\t\t\t// and `AsYouType` formatter should only use the digits\n\t\t\t// the user has actually input, without adding any extra digits.\n\t\t\t// In this case, it wouldn't make a difference, because the `15`\n\t\t\t// is first stripped when applying `national_prefix_for_parsing`\n\t\t\t// and then re-added when using `format`, so in reality it doesn't\n\t\t\t// add any new digits to the number, but to detect that, the code\n\t\t\t// would have to be more complex: it would have to try formatting\n\t\t\t// the digits using the format and then see if any digits have\n\t\t\t// actually been added or removed, and then, every time a new digit\n\t\t\t// is input, it should re-check whether the chosen format doesn't\n\t\t\t// alter the digits.\n\t\t\t//\n\t\t\t// Google's code doesn't go that far, and so does this library:\n\t\t\t// it simply requires that a `format` doesn't add any additonal\n\t\t\t// digits to user's input.\n\t\t\t//\n\t\t\t// Also, people in general should move from inputting phone numbers\n\t\t\t// in national format (possibly with national prefixes)\n\t\t\t// and use international phone number format instead:\n\t\t\t// it's a logical thing in the modern age of mobile phones,\n\t\t\t// globalization and the internet.\n\t\t\t//\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!NON_ALTERING_FORMAT_REG_EXP.test(this.getFormatFormat(format, state.international))) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif (!this.createTemplateForFormat(format, state)) {\n\t\t\t\t// Remove the format if it can't generate a template.\n\t\t\t\tthis.matchingFormats = this.matchingFormats.filter(_ => _ !== format)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tthis.chosenFormat = format\n\t\t\tbreak\n\t\t}\n\t\tif (!this.chosenFormat) {\n\t\t\t// No format matches the national (significant) phone number.\n\t\t\tthis.resetFormat()\n\t\t}\n\t\treturn this.chosenFormat\n\t}\n\n\tcreateTemplateForFormat(format, state) {\n\t\t// The formatter doesn't format numbers when numberPattern contains '|', e.g.\n\t\t// (20|3)\\d{4}. In those cases we quickly return.\n\t\t// (Though there's no such format in current metadata)\n\t\t/* istanbul ignore if */\n\t\tif (SUPPORT_LEGACY_FORMATTING_PATTERNS && format.pattern().indexOf('|') >= 0) {\n\t\t\treturn\n\t\t}\n\t\t// Get formatting template for this phone number format\n\t\tconst template = this.getTemplateForFormat(format, state)\n\t\t// If the national number entered is too long\n\t\t// for any phone number format, then abort.\n\t\tif (template) {\n\t\t\tthis.setNationalNumberTemplate(template, state)\n\t\t\treturn true\n\t\t}\n\t}\n\n\tgetSeparatorAfterNationalPrefix(format) {\n\t\t// `US` metadata doesn't have a `national_prefix_formatting_rule`,\n\t\t// so the `if` condition below doesn't apply to `US`,\n\t\t// but in reality there shoudl be a separator\n\t\t// between a national prefix and a national (significant) number.\n\t\t// So `US` national prefix separator is a \"special\" \"hardcoded\" case.\n\t\tif (this.isNANP) {\n\t\t\treturn ' '\n\t\t}\n\t\t// If a `format` has a `national_prefix_formatting_rule`\n\t\t// and that rule has a separator after a national prefix,\n\t\t// then it means that there should be a separator\n\t\t// between a national prefix and a national (significant) number.\n\t\tif (format &&\n\t\t\tformat.nationalPrefixFormattingRule() &&\n\t\t\tNATIONAL_PREFIX_SEPARATORS_PATTERN.test(format.nationalPrefixFormattingRule())) {\n\t\t\treturn ' '\n\t\t}\n\t\t// At this point, there seems to be no clear evidence that\n\t\t// there should be a separator between a national prefix\n\t\t// and a national (significant) number. So don't insert one.\n\t\treturn ''\n\t}\n\n\tgetInternationalPrefixBeforeCountryCallingCode({ IDDPrefix, missingPlus }, options) {\n\t\tif (IDDPrefix) {\n\t\t\treturn options && options.spacing === false ? IDDPrefix : IDDPrefix + ' '\n\t\t}\n\t\tif (missingPlus) {\n\t\t\treturn ''\n\t\t}\n\t\treturn '+'\n\t}\n\n\tgetTemplate(state) {\n\t\tif (!this.template) {\n\t\t\treturn\n\t\t}\n\t\t// `this.template` holds the template for a \"complete\" phone number.\n\t\t// The currently entered phone number is most likely not \"complete\",\n\t\t// so trim all non-populated digits.\n\t\tlet index = -1\n\t\tlet i = 0\n\t\tconst internationalPrefix = state.international ? this.getInternationalPrefixBeforeCountryCallingCode(state, { spacing: false }) : ''\n\t\twhile (i < internationalPrefix.length + state.getDigitsWithoutInternationalPrefix().length) {\n\t\t\tindex = this.template.indexOf(DIGIT_PLACEHOLDER, index + 1)\n\t\t\ti++\n\t\t}\n\t\treturn cutAndStripNonPairedParens(this.template, index + 1)\n\t}\n\n\tsetNationalNumberTemplate(template, state) {\n\t\tthis.nationalNumberTemplate = template\n\t\tthis.populatedNationalNumberTemplate = template\n\t\t// With a new formatting template, the matched position\n\t\t// using the old template needs to be reset.\n\t\tthis.populatedNationalNumberTemplatePosition = -1\n\t\t// For convenience, the public `.template` property\n\t\t// contains the whole international number\n\t\t// if the phone number being input is international:\n\t\t// 'x' for the '+' sign, 'x'es for the country phone code,\n\t\t// a spacebar and then the template for the formatted national number.\n\t\tif (state.international) {\n\t\t\tthis.template =\n\t\t\t\tthis.getInternationalPrefixBeforeCountryCallingCode(state).replace(/[\\d\\+]/g, DIGIT_PLACEHOLDER) +\n\t\t\t\trepeat(DIGIT_PLACEHOLDER, state.callingCode.length) +\n\t\t\t\t' ' +\n\t\t\t\ttemplate\n\t\t} else {\n\t\t\tthis.template = template\n\t\t}\n\t}\n\n\t/**\n\t * Generates formatting template for a national phone number,\n\t * optionally containing a national prefix, for a format.\n\t * @param {Format} format\n\t * @param {string} nationalPrefix\n\t * @return {string}\n\t */\n\tgetTemplateForFormat(format, {\n\t\tnationalSignificantNumber,\n\t\tinternational,\n\t\tnationalPrefix,\n\t\tprefixBeforeNationalSignificantNumberThatIsNotNationalPrefix\n\t}) {\n\t\tlet pattern = format.pattern()\n\n\t\t/* istanbul ignore else */\n\t\tif (SUPPORT_LEGACY_FORMATTING_PATTERNS) {\n\t\t\tpattern = pattern\n\t\t\t\t// Replace anything in the form of [..] with \\d\n\t\t\t\t.replace(CREATE_CHARACTER_CLASS_PATTERN(), '\\\\d')\n\t\t\t\t// Replace any standalone digit (not the one in `{}`) with \\d\n\t\t\t\t.replace(CREATE_STANDALONE_DIGIT_PATTERN(), '\\\\d')\n\t\t}\n\n\t\t// Generate a dummy national number (consisting of `9`s)\n\t\t// that fits this format's `pattern`.\n\t\t//\n\t\t// This match will always succeed,\n\t\t// because the \"longest dummy phone number\"\n\t\t// has enough length to accomodate any possible\n\t\t// national phone number format pattern.\n\t\t//\n\t\tlet digits = LONGEST_DUMMY_PHONE_NUMBER.match(pattern)[0]\n\n\t\t// If the national number entered is too long\n\t\t// for any phone number format, then abort.\n\t\tif (nationalSignificantNumber.length > digits.length) {\n\t\t\treturn\n\t\t}\n\n\t\t// Get a formatting template which can be used to efficiently format\n\t\t// a partial number where digits are added one by one.\n\n\t\t// Below `strictPattern` is used for the\n\t\t// regular expression (with `^` and `$`).\n\t\t// This wasn't originally in Google's `libphonenumber`\n\t\t// and I guess they don't really need it\n\t\t// because they're not using \"templates\" to format phone numbers\n\t\t// but I added `strictPattern` after encountering\n\t\t// South Korean phone number formatting bug.\n\t\t//\n\t\t// Non-strict regular expression bug demonstration:\n\t\t//\n\t\t// this.nationalSignificantNumber : `111111111` (9 digits)\n\t\t//\n\t\t// pattern : (\\d{2})(\\d{3,4})(\\d{4})\n\t\t// format : `$1 $2 $3`\n\t\t// digits : `9999999999` (10 digits)\n\t\t//\n\t\t// '9999999999'.replace(new RegExp(/(\\d{2})(\\d{3,4})(\\d{4})/g), '$1 $2 $3') = \"99 9999 9999\"\n\t\t//\n\t\t// template : xx xxxx xxxx\n\t\t//\n\t\t// But the correct template in this case is `xx xxx xxxx`.\n\t\t// The template was generated incorrectly because of the\n\t\t// `{3,4}` variability in the `pattern`.\n\t\t//\n\t\t// The fix is, if `this.nationalSignificantNumber` has already sufficient length\n\t\t// to satisfy the `pattern` completely then `this.nationalSignificantNumber`\n\t\t// is used instead of `digits`.\n\n\t\tconst strictPattern = new RegExp('^' + pattern + '$')\n\t\tconst nationalNumberDummyDigits = nationalSignificantNumber.replace(/\\d/g, DUMMY_DIGIT)\n\n\t\t// If `this.nationalSignificantNumber` has already sufficient length\n\t\t// to satisfy the `pattern` completely then use it\n\t\t// instead of `digits`.\n\t\tif (strictPattern.test(nationalNumberDummyDigits)) {\n\t\t\tdigits = nationalNumberDummyDigits\n\t\t}\n\n\t\tlet numberFormat = this.getFormatFormat(format, international)\n\t\tlet nationalPrefixIncludedInTemplate\n\n\t\t// If a user did input a national prefix (and that's guaranteed),\n\t\t// and if a `format` does have a national prefix formatting rule,\n\t\t// then see if that national prefix formatting rule\n\t\t// prepends exactly the same national prefix the user has input.\n\t\t// If that's the case, then use the `format` with the national prefix formatting rule.\n\t\t// Otherwise, use the `format` without the national prefix formatting rule,\n\t\t// and prepend a national prefix manually to it.\n\t\tif (this.shouldTryNationalPrefixFormattingRule(format, { international, nationalPrefix })) {\n\t\t\tconst numberFormatWithNationalPrefix = numberFormat.replace(\n\t\t\t\tFIRST_GROUP_PATTERN,\n\t\t\t\tformat.nationalPrefixFormattingRule()\n\t\t\t)\n\t\t\t// If `national_prefix_formatting_rule` of a `format` simply prepends\n\t\t\t// national prefix at the start of a national (significant) number,\n\t\t\t// then such formatting can be used with `AsYouType` formatter.\n\t\t\t// There seems to be no `else` case: everywhere in metadata,\n\t\t\t// national prefix formatting rule is national prefix + $1,\n\t\t\t// or `($1)`, in which case such format isn't even considered\n\t\t\t// when the user has input a national prefix.\n\t\t\t/* istanbul ignore else */\n\t\t\tif (parseDigits(format.nationalPrefixFormattingRule()) === (nationalPrefix || '') + parseDigits('$1')) {\n\t\t\t\tnumberFormat = numberFormatWithNationalPrefix\n\t\t\t\tnationalPrefixIncludedInTemplate = true\n\t\t\t\t// Replace all digits of the national prefix in the formatting template\n\t\t\t\t// with `DIGIT_PLACEHOLDER`s.\n\t\t\t\tif (nationalPrefix) {\n\t\t\t\t\tlet i = nationalPrefix.length\n\t\t\t\t\twhile (i > 0) {\n\t\t\t\t\t\tnumberFormat = numberFormat.replace(/\\d/, DIGIT_PLACEHOLDER)\n\t\t\t\t\t\ti--\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Generate formatting template for this phone number format.\n\t\tlet template = digits\n\t\t\t// Format the dummy phone number according to the format.\n\t\t\t.replace(new RegExp(pattern), numberFormat)\n\t\t\t// Replace each dummy digit with a DIGIT_PLACEHOLDER.\n\t\t\t.replace(new RegExp(DUMMY_DIGIT, 'g'), DIGIT_PLACEHOLDER)\n\n\t\t// If a prefix of a national (significant) number is not as simple\n\t\t// as just a basic national prefix, then just prepend such prefix\n\t\t// before the national (significant) number, optionally spacing\n\t\t// the two with a whitespace.\n\t\tif (!nationalPrefixIncludedInTemplate) {\n\t\t\tif (prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix) {\n\t\t\t\t// Prepend the prefix to the template manually.\n\t\t\t\ttemplate = repeat(DIGIT_PLACEHOLDER, prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix.length) +\n\t\t\t\t\t' ' +\n\t\t\t\t\ttemplate\n\t\t\t} else if (nationalPrefix) {\n\t\t\t\t// Prepend national prefix to the template manually.\n\t\t\t\ttemplate = repeat(DIGIT_PLACEHOLDER, nationalPrefix.length) +\n\t\t\t\t\tthis.getSeparatorAfterNationalPrefix(format) +\n\t\t\t\t\ttemplate\n\t\t\t}\n\t\t}\n\n\t\tif (international) {\n\t\t\ttemplate = applyInternationalSeparatorStyle(template)\n\t\t}\n\n\t\treturn template\n\t}\n\n\tformatNextNationalNumberDigits(digits) {\n\t\tconst result = populateTemplateWithDigits(\n\t\t\tthis.populatedNationalNumberTemplate,\n\t\t\tthis.populatedNationalNumberTemplatePosition,\n\t\t\tdigits\n\t\t)\n\n\t\tif (!result) {\n\t\t\t// Reset the format.\n\t\t\tthis.resetFormat()\n\t\t\treturn\n\t\t}\n\n\t\tthis.populatedNationalNumberTemplate = result[0]\n\t\tthis.populatedNationalNumberTemplatePosition = result[1]\n\n\t\t// Return the formatted phone number so far.\n\t\treturn cutAndStripNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1)\n\n\t\t// The old way which was good for `input-format` but is not so good\n\t\t// for `react-phone-number-input`'s default input (`InputBasic`).\n\t\t// return closeNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1)\n\t\t// \t.replace(new RegExp(DIGIT_PLACEHOLDER, 'g'), ' ')\n\t}\n\n\tshouldTryNationalPrefixFormattingRule(format, { international, nationalPrefix }) {\n\t\tif (format.nationalPrefixFormattingRule()) {\n\t\t\t// In some countries, `national_prefix_formatting_rule` is `($1)`,\n\t\t\t// so it applies even if the user hasn't input a national prefix.\n\t\t\t// `format.usesNationalPrefix()` detects such cases.\n\t\t\tconst usesNationalPrefix = format.usesNationalPrefix()\n\t\t\tif ((usesNationalPrefix && nationalPrefix) ||\n\t\t\t\t(!usesNationalPrefix && !international)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n}","import extractCountryCallingCode from './helpers/extractCountryCallingCode.js'\nimport extractCountryCallingCodeFromInternationalNumberWithoutPlusSign from './helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js'\nimport extractNationalNumberFromPossiblyIncompleteNumber from './helpers/extractNationalNumberFromPossiblyIncompleteNumber.js'\nimport stripIddPrefix from './helpers/stripIddPrefix.js'\nimport parseDigits from './helpers/parseDigits.js'\n\nimport {\n\tVALID_DIGITS,\n\tVALID_PUNCTUATION,\n\tPLUS_CHARS\n} from './constants.js'\n\nconst VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART =\n\t'[' +\n\t\tVALID_PUNCTUATION +\n\t\tVALID_DIGITS +\n\t']+'\n\nconst VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp('^' + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + '$', 'i')\n\nconst VALID_FORMATTED_PHONE_NUMBER_PART =\n\t'(?:' +\n\t\t'[' + PLUS_CHARS + ']' +\n\t\t'[' +\n\t\t\tVALID_PUNCTUATION +\n\t\t\tVALID_DIGITS +\n\t\t']*' +\n\t\t'|' +\n\t\t'[' +\n\t\t\tVALID_PUNCTUATION +\n\t\t\tVALID_DIGITS +\n\t\t']+' +\n\t')'\n\nconst AFTER_PHONE_NUMBER_DIGITS_END_PATTERN = new RegExp(\n\t'[^' +\n\t\tVALID_PUNCTUATION +\n\t\tVALID_DIGITS +\n\t']+' +\n\t'.*' +\n\t'$'\n)\n\n// Tests whether `national_prefix_for_parsing` could match\n// different national prefixes.\n// Matches anything that's not a digit or a square bracket.\nconst COMPLEX_NATIONAL_PREFIX = /[^\\d\\[\\]]/\n\nexport default class AsYouTypeParser {\n\tconstructor({\n\t\tdefaultCountry,\n\t\tdefaultCallingCode,\n\t\tmetadata,\n\t\tonNationalSignificantNumberChange\n\t}) {\n\t\tthis.defaultCountry = defaultCountry\n\t\tthis.defaultCallingCode = defaultCallingCode\n\t\tthis.metadata = metadata\n\t\tthis.onNationalSignificantNumberChange = onNationalSignificantNumberChange\n\t}\n\n\tinput(text, state) {\n\t\tconst [formattedDigits, hasPlus] = extractFormattedDigitsAndPlus(text)\n\t\tconst digits = parseDigits(formattedDigits)\n\t\t// Checks for a special case: just a leading `+` has been entered.\n\t\tlet justLeadingPlus\n\t\tif (hasPlus) {\n\t\t\tif (!state.digits) {\n\t\t\t\tstate.startInternationalNumber(undefined, undefined)\n\t\t\t\tif (!digits) {\n\t\t\t\t\tjustLeadingPlus = true\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (digits) {\n\t\t\tthis.inputDigits(digits, state)\n\t\t}\n\t\treturn {\n\t\t\tdigits,\n\t\t\tjustLeadingPlus\n\t\t}\n\t}\n\n\t/**\n\t * Inputs \"next\" phone number digits.\n\t * @param {string} digits\n\t * @return {string} [formattedNumber] Formatted national phone number (if it can be formatted at this stage). Returning `undefined` means \"don't format the national phone number at this stage\".\n\t */\n\tinputDigits(nextDigits, state) {\n\t\tconst { digits } = state\n\t\tconst hasReceivedThreeLeadingDigits = digits.length < 3 && digits.length + nextDigits.length >= 3\n\n\t\t// Append phone number digits.\n\t\tstate.appendDigits(nextDigits)\n\n\t\t// Attempt to extract IDD prefix:\n\t\t// Some users input their phone number in international format,\n\t\t// but in an \"out-of-country\" dialing format instead of using the leading `+`.\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/185\n\t\t// Detect such numbers as soon as there're at least 3 digits.\n\t\t// Google's library attempts to extract IDD prefix at 3 digits,\n\t\t// so this library just copies that behavior.\n\t\t// I guess that's because the most commot IDD prefixes are\n\t\t// `00` (Europe) and `011` (US).\n\t\t// There exist really long IDD prefixes too:\n\t\t// for example, in Australia the default IDD prefix is `0011`,\n\t\t// and it could even be as long as `14880011`.\n\t\t// An IDD prefix is extracted here, and then every time when\n\t\t// there's a new digit and the number couldn't be formatted.\n\t\tif (hasReceivedThreeLeadingDigits) {\n\t\t\tthis.extractIddPrefix(state)\n\t\t}\n\n\t\tif (this.isWaitingForCountryCallingCode(state)) {\n\t\t\tif (!this.extractCountryCallingCode(state)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t} else {\n\t\t\tstate.appendNationalSignificantNumberDigits(nextDigits)\n\t\t}\n\n\t\t// If a phone number is being input in international format,\n\t\t// then it's not valid for it to have a national prefix.\n\t\t// Still, some people incorrectly input such numbers with a national prefix.\n\t\t// In such cases, only attempt to strip a national prefix if the number becomes too long.\n\t\t// (but that is done later, not here)\n\t\tif (!state.international) {\n\t\t\tif (!this.hasExtractedNationalSignificantNumber) {\n\t\t\t\tthis.extractNationalSignificantNumber(\n\t\t\t\t\tstate.getNationalDigits(),\n\t\t\t\t\t(stateUpdate) => state.update(stateUpdate)\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\n\tisWaitingForCountryCallingCode({ international, callingCode }) {\n\t\treturn international && !callingCode\n\t}\n\n\t// Extracts a country calling code from a number\n\t// being entered in internatonal format.\n\textractCountryCallingCode(state) {\n\t\tconst { countryCallingCode, number } = extractCountryCallingCode(\n\t\t\t'+' + state.getDigitsWithoutInternationalPrefix(),\n\t\t\tstate.country,\n\t\t\tthis.defaultCountry,\n\t\t\tthis.defaultCallingCode,\n\t\t\tthis.metadata.metadata\n\t\t)\n\t\tif (countryCallingCode) {\n\t\t\tstate.setCallingCode(countryCallingCode)\n\t\t\tstate.update({\n\t\t\t\tnationalSignificantNumber: number\n\t\t\t})\n\t\t\treturn true\n\t\t}\n\t}\n\n\treset(numberingPlan) {\n\t\tif (numberingPlan) {\n\t\t\tthis.hasSelectedNumberingPlan = true\n\t\t\tconst nationalPrefixForParsing = numberingPlan._nationalPrefixForParsing()\n\t\t\tthis.couldPossiblyExtractAnotherNationalSignificantNumber = nationalPrefixForParsing && COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing)\n\t\t} else {\n\t\t\tthis.hasSelectedNumberingPlan = undefined\n\t\t\tthis.couldPossiblyExtractAnotherNationalSignificantNumber = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Extracts a national (significant) number from user input.\n\t * Google's library is different in that it only applies `national_prefix_for_parsing`\n\t * and doesn't apply `national_prefix_transform_rule` after that.\n\t * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539\n\t * @return {boolean} [extracted]\n\t */\n\textractNationalSignificantNumber(nationalDigits, setState) {\n\t\tif (!this.hasSelectedNumberingPlan) {\n\t\t\treturn\n\t\t}\n\t\tconst {\n\t\t\tnationalPrefix,\n\t\t\tnationalNumber,\n\t\t\tcarrierCode\n\t\t} = extractNationalNumberFromPossiblyIncompleteNumber(\n\t\t\tnationalDigits,\n\t\t\tthis.metadata\n\t\t)\n\t\tif (nationalNumber === nationalDigits) {\n\t\t\treturn\n\t\t}\n\t\tthis.onExtractedNationalNumber(\n\t\t\tnationalPrefix,\n\t\t\tcarrierCode,\n\t\t\tnationalNumber,\n\t\t\tnationalDigits,\n\t\t\tsetState\n\t\t)\n\t\treturn true\n\t}\n\n\t/**\n\t * In Google's code this function is called \"attempt to extract longer NDD\".\n\t * \"Some national prefixes are a substring of others\", they say.\n\t * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were.\n\t */\n\textractAnotherNationalSignificantNumber(nationalDigits, prevNationalSignificantNumber, setState) {\n\t\tif (!this.hasExtractedNationalSignificantNumber) {\n\t\t\treturn this.extractNationalSignificantNumber(nationalDigits, setState)\n\t\t}\n\t\tif (!this.couldPossiblyExtractAnotherNationalSignificantNumber) {\n\t\t\treturn\n\t\t}\n\t\tconst {\n\t\t\tnationalPrefix,\n\t\t\tnationalNumber,\n\t\t\tcarrierCode\n\t\t} = extractNationalNumberFromPossiblyIncompleteNumber(\n\t\t\tnationalDigits,\n\t\t\tthis.metadata\n\t\t)\n\t\t// If a national prefix has been extracted previously,\n\t\t// then it's always extracted as additional digits are added.\n\t\t// That's assuming `extractNationalNumberFromPossiblyIncompleteNumber()`\n\t\t// doesn't do anything different from what it currently does.\n\t\t// So, just in case, here's this check, though it doesn't occur.\n\t\t/* istanbul ignore if */\n\t\tif (nationalNumber === prevNationalSignificantNumber) {\n\t\t\treturn\n\t\t}\n\t\tthis.onExtractedNationalNumber(\n\t\t\tnationalPrefix,\n\t\t\tcarrierCode,\n\t\t\tnationalNumber,\n\t\t\tnationalDigits,\n\t\t\tsetState\n\t\t)\n\t\treturn true\n\t}\n\n\tonExtractedNationalNumber(\n\t\tnationalPrefix,\n\t\tcarrierCode,\n\t\tnationalSignificantNumber,\n\t\tnationalDigits,\n\t\tsetState\n\t) {\n\t\t// Tells if the parsed national (significant) number is present as-is in the input string.\n\t\t// For example, when inputting \"0343515551212999\" Argentinian mobile number,\n\t\t// the parsed national (significant) number is \"93435551212999\".\n\t\t// There, one can see how it stripped \"0\" national prefix and prepended a \"9\",\n\t\t// because that's how it is instructed to do in Argentina's metadata.\n\t\t// So in the described example, the parsed national (significant) number is not present\n\t\t// as-is in the input string. Instead, it's \"modified\" in the input string.\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n\t\tlet nationalSignificantNumberIsModified = false\n\n\t\t// In some countries, a phone number could have a prefix that is not a \"national prefix\"\n\t\t// but rather some other type of \"utility\" prefix.\n\t\t// For example, when calling within Australia, one could prepend `1831` prefix to hide\n\t\t// caller's phone number.\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n\t\tlet prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix\n\n\t\t// `nationalSignificantNumber` could be empty. In that case, `.lastIndexOf()` still works correctly.\n\t\tconst nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber)\n\n\t\t// If the parsed national (significant) number is the last substring of the `nationalDigits`,\n\t\t// then it means that it's present as-is in the input string.\n\t\t// In any other case, the parsed national (significant) number is \"modified\" in the input string.\n\t\tif (\n\t\t\tnationalSignificantNumberIndex < 0 ||\n\t\t\tnationalSignificantNumberIndex !== nationalDigits.length - nationalSignificantNumber.length\n\t\t) {\n\t\t\tnationalSignificantNumberIsModified = true\n\t\t} else {\n\t\t\tconst prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex)\n\t\t\t// When national (significant) number is equal to the `nationalDigits`,\n\t\t\t// this `onExtractedNationalNumber()` function simply doesn't get called.\n\t\t\t// This means that at this point, `prefixBeforeNationalNumber` is always non-empty.\n\t\t\t// Still, added this `if` check just to prevent potential silly bugs.\n\t\t\t// The `!prefixBeforeNationalNumber` case is not really testable\n\t\t\t// so this line is exluded from the code coverage.\n\t\t\t/* istanbul ignore if */\n\t\t\tif (prefixBeforeNationalNumber) {\n\t\t\t\tif (prefixBeforeNationalNumber !== nationalPrefix) {\n\t\t\t\t\tprefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = prefixBeforeNationalNumber\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsetState({\n\t\t\tnationalPrefix,\n\t\t\tcarrierCode,\n\t\t\tnationalSignificantNumber,\n\t\t\tnationalSignificantNumberIsModified,\n\t\t\tprefixBeforeNationalSignificantNumberThatIsNotNationalPrefix\n\t\t})\n\t\t// `onExtractedNationalNumber()` is only called when\n\t\t// the national (significant) number actually did change.\n\t\tthis.hasExtractedNationalSignificantNumber = true\n\t\tthis.onNationalSignificantNumberChange()\n\t}\n\n\treExtractNationalSignificantNumber(state) {\n\t\t// Attempt to extract a national prefix.\n\t\t//\n\t\t// Some people incorrectly input national prefix\n\t\t// in an international phone number.\n\t\t// For example, some people write British phone numbers as `+44(0)...`.\n\t\t//\n\t\t// Also, in some rare cases, it is valid for a national prefix\n\t\t// to be a part of an international phone number.\n\t\t// For example, mobile phone numbers in Mexico are supposed to be\n\t\t// dialled internationally using a `1` national prefix,\n\t\t// so the national prefix will be part of an international number.\n\t\t//\n\t\t// Quote from:\n\t\t// https://www.mexperience.com/dialing-cell-phones-in-mexico/\n\t\t//\n\t\t// \"Dialing a Mexican cell phone from abroad\n\t\t// When you are calling a cell phone number in Mexico from outside Mexico,\n\t\t// it’s necessary to dial an additional “1” after Mexico’s country code\n\t\t// (which is “52”) and before the area code.\n\t\t// You also ignore the 045, and simply dial the area code and the\n\t\t// cell phone’s number.\n\t\t//\n\t\t// If you don’t add the “1”, you’ll receive a recorded announcement\n\t\t// asking you to redial using it.\n\t\t//\n\t\t// For example, if you are calling from the USA to a cell phone\n\t\t// in Mexico City, you would dial +52 – 1 – 55 – 1234 5678.\n\t\t// (Note that this is different to calling a land line in Mexico City\n\t\t// from abroad, where the number dialed would be +52 – 55 – 1234 5678)\".\n\t\t//\n\t\t// Google's demo output:\n\t\t// https://libphonenumber.appspot.com/phonenumberparser?number=%2b5215512345678&country=MX\n\t\t//\n\t\tif (this.extractAnotherNationalSignificantNumber(\n\t\t\tstate.getNationalDigits(),\n\t\t\tstate.nationalSignificantNumber,\n\t\t\t(stateUpdate) => state.update(stateUpdate)\n\t\t)) {\n\t\t\treturn true\n\t\t}\n\t\t// If no format matches the phone number, then it could be\n\t\t// \"a really long IDD\" (quote from a comment in Google's library).\n\t\t// An IDD prefix is first extracted when the user has entered at least 3 digits,\n\t\t// and then here — every time when there's a new digit and the number\n\t\t// couldn't be formatted.\n\t\t// For example, in Australia the default IDD prefix is `0011`,\n\t\t// and it could even be as long as `14880011`.\n\t\t//\n\t\t// Could also check `!hasReceivedThreeLeadingDigits` here\n\t\t// to filter out the case when this check duplicates the one\n\t\t// already performed when there're 3 leading digits,\n\t\t// but it's not a big deal, and in most cases there\n\t\t// will be a suitable `format` when there're 3 leading digits.\n\t\t//\n\t\tif (this.extractIddPrefix(state)) {\n\t\t\tthis.extractCallingCodeAndNationalSignificantNumber(state)\n\t\t\treturn true\n\t\t}\n\t\t// Google's AsYouType formatter supports sort of an \"autocorrection\" feature\n\t\t// when it \"autocorrects\" numbers that have been input for a country\n\t\t// with that country's calling code.\n\t\t// Such \"autocorrection\" feature looks weird, but different people have been requesting it:\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/376\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/375\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/316\n\t\tif (this.fixMissingPlus(state)) {\n\t\t\tthis.extractCallingCodeAndNationalSignificantNumber(state)\n\t\t\treturn true\n\t\t}\n\t}\n\n\textractIddPrefix(state) {\n\t\t// An IDD prefix can't be present in a number written with a `+`.\n\t\t// Also, don't re-extract an IDD prefix if has already been extracted.\n\t\tconst {\n\t\t\tinternational,\n\t\t\tIDDPrefix,\n\t\t\tdigits,\n\t\t\tnationalSignificantNumber\n\t\t} = state\n\t\tif (international || IDDPrefix) {\n\t\t\treturn\n\t\t}\n\t\t// Some users input their phone number in \"out-of-country\"\n\t\t// dialing format instead of using the leading `+`.\n\t\t// https://github.com/catamphetamine/libphonenumber-js/issues/185\n\t\t// Detect such numbers.\n\t\tconst numberWithoutIDD = stripIddPrefix(\n\t\t\tdigits,\n\t\t\tthis.defaultCountry,\n\t\t\tthis.defaultCallingCode,\n\t\t\tthis.metadata.metadata\n\t\t)\n\t\tif (numberWithoutIDD !== undefined && numberWithoutIDD !== digits) {\n\t\t\t// If an IDD prefix was stripped then convert the IDD-prefixed number\n\t\t\t// to international number for subsequent parsing.\n\t\t\tstate.update({\n\t\t\t\tIDDPrefix: digits.slice(0, digits.length - numberWithoutIDD.length)\n\t\t\t})\n\t\t\tthis.startInternationalNumber(state, {\n\t\t\t\tcountry: undefined,\n\t\t\t\tcallingCode: undefined\n\t\t\t})\n\t\t\treturn true\n\t\t}\n\t}\n\n\tfixMissingPlus(state) {\n\t\tif (!state.international) {\n\t\t\tconst {\n\t\t\t\tcountryCallingCode: newCallingCode\n\t\t\t} = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(\n\t\t\t\tstate.digits,\n\t\t\t\tstate.country,\n\t\t\t\tthis.defaultCountry,\n\t\t\t\tthis.defaultCallingCode,\n\t\t\t\tthis.metadata.metadata\n\t\t\t)\n\t\t\tif (newCallingCode) {\n\t\t\t\tstate.update({\n\t\t\t\t\tmissingPlus: true\n\t\t\t\t})\n\t\t\t\tthis.startInternationalNumber(state, {\n\t\t\t\t\tcountry: state.country,\n\t\t\t\t\tcallingCode: newCallingCode\n\t\t\t\t})\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\n\tstartInternationalNumber(state, { country, callingCode }) {\n\t\tstate.startInternationalNumber(country, callingCode)\n\t\t// If a national (significant) number has been extracted before, reset it.\n\t\tif (state.nationalSignificantNumber) {\n\t\t\tstate.resetNationalSignificantNumber()\n\t\t\tthis.onNationalSignificantNumberChange()\n\t\t\tthis.hasExtractedNationalSignificantNumber = undefined\n\t\t}\n\t}\n\n\textractCallingCodeAndNationalSignificantNumber(state) {\n\t\tif (this.extractCountryCallingCode(state)) {\n\t\t\t// `this.extractCallingCode()` is currently called when the number\n\t\t\t// couldn't be formatted during the standard procedure.\n\t\t\t// Normally, the national prefix would be re-extracted\n\t\t\t// for an international number if such number couldn't be formatted,\n\t\t\t// but since it's already not able to be formatted,\n\t\t\t// there won't be yet another retry, so also extract national prefix here.\n\t\t\tthis.extractNationalSignificantNumber(\n\t\t\t\tstate.getNationalDigits(),\n\t\t\t\t(stateUpdate) => state.update(stateUpdate)\n\t\t\t)\n\t\t}\n\t}\n}\n\n/**\n * Extracts formatted phone number from text (if there's any).\n * @param {string} text\n * @return {string} [formattedPhoneNumber]\n */\nfunction extractFormattedPhoneNumber(text) {\n\t// Attempt to extract a possible number from the string passed in.\n\tconst startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART)\n\tif (startsAt < 0) {\n\t\treturn\n\t}\n\t// Trim everything to the left of the phone number.\n\ttext = text.slice(startsAt)\n\t// Trim the `+`.\n\tlet hasPlus\n\tif (text[0] === '+') {\n\t\thasPlus = true\n\t\ttext = text.slice('+'.length)\n\t}\n\t// Trim everything to the right of the phone number.\n\ttext = text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN, '')\n\t// Re-add the previously trimmed `+`.\n\tif (hasPlus) {\n\t\ttext = '+' + text\n\t}\n\treturn text\n}\n\n/**\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\n * @param {string} text\n * @return {any[]}\n */\nfunction _extractFormattedDigitsAndPlus(text) {\n\t// Extract a formatted phone number part from text.\n\tconst extractedNumber = extractFormattedPhoneNumber(text) || ''\n\t// Trim a `+`.\n\tif (extractedNumber[0] === '+') {\n\t\treturn [extractedNumber.slice('+'.length), true]\n\t}\n\treturn [extractedNumber]\n}\n\n/**\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\n * @param {string} text\n * @return {any[]}\n */\nexport function extractFormattedDigitsAndPlus(text) {\n\tlet [formattedDigits, hasPlus] = _extractFormattedDigitsAndPlus(text)\n\t// If the extracted phone number part\n\t// can possibly be a part of some valid phone number\n\t// then parse phone number characters from a formatted phone number.\n\tif (!VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)) {\n\t\tformattedDigits = ''\n\t}\n\treturn [formattedDigits, hasPlus]\n}","import Metadata from './metadata.js'\nimport PhoneNumber from './PhoneNumber.js'\nimport checkNumberLength from './helpers/checkNumberLength.js'\nimport AsYouTypeState from './AsYouTypeState.js'\nimport AsYouTypeFormatter, { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.js'\nimport AsYouTypeParser, { extractFormattedDigitsAndPlus } from './AsYouTypeParser.js'\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js'\nimport getCountryByNationalNumber from './helpers/getCountryByNationalNumber.js'\nimport isObject from './helpers/isObject.js'\n\nconst USE_NON_GEOGRAPHIC_COUNTRY_CODE = false\n\nexport default class AsYouType {\n\t/**\n\t * @param {(string|object)?} [optionsOrDefaultCountry] - The default country used for parsing non-international phone numbers. Can also be an `options` object.\n\t * @param {Object} metadata\n\t */\n\tconstructor(optionsOrDefaultCountry, metadata) {\n\t\t// Metadata instance is created once and stays constant.\n\t\t// This is required because other utility classes such as `AsYouTypeFormatter`\n\t\t// will use this metadata instance \"reference\" and will assume that it stays constant.\n\t\tthis.metadata = new Metadata(metadata)\n\t\tconst [defaultCountry, defaultCallingCode] = this.getCountryAndCallingCode(optionsOrDefaultCountry)\n\t\t// `this.defaultCountry` and `this.defaultCallingCode` aren't required to be in sync.\n\t\t// For example, `this.defaultCountry` could be `\"AR\"` and `this.defaultCallingCode` could be `undefined`.\n\t\t// So `this.defaultCountry` and `this.defaultCallingCode` are totally independent.\n\t\tthis.defaultCountry = defaultCountry\n\t\tthis.defaultCallingCode = defaultCallingCode\n\t\tthis.reset()\n\t}\n\n\tgetCountryAndCallingCode(optionsOrDefaultCountry) {\n\t\t// Set `defaultCountry` and `defaultCallingCode` options.\n\t\tlet defaultCountry\n\t\tlet defaultCallingCode\n\t\t// Turns out `null` also has type \"object\". Weird.\n\t\tif (optionsOrDefaultCountry) {\n\t\t\tif (isObject(optionsOrDefaultCountry)) {\n\t\t\t\tdefaultCountry = optionsOrDefaultCountry.defaultCountry\n\t\t\t\tdefaultCallingCode = optionsOrDefaultCountry.defaultCallingCode\n\t\t\t} else {\n\t\t\t\tdefaultCountry = optionsOrDefaultCountry\n\t\t\t}\n\t\t}\n\t\tif (defaultCountry && !this.metadata.hasCountry(defaultCountry)) {\n\t\t\tdefaultCountry = undefined\n\t\t}\n\t\tif (defaultCallingCode) {\n\t\t\t/* istanbul ignore if */\n\t\t\tif (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n\t\t\t\tif (this.metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n\t\t\t\t\tdefaultCountry = '001'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [defaultCountry, defaultCallingCode]\n\t}\n\n\t/**\n\t * Inputs \"next\" phone number characters.\n\t * @param {string} text\n\t * @return {string} Formatted phone number characters that have been input so far.\n\t */\n\tinput(text) {\n\t\tconst {\n\t\t\tdigits,\n\t\t\tjustLeadingPlus\n\t\t} = this.parser.input(text, this.state)\n\t\tif (justLeadingPlus) {\n\t\t\tthis.formattedOutput = '+'\n\t\t} else if (digits) {\n\t\t\tthis.determineTheCountryIfNeeded()\n\t\t\t// Match the available formats by the currently available leading digits.\n\t\t\tif (this.state.nationalSignificantNumber) {\n\t\t\t\tthis.formatter.narrowDownMatchingFormats(this.state)\n\t\t\t}\n\t\t\tlet formattedNationalNumber\n\t\t\tif (this.metadata.hasSelectedNumberingPlan()) {\n\t\t\t\tformattedNationalNumber = this.formatter.format(digits, this.state)\n\t\t\t}\n\t\t\tif (formattedNationalNumber === undefined) {\n\t\t\t\t// See if another national (significant) number could be re-extracted.\n\t\t\t\tif (this.parser.reExtractNationalSignificantNumber(this.state)) {\n\t\t\t\t\tthis.determineTheCountryIfNeeded()\n\t\t\t\t\t// If it could, then re-try formatting the new national (significant) number.\n\t\t\t\t\tconst nationalDigits = this.state.getNationalDigits()\n\t\t\t\t\tif (nationalDigits) {\n\t\t\t\t\t\tformattedNationalNumber = this.formatter.format(nationalDigits, this.state)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.formattedOutput = formattedNationalNumber\n\t\t\t\t? this.getFullNumber(formattedNationalNumber)\n\t\t\t\t: this.getNonFormattedNumber()\n\t\t}\n\t\treturn this.formattedOutput\n\t}\n\n\treset() {\n\t\tthis.state = new AsYouTypeState({\n\t\t\tonCountryChange: (country) => {\n\t\t\t\t// Before version `1.6.0`, the official `AsYouType` formatter API\n\t\t\t\t// included a `.country` property on an `AsYouType` instance.\n\t\t\t\t// Since that property (along with the others) have been moved to\n\t\t\t\t// `this.state`, `this.country` property is emulated for compatibility\n\t\t\t\t// with the old versions.\n\t\t\t\tthis.country = country\n\t\t\t},\n\t\t\tonCallingCodeChange: (callingCode, country) => {\n\t\t\t\tthis.metadata.selectNumberingPlan(country || callingCode)\n\t\t\t\tthis.formatter.reset(this.metadata.numberingPlan, this.state)\n\t\t\t\tthis.parser.reset(this.metadata.numberingPlan)\n\t\t\t}\n\t\t})\n\t\tthis.formatter = new AsYouTypeFormatter({\n\t\t\tstate: this.state,\n\t\t\tmetadata: this.metadata\n\t\t})\n\t\tthis.parser = new AsYouTypeParser({\n\t\t\tdefaultCountry: this.defaultCountry,\n\t\t\tdefaultCallingCode: this.defaultCallingCode,\n\t\t\tmetadata: this.metadata,\n\t\t\tstate: this.state,\n\t\t\tonNationalSignificantNumberChange: () => {\n\t\t\t\tthis.determineTheCountryIfNeeded()\n\t\t\t\tthis.formatter.reset(this.metadata.numberingPlan, this.state)\n\t\t\t}\n\t\t})\n\t\tthis.state.reset({\n\t\t\tcountry: this.defaultCountry,\n\t\t\tcallingCode: this.defaultCallingCode\n\t\t})\n\t\tthis.formattedOutput = ''\n\t\treturn this\n\t}\n\n\t/**\n\t * Returns `true` if the phone number is being input in international format.\n\t * In other words, returns `true` if and only if the parsed phone number starts with a `\"+\"`.\n\t * @return {boolean}\n\t */\n\tisInternational() {\n\t\treturn this.state.international\n\t}\n\n\t/**\n\t * Returns the \"calling code\" part of the phone number when it's being input\n\t * in an international format.\n\t * If no valid calling code has been entered so far, returns `undefined`.\n\t * @return {string} [callingCode]\n\t */\n\tgetCallingCode() {\n\t\t // If the number is being input in national format and some \"default calling code\"\n\t\t // has been passed to `AsYouType` constructor, then `this.state.callingCode`\n\t\t // is equal to that \"default calling code\".\n\t\t //\n\t\t // If the number is being input in national format and no \"default calling code\"\n\t\t // has been passed to `AsYouType` constructor, then returns `undefined`,\n\t\t // even if a \"default country\" has been passed to `AsYouType` constructor.\n\t\t //\n\t\tif (this.isInternational()) {\n\t\t\treturn this.state.callingCode\n\t\t}\n\t}\n\n\t// A legacy alias.\n\tgetCountryCallingCode() {\n\t\treturn this.getCallingCode()\n\t}\n\n\t/**\n\t * Returns a two-letter country code of the phone number.\n\t * Returns `undefined` for \"non-geographic\" phone numbering plans.\n\t * Returns `undefined` if no phone number has been input yet.\n\t * @return {string} [country]\n\t */\n\tgetCountry() {\n\t\tconst { digits } = this.state\n\t\t// Return `undefined` if no digits have been input yet.\n\t\tif (digits) {\n\t\t\treturn this._getCountry()\n\t\t}\n\t}\n\n\t/**\n\t * Returns a two-letter country code of the phone number.\n\t * Returns `undefined` for \"non-geographic\" phone numbering plans.\n\t * @return {string} [country]\n\t */\n\t_getCountry() {\n\t\tconst { country } = this.state\n\t\t/* istanbul ignore if */\n\t\tif (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n\t\t\t// `AsYouType.getCountry()` returns `undefined`\n\t\t\t// for \"non-geographic\" phone numbering plans.\n\t\t\tif (country === '001') {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\treturn country\n\t}\n\n\tdetermineTheCountryIfNeeded() {\n\t\t// Suppose a user enters a phone number in international format,\n\t\t// and there're several countries corresponding to that country calling code,\n\t\t// and a country has been derived from the number, and then\n\t\t// a user enters one more digit and the number is no longer\n\t\t// valid for the derived country, so the country should be re-derived\n\t\t// on every new digit in those cases.\n\t\t//\n\t\t// If the phone number is being input in national format,\n\t\t// then it could be a case when `defaultCountry` wasn't specified\n\t\t// when creating `AsYouType` instance, and just `defaultCallingCode` was specified,\n\t\t// and that \"calling code\" could correspond to a \"non-geographic entity\",\n\t\t// or there could be several countries corresponding to that country calling code.\n\t\t// In those cases, `this.country` is `undefined` and should be derived\n\t\t// from the number. Again, if country calling code is ambiguous, then\n\t\t// `this.country` should be re-derived with each new digit.\n\t\t//\n\t\tif (!this.state.country || this.isCountryCallingCodeAmbiguous()) {\n\t\t\tthis.determineTheCountry()\n\t\t}\n\t}\n\n\t// Prepends `+CountryCode ` in case of an international phone number\n\tgetFullNumber(formattedNationalNumber) {\n\t\tif (this.isInternational()) {\n\t\t\tconst prefix = (text) => this.formatter.getInternationalPrefixBeforeCountryCallingCode(this.state, {\n\t\t\t\tspacing: text ? true : false\n\t\t\t}) + text\n\t\t\tconst { callingCode } = this.state\n\t\t\tif (!callingCode) {\n\t\t\t\treturn prefix(`${this.state.getDigitsWithoutInternationalPrefix()}`)\n\t\t\t}\n\t\t\tif (!formattedNationalNumber) {\n\t\t\t\treturn prefix(callingCode)\n\t\t\t}\n\t\t\treturn prefix(`${callingCode} ${formattedNationalNumber}`)\n\t\t}\n\t\treturn formattedNationalNumber\n\t}\n\n\tgetNonFormattedNationalNumberWithPrefix() {\n\t\tconst {\n\t\t\tnationalSignificantNumber,\n\t\t\tprefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,\n\t\t\tnationalPrefix\n\t\t} = this.state\n\t\tlet number = nationalSignificantNumber\n\t\tconst prefix = prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix || nationalPrefix\n\t\tif (prefix) {\n\t\t\tnumber = prefix + number\n\t\t}\n\t\treturn number\n\t}\n\n\tgetNonFormattedNumber() {\n\t\tconst { nationalSignificantNumberIsModified } = this.state\n\t\treturn this.getFullNumber(\n\t\t\tnationalSignificantNumberIsModified\n\t\t\t\t? this.state.getNationalDigits()\n\t\t\t\t: this.getNonFormattedNationalNumberWithPrefix()\n\t\t)\n\t}\n\n\tgetNonFormattedTemplate() {\n\t\tconst number = this.getNonFormattedNumber()\n\t\tif (number) {\n\t\t\treturn number.replace(/[\\+\\d]/g, DIGIT_PLACEHOLDER)\n\t\t}\n\t}\n\n\tisCountryCallingCodeAmbiguous() {\n\t\tconst { callingCode } = this.state\n\t\tconst countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode)\n\t\treturn countryCodes && countryCodes.length > 1\n\t}\n\n\t// Determines the exact country of the phone number\n\t// entered so far based on the country phone code\n\t// and the national phone number.\n\tdetermineTheCountry() {\n\t\t// Get a more precise country code for this national number.\n\t\t// It is possible that the precise country couldn't be determined\n\t\t// in cases when there're multiple countries sharing the same calling code.\n\t\t// In that case, `country` will be `undefined`.\n\t\tconst country = getCountryByCallingCode(\n\t\t\tthis.isInternational() ? this.state.callingCode : this.defaultCallingCode,\n\t\t\t{\n\t\t\t\tnationalNumber: this.state.nationalSignificantNumber,\n\t\t\t\tmetadata: this.metadata\n\t\t\t}\n\t\t)\n\t\t// If the derived country is indeed more precise,\n\t\t// or if no country could be derived for the updated phone number.\n\t\tif (country !== this.state.country) {\n\t\t\t// Set (or reset) the more precise country.\n\t\t\tthis.state.setCountry(country)\n\t\t\t// If a more precise country could be derived.\n\t\t\tif (country) {\n\t\t\t\t// Select a more precise telephone numbering plan.\n\t\t\t\t// For example, consider that `AsYouType` instance was created with `defaultCountry: \"US\"` argument.\n\t\t\t\t// In that case, the metadata instance will be using \"US\" metadata.\n\t\t\t\t// But then the user could input a Canadian phone number, in which case\n\t\t\t\t// the metadata instance should be switched to Canadian telephone numbering plan.\n\t\t\t\t// It is required to do that because later `canFormatCompleteNumber()` function will be called,\n\t\t\t\t// and that function relies on the precise country being pre-selected in the metadata instance.\n\t\t\t\t// Or, for example, `checkNumberLength()` function also relies on same thing.\n\t\t\t\tthis.metadata.selectNumberingPlan(country)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a E.164 phone number value for the user's input.\n\t *\n\t * For example, for country `\"US\"` and input `\"(222) 333-4444\"`\n\t * it will return `\"+12223334444\"`.\n\t *\n\t * For international phone number input, it will also auto-correct\n\t * some minor errors such as using a national prefix when writing\n\t * an international phone number. For example, if the user inputs\n\t * `\"+44 0 7400 000000\"` then it will return an auto-corrected\n\t * `\"+447400000000\"` phone number value.\n\t *\n\t * Will return `undefined` if no digits have been input,\n\t * or when inputting a phone number in national format and no\n\t * default country or default \"country calling code\" have been set.\n\t *\n\t * @return {string} [value]\n\t */\n\tgetNumberValue() {\n\t\tconst {\n\t\t\tdigits,\n\t\t\tcallingCode,\n\t\t\tcountry,\n\t\t\tnationalSignificantNumber\n\t\t} = this.state\n\n\t \t// Will return `undefined` if no digits have been input.\n\t\tif (!digits) {\n\t\t\treturn\n\t\t}\n\n\t\tif (this.isInternational()) {\n\t\t\tif (callingCode) {\n\t\t\t\treturn '+' + callingCode + nationalSignificantNumber\n\t\t\t} else {\n\t\t\t\treturn '+' + digits\n\t\t\t}\n\t\t} else {\n\t\t\tif (country || callingCode) {\n\t\t\t\tconst callingCode_ = country ? this.metadata.countryCallingCode() : callingCode\n\t\t\t\treturn '+' + callingCode_ + nationalSignificantNumber\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns an instance of `PhoneNumber` class.\n\t * Will return `undefined` if no national (significant) number\n\t * digits have been entered so far, or if no `defaultCountry` has been\n\t * set and the user enters a phone number not in international format.\n\t */\n\tgetNumber() {\n\t\tconst {\n\t\t\tnationalSignificantNumber,\n\t\t\tcarrierCode,\n\t\t\tcallingCode\n\t\t} = this.state\n\n\t\tif (!nationalSignificantNumber) {\n\t\t\treturn\n\t\t}\n\n\t\t// `this._getCountry()` is basically same as `this.state.country`\n\t\t// with the only change that it returns `undefined` in case of a\n\t\t// \"non-geographic\" numbering plan instead of `\"001\"` \"internal use\" value.\n\t\tlet country = this._getCountry()\n\n\t\t// Sidenote:\n\t\t// `state.callingCode` and `state.country` are somewhat independent from one another\n\t\t// and there could be situations when one is defined but the other is not.\n\t\t// See the comment in `AsYouTypeState.js` for more info on when that is possible.\n\n\t\tif (!country && !callingCode) {\n\t\t\treturn\n\t\t}\n\n\t\t// By default, if `defaultCountry` parameter was passed when\n\t\t// creating `AsYouType` instance, `state.country` is gonna be\n\t\t// that `defaultCountry`, which doesn't entirely conform with\n\t\t// `parsePhoneNumber()`'s behavior where it attempts to determine\n\t\t// the country more precisely in cases when multiple countries\n\t\t// could correspond to the same `countryCallingCode`.\n\t\t// https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417192969\n\t\t//\n\t\t// Because `AsYouType.getNumber()` method is supposed to be a 1:1\n\t\t// equivalent for `parsePhoneNumber(AsYouType.getNumberValue())`,\n\t\t// it means that it should also behave accordingly in such cases of `country` ambiguity.\n\t\t// That's how users of this library would expect it to behave anyway.\n\t\t//\n\t\t// So here it checks if `state.country` is same as the `defaultCountry`,\n\t\t// and if it is, it attempts to get rid of any potential ambiguity.\n\t\t//\n\t\tif (country) {\n\t\t\tif (country === this.defaultCountry) {\n\t\t\t\t// // Create a `Metadata` instance just to get the calling code of the `country`.\n\t\t\t\t// const metadata = new Metadata(this.metadata.metadata)\n\t\t\t\t// // `state.callingCode` and `state.country` are somewhat independent from one another\n\t\t\t\t// // and there could be situations when one is defined but the other is not.\n\t\t\t\t// // See the comment in `AsYouTypeState.js` for more info on when that is possible.\n\t\t\t\t// // Here, it only passes `state.country` because there's no need to pass `state.callingCode`\n\t\t\t\t// // because `state.country` is known to be defined.\n\t\t\t\t// metadata.selectNumberingPlan(country)\n\t\t\t\t// const countryCallingCode = metadata.numberingPlan.callingCode()\n\n\t\t\t\t// Instead of getting `countryCallingCode` value above,\n\t\t\t\t// it could simply read it from the existing metadata instance.\n\t\t\t\tconst countryCallingCode = this.metadata.numberingPlan.callingCode()\n\n\t\t\t\t// Attempt to rule out any potential country code ambiguity, if present.\n\t\t\t\tconst exactCountry = getExactCountryForMultiCountryCallingCode(\n\t\t\t\t\tcountryCallingCode,\n\t\t\t\t\tnationalSignificantNumber,\n\t\t\t\t\tthis.metadata\n\t\t\t\t)\n\t\t\t\tif (exactCountry) {\n\t\t\t\t\tcountry = exactCountry\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst phoneNumber = new PhoneNumber(\n\t\t\tcountry || callingCode,\n\t\t\tnationalSignificantNumber,\n\t\t\tthis.metadata.metadata\n\t\t)\n\t\tif (carrierCode) {\n\t\t\tphoneNumber.carrierCode = carrierCode\n\t\t}\n\t\t// Phone number extensions are not supported by \"As You Type\" formatter.\n\t\treturn phoneNumber\n\t}\n\n\t/**\n\t * Returns `true` if the phone number is \"possible\".\n\t * Is just a shortcut for `PhoneNumber.isPossible()`.\n\t * @return {boolean}\n\t */\n\tisPossible() {\n\t\tconst phoneNumber = this.getNumber()\n\t\tif (!phoneNumber) {\n\t\t\treturn false\n\t\t}\n\t\treturn phoneNumber.isPossible()\n\t}\n\n\t/**\n\t * Returns `true` if the phone number is \"valid\".\n\t * Is just a shortcut for `PhoneNumber.isValid()`.\n\t * @return {boolean}\n\t */\n\tisValid() {\n\t\tconst phoneNumber = this.getNumber()\n\t\tif (!phoneNumber) {\n\t\t\treturn false\n\t\t}\n\t\treturn phoneNumber.isValid()\n\t}\n\n\t/**\n\t * Checks if the phone number length is valid.\n\t * If it is, nothing is returned.\n\t * Otherwise, a rejection reason is returned.\n\t * @return {string?}\n\t */\n\tvalidateLength() {\n\t\tconst {\n\t\t\tdigits,\n\t\t\tnationalSignificantNumber\n\t\t} = this.state\n\n\t\tif (!digits) {\n\t\t\treturn 'NOT_A_NUMBER'\n\t\t}\n\n\t\tif (!this.metadata.numberingPlan) {\n\t\t\treturn 'INVALID_COUNTRY'\n\t\t}\n\n\t\tif (!nationalSignificantNumber) {\n\t\t\t return 'TOO_SHORT'\n\t\t}\n\n\t\t// `state.callingCode` and `state.country` are somewhat independent from one another\n\t\t// and there could be situations when one is defined but the other is not.\n\t\t// See the comment in `AsYouTypeState.js` for more info on when that is possible.\n\t\t// Here, it uses both: if `country` is defined then it will use that,\n\t\t// otherwise it will use `callingCode`.\n\t\tconst result = checkNumberLength(nationalSignificantNumber, undefined, this.metadata)\n\t\tif (result !== 'IS_POSSIBLE') {\n\t\t\treturn result\n\t\t}\n\t}\n\n\t/**\n\t * @deprecated\n\t * This method is used in `react-phone-number-input/source/input-control.js`\n\t * in versions before `3.0.16`.\n\t */\n\tgetNationalNumber() {\n\t\treturn this.state.nationalSignificantNumber\n\t}\n\n\t/**\n\t * Returns the phone number characters entered by the user.\n\t * @return {string}\n\t */\n\tgetChars() {\n\t\treturn (this.state.international ? '+' : '') + this.state.digits\n\t}\n\n\t/**\n\t * Returns the template for the formatted phone number.\n\t * @return {string}\n\t */\n\tgetTemplate() {\n\t\treturn this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || ''\n\t}\n}\n\n// In situations when multiple countries use the same calling code,\n// this function tells what exact country does a given national (significant) number belong to.\nfunction getExactCountryForMultiCountryCallingCode(callingCode, nationalSignificantNumber, metadata) {\n\tconst ambiguousCountries = metadata.getCountryCodesForCallingCode(callingCode)\n\tif (ambiguousCountries.length > 1) {\n\t\treturn getCountryByNationalNumber(nationalSignificantNumber, ambiguousCountries, metadata.metadata)\n\t}\n}","export { default as PhoneNumber } from '../es6/PhoneNumber.js'\nexport { default as ParseError } from '../es6/ParseError.js'\n// `parsePhoneNumber()` named export has been renamed to `parsePhoneNumberWithError()`.\nexport { default as parsePhoneNumberWithError, default as parsePhoneNumber } from '../es6/parsePhoneNumberWithError.js'\n\n// `parsePhoneNumberFromString()` named export is now considered legacy:\n// it has been promoted to a default export due to being too verbose.\nexport { default as default, default as parsePhoneNumberFromString } from '../es6/parsePhoneNumber.js'\n\nexport { default as isValidPhoneNumber } from '../es6/isValidPhoneNumber.js'\nexport { default as isPossiblePhoneNumber } from '../es6/isPossiblePhoneNumber.js'\nexport { default as validatePhoneNumberLength } from '../es6/validatePhoneNumberLength.js'\n\n// Deprecated.\nexport { default as findNumbers } from '../es6/legacy/findNumbers.js'\nexport { default as searchNumbers } from '../es6/legacy/searchNumbers.js'\n\nexport { default as findPhoneNumbersInText } from '../es6/findPhoneNumbersInText.js'\nexport { default as searchPhoneNumbersInText } from '../es6/searchPhoneNumbersInText.js'\nexport { default as PhoneNumberMatcher } from '../es6/PhoneNumberMatcher.js'\n\nexport { default as AsYouType } from '../es6/AsYouType.js'\n\n// Deprecated:\n// `DIGIT_PLACEHOLDER` is the character that `AsYouType` formatter uses in a phone number template.\n// It's basically an \"x\" character. I guess, there's no point in exporting it as a constant\n// because the established convention is that it's an \"x\" character so everyone just assumes \"x\".\nexport { DIGIT_PLACEHOLDER } from '../es6/AsYouTypeFormatter.js'\n\nexport { default as getCountries } from '../es6/getCountries.js'\nexport { default as Metadata, isSupportedCountry, getCountryCallingCode, getExtPrefix } from '../es6/metadata.js'\n\nexport { default as getExampleNumber } from '../es6/getExampleNumber.js'\n\nexport { default as formatIncompletePhoneNumber } from '../es6/formatIncompletePhoneNumber.js'\nexport { default as parseIncompletePhoneNumber, parsePhoneNumberCharacter } from '../es6/parseIncompletePhoneNumber.js'\nexport { default as parseDigits } from '../es6/helpers/parseDigits.js'\n\nexport { parseRFC3966, formatRFC3966 } from '../es6/helpers/RFC3966.js'\n","// Importing from a \".js\" file is a workaround for Node.js \"ES Modules\"\n// importing system which is even uncapable of importing \"*.json\" files.\nimport metadata from '../../metadata.min.json.js'\n\nimport { AsYouType as _AsYouType } from '../../core/index.js'\n\nexport function AsYouType(country) {\n\treturn _AsYouType.call(this, country, metadata)\n}\n\nAsYouType.prototype = Object.create(_AsYouType.prototype, {})\nAsYouType.prototype.constructor = AsYouType","// `parsePhoneNumber()` named export has been renamed to `parsePhoneNumberWithError()`.\nexport { parsePhoneNumberWithError, parsePhoneNumberWithError as parsePhoneNumber } from './min/exports/parsePhoneNumberWithError.js'\n// `parsePhoneNumberFromString()` named export is now considered legacy:\n// it has been promoted to a default export due to being too verbose.\nexport { parsePhoneNumber as parsePhoneNumberFromString, parsePhoneNumber as default } from './min/exports/parsePhoneNumber.js'\n\nexport { isValidPhoneNumber } from './min/exports/isValidPhoneNumber.js'\nexport { isPossiblePhoneNumber } from './min/exports/isPossiblePhoneNumber.js'\nexport { validatePhoneNumberLength } from './min/exports/validatePhoneNumberLength.js'\n\n// Deprecated.\nexport { findNumbers } from './min/exports/findNumbers.js'\nexport { searchNumbers } from './min/exports/searchNumbers.js'\n\nexport { findPhoneNumbersInText } from './min/exports/findPhoneNumbersInText.js'\nexport { searchPhoneNumbersInText } from './min/exports/searchPhoneNumbersInText.js'\nexport { PhoneNumberMatcher } from './min/exports/PhoneNumberMatcher.js'\n\nexport { AsYouType } from './min/exports/AsYouType.js'\n\n// Deprecated:\n// `DIGIT_PLACEHOLDER` is the character that `AsYouType` formatter uses in a phone number template.\n// It's basically an \"x\" character. I guess, there's no point in exporting it as a constant\n// because the established convention is that it's an \"x\" character so everyone just assumes \"x\".\nexport { DIGIT_PLACEHOLDER } from './es6/AsYouTypeFormatter.js'\n\nexport { isSupportedCountry } from './min/exports/isSupportedCountry.js'\nexport { getCountries } from './min/exports/getCountries.js'\n// `getPhoneCode` name is deprecated, use `getCountryCallingCode` instead.\nexport { getCountryCallingCode, getCountryCallingCode as getPhoneCode } from './min/exports/getCountryCallingCode.js'\nexport { getExtPrefix } from './min/exports/getExtPrefix.js'\n\nexport { Metadata } from './min/exports/Metadata.js'\nexport { getExampleNumber } from './min/exports/getExampleNumber.js'\n\nexport { formatIncompletePhoneNumber } from './min/exports/formatIncompletePhoneNumber.js'\nexport { PhoneNumber } from './min/exports/PhoneNumber.js'\n\nexport {\n\tParseError,\n\tparseIncompletePhoneNumber,\n\tparsePhoneNumberCharacter,\n\tparseDigits,\n\tparseRFC3966,\n\tformatRFC3966\n} from './core/index.js'\n\n// Deprecated (old) exports.\nexport { parse as parseNumber, parse } from './index.es6.exports/parse.js'\nexport { format as formatNumber, format } from './index.es6.exports/format.js'\nexport { getNumberType } from './index.es6.exports/getNumberType.js'\nexport { isPossibleNumber } from './index.es6.exports/isPossibleNumber.js'\nexport { isValidNumber } from './index.es6.exports/isValidNumber.js'\nexport { isValidNumberForRegion } from './index.es6.exports/isValidNumberForRegion.js'\nexport { findPhoneNumbers } from './index.es6.exports/findPhoneNumbers.js'\nexport { searchPhoneNumbers } from './index.es6.exports/searchPhoneNumbers.js'\nexport { PhoneNumberSearch } from './index.es6.exports/PhoneNumberSearch.js'\n\n// Deprecated DIGITS export.\n// (it was used in `react-phone-number-input`)\nexport { DIGITS } from './es6/helpers/parseDigits.js'\n\n// Deprecated \"custom\" exports.\nexport { default as parseCustom } from './es6/legacy/parse.js'\nexport { default as formatCustom } from './es6/legacy/format.js'\nexport { default as isValidNumberCustom } from './es6/legacy/isValidNumber.js'\nexport { default as findPhoneNumbersCustom } from './es6/legacy/findPhoneNumbers.js'\nexport { searchPhoneNumbers as searchPhoneNumbersCustom } from './es6/legacy/findPhoneNumbers.js'\nexport { default as PhoneNumberSearchCustom } from './es6/legacy/PhoneNumberSearch.js'\nexport { default as getNumberTypeCustom } from './es6/legacy/getNumberType.js'\nexport { default as getCountryCallingCodeCustom, default as getPhoneCodeCustom } from './es6/getCountryCallingCode.js'\nexport { default as AsYouTypeCustom } from './es6/AsYouType.js'\n","import { AsYouType, type CountryCode } from 'libphonenumber-js'\n\n/**\n * Format a phone number string using `libphonenumber-js`'s `AsYouType`.\n *\n * Non-digit characters are stripped before formatting (the leading `+` is\n * preserved so international numbers keep their country prefix). After\n * formatting, spaces produced by `AsYouType` are swapped for `delimiter` when\n * a custom delimiter is provided.\n *\n * @param value - The raw input (digits, `+`, spaces, dashes, parentheses, etc.).\n * @param country - ISO 3166-1 alpha-2 country code (e.g. `'MX'`, `'US'`).\n * @param delimiter - Character used to separate groups in the output.\n * @returns The formatted phone string, or `''` when `value` is empty.\n */\nexport const formatPhone = (\n value: string,\n country: string = 'MX',\n delimiter: string = ' '\n): string => {\n if (!value) return ''\n\n // Preserve '+' so international numbers keep their prefix.\n const digits = value.replace(/[^\\d+]/g, '')\n const formatter = new AsYouType(country as CountryCode)\n const formatted = formatter.input(digits)\n\n if (delimiter !== ' ') {\n return formatted.replace(/ /g, delimiter)\n }\n\n return formatted\n}","import {\n unformatCreditCard,\n unformatGeneral,\n unformatNumeral,\n type DatePatternType,\n type DateUnit,\n type FormatCreditCardOptions,\n type FormatDateOptions,\n type FormatGeneralOptions,\n type FormatNumeralOptions,\n type FormatTimeOptions,\n type TimePatternType,\n type TimeUnit\n} from 'cleave-zen'\n\nexport type FormatType =\n | 'general'\n | 'phone'\n | 'numeral'\n | 'date'\n | 'time'\n | 'creditCard'\n | 'creditCardType'\n\ntype ExtraFormatOptions = {\n country?: string\n dateRawPattern?: DatePatternType\n dateRawPatternDelimiter?: string\n timeRawPattern?: TimePatternType\n timeRawPatternDelimiter?: string\n tailPrefix?: boolean\n}\n\nexport type FormatOptions = Partial<\nFormatGeneralOptions &\nFormatNumeralOptions &\nFormatDateOptions &\nFormatTimeOptions &\nFormatCreditCardOptions\n> &\nExtraFormatOptions\n\ntype DateSegmentKey = 'day' | 'month' | 'year'\ntype TimeSegmentKey = 'hours' | 'minutes' | 'seconds'\n\nconst DEFAULT_DATE_PATTERN: DatePatternType = ['d', 'm', 'Y']\nconst DEFAULT_DATE_RAW_PATTERN: DatePatternType = ['Y', 'm', 'd']\nconst DEFAULT_DATE_RAW_PATTERN_DELIMITER = '-'\nconst DEFAULT_TIME_PATTERN: TimePatternType = ['h', 'm', 's']\nconst DEFAULT_TIME_RAW_PATTERN: TimePatternType = ['h', 'm']\nconst DEFAULT_TIME_RAW_PATTERN_DELIMITER = ':'\n\nconst getDateSegmentKey = (unit: DateUnit): DateSegmentKey => {\n switch (unit.toLowerCase()) {\n case 'd':\n return 'day'\n case 'm':\n return 'month'\n default:\n return 'year'\n }\n}\n\nconst getDateUnitLength = (unit: DateUnit): 2 | 4 =>\n unit === 'Y' ? 4 : 2\n\nconst normalizeDateSegment = (segment: string, unit: DateUnit): string => {\n if (!segment) return ''\n\n switch (unit) {\n case 'y':\n return segment.slice(-2)\n case 'Y':\n return segment.slice(0, 4)\n default:\n return segment.slice(0, 2)\n }\n}\n\nconst getDateSegments = (\n value: string,\n pattern: DatePatternType\n): Partial<Record<DateSegmentKey, string>> => {\n const digits = value.replace(/[^\\d]/g, '')\n const segments: Partial<Record<DateSegmentKey, string>> = {}\n let start = 0\n\n for (const unit of pattern) {\n const end = start + getDateUnitLength(unit)\n const segment = digits.slice(start, end)\n\n if (segment) {\n segments[getDateSegmentKey(unit)] = segment\n }\n\n start = end\n }\n\n return segments\n}\n\nconst formatDateSegments = (\n segments: Partial<Record<DateSegmentKey, string>>,\n pattern: DatePatternType,\n delimiter = ''\n): string =>\n pattern\n .map((unit) =>\n normalizeDateSegment(segments[getDateSegmentKey(unit)] ?? '', unit)\n )\n .filter(Boolean)\n .join(delimiter)\n\nconst getTimeSegmentKey = (unit: TimeUnit): TimeSegmentKey => {\n switch (unit) {\n case 'h':\n return 'hours'\n case 'm':\n return 'minutes'\n default:\n return 'seconds'\n }\n}\n\nconst getTimeSegments = (\n value: string,\n pattern: TimePatternType\n): Partial<Record<TimeSegmentKey, string>> => {\n const digits = value.replace(/[^\\d]/g, '')\n const segments: Partial<Record<TimeSegmentKey, string>> = {}\n let start = 0\n\n for (const unit of pattern) {\n const end = start + 2\n const segment = digits.slice(start, end)\n\n if (segment) {\n segments[getTimeSegmentKey(unit)] = segment\n }\n\n start = end\n }\n\n return segments\n}\n\nconst formatTimeSegments = (\n segments: Partial<Record<TimeSegmentKey, string>>,\n pattern: TimePatternType,\n delimiter = ''\n): string =>\n pattern\n .map((unit) => (segments[getTimeSegmentKey(unit)] ?? '').slice(0, 2))\n .filter(Boolean)\n .join(delimiter)\n\n/**\n * Convert a raw date string (e.g. `2026-05-12`) into the digit order of the\n * display pattern (e.g. `12/05/2026` → `12052026`).\n *\n * The output is intentionally digits-only and un-delimited — the caller is\n * expected to pass the result through `cleave-zen`'s `formatDate` (or an\n * equivalent) to add the configured delimiter. The source pattern is\n * `dateRawPattern`; the target pattern is `datePattern`.\n */\nexport const getDateValueFromRaw = (\n value: string,\n options: FormatOptions = {}\n): string => {\n const sourcePattern = options.dateRawPattern ?? DEFAULT_DATE_RAW_PATTERN\n const targetPattern = options.datePattern ?? DEFAULT_DATE_PATTERN\n\n return formatDateSegments(\n getDateSegments(value, sourcePattern),\n targetPattern\n )\n}\n\n/**\n * Convert a raw time string (e.g. `14:30`) into the digit order of the\n * display pattern (e.g. `14:30:00` → `1430`).\n *\n * The output is intentionally digits-only and un-delimited — the caller is\n * expected to pass the result through `cleave-zen`'s `formatTime` (or an\n * equivalent) to add the configured delimiter and pad missing segments.\n * The source pattern is `timeRawPattern`; the target pattern is\n * `timePattern`.\n */\nexport const getTimeValueFromRaw = (\n value: string,\n options: FormatOptions = {}\n): string => {\n const sourcePattern =\n options.timeRawPattern ?? options.timePattern ?? DEFAULT_TIME_RAW_PATTERN\n const targetPattern = options.timePattern ?? DEFAULT_TIME_PATTERN\n\n return formatTimeSegments(\n getTimeSegments(value, sourcePattern),\n targetPattern\n )\n}\n\nconst getDateRawValue = (\n value: string,\n options: FormatOptions = {}\n): string => {\n const sourcePattern = options.datePattern ?? DEFAULT_DATE_PATTERN\n const targetPattern = options.dateRawPattern ?? DEFAULT_DATE_RAW_PATTERN\n const delimiter =\n options.dateRawPatternDelimiter ?? DEFAULT_DATE_RAW_PATTERN_DELIMITER\n\n return formatDateSegments(\n getDateSegments(value, sourcePattern),\n targetPattern,\n delimiter\n )\n}\n\nconst getTimeRawValue = (\n value: string,\n options: FormatOptions = {}\n): string => {\n const sourcePattern = options.timePattern ?? DEFAULT_TIME_PATTERN\n const targetPattern =\n options.timeRawPattern ?? options.timePattern ?? DEFAULT_TIME_RAW_PATTERN\n const delimiter =\n options.timeRawPatternDelimiter ?? DEFAULT_TIME_RAW_PATTERN_DELIMITER\n\n return formatTimeSegments(\n getTimeSegments(value, sourcePattern),\n targetPattern,\n delimiter\n )\n}\n\n/**\n * Strip a configured `prefix` from either the start or the end of `value`.\n * `tailPrefix: true` treats the prefix as a suffix.\n */\nexport const stripPrefixAndSuffix = (\n value: string,\n options: FormatOptions = {}\n): string => {\n if (!value || !options.prefix) return value\n\n const { prefix } = options\n const tailPrefix = options.tailPrefix ?? false\n\n if (tailPrefix && value.endsWith(prefix)) {\n return value.slice(0, -prefix.length)\n }\n\n if (!tailPrefix && value.startsWith(prefix)) {\n return value.slice(prefix.length)\n }\n\n return value\n}\n\n/**\n * Convert a formatted value back into its raw counterpart (digits only,\n * canonical structure ready to ship to a backend).\n */\nexport const getRawValue = (\n value: string,\n formatType: FormatType,\n options: FormatOptions = {}\n): string => {\n if (!value) return ''\n\n const cleanValue = stripPrefixAndSuffix(value, options)\n\n switch (formatType) {\n case 'numeral': {\n const numeralOpts: { numeralDecimalMark?: string } = {}\n if (options.numeralDecimalMark !== undefined) {\n numeralOpts.numeralDecimalMark = options.numeralDecimalMark\n }\n return unformatNumeral(cleanValue, numeralOpts)\n }\n\n case 'creditCard':\n case 'creditCardType':\n return unformatCreditCard(cleanValue)\n\n case 'general': {\n const generalOpts: {\n delimiter?: string\n delimiters?: string[]\n } = {}\n if (options.delimiter !== undefined) generalOpts.delimiter = options.delimiter\n if (options.delimiters !== undefined) generalOpts.delimiters = options.delimiters\n return unformatGeneral(cleanValue, generalOpts)\n }\n\n case 'date':\n return getDateRawValue(cleanValue, options)\n\n case 'time':\n return getTimeRawValue(cleanValue, options)\n\n case 'phone':\n return cleanValue.replace(/[^\\d+]/g, '')\n\n default:\n return cleanValue.replace(/\\s+/g, '')\n }\n}","import {\n formatCreditCard,\n formatDate,\n formatGeneral,\n formatNumeral,\n formatTime,\n getCreditCardType,\n type FormatGeneralOptions\n} from 'cleave-zen'\n\nimport { formatPhone } from './phone.js'\nimport {\n getDateValueFromRaw,\n getTimeValueFromRaw,\n type FormatOptions,\n type FormatType\n} from './raw.js'\n\nexport type { FormatOptions, FormatType }\n\nexport const FORMAT_TYPES = [\n 'general',\n 'phone',\n 'numeral',\n 'date',\n 'time',\n 'creditCard',\n 'creditCardType'\n] as const satisfies readonly FormatType[]\n\nexport const isFormatType = (value: unknown): value is FormatType =>\n typeof value === 'string' &&\n (FORMAT_TYPES as readonly string[]).includes(value)\n\ntype RuntimeOptions = FormatOptions & {\n country: string\n delimiter?: string\n}\n\n// Per-type defaults applied only when the caller does not pass their own.\n// `phone` overrides cleave-zen because libphonenumber emits spaces natively;\n// every other type lets cleave-zen pick its own idiomatic delimiter\n// (`/`, `:`, `,`, etc.) by leaving `delimiter` undefined on the runtime\n// options object passed downstream.\nconst PHONE_DEFAULT_DELIMITER = ' '\nconst PHONE_DEFAULT_COUNTRY = 'MX'\n\n/**\n * Internal: pick a country/delimiter-aware runtime options object with\n * phone-specific defaults applied. For non-phone formats the `delimiter`\n * is left as the user supplied it (or absent) so cleave-zen falls back to\n * its idiomatic defaults.\n */\nconst resolveRuntimeOptions = (\n formatType: FormatType,\n options: FormatOptions = {}\n): RuntimeOptions => {\n const isPhone = formatType === 'phone'\n const country = options.country ?? (isPhone ? PHONE_DEFAULT_COUNTRY : '')\n\n // Build the runtime options without ever assigning `undefined` to optional\n // fields (so `exactOptionalPropertyTypes` stays happy) and without ever\n // adding an explicit empty-string `delimiter` for non-phone types (so\n // cleave-zen falls back to its own idiomatic default).\n const runtime: RuntimeOptions = {\n ...options,\n country\n }\n\n if (options.delimiter !== undefined) {\n runtime.delimiter = options.delimiter\n } else if (isPhone) {\n runtime.delimiter = PHONE_DEFAULT_DELIMITER\n }\n\n return runtime\n}\n\n/**\n * Internal: format a pre-processed value into its display representation\n * by delegating to the matching `cleave-zen` (or `formatPhone`) helper.\n */\nconst formatValue = (\n value: string,\n formatType: FormatType,\n options: RuntimeOptions\n): string => {\n switch (formatType) {\n case 'phone':\n return formatPhone(value, options.country, options.delimiter)\n\n case 'numeral':\n return formatNumeral(value, options)\n\n case 'date':\n return formatDate(value, options)\n\n case 'time':\n return formatTime(value, options)\n\n case 'creditCard':\n return formatCreditCard(value, options)\n\n case 'creditCardType':\n return getCreditCardType(value, options.delimiter)\n\n case 'general':\n // cleave-zen's `formatGeneral` requires `blocks` in its options;\n // `FormatOptions` does not declare it (consumers pick blocks via\n // their own configuration). This cast is the documented seam.\n return formatGeneral(\n value,\n options as unknown as FormatGeneralOptions\n )\n }\n}\n\n/**\n * Internal: pre-process `value` before passing it to the per-type formatter.\n * Date and time inputs are first converted from raw to the display pattern\n * (so users can type either formatted or raw and still get sensible output).\n */\nconst getValueForFormatting = (\n value: string,\n formatType: FormatType,\n options: RuntimeOptions\n): string => {\n if (formatType === 'date') {\n return getDateValueFromRaw(value, options)\n }\n\n if (formatType === 'time') {\n return getTimeValueFromRaw(value, options)\n }\n\n return value\n}\n\nexport { formatValue, getValueForFormatting, resolveRuntimeOptions }","import {\n formatValue,\n getValueForFormatting,\n resolveRuntimeOptions,\n FORMAT_TYPES,\n isFormatType,\n type FormatType\n} from './format.js'\n\nimport { getRawValue, stripPrefixAndSuffix } from './raw.js'\n\nimport type { FormatterResult, FormatOptions } from './types.js'\n\nexport type { FormatOptions, FormatType, FormatterResult }\nexport { FORMAT_TYPES, isFormatType, stripPrefixAndSuffix }\n\n/**\n * Format `value` according to `formatType`, returning both a presentable\n * `formatted` string and a backend-ready `raw` string.\n *\n * The function is pure: it never touches the DOM and never reads from the\n * network. Pair it with your own input wiring (React, Vue, Svelte, vanilla)\n * to drive the visible field; mirror `result.raw` into a hidden input when\n * shipping to a server that expects clean digits.\n *\n * @param value - The raw value typed by the user (`null`/`undefined`/`''` return an empty result).\n * @param formatType - One of the supported `FormatType` values.\n * @param options - Per-type options (see `FormatOptions`).\n * @returns A `FormatterResult` with `formatted`, `raw`, and the echoed `type`.\n * @throws {TypeError} When `formatType` is not one of the supported types.\n */\nexport const format = (\n value: unknown,\n formatType: FormatType,\n options: FormatOptions = {}\n): FormatterResult => {\n if (!isFormatType(formatType)) {\n throw new TypeError(\n `Invalid formatType: ${String(formatType)}. Expected one of: ${FORMAT_TYPES.join(', ')}`\n )\n }\n\n if (value === null || value === undefined || value === '') {\n return { formatted: '', raw: '', type: formatType }\n }\n\n const runtime = resolveRuntimeOptions(formatType, options)\n const stringValue = typeof value === 'string' ? value : String(value)\n const cleanValue = stripPrefixAndSuffix(stringValue, runtime)\n const preValue = getValueForFormatting(cleanValue, formatType, runtime)\n const formatted = formatValue(preValue, formatType, runtime)\n // `getRawValue` normally consumes the *formatted* display string (mirrors\n // the original `syncRawInputValue` pipeline). The one exception is\n // `creditCardType`, where `formatted` is the card brand name (e.g. \"visa\")\n // rather than the card number — the raw needs to come from the cleaned\n // input directly.\n const raw =\n formatType === 'creditCardType'\n ? getRawValue(cleanValue, formatType, runtime)\n : getRawValue(formatted, formatType, runtime)\n\n return { formatted, raw, type: formatType }\n}","/**\n * # Regex Module\n *\n * Validation patterns exposed as public API for form consumers that pair\n * formatting with validation. Each entry bundles the regex with a ready-to-use\n * error message so consumers do not have to keep them in sync.\n *\n * ## Usage\n *\n * **Static (backward compatible):**\n * ```ts\n * regex.phone.pattern.test('5512345678') // true\n * regex.email.errorMessage // 'Please enter a valid email address.'\n * ```\n *\n * **Parametric (dynamic):**\n * ```ts\n * regex.digits(10).pattern.test('1234567890') // true\n * regex.digits(7).pattern.test('1234567') // true\n * regex.phone({ length: 10 }).pattern.test('1234567890')\n * regex.phone({ length: 7 }).pattern.test('1234567')\n * ```\n *\n * **Custom regex:**\n * ```ts\n * regex.custom(/^[A-Z]{5}$/, 'Must be 5 uppercase letters').pattern.test('HELLO')\n * ```\n *\n * ## Available Patterns\n *\n * | Key | Static | Parametric | Description |\n * | --- | --- | --- | --- |\n * | `phone` | ✅ | ✅ `({ length })` | Phone numbers |\n * | `email` | ✅ | — | Email addresses |\n * | `rfc` | ✅ | — | Mexican RFC |\n * | `curp` | ✅ | — | Mexican CURP |\n * | `cp` | ✅ | — | Mexican postal code (5 digits) |\n * | `numeral` | ✅ | — | Numbers with separators |\n * | `onlyNumbers` | ✅ | ✅ `({ length })` | Digits only |\n * | `digits` | — | ✅ `({ length, min, max })` | Variable digit count |\n * | `creditCard` | ✅ | ✅ `({ min, max })` | Card numbers |\n * | `expirationDate` | ✅ | — | MM/YY format |\n * | `cardCvc` | ✅ | — | 3-4 digit CVC |\n * | `onlyLetters` | ✅ | — | Letters only |\n * | `onlyAlphanumeric` | ✅ | — | Letters and numbers |\n * | `url` | ✅ | ✅ `({ protocol })` | URLs |\n * | `ipv4` | ✅ | — | IPv4 addresses |\n * | `ipv6` | ✅ | — | IPv6 addresses |\n * | `uuid` | ✅ | — | UUID v4 |\n * | `hexColor` | ✅ | — | Hex color codes |\n * | `hashtag` | ✅ | — | Social media hashtags |\n * | `mention` | ✅ | — | Social media mentions |\n * | `password` | — | ✅ `({ min, max, rules })` | Password strength |\n * | `custom` | — | ✅ `({ pattern, errorMessage })` | User-defined regex |\n */\n\n// ─── Types ─────────────────────────────────────────────────────────────────\n\nexport interface RegexEntry {\n pattern: RegExp\n errorMessage: string\n}\n\ninterface PhoneParams {\n length?: number\n}\n\ninterface DigitsParams {\n length?: number\n min?: number\n max?: number\n}\n\ninterface CreditCardParams {\n min?: number\n max?: number\n}\n\ninterface UrlParams {\n protocol?: 'http' | 'https' | 'ftp' | 'all'\n}\n\ninterface PasswordParams {\n min?: number\n max?: number\n uppercase?: boolean\n lowercase?: boolean\n numbers?: boolean\n special?: boolean\n}\n\ninterface CustomParams {\n pattern: RegExp\n errorMessage: string\n}\n\n\n// ─── Internal Factories ──────────────────────────────────────────────────────\n\nfunction createDigits(min: number, max: number, errorMsg: string): RegexEntry {\n return {\n pattern: new RegExp(`^\\\\d{${min},${max}}$`),\n errorMessage: errorMsg\n }\n}\n\nfunction createPhone(length: number): RegexEntry {\n return {\n pattern: new RegExp(`^(?:\\\\D*\\\\d){${length}}\\\\D*$`),\n errorMessage: `Please enter a valid ${length}-digit phone number.`\n }\n}\n\nfunction createCreditCard(min: number, max: number): RegexEntry {\n return {\n pattern: new RegExp(`^(?:\\\\D*\\\\d){${min},${max}}\\\\D*$`),\n errorMessage: `Please enter a valid card number (${min}-${max} digits).`\n }\n}\n\nfunction createUrl(requireProtocol: 'http' | 'https' | 'ftp' | 'all'): RegexEntry {\n const protocol = requireProtocol === 'all' ? 'https?' : requireProtocol\n return {\n pattern: new RegExp(`^${protocol}://[^\\\\s]+$`),\n errorMessage: `Please enter a valid URL${requireProtocol !== 'all' ? ` (${requireProtocol}://...)` : ''}.`\n }\n}\n\nfunction createPassword(params: PasswordParams): RegexEntry {\n const {\n min = 8,\n max = 128,\n uppercase = true,\n lowercase = true,\n numbers = true,\n special = false\n } = params\n\n // Build the character class with proper escaping (put - last to avoid range issues)\n let chars = ''\n if (uppercase) chars += 'A-Z'\n if (lowercase) chars += 'a-z'\n if (numbers) chars += '0-9'\n if (special) chars += '!@#$%^&*()_+\\\\-=\\\\[\\\\]{}|;:\\'\",.<>?/'\n\n const ruleParts: string[] = []\n if (uppercase) ruleParts.push('uppercase letter')\n if (lowercase) ruleParts.push('lowercase letter')\n if (numbers) ruleParts.push('number')\n if (special) ruleParts.push('special character')\n\n const rulesText = ruleParts.length > 2\n ? ruleParts.slice(0, -1).join(', ') + ' and ' + ruleParts.slice(-1)\n : ruleParts.join(' and ')\n\n return {\n pattern: new RegExp(`^[${chars}]{${min},${max}}$`),\n errorMessage: `Password must be ${min}-${max} characters with at least one ${rulesText}.`\n }\n}\n\n// ─── Static Patterns ─────────────────────────────────────────────────────────\n\nconst _regex = {\n phone: {\n pattern: /^(?:\\D*\\d){10}\\D*$/,\n errorMessage: 'Please enter a valid 10-digit phone number.'\n },\n email: {\n // Simple but effective email validation\n pattern: /^[^\\s@]+@[^\\s@]+\\.[a-zA-Z]{2,}$/,\n errorMessage: 'Please enter a valid email address.'\n },\n rfc: {\n // Mexican RFC ( Personas Morales y Físicas )\n pattern: /^([A-ZÑ&]{3,4})\\d{6}([A-Z0-9]{0,3})$/i,\n errorMessage: 'Please enter a valid RFC.'\n },\n curp: {\n // Mexican CURP (18 characters)\n pattern: /^[A-Z]{4}\\d{6}[A-Z]{6}[0-9A-Z]\\d$/i,\n errorMessage: 'Please enter a valid CURP.'\n },\n cp: {\n // Mexican postal code (5 digits)\n pattern: /^\\d{5}$/,\n errorMessage: 'Please enter a valid 5-digit postal code.'\n },\n numeral: {\n // Numbers with optional thousand separators and decimal points\n pattern: /\\d{1,3}(,\\d{3})*(\\.\\d+)?/,\n errorMessage: 'Please enter a valid number.'\n },\n onlyNumbers: {\n pattern: /^\\d+$/,\n errorMessage: 'Please enter only numbers.'\n },\n creditCard: {\n // 15 or 16 digits, allowing spaces or delimiters\n pattern: /^(?:\\D*\\d){15,16}\\D*$/,\n errorMessage: 'Please enter a valid card number (15-16 digits).'\n },\n expirationDate: {\n // MM/YY or MM/YYYY format\n pattern: /^(0[1-9]|1[0-2])\\/(\\d{2}|\\d{4})$/,\n errorMessage: 'Please enter a valid expiration date (MM/YY or MM/YYYY).'\n },\n cardCvc: {\n // 3 or 4 digit card security codes\n pattern: /^\\d{3,4}$/,\n errorMessage: 'Please enter a valid CVC (3-4 digits).'\n },\n onlyLetters: {\n // Letters only (including accented characters and spaces)\n pattern: /^[A-Za-zÁÉÍÓÚáéíóúÑñ\\s]+$/,\n errorMessage: 'Please enter only letters.'\n },\n onlyAlphanumeric: {\n // Letters and numbers (including accented characters and spaces)\n pattern: /^[A-Za-zÁÉÍÓÚáéíóúÑñ0-9\\s]+$/,\n errorMessage: 'Please enter only letters and numbers.'\n },\n url: {\n // Accepts http, https, ftp\n pattern: /^(?:https?|ftp):\\/\\/[^\\s]+$/,\n errorMessage: 'Please enter a valid URL.'\n },\n ipv4: {\n // IPv4 addresses (0-255 per octet)\n pattern: /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,\n errorMessage: 'Please enter a valid IPv4 address.'\n },\n ipv6: {\n // IPv6 addresses (simplified)\n pattern: /^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/,\n errorMessage: 'Please enter a valid IPv6 address.'\n },\n uuid: {\n // UUID v4\n pattern: /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,\n errorMessage: 'Please enter a valid UUID.'\n },\n hexColor: {\n // Hex color codes (#RGB or #RRGGBB)\n pattern: /^#(?:[0-9a-fA-F]{3}){1,2}$/,\n errorMessage: 'Please enter a valid hex color code (e.g., #FFF or #FFFFFF).'\n },\n hashtag: {\n // Social media hashtags\n pattern: /^#[a-zA-Z_][a-zA-Z0-9_]*$/,\n errorMessage: 'Please enter a valid hashtag (e.g., #example).'\n },\n mention: {\n // Social media mentions\n pattern: /^@[a-zA-Z_][a-zA-Z0-9_]*$/,\n errorMessage: 'Please enter a valid mention (e.g., @username).'\n },\n postalCode: {\n // Generic 5-digit postal code (US-style ZIP / MX CP)\n pattern: /^\\d{5}(?:-\\d{4})?$/,\n errorMessage: 'Please enter a valid postal code (e.g., 90210 or 90210-1234).'\n },\n time24: {\n // 24-hour time HH:MM\n pattern: /^([01]\\d|2[0-3]):([0-5]\\d)$/,\n errorMessage: 'Please enter a valid 24-hour time (HH:MM).'\n },\n date: {\n // ISO-like date YYYY-MM-DD (loose)\n pattern: /^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$/,\n errorMessage: 'Please enter a valid date (YYYY-MM-DD).'\n },\n slug: {\n // URL slug (lowercase, hyphens, no spaces)\n pattern: /^[a-z0-9]+(?:-[a-z0-9]+)*$/,\n errorMessage: 'Please enter a valid slug (lowercase, hyphens, no spaces).'\n },\n username: {\n // Username: 3-20 chars, alphanumeric, underscore, hyphen\n pattern: /^[a-zA-Z0-9_-]{3,20}$/,\n errorMessage: 'Please enter a valid username (3-20 chars, letters, numbers, _ or -).'\n },\n macAddress: {\n // MAC address (colon or hyphen separated)\n pattern: /^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/,\n errorMessage: 'Please enter a valid MAC address (e.g., 00:1B:44:11:3A:B7).'\n },\n semver: {\n // Semantic version (X.Y.Z with optional -prerelease)\n pattern: /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-[a-zA-Z0-9.-]+)?$/,\n errorMessage: 'Please enter a valid semantic version (e.g., 1.2.3).'\n },\n base64: {\n // Base64 encoded string\n pattern: /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,\n errorMessage: 'Please enter a valid Base64 encoded string.'\n }\n} as const\n\n// ─── Parametric Extensions ───────────────────────────────────────────────────\n\n/**\n * Digits with configurable length.\n * @example\n * regex.digits(10).pattern.test('1234567890') // true\n * regex.digits({ length: 7 }).pattern.test('1234567') // true\n * regex.digits({ min: 3, max: 10 }).pattern.test('12345') // true\n */\nfunction digits(params?: number | DigitsParams): RegexEntry {\n if (typeof params === 'number') {\n return createDigits(params, params, `Please enter exactly ${params} digits.`)\n }\n const { length, min = 1, max = 20 } = params ?? {}\n const actualMin = length ?? min\n const actualMax = length ?? max\n if (actualMin === actualMax) {\n return createDigits(actualMin, actualMax, `Please enter exactly ${actualMin} digits.`)\n }\n return createDigits(actualMin, actualMax, `Please enter ${actualMin}-${actualMax} digits.`)\n}\n\n/**\n * Phone with configurable digit count.\n *\n * Also available as static entry: regex.phone.pattern (10 digits)\n * @example\n * regex.phone().pattern.test('5512345678') // true (10 digits)\n * regex.phone({ length: 7 }).pattern.test('1234567') // true (7 digits)\n */\nfunction _phoneFn(params?: PhoneParams): RegexEntry {\n const length = params?.length ?? 10\n return createPhone(length)\n}\n\n/**\n * Credit card with configurable digit range.\n *\n * Also available as static entry: regex.creditCard.pattern (15-16 digits)\n * @example\n * regex.creditCard().pattern.test('4111111111111111') // true (15-16)\n * regex.creditCard({ min: 13, max: 19 }).pattern.test('1234567890123') // true\n */\nfunction _creditCardFn(params?: CreditCardParams): RegexEntry {\n const min = params?.min ?? 15\n const max = params?.max ?? 16\n return createCreditCard(min, max)\n}\n\n/**\n * URL with configurable protocol.\n *\n * Also available as static entry: regex.url.pattern (any protocol)\n * @example\n * regex.url().pattern.test('https://example.com') // true\n * regex.url({ protocol: 'https' }).pattern.test('https://example.com') // true\n * regex.url({ protocol: 'https' }).pattern.test('ftp://example.com') // false\n */\nfunction _urlFn(params?: UrlParams): RegexEntry {\n const protocol = params?.protocol ?? 'all'\n return createUrl(protocol)\n}\n\n/**\n * Password with configurable strength rules.\n * @example\n * regex.password().pattern.test('Passw0rd!') // true (default: 8+ chars, upper, lower, number)\n * regex.password({ min: 12, special: true }).pattern.test('MyP@ssw0rd!') // true\n */\nfunction _passwordFn(params?: PasswordParams): RegexEntry {\n return createPassword(params ?? {})\n}\n\n/**\n * Custom regex provided by the user.\n * @example\n * regex.custom(/^[A-Z]{5}$/, 'Must be 5 uppercase letters').pattern.test('HELLO') // true\n * regex.custom({ pattern: /^\\d+$/, errorMessage: 'Numbers only' }).pattern.test('123') // true\n */\nfunction _customFn(pattern: RegExp, errorMessage?: string): RegexEntry\nfunction _customFn(params: CustomParams): RegexEntry\nfunction _customFn(\n arg1: RegExp | CustomParams,\n arg2?: string\n): RegexEntry {\n if (arg1 instanceof RegExp) {\n return { pattern: arg1, errorMessage: arg2 ?? 'Invalid value.' }\n }\n return { pattern: arg1.pattern, errorMessage: arg1.errorMessage }\n}\n\n// ─── Callable Objects with Attached Pattern ──────────────────────────────────\n\n// These are callable functions that also have .pattern and .errorMessage attached\n// This allows both: regex.phone({ length: 7 }) AND regex.phone.pattern\n\nconst phoneFn = _phoneFn as typeof _phoneFn & RegexEntry\nphoneFn.pattern = _regex.phone.pattern\nphoneFn.errorMessage = _regex.phone.errorMessage\n\nconst creditCardFn = _creditCardFn as typeof _creditCardFn & RegexEntry\ncreditCardFn.pattern = _regex.creditCard.pattern\ncreditCardFn.errorMessage = _regex.creditCard.errorMessage\n\nconst urlFn = _urlFn as typeof _urlFn & RegexEntry\nurlFn.pattern = _regex.url.pattern\nurlFn.errorMessage = _regex.url.errorMessage\n\n// Parametric-only functions need default error messages\nconst digitsFn = digits as typeof digits & RegexEntry\ndigitsFn.errorMessage = 'Please enter a valid number.'\n\nconst passwordFn = _passwordFn as typeof _passwordFn & RegexEntry\npasswordFn.errorMessage = 'Please enter a valid password.'\n\nconst customFn = _customFn as typeof _customFn & RegexEntry\ncustomFn.errorMessage = 'Please enter a valid value.'\n\n// ─── Final Export ─────────────────────────────────────────────────────────────\n\nexport const regex = {\n // Static entries (backward compatible - spread first)\n ..._regex,\n\n // Parametric functions\n digits: digitsFn,\n phone: phoneFn,\n creditCard: creditCardFn,\n url: urlFn,\n password: passwordFn,\n custom: customFn\n} as const\n\nexport type RegexKey = keyof typeof _regex\nexport type Regex = typeof regex","// Browser entrypoint. Exposes a minimal surface as a single global\n// accessible via `window.Forms` (or `globalThis.Forms`).\n//\n// Public shape:\n// - Forms.form(target, options)\n// - Forms.newForm({ id, options })\n// - Forms.destroyForm(id)\n// - Forms.available (registry keyed by form id)\n//\n// The IIFE bundle consumes the same `browser` singleton as the vanilla\n// entrypoint — single source of truth for the registry helpers.\n\nimport { browser } from './registry'\nimport type { FormsApi } from './registry'\n\nconst Forms: FormsApi = browser\n\ndeclare global {\n interface Window {\n Forms: FormsApi\n }\n}\n\nif (typeof globalThis !== 'undefined') {\n ;(globalThis as typeof globalThis & { Forms: FormsApi }).Forms = Forms\n}\n\nexport default Forms","// api/append.ts\n// Appends DOM content to the bound form. If a class is provided, removes\n// any existing node with that class first to avoid duplicates.\n// Returns the created node or null when no element is bound.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { AppendContentOptions } from '../core/types'\n\nexport const createAppend =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n ({ tag, content, class: className, atStart = false }: AppendContentOptions) => {\n if (!state.element) return null\n\n helpers.clearFieldCache()\n\n if (className) {\n const classSelector = className.trim().split(/\\s+/)[0]\n const existing = classSelector\n ? state.element.querySelector(`.${classSelector}`)\n : null\n existing?.remove()\n }\n\n const node = document.createElement(tag)\n if (className) node.className = className\n node.innerHTML = content\n\n if (atStart && state.element.firstChild) {\n state.element.insertBefore(node, state.element.firstChild)\n } else {\n state.element.appendChild(node)\n }\n\n return node\n }\n","// api/auto-submit.ts\n// Enables native auto-submit. Pass `true` to enable, `false` to disable,\n// or an { debounce } object to delay.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createAutoSubmit =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (next: boolean | { debounce?: number } = true) => {\n state.autoSubmitEnabled = next !== false\n state.autoSubmitDebounce =\n typeof next === 'object' && next ? next.debounce ?? 0 : 0\n helpers.notifySubscribers()\n return state.api!\n }\n","// api/clear-errors.ts\n// Clears manual errors. With no args, clears every manual error. With a\n// list, clears only those fields.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createClearErrors =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (fields?: string[]) => {\n if (!fields) {\n state.manualErrors = {}\n helpers.syncVisualState()\n helpers.notifySubscribers()\n return state.api!\n }\n\n for (const field of fields) {\n delete state.manualErrors[field]\n }\n helpers.syncVisualState(fields)\n helpers.notifySubscribers()\n return state.api!\n }\n","// Low-level helpers used by `api/format.ts`:\n// - DOM cursor tracking equivalent to cleave.js' `getNextCursorPosition`\n// (so typing/backspacing inside formatted inputs keeps the caret\n// in a sensible place, even when delimiters are inserted or removed).\n// - `postDelimiterBackspace` contract: after a deletion, the caret\n// is pulled backwards past any leading delimiter so the user never\n// ends up parked with a format character on the caret's left.\n// - Raw-mirror lookup & creation: each formatted input gets a hidden\n// sibling (`type=\"hidden\"`) that holds the backend-ready `raw`\n// value. The mirror is created on first `format()` call and reused\n// on subsequent calls so re-binding the controller does not duplicate\n// hidden inputs.\n//\n// The helpers here are pure DOM utilities — they do not know about the\n// controller state.\n\nimport type { FormFieldElement } from './types'\n\nexport const FORMATTER_RAW_ATTRIBUTE = 'data-formatter-raw-for'\n\n// Resolve a field by name (used to read the original input that owns the\n// raw mirror). Returns the first matching element or `null`.\nexport const getFormatterField = (\n form: HTMLFormElement,\n name: string\n): HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null => {\n const selector = `[name=\"${cssEscape(name)}\"]`\n const node = form.querySelector(selector)\n if (\n node instanceof HTMLInputElement ||\n node instanceof HTMLTextAreaElement ||\n node instanceof HTMLSelectElement\n ) {\n return node\n }\n return null\n}\n\n// Minimal CSS.escape polyfill for selectors that may contain special\n// characters (`[1].phone`, `email[primary]`, etc.).\nconst cssEscape = (value: string): string => {\n if (typeof CSS !== 'undefined' && typeof CSS.escape === 'function') {\n return CSS.escape(value)\n }\n return value.replace(/([!\"#$%&'()*+,./:;<=>?@\\[\\\\\\]^`{|}~])/g, '\\\\$1')\n}\n\n// Find the hidden input that mirrors `raw` for the given field name.\n// Returns the existing element or `null`.\nexport const findRawMirror = (\n form: HTMLFormElement,\n fieldName: string\n): HTMLInputElement | null => {\n const byAttr = form.querySelector<HTMLInputElement>(\n `[${FORMATTER_RAW_ATTRIBUTE}=\"${cssEscape(fieldName)}\"]`\n )\n if (byAttr) return byAttr\n\n // Backwards-compatible lookup: existing deployments may have used\n // `<input name=\"<field>_raw\">` or `<input name=\"<field>Raw\">` to carry the raw value. Reuse it.\n const byName = form.querySelector<HTMLInputElement>(\n `[name=\"${cssEscape(`${fieldName}_raw`)}\"]`\n )\n if (byName) return byName\n const byNameOld = form.querySelector<HTMLInputElement>(\n `[name=\"${cssEscape(`${fieldName}Raw`)}\"]`\n )\n if (byNameOld) return byNameOld\n\n return null\n}\n\n// Create a hidden input that will mirror the raw value of `fieldName`.\n// Idempotent: if a mirror already exists it is returned as-is.\nexport const ensureRawMirror = (\n form: HTMLFormElement,\n fieldName: string\n): HTMLInputElement => {\n const existing = findRawMirror(form, fieldName)\n if (existing) return existing\n\n const input = document.createElement('input')\n input.type = 'hidden'\n input.name = `${fieldName}_raw`\n input.setAttribute('aria-hidden', 'true')\n input.tabIndex = -1\n input.setAttribute(FORMATTER_RAW_ATTRIBUTE, fieldName)\n form.appendChild(input)\n return input\n}\n\n// Remove every raw mirror owned by `format()`. Mirrors created by this\n// controller carry the `data-formatter-raw-for` attribute; mirrors that\n// existed before are left untouched.\nexport const removeOwnedRawMirrors = (form: HTMLFormElement): void => {\n form\n .querySelectorAll<HTMLInputElement>(`[${FORMATTER_RAW_ATTRIBUTE}]`)\n .forEach(node => node.remove())\n}\n\n// Write `formatted` into the visible field and `raw` into the hidden\n// mirror, preserving the cursor as best as possible.\n//\n// Returns the new caret position so callers can debug or run additional\n// assertions. The function avoids triggering `MutationObserver` cascades\n// for the hidden mirror by setting `.value` directly (the controller's\n// own delegated handler ignores hidden inputs via `isFieldElement`).\n//\n// `inputType` is the optional `InputEvent.inputType` value (e.g.\n// `'insertText'`, `'deleteContentBackward'`, `'deleteWordBackward'`).\n// When it indicates a deletion, this helper mirrors cleave.js'\n// `postDelimiterBackspace` contract: after the caret is re-anchored in\n// the freshly formatted value, walk backwards while the character\n// immediately to the left of the caret is a format character (delimiter,\n// prefix/suffix symbol, …) and decrement the caret. That keeps the\n// caret from \"jumping\" past a delimiter that disappeared when the user\n// deleted the digit sitting right next to it.\nexport const applyFormattedValue = (\n visible: HTMLInputElement | HTMLTextAreaElement,\n mirror: HTMLInputElement | null,\n formatted: string,\n raw: string,\n inputType?: string\n): number => {\n // Capture the caret in the **raw** input the user just typed — this\n // is what cleave's `getNextCursorPosition` does. Using the formatted\n // previous value would lose information when the user edits in the\n // middle of a masked field (deletion adjacent to delimiters, etc.).\n const rawInput = visible.value\n const caret = clamp(\n visible.selectionStart ?? rawInput.length,\n 0,\n rawInput.length\n )\n\n if (mirror && mirror.value !== raw) mirror.value = raw\n\n if (rawInput === formatted) {\n // The formatter did not change the visible value — usually because\n // the user is editing at the tail of a fully-formatted string. Even\n // so, a backspace can leave the caret sitting with a delimiter on\n // its left (because the digit right after the delimiter just\n // disappeared). Apply the postDelimiterBackspace scan in this path\n // too so the contract holds for both branches.\n const newCaret = pullCaretPastLeadingDelimiter(caret, formatted, inputType)\n if (newCaret !== caret) restoreCursor(visible, newCaret)\n return newCaret\n }\n\n visible.value = formatted\n\n const newCaret = pullCaretPastLeadingDelimiter(\n computeCursorPosition(caret, rawInput, formatted),\n formatted,\n inputType\n )\n restoreCursor(visible, newCaret)\n return newCaret\n}\n\n// Mirrors cleave.js' `postDelimiterBackspace` contract. After a\n// deletion (`inputType` starts with `'delete'`) we never want the\n// caret to sit with a format character immediately on its left; if it\n// would, pull it backwards until it does (or until we hit index 0).\n// No-op when `inputType` is missing or does not indicate a deletion.\nconst pullCaretPastLeadingDelimiter = (\n caret: number,\n value: string,\n inputType: string | undefined\n): number => {\n if (!inputType || !inputType.startsWith('delete')) return caret\n\n let cursor = caret\n while (cursor > 0 && isFormatChar(value[cursor - 1]!)) {\n cursor -= 1\n }\n return cursor\n}\n\nconst clamp = (value: number, min: number, max: number): number =>\n Math.max(min, Math.min(max, value))\n\n// `computeCursorPosition` is a cleave-style implementation:\n// - count \"non-format\" characters (digits / letters) between the caret\n// and the start of the **raw input the user just typed**, then\n// locate that same logical index in the new formatted value\n// (jumping over inserted delimiters).\n// - when the caret is at (or past) the end of the raw input, place\n// it at the end of the formatted value.\n//\n// The algorithm intentionally avoids any cleave-zen dependency so this\n// file is pure DOM arithmetic.\nexport const computeCursorPosition = (\n caretPos: number,\n rawInput: string,\n newValue: string\n): number => {\n if (newValue.length === 0) return 0\n\n // Caret at (or past) the end of the raw input — place at new end.\n if (caretPos >= rawInput.length) return newValue.length\n\n // Caret within the raw input: count non-format characters to its\n // LEFT (i.e. how many real characters are before the caret) and\n // find that same count in the new formatted value.\n const targetNonFormat = countNonFormat(rawInput.slice(0, caretPos))\n\n if (targetNonFormat === 0) {\n // Skip leading delimiters / prefix symbols (`$`, `+`, …) so the\n // caret lands at the first real character of the new value.\n let i = 0\n while (i < newValue.length && isFormatChar(newValue[i]!)) i += 1\n return i\n }\n\n let seen = 0\n for (let i = 0; i < newValue.length; i += 1) {\n if (!isFormatChar(newValue[i]!)) {\n seen += 1\n if (seen === targetNonFormat) {\n return Math.min(i + 1, newValue.length)\n }\n }\n }\n\n return newValue.length\n}\n\nconst countNonFormat = (value: string): number => {\n let count = 0\n for (const char of value) {\n if (!isFormatChar(char)) count += 1\n }\n return count\n}\n\n// \"Format characters\" are delimiters, prefix symbols, and other\n// non-alphanumeric separators that the formatter may insert or remove.\n// We deliberately keep this conservative — anything that is not a digit\n// or ASCII letter counts as a format character.\nexport const isFormatChar = (char: string): boolean => {\n if (!char) return false\n if (char >= '0' && char <= '9') return false\n if ((char >= 'a' && char <= 'z') || (char >= 'A' && char <= 'Z')) return false\n return true\n}\n\nconst restoreCursor = (\n field: HTMLInputElement | HTMLTextAreaElement,\n position: number\n): void => {\n const max = field.value.length\n const safe = clamp(position, 0, max)\n\n const apply = () => {\n try {\n field.setSelectionRange(safe, safe)\n } catch {\n // Some input types (number, email) throw on setSelectionRange.\n // Ignore — the caret just stays where the browser put it.\n }\n }\n\n // Android keyboard fix: defer one frame so the IME catches up before\n // we re-position the caret. Mirrors cleave.js' `isAndroid` branch.\n if (typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent)) {\n if (typeof requestAnimationFrame === 'function') {\n requestAnimationFrame(apply)\n } else {\n setTimeout(apply, 1)\n }\n return\n }\n\n apply()\n}\n\n// `getFormatterField` re-exported above is the canonical entry point,\n// but it is intentionally restricted to controller-owned fields. This\n// looser helper accepts a wider set of inputs for test fixtures.\nexport const isFormatterFieldElement = (node: Element): node is FormFieldElement =>\n node instanceof HTMLInputElement ||\n node instanceof HTMLTextAreaElement ||\n node instanceof HTMLSelectElement","// Lazy singleton loader for the optional `@samline/formatter` peer.\n// The formatter is imported dynamically so the package stays usable\n// even when the peer is not installed: callers receive `null` and a\n// single console.error explaining the missing dependency.\n//\n// The first failure is cached so the warning is printed exactly once\n// per process, not on every `format(...)` call.\n\nexport interface FormatterModule {\n format: (\n value: unknown,\n formatType: string,\n options?: Record<string, unknown>\n ) => { formatted: string; raw: string; type: string }\n FORMAT_TYPES?: readonly string[]\n isFormatType?: (value: unknown) => boolean\n regex?: Record<string, { pattern: RegExp; errorMessage: string }>\n}\n\ntype LoaderState =\n | { status: 'pending'; promise: Promise<FormatterModule | null> }\n | { status: 'resolved'; module: FormatterModule | null }\n\nlet state: LoaderState | null = null\n\nconst MISSING_MESSAGE =\n '[samline/forms] The `format()` and `formatAll()` methods require the ' +\n '@samline/formatter package. Install it with: npm i @samline/formatter ' +\n '(or pnpm/bun/yarn equivalent).'\n\nlet warned = false\n\nconst warnOnce = () => {\n if (warned) return\n warned = true\n console.error(MISSING_MESSAGE)\n}\n\nexport const loadFormatter = (): Promise<FormatterModule | null> => {\n if (state && state.status === 'resolved') {\n if (!state.module) warnOnce()\n return Promise.resolve(state.module)\n }\n\n if (state && state.status === 'pending') {\n return state.promise\n }\n\n const promise = (async () => {\n try {\n // Dynamic import keeps the optional peer out of the eager build graph.\n // The consumer's bundler is responsible for resolving the peer at\n // build time — `tsup` treats `@samline/formatter` as `external` so it\n // does not try to pre-bundle it. Do NOT re-add `/* @vite-ignore */`\n // here: in production it leaves the bare specifier as a literal in\n // the bundle, browsers cannot resolve it, and the formatter silently\n // never loads (the catch below masks the failure).\n const mod = (await import('@samline/formatter')) as FormatterModule\n state = { status: 'resolved', module: mod }\n return mod\n } catch {\n warnOnce()\n state = { status: 'resolved', module: null }\n return null\n }\n })()\n\n state = { status: 'pending', promise }\n return promise\n}\n\n// Test-only helper: reset the cached loader so unit tests can swap the\n// dynamic import between \"installed\" and \"missing\" scenarios.\nexport const __resetFormatterLoaderForTests = (): void => {\n state = null\n warned = false\n}\n\n// Test-only helper: inject a formatter implementation directly,\n// bypassing the dynamic import. Pass `null` to simulate the\n// \"peer not installed\" branch.\nexport const __setFormatterModuleForTests = (\n module: FormatterModule | null\n): void => {\n state = { status: 'resolved', module }\n}","// api/format.ts\n// Applies the optional `@samline/formatter` peer to one or many form\n// fields, with cleave-style cursor tracking and an auto-managed hidden\n// raw mirror.\n//\n// Public surface lives on `FormController` as `format()` and\n// `formatAll()`. Both are chainable and both behave identically — the\n// alias exists only to read naturally when the caller wants to apply\n// the same configuration to several inputs.\n//\n// When `@samline/formatter` is not installed the methods log a single\n// `console.error` (via `loadFormatter`) and return the controller\n// unchanged so the rest of the app keeps working.\n\nimport type { FieldFormatConfig, FormController, FormFieldElement } from '../core/types'\nimport {\n applyFormattedValue,\n ensureRawMirror,\n findRawMirror,\n FORMATTER_RAW_ATTRIBUTE\n} from '../core/format-helpers'\nimport { loadFormatter } from '../core/formatter-loader'\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\n// Listeners added on demand; tracked here so a future `unformat(field)`\n// (out of scope for v1) can detach them without trawling `state.listeners`.\ntype FormatEntry = {\n fields: Set<HTMLInputElement | HTMLTextAreaElement>\n mirrorName: string\n handler: (event: Event) => void\n mirrorIsOwned: boolean\n}\n\nconst registry = new WeakMap<FormControllerState, Map<string, FormatEntry>>()\n\nconst getRegistry = (state: FormControllerState): Map<string, FormatEntry> => {\n let bucket = registry.get(state)\n if (!bucket) {\n bucket = new Map<string, FormatEntry>()\n registry.set(state, bucket)\n }\n return bucket\n}\n\nconst resolveFieldNames = (config: FieldFormatConfig): string[] =>\n Array.isArray(config.field) ? config.field : [config.field]\n\nconst addListener = (\n state: FormControllerState,\n target: EventTarget,\n type: string,\n handler: EventListener\n): void => {\n target.addEventListener(type, handler)\n state.listeners.push({ element: target, type, handler })\n}\n\nconst buildHandler = (\n field: HTMLInputElement | HTMLTextAreaElement,\n mirror: HTMLInputElement | null,\n formatFn: NonNullable<Awaited<ReturnType<typeof loadFormatter>>>['format'],\n formatType: FieldFormatConfig['type'],\n formatOptions: Record<string, unknown> | undefined,\n mirrorFieldName: string\n): ((event: Event) => void) => {\n const handler = (event: Event) => {\n if (!field.isConnected) return\n // Bug #1 fix: ensure the event actually came from this field,\n // since the listener is delegated to the form.\n if (event.target !== field) return\n const rawInput = (event.target as HTMLInputElement | HTMLTextAreaElement).value\n // `InputEvent.inputType` lets the cursor helper distinguish deletions\n // (`deleteContentBackward`, `deleteWordBackward`, …) from insertions\n // and apply cleave's `postDelimiterBackspace` contract: after a\n // deletion the caret must never sit with a delimiter on its left.\n const inputType = readInputType(event)\n const { formatted, raw } = formatFn(rawInput, formatType, formatOptions)\n\n if (!formatted && !raw) {\n field.value = ''\n if (mirror && mirror.value !== '') mirror.value = ''\n return\n }\n\n applyFormattedValue(field, mirror, formatted, raw, inputType)\n // Keep the registry mirror pointer alive for in-place cleanup.\n void mirrorFieldName\n }\n return handler\n}\n\n// `InputEvent.inputType` is the canonical signal for \"what just\n// happened\". The listener is registered as a plain `Event` handler so\n// older / synthetic events without `inputType` simply fall through and\n// behave as insertions — which preserves the pre-existing cursor math.\nconst readInputType = (event: Event): string | undefined => {\n const candidate = event as Partial<InputEvent>\n return typeof candidate.inputType === 'string' ? candidate.inputType : undefined\n}\n\n// Internal: core apply routine shared by `format()` and `formatAll()`.\n// Returns the controller to preserve chainability even on the missing\n// peer path.\nconst applyFormat = async (\n state: FormControllerState,\n helpers: FormControllerHelpers,\n config: FieldFormatConfig\n): Promise<void> => {\n if (!state.element || !state.api) return\n\n const formatter = await loadFormatter()\n if (!formatter) return\n\n const formatType = config.type\n const formatOptions = config.options\n const fieldNames = resolveFieldNames(config)\n const bucket = getRegistry(state)\n\n for (const fieldName of fieldNames) {\n const fields = helpers.getFieldsByName(fieldName) as FormFieldElement[]\n if (fields.length === 0) continue\n\n // Filter to text-like inputs — the formatter does not work on\n // checkboxes, radios, files, etc.\n const writable = fields.filter(\n (f): f is HTMLInputElement | HTMLTextAreaElement =>\n (f instanceof HTMLInputElement &&\n f.type !== 'checkbox' &&\n f.type !== 'radio' &&\n f.type !== 'file' &&\n f.type !== 'submit' &&\n f.type !== 'button') ||\n f instanceof HTMLTextAreaElement\n )\n\n if (writable.length === 0) continue\n\n for (const field of writable) {\n // Idempotency: a second `format()` call for the same field\n // refreshes the configuration in `state.formattedFields` but\n // does not double-bind listeners or duplicate the hidden mirror.\n const existing = bucket.get(fieldName)\n const mirrorName = config.rawField ?? `${fieldName}_raw`\n // Bug #2a fix: search by fieldName (the data-formatter-raw-for value),\n // not mirrorName (the input name). findRawMirror looks for\n // data-formatter-raw-for=\"<fieldName>\", not data-formatter-raw-for=\"<fieldName>Raw\".\n let mirror = findRawMirror(state.element, fieldName) ?? null\n const mirrorIsOwned = !mirror\n if (!mirror) mirror = ensureRawMirror(state.element, fieldName)\n // Sync the mirror's `name` attribute when the user overrides it\n // via `config.rawField` (default `<field>Raw`).\n if (mirror && mirror.name !== mirrorName) mirror.name = mirrorName\n const trackerMirrorName = mirror?.name ?? mirrorName\n\n if (existing) {\n // Refresh the stored config so `destroy()` knows the entry is\n // still active, but do not re-attach listeners.\n existing.mirrorName = trackerMirrorName\n existing.mirrorIsOwned = mirrorIsOwned\n state.formattedFields.set(fieldName, {\n config,\n mirrorName: trackerMirrorName,\n mirrorIsOwned\n })\n // Bug #2b fix: re-format the current value with the new options\n // (e.g. country_code change needs to re-format the phone).\n // Only re-format when the field has a value; when the field is\n // empty we leave the mirror untouched so pre-existing raw values\n // (set before format() was called) are preserved.\n const current = field.value\n if (current !== '') {\n const { formatted, raw } = formatter.format(current, formatType, formatOptions)\n applyFormattedValue(field, mirror, formatted, raw)\n }\n continue\n }\n\n const handler = buildHandler(\n field,\n mirror,\n formatter.format,\n formatType,\n formatOptions,\n trackerMirrorName\n )\n\n addListener(state, state.element, 'input', handler)\n bucket.set(fieldName, {\n fields: new Set([field]),\n mirrorName: trackerMirrorName,\n handler,\n mirrorIsOwned\n })\n state.formattedFields.set(fieldName, {\n config,\n mirrorName: trackerMirrorName,\n mirrorIsOwned\n })\n\n // Apply the formatter to the current value so pre-filled data\n // (e.g. coming from `setValue`, `prefill`, or server-rendered\n // HTML) is normalised immediately and the hidden mirror is\n // populated without waiting for a user keystroke.\n const initial = field.value\n if (initial !== '') {\n const { formatted, raw } = formatter.format(initial, formatType, formatOptions)\n applyFormattedValue(field, mirror, formatted, raw)\n } else if (mirrorIsOwned && mirror && mirror.value !== '') {\n // Only clear an owned mirror when the field is empty. Pre-existing\n // mirrors are left untouched so their values are preserved.\n mirror.value = ''\n }\n }\n }\n}\n\nexport const createFormat =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (config: FieldFormatConfig): FormController => {\n if (state.isDestroyed) return state.api!\n if (!state.element) return state.api!\n\n // Fire and forget: the loader surfaces a single console.error if\n // the peer is missing, then resolves with `null`.\n void applyFormat(state, helpers, config)\n\n return state.api!\n }\n\nexport const createFormatAll = createFormat\n\n// Cleanup hook consumed by `api/destroy.ts`. Removes every listener\n// registered through this module and drops the owned raw mirrors that\n// were created during the controller's lifetime. Mirrors that already\n// existed in the DOM (i.e. `mirrorIsOwned === false`) are left alone.\nexport const cleanupFormatRegistry = (state: FormControllerState): void => {\n if (!state.element) {\n registry.delete(state)\n return\n }\n\n const bucket = registry.get(state)\n if (!bucket) {\n state.element\n .querySelectorAll<HTMLInputElement>(`[${FORMATTER_RAW_ATTRIBUTE}]`)\n .forEach(node => node.remove())\n return\n }\n\n for (const [fieldName, entry] of bucket) {\n state.element.removeEventListener('input', entry.handler)\n if (entry.mirrorIsOwned) {\n const mirror = findRawMirror(state.element, entry.mirrorName)\n mirror?.remove()\n }\n bucket.delete(fieldName)\n state.formattedFields.delete(fieldName)\n }\n\n // Catch any leftover owned mirrors (defensive — should not happen\n // because every `applyFormat` path registers in the bucket, but the\n // second pass guarantees no orphans escape `destroy()`).\n state.element\n .querySelectorAll<HTMLInputElement>(`[${FORMATTER_RAW_ATTRIBUTE}]`)\n .forEach(node => node.remove())\n}","// api/destroy.ts\n// Tears down the controller: removes DOM listeners, disconnects the\n// mutation observer, clears caches, and resets internal state.\n// Safe to call multiple times.\n\nimport { cleanupFormatRegistry } from './format'\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createDestroy =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n () => {\n if (state.isDestroyed) return\n\n state.isDestroyed = true\n for (const listener of state.listeners) {\n listener.element.removeEventListener(listener.type, listener.handler)\n }\n state.listeners.length = 0\n\n if (state.autoSubmitTimer) {\n clearTimeout(state.autoSubmitTimer)\n state.autoSubmitTimer = null\n }\n\n state.mutationObserver?.disconnect()\n state.mutationObserver = null\n state.watchedFields.clear()\n state.subscribers.clear()\n state.submitHandlers.clear()\n state.fieldCache.clear()\n state.manualErrors = {}\n state.validationErrors = {}\n\n // Detach format listeners and drop the hidden raw mirrors that\n // `format()` created for this controller. Mirrors that pre-existed\n // in the DOM (i.e. not owned by us) are preserved.\n cleanupFormatRegistry(state)\n }\n","// api/disable-auto-submit.ts\n// Disables autoSubmit and cancels any pending debounce timer.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createDisableAutoSubmit =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n () => {\n state.autoSubmitEnabled = false\n if (state.autoSubmitTimer) {\n clearTimeout(state.autoSubmitTimer)\n state.autoSubmitTimer = null\n }\n helpers.notifySubscribers()\n return state.api!\n }\n","// Pure serialization helpers for HTMLFormElement.\n// No DOM mutation, no controller state — safe to tree-shake into any bundle.\n\nimport type { SerializedFormResult, SerializedFormValue } from './types'\n\nconst isEmptyFile = (value: FormDataEntryValue): value is File =>\n value instanceof File && value.size === 0 && value.name === ''\n\nconst appendValue = (\n data: Record<string, SerializedFormValue>,\n key: string,\n value: FormDataEntryValue\n): void => {\n const current = data[key]\n if (current === undefined) {\n data[key] = value\n return\n }\n if (Array.isArray(current)) {\n current.push(value)\n return\n }\n data[key] = [current, value]\n}\n\nexport const parseFormData = (formElement: HTMLFormElement): SerializedFormResult => {\n const raw = new FormData(formElement)\n const formData = new FormData()\n const data: Record<string, SerializedFormValue> = {}\n\n raw.forEach((value, key) => {\n if (isEmptyFile(value)) return\n formData.append(key, value)\n appendValue(data, key, value)\n })\n\n return { data, formData }\n}\n","// api/get-data.ts\n// Returns the form serialized as both a plain object and a fresh\n// FormData instance. Empty file inputs are filtered out.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { SerializedFormResult } from '../core/types'\nimport { parseFormData } from '../core/serialize'\n\nexport const createGetData =\n (_state: FormControllerState, _helpers: FormControllerHelpers) =>\n (): SerializedFormResult => {\n if (!_state.element) return { data: {}, formData: new FormData() }\n return parseFormData(_state.element)\n }\n","// api/get-field.ts\n// Returns the underlying DOM field(s) for a given name:\n// - null when no field matches\n// - a single element when there's exactly one\n// - an array when there are multiple (radios, checkbox groups)\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldElement } from '../core/types'\n\nexport const createGetField =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (name: string): FormFieldElement | FormFieldElement[] | null => {\n const fields = helpers.getFieldsByName(name)\n if (fields.length === 0) return null\n return fields.length === 1 ? fields[0]! : fields\n }\n","// Shared mutable state for the controller plus the small pure helpers used\n// by both core utilities and the api method factories.\n\nimport type {\n FieldFormatConfig,\n FormController,\n FormControllerOptions,\n FormErrors,\n FormFieldElement,\n FormFieldWatcher,\n FormStateListener,\n FormStateSnapshot,\n FormValues,\n ValidationResult,\n ValidationSchema,\n VisualAttributes\n} from './types'\n\nexport interface FormControllerState {\n element: HTMLFormElement | null\n options: FormControllerOptions\n attributes: Required<VisualAttributes>\n validators: ValidationSchema\n watchedFields: Map<string, Set<FormFieldWatcher>>\n subscribers: Set<FormStateListener>\n submitHandlers: Set<{\n callback: import('./types').FormSubmitHandler\n preventDefault: boolean\n }>\n fieldCache: Map<string, FormFieldElement[]>\n manualErrors: FormErrors\n validationErrors: FormErrors\n isValidated: boolean\n autoSubmitEnabled: boolean\n autoSubmitDebounce: number\n submitCount: number\n autoSubmitTimer: ReturnType<typeof setTimeout> | null\n isDestroyed: boolean\n listeners: Array<{\n element: EventTarget\n type: string\n handler: EventListenerOrEventListenerObject\n }>\n mutationObserver: MutationObserver | null\n // Tracks every field that `format()` is currently formatting, so\n // re-bindings are idempotent and `destroy()` can clean up the\n // associated listeners + hidden raw mirrors.\n formattedFields: Map<\n string,\n {\n config: FieldFormatConfig\n mirrorName: string\n mirrorIsOwned: boolean\n }\n >\n // Back-reference to the assembled public controller. Populated by the\n // controller orchestrator after the api method factories are wired.\n api: FormController | null\n}\n\n// Internal helpers bound by the controller orchestrator and consumed by\n// the api method factories. Kept here so api/*.ts only depends on the\n// shape, not on the orchestrator implementation.\nexport interface FormControllerHelpers {\n notifySubscribers: () => void\n clearFieldCache: () => void\n getFieldsByName: (name: string) => FormFieldElement[]\n getTrackedFieldNames: () => string[]\n getValues: () => FormValues\n getMergedErrors: () => FormErrors\n syncVisualState: (names?: string[]) => void\n validateNames: (names?: string[]) => ValidationResult\n emitFieldWatchers: (name: string) => void\n scheduleAutoSubmit: () => void\n}\n\nexport const createEmptyFormState = (): FormStateSnapshot => ({\n values: {},\n errors: {},\n filledFields: [],\n isValid: true,\n isValidated: false,\n autoSubmit: false,\n submitCount: 0\n})\n\nexport const cloneErrors = (errors: FormErrors): FormErrors =>\n Object.fromEntries(\n Object.entries(errors).map(([field, messages]) => [field, [...messages]])\n )\n\nexport const mergeErrors = (left: FormErrors, right: FormErrors): FormErrors => {\n const merged: FormErrors = { ...left }\n for (const [field, messages] of Object.entries(right)) {\n merged[field] = merged[field] ? [...merged[field], ...messages] : [...messages]\n }\n return merged\n}\n","// api/get-state.ts\n// Builds a snapshot of values, errors, filled fields and submission\n// metadata. Pure read — does not mutate controller state.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormStateSnapshot } from '../core/types'\nimport { cloneErrors, createEmptyFormState } from '../core/state'\n\nexport const createGetState =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (): FormStateSnapshot => {\n const values = helpers.getValues()\n const errors = cloneErrors(helpers.getMergedErrors())\n const filledFields = helpers.getTrackedFieldNames().filter(name => {\n const value = values[name]\n if (Array.isArray(value)) return value.length > 0\n if (typeof value === 'string') return value.trim().length > 0\n return value !== undefined\n })\n\n return {\n ...createEmptyFormState(),\n values,\n errors,\n filledFields,\n isValid: Object.keys(errors).length === 0,\n isValidated: state.isValidated,\n autoSubmit: state.autoSubmitEnabled,\n submitCount: state.submitCount\n }\n }\n","// Low-level DOM helpers used by the controller orchestrator and by api\n// methods that need direct DOM access. Pure: no controller state.\n\nimport type { FormFieldElement, FormFieldValue, FormTarget } from './types'\n\nconst isFormFieldElement = (value: Element): value is FormFieldElement =>\n value instanceof HTMLInputElement ||\n value instanceof HTMLSelectElement ||\n value instanceof HTMLTextAreaElement\n\nexport const resolveFormElement = (target: FormTarget): HTMLFormElement | null => {\n if (!target) return null\n if (target instanceof HTMLFormElement) return target\n if (typeof target === 'string') {\n const node = document.getElementById(target)\n return node instanceof HTMLFormElement ? node : null\n }\n if ('current' in target) {\n return target.current instanceof HTMLFormElement ? target.current : null\n }\n return null\n}\n\nexport const getNamedFields = (form: HTMLFormElement): FormFieldElement[] =>\n Array.from(form.querySelectorAll('input[name], select[name], textarea[name]')).filter(\n isFormFieldElement\n )\n\nexport const queryNamedFields = (\n form: HTMLFormElement,\n name: string\n): FormFieldElement[] => getNamedFields(form).filter(field => field.name === name)\n\nexport const isFieldElement = (value: Element): value is FormFieldElement =>\n isFormFieldElement(value)\n\nexport const isFieldFilled = (field: FormFieldElement): boolean => {\n if (field instanceof HTMLInputElement) {\n if (field.type === 'checkbox' || field.type === 'radio') return field.checked\n if (field.type === 'file') return Boolean(field.files && field.files.length > 0)\n return field.value.trim() !== ''\n }\n return field.value !== ''\n}\n\nexport const applyBooleanAttribute = (\n field: FormFieldElement,\n attribute: string,\n enabled: boolean\n): void => {\n if (enabled) {\n field.setAttribute(attribute, '')\n } else {\n field.removeAttribute(attribute)\n }\n}\n\nexport const readFieldValue = (fields: FormFieldElement[]): FormFieldValue => {\n if (fields.length === 0) return undefined\n const first = fields[0]\n if (!first) return undefined\n\n if (first instanceof HTMLSelectElement || first instanceof HTMLTextAreaElement) {\n return first.value\n }\n\n if (first instanceof HTMLInputElement) {\n if (first.type === 'radio') {\n const checked = fields.find(\n (f): f is HTMLInputElement =>\n f instanceof HTMLInputElement && f.checked\n )\n return checked?.value ?? ''\n }\n\n if (first.type === 'checkbox') {\n const values = fields\n .filter(\n (f): f is HTMLInputElement =>\n f instanceof HTMLInputElement && f.checked\n )\n .map(f => f.value)\n return values.length > 1 ? values : (values[0] ?? '')\n }\n\n if (first.type === 'file') {\n return first.files ? Array.from(first.files) : []\n }\n }\n\n return first.value\n}\n\nexport const writeFieldValue = (fields: FormFieldElement[], value: unknown): void => {\n const normalizedArray = Array.isArray(value)\n ? value.map(item => String(item))\n : null\n const normalizedValue = value === undefined || value === null ? '' : String(value)\n\n for (const field of fields) {\n if (field instanceof HTMLInputElement) {\n if (field.type === 'checkbox') {\n field.checked = normalizedArray\n ? normalizedArray.includes(field.value)\n : normalizedValue === field.value\n continue\n }\n if (field.type === 'radio') {\n field.checked = field.value === normalizedValue\n continue\n }\n if (field.type === 'file') {\n if (Array.isArray(value) && value.length === 0) field.value = ''\n continue\n }\n field.value = normalizedValue\n continue\n }\n\n field.value = normalizedValue\n }\n}\n\nexport const clearAttributes = (form: HTMLFormElement, attributes: string[]): void => {\n for (const attribute of attributes) {\n form\n .querySelectorAll(`[${attribute}]`)\n .forEach(node => node.removeAttribute(attribute))\n }\n}\n\nexport const submitForm = (form: HTMLFormElement): void => {\n if (typeof form.requestSubmit === 'function') {\n form.requestSubmit()\n return\n }\n const submitButton = form.querySelector(\n 'button[type=\"submit\"], input[type=\"submit\"]'\n ) as HTMLButtonElement | HTMLInputElement | null\n if (submitButton) {\n submitButton.click()\n return\n }\n form.submit()\n}\n","// api/get-value.ts\n// Returns the current value of a field, with normalization for checkboxes,\n// radios, files, and multi-value inputs.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldValue } from '../core/types'\nimport { readFieldValue } from '../core/dom'\n\nexport const createGetValue =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (name: string): FormFieldValue => readFieldValue(helpers.getFieldsByName(name))\n","// api/observe.ts\n// Registers a callback that runs on mount and whenever the field changes.\n// Returns an unsubscribe function.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldWatcher } from '../core/types'\n\nexport const createObserve =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (field: string, callback: FormFieldWatcher) => {\n const callbacks = state.watchedFields.get(field) ?? new Set<FormFieldWatcher>()\n callbacks.add(callback)\n state.watchedFields.set(field, callbacks)\n\n if (state.element) {\n callback(state.api!.getValue(field), state.api!.getField(field), state.element, state.api!.getState())\n }\n\n return () => {\n const current = state.watchedFields.get(field)\n current?.delete(callback)\n if (current && current.size === 0) {\n state.watchedFields.delete(field)\n }\n }\n }\n","// api/on-submit.ts\n// Registers a submit handler. preventDefault=true intercepts valid submits,\n// which is the right choice for AJAX/fetch flows. Invalid submits are\n// always prevented regardless of the flag.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormSubmitHandler } from '../core/types'\n\nexport const createOnSubmit =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n (callback: FormSubmitHandler, preventDefault = true) => {\n state.submitHandlers.add({ callback, preventDefault })\n return state.api!\n }\n","// api/prefill.ts\n// Reads window.location.search and writes matching values into the form.\n// Pass a field name to scope prefill to a single field.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\n\nexport const createPrefill =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n (fieldName?: string) => {\n if (!state.element) return state.api!\n\n const params = new URLSearchParams(window.location.search)\n params.forEach((value, key) => {\n if (fieldName && fieldName !== key) return\n state.api!.setValue(key, value)\n })\n return state.api!\n }\n","// api/reset.ts\n// Resets the native form, clears manual and validation errors, strips\n// css-filled/css-error attributes, and notifies subscribers.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport { clearAttributes } from '../core/dom'\n\nexport const createReset =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n () => {\n if (!state.element) return state.api!\n\n state.element.reset()\n state.manualErrors = {}\n state.validationErrors = {}\n clearAttributes(state.element, [state.attributes.error, state.attributes.filled])\n\n if (state.isValidated) helpers.syncVisualState()\n helpers.notifySubscribers()\n return state.api!\n }\n","// api/validate.ts\n// Runs validation. Marks the form as validated, syncs visual state, and\n// returns the validation result for callers that want it.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { ValidationResult } from '../core/types'\n\nexport const createValidate =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (fields?: string[]): ValidationResult => {\n state.isValidated = true\n helpers.syncVisualState(fields)\n return helpers.validateNames(fields)\n }\n","// api/revalidate.ts\n// Alias of validate(); kept separate for readability at call sites that\n// want to express \"re-run validation now\".\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport { createValidate } from './validate'\n\nexport const createRevalidate = createValidate\n","// api/set-errors.ts\n// Sets manual errors. Accepts an array of field names (each gets a\n// generic message) or a FormErrors map with per-field messages.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormErrors } from '../core/types'\nimport { cloneErrors } from '../core/state'\n\nexport const createSetErrors =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (fields: string[] | FormErrors) => {\n if (Array.isArray(fields)) {\n state.manualErrors = {\n ...state.manualErrors,\n ...Object.fromEntries(fields.map(field => [field, ['Invalid value.']]))\n }\n } else {\n state.manualErrors = {\n ...state.manualErrors,\n ...cloneErrors(fields)\n }\n }\n\n helpers.syncVisualState(Array.isArray(fields) ? fields : Object.keys(fields))\n helpers.notifySubscribers()\n return state.api!\n }\n","// api/set-value.ts\n// Writes a value into a field and dispatches the correct DOM event so\n// listeners, validators, and visual state run as if a user typed.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport { writeFieldValue } from '../core/dom'\n\nexport const createSetValue =\n (state: FormControllerState, helpers: FormControllerHelpers) =>\n (name: string, value: unknown) => {\n const fields = helpers.getFieldsByName(name)\n if (fields.length === 0) return state.api!\n\n writeFieldValue(fields, value)\n const firstField = fields[0]\n if (!firstField) return state.api!\n\n const eventType =\n firstField instanceof HTMLSelectElement ||\n (firstField instanceof HTMLInputElement &&\n (firstField.type === 'checkbox' || firstField.type === 'radio'))\n ? 'change'\n : 'input'\n\n firstField.dispatchEvent(new Event(eventType, { bubbles: true }))\n return state.api!\n }\n","// api/subscribe.ts\n// Subscribes to global form state. Listener fires once immediately with\n// the current snapshot, then on every state mutation. Returns an\n// unsubscribe function.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormStateListener } from '../core/types'\n\nexport const createSubscribe =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n (listener: FormStateListener) => {\n state.subscribers.add(listener)\n listener(state.api!.getState())\n return () => {\n state.subscribers.delete(listener)\n }\n }\n","// api/unwatch.ts\n// Removes watched callbacks. With no args, clears every watcher. With only\n// a field, removes all callbacks for that field. With field + callback,\n// removes just that callback.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldWatcher } from '../core/types'\n\nexport const createUnwatch =\n (state: FormControllerState, _helpers: FormControllerHelpers) =>\n (field?: string, callback?: FormFieldWatcher) => {\n if (!field) {\n state.watchedFields.clear()\n return state.api!\n }\n\n if (!callback) {\n state.watchedFields.delete(field)\n return state.api!\n }\n\n const callbacks = state.watchedFields.get(field)\n callbacks?.delete(callback)\n if (callbacks && callbacks.size === 0) {\n state.watchedFields.delete(field)\n }\n return state.api!\n }\n","// api/watch.ts\n// Chainable alias over `observe`. Use this when you want a fluent setup\n// without holding the returned unsubscribe function.\n\nimport type { FormControllerHelpers, FormControllerState } from '../core/state'\nimport type { FormFieldWatcher } from '../core/types'\nimport { createObserve } from './observe'\n\nexport const createWatch = (state: FormControllerState, helpers: FormControllerHelpers) =>\n (field: string, callback: FormFieldWatcher) => {\n const observe = createObserve(state, helpers)\n observe(field, callback)\n return state.api!\n }\n","// Pure validation routines. No DOM, no controller state.\n\nimport type {\n FieldValidationContext,\n FieldValidationRules,\n FormErrors,\n FormFieldValue,\n FormValues,\n RuleConfig,\n ValidationResult,\n ValidationSchema\n} from './types'\n\nconst resolveRule = <T>(rule: RuleConfig<T> | undefined) => {\n if (rule === undefined) {\n return { value: undefined as T | undefined, message: undefined as string | undefined }\n }\n if (typeof rule === 'object' && rule !== null && 'value' in rule) {\n return { value: rule.value, message: rule.message }\n }\n return { value: rule, message: undefined as string | undefined }\n}\n\nconst hasValue = (value: FormFieldValue): boolean => {\n if (Array.isArray(value)) return value.length > 0\n if (typeof value === 'string') return value.trim().length > 0\n return value !== undefined\n}\n\nconst getValueLength = (value: FormFieldValue): number => {\n if (Array.isArray(value)) return value.length\n if (typeof value === 'string') return value.length\n return 0\n}\n\nconst toPatternTarget = (value: FormFieldValue): string => {\n if (typeof value === 'string') return value\n if (Array.isArray(value)) {\n return value\n .map(entry => (typeof entry === 'string' ? entry : entry.name))\n .join(',')\n }\n return ''\n}\n\nexport const validateFieldValue = (\n field: string,\n value: FormFieldValue,\n rules: FieldValidationRules,\n values: FormValues\n): string[] => {\n const errors: string[] = []\n const context: FieldValidationContext = { field, value, values }\n const required = resolveRule(rules.required)\n const minLength = resolveRule(rules.minLength)\n const maxLength = resolveRule(rules.maxLength)\n const pattern = resolveRule(rules.pattern)\n\n if (required.value && !hasValue(value)) {\n errors.push(required.message ?? 'This field is required.')\n }\n if (minLength.value !== undefined && getValueLength(value) < minLength.value) {\n errors.push(minLength.message ?? `Minimum length is ${minLength.value}.`)\n }\n if (maxLength.value !== undefined && getValueLength(value) > maxLength.value) {\n errors.push(maxLength.message ?? `Maximum length is ${maxLength.value}.`)\n }\n if (pattern.value && hasValue(value) && !pattern.value.test(toPatternTarget(value))) {\n errors.push(pattern.message ?? 'Value does not match the required pattern.')\n }\n\n const custom = rules.validate\n ? Array.isArray(rules.validate)\n ? rules.validate\n : [rules.validate]\n : []\n\n for (const validator of custom) {\n const result = validator(context)\n if (typeof result === 'string' && result.length > 0) errors.push(result)\n if (result === false) errors.push('Validation failed.')\n }\n\n return errors\n}\n\nexport const validateValues = (\n values: FormValues,\n schema: ValidationSchema\n): ValidationResult => {\n const errors: FormErrors = {}\n for (const [field, rules] of Object.entries(schema)) {\n const messages = validateFieldValue(field, values[field], rules, values)\n if (messages.length > 0) errors[field] = messages\n }\n return {\n isValid: Object.keys(errors).length === 0,\n errors\n }\n}\n","// Core orchestrator. Wires shared state, internal helpers and the public\n// api method factories into a single FormController instance.\n//\n// Internal event handlers and DOM wiring live here. Every public method\n// lives in `../api/<method>.ts` as an isolated factory.\n\nimport { createAppend } from '../api/append'\nimport { createAutoSubmit } from '../api/auto-submit'\nimport { createClearErrors } from '../api/clear-errors'\nimport { createDestroy } from '../api/destroy'\nimport { createDisableAutoSubmit } from '../api/disable-auto-submit'\nimport { createFormat, createFormatAll } from '../api/format'\nimport { createGetData } from '../api/get-data'\nimport { createGetField } from '../api/get-field'\nimport { createGetState } from '../api/get-state'\nimport { createGetValue } from '../api/get-value'\nimport { createObserve } from '../api/observe'\nimport { createOnSubmit } from '../api/on-submit'\nimport { createPrefill } from '../api/prefill'\nimport { createReset } from '../api/reset'\nimport { createRevalidate } from '../api/revalidate'\nimport { createSetErrors } from '../api/set-errors'\nimport { createSetValue } from '../api/set-value'\nimport { createSubscribe } from '../api/subscribe'\nimport { createUnwatch } from '../api/unwatch'\nimport { createValidate } from '../api/validate'\nimport { createWatch } from '../api/watch'\nimport { validateFieldValue } from '../core/validation'\nimport {\n applyBooleanAttribute,\n getNamedFields,\n isFieldElement,\n isFieldFilled,\n queryNamedFields,\n readFieldValue,\n resolveFormElement,\n submitForm,\n writeFieldValue\n} from './dom'\nimport { cloneErrors, mergeErrors } from './state'\nimport type {\n FormController,\n FormControllerOptions,\n FormFieldElement,\n FormFieldValue,\n FormTarget,\n ValidationResult,\n VisualAttributes\n} from './types'\nimport type { FormControllerHelpers, FormControllerState } from './state'\n\nconst DEFAULT_ATTRIBUTES: Required<VisualAttributes> = {\n filled: 'css-filled',\n error: 'css-error'\n}\n\nconst DEFAULT_OPTIONS = {\n autoValidate: true,\n clearErrorsOnSubmit: true,\n clearManualErrorsOnChange: true\n} satisfies Pick<\n FormControllerOptions,\n 'autoValidate' | 'clearErrorsOnSubmit' | 'clearManualErrorsOnChange'\n>\n\nexport const createFormController = (\n target: FormTarget,\n options: FormControllerOptions = {}\n): FormController => {\n const element = resolveFormElement(target)\n const attributes = { ...DEFAULT_ATTRIBUTES, ...options.attributes }\n const normalizedOptions: FormControllerOptions = {\n ...DEFAULT_OPTIONS,\n ...options,\n attributes\n }\n\n const state: FormControllerState = {\n element,\n options: normalizedOptions,\n attributes,\n validators: normalizedOptions.validators ?? {},\n watchedFields: new Map(),\n subscribers: new Set(),\n submitHandlers: new Set(),\n fieldCache: new Map(),\n manualErrors: {},\n validationErrors: {},\n isValidated: Boolean(normalizedOptions.autoValidate),\n autoSubmitEnabled: false,\n autoSubmitDebounce: 0,\n submitCount: 0,\n autoSubmitTimer: null,\n isDestroyed: false,\n listeners: [],\n mutationObserver: null,\n formattedFields: new Map(),\n api: null\n }\n\n // ------- Internal helpers (no DOM wiring of their own) -----------------\n\n const notifySubscribers = () => {\n if (!state.api) return\n const snapshot = state.api.getState()\n state.subscribers.forEach(listener => listener(snapshot))\n }\n\n const addListener = (\n node: EventTarget,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) => {\n node.addEventListener(type, handler)\n state.listeners.push({ element: node, type, handler })\n }\n\n const clearFieldCache = () => state.fieldCache.clear()\n\n const getFieldsByName = (name: string): FormFieldElement[] => {\n if (!state.element) return []\n if (!state.fieldCache.has(name)) {\n state.fieldCache.set(name, queryNamedFields(state.element, name))\n }\n return state.fieldCache.get(name) ?? []\n }\n\n const getTrackedFieldNames = (): string[] => {\n if (!state.element) return Object.keys(state.validators)\n const names = new Set<string>(Object.keys(state.validators))\n for (const field of getNamedFields(state.element)) {\n names.add(field.name)\n }\n return Array.from(names)\n }\n\n const getValues = () => {\n const values: Record<string, FormFieldValue> = {}\n for (const name of getTrackedFieldNames()) {\n values[name] = readFieldValue(getFieldsByName(name))\n }\n return values\n }\n\n const getMergedErrors = () => mergeErrors(state.validationErrors, state.manualErrors)\n\n const syncVisualState = (names?: string[]) => {\n if (!state.element) return\n const targetNames = names ?? getTrackedFieldNames()\n const errors = getMergedErrors()\n for (const name of targetNames) {\n const fields = getFieldsByName(name)\n const hasError = Boolean(errors[name]?.length)\n for (const field of fields) {\n applyBooleanAttribute(field, attributes.filled, isFieldFilled(field))\n applyBooleanAttribute(field, attributes.error, hasError)\n }\n }\n }\n\n // readFieldValue/writeFieldValue are exported from core/dom for direct\n // callers; referenced here so the linter keeps them as part of the\n // controlled API surface.\n void readFieldValue\n void writeFieldValue\n\n const validateNames = (names?: string[]): ValidationResult => {\n const targetNames = names ?? Object.keys(state.validators)\n const values = getValues()\n const nextValidationErrors = names ? cloneErrors(state.validationErrors) : {}\n\n for (const name of targetNames) {\n const rules = state.validators[name]\n if (!rules) {\n delete nextValidationErrors[name]\n continue\n }\n const messages = validateFieldValue(name, values[name], rules, values)\n if (messages.length > 0) nextValidationErrors[name] = messages\n else delete nextValidationErrors[name]\n }\n\n state.validationErrors = nextValidationErrors\n syncVisualState(names)\n\n return {\n isValid: Object.keys(getMergedErrors()).length === 0,\n errors: cloneErrors(getMergedErrors())\n }\n }\n\n const emitFieldWatchers = (name: string) => {\n if (!state.element || !state.api) return\n const callbacks = state.watchedFields.get(name)\n if (!callbacks || callbacks.size === 0) return\n const value = state.api.getValue(name)\n const fieldElement = state.api.getField(name)\n const snapshot = state.api.getState()\n callbacks.forEach(callback => callback(value, fieldElement, state.element!, snapshot))\n }\n\n const scheduleAutoSubmit = () => {\n if (!state.element || !state.autoSubmitEnabled) return\n if (state.autoSubmitTimer) clearTimeout(state.autoSubmitTimer)\n if (state.autoSubmitDebounce > 0) {\n state.autoSubmitTimer = setTimeout(\n () => submitForm(state.element!),\n state.autoSubmitDebounce\n )\n return\n }\n submitForm(state.element)\n }\n\n const helpers: FormControllerHelpers = {\n notifySubscribers,\n clearFieldCache,\n getFieldsByName,\n getTrackedFieldNames,\n getValues,\n getMergedErrors,\n syncVisualState,\n validateNames,\n emitFieldWatchers,\n scheduleAutoSubmit\n }\n\n // ------- DOM event wiring ---------------------------------------------\n\n const handleDelegatedEvent = (event: Event) => {\n const target = event.target\n if (!(target instanceof Element) || !isFieldElement(target)) return\n const name = target.name\n if (!name) return\n\n clearFieldCache()\n\n if (normalizedOptions.clearManualErrorsOnChange) {\n delete state.manualErrors[name]\n }\n\n syncVisualState([name])\n\n if (state.isValidated && state.validators[name]) {\n validateNames([name])\n }\n\n emitFieldWatchers(name)\n notifySubscribers()\n scheduleAutoSubmit()\n }\n\n const handleSubmitEvent = (event: Event) => {\n if (!state.element || state.isDestroyed || !state.api) return\n\n if (normalizedOptions.clearErrorsOnSubmit) state.manualErrors = {}\n\n const validation = state.api.validate()\n const handlers = Array.from(state.submitHandlers)\n const shouldPrevent = validation.isValid\n ? handlers.some(handler => handler.preventDefault)\n : true\n\n if (shouldPrevent) event.preventDefault()\n\n state.submitCount += 1\n notifySubscribers()\n\n if (!validation.isValid) return\n\n const { data, formData } = state.api.getData()\n const snapshot = state.api.getState()\n handlers.forEach(handler =>\n handler.callback(state.element!, data, formData, snapshot)\n )\n }\n\n const startMutationObserver = () => {\n if (!state.element || typeof MutationObserver === 'undefined') return\n\n state.mutationObserver = new MutationObserver(() => {\n clearFieldCache()\n if (state.isValidated) {\n syncVisualState()\n validateNames()\n }\n notifySubscribers()\n })\n\n state.mutationObserver.observe(state.element, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['name', 'type']\n })\n }\n\n // ------- Public api composition --------------------------------------\n\n const api: FormController = {\n get element() {\n return state.element\n },\n get f() {\n return state.element\n },\n get options() {\n return state.options\n },\n onSubmit: createOnSubmit(state, helpers),\n watch: createWatch(state, helpers),\n observe: createObserve(state, helpers),\n unwatch: createUnwatch(state, helpers),\n subscribe: createSubscribe(state, helpers),\n prefill: createPrefill(state, helpers),\n append: createAppend(state, helpers),\n setErrors: createSetErrors(state, helpers),\n clearErrors: createClearErrors(state, helpers),\n setValue: createSetValue(state, helpers),\n getValue: createGetValue(state, helpers),\n getField: createGetField(state, helpers),\n validate: createValidate(state, helpers),\n revalidate: createRevalidate(state, helpers),\n reset: createReset(state, helpers),\n autoSubmit: createAutoSubmit(state, helpers),\n disableAutoSubmit: createDisableAutoSubmit(state, helpers),\n getData: createGetData(state, helpers),\n getState: createGetState(state, helpers),\n format: createFormat(state, helpers),\n formatAll: createFormatAll(state, helpers),\n destroy: createDestroy(state, helpers)\n }\n\n state.api = api\n\n // ------- Lifecycle hooks ---------------------------------------------\n\n if (state.element) {\n addListener(state.element, 'input', handleDelegatedEvent)\n addListener(state.element, 'change', handleDelegatedEvent)\n addListener(state.element, 'submit', handleSubmitEvent)\n startMutationObserver()\n }\n\n if (normalizedOptions.autoSubmit) {\n api.autoSubmit(normalizedOptions.autoSubmit)\n }\n\n if (normalizedOptions.formats) {\n for (const config of Object.values(normalizedOptions.formats)) {\n api.format(config)\n }\n }\n\n if (state.isValidated) {\n syncVisualState()\n validateNames()\n }\n\n return api\n}\n","// api/form.ts\n// Public entry point: the `form(target, options)` factory.\n// Thin wrapper around the core orchestrator for ergonomic imports.\n\nimport { createFormController } from '../core/controller'\nimport type { FormControllerOptions, FormTarget } from '../core/types'\n\nexport const form = (\n target: FormTarget,\n options: FormControllerOptions = {}\n) => createFormController(target, options)\n","// Vanilla mirror of the browser IIFE registry helpers.\n// Module-level singleton: the same shape as `window.Forms`, but\n// importable from any bundler. Consumers can spread it into their own\n// globals (`{ ...browser, regex }`) or use it directly.\n//\n// The IIFE bundle (`./global.ts`) consumes this same object — single\n// source of truth for the registry helpers.\n\nimport { form } from '../api/form'\nimport type {\n FormController,\n FormControllerOptions,\n FormTarget\n} from '../core/types'\n\nexport interface NewFormInput {\n id: string\n options?: FormControllerOptions\n}\n\nexport interface FormsAvailable {\n [id: string]: FormController\n}\n\nexport interface FormsApi {\n form: (\n target: FormTarget,\n options?: FormControllerOptions\n ) => FormController\n newForm: (input: NewFormInput) => FormController | undefined\n destroyForm: (id: string) => void\n available: FormsAvailable\n}\n\nconst available: FormsAvailable = {}\n\nconst newForm = (input: NewFormInput): FormController | undefined => {\n const { id, options } = input\n if (!id) {\n console.error('Form ID is required')\n return\n }\n const controller = form(id, { ...options })\n available[id] = controller\n return controller\n}\n\nconst destroyForm = (id: string): void => {\n if (!id) {\n console.error('Form ID is required')\n return\n }\n const controller = available[id]\n if (controller) {\n controller.destroy()\n delete available[id]\n } else {\n console.warn(`Form with ID ${id} not found`)\n }\n}\n\nexport const browser: FormsApi = {\n form,\n newForm,\n destroyForm,\n available\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAca,MAAA,GAAA,GCTDA,GDSCC,GAGAC,GAGAC,GAMAC,GAaAC,GGHAC,GA8DAC,GChGDC,GHoBCC,GAiBA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B,QAAI,YAAY;AACd,iBAAW,QAAQ;AACnB,aAAO,UAAU,EAAE;AAAA,IACrB,OAAO;AACL,cAAQ,KAAK,gBAAgB,EAAE,YAAY;AAAA,IAC7C;AAAA,EACF;AAEO,MAAM,UAAoB;AAAA,IAC/B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;;;A9BnDA,MAAM,QAAkB;AAQxB,MAAI,OAAO,eAAe,aAAa;AACrC;AAAC,IAAC,WAAuD,QAAQ;AAAA,EACnE;AAEA,MAAO,iBAAQ;","names":["CreditCardType","stripNonNumeric","getMaxLength","headStr","stripDelimiters","getFormattedValue","formatGeneral","unformatGeneral","NumeralThousandGroupStyles","CreditCardBlocks","CreditCardRegex","getStrictBlocks","getCreditCardInfo","formatCreditCard","getCreditCardType","unformatCreditCard","DefaultNumeralThousandGroupStyle","formatNumeral","unformatNumeral","DefaultDatePattern","addLeadingZeroForYear","addLeadingZero","getFixedDate","formatDate","DefaultTimePattern","getFixedTime","formatTime","value","replace","blocks","reduce","previous","current","str","length","slice","_ref","delimiters","forEach","split","letter","RegExp","_ref2","_ref2$delimiter","delimiter","_ref2$delimiters","_ref2$delimiterLazySh","delimiterLazyShow","result","valueRemaining","currentDelimiter","index","_delimiters","sub","rest","options","_options$delimiter","_options$delimiters","_options$delimiterLaz","_options$prefix","prefix","_options$numericOnly","numericOnly","_options$uppercase","uppercase","_options$lowercase","lowercase","push","tailPrefix","prefixLength","toUpperCase","toLowerCase","_options$delimiter2","_options$delimiters2","concat","_CreditCardBlocks","UATP","AMEX","DINERS","DISCOVER","MASTERCARD","DANKORT","INSTAPAYMENT","JCB15","JCB","MAESTRO","VISA","MIR","UNIONPAY","GENERAL","_CreditCardRegex","total","prev","strictMode","_i","_Object$keys","Object","keys","key","test","matchedBlocks","type","general","_ref2$strictMode","maxLength","THOUSAND","_ref2$numeralThousand","numeralThousandsGroupStyle","_ref2$numeralIntegerS","numeralIntegerScale","_ref2$numeralDecimalM","numeralDecimalMark","_ref2$numeralDecimalS","numeralDecimalScale","_ref2$stripLeadingZer","stripLeadingZeroes","_ref2$numeralPositive","numeralPositiveOnly","_ref2$tailPrefix","_ref2$signBeforePrefi","signBeforePrefix","_ref2$prefix","parts","partSignAndPrefix","partInteger","partDecimal","partSign","includes","LAKH","WAN","_ref3$numeralDecimalM","number","fullYearMode","day","month","year","_year","Math","min","_ref5","_ref5$delimiterLazySh","_ref5$delimiter","_ref5$datePattern","datePattern","_ref5$dateMax","dateMax","_ref5$dateMin","dateMin","_getDateRange","reverse","map","x","parseInt","unshift","max","_ref2$value","_ref2$blocks","sub0","_ref3","_ref3$value","date","dayIndex","monthIndex","yearIndex","dayStartIndex","monthStartIndex","yearStartIndex","fullYearDone","_ref4","_ref4$date","filter","hour","minute","second","_ref3$delimiterLazySh","_ref3$delimiter","_ref3$timePattern","timePattern","_ref3$timeFormat","timeFormat","timeFormatOptions","maxHourFirstDigit","maxHours","maxMinutesFirstDigit","maxMinutes","time","secondIndex","minuteIndex","hourIndex","secondStartIndex","minuteStartIndex","hourStartIndex","a","b","split","pa","pb","i","na","Number","nb","isNaN","object","undefined","constructor","objectConstructor","string","CALLING_CODE_REG_EXP","test","getType","types","type","validateMetadata","metadata","Error","isObject","countries","concat","Object","keys","join","typeOf","getCountryCallingCode","country","metadataJson","Metadata","hasCountry","selectNumberingPlan","countryCallingCode","setVersion","version","v1","v2","v3","v4","compare","V3","V4","DEFAULT_EXT_PREFIX","NumberingPlan","Format","FIRST_GROUP_ONLY_PREFIX_PATTERN","Type","_classCallCheck","call","_createClass","key","value","getCountries","filter","_","getCountryMetadata","countryCode","nonGeographic","nonGeographical","undefined","hasCallingCode","callingCode","getCountryCodesForCallingCode","countryCodes","countryCallingCodes","length","isNonGeographicCallingCode","argument","legacyArgumentCallingCode","isCallingCode","countryMetadata","numberingPlan","getNumberingPlanMetadata","getCountryCodeForCallingCode","IDDPrefix","defaultIDDPrefix","nationalNumberPattern","possibleLengths","formats","nationalPrefixForParsing","nationalPrefixTransformRule","leadingDigits","hasTypes","ext","country_phone_code_to_countries","country_calling_codes","chooseCountryByCountryCallingCode","hasSelectedNumberingPlan","globalMetadataObject","_getDefaultCountryMetadataForThisCallingCode","getDefaultCountryMetadataForRegion","_getFormats","_this","map","nationalPrefix","_getNationalPrefixFormattingRule","nationalPrefixFormattingRule","_nationalPrefixForParsing","_getNationalPrefixIsOptionalWhenFormatting","nationalPrefixIsOptionalWhenFormattingInNationalFormat","format","_format","pattern","leadingDigitsPatterns","nationalPrefixIsMandatoryWhenFormattingInNationalFormat","usesNationalPrefix","test","internationalFormat","_typeof","a","b","merged","slice","_iterator","_createForOfIteratorHelperLoose","_step","done","element","value","indexOf","push","sort","nationalNumber","country","metadata","checkNumberLengthForType","undefined","type","Metadata","selectNumberingPlan","type_info","possible_lengths","possibleLengths","mobile_type","mergeArrays","actual_length","length","minimum_length","indexOf","input","options","metadataJson","undefined","metadata","Metadata","v2","countryCallingCode","Error","selectNumberingPlan","country","phone","hasCountry","concat","possibleLengths","isPossibleNumber","nationalNumber","isNonGeographicCallingCode","checkNumberLength","text","regularExpressionText","RegExp","test","input","options","metadataJson","country","countryCallingCode","metadata","Metadata","selectNumberingPlan","nationalNumber","v2","phone","matchesEntirely","nationalNumberPattern","isNumberTypeEqualTo","type","pattern","_iterator","_createForOfIteratorHelperLoose","NON_FIXED_LINE_PHONE_TYPES","_step","done","value","typeDefinition","possibleLengths","indexOf","length","input","options","metadataJson","metadata","Metadata","selectNumberingPlan","country","countryCallingCode","hasTypes","getNumberType","undefined","nationalNumber","v2","phone","matchesEntirely","nationalNumberPattern","string","COUNTRY_CODE_REG_EXP","test","countryOrCallingCode","metadataJson","country","callingCode","metadata","Metadata","isCountryCode","selectNumberingPlan","countryCallingCode","USE_NON_GEOGRAPHIC_COUNTRY_CODE","isNonGeographicCallingCode","callingCode","nationalNumber","metadata","_metadata","Metadata","possibleCountries","getCountryCodesForCallingCode","filter","country","couldNationalNumberBelongToCountry","metadataJson","selectNumberingPlan","numberingPlan","possibleLengths","indexOf","length","MAX_LENGTH_COUNTRY_CODE","VALID_DIGITS","DASHES","SLASHES","DOTS","WHITESPACE","BRACKETS","TILDES","VALID_PUNCTUATION","PLUS_CHARS","concat","number","country","callingCode","metadataJson","metadata","Metadata","selectNumberingPlan","IDDPrefixPattern","RegExp","IDDPrefix","search","slice","match","length","matchedGroups","CAPTURING_DIGIT_PATTERN","VALID_DIGITS","number","metadata","numberingPlan","nationalPrefixForParsing","prefixPattern","RegExp","prefixMatch","exec","nationalNumber","carrierCode","capturedGroupsCount","length","hasCapturedGroups","nationalPrefixTransformRule","replace","prefixBeforeNationalNumber","slice","nationalPrefix","possiblePositionOfTheFirstCapturedGroup","indexOf","possibleNationalPrefix","nationalNumber","countries","metadataJson","metadata","Metadata","_iterator","_createForOfIteratorHelperLoose","_step","done","country","value","selectNumberingPlan","leadingDigits","search","getNumberType","phone","undefined","callingCode","_ref","nationalNumber","metadata","USE_NON_GEOGRAPHIC_COUNTRY_CODE","isNonGeographicCallingCode","possibleCountries","getCountryCodesForCallingCode","length","getCountryByNationalNumber","number","country","metadata","_extractNationalNumbe","extractNationalNumberFromPossiblyIncompleteNumber","carrierCode","nationalNumber","shouldHaveExtractedNationalPrefix","numberingPlan","possibleLengths","getCountryByCallingCode","callingCode","isPossibleIncompleteNationalNumber","nationalNumberBefore","nationalNumberAfter","matchesEntirely","nationalNumberPattern","checkNumberLength","number","country","defaultCountry","defaultCallingCode","metadataJson","countryCallingCode","getCountryCallingCode","indexOf","metadata","Metadata","selectNumberingPlan","possibleShorterNumber","slice","length","_extractNationalNumbe","extractNationalNumber","undefined","possibleShorterNationalNumber","nationalNumber","_extractNationalNumbe2","matchesEntirely","nationalNumberPattern","checkNumberLength","number","country","defaultCountry","defaultCallingCode","metadataJson","isNumberWithIddPrefix","numberWithoutIDD","stripIddPrefix","_extractCountryCallin","extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","countryCallingCode","shorterNumber","countryCallingCodeSource","metadata","Metadata","i","MAX_LENGTH_COUNTRY_CODE","length","slice","hasCallingCode","selectNumberingPlan","formattedNumber","replace","RegExp","concat","VALID_PUNCTUATION","trim","number","format","_ref","useInternationalFormat","withNationalPrefix","carrierCode","metadata","formattedNumber","replace","RegExp","pattern","internationalFormat","nationalPrefixFormattingRule","FIRST_GROUP_PATTERN","applyInternationalSeparatorStyle","country","callingCode","metadata","countryMetadata","Metadata","selectNumberingPlan","defaultIDDPrefix","SINGLE_IDD_PREFIX_REG_EXP","test","IDDPrefix","formatRFC3966","_ref","number","ext","Error","concat","input","format","options","metadataJson","merge","DEFAULT_OPTIONS","metadata","Metadata","country","hasCountry","Error","concat","selectNumberingPlan","countryCallingCode","phone","nationalNumber","v2","number","formatNationalNumber","carrierCode","addExtension","ext","formatExtension","formatRFC3966","fromCountry","formattedNumber","formatIDD","formatAs","chooseFormatForNumber","formats","formatNationalNumberUsingFormat","useInternationalFormat","withNationalPrefix","nationalPrefixIsOptionalWhenFormattingInNationalFormat","nationalPrefix","availableFormats","pickFirstMatchingElement","leadingDigitsPatterns","length","lastLeadingDigitsPattern","search","matchesEntirely","pattern","fromCountryCallingCode","getCountryCallingCode","iddPrefix","getIddPrefix","undefined","i","_len","arguments","objects","Array","_key","key","elements","testFunction","extension","PhoneNumber","E164_NUMBER_REGEXP","countryOrCountryCallingCode","nationalNumber","metadata","_classCallCheck","TypeError","isObject","countries","e164Number","test","Error","_extractCountryCallin","extractCountryCallingCode","undefined","countryCallingCode","number","validateMetadata","_getCountryAndCalling","getCountryAndCallingCodeFromOneOfThem","country","callingCode","getMetadata","_createClass","key","value","setExt","ext","getPossibleCountries","getPossibleCountriesForNumber","isPossible","isPossibleNumber","v2","isValid","isValidNumber","isNonGeographic","Metadata","isNonGeographicCallingCode","isEqual","phoneNumber","getType","getNumberType","format","options","formatNumber","_objectSpread","formatNational","formatInternational","getURI","parseDigit","character","DIGITS","string","result","_iterator","_createForOfIteratorHelperLoose","split","_step","done","value","digit","AsYouTypeState","_ref","onCountryChange","onCallingCodeChange","_classCallCheck","_createClass","key","value","reset","_ref2","country","callingCode","international","missingPlus","IDDPrefix","undefined","digits","resetNationalSignificantNumber","initCountryAndCallingCode","nationalSignificantNumber","getNationalDigits","nationalSignificantNumberIsModified","nationalPrefix","carrierCode","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","update","properties","_i","_Object$keys","Object","keys","length","setCountry","setCallingCode","startInternationalNumber","appendDigits","nextDigits","appendNationalSignificantNumberDigits","slice","getDigitsWithoutInternationalPrefix","repeat","string","times","result","cutAndStripNonPairedParens","cutBeforeIndex","stripNonPairedParens","slice","dangling_braces","i","length","push","pop","start","cleared_string","_i","_dangling_braces","index","populateTemplateWithDigits","template","position","digits","_iterator2","_createForOfIteratorHelperLoose","split","_step2","done","digit","value","search","DIGIT_PLACEHOLDER_MATCHER","replace","DIGIT_PLACEHOLDER","RegExp","state","format","_ref","metadata","shouldTryNationalPrefixFormattingRule","getSeparatorAfterNationalPrefix","matcher","RegExp","concat","pattern","test","nationalSignificantNumber","formatNationalNumberWithAndWithoutNationalPrefixFormattingRule","canFormatCompleteNumber","checkNumberLength","undefined","_ref2","international","nationalPrefix","carrierCode","formattedNumber","formatNationalNumber","useNationalPrefixFormattingRule","_ref3","formattedNationalNumber","formatNationalNumberUsingFormat","useInternationalFormat","withNationalPrefix","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","isValidFormattedNationalNumber","parseDigits","getNationalDigits","parseOneOfSet","pattern","values","i","length","Error","concat","prevValue","charCodeAt","nextValue","value","push","String","fromCharCode","expandSingleElementArray","array","PatternParser","ILLEGAL_CHARACTER_REGEXP","OPERATOR","_classCallCheck","_createClass","key","parse","context","or","instructions","parsePattern","_this$context$","branches","op","args","startContext","endContext","pop","getContext","match","test","split","operator","before","slice","index","rightPart","_this$getContext","oneOfSet","RegExp","match","characters","tree","last","characterString","join","indexOf","length","matchedChars","partialMatch","overflow","slice","Array","isArray","restCharacters","i","subtree","result","Error","concat","JSON","stringify","op","_iterator","_createForOfIteratorHelperLoose","args","_step","done","branch","value","_iterator2","_step2","char","PatternMatcher","pattern","_classCallCheck","matchTree","PatternParser","parse","_createClass","key","string","_ref","arguments","undefined","allowOverflow","split","DUMMY_DIGIT","LONGEST_NATIONAL_PHONE_NUMBER_LENGTH","LONGEST_DUMMY_PHONE_NUMBER","NATIONAL_PREFIX_SEPARATORS_PATTERN","SUPPORT_LEGACY_FORMATTING_PATTERNS","CREATE_CHARACTER_CLASS_PATTERN","CREATE_STANDALONE_DIGIT_PATTERN","NON_ALTERING_FORMAT_REG_EXP","MIN_LEADING_DIGITS_LENGTH","AsYouTypeFormatter","repeat","RegExp","VALID_PUNCTUATION","_ref","state","metadata","_classCallCheck","resetFormat","_createClass","key","value","chosenFormat","undefined","template","nationalNumberTemplate","populatedNationalNumberTemplate","populatedNationalNumberTemplatePosition","reset","numberingPlan","isNANP","callingCode","matchingFormats","formats","nationalSignificantNumber","narrowDownMatchingFormats","format","nextDigits","_this","canFormatCompleteNumber","_iterator","_createForOfIteratorHelperLoose","_step","done","formattedCompleteNumber","formatCompleteNumber","shouldTryNationalPrefixFormattingRule","international","nationalPrefix","getSeparatorAfterNationalPrefix","setNationalNumberTemplate","replace","DIGIT_PLACEHOLDER","lastIndexOf","formatNationalNumberWithNextDigits","previouslyChosenFormat","newlyChosenFormat","chooseFormat","formatNextNationalNumberDigits","getNationalDigits","_ref2","_this2","leadingDigits","leadingDigitsPatternIndex","length","filter","formatSuits","formatMatches","indexOf","usesNationalPrefix","nationalPrefixIsOptionalWhenFormattingInNationalFormat","nationalPrefixIsMandatoryWhenFormattingInNationalFormat","leadingDigitsPatternsCount","leadingDigitsPatterns","Math","min","leadingDigitsPattern","PatternMatcher","match","allowOverflow","error","console","concat","test","getFormatFormat","internationalFormat","_this3","_loop","_step2","createTemplateForFormat","_","_ret","_iterator2","slice","pattern","getTemplateForFormat","nationalPrefixFormattingRule","getInternationalPrefixBeforeCountryCallingCode","_ref3","options","IDDPrefix","missingPlus","spacing","getTemplate","index","i","internationalPrefix","getDigitsWithoutInternationalPrefix","cutAndStripNonPairedParens","_ref4","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","digits","strictPattern","nationalNumberDummyDigits","numberFormat","nationalPrefixIncludedInTemplate","numberFormatWithNationalPrefix","FIRST_GROUP_PATTERN","parseDigits","applyInternationalSeparatorStyle","result","populateTemplateWithDigits","_ref5","extractFormattedPhoneNumber","text","startsAt","search","VALID_FORMATTED_PHONE_NUMBER_PART","slice","hasPlus","length","replace","AFTER_PHONE_NUMBER_DIGITS_END_PATTERN","_extractFormattedDigitsAndPlus","extractedNumber","extractFormattedDigitsAndPlus","_extractFormattedDigi3","_extractFormattedDigi4","_slicedToArray","formattedDigits","VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN","test","VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART","COMPLEX_NATIONAL_PREFIX","AsYouTypeParser","VALID_PUNCTUATION","VALID_DIGITS","RegExp","PLUS_CHARS","_ref","defaultCountry","defaultCallingCode","metadata","onNationalSignificantNumberChange","_classCallCheck","_createClass","key","value","input","state","_extractFormattedDigi","_extractFormattedDigi2","digits","parseDigits","justLeadingPlus","startInternationalNumber","undefined","inputDigits","nextDigits","hasReceivedThreeLeadingDigits","appendDigits","extractIddPrefix","isWaitingForCountryCallingCode","extractCountryCallingCode","appendNationalSignificantNumberDigits","international","hasExtractedNationalSignificantNumber","extractNationalSignificantNumber","getNationalDigits","stateUpdate","update","_ref2","callingCode","_extractCountryCallin","getDigitsWithoutInternationalPrefix","country","countryCallingCode","number","setCallingCode","nationalSignificantNumber","reset","numberingPlan","hasSelectedNumberingPlan","nationalPrefixForParsing","_nationalPrefixForParsing","couldPossiblyExtractAnotherNationalSignificantNumber","nationalDigits","setState","_extractNationalNumbe","extractNationalNumberFromPossiblyIncompleteNumber","nationalPrefix","nationalNumber","carrierCode","onExtractedNationalNumber","extractAnotherNationalSignificantNumber","prevNationalSignificantNumber","_extractNationalNumbe2","nationalSignificantNumberIsModified","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","nationalSignificantNumberIndex","lastIndexOf","prefixBeforeNationalNumber","reExtractNationalSignificantNumber","extractCallingCodeAndNationalSignificantNumber","fixMissingPlus","IDDPrefix","numberWithoutIDD","stripIddPrefix","_extractCountryCallin2","extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","newCallingCode","missingPlus","_ref3","resetNationalSignificantNumber","getExactCountryForMultiCountryCallingCode","callingCode","nationalSignificantNumber","metadata","ambiguousCountries","getCountryCodesForCallingCode","length","getCountryByNationalNumber","USE_NON_GEOGRAPHIC_COUNTRY_CODE","AsYouType","optionsOrDefaultCountry","_classCallCheck","Metadata","_this$getCountryAndCa","getCountryAndCallingCode","_this$getCountryAndCa2","_slicedToArray","defaultCountry","defaultCallingCode","reset","_createClass","key","value","isObject","hasCountry","undefined","isNonGeographicCallingCode","input","text","_this$parser$input","parser","state","digits","justLeadingPlus","formattedOutput","determineTheCountryIfNeeded","formatter","narrowDownMatchingFormats","formattedNationalNumber","hasSelectedNumberingPlan","format","reExtractNationalSignificantNumber","nationalDigits","getNationalDigits","getFullNumber","getNonFormattedNumber","_this","AsYouTypeState","onCountryChange","country","onCallingCodeChange","selectNumberingPlan","numberingPlan","AsYouTypeFormatter","AsYouTypeParser","onNationalSignificantNumberChange","isInternational","international","getCallingCode","getCountryCallingCode","getCountry","_getCountry","isCountryCallingCodeAmbiguous","determineTheCountry","_this2","prefix","getInternationalPrefixBeforeCountryCallingCode","spacing","concat","getDigitsWithoutInternationalPrefix","getNonFormattedNationalNumberWithPrefix","_this$state","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","nationalPrefix","number","nationalSignificantNumberIsModified","getNonFormattedTemplate","replace","DIGIT_PLACEHOLDER","countryCodes","getCountryByCallingCode","nationalNumber","setCountry","getNumberValue","_this$state2","callingCode_","countryCallingCode","getNumber","_this$state3","carrierCode","exactCountry","phoneNumber","PhoneNumber","isPossible","isValid","validateLength","_this$state4","result","checkNumberLength","getNationalNumber","getChars","getTemplate","AsYouType","init_AsYouType","init_AsYouType","digits","AsYouType","state","state","state","form","newCaret","i","state","f","state","state","state","state","form","f","state","state","state","state","state","state","state","state","state","state","state","DEFAULT_OPTIONS","state","addListener","target"]}
|