function Me(a,b,d,e){this.Init(a,b,d,e)}v("AdfShowPopupBehavior",Me);z.l(Me,Da);Me.prototype.za=function(a){var b=this.xc;b?"mouseHover"==b&&(b=I.Qd):b=bb.Lc;a.addEventListener(b,this.wf,this);a=a.e();w.b.getElementById(a).setAttribute("aria-haspopup",l)};z.a("AdfShowPopupBehavior.prototype.initialize",{za:Me.prototype.za});
Me.prototype.B$=function(a){var b=F.c,d=this.tH,e=a.getSource(),f=e.e(),d=e.j(d),g=d.DN;g&&g.launchSourceId==f&&(b.ac(g.timerId),delete d.DN,e.removeEventListener(I.Ve,this.B$,this),a.cancel())};
Me.prototype.wf=function(a){a.cancel();var b=F.c,d=this.xc,e=a.getSource(),f=e.e(),g=e.j(this.tH);if(g){var h=g.DN;if(h){if(h.launchSourceId==f)return;b.ac(h.timerId);delete g.DN}if(g.Qa()){var m=this.AG(g);if(m==n)return;h=m&&m instanceof Ne&&!(m instanceof Oe)?l:p;m=(m=m.XI())&&m==f?l:p;if(h&&!("mouseHover"==d||"mouseMove"==d||"mouseOver"==d||"mouseOut"==d)){if(g.rb(),m)return}else m||g.rb()}var q=this.GRa,m=this.Lw,h={};h[AdfRichPopup.Cf]=f;var s=this.xc==ia.Zk;if(m||q||s)q&&(h[AdfRichPopup.fd]=
q,m||(m=e.e(),q=m.lastIndexOf(":"),-1!=q&&(m=m.substring(q+1)))),m&&((q=e.j(m))?h[AdfRichPopup.pf]=q.e():D.i.warning("Unable to find align component: ",m)),s&&(h.type="menu",h.autodismiss="autodismissMenu",m||(m=w.b.Qb(a.L()),h.mousePosition=m)),"mouseHover"==d&&(h.autodismiss="autodismissMouseOut",h.autodismissMouseOut=h[AdfRichPopup.pf]?h[AdfRichPopup.pf]:h[AdfRichPopup.Cf]);a.getType()==I.Qd?(a=b.oa(this,this.tP,{hints:h,popup:g,source:e},500),g.DN={timerId:a,launchSourceId:f},e.addEventListener(I.Ve,
this.B$,this)):g.show(h)}else D.i.severe("Could not find popup ",this.tH," from component ",e)};z.a("AdfShowPopupBehavior.prototype.fire",{wf:Me.prototype.wf});Me.prototype.tP=function(a){var b=a.popup,d=a.hints;a=a.source;b.Qa()||b.show(d);a.removeEventListener(I.Ve,this.B$,this);delete b.DN};Me.prototype.AG=function(a){var b=a.e(),d=a.k();d.bind(a);a=d.Eu(a);return a==n?n:a[b]};Me.prototype.Init=function(a,b,d,e){Me.f.Init.call(this);B.assert(a!=n);this.tH=a;this.GRa=b;this.Lw=d;this.xc=e};
z.a("AdfShowPopupBehavior.prototype.Init",{Init:Me.prototype.Init});