function W(){}m("AdfMenuUtils",W);m("AdfMenuUtils",W);r.v(W);
W.ga=function(){W.gE="p_AFSelected";m("AdfMenuUtils.SELECTED_STYLE_CLASS",W.gE);this.Nh="p_AFHighlighted";m("AdfMenuUtils.HIGHLIGHTED_STYLE_CLASS",W.Nh);this.LWa="p_AFFocused";m("AdfMenuUtils.FOCUSED_STYLE_CLASS",W.LWa);this.Ie="p_AFDepressed";m("AdfMenuUtils.DEPRESSED_STYLE_CLASS",W.Ie);this.aJ="p_AFDetached";m("AdfMenuUtils.DETACHED_STYLE_CLASS",W.aJ);this.wca="_afrDth";m("AdfMenuUtils.MENU_DEPTH_KEY",W.wca);this.cE="_afrOflw";m("AdfMenuUtils.OVERFLOW_KEY",W.cE);this.DR="AFMenuBarOverflowCell";
m("AdfMenuUtils.OVERFLOW_CELL_STYLE_CLASS",W.DR);this.CQ="_afrTargetRowCurrency";m("AdfMenuUtils.AFR_TARGETROWCURRENCY",W.CQ);this.BQ="_afrTargetComponentId";m("AdfMenuUtils.AFR_TARGETCOMPONENTID",W.BQ);this.OG=[]};m("AdfMenuUtils.InitClass",W.ga);W.Ny=function(a){return a instanceof AdfRichMenuBar?!0:(a=a.getParent())&&a instanceof AdfRichMenuBar};m("AdfMenuUtils.isOnMenuBar",W.Ny);W.lk=function(a){return"true"==a.parentNode.getAttribute(W.cE)};m("AdfMenuUtils.isInOverflow",W.lk);
W.Qi=function(a){return(a=a.getParent())&&a instanceof AdfRichMenu};m("AdfMenuUtils.isInMenu",W.Qi);W.uta=function(a){if(W.Qi(a)){var b=a.getParent().o();b.bind(a);return b.Dh()}return!1};m("AdfMenuUtils.isInDetachedMenu",W.uta);W.cl=function(a){var b=W.OG;if(b&&0<b.length)for(var d=b.length-1;0<=d;d--){var e=A.c.m(b[d]);if(e){var f=e.o();f.bind(e);f.Jb()}else delete b[d]}a&&W.tua()};m("AdfMenuUtils.closeAllMenus",W.cl);W.Nxa=function(){return W.lPa};m("AdfMenuUtils.GetLastOpenedRootMenuId",W.Nxa);
W.$Ua=function(a){W.lPa=a};m("AdfMenuUtils.setLastOpenedRootMenuId",W.$Ua);W.vs=function(){return W.cNa};m("AdfMenuUtils.isMenuBarAutoOpenMode",W.vs);W.gz=function(a){v.l.finest("menuBar auto open mode: "+W.cNa+" -\x3e "+a);W.cNa=a};m("AdfMenuUtils.setMenuBarAutoOpenMode",W.gz);W.tua=function(){var a=W.lPa;if(a&&(a=A.c.m(a),null!=a)){var b=a.o(),d=b.i();b.focus(a);W.HC(d)}};m("AdfMenuUtils.restoreFocusToLastOpenedRootMenu",W.tua);
W.HC=function(a){var b=a.getAttribute("id"),d=W.lla;d&&d!=b&&W.p_();C.w(a,W.Nh);W.lla=b};m("AdfMenuUtils.highlightRootMenuItem",W.HC);W.p_=function(){var a=q.b.getElementById(W.lla);a&&C.O(a,W.Nh);W.lla=null};m("AdfMenuUtils.unhighlightRootMenuItem",W.p_);W.vh=function(a,b,d){var e=W.OG;if(e&&0!=e.length)for(var f=e.length-1;0<=f;f--){var g=A.c.m(e[f]);if(g){var h=g.o();h.bind(g);if(qr(h,a))break;d?e.pop():(h.$t(),b?h.Jb():jr(h,f))}else delete e[f]}};m("AdfMenuUtils.dismiss",W.vh);
W.Vob=function(){return W.OG&&0<W.OG.length};m("AdfMenuUtils.areMenusOpened",W.Vob);W.xta=function(a){return 0<=E.indexOf(W.OG,a)};m("AdfMenuUtils.isMenuOpen",W.xta);W.cqa=function(a){W.xta(a)||W.OG.push(a)};m("AdfMenuUtils.addOpenMenu",W.cqa);W.lua=function(a){E.Ig(W.OG,a)};m("AdfMenuUtils.removeOpenMenu",W.lua);W.vra=function(a){var b=null;for(a=a.getParent();null!=a&&(a instanceof AdfRichMenu||a instanceof AdfRichPopup);){var d;if(null!=(d=a[W.CQ])){b={ssb:d,rsb:a[W.BQ]};break}a=a.getParent()}return b};
m("AdfMenuUtils.getContextMenuItemTargetAttrs",W.vra);W.Kua=function(a,b){var d=a.Yp(),e=W.CQ,f=W.BQ;null==d[e]&&(d[e]=d[f]={type:"String"},I.ii(this,e,f));a.setProperty(f,null);a.setProperty(e,null);a.setProperty(f,b.rsb);a.setProperty(e,b.ssb)};m("AdfMenuUtils.setContextMenuItemTargetAttrs",W.Kua);
W.v$=function(a,b,d,e){if(1==d){C.w(b,I.lb);d=W.Qi(a)?b:C.pa(b);var f=d.getAttribute("tabIndex");d.removeAttribute("tabIndex");d.setAttribute(J.Hh,"false");d.setAttribute("aria-disabled","true");e&&e.setAttribute(J.Hh,"false");W.Ny(a)&&C.ib(b,"a").removeAttribute("href");f&&"0"==f&&(a=a.getParent(),b=a.o(),b.bind(a),u.assert(null!=b.bh,"The menu item's parent should have a resetActiveDescendant method."),b.bh())}else C.O(b,I.lb),d=W.Qi(a)?b:C.pa(b),d.setAttribute("tabIndex","-1"),d.setAttribute(J.Hh,
"true"),d.removeAttribute("aria-disabled"),e&&e.removeAttribute(J.Hh),W.Ny(a)&&C.ib(b,"a").setAttribute("href","#")};m("AdfMenuUtils.menuItemDisabledChanged",W.v$);
W.w$=function(a,b,d,e){1==d?(a=W.Qi(a)?b:C.pa(b),a.setAttribute("tabIndex","-1"),a.setAttribute(J.Hh,"true"),e&&e.removeAttribute(J.Hh)):(b=W.Qi(a)?b:C.pa(b),d=b.getAttribute("tabIndex"),b.removeAttribute("tabIndex"),b.setAttribute(J.Hh,"false"),e&&e.setAttribute(J.Hh,"false"),d&&"0"==d&&(e=a.getParent(),a=e.o(),a.bind(e),u.assert(null!=a.bh,"The menu item's parent should have a resetActiveDescendant method."),a.bh()))};m("AdfMenuUtils.menuItemVisibleChanged",W.w$);