function oi(a,b,d){this.Init(a,b,d)}m("AdfSwipeSupport",oi);r.v(oi);
oi.ga=function(){this.Co=1;m("AdfSwipeSupport.DIRECTION_LEFT",oi.Co);this.Vs=2;m("AdfSwipeSupport.DIRECTION_RIGHT",oi.Vs);this.cJ=3;m("AdfSwipeSupport.DIRECTION_UP",oi.cJ);this.bJ=4;m("AdfSwipeSupport.DIRECTION_DOWN",oi.bJ);this.Mca="panstart";m("AdfSwipeSupport.PANSTART_CALLBACK",oi.Mca);this.dE="panning";m("AdfSwipeSupport.PANNING_CALLBACK",oi.dE);this.x0="panend";m("AdfSwipeSupport.PANEND_CALLBACK",oi.x0);this.Lca="pancancel";m("AdfSwipeSupport.PANCANCEL_CALLBACK",oi.Lca);this.jK="swipe";m("AdfSwipeSupport.SWIPE_CALLBACK",
oi.jK);this.eda="mouseSupport";m("AdfSwipeSupport.SUPPORT_MOUSE",oi.eda);this.MODE="mode";m("AdfSwipeSupport.MODE",oi.MODE);this.VJ=1;m("AdfSwipeSupport.MODE_VERTICAL",oi.VJ);this.lba="cp";m("AdfSwipeSupport.CALLBACK_PARAM",oi.lba);this.y6a=.3;this.UEa=10;this.I2a=3;this.kFa="AFPrivateTouchActionPanX";this.lFa="AFPrivateTouchActionPanY";this.EFa="AFPrivateUserSelectNone"};m("AdfSwipeSupport.InitClass",oi.ga);
oi.prototype.Init=function(a,b,d){oi.h.Init.call(this);this.xb=a;this.Hia=b;this.WPa=d&&d[oi.eda];this.Pc=d&&d[oi.MODE]===oi.VJ;this.DHa=d&&d[oi.lba];this.Npa=void 0===window.ontouchstart;C.w(a,this.Pc?oi.kFa:oi.lFa);this.Npa?(this.WNa=this.D(this.rgb),a.addEventListener("pointerdown",this.WNa,!1)):(this.oQa=this.D(this.WF),a.addEventListener("touchstart",this.oQa,!1));this.WPa&&(C.w(a,oi.EFa),this.h6=this.D(this.yM),a.addEventListener("mousedown",this.h6,!1))};
r.a("AdfSwipeSupport.prototype.Init",{Init:oi.prototype.Init});oi.prototype.release=function(){this.Br&&DC(this);var a=this.xb;this.DHa=this.Hia=this.xb=null;this.Npa?a.removeEventListener("pointerdown",this.WNa,!1):a.removeEventListener("touchstart",this.oQa,!1);C.O(a,this.Pc?oi.kFa:oi.lFa);this.WPa&&(a.removeEventListener("mousedown",this.h6,!1),C.O(a,oi.EFa))};r.a("AdfSwipeSupport.prototype.release",{release:oi.prototype.release});k=oi.prototype;
k.rgb=function(a){if("touch"==a.pointerType)if(this.XNa)try{this.Br&&EC(this,a)}finally{DC(this)}else this.XNa=a.pointerId,FC(this,a)};k.WF=function(a){1<a.touches.length||FC(this,a)};k.yM=function(a){FC(this,a)};
function FC(a,b){if(!a.NB&&!oi.DPa(b)){var d=q.b.Xb(b);a.sna=d.x;a.tna=d.y;a.NB=Date.now();"mousedown"==b.type?(a.cka=!0,a.wB=a.D(a.rx),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.rx),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.rx),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 DC(a){a.Br=!1;a.PIa=null;a.sna=null;a.tna=null;a.NB=null;a.XNa=null;a.cka?(document.removeEventListener("mousemove",a.wB,!1),document.removeEventListener("mouseup",a.vB,!0)):a.Npa?(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.cka=!1}
k.rx=function(a){if(oi.DPa(a))try{this.Br&&EC(this,a)}finally{DC(this)}else{var b=q.b.Xb(a);if(this.Br)a.cancelable&&q.b.preventDefault(a),d=oi.dE,b=GC(this,d,a,b),HC(this,d,b);else if(d=this.Pc?b.y-this.tna:b.x-this.sna,Math.abs(d)>(this.cka?oi.I2a:oi.UEa)){this.Br=!0;this.PIa=0>d?this.Pc?oi.cJ:oi.Co:this.Pc?oi.bJ:oi.Vs;var d=oi.Mca,b=GC(this,d,a,b);HC(this,d,b);a.cancelable&&q.b.preventDefault(a)}}};
k.UF=function(a){if(this.Br){var b=oi.x0;a=GC(this,b,a);oi.sib(a)&&(b=oi.jK,a.type=b);try{HC(this,b,a)}finally{DC(this)}}else DC(this)};k.h5=function(a){try{this.Br&&EC(this,a)}finally{DC(this)}};function EC(a,b){var d,e=oi.Lca;d?d.type=e:d=GC(a,e,b);HC(a,e,d)}oi.sib=function(a){return a.Lta===a.direction&&a.Vaa>oi.y6a&&Math.abs(a.vja)>oi.UEa};oi.DPa=function(a){var b=A.c,d=b.Dg();return a.defaultPrevented||b.rl()||d&&d.rl()};
function GC(a,b,d,e){e||(e=q.b.Xb(d));var f={};f.type=b;f.deltaX=e.x-a.sna;f.deltaY=e.y-a.tna;f.vja=a.Pc?f.deltaY:f.deltaX;f.rpb=Date.now()-a.NB;f.Vaa=Math.abs(f.vja/f.rpb);f.direction=a.PIa;f.Lta=0>f.vja?a.Pc?oi.cJ:oi.Co:a.Pc?oi.bJ:oi.Vs;f.Lwb=d;return f}function HC(a,b,d){(b=a.Hia&&a.Hia[b])&&b(d,a.DHa)};