import{a as m}from"./chunk-YUNOCBLG.js";import{c as p}from"./chunk-VGMJM2GZ.js";import{l as h}from"./chunk-BJ43HUSB.js";import"./chunk-7NPRN4HX.js";import"./chunk-24IZEI4V.js";var W=(o,X,g,w,v)=>{let s=o.ownerDocument.defaultView,n=m(o),l=t=>n?-t.deltaX:t.deltaX;return p({el:o,gestureName:"goback-swipe",gesturePriority:101,threshold:10,canStart:t=>(n=m(o),(e=>{let{startX:r}=e;return n?r>=s.innerWidth-50:r<=50})(t)&&X()),onStart:g,onMove:t=>{let e=l(t);w(e/s.innerWidth)},onEnd:t=>{let e=l(t),r=s.innerWidth,a=e/r,c=(i=>n?-i.velocityX:i.velocityX)(t),d=c>=0&&(c>.2||e>r/2),u=(d?1-a:a)*r,f=0;if(u>5){let i=u/Math.abs(c);f=Math.min(i,540)}v(d,a<=0?.01:h(0,a,.9999),f)}})};export{W as createSwipeBackGesture};
