function ki(a,b){this.Init(a,b)}v("AdfConveyorBeltSupport",ki);z.l(ki);ki.da=function(){this.IJa="_afrCbDl";this.Zf="p_AFDepressed"};v("AdfConveyorBeltSupport.InitClass",ki.da);
ki.prototype.Init=function(a,b){ki.f.Init.call(this);this.mb=b;this.fr=w.b.getElementById(a);var d=M.g(a,"scbi");this.Ll=w.b.getElementById(d);this.Kaa();d=M.g(a,"ecbi");this.Dj=w.b.getElementById(d);this.Haa();d=M.g(a,"cbc");this.ke=w.b.getElementById(d);for(var e=H.Tc(this.ke),d=[],f=M.g(a,"cbs"),g=0;g<e.length;g++){var h=e[g];1==h.nodeType&&h.getAttribute("id")!=f&&"none"!=h.style.display&&d.push(h)}e=F.c.Ma().Oa();f=this.ke.offsetWidth+this.ke.offsetLeft;this.Ri=[];for(g=0;g<d.length;g++)this.Ri[g]=
e?f-(d[g].offsetLeft+d[g].offsetWidth):d[g].offsetLeft,H.ta(d[g],"p_AFSelected")&&(this.Hx=g);d=d[d.length-1];this.LA=d==n?0:e?f-d.offsetLeft:d.offsetLeft+d.offsetWidth;this.LX=l;this.Vg=0;d=M.g(a,"cbdli");this.h$=w.b.getElementById(d);d=M.g(a,"dlc");this.Cj=w.b.getElementById(d);d=w.b;e=this.h$;f={autodismiss:"autodismissAlways",focus:l,type:"menu",closeOnEscape:l};f.alignElement=e;f[AdfRichPopup.fd]=AdfRichPopup.ALIGN_AFTER_END;this.XW=f;f=this.i$=this.o(this.aUa);d.S(e,"mousedown",f);d.S(e,"keydown",
f);this.Fua=this.o(this.$Ta);d.S(e,"mouseup",this.Fua);this.Eua=this.o(this.ZTa);d.S(e,"mouseout",this.Eua);(d=li(this))&&mi(this,p);e=ki.cB(this.fr);mi(this,l);f=ki.cB(this.fr);d||mi(this,p);this.Uta=e-f;this.dY=this.cY=p};z.a("AdfConveyorBeltSupport.prototype.Init",{Init:ki.prototype.Init});
ki.q5a=function(a){for(var b=w.b,d=b.getElementById(a),d=ki.cB(d),e=M.g(a,"cbs"),e=b.getElementById(e),e=H.nc(e);"none"==e.style.display;)if(e=H.nc(e),e==n)return p;F.c.Ma().Oa()?(a=M.g(a,"cbc"),b=b.getElementById(a),b=b.offsetWidth+b.offsetLeft-e.offsetLeft):b=e.offsetLeft+e.offsetWidth;return b>=d};v("AdfConveyorBeltSupport.shouldUseConveyorBelt",ki.q5a);
ki.prototype.UR=function(){var a=w.b,b=this.Ll;a.sa(b,"mousedown",this.Hda);a.sa(b,"keydown",this.Hda);a.sa(b,"mouseup",this.jQ);a.sa(b,"mouseout",this.iQ);b=this.Dj;a.sa(b,"mousedown",this.p$);a.sa(b,"keydown",this.p$);a.sa(b,"mouseup",this.dO);a.sa(b,"mouseout",this.cO);b=this.h$;a.sa(b,"mousedown",this.i$);a.sa(b,"keydown",this.i$);a.sa(b,"mouseup",this.Fua);a.sa(b,"mouseout",this.Eua);delete this.mb;delete this.fr;delete this.Ll;delete this.Dj;delete this.ke;delete this.Ri;delete this.Hx;delete this.LA;
delete this.LX;delete this.Vg;delete this.h$;delete this.Cj;delete this.Wo;delete this.qaa;delete this.XW;delete this.Uta;delete this.cY;delete this.dY};z.a("AdfConveyorBeltSupport.prototype.removeConveyorBeltSupport",{UR:ki.prototype.UR});ki.prototype.RJ=da("Wo");z.a("AdfConveyorBeltSupport.prototype.registerAdditionalConveyorBeltSupport",{RJ:ki.prototype.RJ});
ki.prototype.Nf=function(){var a;a=ki.cB(this.fr);li(this)&&(a+=this.Uta);a=this.LA>=a;var b=li(this);a?(b||(mi(this,l),this.LX&&(this.Vg=ni(this)),oi(this,l)),pi(this)):(mi(this,p),w.b.te(this.ke,0));this.LX&&(this.LX=p)};z.a("AdfConveyorBeltSupport.prototype.handleResize",{Nf:ki.prototype.Nf});ki.prototype.vu=function(a){for(var b=this.Cj,d=0;d<a.length;d++)b.appendChild(a[d])};z.a("AdfConveyorBeltSupport.prototype.addDropListElements",{vu:ki.prototype.vu});
ki.prototype.ZR=function(a){B.assert(0<=a&&a<this.Ri.length,"New selected item should be within known valid range of conveyor belt support");this.Hx=a;this.Vg=ni(this);oi(this,l)};z.a("AdfConveyorBeltSupport.prototype.scrollNewSelectedItemIntoView",{ZR:ki.prototype.ZR});ki.prototype.b0=r("Vg");z.a("AdfConveyorBeltSupport.prototype.getFirstItemDisplayed",{b0:ki.prototype.b0});
ki.prototype.sia=function(a){B.assert(a&&0<=a&&a<this.Ri.length,"Must set the first item displayed to a valid number within the child range!");this.Vg=a};z.a("AdfConveyorBeltSupport.prototype.setFirstItemDisplayed",{sia:ki.prototype.sia});ki.cB=function(a){var b=w.b.getComputedStyle(a);return a.offsetWidth-(w.ua(b.paddingLeft)+w.ua(b.paddingRight))};function li(a){return H.ta(a.fr,"p_AFConveyorBelt")}function mi(a,b){b?H.n(a.fr,"p_AFConveyorBelt"):H.F(a.fr,"p_AFConveyorBelt")}
function pi(a){qi(a)?(H.F(a.Ll,M.gb),a.Ll.removeAttribute("aria-disabled")):(H.n(a.Ll,M.gb),a.Ll.setAttribute("aria-disabled","true"));ri(a)?a.Vg+1<a.Ri.length?(H.F(a.Dj,M.gb),a.Dj.removeAttribute("aria-disabled")):(H.n(a.Dj,M.gb),a.Dj.setAttribute("aria-disabled","true")):(H.n(a.Dj,M.gb),a.Dj.setAttribute("aria-disabled","true"))}
function qi(a){var b=F.c.Ma().Oa(),d=w.b;if(b&&d.G()!=w.aa){if(d.G()==w.ed)return a.ke&&0>a.ke.scrollLeft;b=a.LA-a.ke.scrollLeft;a=ki.cB(a.fr);return b>a+10}return a.ke&&0<a.ke.scrollLeft}function ri(a){var b=w.b;if(F.c.Ma().Oa()&&b.G()!=w.aa)if(b.G()==w.ed)b=a.LA+a.ke.scrollLeft;else return a.ke&&0<a.ke.scrollLeft;else b=a.LA-a.ke.scrollLeft;a=ki.cB(a.fr);return b>a+10}
function ni(a){if(a.Hx==k)return a.Vg;if(a.Hx<=a.Vg)return a.Hx;var b=a.Ri[a.Hx],d=b+H.Tj(a.ke,1,a.Hx).offsetWidth,e=ki.cB(a.fr),f=e;if(d-b>f)return a.Hx;for(b=1;b<=a.Vg;b++)f+=a.Ri[b]-a.Ri[b-1];if(d<=f)return a.Vg;f=e;for(e=1;e<a.Ri.length;e++)if(f+=a.Ri[e]-a.Ri[e-1],d<=f)return e;B.assert(l,"Code unreachable, all cases handled");return 0}
function oi(a,b){var d=F.c.Ma().Oa(),e=w.b,d=d&&e.G()!=w.aa?e.G()==w.ed?-a.Ri[a.Vg]:a.ke.scrollWidth-a.ke.offsetWidth-a.Ri[a.Vg]:a.Ri[a.Vg];b||!F.c.Ac()?(e.te(a.ke,d),pi(a)):Qg(3,2*Math.abs(a.ke.scrollLeft-d),[{element:a.ke,properties:{scrollLeft:d}}],n,ki.MRa,a,n)}ki.MRa=function(a){a.cY?a.Wo?a.gda():a.SP():a.dY&&(a.Wo?a.hda():a.TP());pi(a)};u=ki.prototype;u.SP=function(){qi(this)?(this.Vg=0<this.Vg?this.Vg-1:0,oi(this)):si(this)};
u.gda=function(){B.assert(this.Wo!=n,"Method should only be called if there are multiple conveyors.");this.SP();this.Wo.SP()};u.TP=function(){ri(this)?(this.Vg=this.Vg+1>=this.Ri.length?this.Ri.length-1:this.Vg+1,oi(this)):ti(this)};u.hda=function(){B.assert(this.Wo!=n,"Method should only be called if there are multiple conveyors.");this.TP();this.Wo.TP()};function si(a){a.cY=p;a.fda&&clearInterval(a.fda);a.fda=n}function ti(a){a.dY=p;a.jda&&clearInterval(a.jda);a.jda=n}
u.Kaa=function(){var a=w.b,b=this.Ll;this.Hda=this.o(this.b1a);a.S(b,"mousedown",this.Hda);this.jQ=this.o(this.a1a);a.S(b,"mouseup",this.jQ);this.iQ=this.o(this.$0a);a.S(b,"mouseout",this.iQ)};u.Haa=function(){var a=w.b,b=this.Dj;this.p$=this.o(this.mUa);a.S(b,"mousedown",this.p$);this.dO=this.o(this.lUa);a.S(b,"mouseup",this.dO);this.cO=this.o(this.kUa);a.S(b,"mouseout",this.cO)};
u.b1a=function(a){var b=w.b,d=a.type;if(!("mousedown"==d&&a.button&&a.button!=I.um)){var e=b.T(a);H.ta(e,M.gb)||("mousedown"==d&&this.Hb(e,l),this.cY=l,this.Wo?this.gda():this.SP(),F.c.Ac()||(d=this.Wo?this.o(this.gda):this.o(this.SP),this.fda=setInterval(d,200)))}b.va(a)};u.a1a=function(a){a=w.b.T(a);this.Hb(a,p);si(this)};u.$0a=function(a){a=w.b.T(a);this.Hb(a,p);si(this)};
u.mUa=function(a){var b=w.b,d=a.type;if(!("mousedown"==d&&a.button&&a.button!=I.um)){var e=b.T(a);H.ta(e,M.gb)||("mousedown"==d&&this.Hb(e,l),this.dY=l,this.Wo?this.hda():this.TP(),F.c.Ac()||(d=this.Wo?this.o(this.hda):this.o(this.TP),this.jda=setInterval(d,200)))}b.va(a)};u.lUa=function(a){a=w.b.T(a);this.Hb(a,p);ti(this)};u.kUa=function(a){a=w.b.T(a);this.Hb(a,p);ti(this)};u.Hb=function(a,b){var d=ki.Zf;b?H.n(a,d):H.F(a,d)};
u.aUa=function(a){var b=w.b,d=a.type,e=a.keyCode;if(!("keydown"==d&&e!=E.$a&&e!=E.Ja)){if(!("mousedown"==d&&a.button&&a.button!=I.um)){this.qaa==n&&(this.qaa=this.o(this.oXa),z.kb(vg),this.XW.closeHandler=this.qaa,this.XW.title=w.b.T(a).title,this.bUa=this.Cj.parentNode);var e=this.mb,f=e.d(),g=ki.IJa;e.Qa(f,g)?e.ob(f,g):e.fe(f,this.Cj,this.XW,g);"mousedown"==d&&(d=b.T(a),this.Hb(d,l))}b.va(a)}};u.$Ta=function(a){a=w.b.T(a);this.Hb(a,p)};u.ZTa=function(a){a=w.b.T(a);this.Hb(a,p)};
u.oXa=function(){this.Cj&&this.bUa.appendChild(this.Cj)};