!function(){"use strict";const e=(e,t={})=>{if(!e)return;const c=e.getBoundingClientRect();0<=c.top&&0<=c.left&&c.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&c.right<=(window.innerWidth||document.documentElement.clientWidth)||e.scrollIntoView(t)};var t;t=()=>{const t=document.querySelectorAll(".wp-block-themeisle-blocks-tabs"),c=window.location.hash.substring(1);t.forEach((t=>{const s=Array.from(t.querySelectorAll(":scope > .wp-block-themeisle-blocks-tabs__content > .wp-block-themeisle-blocks-tabs-item")),o=document.createElement("div");o.classList.add("wp-block-themeisle-blocks-tabs__header"),t.prepend(o);let a=!1;const i=[];s.forEach(((t,l)=>{const d=t.querySelector(":scope > .wp-block-themeisle-blocks-tabs-item__content");d.setAttribute("role","tabpanel");const n=t.querySelector(":scope > .wp-block-themeisle-blocks-tabs-item__header");n.setAttribute("role","tab");const r=document.createElement("div");r.classList.add("wp-block-themeisle-blocks-tabs__header_item"),r.tabIndex=0;const b=n.cloneNode(!0);b.classList.remove("wp-block-themeisle-blocks-tabs-item__header"),r.appendChild(b),t?.id&&r.setAttribute("for",t.id),"true"!==t.dataset.defaultOpen||a?i.push({headerItem:r,content:d,headerMobile:n}):(r.classList.add("active"),d.classList.add("active"),n.classList.add("active"),a=!0);const h=(t,c)=>{const s=t.querySelector(":scope > .wp-block-themeisle-blocks-tabs-item__content"),a=t.querySelector(":scope > .wp-block-themeisle-blocks-tabs-item__header");s.classList.toggle("active",c===l),s.classList.toggle("hidden",c!==l),a.classList.toggle("active",c===l),a.setAttribute("aria-selected",c===l),Array.from(o.childNodes).forEach(((e,t)=>{e.classList.toggle("active",t===l),e.classList.toggle("hidden",t!==l),e.setAttribute("aria-selected",t===l)})),c===l&&a&&e(a)};r.addEventListener("click",(()=>s.forEach(h))),r.addEventListener("keyup",(e=>{"Enter"===e.code&&(e.preventDefault(),s.forEach(h))})),n.addEventListener("click",(()=>s.forEach(h))),n.addEventListener("keyup",(e=>{"Enter"===e.code&&(e.preventDefault(),s.forEach(h))})),o.appendChild(r),c&&t.id===c&&(h(t,l),a=!0,e(r))})),a||(i?.[0]?.headerItem.classList.add("active"),i?.[0]?.content.classList.add("active"),i?.[0]?.headerMobile.classList.add("active"))}))},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",t):t())}();