PATH:
opt
/
bitninja-dispatcher
/
node_modules
/
libphonenumber-js
/
build
/
findNumbers
{"version":3,"file":"Leniency.js","names":["POSSIBLE","number","candidate","metadata","VALID","isValidNumber","undefined","containsOnlyValidXChars","toString","STRICT_GROUPING","regExpCache","candidateString","containsMoreThanOneSlashInNationalNumber","isNationalPrefixPresentIfRequired","checkNumberGroupingIsValid","allNumberGroupsRemainGrouped","EXACT_GROUPING","allNumberGroupsAreExactlyPresent","index","length","charAtIndex","charAt","charAtNextIndex","util","isNumberMatch","substring","MatchType","NSN_MATCH","parseDigits","ext","_metadata","getCountryCodeSource","phoneNumberRegion","getRegionCodeForCountryCode","getCountryCode","getMetadataForRegion","nationalNumber","getNationalSignificantNumber","formatRule","chooseFormattingPatternForNumber","numberFormats","getNationalPrefixFormattingRule","getNationalPrefixOptionalWhenFormatting","PhoneNumberUtil","formattingRuleHasFirstGroupOnly","rawInputCopy","normalizeDigitsOnly","getRawInput","maybeStripNationalPrefixAndCarrierCode","firstSlashInBodyIndex","indexOf","secondSlashInBodyIndex","candidateHasCountryCode","CountryCodeSource","FROM_NUMBER_WITH_PLUS_SIGN","FROM_NUMBER_WITHOUT_PLUS_SIGN","String","slice","checkGroups","normalizedCandidate","normalizeDigits","formattedNumberGroups","getNationalNumberGroups","alternateFormats","MetadataManager","getAlternateFormatsForCountry","nationalSignificantNumber","alternateFormat","leadingDigitsPatterns","leadingDigitsRegExp","getPatternForRegExp","test","formattingPattern","formatNsnUsingPattern","split","rfc3966Format","formatNumber","endIndex","startIndex","candidateGroups","NON_DIGITS_PATTERN","candidateNumberGroupIndex","hasExtension","contains","formattedNumberGroupIndex","endsWith","fromIndex","FROM_DEFAULT_COUNTRY","countryCode","i","region","getNddPrefixForRegion","Character","isDigit","startsWith","getExtension"],"sources":["../../source/findNumbers/Leniency.js"],"sourcesContent":["import isValidNumber from '../validate_.js'\r\nimport parseDigits from '../helpers/parseDigits.js'\r\n\r\nimport {\r\n\tstartsWith,\r\n\tendsWith\r\n} from './util.js'\r\n\r\n/**\r\n * Leniency when finding potential phone numbers in text segments\r\n * The levels here are ordered in increasing strictness.\r\n */\r\nexport default\r\n{\r\n\t/**\r\n\t * Phone numbers accepted are \"possible\", but not necessarily \"valid\".\r\n\t */\r\n\tPOSSIBLE(number, candidate, metadata)\r\n\t{\r\n\t\treturn true\r\n\t},\r\n\r\n\t/**\r\n\t * Phone numbers accepted are \"possible\" and \"valid\".\r\n\t * Numbers written in national format must have their national-prefix\r\n\t * present if it is usually written for a number of this type.\r\n\t */\r\n\tVALID(number, candidate, metadata)\r\n\t{\r\n\t\tif (!isValidNumber(number, undefined, metadata) ||\r\n\t\t\t!containsOnlyValidXChars(number, candidate.toString(), metadata))\r\n\t\t{\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n // Skipped for simplicity.\r\n\t\t// return isNationalPrefixPresentIfRequired(number, metadata)\r\n return true\r\n },\r\n\r\n\t/**\r\n\t * Phone numbers accepted are \"valid\" and\r\n\t * are grouped in a possible way for this locale. For example, a US number written as\r\n\t * \"65 02 53 00 00\" and \"650253 0000\" are not accepted at this leniency level, whereas\r\n\t * \"650 253 0000\", \"650 2530000\" or \"6502530000\" are.\r\n\t * Numbers with more than one '/' symbol in the national significant number\r\n\t * are also dropped at this level.\r\n\t *\r\n\t * Warning: This level might result in lower coverage especially for regions outside of\r\n\t * country code \"+1\". If you are not sure about which level to use,\r\n\t * email the discussion group libphonenumber-discuss@googlegroups.com.\r\n\t */\r\n\tSTRICT_GROUPING(number, candidate, metadata, regExpCache)\r\n\t{\r\n\t\tconst candidateString = candidate.toString()\r\n\r\n\t\tif (!isValidNumber(number, undefined, metadata)\r\n\t\t\t|| !containsOnlyValidXChars(number, candidateString, metadata)\r\n\t\t\t|| containsMoreThanOneSlashInNationalNumber(number, candidateString)\r\n\t\t\t|| !isNationalPrefixPresentIfRequired(number, metadata))\r\n\t\t{\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\treturn checkNumberGroupingIsValid\r\n\t\t(\r\n\t\t\tnumber,\r\n\t\t\tcandidate,\r\n\t\t\tmetadata,\r\n\t\t\tallNumberGroupsRemainGrouped,\r\n\t\t\tregExpCache\r\n\t\t)\r\n },\r\n\r\n\t/**\r\n\t * Phone numbers accepted are {@linkplain PhoneNumberUtil#isValidNumber(PhoneNumber) valid} and\r\n\t * are grouped in the same way that we would have formatted it, or as a single block. For\r\n\t * example, a US number written as \"650 2530000\" is not accepted at this leniency level, whereas\r\n\t * \"650 253 0000\" or \"6502530000\" are.\r\n\t * Numbers with more than one '/' symbol are also dropped at this level.\r\n\t * <p>\r\n\t * Warning: This level might result in lower coverage especially for regions outside of country\r\n\t * code \"+1\". If you are not sure about which level to use, email the discussion group\r\n\t * libphonenumber-discuss@googlegroups.com.\r\n\t */\r\n\tEXACT_GROUPING(number, candidate, metadata, regExpCache)\r\n\t{\r\n\t\tconst candidateString = candidate.toString()\r\n\r\n\t\tif (!isValidNumber(number, undefined, metadata)\r\n\t\t\t|| !containsOnlyValidXChars(number, candidateString, metadata)\r\n\t\t\t|| containsMoreThanOneSlashInNationalNumber(number, candidateString)\r\n\t\t\t|| !isNationalPrefixPresentIfRequired(number, metadata))\r\n\t\t{\r\n\t\t\treturn false\r\n\t\t}\r\n\r\n\t\treturn checkNumberGroupingIsValid\r\n\t\t(\r\n\t\t\tnumber,\r\n\t\t\tcandidate,\r\n\t\t\tmetadata,\r\n\t\t\tallNumberGroupsAreExactlyPresent,\r\n\t\t\tregExpCache\r\n\t\t)\r\n\t}\r\n}\r\n\r\nfunction containsOnlyValidXChars(number, candidate, metadata)\r\n{\r\n // The characters 'x' and 'X' can be (1) a carrier code, in which case they always precede the\r\n // national significant number or (2) an extension sign, in which case they always precede the\r\n // extension number. We assume a carrier code is more than 1 digit, so the first case has to\r\n // have more than 1 consecutive 'x' or 'X', whereas the second case can only have exactly 1 'x'\r\n // or 'X'. We ignore the character if it appears as the last character of the string.\r\n for (let index = 0; index < candidate.length - 1; index++)\r\n {\r\n const charAtIndex = candidate.charAt(index)\r\n\r\n if (charAtIndex === 'x' || charAtIndex === 'X')\r\n {\r\n const charAtNextIndex = candidate.charAt(index + 1)\r\n\r\n if (charAtNextIndex === 'x' || charAtNextIndex === 'X')\r\n {\r\n // This is the carrier code case, in which the 'X's always precede the national\r\n // significant number.\r\n index++\r\n if (util.isNumberMatch(number, candidate.substring(index)) != MatchType.NSN_MATCH)\r\n {\r\n return false\r\n }\r\n\t // This is the extension sign case, in which the 'x' or 'X' should always precede the\r\n\t // extension number.\r\n }\r\n else if (parseDigits(candidate.substring(index)) !== number.ext)\r\n {\r\n return false\r\n }\r\n }\r\n }\r\n\r\n return true\r\n}\r\n\r\nfunction isNationalPrefixPresentIfRequired(number, _metadata)\r\n{\r\n // First, check how we deduced the country code. If it was written in international format, then\r\n // the national prefix is not required.\r\n if (number.getCountryCodeSource() != 'FROM_DEFAULT_COUNTRY')\r\n {\r\n return true\r\n }\r\n\r\n const phoneNumberRegion = util.getRegionCodeForCountryCode(number.getCountryCode())\r\n\r\n const metadata = util.getMetadataForRegion(phoneNumberRegion)\r\n if (metadata == null)\r\n {\r\n return true\r\n }\r\n\r\n // Check if a national prefix should be present when formatting this number.\r\n const nationalNumber = util.getNationalSignificantNumber(number)\r\n const formatRule = util.chooseFormattingPatternForNumber(metadata.numberFormats(), nationalNumber)\r\n\r\n // To do this, we check that a national prefix formatting rule was present\r\n // and that it wasn't just the first-group symbol ($1) with punctuation.\r\n if (formatRule && formatRule.getNationalPrefixFormattingRule().length > 0)\r\n {\r\n if (formatRule.getNationalPrefixOptionalWhenFormatting())\r\n {\r\n // The national-prefix is optional in these cases, so we don't need to check if it was\r\n // present.\r\n return true\r\n }\r\n\r\n if (PhoneNumberUtil.formattingRuleHasFirstGroupOnly(\r\n formatRule.getNationalPrefixFormattingRule()))\r\n {\r\n // National Prefix not needed for this number.\r\n return true\r\n }\r\n\r\n // Normalize the remainder.\r\n const rawInputCopy = PhoneNumberUtil.normalizeDigitsOnly(number.getRawInput())\r\n\r\n // Check if we found a national prefix and/or carrier code at the start of the raw input, and\r\n // return the result.\r\n return util.maybeStripNationalPrefixAndCarrierCode(rawInputCopy, metadata, null)\r\n }\r\n\r\n return true\r\n}\r\n\r\nexport function containsMoreThanOneSlashInNationalNumber(number, candidate)\r\n{\r\n const firstSlashInBodyIndex = candidate.indexOf('/')\r\n if (firstSlashInBodyIndex < 0)\r\n {\r\n // No slashes, this is okay.\r\n return false\r\n }\r\n\r\n // Now look for a second one.\r\n const secondSlashInBodyIndex = candidate.indexOf('/', firstSlashInBodyIndex + 1)\r\n if (secondSlashInBodyIndex < 0)\r\n {\r\n // Only one slash, this is okay.\r\n return false\r\n }\r\n\r\n // If the first slash is after the country calling code, this is permitted.\r\n const candidateHasCountryCode =\r\n (number.getCountryCodeSource() === CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN\r\n || number.getCountryCodeSource() === CountryCodeSource.FROM_NUMBER_WITHOUT_PLUS_SIGN)\r\n\r\n if (candidateHasCountryCode\r\n && PhoneNumberUtil.normalizeDigitsOnly(candidate.substring(0, firstSlashInBodyIndex))\r\n === String(number.getCountryCode()))\r\n {\r\n // Any more slashes and this is illegal.\r\n return candidate.slice(secondSlashInBodyIndex + 1).indexOf('/') >= 0\r\n }\r\n\r\n return true\r\n}\r\n\r\nfunction checkNumberGroupingIsValid(\r\n number,\r\n candidate,\r\n metadata,\r\n checkGroups,\r\n regExpCache\r\n) {\r\n const normalizedCandidate = normalizeDigits(candidate, true /* keep non-digits */)\r\n let formattedNumberGroups = getNationalNumberGroups(metadata, number, null)\r\n if (checkGroups(metadata, number, normalizedCandidate, formattedNumberGroups)) {\r\n return true\r\n }\r\n\r\n // If this didn't pass, see if there are any alternate formats that match, and try them instead.\r\n const alternateFormats = MetadataManager.getAlternateFormatsForCountry(number.getCountryCode())\r\n const nationalSignificantNumber = util.getNationalSignificantNumber(number)\r\n\r\n if (alternateFormats) {\r\n for (const alternateFormat of alternateFormats.numberFormats()) {\r\n if (alternateFormat.leadingDigitsPatterns().length > 0) {\r\n // There is only one leading digits pattern for alternate formats.\r\n const leadingDigitsRegExp = regExpCache.getPatternForRegExp('^' + alternateFormat.leadingDigitsPatterns()[0])\r\n if (!leadingDigitsRegExp.test(nationalSignificantNumber)) {\r\n // Leading digits don't match; try another one.\r\n continue\r\n }\r\n }\r\n formattedNumberGroups = getNationalNumberGroups(metadata, number, alternateFormat)\r\n if (checkGroups(metadata, number, normalizedCandidate, formattedNumberGroups)) {\r\n return true\r\n }\r\n }\r\n }\r\n\r\n return false\r\n}\r\n\r\n/**\r\n * Helper method to get the national-number part of a number, formatted without any national\r\n * prefix, and return it as a set of digit blocks that would be formatted together following\r\n * standard formatting rules.\r\n */\r\nfunction getNationalNumberGroups(\r\n\tmetadata,\r\n\tnumber,\r\n\tformattingPattern\r\n) {\r\n if (formattingPattern) {\r\n // We format the NSN only, and split that according to the separator.\r\n const nationalSignificantNumber = util.getNationalSignificantNumber(number)\r\n return util.formatNsnUsingPattern(nationalSignificantNumber,\r\n formattingPattern, 'RFC3966', metadata).split('-')\r\n\t}\r\n\r\n // This will be in the format +CC-DG1-DG2-DGX;ext=EXT where DG1..DGX represents groups of digits.\r\n const rfc3966Format = formatNumber(number, 'RFC3966', metadata)\r\n\r\n // We remove the extension part from the formatted string before splitting it into different\r\n // groups.\r\n let endIndex = rfc3966Format.indexOf(';')\r\n if (endIndex < 0) {\r\n endIndex = rfc3966Format.length\r\n }\r\n\r\n // The country-code will have a '-' following it.\r\n const startIndex = rfc3966Format.indexOf('-') + 1\r\n return rfc3966Format.slice(startIndex, endIndex).split('-')\r\n}\r\n\r\nfunction allNumberGroupsAreExactlyPresent\r\n(\r\n\tmetadata,\r\n\tnumber,\r\n\tnormalizedCandidate,\r\n\tformattedNumberGroups\r\n)\r\n{\r\n const candidateGroups = normalizedCandidate.split(NON_DIGITS_PATTERN)\r\n\r\n // Set this to the last group, skipping it if the number has an extension.\r\n let candidateNumberGroupIndex =\r\n number.hasExtension() ? candidateGroups.length - 2 : candidateGroups.length - 1\r\n\r\n // First we check if the national significant number is formatted as a block.\r\n // We use contains and not equals, since the national significant number may be present with\r\n // a prefix such as a national number prefix, or the country code itself.\r\n if (candidateGroups.length == 1\r\n || candidateGroups[candidateNumberGroupIndex].contains(\r\n util.getNationalSignificantNumber(number)))\r\n {\r\n return true\r\n }\r\n\r\n // Starting from the end, go through in reverse, excluding the first group, and check the\r\n // candidate and number groups are the same.\r\n let formattedNumberGroupIndex = (formattedNumberGroups.length - 1)\r\n while (formattedNumberGroupIndex > 0 && candidateNumberGroupIndex >= 0)\r\n {\r\n if (candidateGroups[candidateNumberGroupIndex] !== formattedNumberGroups[formattedNumberGroupIndex])\r\n {\r\n return false\r\n }\r\n formattedNumberGroupIndex--\r\n candidateNumberGroupIndex--\r\n }\r\n\r\n // Now check the first group. There may be a national prefix at the start, so we only check\r\n // that the candidate group ends with the formatted number group.\r\n return (candidateNumberGroupIndex >= 0\r\n && endsWith(candidateGroups[candidateNumberGroupIndex], formattedNumberGroups[0]))\r\n}\r\n\r\n\r\nfunction allNumberGroupsRemainGrouped\r\n(\r\n\tmetadata,\r\n\tnumber,\r\n\tnormalizedCandidate,\r\n\tformattedNumberGroups\r\n)\r\n{\r\n let fromIndex = 0\r\n if (number.getCountryCodeSource() !== CountryCodeSource.FROM_DEFAULT_COUNTRY)\r\n {\r\n // First skip the country code if the normalized candidate contained it.\r\n const countryCode = String(number.getCountryCode())\r\n fromIndex = normalizedCandidate.indexOf(countryCode) + countryCode.length()\r\n }\r\n\r\n // Check each group of consecutive digits are not broken into separate groupings in the\r\n // {@code normalizedCandidate} string.\r\n for (let i = 0; i < formattedNumberGroups.length; i++)\r\n {\r\n // Fails if the substring of {@code normalizedCandidate} starting from {@code fromIndex}\r\n // doesn't contain the consecutive digits in formattedNumberGroups[i].\r\n fromIndex = normalizedCandidate.indexOf(formattedNumberGroups[i], fromIndex)\r\n if (fromIndex < 0) {\r\n return false\r\n }\r\n // Moves {@code fromIndex} forward.\r\n fromIndex += formattedNumberGroups[i].length()\r\n if (i == 0 && fromIndex < normalizedCandidate.length())\r\n {\r\n // We are at the position right after the NDC. We get the region used for formatting\r\n // information based on the country code in the phone number, rather than the number itself,\r\n // as we do not need to distinguish between different countries with the same country\r\n // calling code and this is faster.\r\n const region = util.getRegionCodeForCountryCode(number.getCountryCode())\r\n if (util.getNddPrefixForRegion(region, true) != null\r\n && Character.isDigit(normalizedCandidate.charAt(fromIndex))) {\r\n // This means there is no formatting symbol after the NDC. In this case, we only\r\n // accept the number if there is no formatting symbol at all in the number, except\r\n // for extensions. This is only important for countries with national prefixes.\r\n const nationalSignificantNumber = util.getNationalSignificantNumber(number)\r\n return startsWith\r\n (\r\n \t normalizedCandidate.slice(fromIndex - formattedNumberGroups[i].length),\r\n nationalSignificantNumber\r\n )\r\n }\r\n }\r\n }\r\n\r\n // The check here makes sure that we haven't mistakenly already used the extension to\r\n // match the last group of the subscriber number. Note the extension cannot have\r\n // formatting in-between digits.\r\n return normalizedCandidate.slice(fromIndex).contains(number.getExtension())\r\n}"],"mappings":";;;;;;;;AAAA;;AACA;;AAEA;;;;;;;;;;AAKA;AACA;AACA;AACA;eAEA;EACC;AACD;AACA;EACCA,QAJD,oBAIUC,MAJV,EAIkBC,SAJlB,EAI6BC,QAJ7B,EAKC;IACC,OAAO,IAAP;EACA,CAPF;;EASC;AACD;AACA;AACA;AACA;EACCC,KAdD,iBAcOH,MAdP,EAceC,SAdf,EAc0BC,QAd1B,EAeC;IACC,IAAI,CAAC,IAAAE,qBAAA,EAAcJ,MAAd,EAAsBK,SAAtB,EAAiCH,QAAjC,CAAD,IACH,CAACI,uBAAuB,CAACN,MAAD,EAASC,SAAS,CAACM,QAAV,EAAT,EAA+BL,QAA/B,CADzB,EAEA;MACC,OAAO,KAAP;IACA,CALF,CAOG;IACF;;;IACE,OAAO,IAAP;EACD,CAzBH;;EA2BC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACCM,eAvCD,2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qB,CAAC4B,CAAD,CAAjD,EAAsDH,SAAtD,CAAZ;;IACA,IAAIA,SAAS,GAAG,CAAhB,EAAmB;MACjB,OAAO,KAAP;IACD,CANH,CAOE;;;IACAA,SAAS,IAAIzB,qBAAqB,CAAC4B,CAAD,CAArB,CAAyBtE,MAAzB,EAAb;;IACA,IAAIsE,CAAC,IAAI,CAAL,IAAUH,SAAS,GAAG3B,mBAAmB,CAACxC,MAApB,EAA1B,EACA;MACE;MACA;MACA;MACA;MACA,IAAMuE,MAAM,GAAGnE,IAAI,CAACU,2BAAL,CAAiChC,MAAM,CAACiC,cAAP,EAAjC,CAAf;;MACA,IAAIX,IAAI,CAACoE,qBAAL,CAA2BD,MAA3B,EAAmC,IAAnC,KAA4C,IAA5C,IACGE,SAAS,CAACC,OAAV,CAAkBlC,mBAAmB,CAACtC,MAApB,CAA2BiE,SAA3B,CAAlB,CADP,EACiE;QAC/D;QACA;QACA;QACA,IAAMpB,yBAAyB,GAAG3C,IAAI,CAACc,4BAAL,CAAkCpC,MAAlC,CAAlC;QACA,OAAO,IAAA6F,gBAAA,EAENnC,mBAAmB,CAACF,KAApB,CAA0B6B,SAAS,GAAGzB,qBAAqB,CAAC4B,CAAD,CAArB,CAAyBtE,MAA/D,CAFM,EAGJ+C,yBAHI,CAAP;MAKD;IACF;EACF,CAzCH,CA2CE;EACA;EACA;;;EACA,OAAOP,mBAAmB,CAACF,KAApB,CAA0B6B,SAA1B,EAAqCH,QAArC,CAA8ClF,MAAM,CAAC8F,YAAP,EAA9C,CAAP;AACD"}
[-] util.js.map
[edit]
[-] RegExpCache.js
[edit]
[-] util.test.js.map
[edit]
[-] Leniency.js.map
[edit]
[+]
..
[-] isValidPreCandidate.js
[edit]
[-] parsePreCandidate.js
[edit]
[-] RegExpCache.js.map
[edit]
[-] LRUCache.js.map
[edit]
[-] utf-8.js
[edit]
[-] isValidPreCandidate.js.map
[edit]
[-] util.test.js
[edit]
[-] LRUCache.js
[edit]
[-] Leniency.js
[edit]
[-] Leniency.test.js
[edit]
[-] parsePreCandidate.js.map
[edit]
[-] util.js
[edit]
[-] isValidCandidate.js
[edit]
[-] isValidCandidate.js.map
[edit]
[-] utf-8.js.map
[edit]
[-] Leniency.test.js.map
[edit]