const d={GENERAL:"general",MESSAGE:"message",SCREENSHOT:"screenshot"},b=(t="",e)=>{var s,a,i,E,f,l,g;let n=d.GENERAL;typeof e=="string"?n=e:typeof e=="object"&&e instanceof HTMLElement&&(n=((s=e.closest("[data-contact-info-scope]"))==null?void 0:s.getAttribute("data-contact-info-scope"))||n);const c=((E=(i=(a=Dribbble==null?void 0:Dribbble.JsConfig)==null?void 0:a.contacts)==null?void 0:i.regexes)==null?void 0:E[n])||((g=(l=(f=Dribbble==null?void 0:Dribbble.JsConfig)==null?void 0:f.contacts)==null?void 0:l.regexes)==null?void 0:g[d.GENERAL])||[],o=Object.values(c).map(r=>new RegExp(r,"i"))||[];return o.length?o.some(r=>r.test(t)):!1},p=t=>{t&&t.addEventListener("pristine:form-validated",({detail:e})=>{var s;const{isValidatingEntireForm:n}=e,o=Array.from(t.querySelectorAll("[data-pristine-contact-info]")).some(a=>b(a.value,a));(n||!o)&&((s=t.querySelector("[data-contact-info-error]"))==null||s.toggleAttribute("hidden",!o))})};export{d as C,p as b,b as h}; //# sourceMappingURL=contact-info-detection-helpers-88c9e017.js.map