function qi(a,b,d){this.Init(a,b,d)}m("AdfSwipeSupport",qi);r.v(qi);
qi.ga=function(){this.Do=1;m("AdfSwipeSupport.DIRECTION_LEFT",qi.Do);this.Ws=2;m("AdfSwipeSupport.DIRECTION_RIGHT",qi.Ws);this.cJ=3;m("AdfSwipeSupport.DIRECTION_UP",qi.cJ);this.bJ=4;m("AdfSwipeSupport.DIRECTION_DOWN",qi.bJ);this.Oca="panstart";m("AdfSwipeSupport.PANSTART_CALLBACK",qi.Oca);this.dE="panning";m("AdfSwipeSupport.PANNING_CALLBACK",qi.dE);this.x0="panend";m("AdfSwipeSupport.PANEND_CALLBACK",qi.x0);this.Nca="pancancel";m("AdfSwipeSupport.PANCANCEL_CALLBACK",qi.Nca);this.jK="swipe";m("AdfSwipeSupport.SWIPE_CALLBACK",
qi.jK);this.gda="mouseSupport";m("AdfSwipeSupport.SUPPORT_MOUSE",qi.gda);this.MODE="mode";m("AdfSwipeSupport.MODE",qi.MODE);this.VJ=1;m("AdfSwipeSupport.MODE_VERTICAL",qi.VJ);this.nba="cp";m("AdfSwipeSupport.CALLBACK_PARAM",qi.nba);this.B6a=.3;this.YEa=10;this.N2a=3;this.oFa="AFPrivateTouchActionPanX";this.pFa="AFPrivateTouchActionPanY";this.IFa="AFPrivateUserSelectNone"};m("AdfSwipeSupport.InitClass",qi.ga);
qi.prototype.Init=function(a,b,d){qi.h.Init.call(this);this.xb=a;this.Kia=b;this.aQa=d&&d[qi.gda];this.Qc=d&&d[qi.MODE]===qi.VJ;this.HHa=d&&d[qi.nba];this.Rpa=void 0===window.ontouchstart;C.w(a,this.Qc?qi.oFa:qi.pFa);this.Rpa?(this.aOa=this.D(this.sgb),a.addEventListener("pointerdown",this.aOa,!1)):(this.tQa=this.D(this.WF),a.addEventListener("touchstart",this.tQa,!1));this.aQa&&(C.w(a,qi.IFa),this.h6=this.D(this.yM),a.addEventListener("mousedown",this.h6,!1))};
r.a("AdfSwipeSupport.prototype.Init",{Init:qi.prototype.Init});qi.prototype.release=function(){this.Cr&&FC(this);var a=this.xb;this.HHa=this.Kia=this.xb=null;this.Rpa?a.removeEventListener("pointerdown",this.aOa,!1):a.removeEventListener("touchstart",this.tQa,!1);C.O(a,this.Qc?qi.oFa:qi.pFa);this.aQa&&(a.removeEventListener("mousedown",this.h6,!1),C.O(a,qi.IFa))};r.a("AdfSwipeSupport.prototype.release",{release:qi.prototype.release});k=qi.prototype;
k.sgb=function(a){if("touch"==a.pointerType)if(this.bOa)try{this.Cr&&GC(this,a)}finally{FC(this)}else this.bOa=a.pointerId,HC(this,a)};k.WF=function(a){1<a.touches.length||HC(this,a)};k.yM=function(a){HC(this,a)};
function HC(a,b){if(!a.NB&&!qi.IPa(b)){var d=q.b.Xb(b);a.vna=d.x;a.wna=d.y;a.NB=Date.now();"mousedown"==b.type?(a.fka=!0,a.wB=a.D(a.sx),document.addEventListener("mousemove",a.wB,!1),a.vB=a.D(a.UF),document.addEventListener("mouseup",a.vB,!0)):"pointerdown"==b.type?(a.wB=a.D(a.sx),document.addEventListener("pointermove",a.wB,!1),a.vB=a.D(a.UF),document.addEventListener("pointerup",a.vB,!1),a.UW=a.D(a.h5),a.xb.addEventListener("pointercancel",a.UW,!1)):(a.wB=a.D(a.sx),a.xb.addEventListener("touchmove",
a.wB,!1),a.vB=a.D(a.UF),a.xb.addEventListener("touchend",a.vB,!1),a.UW=a.D(a.h5),a.xb.addEventListener("touchcancel",a.UW,!1))}}
function FC(a){a.Cr=!1;a.UIa=null;a.vna=null;a.wna=null;a.NB=null;a.bOa=null;a.fka?(document.removeEventListener("mousemove",a.wB,!1),document.removeEventListener("mouseup",a.vB,!0)):a.Rpa?(document.removeEventListener("pointermove",a.wB,!1),document.removeEventListener("pointerup",a.vB,!1),document.removeEventListener("pointercancel",a.UW,!1)):(a.xb.removeEventListener("touchmove",a.wB,!1),a.xb.removeEventListener("touchend",a.vB,!1),a.xb.removeEventListener("touchcancel",a.UW,!1));a.fka=!1}
k.sx=function(a){if(qi.IPa(a))try{this.Cr&&GC(this,a)}finally{FC(this)}else{var b=q.b.Xb(a);if(this.Cr)a.cancelable&&q.b.preventDefault(a),d=qi.dE,b=IC(this,d,a,b),JC(this,d,b);else if(d=this.Qc?b.y-this.wna:b.x-this.vna,Math.abs(d)>(this.fka?qi.N2a:qi.YEa)){this.Cr=!0;this.UIa=0>d?this.Qc?qi.cJ:qi.Do:this.Qc?qi.bJ:qi.Ws;var d=qi.Oca,b=IC(this,d,a,b);JC(this,d,b);a.cancelable&&q.b.preventDefault(a)}}};
k.UF=function(a){if(this.Cr){var b=qi.x0;a=IC(this,b,a);qi.tib(a)&&(b=qi.jK,a.type=b);try{JC(this,b,a)}finally{FC(this)}}else FC(this)};k.h5=function(a){try{this.Cr&&GC(this,a)}finally{FC(this)}};function GC(a,b){var d,e=qi.Nca;d?d.type=e:d=IC(a,e,b);JC(a,e,d)}qi.tib=function(a){return a.Pta===a.direction&&a.Xaa>qi.B6a&&Math.abs(a.yja)>qi.YEa};qi.IPa=function(a){var b=A.c,d=b.Dg();return a.defaultPrevented||b.rl()||d&&d.rl()};
function IC(a,b,d,e){e||(e=q.b.Xb(d));var f={};f.type=b;f.deltaX=e.x-a.vna;f.deltaY=e.y-a.wna;f.yja=a.Qc?f.deltaY:f.deltaX;f.rpb=Date.now()-a.NB;f.Xaa=Math.abs(f.yja/f.rpb);f.direction=a.UIa;f.Pta=0>f.yja?a.Qc?qi.cJ:qi.Do:a.Qc?qi.bJ:qi.Ws;f.Nwb=d;return f}function JC(a,b,d){(b=a.Kia&&a.Kia[b])&&b(d,a.HHa)};