((t,e,a)=>{"use strict";let n=!1,l=!0;const i=ThemifyBuilderModuleJs.cssUrl+"tab_styles/",r=()=>{const t=a.location.hash.replace("#","");""!==t&&"#"!==t&&e.querySelector('.module-tab a[href="#'+CSS.escape(t)+'"]')?.click()},s=a=>{for(let n=e.querySelectorAll(".module-tab[data-tab-breakpoint]"),l=n.length-1;l>-1;--l){let e=n[l];if(~~e.dataset.tabBreakpoint>=a)t.loadCss(i+"responsive").then((()=>{e.classList.add("responsive-tab-style")}));else{e.classList.remove("responsive-tab-style");for(let t=e.tfClass("tab-nav"),a=t.length-1;a>-1;--a)t[a].classList.remove("right-align","center-align")}}},c=e=>{let a,n=!!e.dataset.timerbar,i=!!e.dataset.disablepause,r=e.tfClass("tab-nav")[0].tfClass("tb_tab_timerbar"),s=()=>{let t=e.isConnected?e.querySelector("li.current"):null,a=t?t.nextElementSibling||e.querySelector(".tab-nav li:first-child"):null;a?(l=!1,a.firstElementChild.click(),l=!0,n&&(o(),c(a))):v()},c=t=>{const a=t.tfClass("tb_tab_timerbar")[0];a.style.width="100%",a.style.transitionDuration=e.dataset.autoplay+"s"},o=()=>{for(var t=0;t<r.length;t++)r[t].style.transitionDuration="0s",r[t].style.width=0},b=()=>{const t=e;a=setInterval(s,1e3*t.dataset.autoplay),n&&c(e.querySelector("li.current")),i||t.tfOn("pointerenter",d,{passive:!0,once:!0})},d=t=>{n&&o(),clearInterval(a),i||t.currentTarget.tfOn("pointerleave",b,{passive:!0,once:!0})},u=t=>{t.closest(".module-tab")===e&&l&&(e.dataset.autoplayStopOnClick?v():i&&(d(),b()))},v=()=>{clearInterval(a),e.tfOff("pointerenter",d,{passive:!0,once:!0}).tfOff("pointerleave",b,{passive:!0,once:!0}),t.off("tb_tabs_switch",u),n&&o(),e=s=b=d=u=v=a=null};b({currentTarget:e}),t.on("tb_tabs_switch",u)};t.on("tfsmartresize",(t=>{t&&s(t.w)})).on("builder_load_module_partial",((o,b)=>{if(!0!==b||o.classList.contains("module-tab")){for(let e=t.selectWithParent("module-tab",o),a=e.length-1;a>-1;--a){let n=e[a].classList,l="";n.contains("transparent")&&t.loadCss(i+"transparent","tb_tab_transparent"),n.contains("minimal")?l="minimal":n.contains("panel")?l="panel":n.contains("vertical")&&(l="vertical"),""!==l&&t.loadCss(i+l,"tb_tab_"+l),e[a].dataset.autoplay&&c(e[a]),e[a].dataset.fx&&t.wow()}!1===n&&(n=!0,a.tfOn("hashchange",r,{passive:!0}),t.requestIdleCallback((()=>{(()=>{s(t.w),e.body.tfOn("click",(e=>{const n=e.target?.closest(".tab-nav a,.tab-nav-current-active");if(n){e.preventDefault(),e.stopPropagation();const i=t=>{const e=t.classList;if(e.contains("clicked"))e.remove("clicked");else{const a=t.getBoundingClientRect().left-parseInt(getComputedStyle(t).marginLeft,10),n=t.closest(".module-tab").getBoundingClientRect().width,l=t.nextElementSibling.classList;l.toggle("center-align",a>0&&a<=n),l.toggle("right-align",a>n),e.add("clicked")}},r=n.closest(".module-tab").dataset.fx;if(n.classList.contains("tab-nav-current-active"))i(n);else{const e=n.parentNode,s=n.getAttribute("href").replace("#",""),c=e.closest(".module-tab"),o=c.tfClass("tab-nav")[0].tfTag("li"),b=c.tfClass("tab-nav-current-active")[0],d=c.querySelector(':scope > .tab-content[aria-hidden="false"]'),u=c.querySelector(':scope > .tab-content[data-id="'+s+'"]'),v=t=>{t.setAttribute("aria-hidden",!("true"===t.getAttribute("aria-hidden")))};for(let t=o.length-1;t>-1;--t){let a=o[t]===e?"true":"false";o[t].classList.toggle("current","true"===a),o[t].setAttribute("aria-expanded",a)}r?(d.style.animationName=r.replace("In","Out"),d.tfOn("animationend",(()=>{v(d),u.style.animationName=r,v(u)}),{once:!0,passive:!0})):(v(d),v(u)),!0===c.hasAttribute("data-hashtag")&&a.history.pushState(null,null,"#"+s),b.tfClass("tb_activetab_title")[0].replaceChildren(...n.cloneNode(!0).children),l&&i(b),t.trigger("tb_tabs_switch",[u,n,s])}}}))})(),r()}),-1,500))}}))})(Themify,document,window);