Fix File
•
/
home
/
sportsfe...
/
httpdocs
/
wp-conte...
/
plugins
/
themify-...
/
themify
/
js
/
modules
/
swiper
/
modules
•
File:
free-mode.min.js
•
Content:
var TF_Swiper_FreeMode;(()=>{const e=()=>Date.now();TF_Swiper_FreeMode=class{static key="freeMode";enabled=!0;velocities=[];constructor(e,t){this.params={momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,minimumVelocity:.02,...t.freeMode}}touchStart(e){e.setTranslate(e.getTranslate()).setTransition(0),this.velocities=[];let t=-e.translate;e.rtl&&(t*=-1),this.touchEnd(e,t)}touchMove(t,o,i,s,n){const m=t.isHorizontal(),r=this.velocities;0===r.length&&r.push({position:m?o:i,time:t.touchEventsData.touchStartTime}),r.push({position:m?s:n,time:e()})}touchEnd(t,o){const{params:i,wrapperEl:s,rtlTranslate:n,snapGrid:m,touchEventsData:r}=t,a=e()-r.touchStartTime,c=this.params,l=t.minTranslate(),u=t.maxTranslate(),f=Math.abs,h=i.speed,d=t.constructor.elementTransitionEnd;if(o<-l||o>-u){let e=t.activeIndex;return o>-u&&(e=t.slides.length<m.length?m.length-1:t.slides.length-1),void t.slideTo(e)}if(c.momentum){if(this.velocities.length>1){const o=this.velocities.pop(),i=this.velocities.pop(),s=o.time-i.time;t.velocity=(o.position-i.position)/s/2,(f(t.velocity)<c.minimumVelocity||s>150||e()-o.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=c.momentumVelocityRatio,this.velocities=[];let o,a=1e3*c.momentumRatio,M=t.translate+t.velocity*a,p=!1,v=f(t.velocity)*c.momentumBounceRatio*20;if(n&&(M*=-1),M<u||M>l){const e=M<u,s=e?u:l;if(c.momentumBounce){const t=e?u-v:l+v;(e&&M<t||!e&&M>t)&&(M=t),o=s,r.allowMomentumBounce=p=!0}else M=s;i.loop&&i.centeredSlides&&t.once("transitionEnd",(()=>{t.loopFix()}))}else if(c.sticky){let e;for(let t=0;t<m.length;++t)if(m[t]>-M){e=t;break}M="next"===t.swipeDirection||f(m[e]-M)<f(m[e-1]-M)?-m[e]:-m[e-1]}if(0!==t.velocity)if(c.sticky){const e=f((n?-M:M)-t.translate),o=t.slidesSizesGrid[t.activeIndex];a=e<o?h:e<2*o?1.5*h:2.5*h}else a=f((M*(n?-1:1)-t.translate)/t.velocity);else if(c.sticky)return void t.slideToClosest();c.momentumBounce&&p?(t.updateProgress(o).setTransition(a).setTranslate(M).transitionStart(!0,t.swipeDirection).animating=!0,d(s,a).then((()=>{t?.el&&r.allowMomentumBounce&&(t.emit("momentumBounce"),setTimeout((()=>{t.setTranslate(o),d(s,h).then((()=>{t.transitionEnd()}))}),0))}))):t.velocity?(t.emit("_freeModeNoMomentumRelease").updateProgress(M).setTransition(a).setTranslate(M).transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,d(s,a).then((()=>{t.transitionEnd()})))):t.updateProgress(M),t.updateActiveIndex().updateSlidesClasses()}else if(c.sticky)return void t.slideToClosest();t.emit("_freeModeNoMomentumRelease"),(!c.momentum||a>=i.longSwipesMs)&&t.emit("_freeModeStaticRelease").updateProgress().updateActiveIndex().updateSlidesClasses()}}})();
•
Search:
•
Replace:
Function
Edit by line
Download
Information
Rename
Copy
Move
Delete
Chmod
List