HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/api-parametros/node_modules/libphonenumber-js/build/legacy/isValidNumberForRegion.js.map
{"version":3,"file":"isValidNumberForRegion.js","names":["isValidNumberForRegion","number","country","metadata","TypeError","input","isViablePhoneNumber","parseNumber","defaultCountry","_isValidNumberForRegion","undefined"],"sources":["../../source/legacy/isValidNumberForRegion.js"],"sourcesContent":["import isViablePhoneNumber from '../helpers/isViablePhoneNumber.js'\r\nimport parseNumber from '../parse.js'\r\nimport _isValidNumberForRegion from './isValidNumberForRegion_.js'\r\n\r\n// This function has been deprecated and is not exported as\r\n// `isValidPhoneNumberForCountry()` or `isValidPhoneNumberForRegion()`.\r\n//\r\n// The rationale is:\r\n//\r\n// * We don't use the \"region\" word, so \"country\" would be better.\r\n//\r\n// * It could be substituted with:\r\n//\r\n// ```js\r\n// export default function isValidPhoneNumberForCountry(phoneNumberString, country) {\r\n// \tconst phoneNumber = parsePhoneNumber(phoneNumberString, {\r\n// \t\tdefaultCountry: country,\r\n// \t\t// Demand that the entire input string must be a phone number.\r\n// \t\t// Otherwise, it would \"extract\" a phone number from an input string.\r\n// \t\textract: false\r\n// \t})\r\n// \tif (!phoneNumber) {\r\n// \t\treturn false\r\n// \t}\r\n// \tif (phoneNumber.country !== country) {\r\n// \t\treturn false\r\n// \t}\r\n// \treturn phoneNumber.isValid()\r\n// }\r\n// ```\r\n//\r\n// * Same function could be used for `isPossiblePhoneNumberForCountry()`\r\n//   by replacing `isValid()` with `isPossible()`.\r\n//\r\n// * The reason why this function is not exported is because its result is ambiguous.\r\n//   Suppose `false` is returned. It could mean any of:\r\n//   * Not a phone number.\r\n//   * The phone number is valid but belongs to another country or another calling code.\r\n//   * The phone number belongs to the correct country but is not valid digit-wise.\r\n//   All those three cases should be handled separately from a \"User Experience\" standpoint.\r\n//   Simply showing \"Invalid phone number\" error in all of those cases would be lazy UX.\r\n\r\nexport default function isValidNumberForRegion(number, country, metadata) {\r\n\tif (typeof number !== 'string') {\r\n\t\tthrow new TypeError('number must be a string')\r\n\t}\r\n\tif (typeof country !== 'string') {\r\n\t\tthrow new TypeError('country must be a string')\r\n\t}\r\n\t// `parse` extracts phone numbers from raw text,\r\n\t// therefore it will cut off all \"garbage\" characters,\r\n\t// while this `validate` function needs to verify\r\n\t// that the phone number contains no \"garbage\"\r\n\t// therefore the explicit `isViablePhoneNumber` check.\r\n\tlet input\r\n\tif (isViablePhoneNumber(number)) {\r\n\t\tinput = parseNumber(number, { defaultCountry: country }, metadata)\r\n\t} else {\r\n\t\tinput = {}\r\n\t}\r\n\treturn _isValidNumberForRegion(input, country, undefined, metadata)\r\n}"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEe,SAASA,sBAAT,CAAgCC,MAAhC,EAAwCC,OAAxC,EAAiDC,QAAjD,EAA2D;EACzE,IAAI,OAAOF,MAAP,KAAkB,QAAtB,EAAgC;IAC/B,MAAM,IAAIG,SAAJ,CAAc,yBAAd,CAAN;EACA;;EACD,IAAI,OAAOF,OAAP,KAAmB,QAAvB,EAAiC;IAChC,MAAM,IAAIE,SAAJ,CAAc,0BAAd,CAAN;EACA,CANwE,CAOzE;EACA;EACA;EACA;EACA;;;EACA,IAAIC,KAAJ;;EACA,IAAI,IAAAC,+BAAA,EAAoBL,MAApB,CAAJ,EAAiC;IAChCI,KAAK,GAAG,IAAAE,iBAAA,EAAYN,MAAZ,EAAoB;MAAEO,cAAc,EAAEN;IAAlB,CAApB,EAAiDC,QAAjD,CAAR;EACA,CAFD,MAEO;IACNE,KAAK,GAAG,EAAR;EACA;;EACD,OAAO,IAAAI,mCAAA,EAAwBJ,KAAxB,EAA+BH,OAA/B,EAAwCQ,SAAxC,EAAmDP,QAAnD,CAAP;AACA"}