document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-eryndo-interactive-hotspot-image").forEach((e=>{const t=e.querySelectorAll(".eryndo-hotspot");t.forEach((e=>{e.addEventListener("click",(a=>{a.stopPropagation(),t.forEach((t=>{t!==e&&(t.classList.remove("is-active"),t.setAttribute("aria-expanded","false"))})),e.classList.contains("is-active")?(e.classList.remove("is-active"),e.setAttribute("aria-expanded","false")):(e.classList.add("is-active"),e.setAttribute("aria-expanded","true"))})),e.addEventListener("keydown",(t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e.click()),"Escape"===t.key&&(e.classList.remove("is-active"),e.setAttribute("aria-expanded","false"),e.focus())}))})),document.addEventListener("click",(a=>{e.contains(a.target)||t.forEach((e=>{e.classList.remove("is-active"),e.setAttribute("aria-expanded","false")}))}))}))}));