import{b as t}from"./p-8cd54418.js";import{i as o}from"./p-506221fe.js";import{createGesture as r}from"./p-60fdc1cd.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const s=(s,e,n,c,a)=>{const i=s.ownerDocument.defaultView,p=o(s),m=t=>p?-t.deltaX:t.deltaX;return r({el:s,gestureName:"goback-swipe",gesturePriority:40,threshold:10,canStart:t=>(t=>{const{startX:o}=t;return p?o>=i.innerWidth-50:o<=50})(t)&&e(),onStart:n,onMove:t=>{const o=m(t);c(o/i.innerWidth)},onEnd:o=>{const r=m(o),s=i.innerWidth,e=r/s,n=(t=>p?-t.velocityX:t.velocityX)(o),c=n>=0&&(n>.2||r>s/2),f=(c?1-e:e)*s;let d=0;if(f>5){const t=f/Math.abs(n);d=Math.min(t,540)}a(c,e<=0?.01:t(0,e,.9999),d)}})};export{s as createSwipeBackGesture}