text: //>>built
  define("dgrid/extensions/DnD","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/aspect dojo/on dojo/topic dojo/has dojo/dnd/Source dojo/dnd/Manager dojo/_base/NodeList put-selector/put ../Selection dojo/has!touch?../util/touch dojo/has!touch?./_DnD-touch-autoscroll xstyle/css!dojo/resources/dnd.css".split(" "),function(k,r,t,l,z,D,A,u,v,w,B,x,C,y){var q=k(v,{grid:null,getObject:function(a){var b=this.grid;return b.store.get(a.id.slice(b.id.length+5))},_legalMouseDown:function(a){return this.inherited(arguments)&&
  a.target!=this.grid.bodyNode},onDrop:function(a,b,d){var c=this,e=this._targetAnchor=this.targetAnchor,f=this.grid,g=f.store;!this.before&&e&&(e=e.nextSibling);e=e&&f.row(e);l.when(e&&g.get(e.id),function(h){if(c!=a)c.onDropExternal(a,b,d,h);else c.onDropInternal(b,d,h)})},onDropInternal:function(a,b,d){var c=this.grid,e=c.store,f=this,g=f._targetAnchor,h;g&&(h=this.before?g.previousSibling:g.nextSibling);g=c.row(a[0]);(b||h!==a[0]&&(d||!g||c.down(g).element!=a[0]))&&a.forEach(function(m){l.when(f.getObject(m),
  function(n){var p=e.getIdentity(n);e[b&&e.copy?"copy":"put"](n,{before:d});f._selectedNodes[p]&&(f._selectedNodes[p]=c.row(p).element)})})},onDropExternal:function(a,b,d,c){var e=this.grid.store,f=a.grid;b.forEach(function(g,h){l.when(a.getObject(g),function(m){d||(f?l.when(f.store.getIdentity(m),function(n){!h&&a.selectNone();a.delItem(g.id);f.store.remove(n)}):a.deleteSelectedNodes());e[e.copy?"copy":"put"](m,{before:c})})})},onDndStart:function(a,b,d){this.inherited(arguments);a==this&&(this.grid.cancelTouchScroll&&
  this.grid.cancelTouchScroll(),w.manager().avatar.node.style.width=this.grid.domNode.offsetWidth/2+"px")},onMouseDown:function(a){u("touch")&&this.isDragging&&1<y.countCurrentTouches(a,this.grid.touchNode)?(A.publish("/dnd/cancel"),w.manager().stopDrag()):this.inherited(arguments)},onMouseMove:function(a){(!u("touch")||1>=y.countCurrentTouches(a,this.grid.touchNode))&&this.inherited(arguments)},checkAcceptance:function(a,b){return a.getObject&&v.prototype.checkAcceptance.apply(this,arguments)},getSelectedNodes:function(){if(!this.grid.selection)return this.inherited(arguments);
  var a=new B,b;for(b in this.grid.selection)a.push(this._selectedNodes[b]);return a}});k=k("dgrid.extensions.DnD",C,{dndSourceType:"dgrid-row",dndParams:null,dndConstructor:q,postMixInProperties:function(){this.inherited(arguments);this.dndParams=r.mixin({accept:[this.dndSourceType]},this.dndParams)},postCreate:function(){function a(c){d[c.id]=c.element}function b(c){delete d[c.id];x(c.element,"!dojoDndItemSelected!dojoDndItemAnchor")}this.inherited(arguments);this.dndSource=new (this.dndConstructor||
  q)(this.bodyNode,r.mixin(this.dndParams,{grid:this,dropParent:this.contentNode}));var d=this.dndSource._selectedNodes={};this.on("dgrid-select",function(c){t.forEach(c.rows,a)});this.on("dgrid-deselect",function(c){t.forEach(c.rows,b)});z.after(this,"destroy",function(){delete this.dndSource._selectedNodes;d=null;this.dndSource.destroy()},!0)},insertRow:function(a){var b=this.inherited(arguments),d="function"==typeof this.getObjectDndType?this.getObjectDndType(a):[this.dndSourceType];x(b,".dojoDndItem");
  this.dndSource.setItem(b.id,{data:a,type:d instanceof Array?d:[d]});return b},removeRow:function(a){this.dndSource.delItem(this.row(a));this.inherited(arguments)}});k.GridSource=q;return k});