PageSourceSearch

https://static.mastercontrol.com/assets/js/library/vue3/vue3-carou…?v=f86ac85a4d03e7ab3e5ffe404cd2a0e32a43e7b6

js mastercontrol.com collected 2026-10-02 03:42:26 UTC 13,342 bytes, 12 lines download raw bytes

1"use strict";(()=>{var Re=Object.defineProperty;var ke=(e,n)=>{for(var t in n)Re(e,t,{get:n[t],enumerable:!0})};var oe={};ke(oe,{Carousel:()=>De,Icon:()=>z,Navigation:()=>Ve,Pagination:()=>Le,Slide:()=>Be});var{compile:Pe,Transition:He,TransitionGroup:We,vShow:ze,withModifiers:Ue,withKeys:$e,vModelText:Xe,vModelCheckbox:Fe,vModelRadio:Ye,vModelSelect:Ge,vModelDynamic:Ke,defineCustomElement:qe,defineSSRCustomElement:Qe,VueElement:Je,useHost:Ze,useShadowRoot:et,useCssModule:tt,useCssVars:nt,render:ot,hydrate:at,createApp:rt,createSSRApp:it,ComputedGetter:lt,ComputedRef:st,ComputedSetter:ut,CustomRefFactory:ct,DebuggerEvent:dt,DebuggerEventExtraInfo:vt,DebuggerOptions:ft,DeepReadonly:pt,EffectScheduler:mt,EffectScope:ht,MaybeRef:gt,MaybeRefOrGetter:St,Raw:yt,Reactive:bt,ReactiveEffect:wt,ReactiveEffectOptions:xt,ReactiveEffectRunner:Tt,ReactiveFlags:Ct,Ref:Rt,ShallowReactive:kt,ShallowRef:Et,ShallowUnwrapRef:_t,ToRef:Mt,ToRefs:At,TrackOpTypes:Ot,TriggerOpTypes:Nt,UnwrapNestedRefs:Dt,UnwrapRef:It,WatchCallback:Vt,WatchEffect:Lt,WatchHandle:Bt,WatchSource:jt,WatchStopHandle:Pt,WritableComputedOptions:Ht,WritableComputedRef:Wt,customRef:zt,effect:Ut,effectScope:$t,getCurrentScope:Xt,getCurrentWatcher:Ft,isProxy:Yt,isReactive:Gt,isReadonly:Kt,isRef:qt,isShallow:Qt,markRaw:Jt,onScopeDispose:Zt,onWatcherCleanup:en,proxyRefs:tn,reactive:_,readonly:nn,ref:s,shallowReactive:on,shallowReadonly:an,shallowRef:rn,stop:ln,toRaw:sn,toRef:un,toRefs:cn,toValue:dn,triggerRef:vn,unref:fn,camelize:pn,capitalize:mn,normalizeClass:hn,normalizeProps:gn,normalizeStyle:Sn,toDisplayString:yn,toHandlerKey:bn,computed:ee,nextTick:he,queuePostFlushCb:wn,defineProps:xn,defineEmits:Tn,defineExpose:Cn,defineOptions:Rn,defineSlots:kn,defineModel:En,withDefaults:_n,useSlots:Mn,useAttrs:An,withDirectives:On,Suspense:Nn,useTransitionState:Dn,BaseTransitionPropsValidators:In,BaseTransition:Vn,resolveTransitionHooks:Ln,setTransitionHooks:Bn,getTransitionRawChildren:jn,createRenderer:Pn,createHydrationRenderer:Hn,KeepAlive:Wn,onActivated:zn,onDeactivated:Un,onBeforeMount:$n,onMounted:ge,onBeforeUpdate:Xn,onUpdated:Fn,onBeforeUnmount:Yn,onUnmounted:Se,onServerPrefetch:Gn,onRenderTriggered:Kn,onRenderTracked:qn,onErrorCaptured:Qn,provide:w,inject:m,hasInjectionContext:Jn,defineComponent:P,Teleport:Zn,resolveComponent:eo,resolveDynamicComponent:to,resolveDirective:no,Fragment:ye,Text:oo,Comment:ao,Static:ro,openBlock:io,setBlockTracking:lo,createElementBlock:so,createBlock:uo,isVNode:co,transformVNodeArgs:vo,createBaseVNode:fo,createVNode:po,guardReactiveProps:mo,cloneVNode:te,createTextVNode:ho,createStaticVNode:go,createCommentVNode:So,mergeProps:yo,getCurrentInstance:bo,registerRuntimeCompiler:wo,isRuntimeOnly:xo,watchEffect:To,watchPostEffect:Co,watchSyncEffect:Ro,watch:H,hydrateOnIdle:ko,hydrateOnVisible:Eo,hydrateOnMediaQuery:_o,hydrateOnInteraction:Mo,defineAsyncComponent:Ao,useModel:Oo,useTemplateRef:No,useId:Do,h:p,ssrContextKey:Io,useSSRContext:Vo,ErrorCodes:Lo,callWithErrorHandling:Bo,callWithAsyncErrorHandling:jo,handleError:Po,initCustomFormatter:Ho,pushScopeId:Wo,popScopeId:zo,withScopeId:Uo,withCtx:$o,renderList:Xo,toHandlers:Fo,renderSlot:Yo,createSlots:Go,withMemo:Ko,isMemoSame:qo,version:Qo,warn:Jo,devtools:Zo,setDevtoolsHook:ea,DeprecationTypes:ta,createElementVNode:na}=globalThis.Vue;var h={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0},be={itemsToShow:{default:h.itemsToShow,type:Number},itemsToScroll:{default:h.itemsToScroll,type:Number},wrapAround:{default:h.wrapAround,type:Boolean},throttle:{default:h.throttle,type:Number},snapAlign:{default:h.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:h.transition,type:Number},breakpoints:{default:h.breakpoints,type:Object},autoplay:{default:h.autoplay,type:Number},pauseAutoplayOnHover:{default:h.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:h.mouseDrag,type:Boolean},touchDrag:{default:h.touchDrag,type:Boolean},dir:{default:h.dir,validator(e){return["rtl","ltr"].includes(e)}},settings:{default(){return{}},type:Object}};function Ee({config:e,slidesCount:n}){let{snapAlign:t,wrapAround:l,itemsToShow:i=1}=e;if(l)return Math.max(n-1,0);let r;switch(t){case"start":r=n-i;break;case"end":r=n-1;break;case"center":case"center-odd":r=n-Math.ceil((i-.5)/2);break;case"center-even":r=n-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function _e({config:e,slidesCount:n}){let{wrapAround:t,snapAlign:l,itemsToShow:i=1}=e,r=0;if(t||i>n)return r;switch(l){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function ne({val:e,max:n,min:t}){return n<t?e:Math.min(Math.max(e,t),n)}function Me({config:e,currentSlide:n,slidesCount:t}){let{snapAlign:l,wrapAround:i,itemsToShow:r=1}=e,c=n;switch(l){case"center":case"center-odd":c-=(r-1)/2;break;case"center-even":c-=(r-2)/2;break;case"end":c-=r-1;break}return i?c:ne({val:c,max:t-r,min:0})}function we(e){return e?e.reduce((n,t)=>{var l;return t.type===ye?[...n,...we(t.children)]:((l=t.type)===null||l===void 0?void 0:l.name)==="CarouselSlide"?[...n,t]:n},[]):[]}function W({val:e,max:n,min:t=0}){return e>n?W({val:e-(n+1),max:n,min:t}):e<t?W({val:e+(n+1),max:n,min:t}):e}function Ae(e,n){let t;return n?function(...l){let i=this;t||(e.apply(i,l),t=!0,setTimeout(()=>t=!1,n))}:e}function Oe(e,n){let t;return function(...l){t&&clearTimeout(t),t=setTimeout(()=>{e(...l),t=null},n)}}var Ne=P({name:"ARIA",setup(){let e=m("currentSlide",s(0)),n=m("slidesCount",s(0));return()=>p("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},`Item ${e.value+1} of ${n.value}`)}}),De=P({name:"Carousel",props:be,setup(e,{slots:n,emit:t,expose:l}){var i;let r=s(null),c=s([]),g=s(0),d=s(0),a=_(Object.assign({},h)),S=Object.assign({},h),b,u=s((i=e.modelValue)!==null&&i!==void 0?i:0),M=s(0),D=s(0),k=s(0),A=s(0),E,U;w("config",a),w("slidesCount",d),w("currentSlide",u),w("maxSlide",k),w("minSlide",A),w("slideWidth",g);
1function $(){b=Object.assign({},e.breakpoints),S=Object.assign(Object.assign(Object.assign({},S),e),{breakpoints:void 0}),ae(S)}function I(){if(!b||!Object.keys(b).length)return;let o=Object.keys(b).map(v=>Number(v)).sort((v,x)=>+x-+v),f=Object.assign({},S);o.some(v=>{let x=window.matchMedia(`(min-width: ${v}px)`).matches;return x&&(f=Object.assign(Object.assign({},f),b[v])),x}),ae(f)}function ae(o){Object.entries(o).forEach(([f,v])=>a[f]=v)}let re=Oe(()=>{I(),O()},16);function O(){if(!r.value)return;let o=r.value.getBoundingClientRect();g.value=o.width/a.itemsToShow}function X(){d.value<=0||(D.value=Math.ceil((d.value-1)/2),k.value=Ee({config:a,slidesCount:d.value}),A.value=_e({config:a,slidesCount:d.value}),a.wrapAround||(u.value=ne({val:u.value,max:k.value,min:A.value})))}ge(()=>{he(()=>O()),setTimeout(()=>O(),1e3),I(),ue(),window.addEventListener("resize",re,{passive:!0}),t("init")}),Se(()=>{U&&clearTimeout(U),E&&clearInterval(E),window.removeEventListener("resize",re,{passive:!0})});let y=!1,V={x:0,y:0},L={x:0,y:0},T=_({x:0,y:0}),B=s(!1),F=s(!1),xe=()=>{B.value=!0},Te=()=>{B.value=!1};function ie(o){["INPUT","TEXTAREA","SELECT"].includes(o.target.tagName)||(y=o.type==="touchstart",y||o.preventDefault(),!(!y&&o.button!==0||C.value)&&(V.x=y?o.touches[0].clientX:o.clientX,V.y=y?o.touches[0].clientY:o.clientY,document.addEventListener(y?"touchmove":"mousemove",le,!0),document.addEventListener(y?"touchend":"mouseup",se,!0)))}let le=Ae(o=>{F.value=!0,L.x=y?o.touches[0].clientX:o.clientX,L.y=y?o.touches[0].clientY:o.clientY;let f=L.x-V.x,v=L.y-V.y;T.y=v,T.x=f},a.throttle);function se(){let o=a.dir==="rtl"?-1:1,f=Math.sign(T.x)*.4,v=Math.round(T.x/g.value+f)*o;if(v&&!y){let x=q=>{q.stopPropagation(),window.removeEventListener("click",x,!0)};window.addEventListener("click",x,!0)}R(u.value-v),T.x=0,T.y=0,F.value=!1,document.removeEventListener(y?"touchmove":"mousemove",le,!0),document.removeEventListener(y?"touchend":"mouseup",se,!0)}function ue(){!a.autoplay||a.autoplay<=0||(E=setInterval(()=>{a.pauseAutoplayOnHover&&B.value||j()},a.autoplay))}function ce(){E&&(clearInterval(E),E=null),ue()}let C=s(!1);function R(o){let f=a.wrapAround?o:ne({val:o,max:k.value,min:A.value});u.value===f||C.value||(t("slide-start",{slidingToIndex:o,currentSlideIndex:u.value,prevSlideIndex:M.value,slidesCount:d.value}),C.value=!0,M.value=u.value,u.value=f,U=setTimeout(()=>{if(a.wrapAround){let v=W({val:f,max:k.value,min:0});v!==u.value&&(u.value=v,t("loop",{currentSlideIndex:u.value,slidingToIndex:o}))}t("update:modelValue",u.value),t("slide-end",{currentSlideIndex:u.value,prevSlideIndex:M.value,slidesCount:d.value}),C.value=!1,ce()},a.transition))}function j(){R(u.value+a.itemsToScroll)}function Y(){R(u.value-a.itemsToScroll)}let de={slideTo:R,next:j,prev:Y};w("nav",de),w("isSliding",C);let ve=ee(()=>Me({config:a,currentSlide:u.value,slidesCount:d.value}));w("slidesToScroll",ve);let Ce=ee(()=>{let o=a.dir==="rtl"?-1:1,f=ve.value*g.value*o;return{transform:`translateX(${T.x-f}px)`,transition:`${C.value?a.transition:0}ms`,margin:a.wrapAround?`0 -${d.value*g.value}px`:"",width:"100%"}});function fe(){$(),I(),X(),O(),ce()}Object.keys(be).forEach(o=>{["modelValue"].includes(o)||H(()=>e[o],fe)}),H(()=>e.modelValue,o=>{o!==u.value&&R(Number(o))}),H(d,X),t("before-init"),$();let pe={config:a,slidesCount:d,slideWidth:g,next:j,prev:Y,slideTo:R,currentSlide:u,maxSlide:k,minSlide:A,middleSlide:D};l({updateBreakpointsConfigs:I,updateSlidesData:X,updateSlideWidth:O,initDefaultConfigs:$,restartCarousel:fe,slideTo:R,next:j,prev:Y,nav:de,data:pe});let G=n.default||n.slides,K=n.addons,me=_(pe);return()=>{let o=we(G?.(me)),f=K?.(me)||[];o.forEach((Q,J)=>Q.props.index=J);let v=o;if(a.wrapAround){let Q=o.map((Z,N)=>te(Z,{index:-o.length+N,isClone:!0,key:`clone-before-${N}`})),J=o.map((Z,N)=>te(Z,{index:o.length+N,isClone:!0,key:`clone-after-${N}`}));v=[...Q,...o,...J]}c.value=o,d.value=Math.max(o.length,1);let x=p("ol",{class:"carousel__track",style:Ce.value,onMousedownCapture:a.mouseDrag?ie:null,onTouchstartPassiveCapture:a.touchDrag?ie:null},v),q=p("div",{class:"carousel__viewport"},x);
1return p("section",{ref:r,class:{carousel:!0,"is-sliding":C.value,"is-dragging":F.value,"is-hover":B.value,"carousel--rtl":a.dir==="rtl"},dir:a.dir,"aria-label":"Gallery",tabindex:"0",onMouseenter:xe,onMouseleave:Te},[q,f,p(Ne)])}}}),Ie={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"},z=e=>{let n=e.name;if(!n||typeof n!="string")return;let t=Ie[n],l=p("path",{d:t}),i=e.title||n,r=p("title",i);return p("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img",ariaLabel:i},[r,l])};z.props={name:String,title:String};var Ve=(e,{slots:n,attrs:t})=>{let{next:l,prev:i}=n||{},r=m("config",_(Object.assign({},h))),c=m("maxSlide",s(1)),g=m("minSlide",s(1)),d=m("currentSlide",s(1)),a=m("nav",{}),{dir:S,wrapAround:b}=r,u=S==="rtl",M=p("button",{type:"button",class:["carousel__prev",!b&&d.value<=g.value&&"carousel__prev--disabled",t?.class],"aria-label":"Navigate to previous slide",onClick:a.prev},i?.()||p(z,{name:u?"arrowRight":"arrowLeft"})),D=p("button",{type:"button",class:["carousel__next",!b&&d.value>=c.value&&"carousel__next--disabled",t?.class],"aria-label":"Navigate to next slide",onClick:a.next},l?.()||p(z,{name:u?"arrowLeft":"arrowRight"}));return[M,D]},Le=()=>{let e=m("maxSlide",s(1)),n=m("minSlide",s(1)),t=m("currentSlide",s(1)),l=m("nav",{}),i=c=>W({val:t.value,max:e.value,min:0})===c,r=[];for(let c=n.value;c<e.value+1;c++){let g=p("button",{type:"button",class:{"carousel__pagination-button":!0,"carousel__pagination-button--active":i(c)},"aria-label":`Navigate to slide ${c+1}`,onClick:()=>l.slideTo(c)}),d=p("li",{class:"carousel__pagination-item",key:c},g);r.push(d)}return p("ol",{class:"carousel__pagination"},r)},Be=P({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:n}){let t=m("config",_(Object.assign({},h))),l=m("currentSlide",s(0)),i=m("slidesToScroll",s(0)),r=m("isSliding",s(!1)),c=()=>e.index===l.value,g=()=>e.index===l.value-1,d=()=>e.index===l.value+1,a=()=>{let S=Math.floor(i.value),b=Math.ceil(i.value+t.itemsToShow-1);return e.index>=S&&e.index<=b};return()=>{var S;return p("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":a(),"carousel__slide--active":c(),"carousel__slide--prev":g(),"carousel__slide--next":d(),"carousel__slide--sliding":r.value},"aria-hidden":!a()},(S=n.default)===null||S===void 0?void 0:S.call(n))}}});window.VueCarousel=oe;})();
2/*! Bundled license information:
3
4vue3-carousel/dist/carousel.es.js:
5  (**
6   * Vue 3 Carousel 0.3.0
7   * (c) 2023
8   * @license MIT
9   *)
10*/
11
12//# sourceMappingURL=https://static.mastercontrol.com/assets/js/library/vue3/vue3-carousel.min.js.map?v=f86ac85a4d03e7ab3e5ffe404cd2a0e32a43e7b6

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.