(()=>{"use strict";const e={n:t=>{const s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{if(Array.isArray(s))for(var i=0;i<s.length;){var r=s[i++],a=s[i++];e.o(t,r)?0===a&&i++:0===a?Object.defineProperty(t,r,{enumerable:!0,value:s[i++]}):Object.defineProperty(t,r,{enumerable:!0,get:a})}else for(var r in s)e.o(s,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:s[r]})},o:(e,t)=>Object.hasOwn(e,t)},t=window.wp.domReady;e.n(t)()(()=>{document.querySelectorAll(".wp-block-gutenkit-offcanvas").forEach(e=>{const t=e.querySelectorAll(".gkit_offcanvas-sidebar"),s=e.querySelectorAll(".gkit_close-side-widget"),i=e.querySelector(".gkit-sidebar-group"),r=e.querySelectorAll(".gkit-overlay"),a=e.querySelector(".gkit-disabled"),c=e.querySelector(".gkit-sidebar-widget"),o=e.querySelector(".gkit-sidebar-group"),l=document.querySelector("body"),n=e.getAttribute("data-wrapper"),d=e.getAttribute("data-settings"),g=JSON.parse(d).size,u=c.classList[1],k=o.classList[2],v=e=>{"Escape"!==e.key&&"Esc"!==e.key||y()},y=()=>{i.classList.remove("gkit_isActive"),l.classList.remove("gkit-offcanvas-container",u,k),setTimeout(()=>{l.classList.remove(`gkit-container-${n}`)},1e3*g),l.classList.remove("gkit-disable-scroll"),document.removeEventListener("keydown",v),t.forEach(e=>e.classList.remove("is-selected"))};t.forEach(e=>{e.addEventListener("click",()=>{i.classList.contains("gkit_isActive")?y():(i.classList.add("gkit_isActive"),l.classList.add("gkit-offcanvas-container","gkit-container_isActive",u,k,`gkit-container-${n}`),a&&l.classList.add("gkit-disable-scroll"),document.addEventListener("keydown",v),e.classList.add("is-selected"))})}),s.forEach(e=>{e.addEventListener("click",y)}),r.forEach(e=>{e.addEventListener("click",y)})})})})();