8 YUI.add("event-tap",function(e,t){function u(t,n){n=n||e.Object.values(o),e.Array.each(n,function(e){var n=t[e];n&&(n.detach(),t[e]=null)})}var n=e.config.doc,r=e.Event._GESTURE_MAP,i=r.start,s="tap",o={START:"Y_TAP_ON_START_HANDLE",END:"Y_TAP_ON_END_HANDLE",CANCEL:"Y_TAP_ON_CANCEL_HANDLE"};e.Event.define(s,{publishConfig:{preventedFn:function(e){var t=e.target.once("click",function(e){e.preventDefault()});setTimeout(function(){t.detach()},100)}},processArgs:function(e,t){if(!t){var n=e[3];return e.splice(3,1),n}},on:function(e,t,n){t[o.START]=e.on(i,this._start,this,e,t,n)},detach:function(e,t,n){u(t)},delegate:function(e,t,n,r){t[o.START]=e.delegate(i,function(r){this._start(r,e,t,n,!0)},r,this)},detachDelegate:function(e,t,n){u(t)},_start:function(e,t,n,r,i){var s={canceled:!1,eventType:e.type},u=n.preventMouse||!1;if(e.button&&e.button===3)return;if(e.touches&&e.touches.length!==1)return;s.node=i?e.currentTarget:t,e.touches?s.startXY=[e.touches[0].pageX,e.touches[0].pageY]:s.startXY=[e.pageX,e.pageY],e.touches?(n[o.END]=t.once("touchend",this._end,this,t,n,r,i,s),n[o.CANCEL]=t.once("touchcancel",this.detach,this,t,n,r,i,s),n.preventMouse=!0):s.eventType.indexOf("mouse")!==-1&&!u?(n[o.END]=t.once("mouseup",this._end,this,t,n,r,i,s),n[o.CANCEL]=t.once("mousecancel",this.detach,this,t,n,r,i,s)):s.eventType.indexOf("mouse")!==-1&&u?n.preventMouse=!1:s.eventType.indexOf("MSPointer")!==-1&&(n[o.END]=t.once("MSPointerUp",this._end,this,t,n,r,i,s),n[o.CANCEL]=t.once("MSPointerCancel",this.detach,this,t,n,r,i,s))},_end:function(e,t,n,r,i,a){var f=a.startXY,l,c,h=15;n._extra&&n._extra.sensitivity>=0&&(h=n._extra.sensitivity),e.changedTouches?(l=[e.changedTouches[0].pageX,e.changedTouches[0].pageY],c=[e.changedTouches[0].clientX,e.changedTouches[0].clientY]):(l=[e.pageX,e.pageY],c=[e.clientX,e.clientY]),Math.abs(l[0]-f[0])<=h&&Math.abs(l[1]-f[1])<=h&&(e.type=s,e.pageX=l[0],e.pageY=l[1],e.clientX=c[0],e.clientY=c[1],e.currentTarget=a.node,r.fire(e)),u(n,[o.END,o.CANCEL])}})},"3.13.0",{requires:["node-base","event-base","event-touch","event-synthetic"]});