Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../uploads/../../../../instantly.picotech.app/homes/../../wa.picotech.app/public_html/node_modules/escape-html/../querystring/../@protobufjs/../safe-buffer/../@eshaz/../@protobufjs/../@hapi/../uuid/../path-exists/../mime/../libphonenumber-js/index.es6.exports/../es6
الملفات الموجودة في هذا الـ Path:
.
..
AsYouType.js
AsYouType.js.map
AsYouType.test.js
AsYouType.test.js.map
AsYouTypeFormatter.PatternMatcher.js
AsYouTypeFormatter.PatternMatcher.js.map
AsYouTypeFormatter.PatternMatcher.test.js
AsYouTypeFormatter.PatternMatcher.test.js.map
AsYouTypeFormatter.PatternParser.js
AsYouTypeFormatter.PatternParser.js.map
AsYouTypeFormatter.PatternParser.test.js
AsYouTypeFormatter.PatternParser.test.js.map
AsYouTypeFormatter.complete.js
AsYouTypeFormatter.complete.js.map
AsYouTypeFormatter.js
AsYouTypeFormatter.js.map
AsYouTypeFormatter.util.js
AsYouTypeFormatter.util.js.map
AsYouTypeFormatter.util.test.js
AsYouTypeFormatter.util.test.js.map
AsYouTypeParser.js
AsYouTypeParser.js.map
AsYouTypeState.js
AsYouTypeState.js.map
ParseError.js
ParseError.js.map
PhoneNumber.js
PhoneNumber.js.map
PhoneNumber.test.js
PhoneNumber.test.js.map
PhoneNumberMatcher.js
PhoneNumberMatcher.js.map
PhoneNumberMatcher.test.js
PhoneNumberMatcher.test.js.map
constants.js
constants.js.map
findNumbers
findPhoneNumbersInText.js
findPhoneNumbersInText.js.map
findPhoneNumbersInText.test.js
findPhoneNumbersInText.test.js.map
format.js
format.js.map
format.test.js
format.test.js.map
formatIncompletePhoneNumber.js
formatIncompletePhoneNumber.js.map
formatIncompletePhoneNumber.test.js
formatIncompletePhoneNumber.test.js.map
formatPhoneNumberForMobileDialing.js
formatPhoneNumberForMobileDialing.js.map
formatPhoneNumberForMobileDialing.test.js
formatPhoneNumberForMobileDialing.test.js.map
getCountries.js
getCountries.js.map
getCountries.test.js
getCountries.test.js.map
getCountryCallingCode.js
getCountryCallingCode.js.map
getCountryCallingCode.test.js
getCountryCallingCode.test.js.map
getExampleNumber.js
getExampleNumber.js.map
getExampleNumber.test.js
getExampleNumber.test.js.map
helpers
isPossible.js
isPossible.js.map
isPossible.test.js
isPossible.test.js.map
isPossiblePhoneNumber.js
isPossiblePhoneNumber.js.map
isPossiblePhoneNumber.test.js
isPossiblePhoneNumber.test.js.map
isValid.js
isValid.js.map
isValid.test.js
isValid.test.js.map
isValidPhoneNumber.js
isValidPhoneNumber.js.map
isValidPhoneNumber.test.js
isValidPhoneNumber.test.js.map
legacy
metadata.js
metadata.js.map
metadata.test.js
metadata.test.js.map
normalizeArguments.js
normalizeArguments.js.map
parse.js
parse.js.map
parse.test.js
parse.test.js.map
parseIncompletePhoneNumber.js
parseIncompletePhoneNumber.js.map
parseIncompletePhoneNumber.test.js
parseIncompletePhoneNumber.test.js.map
parsePhoneNumber.js
parsePhoneNumber.js.map
parsePhoneNumber.test.js
parsePhoneNumber.test.js.map
parsePhoneNumberWithError.js
parsePhoneNumberWithError.js.map
parsePhoneNumberWithError.test.js
parsePhoneNumberWithError.test.js.map
parsePhoneNumberWithError_.js
parsePhoneNumberWithError_.js.map
parsePhoneNumber_.js
parsePhoneNumber_.js.map
searchPhoneNumbersInText.js
searchPhoneNumbersInText.js.map
searchPhoneNumbersInText.test.js
searchPhoneNumbersInText.test.js.map
tools
validatePhoneNumberLength.js
validatePhoneNumberLength.js.map
validatePhoneNumberLength.test.js
validatePhoneNumberLength.test.js.map

مشاهدة ملف: PhoneNumberMatcher.js.map

{"version":3,"file":"PhoneNumberMatcher.js","names":["PhoneNumber","MAX_LENGTH_FOR_NSN","MAX_LENGTH_COUNTRY_CODE","VALID_PUNCTUATION","createExtensionPattern","RegExpCache","limit","trimAfterFirstMatch","_pL","_pN","pZ","PZ","pNd","Leniency","parsePreCandidate","isValidPreCandidate","isValidCandidate","LEAD_CLASS","isSupportedCountry","parsePhoneNumber","USE_NON_GEOGRAPHIC_COUNTRY_CODE","EXTN_PATTERNS_FOR_MATCHING","INNER_MATCHES","leadLimit","punctuationLimit","digitBlockLimit","blockLimit","punctuation","digitSequence","PATTERN","UNWANTED_END_CHAR_PATTERN","RegExp","NON_DIGITS_PATTERN","MAX_SAFE_INTEGER","Number","Math","pow","PhoneNumberMatcher","text","options","metadata","v2","defaultCallingCode","defaultCountry","undefined","leniency","extended","maxTries","TypeError","state","searchIndex","regExpCache","matches","exec","candidate","offset","index","match","parseAndVerify","extractInnerMatch","startsAt","endsAt","number","phoneNumber","result","phone","nationalNumber","country","countryCallingCode","ext","substring","innerMatchPattern","isFirstMatch","candidateMatch","innerMatchRegExp","slice","candidateIndexGuess","indexOf","isPossible","length","lastMatch","find","hasNext","Error"],"sources":["../source/PhoneNumberMatcher.js"],"sourcesContent":["/**\r\n * A port of Google's `PhoneNumberMatcher.java`.\r\n * https://github.com/googlei18n/libphonenumber/blob/master/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java\r\n * Date: 08.03.2018.\r\n */\r\n\r\nimport PhoneNumber from './PhoneNumber.js'\r\n\r\nimport {\r\n  MAX_LENGTH_FOR_NSN,\r\n  MAX_LENGTH_COUNTRY_CODE,\r\n  VALID_PUNCTUATION\r\n} from './constants.js'\r\n\r\nimport createExtensionPattern from './helpers/extension/createExtensionPattern.js'\r\n\r\nimport RegExpCache from './findNumbers/RegExpCache.js'\r\n\r\nimport {\r\n\tlimit,\r\n\ttrimAfterFirstMatch\r\n} from './findNumbers/util.js'\r\n\r\nimport {\r\n\t_pL,\r\n\t_pN,\r\n\tpZ,\r\n\tPZ,\r\n\tpNd\r\n} from './findNumbers/utf-8.js'\r\n\r\nimport Leniency from './findNumbers/Leniency.js'\r\nimport parsePreCandidate from './findNumbers/parsePreCandidate.js'\r\nimport isValidPreCandidate from './findNumbers/isValidPreCandidate.js'\r\nimport isValidCandidate, { LEAD_CLASS } from './findNumbers/isValidCandidate.js'\r\n\r\nimport { isSupportedCountry } from './metadata.js'\r\n\r\nimport parsePhoneNumber from './parsePhoneNumber.js'\r\n\r\nconst USE_NON_GEOGRAPHIC_COUNTRY_CODE = false\r\n\r\nconst EXTN_PATTERNS_FOR_MATCHING = createExtensionPattern('matching')\r\n\r\n/**\r\n * Patterns used to extract phone numbers from a larger phone-number-like pattern. These are\r\n * ordered according to specificity. For example, white-space is last since that is frequently\r\n * used in numbers, not just to separate two numbers. We have separate patterns since we don't\r\n * want to break up the phone-number-like text on more than one different kind of symbol at one\r\n * time, although symbols of the same type (e.g. space) can be safely grouped together.\r\n *\r\n * Note that if there is a match, we will always check any text found up to the first match as\r\n * well.\r\n */\r\nconst INNER_MATCHES =\r\n[\r\n\t// Breaks on the slash - e.g. \"651-234-2345/332-445-1234\"\r\n\t'\\\\/+(.*)/',\r\n\r\n\t// Note that the bracket here is inside the capturing group, since we consider it part of the\r\n\t// phone number. Will match a pattern like \"(650) 223 3345 (754) 223 3321\".\r\n\t'(\\\\([^(]*)',\r\n\r\n\t// Breaks on a hyphen - e.g. \"12345 - 332-445-1234 is my number.\"\r\n\t// We require a space on either side of the hyphen for it to be considered a separator.\r\n\t`(?:${pZ}-|-${pZ})${pZ}*(.+)`,\r\n\r\n\t// Various types of wide hyphens. Note we have decided not to enforce a space here, since it's\r\n\t// possible that it's supposed to be used to break two numbers without spaces, and we haven't\r\n\t// seen many instances of it used within a number.\r\n\t`[\\u2012-\\u2015\\uFF0D]${pZ}*(.+)`,\r\n\r\n\t// Breaks on a full stop - e.g. \"12345. 332-445-1234 is my number.\"\r\n\t`\\\\.+${pZ}*([^.]+)`,\r\n\r\n\t// Breaks on space - e.g. \"3324451234 8002341234\"\r\n\t`${pZ}+(${PZ}+)`\r\n]\r\n\r\n// Limit on the number of leading (plus) characters.\r\nconst leadLimit = limit(0, 2)\r\n\r\n// Limit on the number of consecutive punctuation characters.\r\nconst punctuationLimit = limit(0, 4)\r\n\r\n/* The maximum number of digits allowed in a digit-separated block. As we allow all digits in a\r\n * single block, set high enough to accommodate the entire national number and the international\r\n * country code. */\r\nconst digitBlockLimit = MAX_LENGTH_FOR_NSN + MAX_LENGTH_COUNTRY_CODE\r\n\r\n// Limit on the number of blocks separated by punctuation.\r\n// Uses digitBlockLimit since some formats use spaces to separate each digit.\r\nconst blockLimit = limit(0, digitBlockLimit)\r\n\r\n/* A punctuation sequence allowing white space. */\r\nconst punctuation = `[${VALID_PUNCTUATION}]` + punctuationLimit\r\n\r\n// A digits block without punctuation.\r\nconst digitSequence = pNd + limit(1, digitBlockLimit)\r\n\r\n/**\r\n * Phone number pattern allowing optional punctuation.\r\n * The phone number pattern used by `find()`, similar to\r\n * VALID_PHONE_NUMBER, but with the following differences:\r\n * <ul>\r\n *   <li>All captures are limited in order to place an upper bound to the text matched by the\r\n *       pattern.\r\n * <ul>\r\n *   <li>Leading punctuation / plus signs are limited.\r\n *   <li>Consecutive occurrences of punctuation are limited.\r\n *   <li>Number of digits is limited.\r\n * </ul>\r\n *   <li>No whitespace is allowed at the start or end.\r\n *   <li>No alpha digits (vanity numbers such as 1-800-SIX-FLAGS) are currently supported.\r\n * </ul>\r\n */\r\nconst PATTERN = '(?:' + LEAD_CLASS + punctuation + ')' + leadLimit\r\n\t+ digitSequence + '(?:' + punctuation + digitSequence + ')' + blockLimit\r\n\t+ '(?:' + EXTN_PATTERNS_FOR_MATCHING + ')?'\r\n\r\n// Regular expression of trailing characters that we want to remove.\r\n// We remove all characters that are not alpha or numerical characters.\r\n// The hash character is retained here, as it may signify\r\n// the previous block was an extension.\r\n//\r\n// // Don't know what does '&&' mean here.\r\n// const UNWANTED_END_CHAR_PATTERN = new RegExp(`[[\\\\P{N}&&\\\\P{L}]&&[^#]]+$`)\r\n//\r\nconst UNWANTED_END_CHAR_PATTERN = new RegExp(`[^${_pN}${_pL}#]+$`)\r\n\r\nconst NON_DIGITS_PATTERN = /(\\D+)/\r\n\r\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1\r\n\r\n/**\r\n * A stateful class that finds and extracts telephone numbers from {@linkplain CharSequence text}.\r\n * Instances can be created using the {@linkplain PhoneNumberUtil#findNumbers factory methods} in\r\n * {@link PhoneNumberUtil}.\r\n *\r\n * <p>Vanity numbers (phone numbers using alphabetic digits such as <tt>1-800-SIX-FLAGS</tt> are\r\n * not found.\r\n *\r\n * <p>This class is not thread-safe.\r\n */\r\nexport default class PhoneNumberMatcher\r\n{\r\n  /**\r\n   * @param {string} text — the character sequence that we will search, null for no text.\r\n   * @param {'POSSIBLE'|'VALID'|'STRICT_GROUPING'|'EXACT_GROUPING'} [options.leniency] — The leniency to use when evaluating candidate phone numbers. See `source/findNumbers/Leniency.js` for more details.\r\n   * @param {number} [options.maxTries] — The maximum number of invalid numbers to try before giving up on the text. This is to cover degenerate cases where the text has a lot of false positives in it. Must be >= 0.\r\n   */\r\n  constructor(text = '', options = {}, metadata)\r\n  {\r\n    options = {\r\n      v2: options.v2,\r\n      defaultCallingCode: options.defaultCallingCode,\r\n      defaultCountry: options.defaultCountry && isSupportedCountry(options.defaultCountry, metadata) ? options.defaultCountry : undefined,\r\n      leniency: options.leniency || (options.extended ? 'POSSIBLE' : 'VALID'),\r\n      maxTries: options.maxTries || MAX_SAFE_INTEGER\r\n    }\r\n\r\n    // Validate `leniency`.\r\n\t\tif (!options.leniency) {\r\n\t\t\tthrow new TypeError('`leniency` is required')\r\n\t\t}\r\n    if (options.leniency !== 'POSSIBLE' && options.leniency !== 'VALID') {\r\n      throw new TypeError(`Invalid \\`leniency\\`: \"${options.leniency}\". Supported values: \"POSSIBLE\", \"VALID\".`)\r\n    }\r\n\r\n    // Validate `maxTries`.\r\n\t\tif (options.maxTries < 0) {\r\n\t\t\tthrow new TypeError('`maxTries` must be `>= 0`')\r\n\t\t}\r\n\r\n\t\tthis.text = text\r\n\t\tthis.options = options\r\n    this.metadata = metadata\r\n\r\n\t\t// The degree of phone number validation.\r\n\t\tthis.leniency = Leniency[options.leniency]\r\n\r\n\t\tif (!this.leniency) {\r\n\t\t\tthrow new TypeError(`Unknown leniency: \"${options.leniency}\"`)\r\n\t\t}\r\n\r\n\t\t/** The maximum number of retries after matching an invalid number. */\r\n\t\tthis.maxTries = options.maxTries\r\n\r\n\t\tthis.PATTERN = new RegExp(PATTERN, 'ig')\r\n\r\n    /** The iteration tristate. */\r\n    this.state = 'NOT_READY'\r\n\r\n    /** The next index to start searching at. Undefined in {@link State#DONE}. */\r\n    this.searchIndex = 0\r\n\r\n    // A cache for frequently used country-specific regular expressions. Set to 32 to cover ~2-3\r\n    // countries being used for the same doc with ~10 patterns for each country. Some pages will have\r\n    // a lot more countries in use, but typically fewer numbers for each so expanding the cache for\r\n    // that use-case won't have a lot of benefit.\r\n    this.regExpCache = new RegExpCache(32)\r\n  }\r\n\r\n  /**\r\n   * Attempts to find the next subsequence in the searched sequence on or after {@code searchIndex}\r\n   * that represents a phone number. Returns the next match, null if none was found.\r\n   *\r\n   * @param index  the search index to start searching at\r\n   * @return  the phone number match found, null if none can be found\r\n   */\r\n\tfind() {\r\n\t\t// // Reset the regular expression.\r\n\t\t// this.PATTERN.lastIndex = index\r\n\r\n\t\tlet matches\r\n\t\twhile ((this.maxTries > 0) && (matches = this.PATTERN.exec(this.text)) !== null) {\r\n\t\t\tlet candidate = matches[0]\r\n\t\t\tconst offset = matches.index\r\n\r\n\t\t\tcandidate = parsePreCandidate(candidate)\r\n\r\n\t\t\tif (isValidPreCandidate(candidate, offset, this.text)) {\r\n\t\t\t\tconst match =\r\n\t\t\t\t\t// Try to come up with a valid match given the entire candidate.\r\n\t\t\t\t\tthis.parseAndVerify(candidate, offset, this.text)\r\n\t\t\t\t\t// If that failed, try to find an \"inner match\" -\r\n\t\t\t\t\t// there might be a phone number within this candidate.\r\n\t\t\t\t\t|| this.extractInnerMatch(candidate, offset, this.text)\r\n\r\n\t\t\t\tif (match) {\r\n\t\t\t\t\tif (this.options.v2) {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tstartsAt: match.startsAt,\r\n\t\t\t\t\t\t\tendsAt: match.endsAt,\r\n\t\t\t\t\t\t\tnumber: match.phoneNumber\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n            const { phoneNumber } = match\r\n\r\n            const result = {\r\n              startsAt: match.startsAt,\r\n              endsAt: match.endsAt,\r\n              phone: phoneNumber.nationalNumber\r\n            }\r\n\r\n            if (phoneNumber.country) {\r\n              /* istanbul ignore if */\r\n              if (USE_NON_GEOGRAPHIC_COUNTRY_CODE && country === '001') {\r\n                result.countryCallingCode = phoneNumber.countryCallingCode\r\n              } else {\r\n                result.country = phoneNumber.country\r\n              }\r\n            } else {\r\n              result.countryCallingCode = phoneNumber.countryCallingCode\r\n            }\r\n\r\n            if (phoneNumber.ext) {\r\n              result.ext = phoneNumber.ext\r\n            }\r\n\r\n            return result\r\n          }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.maxTries--\r\n\t\t}\r\n\t}\r\n\r\n  /**\r\n   * Attempts to extract a match from `substring`\r\n   * if the substring itself does not qualify as a match.\r\n   */\r\n  extractInnerMatch(substring, offset, text) {\r\n    for (const innerMatchPattern of INNER_MATCHES) {\r\n      let isFirstMatch = true\r\n      let candidateMatch\r\n      const innerMatchRegExp = new RegExp(innerMatchPattern, 'g')\r\n      while (this.maxTries > 0 && (candidateMatch = innerMatchRegExp.exec(substring)) !== null) {\r\n        if (isFirstMatch) {\r\n          // We should handle any group before this one too.\r\n          const candidate = trimAfterFirstMatch(\r\n            UNWANTED_END_CHAR_PATTERN,\r\n            substring.slice(0, candidateMatch.index)\r\n          )\r\n\r\n          const match = this.parseAndVerify(candidate, offset, text)\r\n\r\n          if (match) {\r\n            return match\r\n          }\r\n\r\n          this.maxTries--\r\n          isFirstMatch = false\r\n        }\r\n\r\n        const candidate = trimAfterFirstMatch(UNWANTED_END_CHAR_PATTERN, candidateMatch[1])\r\n\r\n        // Java code does `groupMatcher.start(1)` here,\r\n        // but there's no way in javascript to get a `candidate` start index,\r\n        // therefore resort to using this kind of an approximation.\r\n        // (`groupMatcher` is called `candidateInSubstringMatch` in this javascript port)\r\n        // https://stackoverflow.com/questions/15934353/get-index-of-each-capture-in-a-javascript-regex\r\n        const candidateIndexGuess = substring.indexOf(candidate, candidateMatch.index)\r\n\r\n        const match = this.parseAndVerify(candidate, offset + candidateIndexGuess, text)\r\n        if (match) {\r\n          return match\r\n        }\r\n\r\n        this.maxTries--\r\n      }\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Parses a phone number from the `candidate` using `parse` and\r\n   * verifies it matches the requested `leniency`. If parsing and verification succeed,\r\n   * a corresponding `PhoneNumberMatch` is returned, otherwise this method returns `null`.\r\n   *\r\n   * @param candidate  the candidate match\r\n   * @param offset  the offset of {@code candidate} within {@link #text}\r\n   * @return  the parsed and validated phone number match, or null\r\n   */\r\n  parseAndVerify(candidate, offset, text) {\r\n    if (!isValidCandidate(candidate, offset, text, this.options.leniency)) {\r\n      return\r\n  \t}\r\n\r\n    const phoneNumber = parsePhoneNumber(\r\n      candidate,\r\n      {\r\n        extended: true,\r\n        defaultCountry: this.options.defaultCountry,\r\n        defaultCallingCode: this.options.defaultCallingCode\r\n      },\r\n      this.metadata\r\n    )\r\n\r\n    if (!phoneNumber) {\r\n      return\r\n    }\r\n\r\n    if (!phoneNumber.isPossible()) {\r\n      return\r\n    }\r\n\r\n    if (this.leniency(phoneNumber, {\r\n      candidate,\r\n      defaultCountry: this.options.defaultCountry,\r\n      metadata: this.metadata,\r\n      regExpCache: this.regExpCache\r\n    })) {\r\n      return {\r\n        startsAt: offset,\r\n        endsAt: offset + candidate.length,\r\n        phoneNumber\r\n      }\r\n    }\r\n  }\r\n\r\n  hasNext()\r\n  {\r\n    if (this.state === 'NOT_READY')\r\n    {\r\n      this.lastMatch = this.find() // (this.searchIndex)\r\n\r\n      if (this.lastMatch)\r\n      {\r\n        // this.searchIndex = this.lastMatch.endsAt\r\n        this.state = 'READY'\r\n      }\r\n      else\r\n      {\r\n        this.state = 'DONE'\r\n      }\r\n    }\r\n\r\n    return this.state === 'READY'\r\n  }\r\n\r\n  next()\r\n  {\r\n    // Check the state and find the next match as a side-effect if necessary.\r\n    if (!this.hasNext())\r\n    {\r\n      throw new Error('No next element')\r\n    }\r\n\r\n    // Don't retain that memory any longer than necessary.\r\n    const result = this.lastMatch\r\n    this.lastMatch = null\r\n    this.state = 'NOT_READY'\r\n    return result\r\n  }\r\n}"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA,OAAOA,WAAP,MAAwB,kBAAxB;AAEA,SACEC,kBADF,EAEEC,uBAFF,EAGEC,iBAHF,QAIO,gBAJP;AAMA,OAAOC,sBAAP,MAAmC,+CAAnC;AAEA,OAAOC,WAAP,MAAwB,8BAAxB;AAEA,SACCC,KADD,EAECC,mBAFD,QAGO,uBAHP;AAKA,SACCC,GADD,EAECC,GAFD,EAGCC,EAHD,EAICC,EAJD,EAKCC,GALD,QAMO,wBANP;AAQA,OAAOC,QAAP,MAAqB,2BAArB;AACA,OAAOC,iBAAP,MAA8B,oCAA9B;AACA,OAAOC,mBAAP,MAAgC,sCAAhC;AACA,OAAOC,gBAAP,IAA2BC,UAA3B,QAA6C,mCAA7C;AAEA,SAASC,kBAAT,QAAmC,eAAnC;AAEA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEA,IAAMC,+BAA+B,GAAG,KAAxC;AAEA,IAAMC,0BAA0B,GAAGjB,sBAAsB,CAAC,UAAD,CAAzD;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAMkB,aAAa,GACnB,CACC;AACA,WAFD,EAIC;AACA;AACA,YAND,EAQC;AACA;AATD,aAUOZ,EAVP,gBAUeA,EAVf,cAUqBA,EAVrB,YAYC;AACA;AACA;AAdD,+BAeyBA,EAfzB,YAiBC;AAjBD,cAkBQA,EAlBR,eAoBC;AApBD,UAqBIA,EArBJ,eAqBWC,EArBX,QADA,C,CAyBA;;AACA,IAAM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