var Yn=M.U(U,"AdfDhtmlInputNumberSliderBasePeer",p);v("AdfDhtmlInputNumberSliderBasePeer",Yn);
Yn.m=function(){z.kb(AdfRichInputNumberSlider);M.$b(this,AdfUIEditableValue.SUBMITTED_VALUE,AdfRichInputNumberSlider.LABEL);M.hb(this,AdfRichInputNumberSlider.LABEL);M.ha(this,I.ec,I.jb);this.nw="_barElementId";this.gA="_decreaseButconID";this.kA="_increaseButconID";this.jra="_thumbValue";this.Bw="_thumbElement";this.kra="_thumbValueLine";this.Oqa="_sliderTicksContainer";this.tw="_dragElement";this.hra="_thumbValue2";this.DF="_thumbElement2";this.ira="_thumbValueLine2";this.nM="_range";this.mU=this.ut=
n;this.ML=new Zn;this.Zf="p_AFDepressed";this.RU="p_AFPlaying"};v("AdfDhtmlInputNumberSliderBasePeer.InitSubclass",Yn.m);Yn.prototype.ja=t(l);z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.needsResizeNotify",{ja:Yn.prototype.ja});Yn.prototype.Ia=function(){var a=this.h(),b=this.d();$n(this,b,a)};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.ResizeNotify",{Ia:Yn.prototype.Ia});Yn.prototype.CR=ca();z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.init",{CR:Yn.prototype.CR});
Yn.prototype.getValue=function(){var a=this.d(),b=a.getValue();b==n&&(b=a.r(AdfUIValue.VALUE));var d=this.nf();!b&&d&&(b=new fb(a.getMinimum(),a.getMaximum()));return b};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.getValue",{getValue:Yn.prototype.getValue});Yn.prototype.nf=t(p);z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.isRanged",{nf:Yn.prototype.nf});
Yn.prototype.q=function(a,b){Yn.f.q.call(this,a,b);var d=a.e(),e=M.g(d,"bar"),d=w.b;d.getElementById(e)!=n&&(b.setAttribute(Yn.nw,e),$n(this,a,b));d.vd(b);e=this.Bsa;e||(e=this.Bsa=this.o(this.hRa));var f=this.Xya;f||(f=this.Xya=this.o(this.P_a));var g=ao(this,Yn.kA,b),h=ao(this,Yn.gA,b);g&&(d.S(g,"mousedown",e),d.S(g,"mouseup",f),d.S(g,"mouseout",f));h&&(d.S(h,"mousedown",e),d.S(h,"mouseup",f),d.S(h,"mouseout",f))};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.InitDomElement",{q:Yn.prototype.q});
Yn.prototype.Z=function(){var a=w.b,b=ao(this,Yn.kA),d=ao(this,Yn.gA),e=this.Bsa,f=this.Xya;e&&(b&&a.sa(b,"mousedown",e),d&&a.sa(d,"mousedown",e));f&&(b&&(a.sa(b,"mouseup",f),a.sa(b,"mouseout",f)),d&&(a.sa(d,"mouseup",f),a.sa(d,"mouseout",f)));if(a=this.SF)F.c.ac(a),delete this.SF};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.ComponentRemoved",{Z:Yn.prototype.Z});
Yn.prototype.ba=function(a){var b=a.ia(),d=a.oh(),e=a.L(),e=w.b.T(e),f=this.getValue(),g,h=d.getMinimumIncrement(),m=ao(this,Yn.Bw);0>=h&&(h=d.getMinorIncrement(),0>=h&&(h=d.getMajorIncrement()));F.c.Ma().Oa()&&("vertical"!=d.getOrientation()&&b!=E.$a)&&(h*=-1);this.nf()?(g=ao(this,Yn.DF),b==E.nm&&d.getMaximum()!=n?e==m?(e=new fb(f.getMaximum(),d.getMaximum()),this.Gk(e,d)):e==g&&(e=new fb(d.getMaximum(),f.getMinimum()),this.Gk(e,d)):b==E.fi&&d.getMinimum()!=n?e==m?(e=new fb(d.getMinimum(),f.getMaximum()),
this.Gk(e,d)):e==g&&(e=new fb(d.getMinimum(),f.getMinimum()),this.Gk(e,d)):(b==E.Kb||b==E.Ja)&&e==m?(e=new fb(f.getMinimum()-h,f.getMaximum()),this.Gk(e,d)):(b==E.Kb||b==E.Ja)&&e==g?(e=new fb(f.getMinimum(),f.getMaximum()-h),this.Gk(e,d)):(b==E.Lb||b==E.Ya)&&e==m?(e=new fb(f.getMinimum()+h,f.getMaximum()),this.Gk(e,d)):(b==E.Lb||b==E.Ya)&&e==g?(e=new fb(f.getMinimum(),f.getMaximum()+h),this.Gk(e,d)):b==E.$a&&e==ao(this,Yn.kA)?bo(this,h):b==E.$a&&e==ao(this,Yn.gA)&&bo(this,-h)):b==E.nm&&d.getMaximum()!=
n?this.Gk(d.getMaximum(),d):b==E.fi&&d.getMinimum()!=n?this.Gk(d.getMinimum(),d):(b==E.Kb||b==E.Ja)&&e==m?bo(this,-h):(b==E.Lb||b==E.Ya)&&e==m?bo(this,h):b==E.$a&&e==ao(this,Yn.kA)?bo(this,h):b==E.$a&&e==ao(this,Yn.gA)&&bo(this,-h);(b==E.Ja||b==E.Ya||b==E.fi||b==E.nm||b==E.Kb||b==E.Lb)&&a.cancel()};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.HandleComponentKeyDown",{ba:Yn.prototype.ba});
Yn.prototype.xa=function(a,b,d){if(ao(this,Yn.nw,b)){var e=ao(this,Yn.Bw,b),f;this.nf()&&(f=ao(this,Yn.DF,b));var g=ao(this,Yn.jra,b),h="vertical"==a.getOrientation(),m=this.nf(),q=0.5*e[h?"offsetHeight":"offsetWidth"],s=a.getConverter();labelTextElement=this.nf()?Yn.vva(b,this.y3()):Yn.vva(b,this.x3());labelTextElement!=n&&(f?labelTextElement.setAttribute("id",f.id+"labelId"):labelTextElement.setAttribute("id",e.id+"labelId"),labelledById=labelTextElement.id,e.setAttribute("aria-labelledby",labelledById));
s instanceof eb&&(s=n);var y,A,C,G;A=a.getMaximum();C=a.getMinimum();var K=w.b.G()==w.Fc;K&&(e.style["outline-width"]="0px");if(m)y=d.getMaximum(),y>A&&(y=A),A=d.getMinimum(),A<C&&(A=C),s?(C=s.getAsString(A,n),G=s.getAsString(y,n)):(C=A,G=y),this.NT(A,y,a,b);else{if(""==d)d=s?s.getAsString(a.getMinimum(),n):a.getMinimum()+"";else{var N;N=s?s.getAsObject(d,n):d;N=parseFloat(N.toString());var Q=N<C;N>A&&(d=s?s.getAsString(A,n):A+"");Q&&(d=s?s.getAsString(C,n):C+"")}C=A=d;s&&(A=s.getAsObject(A,n));this.NT(d,
d,a,b)}d=co(this,a,b,A)-q;N=F.c.Ma().Oa();e.style[h?"bottom":N?"right":"left"]=d+"px";e.title=C;g.innerHTML=C;e.setAttribute("aria-valuenow",C.toString());m&&(e.setAttribute("aria-valuetext",F.c.u().V("af_inputRangeSlider.TIP_START_RANGE")),g=ao(this,Yn.hra,b),Q=ao(this,Yn.nM,b),labelTextElement!=n&&(labelTextElement.setAttribute("id",f.id+"labelId"),labelledById=labelTextElement.id,f.setAttribute("aria-labelledby",labelledById)),Q.style[h?"bottom":N?"right":"left"]=d+q+"px",b=co(this,a,b,y)-q,f.style[h?
"bottom":N?"right":"left"]=b+"px",K&&(f.style["outline-width"]="0px"),f.title=G,g.innerHTML=G,f.setAttribute("aria-valuenow",G.toString()),f.setAttribute("aria-valuetext",F.c.u().V("af_inputRangeSlider.TIP_END_RANGE")),Q.style[h?"height":"width"]=b-d+"px");a=M.g(a.e(),"hiddendata");a=w.b.getElementsByName(a)[0];a!=n&&(a.value=m?y+","+A:s?C:A);K&&((m=this.Sya)&&F.c.ac(m),this.Sya=F.c.oa(this,this.L_a,[e,f],50))}};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.SetDisplayValue",{xa:Yn.prototype.xa});
Yn.prototype.L_a=function(a){a[0].style["outline-width"]="";a[1]&&(a[1].style["outline-width"]="");delete this.Sya};Yn.prototype.cb=function(a,b){B.p(b);if(a.getReadOnly())return U.W(a,b).innerHTML;var d=M.g(a.e(),"hiddendata"),e=w.b.getElementsByName(d)[0],d=n;e&&(d=e.value,this.nf()&&(e=e.value.split(","),2==e.length&&(d=new fb(1*e[0],1*e[1]))));return d};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.GetSubmittedValue",{cb:Yn.prototype.cb});
Yn.prototype.C=function(a){var b=this.d();if(!a.pha()&&!b.getDisabled()){var d=ao(this,Yn.nw),e=a.L(),f=w.b,g=f.T(e);if("LABEL"==f.Ga(g))this.focus(b);else if(f.Zh(e,d)&&(!this.nf()||!f.Zh(e,ao(this,Yn.nM)))&&!this.nf())b=a.oh(),a=a.L(),a=eo(this,b,a),this.Gk(a,b)}};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.HandleComponentClick",{C:Yn.prototype.C});
Yn.prototype.xO=function(a,b){var d=a.L(),e=this.d(),f=w.fa(),g=e.getMinimumIncrement(),h=w.b.G()==w.Fc;0>=g&&(g=e.getMinorIncrement(),0>=g&&(g=e.getMajorIncrement()));if(1===a.Th()&&!e.getDisabled()){var m=ao(this,Yn.nw),q=ao(this,Yn.Bw),s=w.b.Zh(d,q),q=this.h(),y=p,A=ao(this,Yn.kA),C=ao(this,Yn.gA),G=ao(this,Yn.Jpa);this.nf()&&(thumbElement2=ao(this,Yn.DF),y=w.b.Zh(d,thumbElement2));s||y?(s?q.setAttribute(Yn.tw,q.getAttribute(Yn.Bw)):q.setAttribute(Yn.tw,q.getAttribute(Yn.DF)),b&&w.b.va(a.L()),
F.c.Nd(d,this.o(this.xWa),this.o(this.bva))):f.Zh(d,m)?this.nf()&&f.Zh(d,ao(this,Yn.nM))?(Yn.mU=eo(this,e,d),b&&w.b.va(a.L()),F.c.Nd(d,this.o(this.yWa),this.o(this.bva)),q.setAttribute(Yn.tw,"RANGE"),Yn.ut=this.getValue()):b||a.cancel():f.Zh(d,C)?(bo(this,-1*g),h&&C.focus()):f.Zh(d,A)?(bo(this,g),h&&A.focus()):G&&f.Zh(d,G)?H.ta(G,M.gb)||(H.ta(q,Yn.RU)?this.pu(e,q):(d=g,H.n(q,Yn.RU),this.SF=F.c.oa(this,this.Ysa,d,e.getAnimationInterval()))):b||a.cancel()}};
Yn.prototype.Oc=function(a,b){Yn.f.Oc.call(this,a,b);this.E9(a,b)};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.LazyInitialize",{Oc:Yn.prototype.Oc});Yn.prototype.Aa=function(){return mg.Hc()};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.GetInlineEditor",{Aa:Yn.prototype.Aa});Yn.prototype.Iu=function(){return Yn.ML};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.getDefaultDragRecognizer",{Iu:Yn.prototype.Iu});u=Yn.prototype;
u.E9=function(a,b){B.p(b);var d=a.getMinimum(),e=a.getMaximum();F.c.R().TrRangeValidator!==k&&(d=new TrRangeValidator(e,d,n),a.iI(d))};u.yWa=function(a){var b=this.d();a=eo(this,b,a);var d=b.getMinimum(),e=b.getMaximum(),f=Yn.ut.getMinimum(),g=Yn.ut.getMaximum(),h=a-Yn.mU;f+h<d&&(h=d-f);g+h>e&&(h=e-g);d=new fb(fo(f+h,b),fo(g+h,b));d.getMinimum()!=Yn.ut.getMinimum()&&d.getMaximum()!=Yn.ut.getMaximum()&&(Yn.ut=d,this.xa(b,this.h(),d),Yn.mU=a)};
u.bva=function(a){var b=this.d(),d=this.nf(),e=this.h(),f=e.getAttribute(Yn.tw);if(!b.getDisabled()&&"EMPTY"!=f){a=eo(this,b,a);var g=this.getValue();"RANGE"==f?(a=new fb(fo(Yn.ut.getMinimum(),b),fo(Yn.ut.getMaximum(),b)),Yn.ut=n,Yn.mU=n):d&&(a=e.getAttribute(Yn.Bw)==f?new fb(a,g.getMaximum()):new fb(g.getMinimum(),a));e.setAttribute(Yn.tw,"EMPTY");this.Gk(a,b)}};
u.xWa=function(a){var b=this.d();a=eo(this,b,a);a=fo(a,b);if(this.nf()){var d=this.getValue();a=ao(this,Yn.tw)==ao(this,Yn.Bw)?new fb(a,d.getMaximum()):new fb(d.getMinimum(),a)}else d=b.getConverter(),d instanceof eb&&(d=n),d&&(a=d.getAsString(a,n));this.xa(b,this.h(),a)};
function eo(a,b,d){var e="vertical"==b.getOrientation(),f=w.fa();d=f.Qb(d);var g=ao(a,Yn.nw);e?(e=f.nd(g)+g.offsetHeight,e-=d.y):(e=f.rc(g),e=d.x-e);d=e;e="vertical"==b.getOrientation();f=b.getMinimum();b=b.getMaximum();a=ao(a,Yn.nw);a=e?d/a.offsetHeight:d/a.offsetWidth;return F.c.Ma().Oa()&&!e?b-a*(b-f):a*(b-f)+f}function co(a,b,d,e){var f="vertical"==b.getOrientation(),g=b.getMinimum();b=b.getMaximum();var h=0;a=ao(a,Yn.nw,d);b>g&&(h=(e-g)/(b-g));return f?h*a.offsetHeight:h*a.offsetWidth}
function bo(a,b){var d=a.d(),e=a.getValue(),e=a.nf()?new fb(e.getMinimum()+b,e.getMaximum()+b):b+1*e;a.Gk(e,d)}u.Gk=function(a,b){if(!b.getDisabled())if(this.nf())a.getMinimum()>a.getMaximum()&&(a.getMinimum()==this.getValue().getMinimum()?a.setMaximum(a.getMinimum()):a.setMinimum(a.getMaximum())),this.Yb(b,fo(a,b));else{var d=b.getConverter();d instanceof eb&&(d=n);var e=fo(a,b),d=d?d.getAsString(e,n):""+e;this.Yb(b,d)}};
u.NT=function(a,b,d,e){var f=ao(this,Yn.kA,e),g=ao(this,Yn.gA,e);b==d.getMinimum()?H.n(g,M.gb):(H.F(g,M.gb),a==d.getMaximum()?H.n(f,M.gb):H.F(f,M.gb));(a=ao(this,Yn.Jpa,e))&&(b==d.getMaximum()?H.n(a,M.gb):H.F(a,M.gb))};z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.UpdateDisabledButtonStyles",{NT:Yn.prototype.NT});
function fo(a,b){var d=b.getMinimum(),e=b.getMaximum();if(a<=d)return d;if(a>=e)return e;var f=b.getMinimumIncrement();0>=f&&(f=b.getMinorIncrement(),0>=f&&(f=b.getMajorIncrement()));a+=(0<a?0.5:-0.5)*f;a-=a%f;return a<d?d:a>e?e:a}function ao(a,b,d){a=d===k?a.h().getAttribute(b):d.getAttribute(b);return w.b.getElementById(a)}
function $n(a,b,d){var e="vertical"==b.getOrientation(),f=b.e();if(ao(a,Yn.nw,d)){d.setAttribute(Yn.Bw,M.g(f,"thumb"));d.setAttribute(Yn.gA,M.g(f,"decrease"));d.setAttribute(Yn.kA,M.g(f,"increase"));d.setAttribute(Yn.Jpa,M.g(f,"play"));d.setAttribute(Yn.jra,M.g(f,"thumbValue"));d.setAttribute(Yn.tw,"EMPTY");d.setAttribute(Yn.kra,M.g(f,"thumbValueLine"));var g=ao(a,Yn.kra,d);if(a.nf()){d.setAttribute(Yn.nM,M.g(f,"range"));d.setAttribute(Yn.DF,M.g(f,"thumb2"));d.setAttribute(Yn.hra,M.g(f,"thumbValue2"));
d.setAttribute(Yn.ira,M.g(f,"thumbValueLine2"));var h=ao(a,Yn.ira,d)}d.setAttribute(Yn.Oqa,M.g(f,"sliderTicks"));var m=ao(a,Yn.Oqa,d);a.Dda=[];for(var m=m.getElementsByTagName("div"),q=0;q<m.length;q++){var s=m[q];1==s.nodeType&&a.Dda.push(s)}if(e){e=g.offsetWidth-2;for(index in a.Dda)m=a.Dda[index],m.offsetWidth>e&&(e=m.offsetWidth);e+=2;g.style.width=e+"px";a.nf()&&(h.style.width=e+"px")}var f=M.g(f,"hiddendata"),f=w.fa().getElementsByName(f)[0],y;a.nf()?f!=n&&(y=f.value.split(","),2!=y.length?
(y=(b.getMaximum()-b.getMinimum())/4,y=new fb(fo(b.getMinimum()+y,b),fo(b.getMaximum()-y,b))):y=new fb(1*y[0],1*y[1])):y=f.value;a.xa(b,d,y)}}Yn.prototype.hRa=function(a){a=w.b.T(a);H.n(a,Yn.Zf)};Yn.prototype.P_a=function(a){a=w.b.T(a);H.F(a,Yn.Zf)};Yn.prototype.pu=function(a,b){var d=this.SF;H.F(b,Yn.RU);d&&(F.c.ac(d),delete this.SF)};
Yn.prototype.Ysa=function(a){delete this.SF;var b=this.d();if(b){var d=b.getMaximum(),e=this.getValue(),f=this.h();this.nf()&&(e=e.getMaximum());e<d?("EMPTY"==f.getAttribute(Yn.tw)&&bo(this,a),this.SF=F.c.oa(this,this.Ysa,a,b.getAnimationInterval())):H.F(f,Yn.RU)}};function Zn(){this.Init()}v("AdfInputNumberSliderDragRecognizer",Zn);Yn.vva=function(a,b){for(var d=F.c.u().getStyleClass(b),e=a.getElementsByTagName("LABEL"),f=e.length,g=0;g<f;g++){var h=e[g];if(h!=n&&h.className==d)return h}return n};
z.l(Zn,Ja);Zn.prototype.Vk=function(a,b,d){B.J(b,Za);B.J(d,I);if(w.b.cj(d)){var e=b.d(),f=e.k();f.bind(e);var e=ao(f,Yn.Bw),g=n,h=n;f.nf()&&(g=ao(f,Yn.DF),h=ao(f,Yn.nM));f=d.Q();if(!H.sb(e,f)&&(!g||!H.sb(g,f))&&(!h||!H.sb(h,f)))return Zn.f.Vk.apply(this,arguments)}return n};z.a("AdfInputNumberSliderDragRecognizer.prototype.prepDrag",{Vk:Zn.prototype.Vk});Yn.prototype.y3=t("af_inputRangeSlider_label-text");z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.GetInputRangeSliderLabelStyleClass",{y3:Yn.prototype.y3});
Yn.prototype.x3=t("af_inputNumberSlider_label-text");z.a("AdfDhtmlInputNumberSliderBasePeer.prototype.GetInputNumberSliderLabelStyleClass",{x3:Yn.prototype.x3});