//>>built
define("dojox/dnd/Selector",["dojo","dojox","dojo/dnd/Selector"],function(g,t){return g.declare("dojox.dnd.Selector",g.dnd.Selector,{conservative:!0,isSelected:function(a){a=g.isString(a)?a:a.id;return this.getItem(a)&&this.selected[a]},selectNode:function(a,c){c||this.selectNone();var b=g.isString(a)?a:a.id;this.getItem(b)&&(this._removeAnchor(),this.anchor=g.byId(a),this._addItemClass(this.anchor,"Anchor"),this.selection[b]=1,this._addItemClass(this.anchor,"Selected"));return this},deselectNode:function(a){var c=
g.isString(a)?a:a.id;this.getItem(c)&&this.selection[c]&&(this.anchor===g.byId(a)&&this._removeAnchor(),delete this.selection[c],this._removeItemClass(this.anchor,"Selected"));return this},selectByBBox:function(a,c,b,f,e){e||this.selectNone();this.forInItems(function(d,k){var h=g.byId(k);h&&this._isBoundedByBox(h,a,c,b,f)&&this.selectNode(k,!0)},this);return this},_isBoundedByBox:function(a,c,b,f,e){return this.conservative?this._conservativeBBLogic(a,c,b,f,e):this._liberalBBLogic(a,c,b,f,e)},shift:function(a,
c){var b=this.getSelectedNodes();b&&b.length&&this.selectNode(this._getNodeId(b[b.length-1].id,a),c)},_getNodeId:function(a,c){for(var b=this.getAllNodes(),f=a,e=0,d=b.length;e<d;++e)if(b[e].id==a){d=Math.min(d-1,Math.max(0,e+(c?1:-1)));e!=d&&(f=b[d].id);break}return f},_conservativeBBLogic:function(a,c,b,f,e){a=g.coords(a);if(c>f){var d=c;c=f;f=d}b>e&&(d=b,b=e,e=d);return a.x>=c&&a.x+a.w<=f&&a.y>=b&&a.y+a.h<=e},_liberalBBLogic:function(a,c,b,f,e){var d=g.position(a),k=a=!1,h=d.x,q=d.y,p=d.x+d.w,
r=d.y+d.h;if(c<f){d=c;var n=b}else a=!0,d=f,n=e;if(b<e){k=!0;var l=f;var m=e}else l=c,m=b,d=f,n=e;a&&k&&(l=c,m=e,d=f,n=b);return((h>=d||p<=l)&&d<=p&&l>=h||h<=d&&p>=l)&&(n<=r&&m>=q||r>=m&&q<=m)}})});