(window.blocksyJsonP=window.blocksyJsonP||[]).push([[4],{20:function(e,t,n){var o,r,i;r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1);var i=function(e){r?Object(o.clearAllBodyScrollLocks)():(document.body.style.overflow="",document.body.style.removeProperty("--scrollbar-width"))},c=n(0),a=n.n(c);const l=e=>{if(!e)return;const t=e.querySelector(".ct-toggle-dropdown-mobile");e.classList.contains("dropdown-active")?(t.setAttribute("aria-expanded","false"),t.setAttribute("aria-label",ct_localizations.expand_submenu),((e,t)=>{const n=e.querySelector("ul");requestAnimationFrame(()=>{const e=n.getBoundingClientRect().height;n.style.height=e+"px",n.classList.add("is-animating"),requestAnimationFrame(()=>{n.style.height="0px",u(n,()=>{n.classList.remove("is-animating"),n.removeAttribute("style"),t()})})})})(e,()=>{e.classList.toggle("dropdown-active"),[...e.querySelectorAll(".menu-item-has-children.dropdown-active, .page_item_has_children.dropdown-active")].map(e=>e.classList.remove("dropdown-active"))})):(t.setAttribute("aria-expanded","true"),t.setAttribute("aria-label",ct_localizations.collapse_submenu),[...e.parentNode.children].map(e=>e.classList.contains("dropdown-active")&&l(e)),e.classList.toggle("dropdown-active"),(e=>{const t=e.querySelector("ul");requestAnimationFrame(()=>{const e=t.getBoundingClientRect().height;t.style.height="0px",t.classList.add("is-animating"),requestAnimationFrame(()=>{t.style.height=e+"px",u(t,()=>{t.classList.remove("is-animating"),t.removeAttribute("style")})})})})(e))};function u(e,t){const n=o=>{o.target===e&&(e.removeEventListener("transitionend",n),t())};e.addEventListener("transitionend",n)}var d=function(e){for(var t=Array(e.length),n=0;n=0})).sort(h)},b=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],w=b.join(","),S=w+", [data-focus-guard]",E=function(e,t){return e.reduce((function(e,n){return e.concat(d(n.querySelectorAll(t?S:w)),n.parentNode?d(n.parentNode.querySelectorAll(b.join(","))).filter((function(e){return e===n})):[])}),[])},L=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.push(t),t.parentNode&&e(t.parentNode,n),n},k=function(e,t){for(var n=L(e),o=L(t),r=0;r=0)return i}return!1},A=function(e){return d(e).filter((function(e){return function e(t){return!t||t===document||t.nodeType===Node.DOCUMENT_NODE||!((n=window.getComputedStyle(t,null))&&n.getPropertyValue&&("none"===n.getPropertyValue("display")||"hidden"===n.getPropertyValue("visibility")))&&e(t.parentNode);var n}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},O=function(e,t){return y(A(E(e,t)),!0,t)},x=function(e){return A((t=e.querySelectorAll("[data-autofocus-inside]"),d(t).map((function(e){return E([e])})).reduce((function(e,t){return e.concat(t)}),[])));var t},q=function(e){return"INPUT"===e.tagName&&"radio"===e.type},C=function(e,t){return t.filter(q).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e},P=function(e,t){return e.length>1&&q(e[t])&&e[t].name?e.indexOf(C(e[t],e)):t},T=function(e){return e[0]&&e.length>1&&q(e[0])&&e[0].name?C(e[0],e):e[0]},j=function(e){return e&&e.dataset&&e.dataset.focusGuard},I=function(e){return!j(e)},N=function(e,t,n){var o=s(e),r=s(t),i=o[0],c=null;return r.filter(Boolean).forEach((function(e){c=k(c||e,e)||c,n.filter(Boolean).forEach((function(e){var t=k(i,e);t&&(c=!c||t.contains(c)?t:k(t,c))}))})),c},B=function(e,t){var n=document&&document.activeElement,o=v(e).filter(I),r=N(n||e,e,o),i=O(o).filter((function(e){var t=e.node;return I(t)}));if(i[0]||(i=(c=o,y(A(E(c)),!1)).filter((function(e){var t=e.node;return I(t)})))[0]){var c,a,l,u,d,s=O([r]).map((function(e){return e.node})),f=(a=s,l=i,u=new Map,l.forEach((function(e){return u.set(e.node,e)})),a.map((function(e){return u.get(e)})).filter(Boolean)),m=f.map((function(e){return e.node})),p=function(e,t,n,o,r){var i=e.length,c=e[0],a=e[i-1],l=j(n);if(!(e.indexOf(n)>=0)){var u=t.indexOf(n),d=t.indexOf(o||u),s=e.indexOf(o),f=u-d,m=t.indexOf(c),v=t.indexOf(a),p=P(e,0),g=P(e,i-1);return-1===u||-1===s?e.indexOf(r&&r.length?T(r):T(e)):!f&&s>=0?s:u<=m&&l&&Math.abs(f)>1?g:u>=m&&l&&Math.abs(f)>1?p:f&&Math.abs(f)>1?s:u<=m?g:u>v?p:f?Math.abs(f)>1?s:(i+s+f)%i:void 0}}(m,s,n,t,m.filter((d=function(e){return e.reduce((function(e,t){return e.concat(x(t))}),[])}(o),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||d.indexOf(e)>=0})));return void 0===p?p:f[p]}},F=0,D=!1,M=function(e,t){var n,o=B(e,t);if(!D&&o){if(F>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),D=!0,void setTimeout((function(){D=!1}),1);F++,(n=o.node).focus(),n.contentWindow&&n.contentWindow.focus(),F--}},_=0,W=null,R=function(){return document&&document.activeElement===document.body||f()},G=function(e){_=e,e&&function(){var e=!1;if(_){var t=_;R()||(t&&!g(t)&&(e=M(t,W)),W=document.activeElement)}}()},U=[],$=function(e){return!!G((t=U,t.filter((function(e){return e})).slice(-1)[0]))&&(e&&e.preventDefault(),!0);var t},V={on:function(e){0===U.length&&document.addEventListener("focusin",$),U.indexOf(e)<0&&(U.push(e),$())},off:function(e){U=U.filter((function(t){return t!==e})),$(),0===U.length&&document.removeEventListener("focusin",$)}};n(5);const z=e=>{let t=V;window.ctFrontend&&window.ctFrontend.focusLock?t=ctFrontend.focusLock:(window.ctFrontend=window.ctFrontend||{},window.ctFrontend.focusLock=t),t.off(e)};function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function J(e){for(var t=1;t{e=J({onClose:()=>{},container:null,focus:!0},e),[...document.querySelectorAll(`[data-toggle-panel*="${e.container.id}"]`),...document.querySelectorAll(`[href*="${e.container.id}"]`)].map(e=>{e.setAttribute("aria-expanded","true")}),e.focus&&setTimeout(()=>{e.container.querySelector("input")&&e.container.querySelector("input").focus()},200),e.container.querySelector(".ct-panel-content")&&e.container.querySelector(".ct-panel-content").addEventListener("click",t=>{Array.from(e.container.querySelectorAll("select")).map(e=>e.selectr&&e.selectr.events.dismiss(t))}),e.clickOutside&&e.container.querySelector(".ct-panel-content")&&e.container.addEventListener("click",e.handleContainerClick);const t=n=>{const{keyCode:o,target:r}=n;27===o&&(n.preventDefault(),document.body.hasAttribute("data-panel")&&Q(e),document.removeEventListener("keyup",t))};document.addEventListener("keyup",t);let n=e.container&&e.container.querySelector(".ct-toggle-close");n&&(n.addEventListener("click",t=>{t.preventDefault(),Q(e)},{once:!0}),n.hasEnterListener||(n.hasEnterListener=!0,n.addEventListener("keyup",t=>{13==t.keyCode&&(t.preventDefault(),Q(e))}))),(e.computeScrollContainer||e.container.querySelector(".ct-panel-content"))&&(!function(e){if(r)e&&Object(o.disableBodyScroll)(e,{allowTouchMove:e=>!!e.closest(".select2-container")});else{let e=window.innerWidth-document.documentElement.clientWidth;e>0&&document.body.style.setProperty("--scrollbar-width",e+"px"),document.body.style.overflow="hidden"}}(e.computeScrollContainer?e.computeScrollContainer():e.container.querySelector(".ct-panel-content")),setTimeout(()=>{(e=>{let t=V;window.ctFrontend&&window.ctFrontend.focusLock?t=ctFrontend.focusLock:(window.ctFrontend=window.ctFrontend||{},window.ctFrontend.focusLock=t),t.on(e)})(e.container.querySelector(".ct-panel-content").parentNode)})),window.addEventListener("click",e.handleWindowClick,{capture:!0}),a.a.trigger("ct:modal:opened",e.container),[...e.container.querySelectorAll(".ct-toggle-dropdown-mobile")].map(e=>{(e=>{if(e.hasListener)return;e.hasListener=!0;let t=e.previousElementSibling.getAttribute("href");t&&"#"!==t||e.previousElementSibling.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),l(e.closest(".menu-item-has-children, .page_item_has_children"))}),e.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),l(e.closest(".menu-item-has-children, .page_item_has_children"))})})(e)})},Q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e=J({onClose:()=>{},container:null},e),t=J({closeInstant:!1},t),!document.body.hasAttribute("data-panel"))return e.container.classList.remove("active"),void e.onClose();[...document.querySelectorAll(`[data-toggle-panel*="${e.container.id}"]`),...document.querySelectorAll(`[href*="${e.container.id}"]`)].map(e=>{e.setAttribute("aria-expanded","false")}),e.container.classList.remove("active"),t.closeInstant?(document.body.removeAttribute("data-panel"),a.a.trigger("ct:modal:closed",e.container),i(e.computeScrollContainer?e.computeScrollContainer():e.container.querySelector(".ct-panel-content"))):(document.body.dataset.panel="out",e.container.addEventListener("transitionend",()=>{setTimeout(()=>{document.body.removeAttribute("data-panel"),a.a.trigger("ct:modal:closed",e.container),i(e.computeScrollContainer?e.computeScrollContainer():e.container.querySelector(".ct-panel-content")),z(e.container.querySelector(".ct-panel-content").parentNode)},300)},{once:!0})),window.removeEventListener("click",e.handleWindowClick,{capture:!0}),e.container.removeEventListener("click",e.handleContainerClick),e.onClose()},X=(e,t)=>{e&&e.preventDefault&&e.preventDefault(),t=J({onClose:()=>{},container:null,focus:!1,clickOutside:!0,isModal:!1,computeScrollContainer:null,closeWhenLinkInside:!1,handleContainerClick:e=>{let n=e.target.closest(".ct-panel-content"),o=[...t.container.querySelectorAll(".ct-panel-content")].indexOf(e.target)>-1;t.isModal&&!o&&n||!t.isModal&&(o||n)||e.target.closest('[class*="select2-container"]')||window.getSelection().toString().length>0||document.body.hasAttribute("data-panel")&&Q(t)},handleWindowClick:e=>{t.container.contains(e.target)||e.target===document.body||event.target.closest('[class*="select2-container"]')||document.body.hasAttribute("data-panel")&&Q(t)}},t),K(t),t.closeWhenLinkInside&&(t.container.hasListener||(t.container.hasListener=!0,t.container.addEventListener("click",e=>{if(!e.target)return;let n=e.target;e.target.closest("a")&&(n=e.target.closest("a")),n.closest(".ct-panel").classList.contains("active")&&n.matches("a")&&(n.closest('nav[data-id*="menu"]')||n.closest('[data-id*="text"]')||n.matches(".ct-offcanvas-trigger")||n.matches(".ct-header-account"))&&(Q(t,{closeInstant:"#"!==n.getAttribute("href")[0]}),setTimeout(()=>{(n.matches(".ct-offcanvas-trigger")||n.matches(".ct-header-account"))&&n.click()},500))})))};a.a.on("ct:offcanvas:force-close",e=>Q(e));const Z=(e,t)=>{let{event:n,focus:o=!1}=t;X(n,{isModal:!0,container:document.querySelector(e.dataset.togglePanel||e.hash),clickOutside:!0,focus:o})}}}]);