function Qi(){this.Init()}m("AdfDhtmlDialogManager",Qi);r.v(Qi);Qi.prototype.Init=function(){Qi.h.Init.call(this);this.JU=[];this.wGa=[];this.Rt=null;var a=q.b;a.R();a.Y();this.CG={};this.CG.Gi=function(){var a=this.alb;a?J.va(a):J.$qa()};this.CG.yaa=function(){};this.CG.g_=function(){}};r.a("AdfDhtmlDialogManager.prototype.Init",{Init:Qi.prototype.Init});Qi.prototype.qj=function(){return this.JU.length};r.a("AdfDhtmlDialogManager.prototype.getElementCount",{qj:Qi.prototype.qj});
Qi.prototype.Yta=function(a){this.JU[this.JU.length]=a;delete this.VN};r.a("AdfDhtmlDialogManager.prototype.registerDialog",{Yta:Qi.prototype.Yta});
function Si(a){var b=-1,d=a.Rt,e=a.VN;if(e)return d&&(b=E.indexOf(e,d)),b;for(var e=[],f=a.JU,g=!1,h=f.length-1;-1<h;h--){var l=f[h];if(g){var n=a,t=l.EH(),y=n.wjb;if(!y){var y=A.c,y=y.m(y.fj),z=y.o();z.bind(y);y=n.wjb=z.uy()}if(t==y){e.splice(e.length-1,0,l);l.vl();d=e[e.length-1];d.rs()&&(f={},f.msgDialog=l,f.modalDialog=d,d.d8(Qi.rmb,f));break}}else{if(l.getModal()&&(g=!0,2==l.P9()))break;-1==b&&d&&l==d&&(b=e.length);e[e.length]=l}}e.reverse();-1<b&&(b=e.length-1-b);g||(e[e.length]=a.CG);a.VN=
e;return b}Qi.rmb=function(a){u.Tc(a,"params is required");var b=a.msgDialog;a=a.modalDialog;u.s(b,Pi,"params.msgDialog]");u.s(a,Pi,"params.modalDialog");a=a.Ee();b.Vua(a&&a.id?a.id:null)};Qi.prototype.CY=function(a){a&&(this.CG.alb=a);a=Si(this);var b=this.VN,d=0;b&&!(1>=b.length)&&(d=-1==a||a+1==b.length?0:a+1,a=b[d])&&(this.jY(a),a.Gi())};r.a("AdfDhtmlDialogManager.prototype.focusNextModelessDialog",{CY:Qi.prototype.CY});
Qi.prototype.Gva=function(a){var b=this.wGa,d=this.JU;Si(this);E.Ig(d,a);E.Ig(b,a);if(a.getModal())for(var e=A.c,f=this.VN,g=f.length-1;0<g;g--){var h=f[g];if(h!=this.CG){var l=h.EH(),n=e.m(l);if(n&&n instanceof AdfRichDialog){var t=n.getParent();if(t&&t instanceof AdfRichDocument&&t.o().uy()==l)continue;l=n.o();l.bind(n);l.M8()}else n=h.jP(),(n=e.m(n))&&n instanceof AdfRichPopup&&n.cancel();E.Ig(d,h);E.Ig(b,h)}}delete this.VN;this.Rt==a&&(this.Rt=null,a=b.length,1<=a&&(this.Rt=b[a-1]).Gi())};
r.a("AdfDhtmlDialogManager.prototype.unregisterDialog",{Gva:Qi.prototype.Gva});Qi.prototype.jY=function(a){var b=this.Rt;if(b==a)return!1;Si(this);var d=this.VN;if(d&&0>E.indexOf(d,a))return!1;b&&this.B8();if(a==this.CG)return!1;this.Rt=a;b=this.wGa;E.Ig(b,a);b.push(a);a.g_();return!0};r.a("AdfDhtmlDialogManager.prototype.activateDialog",{jY:Qi.prototype.jY});Qi.prototype.B8=function(){this.Rt&&(this.Rt.yaa(),this.Rt=null)};r.a("AdfDhtmlDialogManager.prototype.deactivateCurrentDialog",{B8:Qi.prototype.B8});
Qi.$=function(){null==this.Wk&&(this.Wk=new Qi);return this.Wk};m("AdfDhtmlDialogManager.getInstance",Qi.$);Qi.prototype.BH=function(){return this.Rt};r.a("AdfDhtmlDialogManager.prototype.getActiveDialog",{BH:Qi.prototype.BH});