text: //>>built
  define("dojo/_base/kernel dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/dom dojo/on dojo/touch dojo/has ../main".split(" "),function(p,q,f,e,r,h,k,t,u){p.experimental("dojox.gesture.Base");e.getObject("gesture",!0,u);return q(null,{defaultEvent:" ",subEvents:[],touchOnly:!1,_elements:null,constructor:function(a){e.mixin(this,a);this.init()},init:function(){this._elements=[];if(!t("touch")&&this.touchOnly)console.warn("Gestures:[",this.defaultEvent,"] is only supported on touch devices!");
  else{var a=this.defaultEvent;this.call=this._handle(a);this._events=[a];f.forEach(this.subEvents,function(b){this[b]=this._handle(a+"."+b);this._events.push(a+"."+b)},this)}},_handle:function(a){var b=this;return function(c,d){var e=arguments;2<e.length&&(c=e[1],d=e[2]);if(c&&(c.nodeType||c.attachEvent||c.addEventListener)){var f=b._add(c,a,d);return{remove:function(){f.remove();b._remove(c,a)}}}return h(c,a,d)}},_add:function(a,b,c){var d=this._getGestureElement(a);if(!d){var d={target:a,data:{},
  handles:{}},f=e.hitch(this,"_process",d,"press"),l=e.hitch(this,"_process",d,"move"),m=e.hitch(this,"_process",d,"release"),n=e.hitch(this,"_process",d,"cancel"),g=d.handles;this.touchOnly?(g.press=h(a,"touchstart",f),g.move=h(a,"touchmove",l),g.release=h(a,"touchend",m),g.cancel=h(a,"touchcancel",n)):(g.press=k.press(a,f),g.move=k.move(a,l),g.release=k.release(a,m),g.cancel=k.cancel(a,n));this._elements.push(d)}d.handles[b]=d.handles[b]?++d.handles[b]:1;return h(a,b,c)},_getGestureElement:function(a){for(var b=
  0,c;b<this._elements.length;b++)if(c=this._elements[b],c.target===a)return c},_process:function(a,b,c){c._locking=c._locking||{};c._locking[this.defaultEvent]||this.isLocked(c.currentTarget)||("INPUT"==c.target.tagName&&"radio"!=c.target.type&&"checkbox"!=c.target.type||"TEXTAREA"==c.target.tagName||c.preventDefault(),c._locking[this.defaultEvent]=!0,this[b](a.data,c))},press:function(a,b){},move:function(a,b){},release:function(a,b){},cancel:function(a,b){},fire:function(a,b){a&&b&&(b.bubbles=!0,
  b.cancelable=!0,h.emit(a,b.type,b))},_remove:function(a,b){if((a=this._getGestureElement(a))&&a.handles){a.handles[b]--;var c=a.handles;f.some(this._events,function(a){return 0<c[a]})||(this._cleanHandles(c),b=f.indexOf(this._elements,a),0<=b&&this._elements.splice(b,1))}},_cleanHandles:function(a){for(var b in a)a[b].remove&&a[b].remove(),delete a[b]},lock:function(a){this._lock=a},unLock:function(){this._lock=null},isLocked:function(a){return this._lock&&a?this._lock!==a&&r.isDescendant(a,this._lock):
  !1},destroy:function(){f.forEach(this._elements,function(a){this._cleanHandles(a.handles)},this);this._elements=null}})});