Files
appco_dist/.output/public/_nuxt/CaCT6U3Y.js
T
2025-07-26 22:08:43 +03:30

2 lines
1.8 KiB
JavaScript

import{e as A,a as D,c as x}from"./C9RWQoPp.js";import{h as F,i as I}from"./C-yDzX_d.js";function W($){let{swiper:o,extendParams:T,on:q}=$;T({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),A({effect:"coverflow",swiper:o,on:q,setTranslate:()=>{const{width:l,height:E,slides:a,slidesSizesGrid:d}=o,t=o.params.coverflowEffect,s=o.isHorizontal(),S=o.translate,z=s?-S+l/2:-S+E/2,b=s?t.rotate:-t.rotate,O=t.depth,M=F(o);for(let f=0,H=a.length;f<H;f+=1){const r=a[f],h=d[f],P=r.swiperSlideOffset,v=(z-P-h/2)/h,e=typeof t.modifier=="function"?t.modifier(v):v*t.modifier;let p=s?b*e:0,w=s?0:b*e,m=-O*Math.abs(e),i=t.stretch;typeof i=="string"&&i.indexOf("%")!==-1&&(i=parseFloat(t.stretch)/100*h);let g=s?0:i*e,y=s?i*e:0,u=1-(1-t.scale)*Math.abs(e);Math.abs(y)<.001&&(y=0),Math.abs(g)<.001&&(g=0),Math.abs(m)<.001&&(m=0),Math.abs(p)<.001&&(p=0),Math.abs(w)<.001&&(w=0),Math.abs(u)<.001&&(u=0);const X=`translate3d(${y}px,${g}px,${m}px) rotateX(${M(w)}deg) rotateY(${M(p)}deg) scale(${u})`,Y=D(t,r);if(Y.style.transform=X,r.style.zIndex=-Math.abs(Math.round(e))+1,t.slideShadows){let n=s?r.querySelector(".swiper-slide-shadow-left"):r.querySelector(".swiper-slide-shadow-top"),c=s?r.querySelector(".swiper-slide-shadow-right"):r.querySelector(".swiper-slide-shadow-bottom");n||(n=x("coverflow",r,s?"left":"top")),c||(c=x("coverflow",r,s?"right":"bottom")),n&&(n.style.opacity=e>0?e:0),c&&(c.style.opacity=-e>0?-e:0)}}},setTransition:l=>{o.slides.map(a=>I(a)).forEach(a=>{a.style.transitionDuration=`${l}ms`,a.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>{d.style.transitionDuration=`${l}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}export{W as E};