function FB(a){arguments.length&&this.Init(a)}m("AdfTreeUtils",FB);r.v(FB);
FB.ga=function(){this.r_a="_afrCxtPop";this.zEa="_afrShwTop";this.lAa="_afrCpsBlw";this.qBa="_afrXpdBlw";this.sBa="_afrXpdItm";this.M5a="_afrSrtAsc";this.N5a="_afrSrtDsc";this.oga="_afrSelId";this.p2="_afrSelPop";this.dza="_afrSelImg";m("AdfTreeUtils.SELECTOR_IMAGE_ATTR",FB.dza);this.WBa="_afrSelRow";this.D0a=1;this.g1a=2;this.h1a=4;var a=this.yda={},b=FB.prototype;a[this.zEa]=b.bva;a[this.sBa]=b.Nqa;a[this.M5a]=b.kva;a[this.N5a]=b.mva;a[this.qBa]=b.Oqa;a[this.lAa]=b.rqa};
m("AdfTreeUtils.InitClass",FB.ga);FB.prototype.Init=function(a){FB.h.Init.call(this);this.nb=a};r.a("AdfTreeUtils.prototype.Init",{Init:FB.prototype.Init});FB.prototype.kva=function(a){this.nb.g3(a,!0)};r.a("AdfTreeUtils.prototype.sortAscendingAction",{kva:FB.prototype.kva});FB.prototype.mva=function(a){this.nb.g3(a,!1)};r.a("AdfTreeUtils.prototype.sortDescendingAction",{mva:FB.prototype.mva});FB.prototype.bva=function(){var a=this.nb;Nb.F(a.f(),a.mL())};
r.a("AdfTreeUtils.prototype.showAsTopAction",{bva:FB.prototype.bva});FB.prototype.Nqa=function(){var a=this.nb,b=a.f(),a=a.mL();b.vs(a)?b.Km(a,!1):b.Km(a,!0)};r.a("AdfTreeUtils.prototype.expandAction",{Nqa:FB.prototype.Nqa});FB.prototype.Oqa=function(){var a=this.nb;a.f();var b=a.mL();a.gC(b,!0)};r.a("AdfTreeUtils.prototype.expandAllBelowAction",{Oqa:FB.prototype.Oqa});FB.prototype.rqa=function(){var a=this.nb;a.f();var b=a.mL();a.gC(b,!1)};r.a("AdfTreeUtils.prototype.collapseAllBelowAction",{rqa:FB.prototype.rqa});
FB.prototype.Yua=function(a,b,d,e,f){var g=this.nb.f(),h=g.g(),l=g.getContextMenuSelect();this.Uaa(a,b,d,e,l,f);this.a8();a=this.tH(h,FB.r_a);return g.m(a)};r.a("AdfTreeUtils.prototype.setupDefaultRowContextMenu",{Yua:FB.prototype.Yua});FB.prototype.tH=function(a,b){return(a+"_"+b).replace(/:/g,"_")};r.a("AdfTreeUtils.prototype.createComponentSubId",{tH:FB.prototype.tH});FB.prototype.pqa=function(){this.xaa()&&(this.aja=null)};r.a("AdfTreeUtils.prototype.clearCachedContextMenuItems",{pqa:FB.prototype.pqa});
FB.prototype.BY=function(){if(!this.aja){var a=this.Vqa();if(a){var b=this.nb.f().g(),d={};d.expandItem=a.m(this.tH(b,FB.sBa));d.expandAllBelowItem=a.m(this.tH(b,FB.qBa));d.collapseAllBelowItem=a.m(this.tH(b,FB.lAa));d.showAsTopItem=a.m(this.tH(b,FB.zEa));this.aja=d}}return this.aja};r.a("AdfTreeUtils.prototype.findContextMenuItems",{BY:FB.prototype.BY});
FB.prototype.Uaa=function(a,b,d,e,f,g){var h;if(f){f=this.nb.f().getSelectedRowKeys();var l=0;for(h in f)l++;h=l}else h=1;if(f=this.BY()){if(l=f.J8)l.setProperty("disabled",a||1<h),l.setSelected(!b);f.zY&&f.zY.setProperty("disabled",a||1<h);f.sY&&f.sY.setProperty("disabled",a||!b||1<h);f.h_&&f.h_.setProperty("disabled",g||!this.GC()||a||1<h||!e&&0==d)}};r.a("AdfTreeUtils.prototype.updateContextMenu",{Uaa:FB.prototype.Uaa});
FB.prototype.Vqa=function(){var a=this.nb.f(),b=a.getContextMenuId();return null!=b?a.m(b):a};r.a("AdfTreeUtils.prototype.findMenuItemContainer",{Vqa:FB.prototype.Vqa});FB.prototype.a8=function(){var a=this.nb.f();this.xaa()&&this.M$(a);if(!this.j4){var a=this.j4=this.D(this.Ufb),b=this.BY();b&&(b.h_&&b.h_.addEventListener(ab.cd,a),b.J8&&b.J8.addEventListener(ab.cd,a),b.zY&&b.zY.addEventListener(ab.cd,a),b.sY&&b.sY.addEventListener(ab.cd,a))}};
r.a("AdfTreeUtils.prototype.addContextMenuEventListeners",{a8:FB.prototype.a8});FB.prototype.M$=function(){var a=this.j4;if(a){var b=this.BY();b&&(b.h_&&b.h_.removeEventListener(ab.cd,a),b.J8&&b.J8.removeEventListener(ab.cd,a),b.zY&&b.zY.removeEventListener(ab.cd,a),b.sY&&b.sY.removeEventListener(ab.cd,a));this.j4=null}};r.a("AdfTreeUtils.prototype.removeContextMenuEventListeners",{M$:FB.prototype.M$});
FB.prototype.xaa=function(){if(void 0==this.SOa){var a=this.nb.f(),b=a.getContextMenuId();b&&(a=a.m(b),null==a&&(a=A.c.m(b)),a&&(this.SOa=!0))}return this.SOa};r.a("AdfTreeUtils.prototype.shouldResetMenuEventListeners",{xaa:FB.prototype.xaa});FB.prototype.Ufb=function(a){var b=a.getSource().g(),d=FB.yda,e;for(e in d)if(0<=b.indexOf(e)){d[e].call(this,a);a.cancel();break}};FB.prototype.SP=function(){return this.i7};r.a("AdfTreeUtils.prototype.isSelectorPopupVisible",{SP:FB.prototype.SP});
FB.prototype.V9=function(){var a=this.nb.f();this.i7&&a.m(FB.p2).Tb()};r.a("AdfTreeUtils.prototype.hideSelectorPopup",{V9:FB.prototype.V9});FB.prototype.Eaa=function(){if(!this.i7){var a=this.nb,b=a.f(),d=b.g(),b=b.m(FB.p2);this.h7||(this.h7=this.D(this.Dgb),b.addEventListener(Xb.Hl,this.h7));var e={};e[AdfRichPopup.Ed]=AdfRichPopup.dD;d=I.j(d,FB.oga);e[AdfRichPopup.Jf]=d;A.c.Kc(a.f());this.i7=!0;b.show(e)}};r.a("AdfTreeUtils.prototype.showSelectorPopup",{Eaa:FB.prototype.Eaa});
FB.prototype.Dgb=function(a){a=a.getSource();this.i7=!1;a.removeEventListener(Xb.Hl,this.h7);this.h7=null};FB.prototype.lsa=function(a,b,d){for(var e=q.b,f=null,g=this.nb.i();!f&&a&&a!=g.parent&&1==a.nodeType;)e.getAttribute(a,b)==d?f=a:a=a.parentNode;return f};r.a("AdfTreeUtils.prototype.getParentWithAttribute",{lsa:FB.prototype.lsa});
FB.prototype.sra=function(a,b,d,e){u.u(b);a=b;b=q.oa();if(null==a||1!=a.nodeType)return null;for(var f=b.getAttribute(a,e);null==f;){if(null==a||a==d)return null;a=a.parentNode;if(null==a||1!=a.nodeType)return null;f=b.getAttribute(a,e)}return f};r.a("AdfTreeUtils.prototype.getCurrencyFromDomElement",{sra:FB.prototype.sra});
FB.prototype.Wqa=function(a){var b=[],d=q.b;a=a.getElementsByTagName("TABLE");0<a.length&&(a=a[0].rows[0].cells,a=a[a.length-1].firstChild)&&(d=d.getAttribute(a,FB.WBa))&&(b[0]=d,b[1]=a);return b};r.a("AdfTreeUtils.prototype.findSelectorItemAndRowKey",{Wqa:FB.prototype.Wqa});
FB.prototype.wsa=function(){var a=null,b=this.nb.f().g()+":"+FB.p2,b=I.j(b,"db");if(b=q.b.getElementById(b))for(var b=b.childNodes,d=b.length,e=0;e<d;e++){var f=b[e];if(0<=f.className.indexOf(wB.Nf)&&(f=this.Wqa(f),0<f.length)){a=f[0];break}}return a};r.a("AdfTreeUtils.prototype.getSelectorSelectedRowKey",{wsa:FB.prototype.wsa});
FB.prototype.V$=function(a){var b=this.nb.f().g()+":"+FB.p2,b=I.j(b,"db");if(b=q.b.getElementById(b))for(var d=b.childNodes,e=d.length,f=0;f<e;f++)if(b=d[f],0<=b.className.indexOf(wB.Nf))if(a){if(f<e-1){a=d[f+1];C.O(b,S.Nf);C.w(a,S.Nf);(a=a.getElementsByTagName("A"))&&a[0].focus();break}}else if(0<f){a=d[f-1];C.O(b,S.Nf);C.w(a,S.Nf);(a=a.getElementsByTagName("A"))&&a[0].focus();break}};r.a("AdfTreeUtils.prototype.selectSelectorPopupItem",{V$:FB.prototype.V$});
FB.prototype.vsa=function(a,b){var d=this.nb,e=q.b;"A"==b.tagName&&e.getAttribute(b,"_afrSelRw")&&(b=b.firstChild);return this.sra(a,b,d.i(),FB.WBa)};r.a("AdfTreeUtils.prototype.getSelectorItemRowKey",{vsa:FB.prototype.vsa});FB.prototype.Ly=function(){return this.nb.f().K(wB.qda)&FB.g1a};r.a("AdfTreeUtils.prototype.isMultiRoot",{Ly:FB.prototype.Ly});FB.prototype.GC=function(){return this.nb.f().K(wB.qda)&FB.D0a};r.a("AdfTreeUtils.prototype.hasPathStamp",{GC:FB.prototype.GC});
FB.prototype.QSa=function(){var a=this.nb.f().g(),a=I.j(a,FB.oga);return document.getElementById(a)};r.a("AdfTreeUtils.prototype.getSelectorIcon",{QSa:FB.prototype.QSa});FB.prototype.aI=function(){return this.nb.f().K(wB.qda)&FB.h1a};r.a("AdfTreeUtils.prototype.isSelectorIconVisible",{aI:FB.prototype.aI});
FB.prototype.Bua=function(a,b){var d=this.nb,e=d.lJ();if(e&&1!=d.KLa){var d=e.o(),f=E.OZ(b,a),g=E.OZ(a,b),h=e.getDisclosedRowKeys(),l={};E.Rb(l,h);for(var n in f)delete l[n];for(n in g)l[n]=!0;try{d.KLa=!0;e.setDisclosedRowKeys(l);var t=gc.dC(e,fc.Tz,b,a);t&&t.F()}finally{d.KLa=!1}}};r.a("AdfTreeUtils.prototype.setAssociatedDisclosedRowKeys",{Bua:FB.prototype.Bua});