var xc=I.ea(I,"AdfDhtmlPopupPeer",!0);m("AdfDhtmlPopupPeer",xc);xc.C=function(){r.bb(AdfRichPopup);this.YK="_shown";this.tT=[AdfRichPopup.Jf,AdfRichPopup.Ed,"leftPosition","topPosition",AdfRichPopup.cg,"mousePosition"];I.ra(this,D.hh,D.Pc,D.Nd)};m("AdfDhtmlPopupPeer.InitSubclass",xc.C);xc.prototype.Ta=function(a){a instanceof ja&&(a=a.X(),Bv(this,a))};r.a("AdfDhtmlPopupPeer.prototype.HandleComponentFocus",{Ta:xc.prototype.Ta});xc.prototype.Lb=function(){var a=q.b.R().activeElement;Bv(this,a)};
r.a("AdfDhtmlPopupPeer.prototype.HandleComponentBlur",{Lb:xc.prototype.Lb});function Bv(a,b){var d=a.f();if(d[I.Zo]&&d[I.Zo][d.g()]){var e=d[I.Zo][d.g()].Ha(),f=A.c.el();C.Nb(e,b)?f.tva(d,e):f.rua(d,e)}}xc.prototype.Yb=function(a){if(a.na()==w.jb&&(a.wc(),a=So.vT(a,!0),null!=a&&(a=To.Ara(a)))){var b=a.g();if(0!=this.f().g().indexOf(b+":")){var b=a.getDefaultCommand(),d=a.m(b);d?ab.F(d,d.getPartialSubmit()):v.l.warning("DefaultCommand with the ID of '"+b+"' is not found for component: "+a)}}};
r.a("AdfDhtmlPopupPeer.prototype.HandleComponentKeyPress",{Yb:xc.prototype.Yb});xc.prototype.K8=function(a){return a.Ula?a.hMa=!0:!1};r.a("AdfDhtmlPopupPeer.prototype.fetchCanceled",{K8:xc.prototype.K8});
xc.prototype.show=function(a,b){u.s(a,G);u.ji(b);if(!this.kb(a)){var d=a.getContentDelivery(),e=d==AdfRichPopup.mwa,d=d==AdfRichPopup.J_,f=null;b&&(f=b[AdfRichPopup.cg]);if(e||d){if(a.Ula){v.l.fine("Waiting on popup content delivery: "+a.g());return}if(!a.k5){d=A.c;e=xc.uU(a.g());d.Df(e,b);var g;null!=f&&(g={},g.launchId=f);this.k_(a,b,!0);a.Ula=!0;(new gh(a,gh.rk,g)).F();return}}d&&delete a.k5;a.hMa?(delete a.hMa,this.Yx(a,!1)):(g=new $b(a,b),a.ki(g),g.Aa()?this.Yx(a,!1):(xc.qMa(a)&&xc.lC(a)&&A.c.ge.sv(a,
!1),b||(b={}),(g=a.getAutoDismissalTimeout())&&!isNaN(g)&&0<g&&(b.autodismissPopupTimeout=1E3*g),g=b.restoreImmediate?!0:!1,b.openedHandler=this.D(this.Uca),b.openedHandlerParam=a,b.animate!=AdfRichPopup.vq&&(b.animate=a.getAnimate(),b.openTransition=xc.Yeb(a),b.closeTransition=xc.Xeb(a)),d||g||this.k_(a,b,!0),this.Yx(a,!0,d||g),this.Wn(a,b)))}};r.a("AdfDhtmlPopupPeer.prototype.show",{show:xc.prototype.show});xc.Yeb=function(a){return xc.eKa(a,"data-afr-open-trns")};
xc.Xeb=function(a){return xc.eKa(a,"data-afr-close-trns")};xc.eKa=function(a,b){return q.b.getAttribute(q.b.getElementById(a.g()),b)};xc.prototype.Yx=function(a,b,d){delete this.jG;a.setProperty(xc.YK,b?a.g():"",!1,!0);d||!this.jG||xc.dG(a)||(new gh(a,gh.XR)).F();delete this.jG};xc.VLa=function(a){u.s(a,AdfRichPopup);if(!xc.dG(a))for(var b=0;b<xc.tT.length;b++)a.setProperty("_"+xc.tT[b],"",!1,!0)};
xc.prototype.k_=function(a,b,d){u.s(a,AdfRichPopup);if(b&&!xc.dG(a)){delete this.jG;var e;for(key in b)if(-1<E.indexOf(xc.tT,key)){e="_"+key;var f;"mousePosition"==key?(u.Da(b[key].x,"AdfDhtmlPopupHints.MOUSEPOSITION.x"),u.Da(b[key].y,"AdfDhtmlPopupHints.MOUSEPOSITION.y"),f="x:"+b[key].x+",y:"+b[key].y):f=b[key];a.setProperty(e,f,!1,!0)}!d&&this.jG&&(new gh(a,gh.XR)).F();delete this.jG}};r.a("AdfDhtmlPopupPeer.prototype.syncPrivateProperties",{k_:xc.prototype.k_});
xc.prototype.Lv=function(a){if(!xc.dG(a.getSource()))if(a=a.lP(),a==xc.YK)this.jG=!0;else for(var b=0;b<xc.tT.length;b++)if(a=="_"+xc.tT[b]){this.jG=!0;break}};r.a("AdfDhtmlPopupPeer.prototype.ComponentPropertyChanged",{Lv:xc.prototype.Lv});xc.prototype.Tb=function(a){this.kb(a)&&(a.getContentDelivery()==AdfRichPopup.J_&&delete a.k5,this.Jb(a,a.g()))};r.a("AdfDhtmlPopupPeer.prototype.hide",{Tb:xc.prototype.Tb});
xc.prototype.cancel=function(a){this.kb(a)&&(a.getContentDelivery()==AdfRichPopup.J_&&delete a.k5,this.bk(a,a.g()))};r.a("AdfDhtmlPopupPeer.prototype.cancel",{cancel:xc.prototype.cancel});xc.prototype.kb=function(a){return this.Za(a,a.g())};r.a("AdfDhtmlPopupPeer.prototype.isVisible",{kb:xc.prototype.kb});xc.uU=function(a){u.J(a);return a.split(":").join("$")+"$key"};xc.prototype.Aq=function(a){if(a.getType()==gh.vca){var b=a.getSource();Cv(this,b);a.wc();a.cancel()}else xc.h.Aq.call(this,a)};
r.a("AdfDhtmlPopupPeer.prototype.DispatchComponentEvent",{Aq:xc.prototype.Aq});function Cv(a,b){b.k5=!0;var d=A.c,e=xc.uU(b.g()),f=d.Qe(e);d.Df(e,null);u.ji(f);delete b.Ula;a.show(b,f)}xc.prototype.bra=function(a){var b=this.f();if(a){var d=A.c,e=xc.uU(b.g()),f=d.Qe(e);f&&E.Rb(a,f);d.Df(e,a)}a&&a.restoreImmediate?Cv(this,b):(new gh(b,gh.vca)).F()};xc.prototype.fireContentDeliveryNotify=xc.prototype.bra;r.a("AdfDhtmlPopupPeer.prototype.fireContentDeliveryNotify",{bra:xc.prototype.bra});
xc.prototype.ka=function(a){xc.dG(a)&&""===a.K(xc.YK)&&(a=xc.uU(a.g())+"$hidden",A.c.Df(a,!0))};r.a("AdfDhtmlPopupPeer.prototype.ComponentRemoved",{ka:xc.prototype.ka});xc.lC=function(a){a=I.j(a.g(),"content");return q.b.getElementById(a)};m("AdfDhtmlPopupPeer.getContentDom",xc.lC);xc.prototype.Wn=function(a,b){var d=xc.lC(a),e={};a.Y3&&E.Rb(e,a.Y3);b&&E.Rb(e,b);var f=this.qV(a,e);null!=f?f.show(e):this.He(a,d,e,a.g())};
xc.prototype.qV=function(a,b){var d=null,e=b.type;if(null==e||"menu"==e)a.dh(this.Spa,this,!0),this.IF&&(d=this.IF.o(),delete this.IF);return d};xc.prototype.Spa=function(a){var b=A.c.Y();if(b.AdfRichRegion&&a instanceof AdfRichRegion)return 0;b.AdfRichMenu&&a instanceof AdfRichMenu&&(this.IF=a);return 2};
xc.prototype.ob=function(a,b){if(b){var d=q.b,e=xc.oib(a,b);if(!e){xc.VLa(a);var f=xc.gGa(a,b);this.Yx(a,!1,f)}d.getElementById(a.g()).appendChild(b);e||(new Xb(a)).F()}else xc.VLa(a),this.Yx(a,!1),(new Xb(a)).F()};r.a("AdfDhtmlPopupPeer.prototype.PopupClosed",{ob:xc.prototype.ob});xc.gGa=function(a,b){u.s(a,AdfRichPopup);u.u(b);var d="true"==b.getAttribute(V.gha);b.removeAttribute(V.gha);var e=!1;d&&(e=xc.qMa(a)&&A.c.ge.QH(a),d=new Wb(a,e),e&&A.c.ge.sv(a,!1),e=d.aa(),d.F(!0));return e};
xc.dG=function(a){u.s(a,AdfRichPopup);return a.getAutoCancel()==AdfRichPopup.bwa?!0:!1};xc.oib=function(a,b){u.s(a,AdfRichPopup);u.u(b);var d="true"==b.getAttribute(V.xT),d=!xc.dG(a)&&d;b.removeAttribute(V.xT);return d};xc.prototype.Uca=function(a){(new Zb(a)).F()};r.a("AdfDhtmlPopupPeer.prototype.PopupOpened",{Uca:xc.prototype.Uca});xc.Gua=function(a,b){a.Y3=b};m("AdfDhtmlPopupPeer.setChildHints",xc.Gua);
xc.prototype.tb=function(a,b){xc.h.tb.call(this,a,b);if(xc.dG(a)){var d=xc.uU(a.g())+"$hidden";A.c.Qe(d)&&(this.Yx(a,!1,!0),A.c.Df(d,!1))}};r.a("AdfDhtmlPopupPeer.prototype.BindToComponent",{tb:xc.prototype.tb});xc.qMa=function(a){u.s(a,AdfRichPopup);return a.getResetEditableValues()==AdfRichPopup.Yya||(a.K(Wb.hDa)?!0:!1)};xc.prototype.Zb=function(a,b){this.f();xc.h.Zb.call(this,a,b)};r.a("AdfDhtmlPopupPeer.prototype.ReplaceDomElement",{Zb:xc.prototype.Zb});