"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./tslib.es6-CHeFCc6E.js");require("./ripple-handlers-C7an-EE1.js");const c=require("./utils-wMBJ9n_n.js"),r=require("./mwc-slider.css-DytByuJk.js"),a=require("./query-assigned-elements-8EurZY45.js"),h=require("./property-DYTC_2-m.js"),m=require("./style-map-DOMuf9Fg.js");/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */class l extends r.SliderBase{get value(){return this.valueEnd}set value(e){this.valueEnd=e}renderTrack(){const e=m.o({"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 a.x`
      <div class="mdc-slider__track">
        <div class="mdc-slider__track--inactive"></div>
        <div class="mdc-slider__track--active">
          <div
              class="mdc-slider__track--active_fill"
              style=${e}>
          </div>
        </div>
      </div>`}createAdapter(){return{addClass:e=>{switch(e){case"mdc-slider--disabled":this.disabled=!0;break}},removeClass:e=>{switch(e){case"mdc-slider--disabled":this.disabled=!1;break}},hasClass:e=>{switch(e){case"mdc-slider--disabled":return this.disabled;case"mdc-slider--discrete":return this.discrete;default:return!1}},addThumbClass:(e,t)=>{if(t!==r.Thumb.START)switch(e){case"mdc-slider__thumb--with-indicator":this.endThumbWithIndicator=!0;break}},removeThumbClass:(e,t)=>{if(t!==r.Thumb.START)switch(e){case"mdc-slider__thumb--with-indicator":this.endThumbWithIndicator=!1;break}},registerEventHandler:()=>{},deregisterEventHandler:()=>{},registerBodyEventHandler:(e,t)=>{document.body.addEventListener(e,t)},deregisterBodyEventHandler:(e,t)=>{document.body.removeEventListener(e,t)},registerInputEventHandler:(e,t,i)=>{e!==r.Thumb.START&&this.formElement.addEventListener(t,i)},deregisterInputEventHandler:(e,t,i)=>{e!==r.Thumb.START&&this.formElement.removeEventListener(t,i)},registerThumbEventHandler:()=>{},deregisterThumbEventHandler:()=>{},registerWindowEventHandler:(e,t)=>{window.addEventListener(e,t)},deregisterWindowEventHandler:(e,t)=>{window.addEventListener(e,t)},emitChangeEvent:(e,t)=>{if(t===r.Thumb.START)return;const i=new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:e,thumb:t}});this.dispatchEvent(i)},emitDragEndEvent:(e,t)=>{t!==r.Thumb.START&&this.endRippleHandlers.endPress()},emitDragStartEvent:(e,t)=>{t!==r.Thumb.START&&this.endRippleHandlers.startPress()},emitInputEvent:(e,t)=>{if(t===r.Thumb.START)return;const i=new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:e,thumb:t}});this.dispatchEvent(i)},focusInput:e=>{e!==r.Thumb.START&&this.formElement.focus()},getAttribute:()=>"",getBoundingClientRect:()=>this.mdcRoot.getBoundingClientRect(),getInputAttribute:(e,t)=>{if(t===r.Thumb.START)return null;switch(e){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:e=>e===r.Thumb.START?"":this.valueEnd.toString(),getThumbBoundingClientRect:e=>e===r.Thumb.START?this.getBoundingClientRect():this.endThumb.getBoundingClientRect(),getThumbKnobWidth:e=>e===r.Thumb.START?0:this.endThumbKnob.getBoundingClientRect().width,getValueIndicatorContainerWidth:e=>e===r.Thumb.START?0:this.endValueIndicatorContainer.getBoundingClientRect().width,getValueToAriaValueTextFn:()=>this.valueToAriaTextTransform,isInputFocused:e=>{if(e===r.Thumb.START)return!1;const t=c.deepActiveElementPath();return t[t.length-1]===this.formElement},isRTL:()=>getComputedStyle(this).direction==="rtl",setInputAttribute:(e,t,i)=>{r.Thumb.START},removeInputAttribute:e=>{},setThumbStyleProperty:(e,t,i)=>{if(i!==r.Thumb.START)switch(e){case"transform":case"-webkit-transform":this.endThumbTransformStyle=t;break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle=t;break;default:e.startsWith("--")&&(this.endThumbCssProperties[e]=t)}},removeThumbStyleProperty:(e,t)=>{if(t!==r.Thumb.START)switch(e){case"left":case"right":break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle="";break}},setTrackActiveStyleProperty:(e,t)=>{switch(e){case"transform-origin":this.trackTransformOriginStyle=t;break;case"left":this.trackLeftStyle=t;break;case"right":this.trackRightStyle=t;break;case"transform":case"-webkit-transform":break;case"transition":case"-webkit-transition":this.trackTransitionStyle=t;break}},removeTrackActiveStyleProperty:e=>{switch(e){case"transition":case"-webkit-transition":this.trackTransitionStyle="";break}},setInputValue:(e,t)=>{t!==r.Thumb.START&&(this.valueEnd=Number(e))},setPointerCapture:e=>{this.mdcRoot.setPointerCapture(e)},setValueIndicatorText:()=>{},updateTickMarks:e=>{this.tickMarks=e}}}}o.__decorate([h.n({type:Number})],l.prototype,"value",null);const T=":host .mdc-slider__value-indicator{background-color:var(--cv-theme-on-surface);color:var(--cv-theme-on-primary);opacity:.74}:host .mdc-slider__value-indicator:before{border-top-color:var(--cv-theme-on-surface)}";var b=Object.getOwnPropertyDescriptor,v=(n,e,t,i)=>{for(var s=i>1?void 0:i?b(e,t):e,u=n.length-1,d;u>=0;u--)(d=n[u])&&(s=d(s)||s);return s};exports.CovalentSlider=class extends l{};exports.CovalentSlider.styles=[r.styles,a.i`
      ${a.r(T)}
    `];exports.CovalentSlider=v([a.e("cv-slider")],exports.CovalentSlider);const f=exports.CovalentSlider;exports.default=f;
