function productQuantity(e=document){e.querySelectorAll(".eab-quantity-input").forEach(e=>{e.addEventListener("change",()=>{const t=e.closest(".eab-product-cart-wrapper");if(!t)return;const n=t.querySelector(".eab-add-to-cart");if(!n)return;const s=parseInt(e.value,10)||1;n.dataset.quantity=s})})}document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelectorAll(".sp-eab-sidebar-tabs");e?.length>0&&e.forEach(e=>{const t=e.getAttribute("data-tab-settings");let n={};if(t&&t.trim())try{n=JSON.parse(t)}catch{n={}}new EabTabAccordion(e,n)})}),document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelectorAll(".sp-eab-regular-accordion,.sp-eab-post-accordion,.sp-eab-product-accordion");if(!e.length)return;e.forEach(e=>{const t=t=>e.querySelector(t),s=t=>e.querySelectorAll(t),n=()=>{const e=t(".sp-eab-accordion");if(!e)return null;let n={};const s=e.getAttribute("data-accordion-settings");if(s&&s.trim())try{n=JSON.parse(s)}catch{n={}}const o=new EabAccordion(e,n);return o};let o=n()})});const applyEffectClasses=(e,t)=>{const s=e.dataset.imageEffect,o=e.dataset.hoverGrayScale,i=e.querySelector(".sp-eab-accordion-bg,.sp-eab-featured-image-wrapper");if(!s||!i)return;e.classList.remove("eab-zoom-out-active","eab-zoom-out-normal","eab-zoom-out-onhover");const a=o&&!t;let n="";switch(s){case"zoomOut":a?n="eab-zoom-out-normal eab-zoom-out-onhover":t?n="eab-zoom-out-active":n="eab-zoom-out-normal";break;default:n=""}n&&n.split(" ").forEach(t=>e.classList.add(t))},getDeviceValuePx=(e,t="Desktop",n=!1)=>{if(!e||!e.device||!e.unit)return 0;const s=e.device[t],o=e.unit[t];return s===null?0:o==="%"&&n?`${s}%`:s};document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelectorAll(".sp-easy-accordion-block");if(e.length===0)return;e?.forEach(e=>{const t=e?.querySelector(".sp-eab-preloader");t&&setTimeout(()=>{t.classList.remove("sp-d-block"),t.classList.add("sp-d-hidden"),e.classList.add("sp-eab-preloader-removed")},500)})}),document.addEventListener("DOMContentLoaded",()=>{const e=Array.from(document.querySelectorAll(".sp-eab-image-accordion,.sp-eab-product-accordion"));e.forEach(e=>{const t=Array.from(e.querySelectorAll(".sp-eab-image-accordion-item"));if(!t.length)return;const h=e.dataset.defaultOpen||"first-item",r=e.dataset.activeEvent||"click",c=parseInt(e.dataset.selectedAccordion,10)-1,b=e.dataset.scrollToActiveItem,p=e.dataset.eabAccessibility,g=e.dataset.anchorLink,v=e.dataset.autoplayDelay,i=e.dataset.animation&&e.dataset.animation!=="none"?e.dataset.animation:null;let n=-1,O=null;const j=(e,t)=>{const n=e.querySelector(".eab-animation");n&&i&&i!=="none"&&(n.classList.remove("animated",i),t&&n.classList.add("animated",i))},m=()=>{if(!p)return;t.forEach((e,t)=>{const o=t===n,s=e.querySelector(".sp-eab-accordion-bg");e.setAttribute("role","region"),s&&(s.setAttribute("role","button"),s.setAttribute("tabindex","0"),s.setAttribute("aria-expanded",o?"true":"false"),s.setAttribute("aria-label",(e.querySelector(".sp-eab-image-title")?.textContent||"").replace(/\s+/g," ").trim()))})};let f=!1;const s=(s,o=!1)=>{t.forEach((t,n)=>{const o=n===s;e.classList.contains("sp-eab-accordion-slider")||e.classList.contains("sp-eab-carousel")||t.classList.toggle("active",o),applyEffectClasses(t,o),j(t,o)});const a=n;n=s,m();const i=t[s];if(i&&g){const e=i.getAttribute("data-slug");if(e&&f&&a!==s){const t=window.location.href.split("#")[0];history.replaceState(null,"",t+e)}}o&&b&&t[s]&&t[s].scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),f=!0};p&&t.forEach((e,o)=>{const i=e.querySelector(".sp-eab-accordion-bg");if(!i)return;i.addEventListener("keydown",e=>{switch(e.key){case"ArrowRight":case"ArrowDown":s((n+1)%t.length,!0),t[n%t.length].querySelector(".sp-eab-accordion-bg")?.focus(),e.preventDefault();break;case"ArrowLeft":case"ArrowUp":s((n-1+t.length)%t.length,!0),t[n%t.length].querySelector(".sp-eab-accordion-bg")?.focus(),e.preventDefault();break;case"Enter":case" ":s(o,!0),e.preventDefault();break}})});let d=!1;const u=window.location.hash;if(u&&g){const e=t.findIndex(e=>e.getAttribute("data-slug")===u);e>=0&&(d=!0,n=e,setTimeout(()=>{s(e,!0)},50))}if(!d){switch(h){case"first-item":n=0;break;case"close-all":n=-1;break;case"open-selected-item":n=c>=0&&c=0&&setTimeout(()=>s(n,!0),300)}let l=null,o=!1;const a=()=>{if(clearInterval(l),t.length<=1||o)return;l=setInterval(()=>{const e=(n+1)%t.length;s(e,!0)},v)},y=()=>{o=!0,clearInterval(l)},_=()=>{if(!o)return;o=!1,a()};r==="auto"&&(a(),e.addEventListener("mouseenter",y),e.addEventListener("mouseleave",_));const w=r==="hover"?"mouseenter":"click";t.forEach((t,o)=>{t.addEventListener(w,()=>{h==="close-all"&&n===o?(e.classList.contains("sp-eab-accordion-slider")||e.classList.contains("sp-eab-carousel")||t.classList.remove("active"),applyEffectClasses(t,!1),n=-1,m()):s(o,!0),r==="auto"&&a()})})}),productQuantity()});const animateAccordionItemsOnView=(e,t="none")=>{if(!t||t.toLowerCase()==="none")return;if(!("IntersectionObserver"in window)){e.forEach(e=>{e.classList.add("animated",t)});return}const n=new IntersectionObserver((e,n)=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("animated",t),n.unobserve(e.target))})},{threshold:.2});e.forEach(e=>n.observe(e))};document.addEventListener("DOMContentLoaded",()=>{if(window?.elementorFrontend?.isEditMode())return;const e=()=>{const e=window.innerWidth;return e<=600?"mobile":"tablet-or-desktop"};let t=e();window.addEventListener("resize",()=>{const n=e();n!==t&&location.reload(),t=n})})