function Sg(){this.Init()}m("AdfColumnDropTarget",Sg);r.v(Sg,Xa);Sg.prototype.Init=function(){Sg.h.Init.call(this,Ia.eh)};r.a("AdfColumnDropTarget.prototype.Init",{Init:Sg.prototype.Init});Sg.prototype.Ji=function(a){Tg(this);return Sg.h.Ji.apply(this,arguments)};r.a("AdfColumnDropTarget.prototype.dragExit",{Ji:Sg.prototype.Ji});Sg.prototype.Og=function(){return Ia.eh};r.a("AdfColumnDropTarget.prototype.GetAllowedActions",{Og:Sg.prototype.Og});
Sg.prototype.mi=function(a){Tg(this);if(null==a.G7||null==a.up)return Ia.Ob;var b=this.f(),d=Ug(a),b=this.ox(b),d=new Vg(b,d.g(),"reorderColumn");d.uaa(a.G7);d.X$(a.up);d.F();delete a.G7;delete a.up;return Ia.Ob};r.a("AdfColumnDropTarget.prototype.drop",{mi:Sg.prototype.mi});Sg.prototype.sf=function(){return[Sg.EBa]};r.a("AdfColumnDropTarget.prototype.GetAllowedFlavors",{sf:Sg.prototype.sf});
Sg.prototype.dO=function(a,b,d,e){var f=Sg.h.dO.apply(this,arguments);if(f!=Ia.Ob){if(!Wg(this,a))return Ia.Ob;var g=a,h=d,l=this.f(),l=this.ox(l),l=I.xm(l),n=l.ownerDocument.createElement("div");n.className=Sg.gZa;var t=n.style;t.position="absolute";t.width="10px";t.overflow="hidden";t.top="0px";t.zIndex=1E3;t.height=l.offsetHeight+"px";q.b.fe(n,80);l.appendChild(n);this.e4=n;Xg(this,g,h)}return f};r.a("AdfColumnDropTarget.prototype.acceptDragEnter",{dO:Sg.prototype.dO});
Sg.prototype.eO=function(a,b,d,e){var f=Sg.h.eO.apply(this,arguments);if(f!=Ia.Ob){if(!Wg(this,a))return Ia.Ob;Xg(this,a,d)}return f};r.a("AdfColumnDropTarget.prototype.acceptDragOver",{eO:Sg.prototype.eO});function Wg(a,b){var d=a.f(),e=Ug(b);return null==e||e==d||a.ox(e)!=a.ox(d)?!1:!0}Sg.prototype.ox=function(a){for(;null!=a;a=a.getParent())if(a instanceof AdfRichTable)return a;return null};function Ug(a){(a=a.ol().uo(Sg.EBa))&&(a=a[0]);return a instanceof AdfRichColumn?a:null}
function Xg(a,b,d){var e=A.c.Ka().La(),f=a.f(),g=a.ox(f),h=I.xm(g),f=a.e4,l=f.style,n=q.b.jc(h);d=Math.max(d-n.x,0);var t=g.o(),g=t.$b(),y,z=S.Ua(g,"t"),B,F=t.nha();0<=F&&(y=S.Ua(g,"d2"),B=S.Ua(y,"t2"));var K,g=0,n=null,P=t.mha();e?(K=h.offsetWidth-z.offsetWidth,y&&d<=K?(K=B,g=-a.Ce,a=t.pha(),t.oha().scrollHeight>a.offsetHeight&&(g+=a.offsetWidth-a.clientWidth)):(h.offsetWidth>z.offsetWidth&&(g=h.offsetWidth-z.offsetWidth),K=z)):d<=z.offsetWidth?K=z:y&&(g=z.offsetWidth,g-=P,K=B);if(null!=K){-1==F&&
(g-=P);for(a=z.rows.length-1;0<=a;--a)for(y=K.rows[a].cells,B=y.length,h=0;h<B;++h)if(t=y[h],t.getAttribute("_afrRoot")&&null==t.getAttribute("_afrRH"))if(cellLeft=t.offsetLeft+g,cellRight=cellLeft+t.offsetWidth,d>=cellLeft&&d<=cellRight-t.offsetWidth/2){b.up=e;b.G7=t.id;n=cellLeft-f.offsetWidth/2;break}else if(d>=cellLeft&&d<=cellRight){b.up=!e;b.G7=t.id;n=cellRight-f.offsetWidth/2;break}null!=n&&(l.left=Math.max(n,0)+"px")}}
function Tg(a){var b=a.ox(a.f()),b=I.xm(b);null!=a.e4&&(b.removeChild(a.e4),delete a.e4)}Sg.EBa=lb.JY(G,"AdfRichColumn");Sg.gZa="AFColumnDropTarget";