var c=true,e=false,i;
(function(d){d.t.q=function(){return this.s(function(){return new i(this)})};i=function(h){function j(b){if(typeof b.touches!=="undefined"){a.e&&console.log("Touchable Touchstart touches length "+b.touches.length);if(b.touches.length!==1&&b.touches.length!==2)return e;if(a.n)return e;a.n=c;if(b.touches.length==1){a.h=c;a.c.x=a.b.x=b.touches[0].clientX;a.c.y=a.b.y=b.touches[0].clientY}else if(b.touches.length==2){a.h=e;if(b.touches[0].clientY>b.touches[1].clientY){a.c.x=a.b.x=b.touches[0].clientX;
a.c.y=a.b.y=b.touches[0].clientY}else{a.c.x=a.b.x=a.touches[1].clientX;a.c.y=a.b.y=a.touches[1].clientY}}a.d.addEventListener("touchmove",f,e);a.d.addEventListener("touchend",g,e)}else{a.e&&console.log("Touchable Touchstart touches length "+b.pageX+" "+b.pageY);a.c.x=a.b.x=b.pageX;a.c.y=a.b.y=b.pageY;d(document).w(f);d(document).z(g)}b.preventDefault();if(a.k){a.e&&console.log("Touchable doubleTap");a.l.j("doubleTap",a);clearTimeout(a.o);a.k=e}else{a.k=c;a.o=setTimeout(function(){a.k=e},500)}a.i=
setTimeout(function(){a.e&&console.log("Touchable longTap");d(a.d).j("longTap",a)},1E3);a.e&&console.log("Touchable Tap");d(a.d).j("tap",a)}function f(b){if(typeof b.touches!=="undefined"){a.e&&console.log("Touchable Touchsmove touches length "+b.touches.length);if(b.touches.length!==1&&b.touches.length!==2)return e;if(b.touches.length==1||a.h){a.a.x=b.touches[0].clientX;a.a.y=b.touches[0].clientY}else if(a.touches.length==2&&!a.h)if(b.touches[0].clientY>b.touches[1].clientY){a.a.x=b.touches[0].clientX;
a.a.y=b.touches[0].clientY}else{a.a.x=b.touches[1].clientX;a.a.y=b.touches[1].clientY}}else{a.a.x=b.pageX;a.a.y=b.pageY}d(a.d).A("webkitAnimate");b.preventDefault();a.f.x=a.a.x-a.b.x;a.f.y=a.a.y-a.b.y;a.g.x=a.a.x-a.c.x;a.g.y=a.a.y-a.c.y;a.m.x+=a.f.x;a.m.y+=a.f.y;a.b.x=a.a.x;a.b.y=a.a.y;a.e&&console.log("Touchable Touchmove self "+a.g.x);d(a.d).j("touchmove",a);a.i&&clearTimeout(a.i)}function g(b){if(typeof b.touches!=="undefined"){if(b.targetTouches.length>0)return e;a.d.removeEventListener("touchmove",
f,c);a.d.removeEventListener("touchend",g,c)}else{d(document).p("mousemove",f);d(document).p("mouseup",g)}b.preventDefault();a.n=e;a.i&&clearTimeout(a.i);a.e&&console.log("Touchable Touchend self "+a.g.x);d(a.d).j("touchend",a);a.e&&console.log("Touchable: touchend")}this.d=h;this.l=d(h);this.h=this.u=this.v=e;this.e=c;this.c={x:0,y:0};this.a={x:0,y:0};this.b={x:0,y:0};this.f={x:0,y:0};this.g={x:0,y:0};this.m={x:0,y:0};var a=this;h.addEventListener("touchstart",j,e);this.l.r("mousedown",j)}})(jQuery);
