YUI.add("slider-value-range",function(e,t){var n="min",i="value",a=Math.round;e.SliderValueRange=e.mix(function(){this._initSliderValueRange()},{prototype:{_factor:1,_initSliderValueRange:function(){},_bindValueLogic:function(){this.after({minChange:this._afterMinChange,maxChange:this._afterMaxChange,valueChange:this._afterValueChange})},_syncThumbPosition:function(){this._calculateFactor(),this._setPosition(this.get(i))},_calculateFactor:function(){var t=this.get("length"),e=this.thumb.getStyle(this._key.dim),i=this.get(n),a=this.get("max"),t=parseFloat(t)||150,e=parseFloat(e)||15;this._factor=(a-i)/(t-e)},_defThumbMoveFn:function(t){"set"!==t.source&&this.set(i,this._offsetToValue(t.offset))},_offsetToValue:function(t){t=a(t*this._factor)+this.get(n);return a(this._nearestValue(t))},_valueToOffset:function(t){return a((t-this.get(n))/this._factor)},getValue:function(){return this.get(i)},setValue:function(t){return this.set(i,t)},_afterMinChange:function(t){this._verifyValue(),this._syncThumbPosition()},_afterMaxChange:function(t){this._verifyValue(),this._syncThumbPosition()},_verifyValue:function(){var t=this.get(i),e=this._nearestValue(t);t!==e&&this.set(i,e)},_afterValueChange:function(t){t=t.newVal;this._setPosition(t,{source:"set"})},_setPosition:function(t,e){this._uiMoveThumb(this._valueToOffset(t),e),this.thumb.set("aria-valuenow",t),this.thumb.set("aria-valuetext",t)},_validateNewMin:function(t){return e.Lang.isNumber(t)},_validateNewMax:function(t){return e.Lang.isNumber(t)},_setNewValue:function(t){return e.Lang.isNumber(t)?a(this._nearestValue(t)):e.Attribute.INVALID_VALUE},_nearestValue:function(t){var e=(i=this.get(n))<(a=this.get("max"))?a:i,i=i<a?i:a,a=e;return t<i?i:a<t?a:t}},ATTRS:{min:{value:0,validator:"_validateNewMin"},max:{value:100,validator:"_validateNewMax"},minorStep:{value:1},majorStep:{value:10},value:{value:0,setter:"_setNewValue"}}},!0)},"patched-v3.18.7",{requires:["slider-base"]});