Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

embla-carousel-vue

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embla-carousel-vue - npm Package Compare versions

Comparing version 8.0.0-rc14 to 8.0.0-rc15

cjs/components/emblaCarouselVue.d.ts

0

components/emblaCarouselVue.d.ts

@@ -0,0 +0,0 @@ import { Ref } from 'vue';

2

embla-carousel-vue.umd.js

@@ -1,1 +0,1 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselVue=t(n.Vue)}(this,(function(n){"use strict";function t(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function e(n,r){const o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(r.breakpoints||{}))&&o.every((o=>{const i=n[o],c=r[o];return"function"==typeof i?`${i}`==`${c}`:t(i)&&t(c)?e(i,c):i===c}))}function r(n){return n.concat().sort(((n,t)=>n.name>t.name?1:-1)).map((n=>n.options))}function o(n){return"number"==typeof n}function i(n){return"string"==typeof n}function c(n){return"boolean"==typeof n}function u(n){return"[object Object]"===Object.prototype.toString.call(n)}function s(n){return Math.abs(n)}function a(n){return Math.sign(n)}function l(n,t){return s(n-t)}function d(n){return g(n).map(Number)}function f(n){return n[p(n)]}function p(n){return Math.max(0,n.length-1)}function m(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function g(n){return Object.keys(n)}function h(n,t){return[n,t].reduce(((n,t)=>(g(t).forEach((e=>{const r=n[e],o=t[e],i=u(r)&&u(o);n[e]=i?h(r,o):o})),n)),{})}function y(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function v(n,t){const e={start:function(){return 0},center:function(n){return r(n)/2},end:r};function r(n){return t-n}return{measure:function(r){return o(n)?t*Number(n):e[n](r)}}}function x(n,t){const e=s(n-t);function r(t){return t<n}function o(n){return n>t}function i(n){return r(n)||o(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?r(e)?n:t:e},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function b(n,t,e){const{constrain:r}=x(0,n),o=n+1;let i=c(t);function c(n){return e?s((o+n)%o):r(n)}function u(){return i}function a(){return b(n,u(),e)}const l={get:u,set:function(n){return i=c(n),l},add:function(n){return a().set(u()+n)},clone:a};return l}function w(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let c;if("addEventListener"in e)e.addEventListener(r,o,i),c=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),c=()=>n.removeListener(o)}return n.push(c),t},clear:function(){n=n.filter((n=>n()))}};return t}function S(n,t,e,r,o,i,u,d,f,p,m,g,h,v,b,S,E,O,L,D){const{cross:I}=n,A=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=w(),k=w(),F=x(50,225).constrain(b.measure(20)),R={mouse:300,touch:400},P={mouse:500,touch:600},z=S?43:25;let j=!1,V=0,B=0,H=!1,N=!1,C=!1,q=!1;function G(n){const e=u.readPoint(n),r=u.readPoint(n,I),o=l(e,V),c=l(r,B);if(!N&&!q){if(!n.cancelable)return U(n);if(N=o>c,!N)return U(n)}const s=u.pointerMove(n);o>E&&(C=!0),m.useFriction(.3).useDuration(1),f.start(),i.add(t.apply(s)),n.preventDefault()}function U(n){const e=g.byDistance(0,!1).index!==h.get(),r=u.pointerUp(n)*(S?P:R)[q?"mouse":"touch"],o=function(n,t){const e=h.add(-1*a(n)),r=g.byDistance(n,!S).distance;return S||s(n)<F?r:O&&t?.5*r:g.byIndex(e.get(),0).distance}(t.apply(r),e),i=function(n,t){if(0===n||0===t)return 0;if(s(n)<=s(t))return 0;const e=l(s(n),s(t));return s(e/n)}(r,o),c=z-10*i,d=L+i/50;N=!1,H=!1,k.clear(),m.useDuration(c).useFriction(d),p.distance(o,!S),q=!1,v.emit("pointerUp")}function $(n){C&&(n.stopPropagation(),n.preventDefault())}return{init:function(n){if(!D)return;function t(t){(c(D)||D(n,t))&&function(n){const t=y(n,o);if(q=t,t&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return A.includes(t)}(n.target))return;C=S&&t&&!n.buttons&&j,j=l(i.get(),d.get())>=2,H=!0,u.pointerDown(n),m.useFriction(0).useDuration(0),i.set(d),function(){const n=q?r:e;k.add(n,"touchmove",G,M).add(n,"touchend",U).add(n,"mousemove",G,M).add(n,"mouseup",U)}(),V=u.readPoint(n),B=u.readPoint(n,I),v.emit("pointerDown")}(t)}const s=e;T.add(s,"dragstart",(n=>n.preventDefault()),M).add(s,"touchmove",(()=>{}),M).add(s,"touchend",(()=>{})).add(s,"touchstart",t).add(s,"mousedown",t).add(s,"touchcancel",U).add(s,"contextmenu",U).add(s,"click",$,!0)},pointerDown:function(){return H},destroy:function(){T.clear(),k.clear()}}}function E(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(y(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),c=o(n)-o(e)>170;return r=n,c&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),c=o(n)-o(e),u=o(n)-o(r)>170,a=t/c;return c&&!u&&s(a)>.1?a:0},readPoint:i}}function O(n,t,e,r,o,i){let u,a,l=[],d=!1;function f(n){return o.measureSize(n.getBoundingClientRect())}return{init:function(o){if(!i)return;a=f(n),l=r.map(f),u=new ResizeObserver((u=>{d||(c(i)||i(o,u))&&function(i){for(const c of i){const i=c.target===n,u=r.indexOf(c.target),d=i?a:l[u];if(s(f(i?n:r[u])-d)>=.2){e.requestAnimationFrame((()=>{o.reInit(),t.emit("resize")}));break}}}(u)})),[n].concat(r).forEach((n=>u.observe(n)))},destroy:function(){u&&u.disconnect(),d=!0}}}function L(n,t,e,r,o){const i=o.measure(10),c=o.measure(50),u=x(.1,.99);let a=!1;return{constrain:function(o){if(a||!n.reachedAny(e.get())||!n.reachedAny(t.get()))return;const l=n.reachedMin(t.get())?"min":"max",d=s(n[l]-t.get()),f=e.get()-t.get(),p=u.constrain(d/c);e.subtract(f*p),!o&&s(f)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function D(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=x(o,i);return{loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get())}(t))return;const o=n*(-1*t);r.forEach((n=>n.add(o)))}}}function I(n,t,e,r,o){const{reachedAny:i,removeOffset:c,constrain:u}=r;function l(n){return n.concat().sort(((n,t)=>s(n)-s(t)))[0]}function d(t,r){const o=[t,t+e,t-e];if(!n)return o[0];if(!r)return l(o);const i=o.filter((n=>a(n)===r));return i.length?l(i):f(o)-e}return{byDistance:function(e,r){const a=o.get()+e,{index:l,distance:f}=function(e){const r=n?c(e):u(e),o=t.map((n=>n-r)).map((n=>d(n,0))).map(((n,t)=>({diff:n,index:t}))).sort(((n,t)=>s(n.diff)-s(t.diff))),{index:i}=o[0];return{index:i,distance:r}}(a),p=!n&&i(a);return!r||p?{index:l,distance:e}:{index:l,distance:e+d(t[l]-f,0)}},byIndex:function(n,e){return{index:n,distance:d(t[n]-o.get(),e)}},shortcut:d}}function A(n){let t=n;function e(n){return o(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function M(n,t,e){const r="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=e.style;let i=!1;return{clear:function(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))},to:function(n){i||(o.transform=r(t.apply(n)))},toggleActive:function(n){i=!n}}}function T(n,t,e,r,o,i,c,u,s,a){const l=d(i),f=d(i).reverse(),p=function(){const n=u[0]-1;return h(g(f,n),r,!1)}().concat(function(){const n=e-u[0]-1;return h(g(l,n),-r,!0)}());function m(n,t){return n.reduce(((n,t)=>n-i[t]),t)}function g(n,t){return n.reduce(((n,e)=>m(n,t)>0?n.concat([e]):n),[])}function h(i,u,l){const d=function(n){return c.map(((t,r)=>({start:t-o[r]+.5+n,end:t+e-.5+n})))}(u);return i.map((e=>{const o=l?0:-r,i=l?r:0,c=l?"end":"start",u=d[e][c];return{index:e,slideLocation:A(-1),translate:M(n,t,a[e]),target:()=>s.get()>u?o:i}}))}return{canLoop:function(){return p.every((({index:n})=>m(l.filter((t=>t!==n)),e)<=.1))},clear:function(){p.forEach((n=>n.translate.clear()))},loop:function(){p.forEach((n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))}))},loopPoints:p}}function k(n,t,e){let r,o=!1;return{init:function(i){e&&(r=new MutationObserver((n=>{o||(c(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function F(n,t,e,r){const o={};let i,c=null,u=null,s=!1;return{init:function(){i=new IntersectionObserver((n=>{s||(n.forEach((n=>{const e=t.indexOf(n.target);o[e]=n})),c=null,u=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:r}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),s=!0},get:function(n=!0){if(n&&c)return c;if(!n&&u)return u;const t=function(n){return g(o).reduce(((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t}),[])}(n);return n&&(c=t),n||(u=t),t}}}function R(n,t,e,r,i,c,u,a,l){const{startEdge:m,endEdge:g}=n,h=o(r);return{groupSlides:function(n){return h?function(n,t){return d(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,r):function(n){return n.length?d(n).reduce(((r,o)=>{const d=f(r)||0,h=0===d,y=o===p(n),v=c[m]-u[d][m],x=c[m]-u[o][g],b=!i&&h?t.apply(a):0;return s(x-(!i&&y?t.apply(l):0)-(v+b))>e&&r.push(o),y&&r.push(n.length),r}),[]).map(((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)})):[]}(n)}}}function P(n,t,e,r,i,c,u,l){const{align:g,axis:h,direction:y,startIndex:P,loop:z,duration:j,dragFree:V,dragThreshold:B,inViewThreshold:H,slidesToScroll:N,skipSnaps:C,containScroll:q,watchResize:G,watchSlides:U,watchDrag:$}=c,W=t.getBoundingClientRect(),J=e.map((n=>n.getBoundingClientRect())),Q=function(n){const t="rtl"===n?-1:1;return{apply:function(n){return n*t}}}(y),X=function(n,t){const e="y"===n?"y":"x";return{scroll:e,cross:"y"===n?"x":"y",startEdge:"y"===e?"top":"rtl"===t?"right":"left",endEdge:"y"===e?"bottom":"rtl"===t?"left":"right",measureSize:function(n){const{width:t,height:r}=n;return"x"===e?t:r}}}(h,y),Y=X.measureSize(W),K=function(n){return{measure:function(t){return n*(t/100)}}}(Y),Z=v(g,Y),_=!z&&!!q,nn=z||!!q,{slideSizes:tn,slideSizesWithGaps:en,startGap:rn,endGap:on}=function(n,t,e,r,o,i){const{measureSize:c,startEdge:u,endEdge:a}=n,l=e[0]&&o,d=function(){if(!l)return 0;const n=e[0];return s(t[u]-n[u])}(),m=function(){if(!l)return 0;const n=i.getComputedStyle(f(r));return parseFloat(n.getPropertyValue(`margin-${a}`))}(),g=e.map(c),h=e.map(((n,t,e)=>{const r=!t,o=t===p(e);return r?g[t]+d:o?g[t]+m:e[t+1][u]-n[u]})).map(s);return{slideSizes:g,slideSizesWithGaps:h,startGap:d,endGap:m}}(X,W,J,e,nn,i),cn=R(X,Q,Y,N,z,W,J,rn,on),{snaps:un,snapsAligned:sn}=function(n,t,e,r,o){const{startEdge:i,endEdge:c}=n,{groupSlides:u}=o,a=u(r).map((n=>f(n)[c]-n[0][i])).map(s).map(t.measure),l=r.map((n=>e[i]-n[i])).map((n=>-s(n))),d=u(l).map((n=>n[0])).map(((n,t)=>n+a[t]));return{snaps:l,snapsAligned:d}}(X,Z,W,J,cn),an=-f(un)+f(en),{snapsContained:ln,scrollContainLimit:dn}=function(n,t,e,r){const o=x(-t+n,0),i=e.map(o.constrain).map((n=>parseFloat(n.toFixed(3)))),c=function(){const n=i[0],t=f(i);return x(i.lastIndexOf(n),i.indexOf(t)+1)}();return{snapsContained:function(){if(t<=n)return[o.max];if("keepSnaps"===r)return i;const{min:e,max:u}=c;return i.slice(e,u)}(),scrollContainLimit:c}}(Y,an,sn,q),fn=_?ln:sn,{limit:pn}=function(n,t,e){const r=t[0];return{limit:x(e?r-n:f(t),r)}}(an,fn,z),mn=b(p(fn),P,z),gn=mn.clone(),hn=d(e),yn={start:()=>l.start(Tn),stop:()=>l.stop(Tn),update:()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,eventHandler:r,animation:o,options:{loop:i}})=>{const c=n.pointerDown();i||e.constrain(c);const u=t.seek().settled();u&&!c&&(o.stop(),r.emit("settle")),u||r.emit("scroll")})(Tn),render:n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,scrollLooper:o,slideLooper:i,options:{loop:c}},u)=>{const s=n.velocity();r.set(e.get()-s+s*u),c&&(o.loop(n.direction()),i.loop()),t.to(r.get())})(Tn,n)},vn=fn[mn.get()],xn=A(vn),bn=A(vn),wn=A(vn),Sn=function(n,t,e,r){let o=!0,i=0,c=0,u=e,l=r,d=n.get(),f=0;function p(n){return u=n,g}function m(n){return l=n,g}const g={direction:function(){return c},duration:function(){return u},velocity:function(){return i},seek:function(){const e=t.get()-n.get();let r=0;return u?(i+=e/u,i*=l,d+=i,n.add(i),r=d-f):(i=0,n.set(t),r=e),c=a(r),f=d,o=s(e)<.001,g},settled:function(){return o},useBaseFriction:function(){return m(r)},useBaseDuration:function(){return p(e)},useFriction:m,useDuration:p};return g}(xn,wn,j,.68),En=I(z,fn,an,pn,wn),On=function(n,t,e,r,o,i,c){function u(r){const u=r.distance,s=r.index!==t.get();i.add(u),u&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),s&&(e.set(t.get()),t.set(r.index),c.emit("select"))}return{distance:function(n,t){u(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);u(r.byIndex(o.get(),e))}}}(yn,mn,gn,En,Sn,wn,u),Ln=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(pn),Dn=w(),In=F(t,e,u,H),{slideRegistry:An}=function(n,t,e,r,o,i){const{groupSlides:c}=o,{min:u,max:s}=r;return{slideRegistry:function(){const r=c(i);return!e||t<=n?r:r.slice(u,s).map(((n,t,e)=>{const r=!t,o=!r&&t===p(e);return r?m(f(e[0])+1):o?m(p(i)-f(e)[0]+1,f(e)[0]):n}))}()}}(Y,an,_,dn,cn,hn),Mn=function(n,t,e,r,i,c){let u=0;function s(n){"Tab"===n.code&&(u=(new Date).getTime())}function a(s){c.add(s,"focus",(()=>{if((new Date).getTime()-u>10)return;n.scrollLeft=0;const c=t.indexOf(s),a=e.findIndex((n=>n.includes(c)));o(a)&&(i.useDuration(0),r.index(a,0))}),{passive:!0,capture:!0})}return{init:function(){c.add(document,"keydown",s,!1),t.forEach(a)}}}(n,e,An,On,Sn,Dn),Tn={ownerDocument:r,ownerWindow:i,eventHandler:u,containerRect:W,slideRects:J,animation:yn,axis:X,direction:Q,dragHandler:S(X,Q,n,r,i,wn,E(X,i),xn,yn,On,Sn,En,mn,u,K,V,B,C,.68,$),eventStore:Dn,percentOfView:K,index:mn,indexPrevious:gn,limit:pn,location:xn,offsetLocation:bn,options:c,resizeHandler:O(t,u,i,e,X,G),scrollBody:Sn,scrollBounds:L(pn,xn,wn,Sn,K),scrollLooper:D(an,pn,bn,[xn,bn,wn]),scrollProgress:Ln,scrollSnapList:fn.map(Ln.get),scrollSnaps:fn,scrollTarget:En,scrollTo:On,slideLooper:T(X,Q,Y,an,tn,en,un,fn,bn,e),slideFocus:Mn,slidesHandler:k(t,u,U),slidesInView:In,slideIndexes:hn,slideRegistry:An,slidesToScroll:cn,target:wn,translate:M(X,Q,t)};return Tn}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};function j(n){function t(n,t){return h(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=g(r).filter((t=>n.matchMedia(t).matches)).map((n=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o)},optionsMediaQueries:function(t){return t.map((n=>g(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}};return e}function V(n,t,e){const r=n.ownerDocument,o=r.defaultView,c=j(o),u=function(n){let t=[];return{init:function(e,r){return t=r.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),r.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(c),a=w(),l=w(),d=function(){const n={};let t;function e(t){return n[t]||[]}const r={init:function(n){t=n},emit:function(n){return e(n).forEach((e=>e(t,n))),r},off:function(t,o){return n[t]=e(t).filter((n=>n!==o)),r},on:function(t,o){return n[t]=e(t).concat([o]),r}};return r}(),{animationRealms:f}=V,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:g}=c,{on:h,off:y,emit:v}=d,x=k;let b,S,E,O,L=!1,D=p(z,V.globalOptions),I=p(D),A=[];function M(t,e){const i=P(n,E,O,r,o,t,d,e);if(t.loop&&!i.slideLooper.canLoop()){return M(Object.assign({},t,{loop:!1}),e)}return i}function T(t,e){if(L)return;const c=f.find((n=>n.window===o)),d=c||function(n){const t=1e3/60;let e=[],r=null,o=0,i=0;function c(u){r||(r=u);const a=u-r;for(r=u,o+=a;o>=t;)e.forEach((({animation:n})=>n.update())),o-=t;const l=s(o/t);e.forEach((({animation:n})=>n.render(l))),i&&n.requestAnimationFrame(c)}return{start:function(t){e.includes(t)||e.push(t),i||(i=n.requestAnimationFrame(c))},stop:function(t){e=e.filter((n=>n!==t)),e.length||(n.cancelAnimationFrame(i),r=null,o=0,i=0)},reset:function(){r=null,o=0},window:n}}(o);c||f.push(d),D=p(D,t),I=m(D),A=e||A,function(){const{container:t,slides:e}=I,r=i(t)?n.querySelector(t):t;E=r||n.children[0];const o=i(e)?E.querySelectorAll(e):e;O=[].slice.call(o||E.children)}(),b=M(I,d),g([D,...A.map((({options:n})=>n))]).forEach((n=>a.add(n,"change",k))),I.active&&(b.translate.to(b.location.get()),b.slidesInView.init(),b.slideFocus.init(),b.eventHandler.init(H),b.resizeHandler.init(H),b.slidesHandler.init(H),l.add(r,"visibilitychange",(()=>{r.hidden&&d.reset()})),b.options.loop&&b.slideLooper.loop(),E.offsetParent&&O.length&&b.dragHandler.init(H),S=u.init(H,A))}function k(n,t){const e=B();F(),T(p({startIndex:e},n),t),d.emit("reInit")}function F(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),u.destroy(),a.clear(),l.clear()}function R(n,t,e){I.active&&!L&&(b.scrollBody.useBaseFriction().useDuration(t?0:I.duration),b.scrollTo.index(n,e||0))}function B(){return b.index.get()}const H={canScrollNext:function(){return b.index.add(1).get()!==B()},canScrollPrev:function(){return b.index.add(-1).get()!==B()},containerNode:function(){return E},internalEngine:function(){return b},destroy:function(){L||(L=!0,a.clear(),F(),d.emit("destroy"))},off:y,on:h,emit:v,plugins:function(){return S},previousScrollSnap:function(){return b.indexPrevious.get()},reInit:x,rootNode:function(){return n},scrollNext:function(n){R(b.index.add(1).get(),!0===n,-1)},scrollPrev:function(n){R(b.index.add(-1).get(),!0===n,1)},scrollProgress:function(){return b.scrollProgress.get(b.location.get())},scrollSnapList:function(){return b.scrollSnapList},scrollTo:R,selectedScrollSnap:B,slideNodes:function(){return O},slidesInView:function(){return b.slidesInView.get()},slidesNotInView:function(){return b.slidesInView.get(!1)}};return T(t,e),setTimeout((()=>d.emit("init")),0),H}function B(t={},o=[]){const i=n.ref(n.isRef(t)?t.value:t),c=n.ref(n.isRef(o)?o.value:o),u=n.ref(),s=n.ref();function a(){s.value&&s.value.reInit(i.value,c.value)}return n.onMounted((()=>{"undefined"!=typeof window&&window.document&&window.document.createElement&&u.value&&(V.globalOptions=B.globalOptions,s.value=V(u.value,i.value,c.value))})),n.onUnmounted((()=>{s.value&&s.value.destroy()})),n.isRef(t)&&n.watch(t,(n=>{e(i.value,n)||(i.value=n,a())})),n.isRef(o)&&n.watch(o,(n=>{(function(n,t){if(n.length!==t.length)return!1;const o=r(n),i=r(t);return o.every(((n,t)=>e(n,i[t])))})(c.value,n)||(c.value=n,a())})),[u,s]}return V.animationRealms=[],V.globalOptions=void 0,B.globalOptions=void 0,B}));
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselVue=t(n.Vue)}(this,(function(n){"use strict";function t(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function e(n,r){const o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(r.breakpoints||{}))&&o.every((o=>{const i=n[o],c=r[o];return"function"==typeof i?`${i}`==`${c}`:t(i)&&t(c)?e(i,c):i===c}))}function r(n){return n.concat().sort(((n,t)=>n.name>t.name?1:-1)).map((n=>n.options))}function o(n){return"number"==typeof n}function i(n){return"string"==typeof n}function c(n){return"boolean"==typeof n}function u(n){return"[object Object]"===Object.prototype.toString.call(n)}function s(n){return Math.abs(n)}function a(n){return Math.sign(n)}function l(n,t){return s(n-t)}function f(n){return h(n).map(Number)}function d(n){return n[p(n)]}function p(n){return Math.max(0,n.length-1)}function m(n,t){return t===p(n)}function g(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function h(n){return Object.keys(n)}function y(n,t){return[n,t].reduce(((n,t)=>(h(t).forEach((e=>{const r=n[e],o=t[e],i=u(r)&&u(o);n[e]=i?y(r,o):o})),n)),{})}function v(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function x(n,t){const e=s(n-t);function r(t){return t<n}function o(n){return n>t}function i(n){return r(n)||o(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?r(e)?n:t:e},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function b(n,t,e){const{constrain:r}=x(0,n),o=n+1;let i=c(t);function c(n){return e?s((o+n)%o):r(n)}function u(){return i}function a(){return b(n,u(),e)}const l={get:u,set:function(n){return i=c(n),l},add:function(n){return a().set(u()+n)},clone:a};return l}function w(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let c;if("addEventListener"in e)e.addEventListener(r,o,i),c=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),c=()=>n.removeListener(o)}return n.push(c),t},clear:function(){n=n.filter((n=>n()))}};return t}function S(n,t,e,r,o,i,u,f,d,p,m,g,h,y,b,S,E,O,L,D){const{cross:I}=n,A=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=w(),k=w(),F=x(50,225).constrain(b.measure(20)),P={mouse:300,touch:400},z={mouse:500,touch:600},H=S?43:25;let R=!1,V=0,j=0,N=!1,B=!1,C=!1,q=!1;function G(n){const e=u.readPoint(n),r=u.readPoint(n,I),o=l(e,V),c=l(r,j);if(!B&&!q){if(!n.cancelable)return U(n);if(B=o>c,!B)return U(n)}const s=u.pointerMove(n);o>E&&(C=!0),m.useFriction(.3).useDuration(1),d.start(),i.add(t.apply(s)),n.preventDefault()}function U(n){const e=g.byDistance(0,!1).index!==h.get(),r=u.pointerUp(n)*(S?z:P)[q?"mouse":"touch"],o=function(n,t){const e=h.add(-1*a(n)),r=g.byDistance(n,!S).distance;return S||s(n)<F?r:O&&t?.5*r:g.byIndex(e.get(),0).distance}(t.apply(r),e),i=function(n,t){if(0===n||0===t)return 0;if(s(n)<=s(t))return 0;const e=l(s(n),s(t));return s(e/n)}(r,o),c=H-10*i,f=L+i/50;B=!1,N=!1,k.clear(),m.useDuration(c).useFriction(f),p.distance(o,!S),q=!1,y.emit("pointerUp")}function $(n){C&&(n.stopPropagation(),n.preventDefault())}return{init:function(n){if(!D)return;function t(t){(c(D)||D(n,t))&&function(n){const t=v(n,o);if(q=t,t&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return A.includes(t)}(n.target))return;C=S&&t&&!n.buttons&&R,R=l(i.get(),f.get())>=2,N=!0,u.pointerDown(n),m.useFriction(0).useDuration(0),i.set(f),function(){const n=q?r:e;k.add(n,"touchmove",G,M).add(n,"touchend",U).add(n,"mousemove",G,M).add(n,"mouseup",U)}(),V=u.readPoint(n),j=u.readPoint(n,I),y.emit("pointerDown")}(t)}const s=e;T.add(s,"dragstart",(n=>n.preventDefault()),M).add(s,"touchmove",(()=>{}),M).add(s,"touchend",(()=>{})).add(s,"touchstart",t).add(s,"mousedown",t).add(s,"touchcancel",U).add(s,"contextmenu",U).add(s,"click",$,!0)},pointerDown:function(){return N},destroy:function(){T.clear(),k.clear()}}}function E(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(v(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),c=o(n)-o(e)>170;return r=n,c&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),c=o(n)-o(e),u=o(n)-o(r)>170,a=t/c;return c&&!u&&s(a)>.1?a:0},readPoint:i}}function O(n,t,e,r,o,i,u){let a,l,f=[],d=!1;function p(n){return o.measureSize(u.measure(n))}return{init:function(o){if(!i)return;l=p(n),f=r.map(p),a=new ResizeObserver((u=>{d||(c(i)||i(o,u))&&function(i){for(const c of i){const i=c.target===n,u=r.indexOf(c.target),a=i?l:f[u];if(s(p(i?n:r[u])-a)>=.5){e.requestAnimationFrame((()=>{o.reInit(),t.emit("resize")}));break}}}(u)})),[n].concat(r).forEach((n=>a.observe(n)))},destroy:function(){a&&a.disconnect(),d=!0}}}function L(n,t,e,r,o){const i=o.measure(10),c=o.measure(50),u=x(.1,.99);let a=!1;return{constrain:function(o){if(a||!n.reachedAny(e.get())||!n.reachedAny(t.get()))return;const l=n.reachedMin(t.get())?"min":"max",f=s(n[l]-t.get()),d=e.get()-t.get(),p=u.constrain(f/c);e.subtract(d*p),!o&&s(d)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function D(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=x(o,i);return{loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get())}(t))return;const o=n*(-1*t);r.forEach((n=>n.add(o)))}}}function I(n,t,e,r,o){const{reachedAny:i,removeOffset:c,constrain:u}=r;function l(n){return n.concat().sort(((n,t)=>s(n)-s(t)))[0]}function f(t,r){const o=[t,t+e,t-e];if(!n)return o[0];if(!r)return l(o);const i=o.filter((n=>a(n)===r));return i.length?l(i):d(o)-e}return{byDistance:function(e,r){const a=o.get()+e,{index:l,distance:d}=function(e){const r=n?c(e):u(e),o=t.map((n=>n-r)).map((n=>f(n,0))).map(((n,t)=>({diff:n,index:t}))).sort(((n,t)=>s(n.diff)-s(t.diff))),{index:i}=o[0];return{index:i,distance:r}}(a),p=!n&&i(a);return!r||p?{index:l,distance:e}:{index:l,distance:e+f(t[l]-d,0)}},byIndex:function(n,e){return{index:n,distance:f(t[n]-o.get(),e)}},shortcut:f}}function A(n){let t=n;function e(n){return o(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function M(n,t,e){const r="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=e.style;let i=!1;return{clear:function(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))},to:function(n){i||(o.transform=r(t.apply(n)))},toggleActive:function(n){i=!n}}}function T(n,t,e,r,o,i,c,u,s,a){const l=.5,d=f(i),p=f(i).reverse(),m=function(){const n=u[0];return y(h(p,n),r,!1)}().concat(function(){const n=e-u[0]-1;return y(h(d,n),-r,!0)}());function g(n,t){return n.reduce(((n,t)=>n-i[t]),t)}function h(n,t){return n.reduce(((n,e)=>g(n,t)>0?n.concat([e]):n),[])}function y(i,u,f){const d=function(n){return c.map(((t,r)=>({start:t-o[r]+l+n,end:t+e-l+n})))}(u);return i.map((e=>{const o=f?0:-r,i=f?r:0,c=f?"end":"start",u=d[e][c];return{index:e,loopPoint:u,slideLocation:A(-1),translate:M(n,t,a[e]),target:()=>s.get()>u?o:i}}))}return{canLoop:function(){return m.every((({index:n})=>g(d.filter((t=>t!==n)),e)<=.1))},clear:function(){m.forEach((n=>n.translate.clear()))},loop:function(){m.forEach((n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))}))},loopPoints:m}}function k(n,t,e){let r,o=!1;return{init:function(i){e&&(r=new MutationObserver((n=>{o||(c(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function F(n,t,e,r){const o={};let i,c=null,u=null,s=!1;return{init:function(){i=new IntersectionObserver((n=>{s||(n.forEach((n=>{const e=t.indexOf(n.target);o[e]=n})),c=null,u=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:r}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),s=!0},get:function(n=!0){if(n&&c)return c;if(!n&&u)return u;const t=function(n){return h(o).reduce(((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t}),[])}(n);return n&&(c=t),n||(u=t),t}}}function P(n,t,e,r,i,c,u,a,l){const{startEdge:m,endEdge:g}=n,h=o(r);return{groupSlides:function(n){return h?function(n,t){return f(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,r):function(n){return n.length?f(n).reduce(((r,o)=>{const f=d(r)||0,h=0===f,y=o===p(n),v=c[m]-u[f][m],x=c[m]-u[o][g],b=!i&&h?t.apply(a):0;return s(x-(!i&&y?t.apply(l):0)-(v+b))>e&&r.push(o),y&&r.push(n.length),r}),[]).map(((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)})):[]}(n)}}}function z(n,t,e,r,c,u,l,h){const{align:y,axis:v,direction:z,startIndex:H,loop:R,duration:V,dragFree:j,dragThreshold:N,inViewThreshold:B,slidesToScroll:C,skipSnaps:q,containScroll:G,watchResize:U,watchSlides:$,watchDrag:W}=u,J={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:r,offsetHeight:o}=n;return{top:t,right:e+r,bottom:t+o,left:e,width:r,height:o}}},Q=J.measure(t),X=e.map(J.measure),Y=function(n){const t="rtl"===n?-1:1;return{apply:function(n){return n*t}}}(z),K=function(n,t){const e="y"===n?"y":"x";return{scroll:e,cross:"y"===n?"x":"y",startEdge:"y"===e?"top":"rtl"===t?"right":"left",endEdge:"y"===e?"bottom":"rtl"===t?"left":"right",measureSize:function(n){const{width:t,height:r}=n;return"x"===e?t:r}}}(v,z),Z=K.measureSize(Q),_=function(n){return{measure:function(t){return n*(t/100)}}}(Z),nn=function(n,t){const e={start:function(){return 0},center:function(n){return r(n)/2},end:r};function r(n){return t-n}return{measure:function(r,o){return i(n)?e[n](r):n(t,r,o)}}}(y,Z),tn=!R&&!!G,en=R||!!G,{slideSizes:rn,slideSizesWithGaps:on,startGap:cn,endGap:un}=function(n,t,e,r,o,i){const{measureSize:c,startEdge:u,endEdge:a}=n,l=e[0]&&o,f=function(){if(!l)return 0;const n=e[0];return s(t[u]-n[u])}(),p=function(){if(!l)return 0;const n=i.getComputedStyle(d(r));return parseFloat(n.getPropertyValue(`margin-${a}`))}(),g=e.map(c),h=e.map(((n,t,e)=>{const r=!t,o=m(e,t);return r?g[t]+f:o?g[t]+p:e[t+1][u]-n[u]})).map(s);return{slideSizes:g,slideSizesWithGaps:h,startGap:f,endGap:p}}(K,Q,X,e,en,c),sn=P(K,Y,Z,C,R,Q,X,cn,un),{snaps:an,snapsAligned:ln}=function(n,t,e,r,o){const{startEdge:i,endEdge:c}=n,{groupSlides:u}=o,a=u(r).map((n=>d(n)[c]-n[0][i])).map(s).map(t.measure),l=r.map((n=>e[i]-n[i])).map((n=>-s(n))),f=u(l).map((n=>n[0])).map(((n,t)=>n+a[t]));return{snaps:l,snapsAligned:f}}(K,nn,Q,X,sn),fn=-d(an)+d(on),{snapsContained:dn,scrollContainLimit:pn}=function(n,t,e,r){const o=x(-t+n,0),i=e.map(((n,t)=>{const r=!t,i=m(e,t);return r?o.max:i?o.min:o.constrain(n)})).map((n=>parseFloat(n.toFixed(3)))),c=function(){const n=i[0],t=d(i);return x(i.lastIndexOf(n),i.indexOf(t)+1)}();return{snapsContained:function(){if(t<=n)return[o.max];if("keepSnaps"===r)return i;const{min:e,max:u}=c;return i.slice(e,u)}(),scrollContainLimit:c}}(Z,fn,ln,G),mn=tn?dn:ln,{limit:gn}=function(n,t,e){const r=t[0];return{limit:x(e?r-n:d(t),r)}}(fn,mn,R),hn=b(p(mn),H,R),yn=hn.clone(),vn=f(e),xn={start:()=>h.start(Fn),stop:()=>h.stop(Fn),update:()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:r}})=>{r||e.constrain(n.pointerDown()),t.seek()})(Fn),render:n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,scrollLooper:o,slideLooper:i,dragHandler:c,animation:u,eventHandler:s,options:{loop:a}},l)=>{const f=n.velocity(),d=n.settled();d&&!c.pointerDown()&&(u.stop(),s.emit("settle")),d||s.emit("scroll"),r.set(e.get()-f+f*l),a&&(o.loop(n.direction()),i.loop()),t.to(r.get())})(Fn,n)},bn=mn[hn.get()],wn=A(bn),Sn=A(bn),En=A(bn),On=function(n,t,e,r,o){let i=0,c=0,u=r,l=o,f=n.get(),d=0;function p(n){return u=n,g}function m(n){return l=n,g}const g={direction:function(){return c},duration:function(){return u},velocity:function(){return i},seek:function(){const t=e.get()-n.get();let r=0;return u?(i+=t/u,i*=l,f+=i,n.add(i),r=f-d):(i=0,n.set(e),r=t),c=a(r),d=f,g},settled:function(){return s(e.get()-t.get())<.001},useBaseFriction:function(){return m(o)},useBaseDuration:function(){return p(r)},useFriction:m,useDuration:p};return g}(wn,Sn,En,V,.68),Ln=I(R,mn,fn,gn,En),Dn=function(n,t,e,r,o,i){function c(r){const c=r.distance,u=r.index!==t.get();o.add(c),c&&n.start(),u&&(e.set(t.get()),t.set(r.index),i.emit("select"))}return{distance:function(n,t){c(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);c(r.byIndex(o.get(),e))}}}(xn,hn,yn,Ln,En,l),In=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(gn),An=w(),Mn=F(t,e,l,B),{slideRegistry:Tn}=function(n,t,e,r,o,i,c){const{groupSlides:u}=i,{min:s,max:a}=o;return{slideRegistry:function(){const o=u(c);return!e||"keepSnaps"===r||t<=n?o:o.slice(s,a).map(((n,t,e)=>{const r=!t,o=m(e,t);return r?g(d(e[0])+1):o?g(p(c)-d(e)[0]+1,d(e)[0]):n}))}()}}(Z,fn,tn,G,pn,sn,vn),kn=function(n,t,e,r,i,c){let u=0;function s(n){"Tab"===n.code&&(u=(new Date).getTime())}function a(s){c.add(s,"focus",(()=>{if((new Date).getTime()-u>10)return;n.scrollLeft=0;const c=t.indexOf(s),a=e.findIndex((n=>n.includes(c)));o(a)&&(i.useDuration(0),r.index(a,0))}),{passive:!0,capture:!0})}return{init:function(){c.add(document,"keydown",s,!1),t.forEach(a)}}}(n,e,Tn,Dn,On,An),Fn={ownerDocument:r,ownerWindow:c,eventHandler:l,containerRect:Q,slideRects:X,animation:xn,axis:K,direction:Y,dragHandler:S(K,Y,n,r,c,En,E(K,c),wn,xn,Dn,On,Ln,hn,l,_,j,N,q,.68,W),eventStore:An,percentOfView:_,index:hn,indexPrevious:yn,limit:gn,location:wn,offsetLocation:Sn,options:u,resizeHandler:O(t,l,c,e,K,U,J),scrollBody:On,scrollBounds:L(gn,wn,En,On,_),scrollLooper:D(fn,gn,Sn,[wn,Sn,En]),scrollProgress:In,scrollSnapList:mn.map(In.get),scrollSnaps:mn,scrollTarget:Ln,scrollTo:Dn,slideLooper:T(K,Y,Z,fn,rn,on,an,mn,Sn,e),slideFocus:kn,slidesHandler:k(t,l,$),slidesInView:Mn,slideIndexes:vn,slideRegistry:Tn,slidesToScroll:sn,target:En,translate:M(K,Y,t)};return Fn}const H={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};function R(n){function t(n,t){return y(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=h(r).filter((t=>n.matchMedia(t).matches)).map((n=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o)},optionsMediaQueries:function(t){return t.map((n=>h(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}};return e}function V(n,t,e){const r=n.ownerDocument,o=r.defaultView,c=R(o),u=function(n){let t=[];return{init:function(e,r){return t=r.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),r.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(c),a=w(),l=w(),f=function(){const n={};let t;function e(t){return n[t]||[]}const r={init:function(n){t=n},emit:function(n){return e(n).forEach((e=>e(t,n))),r},off:function(t,o){return n[t]=e(t).filter((n=>n!==o)),r},on:function(t,o){return n[t]=e(t).concat([o]),r}};return r}(),{animationRealms:d}=V,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:g}=c,{on:h,off:y,emit:v}=f,x=k;let b,S,E,O,L=!1,D=p(H,V.globalOptions),I=p(D),A=[];function M(t,e){const i=z(n,E,O,r,o,t,f,e);if(t.loop&&!i.slideLooper.canLoop()){return M(Object.assign({},t,{loop:!1}),e)}return i}function T(t,e){if(L)return;const c=d.find((n=>n.window===o)),f=c||function(n){const t=1e3/60;let e=[],r=null,o=0,i=0;function c(u){r||(r=u);const a=u-r;for(r=u,o+=a;o>=t;)e.forEach((({animation:n})=>n.update())),o-=t;const l=s(o/t);e.forEach((({animation:n})=>n.render(l))),i&&n.requestAnimationFrame(c)}return{start:function(t){e.includes(t)||e.push(t),i||(i=n.requestAnimationFrame(c))},stop:function(t){e=e.filter((n=>n!==t)),e.length||(n.cancelAnimationFrame(i),r=null,o=0,i=0)},reset:function(){r=null,o=0},window:n}}(o);c||d.push(f),D=p(D,t),I=m(D),A=e||A,function(){const{container:t,slides:e}=I,r=i(t)?n.querySelector(t):t;E=r||n.children[0];const o=i(e)?E.querySelectorAll(e):e;O=[].slice.call(o||E.children)}(),b=M(I,f),g([D,...A.map((({options:n})=>n))]).forEach((n=>a.add(n,"change",k))),I.active&&(b.translate.to(b.location.get()),b.slidesInView.init(),b.slideFocus.init(),b.eventHandler.init(N),b.resizeHandler.init(N),b.slidesHandler.init(N),l.add(r,"visibilitychange",(()=>{r.hidden&&f.reset()})),b.options.loop&&b.slideLooper.loop(),E.offsetParent&&O.length&&b.dragHandler.init(N),S=u.init(N,A))}function k(n,t){const e=j();F(),T(p({startIndex:e},n),t),f.emit("reInit")}function F(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),u.destroy(),a.clear(),l.clear()}function P(n,t,e){I.active&&!L&&(b.scrollBody.useBaseFriction().useDuration(t?0:I.duration),b.scrollTo.index(n,e||0))}function j(){return b.index.get()}const N={canScrollNext:function(){return b.index.add(1).get()!==j()},canScrollPrev:function(){return b.index.add(-1).get()!==j()},containerNode:function(){return E},internalEngine:function(){return b},destroy:function(){L||(L=!0,a.clear(),F(),f.emit("destroy"))},off:y,on:h,emit:v,plugins:function(){return S},previousScrollSnap:function(){return b.indexPrevious.get()},reInit:x,rootNode:function(){return n},scrollNext:function(n){P(b.index.add(1).get(),!0===n,-1)},scrollPrev:function(n){P(b.index.add(-1).get(),!0===n,1)},scrollProgress:function(){return b.scrollProgress.get(b.location.get())},scrollSnapList:function(){return b.scrollSnapList},scrollTo:P,selectedScrollSnap:j,slideNodes:function(){return O},slidesInView:function(){return b.slidesInView.get()},slidesNotInView:function(){return b.slidesInView.get(!1)}};return T(t,e),setTimeout((()=>f.emit("init")),0),N}function j(t={},o=[]){const i=n.ref(n.isRef(t)?t.value:t),c=n.ref(n.isRef(o)?o.value:o),u=n.ref(),s=n.ref();function a(){s.value&&s.value.reInit(i.value,c.value)}return n.onMounted((()=>{"undefined"!=typeof window&&window.document&&window.document.createElement&&u.value&&(V.globalOptions=j.globalOptions,s.value=V(u.value,i.value,c.value))})),n.onUnmounted((()=>{s.value&&s.value.destroy()})),n.isRef(t)&&n.watch(t,(n=>{e(i.value,n)||(i.value=n,a())})),n.isRef(o)&&n.watch(o,(n=>{(function(n,t){if(n.length!==t.length)return!1;const o=r(n),i=r(t);return o.every(((n,t)=>e(n,i[t])))})(c.value,n)||(c.value=n,a())})),[u,s]}return V.animationRealms=[],V.globalOptions=void 0,j.globalOptions=void 0,j}));
export { EmblaOptionsType } from 'embla-carousel/components/Options';
export { EmblaEventType } from 'embla-carousel/components/EventHandler';
export { EmblaEventType, EmblaEventListType } from 'embla-carousel/components/EventHandler';
export { EmblaPluginType } from 'embla-carousel/components/Plugins';

@@ -4,0 +4,0 @@ export { EmblaCarouselType } from 'embla-carousel/components/EmblaCarousel';

{
"name": "embla-carousel-vue",
"version": "8.0.0-rc14",
"version": "8.0.0-rc15",
"author": "David Jerleke",

@@ -36,31 +36,47 @@ "description": "A lightweight carousel library with fluid motion and great swipe precision",

"components/**/*",
"index.d.ts"
"index.d.ts",
"esm/**/*",
"cjs/**/*"
],
"scripts": {
"test": "echo \"Info: no tests specified\" && exit 0",
"build": "rollup -c",
"start": "rollup -c --watch",
"build": "rollup --bundleConfigAsCjs -c",
"start": "rollup --bundleConfigAsCjs -c --watch",
"eslint:report": "eslint \"src/**/*.{js,tsx,ts}\""
},
"devDependencies": {
"@types/jest": "^27.4.0",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"@types/jest": "^29.5.6",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.5.0",
"prettier": "2.5.1",
"rollup": "^2.68.0",
"ts-jest": "^27.1.3",
"typescript": "^4.5.5",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"prettier": "2.8.8",
"rollup": "^4.1.5",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2",
"vue": "^3.2.37"
},
"dependencies": {
"embla-carousel": "8.0.0-rc14",
"embla-carousel-reactive-utils": "8.0.0-rc14"
"embla-carousel": "8.0.0-rc15",
"embla-carousel-reactive-utils": "8.0.0-rc15"
},
"peerDependencies": {
"vue": "^3.2.37"
},
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./esm/index.d.ts",
"default": "./esm/embla-carousel-vue.esm.js"
},
"require": {
"types": "./cjs/index.d.ts",
"default": "./cjs/embla-carousel-vue.cjs.js"
}
}
}
}

@@ -68,2 +68,3 @@ <br />

<img src="https://www.embla-carousel.com/vue-logo.svg" width="40" height="40" />
</a>
&nbsp;

@@ -86,26 +87,47 @@ <a href="https://www.embla-carousel.com/get-started/svelte/">

<p align="center">
<a href="https://github.com/nikrowell"><img src="https://avatars2.githubusercontent.com/u/260039?s=120&v=4" title="nikrowell" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/michaelrambeau"><img src="https://avatars0.githubusercontent.com/u/5546996?s=120&v=4" title="michaelrambeau" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/ehellman"><img src="https://avatars3.githubusercontent.com/u/586152?s=120&v=4" title="ehellman" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/afilp"><img src="https://avatars0.githubusercontent.com/u/7850073?s=120&v=4" title="afilp" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/mrksmts"><img src="https://avatars1.githubusercontent.com/u/437794?s=120&v=4" title="mrksmts" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/SLMNBJ"><img src="https://avatars2.githubusercontent.com/u/30017004?s=120&v=4" title="SLMNBJ" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/readeral"><img src="https://avatars0.githubusercontent.com/u/15904136?s=120&v=4" title="readeral" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/romellem"><img src="https://avatars2.githubusercontent.com/u/8504000?s=120&v=4" title="romellem" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/niubsta"><img src="https://avatars0.githubusercontent.com/u/270320?s=120&v=4" title="niubsta" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/allen-garvey"><img src="https://avatars1.githubusercontent.com/u/9314727?s=120s&v=4" title="allen-garvey" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/sedlukha"><img src="https://avatars3.githubusercontent.com/u/14075940?s=120&v=4" title="sedlukha" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/wopian"><img src="https://avatars3.githubusercontent.com/u/3440094?s=120&v=4" title="wopian" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/msallent"><img src="https://avatars3.githubusercontent.com/u/8879212?s=120&v=4" title="msallent" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/omarkhatibco"><img src="https://avatars1.githubusercontent.com/u/9054278?s=120&v=4" title="omarkhatibco" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/ppromerojr"><img src="https://avatars1.githubusercontent.com/u/15343254?s=120&v=4" title="ppromerojr" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/openscript"><img src="https://avatars3.githubusercontent.com/u/1105080?s=120&v=4" title="openscript" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/pipisasa"><img src="https://avatars.githubusercontent.com/u/54534600?s=120&v=4" title="pipisasa" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/silllli"><img src="https://avatars.githubusercontent.com/u/9334305?s=120&v=4" title="silllli" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/JoshuaCrewe"><img src="https://avatars.githubusercontent.com/u/12238901?s=120&v=4" title="JoshuaCrewe" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/th-km"><img src="https://avatars.githubusercontent.com/u/35410212?s=120&v=4" title="th-km" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/rojadesign"><img src="https://avatars.githubusercontent.com/u/35687281?s=120&v=4" title="th-km"" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/SaizFerri"><img src="https://avatars.githubusercontent.com/u/19834971?s=120&v=4" title="SaizFerri" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/horseeyephil"><img src="https://avatars.githubusercontent.com/u/32337092?s=120&v=4" title="horseeyephil" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/hamidrezahanafi"><img src="https://avatars.githubusercontent.com/u/91487491?s=120&v=4" title="hamidrezahanafi" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/davidjerleke">
<img src="https://avatars2.githubusercontent.com/u/11529148?s=120&v=4" title="davidjerleke" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/Ronit-gurjar">
<img src="https://avatars2.githubusercontent.com/u/92150685?s=120&v=4" title="Ronit-gurjar" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/xiel">
<img src="https://avatars2.githubusercontent.com/u/615522?s=120&v=4" title="xiel" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/javiergonzalezGenially">
<img src="https://avatars2.githubusercontent.com/u/78730098?s=120&v=4" title="javiergonzalezGenially" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/hamidrezahanafi">
<img src="https://avatars2.githubusercontent.com/u/91487491?s=120&v=4" title="hamidrezahanafi" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/wopian">
<img src="https://avatars2.githubusercontent.com/u/3440094?s=120&v=4" title="wopian" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/nwidynski">
<img src="https://avatars2.githubusercontent.com/u/25958801?s=120&v=4" title="nwidynski" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/openscript">
<img src="https://avatars2.githubusercontent.com/u/1105080?s=120&v=4" title="openscript" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/th-km">
<img src="https://avatars2.githubusercontent.com/u/35410212?s=120&v=4" title="th-km" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/SaizFerri">
<img src="https://avatars2.githubusercontent.com/u/19834971?s=120&v=4" title="SaizFerri" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/allen-garvey">
<img src="https://avatars2.githubusercontent.com/u/9314727?s=120&v=4" title="allen-garvey" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/sedlukha">
<img src="https://avatars2.githubusercontent.com/u/14075940?s=120&v=4" title="sedlukha" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/fcasibu">
<img src="https://avatars2.githubusercontent.com/u/75290989?s=120&v=4" title="fcasibu" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/ishaqibrahimbot">
<img src="https://avatars2.githubusercontent.com/u/74908398?s=120&v=4" title="ishaqibrahimbot" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/JoshuaCrewe">
<img src="https://avatars2.githubusercontent.com/u/12238901?s=120&v=4" title="JoshuaCrewe" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/romellem">
<img src="https://avatars2.githubusercontent.com/u/8504000?s=120&v=4" title="romellem" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/nikrowell">
<img src="https://avatars2.githubusercontent.com/u/260039?s=120&v=4" title="nikrowell" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/horseeyephil">
<img src="https://avatars2.githubusercontent.com/u/32337092?s=120&v=4" title="horseeyephil" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/pipisasa">
<img src="https://avatars2.githubusercontent.com/u/54534600?s=120&v=4" title="pipisasa" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/rojadesign">
<img src="https://avatars2.githubusercontent.com/u/35687281?s=120&v=4" title="rojadesign" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/anzbert">
<img src="https://avatars2.githubusercontent.com/u/38823700?s=120&v=4" title="anzbert" width="50" height="50" style="max-width: 100%" />
</a><a href="https://github.com/silllli">
<img src="https://avatars2.githubusercontent.com/u/9334305?s=120&v=4" title="silllli" width="50" height="50" style="max-width: 100%" />
</a>
</p>

@@ -112,0 +134,0 @@ </div>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc