/*! DSFR v1.11.2 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */ !function(){"use strict";var t=window.dsfr,e={RANGE:t.internals.ns.selector("range"),RANGE_SM:t.internals.ns.selector("range--sm"),RANGE_STEP:t.internals.ns.selector("range--step"),RANGE_DOUBLE:t.internals.ns.selector("range--double"),RANGE_DOUBLE_STEP:t.internals.ns.selector("range--double")+t.internals.ns.selector("range--step"),RANGE_INPUT:t.internals.ns.selector("range input[type=range]:nth-of-type(1)"),RANGE_INPUT2:t.internals.ns.selector("range--double")+" input[type=range]:nth-of-type(2)",RANGE_OUTPUT:t.internals.ns.selector("range__output"),RANGE_MIN:t.internals.ns.selector("range__min"),RANGE_MAX:t.internals.ns.selector("range__max"),RANGE_PREFIX:t.internals.ns.attr("prefix"),RANGE_SUFFIX:t.internals.ns.attr("suffix")},i={VALUE:t.internals.ns.emission("range","value"),VALUE2:t.internals.ns.emission("range","value2"),OUTPUT:t.internals.ns.emission("range","output"),CONSTRAINTS:t.internals.ns.emission("range","constraints"),MIN:t.internals.ns.emission("range","min"),MAX:t.internals.ns.emission("range","max"),STEP:t.internals.ns.emission("range","step"),PREFIX:t.internals.ns.emission("range","prefix"),SUFFIX:t.internals.ns.emission("range","suffix"),DISABLED:t.internals.ns.emission("range","disabled"),ENABLE_POINTER:t.internals.ns.emission("range","enable_pointer")},s=function(){this._width=0,this._min=0,this._max=0,this._value=0,this._thumbSize=24,this._innerWidth=0,this._prefix="",this._suffix="",this._background={}},n={width:{configurable:!0},isSm:{configurable:!0},textValue:{configurable:!0},value:{configurable:!0},outputX:{configurable:!0},min:{configurable:!0},textMin:{configurable:!0},max:{configurable:!0},textMax:{configurable:!0},step:{configurable:!0},output:{configurable:!0},progress:{configurable:!0}};s.prototype.configure=function(t){t&&(this._prefix=t._prefix,this._suffix=t._suffix,this._width=t.width,this.setConstraints(t._constraints),this.value=t.value,this.update())},s.prototype.setPrefix=function(t){this._prefix=null!==t?t:""},s.prototype.setSuffix=function(t){this._suffix=null!==t?t:""},s.prototype._decorate=function(t){return""+this._prefix+t+this._suffix},n.width.get=function(){return this._width},n.width.set=function(t){this._width=t},n.isSm.get=function(){return this._isSm},n.isSm.set=function(t){this._isSm!==t&&(this._isSm=t,this.setThumbSize(t?16:24),this.update())},s.prototype.setThumbSize=function(t,e){void 0===e&&(e=1),this._thumbSize=t,this._innerPadding=t*e},n.textValue.get=function(){return this._decorate(this._value)},n.value.get=function(){return this._value},n.value.set=function(t){this._value=t},n.outputX.get=function(){return this._outputX},s.prototype.setConstraints=function(t){this._constraints=t,this._min=t.min,this._max=t.max,this._step=t.step,this._rangeWidth=t.rangeWidth},n.min.get=function(){return this._min},n.textMin.get=function(){return this._decorate(this._min)},n.max.get=function(){return this._max},n.textMax.get=function(){return this._decorate(this._max)},n.step.get=function(){return this._step},n.output.get=function(){return{text:this.textValue,transform:"translateX("+this._translateX+"px) translateX(-"+this._centerPercent+"%)"}},s.prototype._getRatio=function(t){return(t-this._min)/this._rangeWidth},n.progress.get=function(){return this._progress},s.prototype.update=function(){this._update()},s.prototype._update=function(){this._innerWidth=this._width-this._innerPadding;var t=this._getRatio(this._value);this._translateX=t*this._width,this._centerPercent=100*t,this._progress={right:(this._innerWidth*t+.5*this._innerPadding).toFixed(2)+"px"}},Object.defineProperties(s.prototype,n);var r=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={stepWidth:{configurable:!0}};return i.stepWidth.get=function(){return this._stepWidth.toFixed(3)+"px"},e.prototype._update=function(){t.prototype._update.call(this);var e=this._rangeWidth/this._step;for(this._stepWidth=this._innerWidth/e;this._stepWidth<4;)this._stepWidth*=2},Object.defineProperties(e.prototype,i),e}(s),o=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={value2:{configurable:!0},textValue:{configurable:!0}};return i.value2.get=function(){return this._value},i.value2.set=function(t){this._value2!==t&&(this._value2=t,this.update())},i.textValue.get=function(){return this._decorate(this._value)+" - "+this._decorate(this._value2)},e.prototype.setThumbSize=function(e){t.prototype.setThumbSize.call(this,e,2)},e.prototype._update=function(){t.prototype._update.call(this);var e=this._getRatio(.5*(this._value+this._value2));this._translateX=e*this._width,this._centerPercent=100*e;var i=this._getRatio(this._value),s=this._getRatio(this._value2);this._progress={left:(this._innerWidth*i+.25*this._innerPadding).toFixed(2)+"px",right:(this._innerWidth*s+.75*this._innerPadding).toFixed(2)+"px"}},Object.defineProperties(e.prototype,i),e}(s),a=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={stepWidth:{configurable:!0}};return i.stepWidth.get=function(){return this._stepWidth.toFixed(3)+"px"},e.prototype._update=function(){t.prototype._update.call(this);var e=this._rangeWidth/this._step;this._stepWidth=this._innerWidth/e,this._stepWidth<4&&(this._stepWidth*=Math.ceil(4/this._stepWidth))},Object.defineProperties(e.prototype,i),e}(o),h="step",p="double",u="double-step",c="default",_=function(t){function n(){t.apply(this,arguments)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var _={type:{configurable:!0}},l={instanceClassName:{configurable:!0}};return l.instanceClassName.get=function(){return"Range"},n.prototype.init=function(){this._retrieveType(),this._retrieveSize(),this.isLegacy?(this.isResizing=!0,this.isMouseMoving=!0):(this._observer=new ResizeObserver(this.resize.bind(this)),this._observer.observe(this.node)),this.addAscent(i.CONSTRAINTS,this.setConstraints.bind(this)),this.addAscent(i.VALUE,this.setValue.bind(this)),this.addAscent(i.VALUE2,this.setValue2.bind(this)),this.getAttribute(e.RANGE_PREFIX)&&this.setPrefix(this.getAttribute(e.RANGE_PREFIX)),this.getAttribute(e.RANGE_SUFFIX)&&this.setSuffix(this.getAttribute(e.RANGE_SUFFIX)),this.update()},n.prototype._retrieveType=function(){switch(!0){case this.matches(e.RANGE_DOUBLE_STEP):case this.matches(e.RANGE_DOUBLE):this.type=p;break;case this.matches(e.RANGE_STEP):this.type=h;break;default:this.type=c}},_.type.set=function(t){if(this._type!==t){this._type=t;var e=this._model;switch(this._type){case u:this._model=new a;break;case p:this._model=new o;break;case h:this._model=new r;break;default:this._model=new s}this._model.configure(e)}},_.type.get=function(){return this._type},n.prototype._retrieveSize=function(){this._model.isSm=this.matches(e.RANGE_SM)},n.prototype.resize=function(){this._retrieveWidth(),this.update()},n.prototype._retrieveWidth=function(){this._model.width=this.getRect().width},n.prototype.setValue=function(t){switch(this._model.value=t,this._type){case u:case p:this.descend(i.VALUE,t)}this.update()},n.prototype.setValue2=function(t){this._model.value2=t,this.descend(i.VALUE2,t),this.update()},n.prototype.setConstraints=function(t){this._model.setConstraints(t),this.update(),this.descend(i.CONSTRAINTS,t)},n.prototype.setPrefix=function(t){this._model.setPrefix(t),this.update()},n.prototype.setSuffix=function(t){this._model.setSuffix(t),this.update()},n.prototype.mutate=function(t){switch(!0){case t.includes("class"):this._retrieveType(),this._retrieveSize();break;case t.includes(e.RANGE_PREFIX):case t.includes(e.RANGE_SUFFIX):this._model.setPrefix(this.getAttribute(e.RANGE_PREFIX)),this._model.setSuffix(this.getAttribute(e.RANGE_SUFFIX)),this.update()}},n.prototype.update=function(){this._model.update(),this.descend(i.OUTPUT,this._model.output),this.descend(i.MIN,this._model.textMin),this.descend(i.MAX,this._model.textMax);var t=this._model.progress;t.left?this.style.setProperty("--progress-left",t.left):this.style.removeProperty("--progress-left"),t.right?(this.style.setProperty("--progress-right",t.right),this.isLegacy&&t.left&&(this.style.setProperty("background-position-x",t.left),this.style.setProperty("background-size",parseFloat(t.right)-parseFloat(t.left)+"px "+(this._model.isSm?"8px":"12px")))):(this.style.removeProperty("--progress-right"),this.isLegacy&&(this.style.removeProperty("background-size"),this.style.removeProperty("background-position-x"))),this._model.stepWidth?this.style.setProperty("--step-width",this._model.stepWidth):this.style.removeProperty("--step-width")},n.prototype.mouseMove=function(t){if(this._type===p||this._type===u){var e=t.x-this.getRect().left;this.descend(i.ENABLE_POINTER,(parseFloat(this._model.progress.right)-parseFloat(this._model.progress.left))/2+parseFloat(this._model.progress.left)t&&(this.node.value=t,this.change())},e.prototype.change=function(){this.ascend(i.VALUE,parseFloat(this.node.value))},e.prototype.mutate=function(t){t.includes("disabled")&&this.ascend(i.DISABLED,this.node.disabled),(t.includes("min")||t.includes("max")||t.includes("step"))&&(this.ascend(i.CONSTRAINTS,new l(this.node)),this.change())},e.prototype.dispose=function(){this._listenerType&&this.unlisten(this._listenerType,this._changing)},Object.defineProperties(e,s),e}(t.core.Instance),f=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var s={instanceClassName:{configurable:!0}};return s.instanceClassName.get=function(){return"RangeInput2"},e.prototype._init=function(){this._pointerId=2,this.addDescent(i.CONSTRAINTS,this.setConstraints.bind(this)),this.addDescent(i.VALUE,this.setValue.bind(this))},e.prototype.setValue=function(t){parseFloat(this.node.value)