1const _=/^[0-9+()\-. ]*$/,A=/[^0-9+()\-. ]/g;const E=/^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\.)+[A-Za-z]{2,}$/;const u=["gmail.com","googlemail.com","yahoo.com","yahoo.co.uk","hotmail.com","hotmail.co.uk","outlook.com","live.com","aol.com","icloud.com","me.com","msn.com","protonmail.com","proton.me","mail.com","gmx.com","yandex.com","zoho.com"],L=["gmx","hotmail","live","outlook","yahoo","yandex"];function h(t){return t.replace(/\s/g," ").replace(A,"").replace(/ {2,}/g," ").replace(/^ +/,"")}function I(t,n){const e=(n==null?void 0:n.required)??!1,i=(n==null?void 0:n.min)??7,o=t.trim();return o.length===0?!e:_.test(o)?o.length>=i&&f(o)>=1:!1}function m(t){const n=t.trim();if(n.length===0||n.length>254)return!1;const e=n.lastIndexOf("@");return e<1||e>64?!1:E.test(n)}function M(t){const n=t.trim();if(!m(n))return null;const e=n.lastIndexOf("@"),i=n.slice(0,e),o=n.slice(e+1).toLowerCase().replace(/\.+$/,"");if(o.length===0||T(o))return null;const r=o.split(".")[0];if(r.length<4)return null;let l=null,a=Number.POSITIVE_INFINITY;for(const c of u){if(Math.abs(o.length-c.length)>2||r[0]!==c[0])continue;const s=g(o,c);s<1||s>2||s>=a||(a=s,l=c)}return l===null?null:`${i}@${l}`}function f(t){let n=0;for(const e of t)e>="0"&&e<="9"&&(n+=1);return n}function T(t){if(u.includes(t))return!0;const n=t.split(".");return n.length>3?!1:L.includes(n[0])}function g(t,n){if(t===n)return 0;if(t.length===0)return n.length;if(n.length===0)return t.length;let e=Array.from({length:n.length+1},(o,r)=>r),i=new Array(n.length+1).fill(0);for(let o=1;o<=t.length;o+=1){i[0]=o;for(let l=1;l<=n.length;l+=1){const a=e[l-1]+(t[o-1]===n[l-1]?0:1),c=i[l-1]+1,s=e[l]+1;i[l]=Math.min(a,c,s)}const r=e;e=i,i=r}return e[n.length]}export{_ as P,m as a,h as b,I as i,M as s};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.