function Oi(a,b,d,e,f,g){this.Init(a,b,d,e,f,g)}v("AdfOverflowSupport",Oi);z.l(Oi);Oi.da=function(){this.kM="_afrOfwSrt";this.qA="_afrOfwEnd";this.Zf="p_AFDepressed"};v("AdfOverflowSupport.InitClass",Oi.da);
Oi.prototype.Init=function(a,b,d,e,f,g){Oi.f.Init.call(this);this.mb=b;this.xc=d||"end";this.EB=e||"after";this.wP=f||"horizontal";this.nea=g;this.ic=w.b.getElementById(a);dA(this)&&(this.ln=eA(a,"soc"),(this.Ll=eA(a,"soi"))&&this.Kaa());fA(this)&&(this.Wm=eA(a,"eoc"),this.Dj=eA(a,"eoi"),this.Dj!=n&&this.Haa());gA(this)&&(a=M.g(a,"dlc"),this.Cj=w.b.getElementById(a));this.xg=[];this.Ym=0;this.Zt=-1};z.a("AdfOverflowSupport.prototype.Init",{Init:Oi.prototype.Init});
Oi.b1=function(a){a=w.b.getElementById(a);return Math.max(a.firstChild.offsetWidth,a.scrollWidth)>a.offsetWidth||Math.max(a.firstChild.offsetHeight,a.scrollHeight)>a.offsetHeight?l:p};v("AdfOverflowSupport.needsOverflow",Oi.b1);Oi.rga=function(a,b){b||(b=[]);var d=w.b,e=a.e(),f=M.Na(e,"eoc"),e=M.Na(e,"soc");(f=d.getElementById(f))&&d.Yi(f,b);(f=d.getElementById(e))&&d.Yi(f,b);return b};v("AdfOverflowSupport.getOverflowChildComponents",Oi.rga);
Oi.prototype.lv=function(a){a||(this.ln&&F.c.th(this.ln),this.Wm&&F.c.th(this.Wm));delete this.mb;delete this.ic;if(dA(this)){delete this.ln;if(this.Ll){a=w.b;var b=this.Ll;a.sa(b,"mousedown",this.Kda);a.sa(b,"keydown",this.Kda);a.sa(b,"mouseup",this.jQ);a.sa(b,"mouseout",this.iQ);delete this.Ll;delete this.IZ}this.Ida&&delete this.Ida}fA(this)&&(a=w.b,b=this.Dj,a.sa(b,"mousedown",this.r$),a.sa(b,"keydown",this.r$),a.sa(b,"mouseup",this.dO),a.sa(b,"mouseout",this.cO),delete this.Dj,delete this.Wm,
delete this.sG,this.q$&&delete this.q$);gA(this)&&delete this.Cj;for(a=this.xg;0<a.length;){b=a.pop();ya.clear(b.elements);ya.clear(b.Ny);for(b=b.dK;0<b.length;){var d=b.pop();ya.clear(d)}}};z.a("AdfOverflowSupport.prototype.removeOverflowSupport",{lv:Oi.prototype.lv});Oi.prototype.un=function(){this.xg.push({elements:[],Ny:[],dK:[]});this.Zt++};z.a("AdfOverflowSupport.prototype.createStep",{un:Oi.prototype.un});Oi.prototype.addElement=function(a){this.xg[this.xg.length-1].elements.push(a)};
z.a("AdfOverflowSupport.prototype.addElement",{addElement:Oi.prototype.addElement});Oi.prototype.lp=function(a){this.xg[this.xg.length-1].Ny.push(a)};z.a("AdfOverflowSupport.prototype.addOverflowElement",{lp:Oi.prototype.lp});Oi.prototype.OQ=function(a){var b=this.xg.length-1,d=a.ownerDocument,e=d.createElement("a");e.style.display="none";d=d.createElement("a");d.style.display="none";a.parentNode.insertBefore(d,a);this.xg[b].dK.push([a,d,e]);return e};
z.a("AdfOverflowSupport.prototype.createSwapPosition",{OQ:Oi.prototype.OQ});Oi.prototype.vu=function(a){for(var b=this.Cj,d=0;d<a.length;d++)b.appendChild(a[d])};z.a("AdfOverflowSupport.prototype.addDropListElements",{vu:Oi.prototype.vu});
Oi.prototype.Nf=function(){var a=this.ic.offsetWidth+3,b=this.ic.offsetHeight+5;if("both"==this.xc||"droplist"==this.xc){hA(this);a:for(var d=this.xg,e=0;e<d.length;e++){for(var f=d[e],g=0;g<f.Ny.length;g++)if(H.ta(f.Ny[g].firstChild,"p_AFSelected")){this.RM=e;break a}for(g=0;g<f.elements.length;g++)if(H.ta(f.elements[g],"p_AFSelected")){this.RM=e;break a}}d=iA(this,a,b);jA(this,a,b,d);kA(this);a=this.ic.offsetWidth+3;b=this.ic.offsetHeight+5;for(d=iA(this,a,b);lA(this,a,b,d);)kA(this),d=iA(this,
a,b);mA(this)==this.xg.length&&nA(this)}else{e=this.xg.length;f=mA(this);if(f==e&&(hA(this),d=iA(this,a,b)))return;kA(this,l);a=this.ic.offsetWidth+3;b=this.ic.offsetHeight+5;if("horizontal"==this.wP&&50>=a||"vertical"==this.wP&&50>=b){for(;0<mA(this);)switch(this.xc){case "end":oA(this);break;case "start":case "both":case "droplist":pA(this)}d=iA(this,a,b)}else d==n&&(d=iA(this,a,b)),d=qA(this,d,a,b,d?f:0,d?e:f),a=this.ic.offsetWidth+3,b=this.ic.offsetHeight+5;d=jA(this,a,b,d);a=this.ic.offsetWidth+
3;b=this.ic.offsetHeight+5;if(mA(this)==e){if(d){hA(this);nA(this);return}hA(this);if(d=iA(this,a,b)){nA(this);return}kA(this,l)}lA(this,a,b,d);this.nea&&rA(this)}};z.a("AdfOverflowSupport.prototype.handleResize",{Nf:Oi.prototype.Nf});Oi.prototype.kD=function(){for(hA(this);mA(this)<this.xg.length;)switch(this.xc){case "end":sA(this);break;case "start":tA(this);break;case "both":case "droplist":0!=this.Ym?tA(this):sA(this)}nA(this)};z.a("AdfOverflowSupport.prototype.removeAllItemsFromOverflow",{kD:Oi.prototype.kD});
Oi.prototype.N_=function(a){this.Ow(a)&&(a=O.BI(a,this.ya,l),B.p(a),this.ya=a)};z.a("AdfOverflowSupport.prototype.focusNextChild",{N_:Oi.prototype.N_});Oi.prototype.O_=function(a){this.Ow(a)&&(a=O.CI(a,this.ya,l),B.p(a),this.ya=a)};z.a("AdfOverflowSupport.prototype.focusPreviousChild",{O_:Oi.prototype.O_});
Oi.prototype.Ow=function(a){B.assert(this.nea);B.p(a);B.p(this.ya);B.assert("0"==this.ya.getAttribute("tabindex"),"The overflow popup's active descendant should have tabindex 0");this.ya||(D.i.warning("Overflow has lost its assigned activeDescendant!"),this.kg());return this.ya!=n};Oi.prototype.u2=function(a){B.p(a);this.ya!=a&&(this.ya&&this.ya.setAttribute("tabIndex","-1"),a.setAttribute("tabIndex","0"),this.ya=a)};z.a("AdfOverflowSupport.prototype.updateActiveDescendant",{u2:Oi.prototype.u2});
Oi.prototype.ej=function(a){if(fA(this)&&H.oc(this.Wm,a))return"end";if(dA(this)&&H.oc(this.ln,a))return"start"};z.a("AdfOverflowSupport.prototype.isInOverflow",{ej:Oi.prototype.ej});Oi.prototype.a2=function(a){var b=this.mb,d=this.mb.d();if(!b.Qa(d,"start"==a?Oi.kM:Oi.qA))"start"==a?(uA(this),vA(this,Oi.kM,this.ln,this.IZ)):(wA(this),gA(this)?vA(this,Oi.qA,this.Cj,this.sG):vA(this,Oi.qA,this.Wm,this.sG))};z.a("AdfOverflowSupport.prototype.showOverflowPopup",{a2:Oi.prototype.a2});
function nA(a){a=a.mb;var b=a.d();a.Qa(b,Oi.kM)&&a.ob(b,Oi.kM);a.Qa(b,Oi.qA)&&a.ob(b,Oi.qA)}function dA(a){return"start"==a.xc||"both"==a.xc||"droplist"==a.xc}function fA(a){return"end"==a.xc||"both"==a.xc||"droplist"==a.xc}function gA(a){return"droplist"==a.xc}function eA(a,b){var d=M.g(a,b);return w.b.getElementById(d)}u=Oi.prototype;
u.Kaa=function(){var a=w.b,b=this.Ll,d=xA();d.alignElement=b;d[AdfRichPopup.fd]="before"==this.EB?AdfRichPopup.ALIGN_BEFORE_START:AdfRichPopup.ALIGN_AFTER_START;this.IZ=d;d=this.Kda=this.o(this.kQ);a.S(b,"mousedown",d);a.S(b,"keydown",d);this.jQ=this.o(this.d1a);a.S(b,"mouseup",this.jQ);this.iQ=this.o(this.c1a);a.S(b,"mouseout",this.iQ)};
u.Haa=function(){var a=w.b,b=this.Dj,d=xA();d.alignElement=this.Dj;d[AdfRichPopup.fd]="before"==this.EB?AdfRichPopup.ALIGN_BEFORE_END:AdfRichPopup.ALIGN_AFTER_END;this.sG=d;d=this.r$=this.o(this.eO);a.S(b,"mousedown",d);a.S(b,"keydown",d);this.dO=this.o(this.oUa);a.S(b,"mouseup",this.dO);this.cO=this.o(this.nUa);a.S(b,"mouseout",this.cO)};function xA(){return{autodismiss:"autodismissAlways",focus:l,type:"menu",closeOnEscape:l}}
u.kQ=function(a){var b=w.b,d=a.type,e=a.keyCode;"keydown"==d&&e!=E.$a&&e!=E.Ja&&e!=E.zd||("mousedown"==d&&a.button&&a.button!=I.um||(uA(this),vA(this,Oi.kM,this.ln,this.IZ),"mousedown"==d&&(d=b.T(a),this.Hb(d,l))),b.va(a))};function uA(a){a.owa==n&&(a.owa=a.o(a.sXa),z.kb(vg),a.IZ.closeHandler=a.owa,a.Ida=a.ln.parentNode)}u.d1a=function(a){a=w.b.T(a);this.Hb(a,p)};u.c1a=function(a){a=w.b.T(a);this.Hb(a,p)};
u.eO=function(a){var b=w.b,d=a.type,e=a.keyCode;"keydown"==d&&e!=E.$a&&e!=E.Ja&&e!=E.zd||("mousedown"==d&&a.button&&a.button!=I.um||(wA(this),gA(this)?vA(this,Oi.qA,this.Cj,this.sG):vA(this,Oi.qA,this.Wm,this.sG),"mousedown"==d&&(d=b.T(a),this.Hb(d,l))),b.va(a))};function wA(a){a.nwa==n&&(a.nwa=a.o(a.pXa),z.kb(vg),a.sG.closeHandler=a.nwa,a.q$=a.Wm.parentNode)}u.oUa=function(a){a=w.b.T(a);this.Hb(a,p)};u.nUa=function(a){a=w.b.T(a);this.Hb(a,p)};u.Hb=function(a,b){var d=Oi.Zf;b?H.n(a,d):H.F(a,d)};
function vA(a,b,d,e){var f=a.mb,g=a.mb.d();f.Qa(g,b)?a.mb.ob(g,b):(a.nea&&rA(a,d),a.mb.fe(g,d,e,b))}u.sXa=function(){this.ln&&this.Ida.appendChild(this.ln)};u.pXa=function(){gA(this)&&this.Cj?this.Cj.parentNode.appendChild(this.Cj):this.Wm&&this.q$.appendChild(this.Wm)};
function qA(a,b,d,e,f,g){var h=g-f;if(2>=h)return b;for(var h=Math.ceil(h/2),m=0;m<h;m++)if(b)d=a,"end"==d.xc?sA(d):"start"==d.xc&&tA(d),d=a.ic.offsetWidth+3,e=a.ic.offsetHeight+5;else{var q=a;"end"==q.xc?oA(q):"start"==q.xc&&pA(q)}(b=iA(a,d,e))?f+=h:g-=h;return qA(a,b,d,e,f,g)}
function jA(a,b,d,e){for(;mA(a)<a.xg.length&&(e||("both"==a.xc||"droplist"==a.xc)&&(a.RM<a.Ym||a.RM>a.Zt));){switch(a.xc){case "end":sA(a);break;case "start":tA(a);break;case "both":case "droplist":b=a.RM-a.Ym,d=a.xg.length-1,b<mA(a)-b-1&&0!=a.Ym||a.Zt==d?tA(a):sA(a)}b=a.ic.offsetWidth+3;d=a.ic.offsetHeight+5;e=iA(a,b,d)}return e}
function lA(a,b,d,e){for(var f=p;!e&&0<mA(a);){switch(a.xc){case "end":oA(a);break;case "start":pA(a);break;case "both":case "droplist":e=a.RM-a.Ym,e>=mA(a)-e-1||-1==a.Ym?pA(a):oA(a)}f=l;e=iA(a,b,d)}return f}function iA(a,b,d){var e=Math.max(a.ic.firstChild.offsetWidth,a.ic.scrollWidth),f=w.fa();F.c.Ma().Oa()&&(f.G()==w.aa&&8>f.nb())&&(e=a.ic.scrollWidth);a=Math.max(a.ic.firstChild.offsetHeight,a.ic.scrollHeight)<=d;return e<=b&&a}
function tA(a){var b=a.xg[a.Ym-1];yA(b.elements);zA(b.Ny);AA(b.dK,l);a.Ym--}function sA(a){var b=a.xg[a.Zt+1];yA(b.elements);zA(b.Ny);AA(b.dK,l);a.Zt++}function pA(a){var b=a.xg[a.Ym];BA(b.elements);CA(a,b.Ny,l);AA(b.dK);a.Ym++}function oA(a){var b=a.xg[a.Zt];BA(b.elements);CA(a,b.Ny,k);AA(b.dK);a.Zt--}function BA(a){for(var b=a.length,d=0;d<b;d++){var e=a[d];e.RW=e.style.display;e.style.display="none"}}function yA(a){for(var b=a.length,d=0;d<b;d++){var e=a[d];e.style.display=e.RW||""}}
function zA(a){for(var b=a.length,d=0;d<b;d++){var e=a[d];e.parentNode.removeChild(e)}}function CA(a,b,d){for(var e=b.length,f=d?a.ln:a.Wm,g=0;g<e;g++){var h=b[g];"before"==a.EB||d&&"vertical"==a.wP?f.appendChild(h):f.insertBefore(h,f.firstChild)}}function AA(a,b){for(var d=a.length,e=0;e<d;e++){var f=a[e],g=f[b?1:2];g.parentNode.insertBefore(f[0],g)}}function mA(a){var b=a.xg.length;return b-a.Ym-(b-1-a.Zt)}
function hA(a){switch(a.xc){case "end":H.F(a.ic,"p_AFEndOverflow");break;case "start":H.F(a.ic,"p_AFStartOverflow");break;case "both":H.F(a.ic,"p_AFEndOverflow");H.F(a.ic,"p_AFStartOverflow");break;case "droplist":H.F(a.ic,"p_AFOverflowDroplist")}}
function kA(a,b){if(b)switch(a.xc){case "end":H.n(a.ic,"p_AFEndOverflow");break;case "start":H.n(a.ic,"p_AFStartOverflow");break;case "both":H.n(a.ic,"p_AFEndOverflow");H.n(a.ic,"p_AFStartOverflow");break;case "droplist":H.n(a.ic,"p_AFOverflowDroplist")}else 0<a.Ym&&0<a.ln.childNodes.length&&(gA(a)?H.n(a.ic,"p_AFOverflowDroplist"):H.n(a.ic,"p_AFStartOverflow")),a.Zt<a.xg.length-1&&0<a.Wm.childNodes.length&&(gA(a)?H.n(a.ic,"p_AFOverflowDroplist"):H.n(a.ic,"p_AFEndOverflow"))}
function rA(a,b){if(!b)switch(a.xc){case "end":b=a.Wm;break;case "start":b=a.ln;break;case "droplist":b=a.Cj;break;case "both":D.i.warning("Roving tab index not yet supported for overflow type 'both'!");return}a.ya&&a.ya.setAttribute("tabIndex","-1");a.ya=O.pD(b,{F0:l,E0:l})};