function um(){this.Init()}v("AdfDhtmlDnDContext",um);v("AdfDhtmlDnDContext",um);z.l(um,Ka);um.prototype.Init=function(){um.f.Init.call(this);vm(this);this.VN=[];this.Qaa=w.b.ph()==w.ek};z.a("AdfDhtmlDnDContext.prototype.Init",{Init:um.prototype.Init});um.da=function(){var a=w.b;this.CMa=a.getCursor("not-allowed");this.$Ka=a.getCursor("alias");this.PIa=a.getCursor("copy");this.XLa=a.getCursor("default");this.B6a=a.getCursor("inherit")};v("AdfDhtmlDnDContext.InitClass",um.da);
um.prototype.xA=function(a){B.J(a,J);B.J(a.QI(),$a);this.VN.push(a);D.i.finer("Add drop component",a," New count:",this.VN.length)};z.a("AdfDhtmlDnDContext.prototype.__addComponentTarget",{xA:um.prototype.xA});um.prototype.AA=function(a){B.J(a,J);var b=ya.Of(this.VN,a);D.i.finer("Remove drop component",a," New count:",this.VN.length);B.assert(-1!=b,"Could not find component in components array");if((b=this.pba)&&b.d()===a)this.pba=n};z.a("AdfDhtmlDnDContext.prototype.__removeComponentTarget",{AA:um.prototype.AA});
um.prototype.s8=function(a){B.J(a,J);var b=this.ug;b&&b.d()==a&&(this.ug=n)};z.a("AdfDhtmlDnDContext.prototype.__removeDragSource",{s8:um.prototype.s8});um.prototype.im=function(){return this.$f!=n};z.a("AdfDhtmlDnDContext.prototype.isDragging",{im:um.prototype.im});um.prototype.j8=function(){return this.GB!=n};z.a("AdfDhtmlDnDContext.prototype.__isDragPrepped",{j8:um.prototype.j8});um.prototype.Fe=r("ug");z.a("AdfDhtmlDnDContext.prototype.getDragSource",{Fe:um.prototype.Fe});
um.prototype.Zj=function(){var a=this.$f;return a?a.M1a:n};z.a("AdfDhtmlDnDContext.prototype.getTransferable",{Zj:um.prototype.Zj});um.prototype.mJ=function(){var a=this.$f;return a?a.Xza:Ka.lb};z.a("AdfDhtmlDnDContext.prototype.getSourceActions",{mJ:um.prototype.mJ});um.prototype.yy=function(){var a=this.$f;return a?a.Rx:Ka.lb};z.a("AdfDhtmlDnDContext.prototype.getUserAction",{yy:um.prototype.yy});
um.prototype.vs=function(a,b){B.s(a);var d=this.$f;B.assert(d,"setDropTargetProperty only allowed when dragging");B.s(a);d=d.IW;B.assert(d,"setAdfDropTargetProperty only allowed when we have a possible DropTarget");d[a]=b};z.a("AdfDhtmlDnDContext.prototype.setDropTargetProperty",{vs:um.prototype.vs});
um.prototype.yn=function(a){B.s(a);var b=this.$f;B.assert(b,"getDropTargetProperty only allowed when dragging");b=b.IW;B.assert(b,"getAdfDropTargetProperty only allowed when we have a possible DropTarget");return b[a]};z.a("AdfDhtmlDnDContext.prototype.getDropTargetProperty",{yn:um.prototype.yn});um.prototype.xR=function(){var a=this.$f;return a?a.O1a:n};z.a("AdfDhtmlDnDContext.prototype.getTriggerEvent",{xR:um.prototype.xR});
um.prototype.Nd=function(a,b,d,e,f,g,h,m){B.J(a,oa);B.J(b,jb);B.assert(this.$f==n,"Already dragging");B.df(d);B.assert(d!=Ka.lb,"At least one action must be allowed");B.assert(0==(d&~Ka.Fv),"allowedActions includes an undefined action flag");this.yua=this.ug.Qj(a);e==k&&(e=d&Ka.mg?Ka.mg:d&Ka.Ig?Ka.Ig:Ka.hq);B.assert(e==Ka.mg||e==Ka.Ig||e==Ka.hq,"defaultAction contains an invalid value");B.assert(0!=(d&e),"Default action not an allowed action");B.df(g);B.df(h);"auto"==m&&(m=n);var q={};q.O1a=a;q.M1a=
b;q.Xza=d;q.k8a=m;q.Rx=Ka.lb;q.N9=e;q.e8a=n;q.ul=n;q.pba=n;q.XTa={};q.IW=n;q.qba=n;this.$f=q;B.assert(!this.CB);this.CB=p;D.i.finer("start drag: transferable:",b);f?(a=wm(this),b=F.c,!f.dir&&b.Ma().Oa()&&(f.dir="rtl"),b.zEa(a,f),b=f.offsetWidth,f=f.offsetHeight,q.Bua=b,q.uua=f,q.hya=0>g?0:b<g?b:g,q.iya=0>h?0:f<h?f:h):(a=n,q.Bua=0,q.uua=0,q.hya=0,q.iya=0);q.Cua=a;F.c.Oia(xm(this),"no-drop")};z.a("AdfDhtmlDnDContext.prototype.startDrag",{Nd:um.prototype.Nd});
function ym(a){B.assert(a.ug,"Aborting drag from an invalid drag state");D.i.fine("Abort drag of:",a.ug);var b=a.$f;if(b){b.Rx=Ka.lb;if(b=b.ul){try{b.Oh(a)}catch(d){D.i.ee(d,"DropTarget.dragExit() failed")}zm(b,p)}Am(a,p)}else a.GB&&vm(a)}
um.prototype.f8=function(a){B.J(a,I);var b=D.i;if(!this.$f){if(!this.GB&&w.b.cj(a)){var d;B.J(a,I);b:{B.J(a,I);var e=a.getSource();for(B.J(e,J);e!=n&&"oracle.adf.RichPopup"!==e.getComponentType();){var f=e.Fe();if(f)try{if(f.lf(this,a)){d=f;break b}}catch(g){D.i.ee(g,"dragSource.isAvailable() failed")}e=e.getParent()}d=n}B.Vi(d,Za);e=this.ug;B.Vi(d,Za);d!=e?D.i.finest("Change drag source from:",e," to ",d):d=e;this.ug=d}if(d=this.ug)if(e=d.Sfa(),f=this.GB){F.c.jy();var h=l;try{h=e.fI(f,a)}catch(m){b.ee(m,
"Recognizer abort prep failed")}if(h)ym(this),a=f.uS.Q(),O.Lp(a)&&!O.Vl()&&O.ra(a);else{b.finest("recognize drag for ",f," ",a);h=n;try{h=e.QJ(f,a)}catch(q){b.ee(q,"Drag recognition failed")}if(h){this.GB=n;b.fine("initiate drag of ",d," for event:",h);w.b.vd(F.c.mc.body);try{d.XC(this,h)}catch(s){b.ee(s,"Drag initiation failed"),aa(s)}this.$f!=n&&Bm(this,a.L())}}}else{f=n;try{f=e.Vk(this,d,a)}catch(y){b.ee(y,"Drag prep failed")}f&&(b.finer("drag prep context:",f),this.GB=f)}}};
z.a("AdfDhtmlDnDContext.prototype.__handleInputEvent",{f8:um.prototype.f8});um.prototype.bf=function(a){B.s(a);D.i.finer("Set cursor to:",a);w.b.setCursor(F.c.jy(),a)};um.t_a=function(a,b,d){return(a=M.Ib(a))?w.b.gD(a,b,d):p};function wm(a){if(!a.SW){var b=F.c;a.SW=b.iBa(b.mc.body,Hg.jga(),"DragContent");a.SW.dir="ltr"}return a.SW}function vm(a){w.b.Qe(F.c.mc.body);a.ug=n;a.GB=n;a.$f=n}
um.prototype.ma=function(){return um.f.ma.call(this)+"[ dragSource:"+this.ug+" prepContext:"+this.GB+" drag context:"+this.$f+" drag div:"+this.SW+"]"};z.a("AdfDhtmlDnDContext.prototype.toDebugString",{ma:um.prototype.ma});
function Bm(a,b){if(!a.CB){var d=a.$f;B.assert(d,"Not in dragging state");var e=w.b,f=e.Qb(b);d.qba=f;var g=d.ul,h;a:{h=f.x;for(var m=f.y,q=a.VN,s=q.length-1;0<=s;s--){var y=q[s];if(um.t_a(y,h,m)){h=y.QI();break a}}h=n}B.Vi(h,$a);m=a.ug;q=D.i;if(h!=g){if(q.finest("Attempt to change drop target changed from:",g," to ",h),g&&Cm(a,Ka.lb,p),h&&(a.pba=h,g=h.d().e(),s=d.XTa,y=s[g],y||(y={},s[g]=y),d.IW=y,a.Jw(h,b,"acceptDragEnter",f),d.Rx!=Ka.lb)){B.bc&&q.finest("New drop target:",h);d.ul=h;zm(h,l);try{m.cfa(a)}catch(A){q.ee(A,
"dragSource.isAvailable() failed")}}}else if(h&&(a.Jw(h,b,"acceptDragOver",f),d.Rx!=Ka.lb))try{m.dfa(a)}catch(C){q.ee(C,"dragSource.dragOver() failed")}g=f.x-d.hya;0>g&&(g=0);f=f.y-d.iya;0>f&&(f=0);d.Cua&&(h=d.Cua.style,m=g+d.Bua,q=f+d.uua,s=e.R(),m-=e.aj(s),q-=e.Tk(s),0<m&&(g-=m),0<q&&(f-=q),h.left=g+"px",h.top=f+"px");d.m8a=g;d.n8a=f}}
um.prototype.Jw=function(a,b,d,e){B.J(a,$a);e==n&&(e=w.b.Qb(b));var f=Ka.lb,g=this.$f;B.assert(g,"No dragging context");b.ctrlKey&&b.shiftKey?f=Ka.hq:b.ctrlKey?f=Ka.Ig:b.shiftKey&&(f=Ka.mg);f&=g.Xza;f==Ka.lb&&(f=g.N9);b=D.i;b.finest("Initial Proposed action:",f);g=Ka.lb;try{g=a[d](this,f,e.x,e.y),B.bc&&Ka.kI(g)}catch(h){b.ee(h,"DropTarget."+d+"() failed")}b.finest("User action:",g);Cm(this,g,"acceptDropActionChanged"==d)};
function Cm(a,b,d){B.bc&&Ka.kI(b);var e=a.$f,f=e.Rx;if(b!=f){var g=D.i;e.Rx=b;var h="auto";switch(b){case Ka.lb:h=um.CMa;break;case Ka.hq:h=um.$Ka;break;case Ka.Ig:h=um.PIa;break;case Ka.mg:h=um.XLa}g.finer("New cursor:",h);a.bf(h);if(b!=Ka.lb){if(d)try{a.ug.ffa(a)}catch(m){g.ee(m,"dragSource.dropActionChanged() failed")}}else if(f!=Ka.lb){try{a.ug.Oh(a)}catch(q){g.ee(q,"dragSource.dragExit() failed")}b=e.ul;B.assert(b,"Must have drop target if had user action");try{b.Oh(a)}catch(s){g.ee(s,"dropTarget.dragExit() failed")}g.finer("Clear out old dropTarget:",
b);zm(b,p);e.ul=n;e.IW=n}}}function zm(a,b){B.J(a,$a);var d=a.d(),e=d.k();e!=n?(e.bind(d),(b?H.n:H.F)(e.h(),M.vka)):B.assert(b===p,"Orphanned component when adding CSS style")}function Am(a,b){B.assert(a.$f,"Not in dragging state");var d=a.ug;if(d!=n){d.Or(a.yua);delete a.yua;try{d.Sr(a,a.yy())}catch(e){D.i.ee(e,"dragSource.dragDropEnd() failed")}}var d=w.b,f=F.c;f.PCa(wm(a));vm(a);d.G()==w.aa&&!b?a.CB=l:f.B0(xm(a))}function Dm(a,b){a.CB||(ym(a),w.ld(b))}
um.Yda=function(a){Bm(F.c.fg(),a);w.ld(a);return p};um.Y9=function(a){var b=F.c.fg();if(b.CB)F.c.B0(xm(b)),b.CB=p;else{var d=b.$f;B.assert(d,"Not in dragging state");if(d.Rx!=Ka.lb){var e=d.ul;B.assert(e,"Must have a valid drop target to drop");var f=w.b.Qb(a),g=Ka.lb;try{g=e.mh(b,d.Rx,f.x,f.y),zm(e,p),B.bc&&Ka.kI(g)}catch(h){D.i.ee(h,"dropTarget.drop() failed")}Cm(b,g,p)}Am(b,l)}w.ld(a);return p};
um.ESa=function(a){var b=F.c.fg();if(!b.CB)if(B.assert(b.$f,"Not in dragging state"),27==a.keyCode)Dm(b,a);else{var d=b.$f,e=d.ul;e&&b.Jw(e,a,"acceptDropActionChanged",d.qba)}};um.RF=function(a){return Dm(F.c.fg(),a)};um.W1a=function(a){var b=F.c.fg(),d=b.ul;d&&b.Jw(d,a,"acceptDropActionChanged",this.qba)};um.d8a=function(){F.c.fg().c8a()};
um.$Qa=function(a){if(a.pageX===k)return l;var b=document.documentElement;0==b.offsetHeight&&(b=document.body);if(w.b.Kc(b,a.clientX,a.clientY))return l;Dm(F.c.fg(),a);return p};function xm(a){um.g5==n&&(um.g5=a.Qaa?{touchmove:um.Yda,touchend:um.Y9,touchstart:um.RF}:{mouseout:um.$Qa,mousemove:um.Yda,mouseup:um.Y9,keydown:um.ESa,touchmove:um.Yda,touchend:um.Y9,touchcancel:um.RF,touchstart:um.RF,keyup:um.W1a});return um.g5}um.g5=n;F.c.Qra();