import{c as t,f as e,g as i,A as r,a6 as n,a7 as a,M as s,_ as d,t as o,i as u,e as l,n as h,a as c,F as m,R as p,x as v,o as b,a3 as T,l as f,D as g,J as y,d as S}from"./core.js";export{a6 as Thumb}from"./core.js";const E=t`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{height:4px;position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{border-radius:3px;height:6px;overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{border-radius:2px;height:4px;left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider .mdc-slider__track--active_fill{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider .mdc-slider__track--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.24}.mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.24}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:50%;left:var(--slider-value-indicator-container-left, 50%);pointer-events:none;position:absolute;right:var(--slider-value-indicator-container-right);transform:translateX(-50%);transform:var(--slider-value-indicator-container-transform, translateX(-50%))}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;left:var(--slider-value-indicator-caret-left, 50%);position:absolute;right:var(--slider-value-indicator-caret-right);transform:translateX(-50%);transform:var(--slider-value-indicator-caret-transform, translateX(-50%));width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__value-indicator-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-slider .mdc-slider__value-indicator{background-color:#000;opacity:.6}.mdc-slider .mdc-slider__value-indicator::before{border-top-color:#000}.mdc-slider .mdc-slider__value-indicator{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-slider .mdc-slider__thumb{display:flex;height:48px;left:-24px;outline:none;position:absolute;user-select:none;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 1px 3px 0px rgba(0,0,0,.12);border:10px solid;border-radius:50%;box-sizing:border-box;height:20px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:20px}.mdc-slider .mdc-slider__thumb-knob{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider .mdc-slider__thumb::before,.mdc-slider .mdc-slider__thumb::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-slider .mdc-slider__thumb:hover::before,.mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider .mdc-slider__tick-mark--active,.mdc-slider .mdc-slider__tick-mark--inactive{border-radius:50%;height:2px;width:2px}.mdc-slider .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider .mdc-slider__tick-mark--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.6}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider--disabled{opacity:.38;cursor:auto}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}:host{outline:none;display:block;-webkit-tap-highlight-color:transparent}.ripple{--mdc-ripple-color:#6200ee;--mdc-ripple-color:var(--mdc-theme-primary, #6200ee)}`;var _={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}};function R(t,e){if(function(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}(t)&&e in _){var i=t.document.createElement("div"),r=_[e],n=r.standard,a=r.prefixed;return n in i.style?n:a}return e}var k,w="mdc-slider--disabled",A="mdc-slider--discrete",I="mdc-slider--range",x="mdc-slider__thumb--focused",D="mdc-slider__thumb--top",C="mdc-slider__thumb--with-indicator",P="mdc-slider--tick-marks",M=1,F=0,N=5,L="aria-valuetext",H="disabled",V="min",B="max",$="value",U="step",X="data-min-range",W="--slider-value-indicator-caret-left",O="--slider-value-indicator-caret-right",z="--slider-value-indicator-caret-transform",K="--slider-value-indicator-container-left",q="--slider-value-indicator-container-right",j="--slider-value-indicator-container-transform";!function(t){t.SLIDER_UPDATE="slider_update"}(k||(k={}));var J="undefined"!=typeof window,Y=function(t){function s(e){var n=t.call(this,i(i({},s.defaultAdapter),e))||this;return n.initialStylesRemoved=!1,n.isDisabled=!1,n.isDiscrete=!1,n.step=M,n.minRange=F,n.hasTickMarks=!1,n.isRange=!1,n.thumb=null,n.downEventClientX=null,n.startThumbKnobWidth=0,n.endThumbKnobWidth=0,n.animFrame=new r,n}return e(s,t),Object.defineProperty(s,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},addThumbClass:function(){},removeThumbClass:function(){},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){},isInputFocused:function(){return!1},shouldHideFocusStylesForPointerEvents:function(){return!1},getThumbKnobWidth:function(){return 0},getValueIndicatorContainerWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return!1},setThumbStyleProperty:function(){},removeThumbStyleProperty:function(){},setTrackActiveStyleProperty:function(){},removeTrackActiveStyleProperty:function(){},setValueIndicatorText:function(){},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){},setPointerCapture:function(){},emitChangeEvent:function(){},emitInputEvent:function(){},emitDragStartEvent:function(){},emitDragEndEvent:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerThumbEventHandler:function(){},deregisterThumbEventHandler:function(){},registerInputEventHandler:function(){},deregisterInputEventHandler:function(){},registerBodyEventHandler:function(){},deregisterBodyEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),s.prototype.init=function(){var t=this;this.isDisabled=this.adapter.hasClass(w),this.isDiscrete=this.adapter.hasClass(A),this.hasTickMarks=this.adapter.hasClass(P),this.isRange=this.adapter.hasClass(I);var e=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(V,this.isRange?n.START:n.END),V),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(B,n.END),B),r=this.convertAttributeValueToNumber(this.adapter.getInputAttribute($,n.END),$),a=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute($,n.START),$):e,s=this.adapter.getInputAttribute(U,n.END),d=s?this.convertAttributeValueToNumber(s,U):this.step,o=this.adapter.getAttribute(X),u=o?this.convertAttributeValueToNumber(o,X):this.minRange;this.validateProperties({min:e,max:i,value:r,valueStart:a,step:d,minRange:u}),this.min=e,this.max=i,this.value=r,this.valueStart=a,this.step=d,this.minRange=u,this.numDecimalPlaces=G(this.step),this.valueBeforeDownEvent=r,this.valueStartBeforeDownEvent=a,this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this),this.moveListener=this.handleMove.bind(this),this.pointerdownListener=this.handlePointerdown.bind(this),this.pointerupListener=this.handlePointerup.bind(this),this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this),this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this),this.inputStartChangeListener=function(){t.handleInputChange(n.START)},this.inputEndChangeListener=function(){t.handleInputChange(n.END)},this.inputStartFocusListener=function(){t.handleInputFocus(n.START)},this.inputEndFocusListener=function(){t.handleInputFocus(n.END)},this.inputStartBlurListener=function(){t.handleInputBlur(n.START)},this.inputEndBlurListener=function(){t.handleInputBlur(n.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},s.prototype.destroy=function(){this.deregisterEventHandlers()},s.prototype.setMin=function(t){this.min=t,this.isRange||(this.valueStart=t),this.updateUI()},s.prototype.setMax=function(t){this.max=t,this.updateUI()},s.prototype.getMin=function(){return this.min},s.prototype.getMax=function(){return this.max},s.prototype.getValue=function(){return this.value},s.prototype.setValue=function(t){if(this.isRange&&t= start thumb value ("+this.valueStart+") + min range ("+this.minRange+")");this.updateValue(t,n.END)},s.prototype.getValueStart=function(){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");return this.valueStart},s.prototype.setValueStart=function(t){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");if(this.isRange&&t>this.value-this.minRange)throw new Error("start thumb value ("+t+") must be <= end thumb value ("+this.value+") - min range ("+this.minRange+")");this.updateValue(t,n.START)},s.prototype.setStep=function(t){this.step=t,this.numDecimalPlaces=G(t),this.updateUI()},s.prototype.setMinRange=function(t){if(!this.isRange)throw new Error("`minRange` is only applicable for range sliders.");if(t<0)throw new Error("`minRange` must be non-negative. Current value: "+t);if(this.value-this.valueStart=i.left&&t<=i.right,s=t>=r.left&&t<=r.right;return a&&s?null:a?n.START:s?n.END:ethis.value?n.END:e-this.valueStart<=this.value-e?n.START:n.END},s.prototype.getThumbFromMoveEvent=function(t){if(null!==this.thumb)return this.thumb;if(null===this.downEventClientX)throw new Error("`downEventClientX` is null after move event.");return Math.abs(this.downEventClientX-t)this.value-this.minRange?this.value-this.minRange:this.isRange&&e===n.END&&te+i?(this.adapter.setThumbStyleProperty(W,i+"px",t),this.adapter.setThumbStyleProperty(O,"auto",t),this.adapter.setThumbStyleProperty(z,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(K,"0",t),this.adapter.setThumbStyleProperty(q,"auto",t),this.adapter.setThumbStyleProperty(j,"none",t)):r/2>n-e+i?(this.adapter.setThumbStyleProperty(W,"auto",t),this.adapter.setThumbStyleProperty(O,i+"px",t),this.adapter.setThumbStyleProperty(z,"translateX(50%)",t),this.adapter.setThumbStyleProperty(K,"auto",t),this.adapter.setThumbStyleProperty(q,"0",t),this.adapter.setThumbStyleProperty(j,"none",t)):(this.adapter.setThumbStyleProperty(W,"50%",t),this.adapter.setThumbStyleProperty(O,"auto",t),this.adapter.setThumbStyleProperty(z,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(K,"50%",t),this.adapter.setThumbStyleProperty(q,"auto",t),this.adapter.setThumbStyleProperty(j,"translateX(-50%)",t))}},s.prototype.removeInitialStyles=function(t){if(!this.initialStylesRemoved){var e=t?"right":"left";this.adapter.removeThumbStyleProperty(e,n.END),this.isRange&&this.adapter.removeThumbStyleProperty(e,n.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},s.prototype.resetTrackAndThumbAnimation=function(){var t=this;if(this.isDiscrete){var e=J?R(window,"transition"):"transition",i="none 0s ease 0s";this.adapter.setThumbStyleProperty(e,i,n.END),this.isRange&&this.adapter.setThumbStyleProperty(e,i,n.START),this.adapter.setTrackActiveStyleProperty(e,i),requestAnimationFrame((function(){t.adapter.removeThumbStyleProperty(e,n.END),t.adapter.removeTrackActiveStyleProperty(e),t.isRange&&t.adapter.removeThumbStyleProperty(e,n.START)}))}},s.prototype.updateOverlappingThumbsUI=function(t,e,i){var r=!1;if(this.adapter.isRTL()){var a=t-this.startThumbKnobWidth/2;r=e+this.endThumbKnobWidth/2>=a}else{r=t+this.startThumbKnobWidth/2>=e-this.endThumbKnobWidth/2}r?(this.adapter.addThumbClass(D,i||n.END),this.adapter.removeThumbClass(D,i===n.START?n.END:n.START)):(this.adapter.removeThumbClass(D,n.START),this.adapter.removeThumbClass(D,n.END))},s.prototype.convertAttributeValueToNumber=function(t,e){if(null===t)throw new Error("MDCSliderFoundation: `"+e+"` must be non-null.");var i=Number(t);if(isNaN(i))throw new Error("MDCSliderFoundation: `"+e+"` value is `"+t+"`, but must be a number.");return i},s.prototype.validateProperties=function(t){var e=t.min,i=t.max,r=t.value,n=t.valueStart,a=t.step,s=t.minRange;if(e>=i)throw new Error("MDCSliderFoundation: min must be strictly less than max. Current: [min: "+e+", max: "+i+"]");if(a<=0)throw new Error("MDCSliderFoundation: step must be a positive number. Current step: "+a);if(this.isRange){if(ri||ni)throw new Error("MDCSliderFoundation: values must be in [min, max] range. Current values: [start value: "+n+", end value: "+r+", min: "+e+", max: "+i+"]");if(n>r)throw new Error("MDCSliderFoundation: start value must be <= end value. Current values: [start value: "+n+", end value: "+r+"]");if(s<0)throw new Error("MDCSliderFoundation: minimum range must be non-negative. Current min range: "+s);if(r-ni)throw new Error("MDCSliderFoundation: value must be in [min, max] range. Current values: [value: "+r+", min: "+e+", max: "+i+"]");o=(r-e)/a;if(!Number.isInteger(parseFloat(o.toFixed(6))))throw new Error("MDCSliderFoundation: Slider value must be valid based on the step value ("+a+"). Current value: "+r)}},s.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),s.SUPPORTS_POINTER_EVENTS?(this.adapter.registerEventHandler("pointerdown",this.pointerdownListener),this.adapter.registerEventHandler("pointerup",this.pointerupListener)):(this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.registerThumbEventHandler(n.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(n.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(n.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(n.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(n.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(n.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(n.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(n.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(n.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(n.END,"blur",this.inputEndBlurListener)},s.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),s.SUPPORTS_POINTER_EVENTS?(this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener),this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)):(this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.deregisterThumbEventHandler(n.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(n.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(n.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(n.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(n.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(n.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(n.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(n.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(n.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(n.END,"blur",this.inputEndBlurListener)},s.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},s.SUPPORTS_POINTER_EVENTS=J&&Boolean(window.PointerEvent)&&!(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document),s}(s);function G(t){var e=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(t));if(!e)return 0;var i=e[1]||"",r=e[2]||0;return Math.max(0,("0"===i?0:i.length)-Number(r))}class Q extends m{constructor(){super(...arguments),this.mdcFoundationClass=Y,this.disabled=!1,this.min=0,this.max=100,this.valueEnd=0,this.name="",this.step=1,this.withTickMarks=!1,this.discrete=!1,this.tickMarks=[],this.trackTransformOriginStyle="",this.trackLeftStyle="",this.trackRightStyle="",this.trackTransitionStyle="",this.endThumbWithIndicator=!1,this.endThumbTop=!1,this.shouldRenderEndRipple=!1,this.endThumbTransformStyle="",this.endThumbTransitionStyle="",this.endThumbCssProperties={},this.valueToAriaTextTransform=null,this.valueToValueIndicatorTransform=t=>`${t}`,this.boundMoveListener=null,this.endRippleHandlers=new p((()=>(this.shouldRenderEndRipple=!0,this.endRipple)))}update(t){if(t.has("valueEnd")&&this.mdcFoundation){this.mdcFoundation.setValue(this.valueEnd);const t=this.mdcFoundation.getValue();t!==this.valueEnd&&(this.valueEnd=t)}t.has("discrete")&&(this.discrete||(this.tickMarks=[])),super.update(t)}render(){return this.renderRootEl(v` ${this.renderStartInput()} ${this.renderEndInput()} ${this.renderTrack()} ${this.renderTickMarks()} ${this.renderStartThumb()} ${this.renderEndThumb()}`)}renderRootEl(t){const e=b({"mdc-slider--disabled":this.disabled,"mdc-slider--discrete":this.discrete});return v`
${t}
`}renderStartInput(){return T}renderEndInput(){var t;return v` `}renderTrack(){return T}renderTickMarks(){return this.withTickMarks?v`
${this.tickMarks.map((t=>{const e=t===a.ACTIVE;return v`
`}))}
`:T}renderStartThumb(){return T}renderEndThumb(){const t=b({"mdc-slider__thumb--with-indicator":this.endThumbWithIndicator,"mdc-slider__thumb--top":this.endThumbTop}),e=g(Object.assign({"-webkit-transform":this.endThumbTransformStyle,transform:this.endThumbTransformStyle,"-webkit-transition":this.endThumbTransitionStyle,transition:this.endThumbTransitionStyle,left:this.endThumbTransformStyle||"rtl"===getComputedStyle(this).direction?"":`calc(${(this.valueEnd-this.min)/(this.max-this.min)*100}% - 24px)`,right:this.endThumbTransformStyle||"rtl"!==getComputedStyle(this).direction?"":`calc(${(this.valueEnd-this.min)/(this.max-this.min)*100}% - 24px)`},this.endThumbCssProperties)),i=this.shouldRenderEndRipple?v``:T;return v`
${i} ${this.renderValueIndicator(this.valueToValueIndicatorTransform(this.valueEnd))}
`}renderValueIndicator(t){return this.discrete?v` `:T}disconnectedCallback(){super.disconnectedCallback(),this.mdcFoundation&&this.mdcFoundation.destroy()}createAdapter(){}async firstUpdated(){super.firstUpdated(),await this.layout(!0)}updated(t){super.updated(t),this.mdcFoundation&&(t.has("disabled")&&this.mdcFoundation.setDisabled(this.disabled),t.has("min")&&this.mdcFoundation.setMin(this.min),t.has("max")&&this.mdcFoundation.setMax(this.max),t.has("step")&&this.mdcFoundation.setStep(this.step),t.has("discrete")&&this.mdcFoundation.setIsDiscrete(this.discrete),t.has("withTickMarks")&&this.mdcFoundation.setHasTickMarks(this.withTickMarks))}async layout(t=!1){var e;null===(e=this.mdcFoundation)||void 0===e||e.layout({skipUpdateUI:t}),this.requestUpdate(),await this.updateComplete}onEndChange(t){var e;this.valueEnd=Number(t.target.value),null===(e=this.mdcFoundation)||void 0===e||e.handleInputChange(n.END)}onEndFocus(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleInputFocus(n.END),this.endRippleHandlers.startFocus()}onEndBlur(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleInputBlur(n.END),this.endRippleHandlers.endFocus()}onEndMouseenter(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleThumbMouseenter(),this.endRippleHandlers.startHover()}onEndMouseleave(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleThumbMouseleave(),this.endRippleHandlers.endHover()}onPointerdown(t){this.layout(),this.mdcFoundation&&(this.mdcFoundation.handlePointerdown(t),this.boundMoveListener=this.mdcFoundation.handleMove.bind(this.mdcFoundation),this.mdcRoot.addEventListener("pointermove",this.boundMoveListener))}onPointerup(){this.mdcFoundation&&(this.mdcFoundation.handleUp(),this.boundMoveListener&&(this.mdcRoot.removeEventListener("pointermove",this.boundMoveListener),this.boundMoveListener=null))}onContextmenu(t){t.preventDefault()}setFormData(t){this.name&&t.append(this.name,`${this.valueEnd}`)}}d([u("input.end")],Q.prototype,"formElement",void 0),d([u(".mdc-slider")],Q.prototype,"mdcRoot",void 0),d([u(".end.mdc-slider__thumb")],Q.prototype,"endThumb",void 0),d([u(".end.mdc-slider__thumb .mdc-slider__thumb-knob")],Q.prototype,"endThumbKnob",void 0),d([u(".end.mdc-slider__thumb .mdc-slider__value-indicator-container")],Q.prototype,"endValueIndicatorContainer",void 0),d([l(".end .ripple")],Q.prototype,"endRipple",void 0),d([h({type:Boolean,reflect:!0})],Q.prototype,"disabled",void 0),d([h({type:Number})],Q.prototype,"min",void 0),d([h({type:Number})],Q.prototype,"max",void 0),d([h({type:Number})],Q.prototype,"valueEnd",void 0),d([h({type:String})],Q.prototype,"name",void 0),d([h({type:Number})],Q.prototype,"step",void 0),d([h({type:Boolean})],Q.prototype,"withTickMarks",void 0),d([h({type:Boolean})],Q.prototype,"discrete",void 0),d([o()],Q.prototype,"tickMarks",void 0),d([o()],Q.prototype,"trackTransformOriginStyle",void 0),d([o()],Q.prototype,"trackLeftStyle",void 0),d([o()],Q.prototype,"trackRightStyle",void 0),d([o()],Q.prototype,"trackTransitionStyle",void 0),d([o()],Q.prototype,"endThumbWithIndicator",void 0),d([o()],Q.prototype,"endThumbTop",void 0),d([o()],Q.prototype,"shouldRenderEndRipple",void 0),d([o()],Q.prototype,"endThumbTransformStyle",void 0),d([o()],Q.prototype,"endThumbTransitionStyle",void 0),d([o()],Q.prototype,"endThumbCssProperties",void 0),d([c,h({type:String,attribute:"aria-label"})],Q.prototype,"ariaLabel",void 0),d([c,h({type:String,attribute:"aria-labelledby"})],Q.prototype,"ariaLabelledBy",void 0),d([c,h({type:String,attribute:"aria-describedby"})],Q.prototype,"ariaDescribedBy",void 0);class Z extends Q{get value(){return this.valueEnd}set value(t){this.valueEnd=t}renderTrack(){const t=g({"transform-origin":this.trackTransformOriginStyle,left:this.trackLeftStyle,right:this.trackRightStyle,"-webkit-transform":`scaleX(${(this.valueEnd-this.min)/(this.max-this.min)})`,transform:`scaleX(${(this.valueEnd-this.min)/(this.max-this.min)})`,"-webkit-transition":this.trackTransitionStyle,transition:this.trackTransitionStyle});return v`
`}createAdapter(){return{addClass:t=>{if("mdc-slider--disabled"===t)this.disabled=!0},removeClass:t=>{if("mdc-slider--disabled"===t)this.disabled=!1},hasClass:t=>{switch(t){case"mdc-slider--disabled":return this.disabled;case"mdc-slider--discrete":return this.discrete;default:return!1}},addThumbClass:(t,e)=>{if(e!==n.START&&"mdc-slider__thumb--with-indicator"===t)this.endThumbWithIndicator=!0},removeThumbClass:(t,e)=>{if(e!==n.START&&"mdc-slider__thumb--with-indicator"===t)this.endThumbWithIndicator=!1},registerEventHandler:()=>{},deregisterEventHandler:()=>{},registerBodyEventHandler:(t,e)=>{document.body.addEventListener(t,e)},deregisterBodyEventHandler:(t,e)=>{document.body.removeEventListener(t,e)},registerInputEventHandler:(t,e,i)=>{t!==n.START&&this.formElement.addEventListener(e,i)},deregisterInputEventHandler:(t,e,i)=>{t!==n.START&&this.formElement.removeEventListener(e,i)},registerThumbEventHandler:()=>{},deregisterThumbEventHandler:()=>{},registerWindowEventHandler:(t,e)=>{window.addEventListener(t,e)},deregisterWindowEventHandler:(t,e)=>{window.addEventListener(t,e)},emitChangeEvent:(t,e)=>{if(e===n.START)return;const i=new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:t,thumb:e}});this.dispatchEvent(i)},emitDragEndEvent:(t,e)=>{e!==n.START&&this.endRippleHandlers.endPress()},emitDragStartEvent:(t,e)=>{e!==n.START&&this.endRippleHandlers.startPress()},emitInputEvent:(t,e)=>{if(e===n.START)return;const i=new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:t,thumb:e}});this.dispatchEvent(i)},focusInput:t=>{t!==n.START&&this.formElement.focus()},getAttribute:()=>"",getBoundingClientRect:()=>this.mdcRoot.getBoundingClientRect(),getInputAttribute:(t,e)=>{if(e===n.START)return null;switch(t){case"min":return this.min.toString();case"max":return this.max.toString();case"value":return this.valueEnd.toString();case"step":return this.step.toString();default:return null}},getInputValue:t=>t===n.START?"":this.valueEnd.toString(),getThumbBoundingClientRect:t=>t===n.START?this.getBoundingClientRect():this.endThumb.getBoundingClientRect(),getThumbKnobWidth:t=>t===n.START?0:this.endThumbKnob.getBoundingClientRect().width,getValueIndicatorContainerWidth:t=>t===n.START?0:this.endValueIndicatorContainer.getBoundingClientRect().width,getValueToAriaValueTextFn:()=>this.valueToAriaTextTransform,isInputFocused:t=>{if(t===n.START)return!1;const e=y();return e[e.length-1]===this.formElement},isRTL:()=>"rtl"===getComputedStyle(this).direction,setInputAttribute:(t,e,i)=>{n.START},removeInputAttribute:t=>{},setThumbStyleProperty:(t,e,i)=>{if(i!==n.START)switch(t){case"transform":case"-webkit-transform":this.endThumbTransformStyle=e;break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle=e;break;default:t.startsWith("--")&&(this.endThumbCssProperties[t]=e)}},removeThumbStyleProperty:(t,e)=>{if(e!==n.START)switch(t){case"left":case"right":break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle=""}},setTrackActiveStyleProperty:(t,e)=>{switch(t){case"transform-origin":this.trackTransformOriginStyle=e;break;case"left":this.trackLeftStyle=e;break;case"right":this.trackRightStyle=e;break;case"transform":case"-webkit-transform":break;case"transition":case"-webkit-transition":this.trackTransitionStyle=e}},removeTrackActiveStyleProperty:t=>{switch(t){case"transition":case"-webkit-transition":this.trackTransitionStyle=""}},setInputValue:(t,e)=>{e!==n.START&&(this.valueEnd=Number(t))},setPointerCapture:t=>{this.mdcRoot.setPointerCapture(t)},setValueIndicatorText:()=>{},updateTickMarks:t=>{this.tickMarks=t}}}}d([h({type:Number})],Z.prototype,"value",null);let tt=class extends Z{};tt.styles=[E],tt=d([S("mwc-slider")],tt);export{tt as Slider};