var qB=I.ea(I,"AdfDhtmlToolboxPeer",!1);m("AdfDhtmlToolboxPeer",qB);qB.C=function(){r.bb(Vq)};m("AdfDhtmlToolboxPeer.InitSubclass",qB.C);qB.prototype.G=function(a,b){qB.h.G.call(this,a,b);A.c.pr(a)};r.a("AdfDhtmlToolboxPeer.prototype.InitDomElement",{G:qB.prototype.G});qB.prototype.ka=function(a){delete this.Ag;A.c.bp(a);qB.h.ka.call(this,a)};r.a("AdfDhtmlToolboxPeer.prototype.ComponentRemoved",{ka:qB.prototype.ka});qB.prototype.ya=function(){return!0};
r.a("AdfDhtmlToolboxPeer.prototype.needsResizeNotify",{ya:qB.prototype.ya});
qB.prototype.Sa=function(a,b,d){if(!rB(this)){v.l.fine("toolbox#ResizeNotify, toolbox row size stale or not yet defined, recalculate row sizes");this.Ag=[];a=this.i().firstChild.childNodes;b=a.length;for(var e=0;e<b;e++){for(var f=this.Ag,g=e,h=q.b,l=[],n=0,t=0,y=0,z=a[e].getElementsByTagName("tr")[0].childNodes,B=z.length,F=0;F<B;F++){var K=z[F],P=C.pa(K);if(P&&P.id){var Q=P.id;K.style.width="";if(K=A.c.m(Q))Q=K.o(),l.push(Q),Q.yk?(P=Q.yk()+sB(P),n+=P,P=null!=K.getFlex&&null!=K.getFlex()?K.getFlex():
0,y+=P):(P=h.gP(P,P.offsetWidth),n+=P,t+=P)}}f[g]={qH:l,Bva:n,Kvb:t,Ava:y}}}a=q.b;b=this.i();d-=a.gP(b,0);d-=a.gP(C.pa(b),0);for(a=0;a<this.Ag.length;a++)if(b=this.Ag[a],e=d-b.qH.length,f=e-b.Bva,0>f)for(v.l.fine("toolbox#ResizeNotify, resizing toolbar row "+a+", available width "+e+", is smaller than row width "+b.Bva+", attempt to overflow. "),e=-f,f=b.qH.length-1;0<=f;--f){l=b.qH[f];if(null==l){v.l.severe("Unexpected null peer for toolbox child at index: ",f);break}g=l.i();if(null==g){v.l.warning("Unexpected child ["+
f+"] found in toolbox component.");break}g.style.width="";h=sB(g);if(l.yk){var da=l.yk()+h,ba;ba=l.wJ()+h;ba=Math.max(da-e,ba);h=ba-h;g.parentNode.style.width=ba+1+"px";g.style.width=h+"px"}e-=da-ba;0>=e?spaceToRemoved=0:g.parentNode.style.width=g.offsetWidth+1+"px"}else for(v.l.fine("toolbox#ResizeNotify, resizing toolbar row "+a+", available width "+e+", is not smaller than row width "+b.Bva+", attempt to stretch."),f=b.qH.length,g=f-1,h=0;h<f;h++){y=b.qH[h];if(null==y){v.l.severe("Unexpected null peer for toolbox child at index: ",
h);break}l=y.i();if(null==l){v.l.warning("Unexpected child ["+h+"] found in toolbox component.");break}l.style.width="";t=sB(l);y.yk?(n=y.yk(),t=n+t,y=y.f(),y=y.getFlex?y.getFlex()||0:0,0<y?l.parentNode.style.width=y/b.Ava*e+"px":h==g&&0==b.Ava?l.parentNode.style.width=e+"px":(l.parentNode.style.width=t+1+"px",l.style.width=n+"px")):l.parentNode.style.width=h==g&&0==b.Ava?e+"px":l.offsetWidth+1+"px"}};r.a("AdfDhtmlToolboxPeer.prototype.ResizeNotify",{Sa:qB.prototype.Sa});
qB.prototype.ad=function(a){this.bind(a);this.Ag=null};r.a("AdfDhtmlToolboxPeer.prototype.__preferredSizeChangeNotify",{ad:qB.prototype.ad});function sB(a){a=q.b.getComputedStyle(a);var b=q.Ma;return b(a.paddingLeft)+b(a.paddingRight)+b(a.marginLeft)+b(a.marginRight)}
function rB(a){if(!a.Ag)return!1;for(var b=0;b<a.Ag.length;b++)for(var d=a.Ag[b],e=0;e<d.qH.length;e++){var f=d.qH[e];if(null==f)return v.l.fine("Toolbox cached rows are not valid, due to unexpected null peer for toolbox child at row: "+b+", index: "+e),!1;if(null==f.i())return v.l.fine("Toolbox cached rows are not valid, due to toolbar peer without component (perhaps due to ppr) at row: "+b+", index: "+e),!1}return!0};