UNPKG

@uva-glass/component-library

Version:

React components UvA

13 lines (12 loc) 1.05 kB
import { H as w } from "../../../../LexicalLink.prod-C6Or2Yo6.js"; const a = /^(http|https):\/\//, s = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/, A = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/, z = /^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})?$/, n = (t) => t === "https://" || s.test(t), o = (t) => t === "https://" || z.test(t), r = [ w(s, (t) => a.test(t) ? t : `//${t}`), w(A, (t) => `mailto:${t}`) ], e = (t) => /^https?:\/\//i.test(t) ? t : `https://${t}`; export { r as MATCHERS, e as ensureHttps, n as validateUrl, o as validateUrlWithProtocol }; //# sourceMappingURL=helpers.js.map