var K;(function(r){r.Range="range",r.Steps="steps",r.Positions="positions",r.Count="count",r.Values="values"})(K||(K={}));var H;(function(r){r[r.None=-1]="None",r[r.NoValue=0]="NoValue",r[r.LargeValue=1]="LargeValue",r[r.SmallValue=2]="SmallValue"})(H||(H={}));function Ce(r){return rt(r)&&typeof r.from=="function"}function rt(r){return typeof r=="object"&&typeof r.to=="function"}function zt(r){r.parentElement.removeChild(r)}function bt(r){return r!=null}function jt(r){r.preventDefault()}function Ae(r){return r.filter(function(t){return this[t]?!1:this[t]=!0},{})}function ye(r,t){return Math.round(r/t)*t}function Pe(r,t){var s=r.getBoundingClientRect(),u=r.ownerDocument,f=u.documentElement,v=qt(u);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(v.x=0),t?s.top+v.y-f.clientTop:s.left+v.x-f.clientLeft}function j(r){return typeof r=="number"&&!isNaN(r)&&isFinite(r)}function Rt(r,t,s){s>0&&(L(r,t),setTimeout(function(){et(r,t)},s))}function Nt(r){return Math.max(Math.min(r,100),0)}function it(r){return Array.isArray(r)?r:[r]}function Ve(r){r=String(r);var t=r.split(".");return t.length>1?t[1].length:0}function L(r,t){r.classList&&!/\s/.test(t)?r.classList.add(t):r.className+=" "+t}function et(r,t){r.classList&&!/\s/.test(t)?r.classList.remove(t):r.className=r.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function De(r,t){return r.classList?r.classList.contains(t):new RegExp("\\b"+t+"\\b").test(r.className)}function qt(r){var t=window.pageXOffset!==void 0,s=(r.compatMode||"")==="CSS1Compat",u=t?window.pageXOffset:s?r.documentElement.scrollLeft:r.body.scrollLeft,f=t?window.pageYOffset:s?r.documentElement.scrollTop:r.body.scrollTop;return{x:u,y:f}}function ke(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function Ue(){var r=!1;try{var t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("test",null,t)}catch{}return r}function Me(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function wt(r,t){return 100/(t-r)}function xt(r,t,s){return t*100/(r[s+1]-r[s])}function Oe(r,t){return xt(r,r[0]<0?t+Math.abs(r[0]):t-r[0],0)}function _e(r,t){return t*(r[1]-r[0])/100+r[0]}function J(r,t){for(var s=1;r>=t[s];)s+=1;return s}function Le(r,t,s){if(s>=r.slice(-1)[0])return 100;var u=J(s,r),f=r[u-1],v=r[u],d=t[u-1],w=t[u];return d+Oe([f,v],s)/wt(d,w)}function He(r,t,s){if(s>=100)return r.slice(-1)[0];var u=J(s,t),f=r[u-1],v=r[u],d=t[u-1],w=t[u];return _e([f,v],(s-d)*wt(d,w))}function Fe(r,t,s,u){if(u===100)return u;var f=J(u,r),v=r[f-1],d=r[f];return s?u-v>(d-v)/2?d:v:t[f-1]?r[f-1]+ye(u-r[f-1],t[f-1]):u}var Kt=(function(){function r(t,s,u){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[u||!1],this.xNumSteps=[!1],this.snap=s;var f,v=[];for(Object.keys(t).forEach(function(d){v.push([it(t[d]),d])}),v.sort(function(d,w){return d[0][0]-w[0][0]}),f=0;fthis.xPct[f+1];)f++;else t===this.xPct[this.xPct.length-1]&&(f=this.xPct.length-2);!u&&t===this.xPct[f+1]&&f++,s===null&&(s=[]);var v,d=1,w=s[f],E=0,p=0,V=0,D=0;for(u?v=(t-this.xPct[f])/(this.xPct[f+1]-this.xPct[f]):v=(this.xPct[f+1]-t)/(this.xPct[f+1]-this.xPct[f]);w>0;)E=this.xPct[f+1+D]-this.xPct[f+D],s[f+D]*d+100-v*100>100?(p=E*v,d=(w-100*v)/s[f+D],v=1):(p=s[f+D]*E/100*d,d=0),u?(V=V-p,this.xPct.length+D>=1&&D--):(V=V+p,this.xPct.length-D>=1&&D++),w=s[f+D]*d;return t+V},r.prototype.toStepping=function(t){return t=Le(this.xVal,this.xPct,t),t},r.prototype.fromStepping=function(t){return He(this.xVal,this.xPct,t)},r.prototype.getStep=function(t){return t=Fe(this.xPct,this.xSteps,this.snap,t),t},r.prototype.getDefaultStep=function(t,s,u){var f=J(t,this.xPct);return(t===100||s&&t===this.xPct[f-1])&&(f=Math.max(f-1,1)),(this.xVal[f]-this.xVal[f-1])/u},r.prototype.getNearbySteps=function(t){var s=J(t,this.xPct);return{stepBefore:{startValue:this.xVal[s-2],step:this.xNumSteps[s-2],highestStep:this.xHighestCompleteStep[s-2]},thisStep:{startValue:this.xVal[s-1],step:this.xNumSteps[s-1],highestStep:this.xHighestCompleteStep[s-1]},stepAfter:{startValue:this.xVal[s],step:this.xNumSteps[s],highestStep:this.xHighestCompleteStep[s]}}},r.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(Ve);return Math.max.apply(null,t)},r.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},r.prototype.convert=function(t){return this.getStep(this.toStepping(t))},r.prototype.handleEntryPoint=function(t,s){var u;if(t==="min"?u=0:t==="max"?u=100:u=parseFloat(t),!j(u)||!j(s[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(u),this.xVal.push(s[0]);var f=Number(s[1]);u?this.xSteps.push(isNaN(f)?!1:f):isNaN(f)||(this.xSteps[0]=f),this.xHighestCompleteStep.push(0)},r.prototype.handleStepPoint=function(t,s){if(s){if(this.xVal[t]===this.xVal[t+1]){this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t];return}this.xSteps[t]=xt([this.xVal[t],this.xVal[t+1]],s,0)/wt(this.xPct[t],this.xPct[t+1]);var u=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],f=Math.ceil(Number(u.toFixed(3))-1),v=this.xVal[t]+this.xNumSteps[t]*f;this.xHighestCompleteStep[t]=v}},r})(),Bt={to:function(r){return r===void 0?"":r.toFixed(2)},from:Number},$t={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},q={tooltips:".__tooltips",aria:".__aria"};function ze(r,t){if(!j(t))throw new Error("noUiSlider: 'step' is not numeric.");r.singleStep=t}function je(r,t){if(!j(t))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");r.keyboardPageMultiplier=t}function Re(r,t){if(!j(t))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");r.keyboardMultiplier=t}function Ne(r,t){if(!j(t))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");r.keyboardDefaultStep=t}function Be(r,t){if(typeof t!="object"||Array.isArray(t))throw new Error("noUiSlider: 'range' is not an object.");if(t.min===void 0||t.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");r.spectrum=new Kt(t,r.snap||!1,r.singleStep)}function qe(r,t){if(t=it(t),!Array.isArray(t)||!t.length)throw new Error("noUiSlider: 'start' option is incorrect.");r.handles=t.length,r.start=t}function Ke(r,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");r.snap=t}function $e(r,t){if(typeof t!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");r.animate=t}function Ie(r,t){if(typeof t!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");r.animationDuration=t}function It(r,t){var s=[!1],u;if(t==="lower"?t=[!0,!1]:t==="upper"&&(t=[!1,!0]),t===!0||t===!1){for(u=1;u1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function We(r,t){switch(t){case"ltr":r.dir=0;break;case"rtl":r.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function Ge(r,t){if(typeof t!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var s=t.indexOf("tap")>=0,u=t.indexOf("drag")>=0,f=t.indexOf("fixed")>=0,v=t.indexOf("snap")>=0,d=t.indexOf("hover")>=0,w=t.indexOf("unconstrained")>=0,E=t.indexOf("invert-connects")>=0,p=t.indexOf("drag-all")>=0,V=t.indexOf("smooth-steps")>=0;if(f){if(r.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Tt(r,r.start[1]-r.start[0])}if(E&&r.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(w&&(r.margin||r.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");r.events={tap:s||v,drag:u,dragAll:p,smoothSteps:V,fixed:f,snap:v,hover:d,unconstrained:w,invertConnects:E}}function Je(r,t){if(t!==!1)if(t===!0||rt(t)){r.tooltips=[];for(var s=0;s= 2) required for mode 'count'.");for(var i=e.values-1,a=100/i,n=[];i--;)n[i]=i*a;return n.push(100),At(n,e.stepped)}return e.mode===K.Positions?At(e.values,e.stepped):e.mode===K.Values?e.stepped?e.values.map(function(o){return m.fromStepping(m.getStep(m.toStepping(o)))}):e.values:[]}function At(e,i){return e.map(function(a){return m.fromStepping(i?m.getStep(a):a)})}function se(e){function i(b,C){return Number((b+C).toFixed(7))}var a=ae(e),n={},o=m.xVal[0],l=m.xVal[m.xVal.length-1],h=!1,c=!1,S=0;return a=Ae(a.slice().sort(function(b,C){return b-C})),a[0]!==o&&(a.unshift(o),h=!0),a[a.length-1]!==l&&(a.push(l),c=!0),a.forEach(function(b,C){var A,g,P,_=b,k=a[C+1],M,pt,mt,gt,Lt,St,Ht,Ft=e.mode===K.Steps;for(Ft&&(A=m.xNumSteps[C]),A||(A=k-_),k===void 0&&(k=_),A=Math.max(A,1e-7),g=_;g<=k;g=i(g,A)){for(M=m.toStepping(g),pt=M-S,Lt=pt/(e.density||1),St=Math.round(Lt),Ht=pt/St,P=1;P<=St;P+=1)mt=S+P*Ht,n[mt.toFixed(5)]=[m.fromStepping(mt),0];gt=a.indexOf(g)>-1?H.LargeValue:Ft?H.SmallValue:H.NoValue,!C&&h&&g!==k&&(gt=0),g===k&&c||(n[M.toFixed(5)]=[g,gt]),S=M}}),n}function ne(e,i,a){var n,o,l=B.createElement("div"),h=(n={},n[H.None]="",n[H.NoValue]=t.cssClasses.valueNormal,n[H.LargeValue]=t.cssClasses.valueLarge,n[H.SmallValue]=t.cssClasses.valueSub,n),c=(o={},o[H.None]="",o[H.NoValue]=t.cssClasses.markerNormal,o[H.LargeValue]=t.cssClasses.markerLarge,o[H.SmallValue]=t.cssClasses.markerSub,o),S=[t.cssClasses.valueHorizontal,t.cssClasses.valueVertical],b=[t.cssClasses.markerHorizontal,t.cssClasses.markerVertical];L(l,t.cssClasses.pips),L(l,t.ort===0?t.cssClasses.pipsHorizontal:t.cssClasses.pipsVertical);function C(g,P){var _=P===t.cssClasses.value,k=_?S:b,M=_?h:c;return P+" "+k[t.ort]+" "+M[g]}function A(g,P,_){if(_=i?i(P,_):_,_!==H.None){var k=N(l,!1);k.className=C(_,t.cssClasses.marker),k.style[t.style]=g+"%",_>H.NoValue&&(k=N(l,!1),k.className=C(_,t.cssClasses.value),k.setAttribute("data-value",String(P)),k.style[t.style]=g+"%",k.innerHTML=String(a.to(P)))}}return Object.keys(e).forEach(function(g){A(g,e[g][0],e[g][1])}),l}function lt(){D&&(zt(D),D=null)}function ut(e){lt();var i=se(e),a=e.filter,n=e.format||{to:function(o){return String(Math.round(o))}};return D=d.appendChild(ne(i,a,n)),D}function yt(){var e=w.getBoundingClientRect(),i="offset"+["Width","Height"][t.ort];return t.ort===0?e.width||w[i]:e.height||w[i]}function I(e,i,a,n){var o=function(h){var c=oe(h,n.pageOffset,n.target||i);if(!c||Et()&&!n.doNotReject||De(d,t.cssClasses.tap)&&!n.doNotReject||e===u.start&&c.buttons!==void 0&&c.buttons>1||n.hover&&c.buttons)return!1;v||c.preventDefault(),c.calcPoint=c.points[t.ort],a(c,n)},l=[];return e.split(" ").forEach(function(h){i.addEventListener(h,o,v?{passive:!0}:!1),l.push([h,o])}),l}function oe(e,i,a){var n=e.type.indexOf("touch")===0,o=e.type.indexOf("mouse")===0,l=e.type.indexOf("pointer")===0,h=0,c=0;if(e.type.indexOf("MSPointer")===0&&(l=!0),e.type==="mousedown"&&!e.buttons&&!e.touches)return!1;if(n){var S=function(A){var g=A.target;return g===a||a.contains(g)||e.composed&&e.composedPath().shift()===a};if(e.type==="touchstart"){var b=Array.prototype.filter.call(e.touches,S);if(b.length>1)return!1;h=b[0].pageX,c=b[0].pageY}else{var C=Array.prototype.find.call(e.changedTouches,S);if(!C)return!1;h=C.pageX,c=C.pageY}}return i=i||qt(B),(o||l)&&(h=e.clientX+i.x,c=e.clientY+i.y),e.pageOffset=i,e.points=[h,c],e.cursor=o||l,e}function Pt(e){var i=e-Pe(w,t.ort),a=i*100/yt();return a=Nt(a),t.dir?100-a:a}function le(e){var i=100,a=!1;return p.forEach(function(n,o){if(!nt(o)){var l=x[o],h=Math.abs(l-e),c=h===100&&i===100,S=hl;(S||b||c)&&(a=o,i=h)}}),a}function ue(e,i){e.type==="mouseout"&&e.target.nodeName==="HTML"&&e.relatedTarget===null&&ft(e,i)}function fe(e,i){if(navigator.appVersion.indexOf("MSIE 9")===-1&&e.buttons===0&&i.buttonsProperty!==0)return ft(e,i);var a=(t.dir?-1:1)*(e.calcPoint-i.startCalcPoint),n=a*100/i.baseSize;Dt(a>0,n,i.locations,i.handleNumbers,i.connect)}function ft(e,i){i.handle&&(et(i.handle,t.cssClasses.active),Y-=1),i.listeners.forEach(function(a){X.removeEventListener(a[0],a[1])}),Y===0&&(et(d,t.cssClasses.drag),vt(),e.cursor&&(U.style.cursor="",U.removeEventListener("selectstart",jt))),t.events.smoothSteps&&(i.handleNumbers.forEach(function(a){T(a,x[a],!0,!0,!1,!1)}),i.handleNumbers.forEach(function(a){y("update",a)})),i.handleNumbers.forEach(function(a){y("change",a),y("set",a),y("end",a)})}function ct(e,i){if(!i.handleNumbers.some(nt)){var a;if(i.handleNumbers.length===1){var n=p[i.handleNumbers[0]];a=n.children[0],Y+=1,L(a,t.cssClasses.active)}e.stopPropagation();var o=[],l=I(u.move,X,fe,{target:e.target,handle:a,connect:i.connect,listeners:o,startCalcPoint:e.calcPoint,baseSize:yt(),pageOffset:e.pageOffset,handleNumbers:i.handleNumbers,buttonsProperty:e.buttons,locations:x.slice()}),h=I(u.end,X,ft,{target:e.target,handle:a,listeners:o,doNotReject:!0,handleNumbers:i.handleNumbers}),c=I("mouseout",X,ue,{target:e.target,handle:a,listeners:o,doNotReject:!0,handleNumbers:i.handleNumbers});o.push.apply(o,l.concat(h,c)),e.cursor&&(U.style.cursor=getComputedStyle(e.target).cursor,p.length>1&&L(d,t.cssClasses.drag),U.addEventListener("selectstart",jt,!1)),i.handleNumbers.forEach(function(S){y("start",S)})}}function ce(e){e.stopPropagation();var i=Pt(e.calcPoint),a=le(i);a!==!1&&(t.events.snap||Rt(d,t.cssClasses.tap,t.animationDuration),T(a,i,!0,!0),vt(),y("slide",a,!0),y("update",a,!0),t.events.snap?ct(e,{handleNumbers:[a]}):(y("change",a,!0),y("set",a,!0)))}function he(e){var i=Pt(e.calcPoint),a=m.getStep(i),n=m.fromStepping(a);Object.keys(z).forEach(function(o){o.split(".")[0]==="hover"&&z[o].forEach(function(l){l.call(tt,n)})})}function de(e,i){if(Et()||nt(i))return!1;var a=["Left","Right"],n=["Down","Up"],o=["PageDown","PageUp"],l=["Home","End"];t.dir&&!t.ort?a.reverse():t.ort&&!t.dir&&(n.reverse(),o.reverse());var h=e.key.replace("Arrow",""),c=h===o[0],S=h===o[1],b=h===n[0]||h===a[0]||c,C=h===n[1]||h===a[1]||S,A=h===l[0],g=h===l[1];if(!b&&!C&&!A&&!g)return!0;e.preventDefault();var P;if(C||b){var _=b?0:1,k=Ot(i),M=k[_];if(M===null)return!1;M===!1&&(M=m.getDefaultStep(x[i],b,t.keyboardDefaultStep)),S||c?M*=t.keyboardPageMultiplier:M*=t.keyboardMultiplier,M=Math.max(M,1e-7),M=(b?-1:1)*M,P=F[i]+M}else g?P=t.spectrum.xVal[t.spectrum.xVal.length-1]:P=t.spectrum.xVal[0];return T(i,m.toStepping(P),!0,!0),y("slide",i),y("update",i),y("change",i),y("set",i),!1}function Vt(e){e.fixed||p.forEach(function(i,a){I(u.start,i.children[0],ct,{handleNumbers:[a]})}),e.tap&&I(u.start,w,ce,{}),e.hover&&I(u.move,w,he,{hover:!0}),e.drag&&V.forEach(function(i,a){if(!(i===!1||a===0||a===V.length-1)){var n=p[a-1],o=p[a],l=[i],h=[n,o],c=[a-1,a];L(i,t.cssClasses.draggable),e.fixed&&(l.push(n.children[0]),l.push(o.children[0])),e.dragAll&&(h=p,c=O),l.forEach(function(S){I(u.start,S,ct,{handles:h,handleNumbers:c,connect:i})})}})}function ht(e,i){z[e]=z[e]||[],z[e].push(i),e.split(".")[0]==="update"&&p.forEach(function(a,n){y("update",n)})}function ve(e){return e===q.aria||e===q.tooltips}function W(e){var i=e&&e.split(".")[0],a=i?e.substring(i.length):e;Object.keys(z).forEach(function(n){var o=n.split(".")[0],l=n.substring(o.length);(!i||i===o)&&(!a||a===l)&&(!ve(l)||a===l)&&delete z[n]})}function y(e,i,a){Object.keys(z).forEach(function(n){var o=n.split(".")[0];e===o&&z[n].forEach(function(l){l.call(tt,F.map(t.format.to),i,F.slice(),a||!1,x.slice(),tt)})})}function Z(e,i,a,n,o,l,h){var c;return p.length>1&&!t.events.unconstrained&&(n&&i>0&&(c=m.getAbsoluteDistance(e[i-1],t.margin,!1),a=Math.max(a,c)),o&&i1&&t.limit&&(n&&i>0&&(c=m.getAbsoluteDistance(e[i-1],t.limit,!1),a=Math.min(a,c)),o&&i1?n.forEach(function(A,g){var P=Z(l,A,l[A]+i,S[g],b[g],!1,c);P===!1?i=0:(i=P-l[A],l[A]=P)}):S=b=[!0];var C=!1;n.forEach(function(A,g){C=T(A,a[A]+i,S[g],b[g],!1,c)||C}),C&&(n.forEach(function(A){y("update",A),y("slide",A)}),o!=null&&y("drag",h))}function kt(e,i){return t.dir?100-e-i:e}function pe(e,i){x[e]=i,F[e]=m.fromStepping(i);var a=kt(i,0)-at,n="translate("+dt(a+"%","0")+")";if(p[e].style[t.transformRule]=n,t.events.invertConnects&&x.length>1){var o=x.every(function(l,h,c){return h===0||l>=c[h-1]});if($!==!o){we();return}}G(e),G(e+1),$&&(G(e-1),G(e+2))}function vt(){O.forEach(function(e){var i=x[e]>50?-1:1,a=3+(p.length+i*e);p[e].style.zIndex=String(a)})}function T(e,i,a,n,o,l){return o||(i=Z(x,e,i,a,n,!1,l)),i===!1?!1:(pe(e,i),!0)}function G(e){if(V[e]){var i=x.slice();$&&i.sort(function(c,S){return c-S});var a=0,n=100;e!==0&&(a=i[e-1]),e!==V.length-1&&(n=i[e]);var o=n-a,l="translate("+dt(kt(a,o)+"%","0")+")",h="scale("+dt(o/100,"1")+")";V[e].style[t.transformRule]=l+" "+h}}function Ut(e,i){return e===null||e===!1||e===void 0||(typeof e=="number"&&(e=String(e)),e=t.format.from(e),e!==!1&&(e=m.toStepping(e)),e===!1||isNaN(e))?x[i]:e}function Q(e,i,a){var n=it(e),o=x[0]===void 0;i=i===void 0?!0:i,t.animate&&!o&&Rt(d,t.cssClasses.tap,t.animationDuration),O.forEach(function(c){T(c,Ut(n[c],c),!0,!1,a)});var l=O.length===1?0:1;if(o&&m.hasNoSize()&&(a=!0,x[0]=0,O.length>1)){var h=100/(O.length-1);O.forEach(function(c){x[c]=c*h})}for(;l=0&&ea.stepAfter.startValue&&(o=a.stepAfter.startValue-n),n>a.thisStep.startValue?l=a.thisStep.step:a.stepBefore.step===!1?l=!1:l=n-a.stepBefore.highestStep,i===100?o=null:i===0&&(l=null);var h=m.countStepDecimals();return o!==null&&o!==!1&&(o=Number(o.toFixed(h))),l!==null&&l!==!1&&(l=Number(l.toFixed(h))),[l,o]}function be(){return O.map(Ot)}function xe(e,i){var a=Mt(),n=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];n.forEach(function(l){e[l]!==void 0&&(s[l]=e[l])});var o=Xt(s);n.forEach(function(l){e[l]!==void 0&&(t[l]=o[l])}),m=o.spectrum,t.margin=o.margin,t.limit=o.limit,t.padding=o.padding,t.pips?ut(t.pips):lt(),t.tooltips?Ct():ot(),x=[],Q(bt(e.start)?e.start:a,i),e.connect&&_t()}function _t(){for(;E.firstChild;)E.removeChild(E.firstChild);for(var e=0;e<=t.handles;e++)V[e]=st(E,t.connect[e]),G(e);Vt({drag:t.events.drag,fixed:!0})}function we(){$=!$,It(t,t.connect.map(function(e){return!e})),_t()}function Ee(){w=Qt(d),Zt(t.connect,w),Vt(t.events),Q(t.start),t.pips&&ut(t.pips),t.tooltips&&Ct(),ie()}Ee();var tt={destroy:Se,steps:be,on:ht,off:W,get:Mt,set:Q,setHandle:ge,reset:me,disable:ee,enable:re,__moveHandles:function(e,i,a){Dt(e,i,x,a)},options:s,updateOptions:xe,target:d,removePips:lt,removeTooltips:ot,getPositions:function(){return x.slice()},getTooltips:function(){return R},getOrigins:function(){return p},pips:ut};return tt}function nr(r,t){if(!r||!r.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+r);if(r.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var s=Xt(t),u=sr(r,s,t);return r.noUiSlider=u,u}var Yt={__spectrum:Kt,cssClasses:$t,create:nr};function Wt(r,t){let s=r.previousElementSibling;if(!s?.hasAttribute("data-field-accessibility"))return null;let u=()=>t({"aria-describedby":s.getAttribute("aria-describedby"),"aria-invalid":s.getAttribute("aria-invalid")},s);u();let f=new MutationObserver(u);return f.observe(s,{attributes:!0,attributeFilter:["aria-describedby","aria-invalid","data-preserve-filepond-description"]}),f}function Gt(r,t){if(r)for(let[s,u]of Object.entries(t))u==null||u===!1?r.removeAttribute(s):r.setAttribute(s,u)}function or({arePipsStepped:r,behavior:t,decimalPlaces:s,fillTrack:u,isDisabled:f,isRtl:v,isVertical:d,maxDifference:w,minDifference:E,maxValue:p,minValue:V,nonLinearPoints:D,pipsDensity:R,pipsFilter:m,pipsFormatter:F,pipsMode:x,pipsValues:O,rangePadding:Y,state:z,step:$,tooltips:B}){return{state:z,slider:null,accessibilityObserver:null,init(){this.slider=Yt.create(this.$el,{behaviour:t,direction:v?"rtl":"ltr",connect:u,format:{from:U=>+U,to:U=>s!==null?+U.toFixed(s):U},limit:w,margin:E,orientation:d?"vertical":"horizontal",padding:Y,pips:x?{density:R??10,filter:m,format:F,mode:x,stepped:r,values:O}:null,range:{min:V,...D??{},max:p},start:Alpine.raw(this.state),step:$,tooltips:B}),this.$el.id&&this.$el.querySelectorAll(".noUi-handle").forEach(U=>U.setAttribute("aria-labelledby",`${this.$el.id}-label`));let X=this.$el.querySelectorAll(".noUi-handle");this.accessibilityObserver=Wt(this.$el,U=>{X.forEach(at=>Gt(at,U))}),f&&this.slider.disable(),this.slider.on("change",U=>{this.state=U.length>1?U:U[0]}),this.$watch("state",()=>{this.slider.set(Alpine.raw(this.state))})},destroy(){this.accessibilityObserver?.disconnect(),this.slider.destroy(),this.slider=null}}}export{or as default};