document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".wp-block-uicore-accordion-item-title").forEach(i=>{i.addEventListener("click",e=>{e.stopPropagation();e=i.closest(".wp-block-uicore-a-accordion")||i.closest(".wp-block-uicore-accordion");let t=i.closest(".wp-block-uicore-accordion-item");var c=t.querySelector(".wp-block-uicore-accordion-item-content")||i.nextElementSibling,o="true"===i.getAttribute("aria-expanded");i.setAttribute("aria-expanded",!o),c.setAttribute("aria-hidden",o),"one"===e?.getAttribute("data-allow-open")&&(e.querySelectorAll(".wp-block-uicore-accordion-item-title").forEach(e=>{e!==i&&(e.classList.remove("uicore-is-active"),e.setAttribute("aria-expanded","false"),e.closest(".wp-block-uicore-accordion-item").querySelector(".wp-block-uicore-accordion-item-content").setAttribute("aria-hidden","true"))}),e.querySelectorAll(".wp-block-uicore-accordion-item").forEach(e=>{e!==t&&(e.classList.remove("uicore-is-active"),e.querySelectorAll('[class*="wp-block-uicore"]').forEach(e=>{e.classList.remove("uicore-is-active")}),e.querySelector(".wp-block-uicore-accordion-item-title").setAttribute("aria-expanded","false"),e.querySelector(".wp-block-uicore-accordion-item-content").setAttribute("aria-hidden","true"))})),t.classList.toggle("uicore-is-active"),t.querySelectorAll('[class*="wp-block-uicore"]').forEach(e=>{e.classList.toggle("uicore-is-active")})})})});