{"version":3,"sources":["jsdelivr-header.js","/npm/@wldlab/yup-phone@1.0.0-beta.1/bundle.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,IAAI,IAAM,QAAQ,OACd,IAAM,QAAQ,yBAIlB,MAAM,MAAQ,wDAEd,SAAS,SAAS,EAAa,GAC7B,OAAO,KAAK,QAAQ,MAAO,GAAS,KAAK,QAAS,GAAU,IAC1D,IAAK,MAAM,KAAK,GAAQ,OAAO,EAE/B,MAAM,EAAc,IAAI,2BAA2B,EAAO,GAE1D,MAAoB,cAAhB,GAEG,EAAY,SAAS,GAEhC,CAEA,IAAI,gBACF,IAAI,UAAU,IAAI,OAAQ,QAAS,UAGrC,OAAO,QAAU","file":"/npm/@wldlab/yup-phone@1.0.0-beta.1/bundle.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@wldlab/yup-phone@1.0.0-beta.1/bundle.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nvar Yup = require('yup');\nvar max = require('libphonenumber-js/max');\n\n// vendors\n\nconst regex = /(\\+)?(1)?[- ]?\\(?[1-9]\\d\\d\\)?[- ]?\\d\\d\\d[- ]?\\d\\d\\d\\d/;\n\nfunction yupPhone(countryCode, message) {\n  return this.matches(regex, message).test('phone', message, (value) => {\n    if (!regex.test(value)) return false;\n\n    const phoneNumber = max.parsePhoneNumberFromString(value, countryCode);\n\n    if (phoneNumber === 'undefined') return false;\n\n    return phoneNumber.isValid();\n  });\n}\n\nvar yupPhone$1 = (() => {\n  Yup.addMethod(Yup.string, 'phone', yupPhone);\n})();\n\nmodule.exports = yupPhone$1;\n"]}