function f(h={}){let e,l=[];const r=["select","slideFocus"];function a(t){e=t;const{options:{axis:n},slideRects:i}=e.internalEngine();n!=="y"&&(l=i.map(o=>o.height),r.forEach(o=>e.on(o,s)),s())}function u(){r.forEach(n=>e.off(n,s));const t=e.containerNode();t.style.height="",t.getAttribute("style")||t.removeAttribute("style")}function c(){const{slideRegistry:t}=e.internalEngine(),n=t[e.selectedScrollSnap()];return n?n.map(i=>l[i]).reduce((i,o)=>Math.max(i,o),0):null}function s(){c()!==null&&(e.containerNode().style.height=`${c()}px`)}return{name:"autoHeight",options:h,init:a,destroy:u}}f.globalOptions=void 0;export{f as default};
//# sourceMappingURL=embla-carousel-auto-height.esm-Ddyvc1_j.js.map
