/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.mdnd.PureSource"],["require","dojo.dnd.Selector"],["require","dojo.dnd.Manager"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.mdnd.PureSource"]){_4._hasResource["dojox.mdnd.PureSource"]=true;_4.provide("dojox.mdnd.PureSource");_4.require("dojo.dnd.Selector");_4.require("dojo.dnd.Manager");_4.declare("dojox.mdnd.PureSource",_4.dnd.Selector,{horizontal:false,copyOnly:true,skipForm:false,withHandles:false,isSource:true,targetState:"Disabled",generateText:true,constructor:function(_7,_8){_4.mixin(this,_4.mixin({},_8));var _9=this.accept;this.isDragging=false;this.mouseDown=false;this.sourceState="";_4.addClass(this.node,"dojoDndSource");if(this.horizontal){_4.addClass(this.node,"dojoDndHorizontal");}this.topics=[_4.subscribe("/dnd/cancel",this,"onDndCancel"),_4.subscribe("/dnd/drop",this,"onDndCancel")];},onDndCancel:function(){this.isDragging=false;this.mouseDown=false;delete this.mouseButton;},copyState:function(_a){return this.copyOnly||_a;},destroy:function(){_6.mdnd.PureSource.superclass.destroy.call(this);_4.forEach(this.topics,_4.unsubscribe);this.targetAnchor=null;},markupFactory:function(_b,_c){_b._skipStartup=true;return new _6.mdnd.PureSource(_c,_b);},onMouseMove:function(e){if(this.isDragging){return;}_6.mdnd.PureSource.superclass.onMouseMove.call(this,e);var m=_4.dnd.manager();if(this.mouseDown&&!this.isDragging&&this.isSource){var _d=this.getSelectedNodes();if(_d.length){m.startDrag(this,_d,this.copyState(_4.isCopyKey(e)));this.isDragging=true;}}},onMouseDown:function(e){if(this._legalMouseDown(e)&&(!this.skipForm||!_4.dnd.isFormElement(e))){this.mouseDown=true;this.mouseButton=e.button;_6.mdnd.PureSource.superclass.onMouseDown.call(this,e);}},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;_6.mdnd.PureSource.superclass.onMouseUp.call(this,e);}},onOverEvent:function(){_6.mdnd.PureSource.superclass.onOverEvent.call(this);_4.dnd.manager().overSource(this);},onOutEvent:function(){_6.mdnd.PureSource.superclass.onOutEvent.call(this);_4.dnd.manager().outSource(this);},_markDndStatus:function(_e){this._changeState("Source",_e?"Copied":"Moved");},_legalMouseDown:function(e){if(!this.withHandles){return true;}for(var _f=e.target;_f&&!_4.hasClass(_f,"dojoDndItem");_f=_f.parentNode){if(_4.hasClass(_f,"dojoDndHandle")){return true;}}return false;}});}}};});