!function(){function e(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function r(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var n,a,i=[],l=!0,o=!1;try{for(t=t.call(e);!(l=(n=t.next()).done)&&(i.push(n.value),!r||i.length!==r);l=!0);}catch(u){o=!0,a=u}finally{try{l||null==t.return||t.return()}finally{if(o)throw a}}return i}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t(e,r)}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}System.register(["./index-legacy.9e093f2b.js"],(function(t){"use strict";var n,a,i,l,o,u,c,d,v,f,s,m,b,g,y,h,p,S,w;return{setters:[function(e){n=e.t,a=e.d,i=e.R,l=e.aq,o=e.D,u=e.U,c=e.b5,d=e.a0,v=e.c,f=e.z,s=e.E,m=e.aW,b=e.an,g=e.a4,y=e.bM,h=e.b6,p=e.b4,S=e.aU,w=e.x}],execute:function(){var V=r(n("slider"),2),x=V[0],A=V[1],N={min:f(0),max:f(100),step:f(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:s,buttonSize:s,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}},C=a({name:x,props:N,emits:["change","dragEnd","dragStart","update:modelValue"],setup:function(t,n){var a,f,s,w=n.emit,V=n.slots,x=i(),N=i(),C=i(),j=l(),B=o((function(){return Number(t.max)-Number(t.min)})),k=o((function(){var r=t.vertical?"width":"height";return e({background:t.inactiveColor},r,u(t.barHeight))})),z=function(e){return t.range&&Array.isArray(e)},E=o((function(){var r,n,a,i=(e(r={},t.vertical?"height":"width",(n=t.modelValue,a=t.min,z(n)?"".concat(100*(n[1]-n[0])/B.value,"%"):"".concat(100*(n-Number(a))/B.value,"%"))),e(r,"background",t.activeColor),r);C.value&&(i.transition="none");return i[t.vertical?t.reverse?"bottom":"top":t.reverse?"right":"left"]=function(){var e=t.modelValue,r=t.min;return z(e)?"".concat(100*(e[0]-Number(r))/B.value,"%"):"0%"}(),i})),T=function(e){var r=+t.min,n=+t.max,a=+t.step;e=S(e,r,n);var i=Math.round((e-r)/a)*a;return h(r,i)},I=function(e,r){e=z(e)?function(e){var r,n,a=null!=(r=e[0])?r:Number(t.min),i=null!=(n=e[1])?n:Number(t.max);return a>i?[i,a]:[a,i]}(e).map(T):T(e),m(e,t.modelValue)||w("update:modelValue",e),r&&!m(e,s)&&w("change",e)},M=function(e){if(e.stopPropagation(),!t.disabled&&!t.readonly){var n=t.min,a=t.reverse,i=t.vertical,l=t.modelValue,o=b(x),u=i?o.height:o.width,c=Number(n)+(i?a?o.bottom-e.clientY:e.clientY-o.top:a?o.right-e.clientX:e.clientX-o.left)/u*B.value;if(z(l)){var d=r(l,2),v=d[0],f=d[1];I(c<=(v+f)/2?[c,f]:[v,c],!0)}else I(c,!0)}},O=function(e){t.disabled||t.readonly||("dragging"===C.value&&(I(f,!0),w("dragEnd",e)),C.value="")},P=function(e){if("number"==typeof e){return A("button-wrapper",["left","right"][e])}return A("button-wrapper",t.reverse?"left":"right")},U=function(e,r){if("number"==typeof r){var n=V[0===r?"left-button":"right-button"];if(n)return n({value:e})}return V.button?V.button({value:e}):v("div",{class:A("button"),style:p(t.buttonSize)},null)},X=function(e){var r="number"==typeof e?t.modelValue[e]:t.modelValue;return v("div",{ref:N,role:"slider",class:P(e),tabindex:t.disabled?void 0:0,"aria-valuemin":t.min,"aria-valuenow":r,"aria-valuemax":t.max,"aria-disabled":t.disabled||void 0,"aria-readonly":t.readonly||void 0,"aria-orientation":t.vertical?"vertical":"horizontal",onTouchstartPassive:function(r){"number"==typeof e&&(a=e),function(e){t.disabled||t.readonly||(j.start(e),f=t.modelValue,s=z(f)?f.map(T):T(f),C.value="start")}(r)},onTouchend:O,onTouchcancel:O,onClick:y},[U(r,e)])};return I(t.modelValue),c((function(){return t.modelValue})),d("touchmove",(function(e){if(!t.disabled&&!t.readonly){"start"===C.value&&w("dragStart",e),g(e,!0),j.move(e),C.value="dragging";var r=b(x),n=(t.vertical?j.deltaY.value:j.deltaX.value)/(t.vertical?r.height:r.width)*B.value;if(t.reverse&&(n=-n),z(s)){var i=t.reverse?1-a:a;f[i]=s[i]+n}else f=s+n;I(f)}}),{target:N}),function(){return v("div",{ref:x,style:k.value,class:A({vertical:t.vertical,disabled:t.disabled}),onClick:M},[v("div",{class:A("bar"),style:E.value},[t.range?[X(0),X(1)]:X()])])}}});t("S",w(C))}}}))}();
