1(function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).EmblaCarousel=t()})(this,function(){"use strict";function n(n2){return typeof n2=="number"}function t(n2){return typeof n2=="string"}function e(n2){return typeof n2=="boolean"}function r(n2){return Object.prototype.toString.call(n2)==="[object Object]"}function o(n2){return Math.abs(n2)}function i(n2){return Math.sign(n2)}function c(n2,t2){return o(n2-t2)}function u(n2){return f(n2).map(Number)}function s(n2){return n2[a(n2)]}function a(n2){return Math.max(0,n2.length-1)}function d(n2,t2){return t2===a(n2)}function l(n2,t2=0){return Array.from(Array(n2),(n3,e2)=>t2+e2)}function f(n2){return Object.keys(n2)}function p(n2,t2){return[n2,t2].reduce((n3,t3)=>(f(t3).forEach(e2=>{const o2=n3[e2],i2=t3[e2],c2=r(o2)&&r(i2);n3[e2]=c2?p(o2,i2):i2}),n3),{})}function m(n2,t2){return t2.MouseEvent!==void 0&&n2 instanceof t2.MouseEvent}function g(){let n2=[];const t2={add:function(e2,r2,o2,i2={passive:!0}){let c2;if("addEventListener"in e2)e2.addEventListener(r2,o2,i2),c2=()=>e2.removeEventListener(r2,o2,i2);else{const n3=e2;n3.addListener(o2),c2=()=>n3.removeListener(o2)}return n2.push(c2),t2},clear:function(){n2=n2.filter(n3=>n3())}};return t2}function h(n2,t2,e2,r2){const o2=g(),i2=1e3/60;let c2=null,u2=0,s2=0;function a2(n3){if(!s2)return;c2||(c2=n3,e2(),e2());const o3=n3-c2;for(c2=n3,u2+=o3;u2>=i2;)e2(),u2-=i2;r2(u2/i2),s2&&(s2=t2.requestAnimationFrame(a2))}function d2(){t2.cancelAnimationFrame(s2),c2=null,u2=0,s2=0}return{init:function(){o2.add(n2,"visibilitychange",()=>{n2.hidden&&(c2=null,u2=0)})},destroy:function(){d2(),o2.clear()},start:function(){s2||(s2=t2.requestAnimationFrame(a2))},stop:d2,update:e2,render:r2}}function x(n2=0,t2=0){const e2=o(n2-t2);function r2(t3){return t3<n2}function i2(n3){return n3>t2}function c2(n3){return r2(n3)||i2(n3)}return{length:e2,max:t2,min:n2,constrain:function(e3){return c2(e3)?r2(e3)?n2:t2:e3},reachedAny:c2,reachedMax:i2,reachedMin:r2,removeOffset:function(n3){return e2?n3-e2*Math.ceil((n3-t2)/e2):n3}}}function y(n2,t2,e2){const{constrain:r2}=x(0,n2),i2=n2+1;let c2=u2(t2);function u2(n3){return e2?o((i2+n3)%i2):r2(n3)}function s2(){return c2}function a2(){return y(n2,s2(),e2)}const d2={get:s2,set:function(n3){return c2=u2(n3),d2},add:function(n3){return a2().set(s2()+n3)},clone:a2};return d2}function v(n2,t2,r2,u2,s2,a2,d2,l2,f2,p2,h2,y2,v2,b2,S2,w2,E2,L2,D2){const{cross:I2,direction:M2}=n2,A2=["INPUT","SELECT","TEXTAREA"],F2={passive:!1},T2=g(),O2=g(),P2=x(50,225).constrain(b2.measure(20)),z2={mouse:300,touch:400},H2={mouse:500,touch:600},k2=S2?43:25;let V=!1,B=0,C=0,N=!1,R=!1,j=!1,G=!1;function q(n3){if(!m(n3,u2)&&n3.touches.length>=2)return U(n3);const t3=a2.readPoint(n3),e2=a2.readPoint(n3,I2),r3=c(t3,B),o2=c(e2,C);if(!R&&!G&&(!n3.cancelable||(R=r3>o2,!R)))return U(n3);const i2=a2.pointerMove(n3);r3>w2&&(j=!0),p2.useFriction(.3).useDuration(.75),l2.start(),s2.add(M2(i2)),n3.preventDefault()}function U(n3){const t3=h2.byDistance(0,!1).index!==y2.get(),e2=a2.pointerUp(n3)*(S2?H2:z2)[G?"mouse":"touch"],r3=(function(n4,t4){const e3=y2.add(-1*i(n4)),r4=h2.byDistance(n4,!S2).distance;return S2||o(n4)<P2?r4:E2&&t4?.5*r4:h2.byIndex(e3.get(),0).distance})(M2(e2),t3),u3=(function(n4,t4){if(n4===0||t4===0||o(n4)<=o(t4))return 0;const e3=c(o(n4),o(t4));return o(e3/n4)})(e2,r3),s3=k2-10*u3,d3=L2+u3/50;R=!1,N=!1,O2.clear(),p2.useDuration(s3).useFriction(d3),f2.distance(r3,!S2),G=!1,v2.emit("pointerUp")}function W(n3){j&&(n3.stopPropagation(),n3.preventDefault(),j=!1)}return{init:function(n3){if(!D2)return;function o2(o3){(e(D2)||D2(n3,o3))&&(function(n4){const e2=m(n4,u2);G=e2,j=S2&&e2&&!n4.buttons&&V,V=c(s2.get(),d2.get())>=2,!(e2&&n4.button!==0)&&((function(n5){const t3=n5.nodeName||"";return A2.includes(t3)})(n4.target)||(N=!0,a2.pointerDown(n4),p2.useFriction(0).useDuration(0),s2.set(d2),(function(){const n5=G?r2:t2;O2.add(n5,"touchmove",q,F2).add(n5,"touchend",U).add(n5,"mousemove",q,F2).add(n5,"mouseup",U)})(),B=a2.readPoint(n4),C=a2.readPoint(n4,I2),v2.emit("pointerDown")))})(o3)}const i2=t2;T2.add(i2,"dragstart",n4=>n4.preventDefault(),F2).add(i2,"touchmove",()=>{},F2).add(i2,"touchend",()=>{}).add(i2,"touchstart",o2).add(i2,"mousedown",o2).add(i2,"touchcancel",U).add(i2,"contextmenu",U).add(i2,"click",W,!0)},destroy:function(){T2.clear(),O2.clear()},pointerDown:function(){return N}}}function b(n2,t2){let e2,r2;function i2(n3){return n3.timeStamp}function c2(e3,r3){const o2="client"+((r3||n2.scroll)==="x"?"X":"Y");return(m(e3,t2)?e3:e3.touches[0])[o2]}return{pointerDown:function(n3){return e2=n3,r2=n3,c2(n3)},pointerMove:function(n3){const t3=c2(n3)-c2(r2),o2=i2(n3)-i2(e2)>170;return r2=n3,o2&&(e2=n3),t3},pointerUp:function(n3){if(!e2||!r2)return 0;const t3=c2(r2)-c2(e2),u2=i2(n3)-i2(e2),s2=i2(n3)-i2(r2)>170,a2=t3/u2;return u2&&!s2&&o(a2)>.1?a2:0},readPoint:c2}}function S(n2,t2,r2,i2,c2,u2,s2){const a2=[n2].concat(i2);let d2,l2,f2=[],p2=!1;function m2(n3){return c2.measureSize(s2.measure(n3))}return{init:function(c3){u2&&(l2=m2(n2),f2=i2.map(m2),d2=new ResizeObserver(r3=>{(e(u2)||u2(c3,r3))&&(function(e2){for(const r4 of e2){if(p2)return;const e3=r4.target===n2,u3=i2.indexOf(r4.target),s3=e3?l2:f2[u3];if(o(m2(e3?n2:i2[u3])-s3)>=.5){c3.reInit(),t2.emit("resize");break}}})(r3)}),r2.requestAnimationFrame(()=>{a2.forEach(n3=>d2.observe(n3))}))},destroy:function(){p2=!0,d2&&d2.disconnect()}}}function w(n2,t2,e2,r2,i2){const c2=i2.measure(10),u2=i2.measure(50),s2=x(.1,.99);let a2=!1;function d2(){return!a2&&!!n2.reachedAny(e2.get())&&!!n2.reachedAny(t2.get())}return{shouldConstrain:d2,constrain:function(i3){if(!d2())return;const a3=n2.reachedMin(t2.get())?"min":"max",l2=o(n2[a3]-t2.get()),f2=e2.get()-t2.get(),p2=s2.constrain(l2/u2);e2.subtract(f2*p2),!i3&&o(f2)<c2&&(e2.set(n2.constrain(e2.get())),r2.useDuration(25).useBaseFriction())},toggleActive:function(n3){a2=!n3}}}function E(n2,t2,e2,r2){const o2=t2.min+.1,i2=t2.max+.1,{reachedMin:c2,reachedMax:u2}=x(o2,i2);return{loop:function(t3){if(!(function(n3){return n3===1?u2(e2.get()):n3===-1&&c2(e2.get())})(t3))return;const o3=n2*(-1*t3);r2.forEach(n3=>n3.add(o3))}}}function L(n2,t2,e2,r2,c2){const{reachedAny:u2,removeOffset:a2,constrain:d2}=r2;function l2(n3){return n3.concat().sort((n4,t3)=>o(n4)-o(t3))[0]}function f2(t3,r3){const o2=[t3,t3+e2,t3-e2];if(!n2)return t3;if(!r3)return l2(o2);const c3=o2.filter(n3=>i(n3)===r3);return c3.length?l2(c3):s(o2)-e2}return{byDistance:function(e3,r3){const i2=c2.get()+e3,{index:s2,distance:l3}=(function(e4){const r4=n2?a2(e4):d2(e4),i3=t2.map((n3,t3)=>({diff:f2(n3-r4,0),index:t3})).sort((n3,t3)=>o(n3.diff)-o(t3.diff)),{index:c3}=i3[0];return{index:c3,distance:r4}})(i2),p2=!n2&&u2(i2);return!r3||p2?{index:s2,distance:e3}:{index:s2,distance:e3+f2(t2[s2]-l3,0)}},byIndex:function(n3,e3){return{index:n3,distance:f2(t2[n3]-c2.get(),e3)}},shortcut:f2}}function D(t2,r2,o2,i2,c2,u2,s2,a2){const d2={passive:!0,capture:!0};let l2=0;function f2(n2){n2.code==="Tab"&&(l2=new Date().getTime())}return{init:function(p2){a2&&(u2.add(document,"keydown",f2,!1),r2.forEach((r3,f3)=>{u2.add(r3,"focus",r4=>{(e(a2)||a2(p2,r4))&&(function(e2){if(new Date().getTime()-l2>10)return;s2.emit("slideFocusStart"),t2.scrollLeft=0;const r5=o2.findIndex(n2=>n2.includes(e2));n(r5)&&(c2.useDuration(0),i2.index(r5,0),s2.emit("slideFocus"))})(f3)},d2)}))}}}function I(t2){let e2=t2;function r2(t3){return n(t3)?t3:t3.get()}return{get:function(){return e2},set:function(n2){e2=r2(n2)},add:function(n2){e2+=r2(n2)},subtract:function(n2){e2-=r2(n2)}}}function M(n2,t2){const e2=n2.scroll==="x"?function(n3){return`translate3d(${n3}px,0px,0px)`}:function(n3){return`translate3d(0px,${n3}px,0px)`},r2=t2.style;let o2=null,i2=!1;return{clear:function(){i2||(r2.transform="",t2.getAttribute("style")||t2.removeAttribute("style"))},to:function(t3){if(i2)return;const c2=(u2=n2.direction(t3),Math.round(100*u2)/100);var u2;c2!==o2&&(r2.transform=e2(c2),o2=c2)},toggleActive:function(n3){i2=!n3}}}function A(n2,t2,e2,r2,o2,i2,c2,s2,a2){const l2=u(o2),f2=u(o2).reverse(),p2=(function(){const n3=c2[0];return h2(g2(f2,n3),e2,!1)})().concat((function(){const n3=t2-c2[0]-1;return h2(g2(l2,n3),-e2,!0)})());function m2(n3,t3){return n3.reduce((n4,t4)=>n4-o2[t4],t3)}function g2(n3,t3){return n3.reduce((n4,e3)=>m2(n4,t3)>0?n4.concat([e3]):n4,[])}function h2(o3,c3,u2){const l3=(function(n3){return i2.map((e3,o4)=>({start:e3-r2[o4]+.5+n3,end:e3+t2-.5+n3}))})(c3);return o3.map(t3=>{const r3=u2?0:-e2,o4=u2?e2:0,i3=u2?"end":"start",c4=l3[t3][i3];return{index:t3,loopPoint:c4,slideLocation:I(-1),translate:M(n2,a2[t3]),target:()=>s2.get()>c4?r3:o4}})}return{canLoop:function(){return p2.every(({index:n3})=>m2(l2.filter(t3=>t3!==n3),t2)<=.1)},clear:function(){p2.forEach(n3=>n3.translate.clear())},loop:function(){p2.forEach(n3=>{const{target:t3,translate:e3,slideLocation:r3}=n3,o3=t3();o3!==r3.get()&&(e3.to(o3),r3.set(o3))})},loopPoints:p2}}function F(n2,t2,r2){let o2,i2=!1;return{init:function(c2){r2&&(o2=new MutationObserver(n3=>{i2||(e(r2)||r2(c2,n3))&&(function(n4){for(const e2 of n4)if(e2.type==="childList"){c2.reInit(),t2.emit("slidesChanged");break}})(n3)}),o2.observe(n2,{childList:!0}))},destroy:function(){o2&&o2.disconnect(),i2=!0}}}function T(n2,t2,e2,r2){const o2={};let i2,c2=null,u2=null,s2=!1;return{init:function(){i2=new IntersectionObserver(n3=>{s2||(n3.forEach(n4=>{const e3=t2.indexOf(n4.target);o2[e3]=n4}),c2=null,u2=null,e2.emit("slidesInView"))},{root:n2.parentElement,threshold:r2}),t2.forEach(n3=>i2.observe(n3))},destroy:function(){i2&&i2.disconnect(),s2=!0},get:function(n3=!0){if(n3&&c2)return c2;if(!n3&&u2)return u2;const t3=(function(n4){return f(o2).reduce((t4,e3)=>{const r3=parseInt(e3),{isIntersecting:i3}=o2[r3];return(n4&&i3||!n4&&!i3)&&t4.push(r3),t4},[])})(n3);return n3&&(c2=t3),n3||(u2=t3),t3}}}function O(t2,e2,r2,i2,c2,d2,l2,f2,p2){const{startEdge:m2,endEdge:g2,direction:h2}=t2,x2=n(r2);return{groupSlides:function(n2){return x2?(function(n3,t3){return u(n3).filter(n4=>n4%t3==0).map(e3=>n3.slice(e3,e3+t3))})(n2,r2):(function(n3){return n3.length?u(n3).reduce((t3,r3,u2)=>{const x3=s(t3)||0,y2=x3===0,v2=r3===a(n3),b2=c2[m2]-d2[x3][m2],S2=c2[m2]-d2[r3][g2],w2=!i2&&y2?h2(l2):0,E2=o(S2-(!i2&&v2?h2(f2):0)-(b2+w2));return u2&&E2>e2+p2&&t3.push(r3),v2&&t3.push(n3.length),t3},[]).map((t3,e3,r3)=>{const o2=Math.max(r3[e3-1]||0);return n3.slice(o2,t3)}):[]})(n2)}}}function P(n2,e2,r2,f2,p2,m2,P2){const{align:z2,axis:H2,direction:k2,startIndex:V,loop:B,duration:C,dragFree:N,dragThreshold:R,inViewThreshold:j,slidesToScroll:G,skipSnaps:q,containScroll:U,watchResize:W,watchSlides:$,watchDrag:Q,watchFocus:X}=m2,Y={measure:function(n3){const{offsetTop:t2,offsetLeft:e3,offsetWidth:r3,offsetHeight:o2}=n3;return{top:t2,right:e3+r3,bottom:t2+o2,left:e3,width:r3,height:o2}}},J=Y.measure(e2),K=r2.map(Y.measure),Z=(function(n3,t2){const e3=t2==="rtl",r3=n3==="y",o2=!r3&&e3?-1:1;return{scroll:r3?"y":"x",cross:r3?"x":"y",startEdge:r3?"top":e3?"right":"left",endEdge:r3?"bottom":e3?"left":"right",measureSize:function(n4){const{height:t3,width:e4}=n4;return r3?t3:e4},direction:function(n4){return n4*o2}}})(H2,k2),_=Z.measureSize(J),nn=(function(n3){return{measure:function(t2){return n3*(t2/100)}}})(_),tn=(function(n3,e3){const r3={start:function(){return 0},center:function(n4){return o2(n4)/2},end:o2};function o2(n4){return e3-n4}return{measure:function(o3,i2){return t(n3)?r3[n3](o3):n3(e3,o3,i2)}}})(z2,_),en=!B&&!!U,rn=B||!!U,{slideSizes:on,slideSizesWithGaps:cn,startGap:un,endGap:sn}=(function(n3,t2,e3,r3,i2,c2){const{measureSize:u2,startEdge:a2,endEdge:l2}=n3,f3=e3[0]&&i2,p3=(function(){if(!f3)return 0;const n4=e3[0];return o(t2[a2]-n4[a2])})(),m3=(function(){if(!f3)return 0;const n4=c2.getComputedStyle(s(r3));return parseFloat(n4.getPropertyValue(`margin-${l2}`))})(),g2=e3.map(u2),h2=e3.map((n4,t3,e4)=>{const r4=!t3,o2=d(e4,t3);return r4?g2[t3]+p3:o2?g2[t3]+m3:e4[t3+1][a2]-n4[a2]}).map(o);return{slideSizes:g2,slideSizesWithGaps:h2,startGap:p3,endGap:m3}})(Z,J,K,r2,rn,p2),an=O(Z,_,G,B,J,K,un,sn,2),{snaps:dn,snapsAligned:ln}=(function(n3,t2,e3,r3,i2){const{startEdge:c2,endEdge:u2}=n3,{groupSlides:a2}=i2,d2=a2(r3).map(n4=>s(n4)[u2]-n4[0][c2]).map(o).map(t2.measure),l2=r3.map(n4=>e3[c2]-n4[c2]).map(n4=>-o(n4)),f3=a2(l2).map(n4=>n4[0]).map((n4,t3)=>n4+d2[t3]);return{snaps:l2,snapsAligned:f3}}
1)(Z,tn,J,K,an),fn=-s(dn)+s(cn),{snapsContained:pn,scrollContainLimit:mn}=(function(n3,t2,e3,r3,o2){const i2=x(-t2+n3,0),u2=e3.map((n4,t3)=>{const{min:r4,max:o3}=i2,c2=i2.constrain(n4),u3=!t3,s2=d(e3,t3);return u3?o3:s2||l2(r4,c2)?r4:l2(o3,c2)?o3:c2}).map(n4=>parseFloat(n4.toFixed(3))),a2=(function(){const n4=u2[0],t3=s(u2);return x(u2.lastIndexOf(n4),u2.indexOf(t3)+1)})();function l2(n4,t3){return c(n4,t3)<=1}return{snapsContained:(function(){if(t2<=n3+o2)return[i2.max];if(r3==="keepSnaps")return u2;const{min:e4,max:c2}=a2;return u2.slice(e4,c2)})(),scrollContainLimit:a2}})(_,fn,ln,U,2),gn=en?pn:ln,{limit:hn}=(function(n3,t2,e3){const r3=t2[0];return{limit:x(e3?r3-n3:s(t2),r3)}})(fn,gn,B),xn=y(a(gn),V,B),yn=xn.clone(),vn=u(r2),bn=h(f2,p2,()=>(({dragHandler:n3,scrollBody:t2,scrollBounds:e3,options:{loop:r3}})=>{r3||e3.constrain(n3.pointerDown()),t2.seek()})(Hn),n3=>(({scrollBody:n4,translate:t2,location:e3,offsetLocation:r3,previousLocation:o2,scrollLooper:i2,slideLooper:c2,dragHandler:u2,animation:s2,eventHandler:a2,scrollBounds:d2,options:{loop:l2}},f3)=>{const p3=n4.settled(),m3=!d2.shouldConstrain(),g2=l2?p3:p3&&m3,h2=g2&&!u2.pointerDown();h2&&s2.stop();const x2=e3.get()*f3+o2.get()*(1-f3);r3.set(x2),l2&&(i2.loop(n4.direction()),c2.loop()),t2.to(r3.get()),h2&&a2.emit("settle"),g2||a2.emit("scroll")})(Hn,n3)),Sn=gn[xn.get()],wn=I(Sn),En=I(Sn),Ln=I(Sn),Dn=I(Sn),In=(function(n3,t2,e3,r3,c2,u2){let s2=0,a2=0,d2=c2,l2=u2,f3=n3.get(),p3=0;function m3(n4){return d2=n4,h2}function g2(n4){return l2=n4,h2}const h2={direction:function(){return a2},duration:function(){return d2},velocity:function(){return s2},seek:function(){const t3=r3.get()-n3.get();let o2=0;return d2?(e3.set(n3),s2+=t3/d2,s2*=l2,f3+=s2,n3.add(s2),o2=f3-p3):(s2=0,e3.set(r3),n3.set(r3),o2=t3),a2=i(o2),p3=f3,h2},settled:function(){return o(r3.get()-t2.get())<.001},useBaseFriction:function(){return g2(u2)},useBaseDuration:function(){return m3(c2)},useFriction:g2,useDuration:m3};return h2})(wn,Ln,En,Dn,C,.68),Mn=L(B,gn,fn,hn,Dn),An=(function(n3,t2,e3,r3,o2,i2,c2){function u2(o3){const u3=o3.distance,s2=o3.index!==t2.get();i2.add(u3),u3&&(r3.duration()?n3.start():(n3.update(),n3.render(1),n3.update())),s2&&(e3.set(t2.get()),t2.set(o3.index),c2.emit("select"))}return{distance:function(n4,t3){u2(o2.byDistance(n4,t3))},index:function(n4,e4){const r4=t2.clone().set(n4);u2(o2.byIndex(r4.get(),e4))}}})(bn,xn,yn,In,Mn,Dn,P2),Fn=(function(n3){const{max:t2,length:e3}=n3;return{get:function(n4){return e3?(n4-t2)/-e3:0}}})(hn),Tn=g(),On=T(e2,r2,P2,j),{slideRegistry:Pn}=(function(n3,t2,e3,r3,o2,i2){const{groupSlides:c2}=o2,{min:u2,max:f3}=r3;return{slideRegistry:(function(){const r4=c2(i2),o3=!n3||t2==="keepSnaps";return e3.length===1?[i2]:o3?r4:r4.slice(u2,f3).map((n4,t3,e4)=>{const r5=!t3,o4=d(e4,t3);return r5?l(s(e4[0])+1):o4?l(a(i2)-s(e4)[0]+1,s(e4)[0]):n4})})()}})(en,U,gn,mn,an,vn),zn=D(n2,r2,Pn,An,In,Tn,P2,X),Hn={ownerDocument:f2,ownerWindow:p2,eventHandler:P2,containerRect:J,slideRects:K,animation:bn,axis:Z,dragHandler:v(Z,n2,f2,p2,Dn,b(Z,p2),wn,bn,An,In,Mn,xn,P2,nn,N,R,q,.68,Q),eventStore:Tn,percentOfView:nn,index:xn,indexPrevious:yn,limit:hn,location:wn,offsetLocation:Ln,previousLocation:En,options:m2,resizeHandler:S(e2,P2,p2,r2,Z,W,Y),scrollBody:In,scrollBounds:w(hn,Ln,Dn,In,nn),scrollLooper:E(fn,hn,Ln,[wn,Ln,En,Dn]),scrollProgress:Fn,scrollSnapList:gn.map(Fn.get),scrollSnaps:gn,scrollTarget:Mn,scrollTo:An,slideLooper:A(Z,_,fn,on,cn,dn,gn,Ln,r2),slideFocus:zn,slidesHandler:F(e2,P2,$),slidesInView:On,slideIndexes:vn,slideRegistry:Pn,slidesToScroll:an,target:Dn,translate:M(Z,e2)};return Hn}const z={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function H(n2){function t2(n3,t3){return p(n3,t3||{})}return{mergeOptions:t2,optionsAtMedia:function(e3){const r2=e3.breakpoints||{},o2=f(r2).filter(t3=>n2.matchMedia(t3).matches).map(n3=>r2[n3]).reduce((n3,e4)=>t2(n3,e4),{});return t2(e3,o2)},optionsMediaQueries:function(t3){return t3.map(n3=>f(n3.breakpoints||{})).reduce((n3,t4)=>n3.concat(t4),[]).map(n2.matchMedia)}}}function k(n2,e2,r2){const o2=n2.ownerDocument,i2=o2.defaultView,c2=H(i2),u2=(function(n3){let t2=[];return{init:function(e3,r3){return t2=r3.filter(({options:t3})=>n3.optionsAtMedia(t3).active!==!1),t2.forEach(t3=>t3.init(e3,n3)),r3.reduce((n4,t3)=>Object.assign(n4,{[t3.name]:t3}),{})},destroy:function(){t2=t2.filter(n4=>n4.destroy())}}})(c2),s2=g(),a2=(function(){let n3,t2={};function e3(n4){return t2[n4]||[]}const r3={init:function(t3){n3=t3},emit:function(t3){return e3(t3).forEach(e4=>e4(n3,t3)),r3},off:function(n4,o3){return t2[n4]=e3(n4).filter(n5=>n5!==o3),r3},on:function(n4,o3){return t2[n4]=e3(n4).concat([o3]),r3},clear:function(){t2={}}};return r3})(),{mergeOptions:d2,optionsAtMedia:l2,optionsMediaQueries:f2}=c2,{on:p2,off:m2,emit:h2}=a2,x2=A2;let y2,v2,b2,S2,w2=!1,E2=d2(z,k.globalOptions),L2=d2(E2),D2=[];function I2(t2){const e3=P(n2,b2,S2,o2,i2,t2,a2);return t2.loop&&!e3.slideLooper.canLoop()?I2(Object.assign({},t2,{loop:!1})):e3}function M2(e3,r3){w2||(E2=d2(E2,e3),L2=l2(E2),D2=r3||D2,(function(){const{container:e4,slides:r4}=L2;b2=(t(e4)?n2.querySelector(e4):e4)||n2.children[0];const i3=t(r4)?b2.querySelectorAll(r4):r4;S2=[].slice.call(i3||b2.children)})(),y2=I2(L2),f2([E2,...D2.map(({options:n3})=>
1n3)]).forEach(n3=>s2.add(n3,"change",A2)),L2.active&&(y2.translate.to(y2.location.get()),y2.animation.init(),y2.slidesInView.init(),y2.slideFocus.init(V),y2.eventHandler.init(V),y2.resizeHandler.init(V),y2.slidesHandler.init(V),y2.options.loop&&y2.slideLooper.loop(),b2.offsetParent&&S2.length&&y2.dragHandler.init(V),v2=u2.init(V,D2)))}function A2(n3,t2){const e3=O2();F2(),M2(d2({startIndex:e3},n3),t2),a2.emit("reInit")}function F2(){y2.dragHandler.destroy(),y2.eventStore.clear(),y2.translate.clear(),y2.slideLooper.clear(),y2.resizeHandler.destroy(),y2.slidesHandler.destroy(),y2.slidesInView.destroy(),y2.animation.destroy(),u2.destroy(),s2.clear()}function T2(n3,t2,e3){L2.active&&!w2&&(y2.scrollBody.useBaseFriction().useDuration(t2===!0?0:L2.duration),y2.scrollTo.index(n3,e3||0))}function O2(){return y2.index.get()}const V={canScrollNext:function(){return y2.index.add(1).get()!==O2()},canScrollPrev:function(){return y2.index.add(-1).get()!==O2()},containerNode:function(){return b2},internalEngine:function(){return y2},destroy:function(){w2||(w2=!0,s2.clear(),F2(),a2.emit("destroy"),a2.clear())},off:m2,on:p2,emit:h2,plugins:function(){return v2},previousScrollSnap:function(){return y2.indexPrevious.get()},reInit:x2,rootNode:function(){return n2},scrollNext:function(n3){T2(y2.index.add(1).get(),n3,-1)},scrollPrev:function(n3){T2(y2.index.add(-1).get(),n3,1)},scrollProgress:function(){return y2.scrollProgress.get(y2.offsetLocation.get())},scrollSnapList:function(){return y2.scrollSnapList},scrollTo:T2,selectedScrollSnap:O2,slideNodes:function(){return S2},slidesInView:function(){return y2.slidesInView.get()},slidesNotInView:function(){return y2.slidesInView.get(!1)}};return M2(e2,r2),setTimeout(()=>a2.emit("init"),0),V}return k.globalOptions=void 0,k}),(function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).EmblaCarouselAutoplay=t()})(this,function(){"use strict";const n={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function t(o={}){let e,i,s,l,r=null,u=0,a=!1,c=!1,p=!1,f=!1;function d(){s||(g()?p=!0:(a||i.emit("autoplay:play"),(function(){const{ownerWindow:n2}=i.internalEngine();n2.clearTimeout(u),u=n2.setTimeout(E,l[i.selectedScrollSnap()]),r=new Date().getTime(),i.emit("autoplay:timerset")})(),a=!0))}function m(){s||(a&&i.emit("autoplay:stop"),(function(){const{ownerWindow:n2}=i.internalEngine();n2.clearTimeout(u),u=0,r=null,i.emit("autoplay:timerstopped")})(),a=!1)}function y(){if(g())return p=a,m();p&&d()}function g(){const{ownerDocument:n2}=i.internalEngine();return n2.visibilityState==="hidden"}function O(){c||m()}function S(){c||d()}function w(){c=!0,m()}function b(){c=!1,d()}function E(){const{index:n2}=i.internalEngine(),t2=n2.clone().add(1).get(),o2=i.scrollSnapList().length-1,s2=e.stopOnLastSnap&&t2===o2;if(i.canScrollNext()?i.scrollNext(f):i.scrollTo(0,f),i.emit("autoplay:select"),s2)return m();d()}return{name:"autoplay",options:o,init:function(r2,u2){i=r2;const{mergeOptions:a2,optionsAtMedia:c2}=u2,p2=a2(n,t.globalOptions),g2=a2(p2,o);if(e=c2(g2),i.scrollSnapList().length<=1)return;f=e.jump,s=!1,l=(function(n2,t2){const o2=n2.scrollSnapList();return typeof t2=="number"?o2.map(()=>t2):t2(o2,n2)})(i,e.delay);const{eventStore:E2,ownerDocument:I}=i.internalEngine(),h=!!i.internalEngine().options.watchDrag,T=(function(n2,t2){const o2=n2.rootNode();return t2&&t2(o2)||o2})(i,e.rootNode);E2.add(I,"visibilitychange",y),h&&i.on("pointerDown",O),h&&!e.stopOnInteraction&&i.on("pointerUp",S),e.stopOnMouseEnter&&E2.add(T,"mouseenter",w),e.stopOnMouseEnter&&!e.stopOnInteraction&&E2.add(T,"mouseleave",b),e.stopOnFocusIn&&i.on("slideFocusStart",m),e.stopOnFocusIn&&!e.stopOnInteraction&&E2.add(i.containerNode(),"focusout",d),e.playOnInit&&d()},destroy:function(){i.off("pointerDown",O).off("pointerUp",S).off("slideFocusStart",m),m(),s=!0,a=!1},play:function(n2){n2!==void 0&&(f=n2),d()},stop:function(){a&&m()},reset:function(){a&&d()},isPlaying:function(){return a},timeUntilNext:function(){return r?l[i.selectedScrollSnap()]-(new Date().getTime()-r):null}}}return t.globalOptions=void 0,t}),(function(t,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(t=typeof globalThis<"u"?globalThis:t||self).EmblaCarouselAutoScroll=n()})(this,function(){"use strict";const t={direction:"forward",speed:2,startDelay:1e3,active:!0,breakpoints:{},playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,rootNode:null};function n(o={}){let e,i,r,s,c,a=0,u=!1,l=!1;function f(){if(r||u)return;i.emit("autoScroll:play");const t2=i.internalEngine(),{ownerWindow:n2}=t2;a=n2.setTimeout(()=>{t2.scrollBody=(function(t3){const{location:n3,previousLocation:o2,offsetLocation:r2,target:s2,scrollTarget:c2,index:a2,indexPrevious:u2,limit:{reachedMin:l2,reachedMax:f2,constrain:p2},options:{loop:g2}}=t3,y2=e.direction==="forward"?-1:1,m2=()=>v;let O2=0,w2=0,E=n3.get(),I=0,b=!1;function h(){let t4=0;o2.set(n3),O2=y2*e.speed,E+=O2,n3.add(O2),s2.set(n3),t4=E-I,w2=Math.sign(t4),I=E;const m3=c2.byDistance(0,!1).index;a2.get()!==m3&&(u2.set(a2.get()),a2.set(m3),i.emit("select"));const h2=e.direction==="forward"?l2(r2.get()):f2(r2.get());if(!g2&&h2){b=!0;const t5=p2(n3.get());n3.set(t5),s2.set(n3),d()}return v}const v={direction:()=>w2,duration:()=>-1,velocity:()=>O2,settled:()=>b,seek:h,useBaseFriction:m2,useBaseDuration:m2,useFriction:m2,useDuration:m2};return v})(t2),t2.animation.start()},s),u=!0}function d(){if(r||!u)return;i.emit("autoScroll:stop");const t2=i.internalEngine(),{ownerWindow:n2}=t2;t2.scrollBody=c,n2.clearTimeout(a),a=0,u=!1}function p(){l||d()}function g(){l||w()}function y(){l=!0,d()}function m(){l=!1,f()}function O(){i.off("settle",O),f()}function w(){i.on("settle",O)}return{name:"autoScroll",options:o,init:function(a2,u2){i=a2;const{mergeOptions:l2,optionsAtMedia:O2}=u2,w2=l2(t,n.globalOptions),E=l2(w2,o);if(e=O2(E),i.scrollSnapList().length<=1)return;s=e.startDelay,r=!1,c=i.internalEngine().scrollBody;
1const{eventStore:I}=i.internalEngine(),b=!!i.internalEngine().options.watchDrag,h=(function(t2,n2){const o2=t2.rootNode();return n2&&n2(o2)||o2})(i,e.rootNode);b&&i.on("pointerDown",p),b&&!e.stopOnInteraction&&i.on("pointerUp",g),e.stopOnMouseEnter&&I.add(h,"mouseenter",y),e.stopOnMouseEnter&&!e.stopOnInteraction&&I.add(h,"mouseleave",m),e.stopOnFocusIn&&i.on("slideFocusStart",d),e.stopOnFocusIn&&!e.stopOnInteraction&&I.add(i.containerNode(),"focusout",f),e.playOnInit&&f()},destroy:function(){i.off("pointerDown",p).off("pointerUp",g).off("slideFocusStart",d).off("settle",O),d(),r=!0,u=!1},play:function(t2){t2!==void 0&&(s=t2),f()},stop:function(){u&&d()},reset:function(){u&&(d(),w())},isPlaying:function(){return u}}}return n.globalOptions=void 0,n}),(function(n,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis<"u"?globalThis:n||self).EmblaCarouselFade=t()})(this,function(){"use strict";function n(n2,t2,e2){return Math.min(Math.max(n2,t2),e2)}function t(n2){return typeof n2=="number"&&!isNaN(n2)}function e(e2={}){let s,l,c,a,f=[],d=0,u=0,p=0,g=!1;function y(){b(s.selectedScrollSnap(),1)}function E(){g=!1}function S(){g=!1,d=0,u=0}function h(){const n2=s.internalEngine().scrollBody.duration();u=n2?0:1,g=!0,n2||y()}function m(n2){const{scrollSnaps:e3,location:o2,target:i2}=s.internalEngine();!t(n2)||f[n2]<.5||(o2.set(e3[n2]),i2.set(o2))}function b(t2,e3){s.scrollSnapList().forEach((r2,l2)=>{const c2=Math.abs(e3),a2=f[l2],u2=l2===t2,y2=n(u2?a2+c2:a2-c2,0,1);f[l2]=y2;const E2=u2&&g,S2=s.previousScrollSnap();E2&&(f[S2]=1-y2),u2&&(function(n2,t3){const{index:e4,dragHandler:o2,scrollSnaps:i2}=s.internalEngine(),r3=o2.pointerDown(),l3=1/(i2.length-1);let c3=n2,a3=r3?s.selectedScrollSnap():s.previousScrollSnap();if(r3&&c3===a3){const n3=-1*Math.sign(d);c3=a3,a3=e4.clone().set(a3).add(n3).get()}const f2=a3*l3,u3=(c3-a3)*l3;p=f2+u3*t3})(t2,y2),(function(n2){const t3=s.internalEngine().slideRegistry[n2],{scrollSnaps:e4,containerRect:o2}=s.internalEngine(),r3=f[n2];t3.forEach(t4=>{const l3=s.slideNodes()[t4].style,c3=parseFloat(r3.toFixed(2)),a3=c3>0,f2=(function(n3){const{axis:t5}=s.internalEngine();return`translate${t5.scroll.toUpperCase()}(${t5.direction(n3)}px)`})(a3?e4[n2]:o2.width+2);a3&&(l3.transform=f2),l3.opacity=c3.toString(),l3.pointerEvents=r3>.5?"auto":"none",a3||(l3.transform=f2)})})(l2)})}function v(){const{dragHandler:n2,index:t2,scrollBody:e3}=s.internalEngine(),o2=s.selectedScrollSnap();if(!n2.pointerDown())return o2;const i2=Math.sign(e3.velocity()),r2=Math.sign(d),l2=t2.clone().set(o2).add(-1*i2).get();return i2&&r2?r2===i2?l2:o2:null}function x(){const{target:n2,location:e3}=s.internalEngine(),i2=n2.get()-e3.get(),c2=Math.abs(i2)>=1,a2=v(),p2=!t(a2);return(function(n3){const{dragHandler:e4,scrollBody:i3}=n3.internalEngine(),s2=e4.pointerDown(),c3=i3.velocity(),a3=i3.duration(),p3=v(),g2=!t(p3);if(s2){if(!c3)return;d+=c3,u=Math.abs(c3/l),m(p3)}if(!s2){if(!a3||g2)return;u+=(1-f[p3])/a3,u*=.68}g2||b(p3,u)})(s),!p2&&!c2&&f[a2]>.999}function M(){return p}return{name:"fade",options:e2,init:function(t2){s=t2;const e3=s.selectedScrollSnap(),{scrollBody:r2,containerRect:d2,axis:u2}=s.internalEngine(),p2=u2.measureSize(d2);l=n(.75*p2,200,500),g=!1,f=s.scrollSnapList().map((n2,t3)=>t3===e3?1:0),c=r2.settled,a=s.scrollProgress,r2.settled=x,s.scrollProgress=M,s.on("select",h).on("slideFocus",y).on("pointerDown",S).on("pointerUp",E),(function(){const{translate:n2,slideLooper:t3}=s.internalEngine();n2.clear(),n2.toggleActive(!1),t3.loopPoints.forEach(({translate:n3})=>{n3.clear(),n3.toggleActive(!1)})})(),y()},destroy:function(){const{scrollBody:n2}=s.internalEngine();n2.settled=c,s.scrollProgress=a,s.off("select",h).off("slideFocus",y).off("pointerDown",S).off("pointerUp",E),s.slideNodes().forEach(n3=>{const t2=n3.style;t2.opacity="",t2.transform="",t2.pointerEvents="",n3.getAttribute("style")||n3.removeAttribute("style")})}}}return e.globalOptions=void 0,e}),(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self).EmblaCarouselWheelGestures=t()})(this,function(){"use strict";function e(){return(e=Object.assign||function(e2){for(var t2=1;t2<arguments.length;t2++){var n2=arguments[t2];for(var i2 in n2)Object.prototype.hasOwnProperty.call(n2,i2)&&(e2[i2]=n2[i2])}return e2}).apply(this,arguments)}function t(e2,t2){if(e2.length!==t2.length)throw new Error("vectors must be same length");return e2.map(function(e3,n2){return e3+t2[n2]})}function n(e2){return Math.max.apply(Math,e2.map(Math.abs))}function i(e2){return Object.freeze(e2),Object.values(e2).forEach(function(e3){e3===null||typeof e3!="object"||Object.isFrozen(e3)||i(e3)}),e2}var o=[1,18,typeof window<"u"&&window.innerHeight||800],r=[-1,-1,-1],a=i({preventWheelAction:!0,reverseSign:[!0,!0,!1]}),s={active:!0,breakpoints:{},wheelDraggingClass:"is-wheel-dragging",forceWheelAxis:void 0,target:void 0};function u(c){var l;c===void 0&&(c={});var m=function(){};return{name:"wheelGestures",options:c,init:function(f,d){var v,h,p=d.mergeOptions,M=d.optionsAtMedia,g=p(s,u.globalOptions),x=p(g,c);l=M(x);var b=f.internalEngine(),E=(v=l.target)!=null?v:f.containerNode().parentNode,w=(h=l.forceWheelAxis)!=null?h:b.options.axis,y=(function(s2){s2===void 0&&(s2={});var u2,c2,l2,m2=(function(){var e2={};function t2(t3,n2){e2[t3]=(e2[t3]||[]).filter(function(e3){return e3!==n2})}return i({on:function(n2,i2){return e2[n2]=(e2[n2]||[]).concat(i2),function(){return t2(n2,i2)}
1},off:t2,dispatch:function(t3,n2){t3 in e2&&e2[t3].forEach(function(e3){return e3(n2)})}})})(),f2=m2.on,d2=m2.off,v2=m2.dispatch,h2=a,p2={isStarted:!1,isStartPublished:!1,isMomentum:!1,startTime:0,lastAbsDelta:1/0,axisMovement:[0,0,0],axisVelocity:[0,0,0],accelerationFactors:[],scrollPoints:[],scrollPointsToMerge:[],willEndTimeout:400},M2=!1,g2=function(e2){Array.isArray(e2)?e2.forEach(function(e3){return E2(e3)}):E2(e2)},x2=function(t2){return t2===void 0&&(t2={}),Object.values(t2).some(function(e2){return e2==null})?h2:h2=i(e({},a,h2,t2))},b2=function(n2){var i2=e({event:u2,isStart:!1,isEnding:!1,isMomentumCancel:!1,isMomentum:p2.isMomentum,axisDelta:[0,0,0],axisVelocity:p2.axisVelocity,axisMovement:p2.axisMovement,get axisMovementProjection(){return t(i2.axisMovement,i2.axisVelocity.map(function(e2){return t2===void 0&&(t2=.996),e2*t2/(1-t2);var t2}))}},n2);v2("wheel",e({},i2,{previous:c2})),c2=i2},E2=function(i2){var a2,s3=(function(t2){return e({},t2,{axisDelta:t2.axisDelta.map(function(e2){return Math.min(Math.max(-700,e2),700)})})})((function(t2,n2){if(!n2)return t2;var i3=n2===!0?r:n2.map(function(e2){return e2?-1:1});return e({},t2,{axisDelta:t2.axisDelta.map(function(e2,t3){return e2*i3[t3]})})})({timeStamp:(a2=i2).timeStamp,axisDelta:[a2.deltaX*o[a2.deltaMode],a2.deltaY*o[a2.deltaMode],(a2.deltaZ||0)*o[a2.deltaMode]]},h2.reverseSign)),c3=s3.axisDelta,l3=s3.timeStamp,m3=n(c3);i2.preventDefault&&(function(e2,t2){var n2=h2.preventWheelAction,i3=t2[0],o2=t2[1],r2=t2[2];if(typeof n2=="boolean")return n2;switch(n2){case"x":return Math.abs(i3)>=e2;case"y":return Math.abs(o2)>=e2;case"z":return Math.abs(r2)>=e2;default:return!1}})(m3,c3)&&i2.preventDefault(),p2.isStarted?p2.isMomentum&&m3>Math.max(2,2*p2.lastAbsDelta)&&(L2(!0),O2()):O2(),m3===0&&Object.is&&Object.is(i2.deltaX,-0)?M2=!0:(u2=i2,p2.axisMovement=t(p2.axisMovement,c3),p2.lastAbsDelta=m3,p2.scrollPointsToMerge.push({axisDelta:c3,timeStamp:l3}),w2(),b2({axisDelta:c3,isStart:!p2.isStartPublished}),p2.isStartPublished=!0,j2())},w2=function(){var e2;p2.scrollPointsToMerge.length===2?(p2.scrollPoints.unshift({axisDeltaSum:p2.scrollPointsToMerge.map(function(e3){return e3.axisDelta}).reduce(t),timeStamp:(e2=p2.scrollPointsToMerge.map(function(e3){return e3.timeStamp}),e2.reduce(function(e3,t2){return e3+t2})/e2.length)}),D2(),p2.scrollPointsToMerge.length=0,p2.scrollPoints.length=1,p2.isMomentum||T2()):p2.isStartPublished||y2()},y2=function(){var e2;p2.axisVelocity=(e2=p2.scrollPointsToMerge,e2[e2.length-1]).axisDelta.map(function(e3){return e3/p2.willEndTimeout})},D2=function(){var e2=p2.scrollPoints,t2=e2[0],n2=e2[1];if(n2&&t2){var i2=t2.timeStamp-n2.timeStamp;if(!(i2<=0)){var o2=t2.axisDeltaSum.map(function(e3){return e3/i2}),r2=o2.map(function(e3,t3){return e3/(p2.axisVelocity[t3]||1)});p2.axisVelocity=o2,p2.accelerationFactors.push(r2),S2(i2)}}},S2=function(e2){var t2=10*Math.ceil(e2/10)*1.2;p2.isMomentum||(t2=Math.max(100,2*t2)),p2.willEndTimeout=Math.min(1e3,Math.round(t2))},P2=function(e2){return e2===0||e2<=.96&&e2>=.6},T2=function(){if(p2.accelerationFactors.length>=5){if(M2&&(M2=!1,n(p2.axisVelocity)>=.2))return void A2();var e2=p2.accelerationFactors.slice(-5);e2.every(function(e3){var t2=!!e3.reduce(function(e4,t3){return e4&&e4<1&&e4===t3?1:0}),n2=e3.filter(P2).length===e3.length;return t2||n2})&&A2(),p2.accelerationFactors=e2}},A2=function(){p2.isMomentum=!0},O2=function(){(p2={isStarted:!1,isStartPublished:!1,isMomentum:!1,startTime:0,lastAbsDelta:1/0,axisMovement:[0,0,0],axisVelocity:[0,0,0],accelerationFactors:[],scrollPoints:[],scrollPointsToMerge:[],willEndTimeout:400}).isStarted=!0,p2.startTime=Date.now(),c2=void 0,M2=!1},j2=function(){clearTimeout(l2),l2=setTimeout(L2,p2.willEndTimeout)},L2=function(e2){e2===void 0&&(e2=!1),p2.isStarted&&(b2(p2.isMomentum&&e2?{isEnding:!0,isMomentumCancel:!0}:{isEnding:!0}),p2.isMomentum=!1,p2.isStarted=!1)},V2=(function(e2){var t2=[],n2=function(n3){n3.removeEventListener("wheel",e2),t2=t2.filter(function(e3){return e3!==n3})};return i({observe:function(i2){return i2.addEventListener("wheel",e2,{passive:!1}),t2.push(i2),function(){return n2(i2)}},unobserve:n2,disconnect:function(){t2.forEach(n2)}})})(g2),C2=V2.observe,F2=V2.unobserve,W2=V2.disconnect;return x2(s2),i({on:f2,off:d2,observe:C2,unobserve:F2,disconnect:W2,feedWheel:g2,updateOptions:x2})})({preventWheelAction:w,reverseSign:[!0,!0,!1]});function D(){j=(w==="x"?b.containerRect.width:b.containerRect.height)/2}var S,P=y.observe(E),T=y.on("wheel",function(e2){var t2=e2.axisDelta,n2=t2[0],i2=t2[1],o2=w==="x"?i2:n2,r2=e2.isEnding&&!e2.isMomentum||e2.isMomentum&&e2.previous&&!e2.previous.isMomentum;Math.abs(w==="x"?n2:i2)>Math.abs(o2)&&!A&&!e2.isMomentum&&!L&&(function(e3){try{X(S=new MouseEvent("mousedown",e3.event))}catch{return m()}A=!0,O=0,document.documentElement.addEventListener("mousemove",F,!0),document.documentElement.addEventListener("mouseup",F,!0),document.documentElement.addEventListener("mousedown",F,!0),l.wheelDraggingClass&&E.classList.add(l.wheelDraggingClass)})(e2),L&&e2.isEnding&&(L=!1),A&&((function(e3){var t3=Y(e3);if(t3.isAtBoundary&&!e3.isMomentum){if((O+=Math.abs(t3.primaryAxisDelta))>j)return L=!0,V(e3),!0}else O=0;return!1})(e2)||(r2?V(e2):X(W("mousemove",e2))))}),A=!1,O=0,j=0,L=!1;
1function V(e2){A=!1,X(W("mouseup",e2)),C(),l.wheelDraggingClass&&E.classList.remove(l.wheelDraggingClass)}function C(){document.documentElement.removeEventListener("mousemove",F,!0),document.documentElement.removeEventListener("mouseup",F,!0),document.documentElement.removeEventListener("mousedown",F,!0)}function F(e2){A&&e2.isTrusted&&e2.stopImmediatePropagation()}function W(e2,t2){var n2,i2;if(w===b.options.axis){var o2=t2.axisMovement;n2=o2[0],i2=o2[1]}else{var r2=t2.axisMovement;i2=r2[0],n2=r2[1]}if(Y(t2).isAtBoundary){var a2=Math.min(O/j,1),s2=O*(n2>0?-1:1)*(.25+.5*a2);n2+=s2,i2+=s2}if(!b.options.skipSnaps&&!b.options.dragFree){var u2=b.containerRect.width,c2=b.containerRect.height;n2=n2<0?Math.max(n2,-u2):Math.min(n2,u2),i2=i2<0?Math.max(i2,-c2):Math.min(i2,c2)}return new MouseEvent(e2,{clientX:S.clientX+n2,clientY:S.clientY+i2,screenX:S.screenX+n2,screenY:S.screenY+i2,movementX:n2,movementY:i2,button:0,bubbles:!0,cancelable:!0,composed:!0})}function X(e2){f.containerNode().dispatchEvent(e2)}function Y(e2){var t2=e2.axisDelta,n2=t2[0],i2=t2[1],o2=f.scrollProgress(),r2=w==="x"?n2:i2;return{isAtBoundary:r2<0&&!(o2<1)||r2>0&&!(o2>0),primaryAxisDelta:r2}}D(),f.on("resize",D),m=function(){P(),T(),f.off("resize",D),C()}},destroy:function(){return m()}}}return u.globalOptions=void 0,u});class PgSlider extends HTMLElement{constructor(){super(),this.slider=null,this.config=null}handleMouseLeave(){this.slider.plugins()?.autoplay?.options?.stopOnMouseEnter&&this.slider.plugins().autoplay.play()}getSlider(){return this.slider}isSliderEnabled(){const canScroll=this.slider.canScrollNext()||this.slider.canScrollPrev();return this.slider.internalEngine().options.active&&canScroll}updateStatusLabel=()=>{if(this.sliderStatusLabel)if(this.isSliderEnabled()){this.sliderStatusLabel.style.display="block";const status=this.sliderStatusPlaceholder?.replace("[index]",this.slider.selectedScrollSnap()+1).replace("[count]",this.slider.slideNodes().length);this.sliderStatusLabel.textContent=status}else this.sliderStatusLabel.style.display="none"};updateColorProps=()=>{const slideStyles=getComputedStyle(this.slidesContainer);this.style.setProperty("--slide-text-color",slideStyles.color)};syncSlideVideos=()=>{const currentSnapIndex=this.slider.selectedScrollSnap(),currentSlidesIndexes=this.slider.internalEngine().slideRegistry[currentSnapIndex]??[currentSnapIndex];this.slider.slideNodes().forEach((node,index)=>{const isCurrent=currentSlidesIndexes.includes(index);node.querySelectorAll("video").forEach(video=>{isCurrent?video.autoplay&&video.paused&&video.play()?.catch(()=>{}):video.paused||video.pause()})})};updateSlidesProperties=()=>{const slidesInView=this.slider.slidesInView(),isActive=this.isSliderEnabled();this.slider.slideNodes().forEach((node,index)=>{const isInView=slidesInView.includes(index);node.toggleAttribute("inert",isActive&&!isInView),node.setAttribute("aria-hidden",isActive&&!isInView)})};handleOnSelect=()=>{this.updateStatusLabel(),this.syncSlideVideos()};onSlidesInView=()=>{this.updateSlidesProperties(),this.syncSlideVideos()};onInit=()=>{this.updateStatusLabel(),this.onSlidesInView(),this.updateColorProps()};connectedCallback(){if(this.slider)return;const viewport=this.querySelector("[data-role='slides-viewport']");this.sliderStatusLabel=this.querySelector("[data-role='slider-status']"),this.slidesContainer=this.querySelector("[data-role='slides-container']"),this.sliderStatusPlaceholder=this.sliderStatusLabel?.getAttribute("data-text");const prefersReducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches,plugins=[EmblaCarouselWheelGestures()];viewport&&this.slidesContainer&&(this.config=parseJSON(this.querySelector('[data-content="slider-data"]').textContent,null),this.config&&(this.config.autoPlay&&plugins.push(EmblaCarouselAutoplay({jump:prefersReducedMotion,stopOnMouseEnter:!0,...this.config.autoPlay})),this.config.fade&&plugins.push(EmblaCarouselFade()),this.config.autoScroll&&plugins.push(EmblaCarouselAutoScroll({startDelay:0,stopOnInteraction:!1,stopOnFocusIn:!1,...this.config.autoScroll})),this.slider=EmblaCarousel(viewport,{slides:".pg-slider__slide",...this.config.global,watchResize:!1,watchSlides:!1,watchFocus:!1},plugins),this.addEventListener("mouseleave",this.handleMouseLeave),this.slider.on("init",this.onInit),this.slider.on("reInit",this.onInit),this.slider.on("slidesInView",this.onSlidesInView),this.slider.on("select",this.handleOnSelect)))}disconnectedCallback(){this.slider?.destroy(),this.slider=null,this.removeEventListener("mouseleave",this.handleMouseLeave)}}customElements.define("pg-slider",PgSlider);class PgSliderPagination extends HTMLElement{constructor(){super(),this.paginationNodes=null}updateButtonState=()=>{const prevIndex=this.slider.previousScrollSnap(),selectedIndex=this.slider.selectedScrollSnap();this.paginationNodes?.[prevIndex]?.classList.remove("active"),this.paginationNodes?.[prevIndex]?.setAttribute("aria-current",!1),this.paginationNodes?.[selectedIndex]?.classList.add("active"),this.paginationNodes?.[selectedIndex]?.setAttribute("aria-current",!0)};toggleNavigationVisibility(){const isEnabled=this.sliderContainer.isSliderEnabled();this.classList.toggle("hide",!isEnabled),this.setAttribute("aria-hidden",!isEnabled),this.toggleAttribute("inert",!isEnabled)}createPages=()=>{const autoGeneratePagination=!!this.buttonTemplate;autoGeneratePagination&&(this.paginationContainer.innerHTML=this.slider.scrollSnapList().map(()=>this.buttonTemplate).join("")),this.paginationNodes=Array.from(this.paginationContainer.querySelectorAll("button[data-role='paginate']")),this.paginationNodes.forEac
1h((node,index)=>{node.addEventListener(this.trigger,()=>this.slider.scrollTo(index)),this.trigger!=="click"&&node.addEventListener("click",()=>this.slider.scrollTo(index)),autoGeneratePagination&&(node.textContent=node.textContent.replace(/\[index\]/g,String(index+1).padStart(2,"0")));const ariaLabel=node.getAttribute("aria-label").replace("[index]",index+1).replace("[count]",this.paginationNodes.length);node.setAttribute("aria-label",ariaLabel)})};init=()=>{this.createPages(),this.updateButtonState(),this.toggleNavigationVisibility()};connectedCallback(){batchUpdate(()=>{const carouselId=this.getAttribute("data-target");this.sliderContainer=document.getElementById(carouselId)||this.closest("pg-slider"),this.slider=this.sliderContainer?.getSlider(),this.paginationContainer=this.querySelector('[data-role="pagination-container"]'),this.buttonTemplate=this.querySelector("template")?.innerHTML.trim(),this.slider&&this.paginationContainer&&(this.trigger=this.getAttribute("data-trigger")||"click",this.init(),this.slider.on("init",this.init),this.slider.on("reInit",this.init),this.slider.on("slidesInView",this.init),this.slider.on("select",this.updateButtonState))})}disconnectedCallback(){this.slider.off("select",this.updateButtonState),this.slider.off("init",this.init),this.slider.off("reInit",this.init),this.slider.off("slidesInView",this.init)}}customElements.define("pg-slider-pagination",PgSliderPagination);class PgSliderNavigation extends HTMLElement{constructor(){super()}updateButtonState=()=>{this.prevButton?.toggleAttribute("disabled",!this.slider.canScrollPrev()),this.nextButton?.toggleAttribute("disabled",!this.slider.canScrollNext())};toggleNavigationVisibility(){const isEnabled=this.sliderContainer.isSliderEnabled();this.classList.toggle("hide",!isEnabled),this.setAttribute("aria-hidden",!isEnabled),this.toggleAttribute("inert",!isEnabled)}init=()=>{this.updateButtonState(),this.toggleNavigationVisibility()};connectedCallback(){const carouselId=this.getAttribute("data-target");this.sliderContainer=document.getElementById(carouselId)||this.closest("pg-slider"),this.slider=this.sliderContainer?.getSlider(),this.prevButton=this.querySelector("button[data-sli
1de-direction=prev]"),this.nextButton=this.querySelector("button[data-slide-direction=next]"),this.slider&&(this.prevButton||this.nextButton)&&(this.prevButton?.addEventListener("click",this.slider.scrollPrev),this.nextButton?.addEventListener("click",this.slider.scrollNext),this.slider.on("select",this.updateButtonState),this.slider.on("init",this.init),this.slider.on("reInit",this.init))}disconnectedCallback(){this.prevButton?.removeEventListener("click",this.slider.scrollPrev),this.nextButton?.removeEventListener("click",this.slider.scrollNext),this.slider.off("select",this.updateButtonState),this.slider.off("init",this.init),this.slider.off("reInit",this.init)}}customElements.define("pg-slider-navigation",PgSliderNavigation);class PgSliderProgress extends HTMLElement{constructor(){super()}updateProgres=()=>{const count=this.slider.scrollSnapList().length,currentPosition=this.slider.selectedScrollSnap()+1,progress=Math.round(currentPosition/count*100);this.progressIndicator.style.width=`${progress}%`};toggleNavigationVisibility(){const isEnabled=this.sliderContainer.isSliderEnabled();this.classList.toggle("hide",!isEnabled),this.toggleAttribute("inert",!isEnabled),this.setAttribute("aria-hidden",!isEnabled)}init=()=>{this.updateProgres(),this.toggleNavigationVisibility()};connectedCallback(){const carouselId=this.getAttribute("data-target");this.sliderContainer=document.getElementById(carouselId)||this.closest("pg-slider"),this.slider=this.sliderContainer?.getSlider(),this.progressIndicator=this.querySelector("[data-role='slide-progress']"),this.slider&&this.progressIndicator&&(this.slider.on("select",this.updateProgres),this.slider.on("init",this.init),this.slider.on("reInit",this.init))}disconnectedCallback(){this.slider.off("select",this.updateProgres),this.slider.off("init",this.init),this.slider.off("reInit",this.init)}}customElements.define("pg-slider-progress",PgSliderProgress); 2//# sourceMappingURL=/cdn/shop/t/2168/assets/pg-slider.js.map?v=109742845514032923661784894269
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.