var co=I.ea(I,"AdfDhtmlCommandMenuItemPeer");m("AdfDhtmlCommandMenuItemPeer",co);co.C=function(){r.bb(AdfRichCommandMenuItem);r.bb(W);I.ra(this,D.Bd,D.Rg,D.wb,D.Pc,D.Nd,D.Ad,D.Bc);q.b.Dd()&&"Windows"!=q.Ch()||I.ra(this,D.ze,D.gg);I.sb(this,AdfRichCommandMenuItem.DISABLED,AdfRichCommandMenuItem.SELECTED,AdfRichCommandMenuItem.VISIBLE);I.hc(this,AdfRichCommandMenuItem.TEXT);this.jS="_afrGrp";this.df="_busy"};m("AdfDhtmlCommandMenuItemPeer.InitSubclass",co.C);
co.prototype.Init=function(a){a.getParent();co.h.Init.call(this,a);this.Rr=this.xr=!1};r.a("AdfDhtmlCommandMenuItemPeer.prototype.Init",{Init:co.prototype.Init});co.prototype.G=function(a,b){co.h.G.call(this,a,b);var d=a.getAccelerator();null!=d&&I.TC(a,d,this.mp)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.InitDomElement",{G:co.prototype.G});co.prototype.ka=function(a){var b=a.getAccelerator();null!=b&&I.oz(a,b);co.h.ka.call(this,a)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentRemoved",{ka:co.prototype.ka});
co.prototype.Gf=function(){return this.f().getText()};r.a("AdfDhtmlCommandMenuItemPeer.prototype.GetAccessibleName",{Gf:co.prototype.Gf});co.prototype.sc=function(a,b){var d=a.getParent();if(d=window.AdfRichMenu&&d instanceof AdfRichMenu?C.Dc(b)[1]:C.ib(b,"a"))if("antonym"==a.getType()&&(d=C.pa(d)),d)return d=q.b.mc(d),""==d?null:d;u.assert(!1,"Unable to find the element containing the text")};r.a("AdfDhtmlCommandMenuItemPeer.prototype.GetComponentText",{sc:co.prototype.sc});
co.prototype.za=function(a){var b=a.U();if(!b.ctrlKey){var d=q.b.na(b),b=this.f(),e=b.K(co.df);switch(d){case w.jb:this.xr&&!e&&this.mp();this.xr=!1;d=!0;break;case w.gd:this.Rr&&!e&&this.mp();this.Rr=!1;d=!0;break;default:return}d&&a.cancel();(a=b.getParent())&&a instanceof AdfRichMenu&&a.o().Mm()}};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentKeyUp",{za:co.prototype.za});
co.prototype.ma=function(a){if(!a.Aa()&&!this.Me()){var b=a.na();b==w.jb?(this.xr=!0,a.cancel(),a.wc()):b==w.gd&&(this.Rr=!0,a.cancel(),a.wc())}};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentKeyDown",{ma:co.prototype.ma});co.prototype.Ta=function(a){if(!this.Me()){a.cancel();a=this.i();eo.pH();var b=this.f();W.Qi(b)?C.w(a,W.Nh):(W.vs()&&W.cl(!1),W.HC(a))}};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentFocus",{Ta:co.prototype.Ta});
co.prototype.Fa=function(a){!this.Me()&&a.ec()&&(a=this.i(),C.w(a,W.Ie))};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseDown",{Fa:co.prototype.Fa});co.prototype.Ac=function(a){!this.Me()&&a.ec()&&(a=this.i(),C.O(a,W.Ie))};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseUp",{Ac:co.prototype.Ac});
co.prototype.$a=function(a){var b=this.f();if(this.Me())W.vs()&&W.Ny(b)&&W.cl(!1);else{a.cancel();a=this.i();var d=J.io(a);W.Qi(b)?(C.w(a,W.Nh),W.vh(a,!1),d||this.focus(b)):W.vs()&&!d?this.focus(b):W.HC(a)}};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseOver",{$a:co.prototype.$a});co.prototype.fc=function(a){a.cancel();W.p_();this.Me()||(a=this.f(),W.Qi(a)&&this.$t(),a=this.i(),C.O(a,W.Ie))};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentMouseOut",{fc:co.prototype.fc});
co.prototype.Lb=function(){this.$t()};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentBlur",{Lb:co.prototype.Lb});co.prototype.M=function(a){var b=this.f().K(co.df);!a.ec()||this.Me()||b||this.mp();a.cancel()};r.a("AdfDhtmlCommandMenuItemPeer.prototype.HandleComponentClick",{M:co.prototype.M});co.prototype.we=function(a,b,d){W.v$(a,b,d)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentDisabledChanged",{we:co.prototype.we});
co.prototype.zq=function(a,b,d){var e=a.getType();"check"!=e&&"radio"!=e||(W.Qi(a)?b:C.pa(b)).setAttribute("aria-checked",d?"true":"false");d?(C.w(b,W.gE),"radio"==e&&this.UB()):C.O(b,W.gE)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentSelectedChanged",{zq:co.prototype.zq});co.prototype.Bl=function(a,b,d,e){co.h.Bl.call(this,a,b,d,e);W.w$(a,b,d)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.ComponentVisibleChanged",{Bl:co.prototype.Bl});
co.prototype.vd=function(a){var b=this.f(),d=this.i(),e=C.lf(d);e&&(e=C.ZH(e),b.getDisabled()||e||A.c.Zg()||(C.qd(a,d,I.lb),b.setProperty(co.df,a,!1,G.ud)))};r.a("AdfDhtmlCommandMenuItemPeer.prototype.SetBusy",{vd:co.prototype.vd});co.prototype.bd=function(a){this.bind(a);a=this.bf(a);var b=null!=a?a.o():null;b&&b.bd&&b.bd(a)};r.a("AdfDhtmlCommandMenuItemPeer.prototype.__preferredSizeChangeNotify",{bd:co.prototype.bd});k=co.prototype;
k.mp=function(){if(!this.Me()){v.l.finest("menuBar auto open mode, set to OFF due to commandMenuItem execute");W.gz(!1);for(var a=this.f(),b=a.getParent();b instanceof AdfRichMenu;)b=b.getParent();b instanceof AdfRichPopup?(W.cl(!1),b.o().Tb(b)):(b=W.Qi(a),W.cl(b&&!W.uta(a)));b=W.vra(a);null!=b&&W.Kua(a,b);b=new ab(a);b.F(a.getPartialSubmit());b.Aa()||(b=a.getType(),"check"==b||"antonym"==b?a.setSelected(!a.getSelected()):"radio"==b&&this.UB())}};
k.UB=function(){var a=this.f(),b=this.i(),b=this.jx(b);if(null==b)v.l.warning("Unexpected to have commandMenuItem without a group Id."),a.setSelected(!a.getSelected());else{if(W.Qi(a))for(var d=this.f(),e=this.i().parentNode.childNodes,f=0;f<e.length;f++){var g=e[f],h=this.jx(g);b==h&&(g=g.id)&&(g=A.c.m(g),g!=d&&g.getType&&"radio"==g.getType()&&g.setSelected(!1))}else if(W.Ny(a))for(d=this.f(),e=d.getParent(),e=e.o().Cd(e),f=0;f<e.length;f++)g=e[f],h=g.o(),null!=h&&(h=h.i(),h=this.jx(h),b==h&&g!=
d&&g.getType&&"radio"==g.getType()&&g.setSelected(!1));a.setSelected(!0)}};k.jx=function(a){return a.getAttribute?a.getAttribute(co.jS):null};k.$t=function(){var a=this.i();C.O(a,W.Nh)};k.Me=function(){var a=this.i();return a.disabled||C.sa(a,I.lb)};