@material/slider
Version:
The Material Components for the web slider component
1 lines • 57.3 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("@material/slider",[],e):"object"==typeof exports?exports.slider=e():(t.mdc=t.mdc||{},t.mdc.slider=e())}(this,function(){return n={},r.m=i={0:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MDCFoundation=void 0;var n=(Object.defineProperty(r,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.destroy=function(){},r);function r(t){void 0===t&&(t={}),this.adapter=t}e.MDCFoundation=n,e.default=n},1:function(t,e,i){"use strict";var r=this&&this.__read||function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=a.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return s},a=this&&this.__spreadArray||function(t,e){for(var i=0,n=e.length,r=t.length;i<n;i++,r++)t[r]=e[i];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCComponent=void 0;var n=i(0),s=(o.attachTo=function(t){return new o(t,new n.MDCFoundation({}))},o.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},o.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},o.prototype.initialSyncWithDOM=function(){},o.prototype.destroy=function(){this.foundation.destroy()},o.prototype.listen=function(t,e,i){this.root.addEventListener(t,e,i)},o.prototype.unlisten=function(t,e,i){this.root.removeEventListener(t,e,i)},o.prototype.emit=function(t,e,i){var n;void 0===i&&(i=!1),"function"==typeof CustomEvent?n=new CustomEvent(t,{bubbles:i,detail:e}):(n=document.createEvent("CustomEvent")).initCustomEvent(t,i,!1,e),this.root.dispatchEvent(n)},o);function o(t,e){for(var i=[],n=2;n<arguments.length;n++)i[n-2]=arguments[n];this.root=t,this.initialize.apply(this,a([],r(i))),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}e.MDCComponent=s,e.default=s},10:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCorrectEventName=e.getCorrectPropertyName=void 0;var s={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},o={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function u(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}e.getCorrectPropertyName=function(t,e){if(u(t)&&e in s){var i=t.document.createElement("div"),n=s[e],r=n.standard,a=n.prefixed;return r in i.style?r:a}return e},e.getCorrectEventName=function(t,e){if(u(t)&&e in o){var i=t.document.createElement("div"),n=o[e],r=n.standard,a=n.prefixed;return n.cssProperty in i.style?r:a}return e}},116:function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCSliderFoundation=void 0;var l,s=i(17),h=i(10),o=i(0),d=i(62),c=i(63);(l=l||{}).SLIDER_UPDATE="slider_update";var u,p="undefined"!=typeof window,m=(u=o.MDCFoundation,r(v,u),Object.defineProperty(v,"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}),v.prototype.init=function(){var t=this;this.isDisabled=this.adapter.hasClass(d.cssClasses.DISABLED),this.isDiscrete=this.adapter.hasClass(d.cssClasses.DISCRETE),this.hasTickMarks=this.adapter.hasClass(d.cssClasses.TICK_MARKS),this.isRange=this.adapter.hasClass(d.cssClasses.RANGE);var e=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(d.attributes.INPUT_MIN,this.isRange?c.Thumb.START:c.Thumb.END),d.attributes.INPUT_MIN),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(d.attributes.INPUT_MAX,c.Thumb.END),d.attributes.INPUT_MAX),n=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(d.attributes.INPUT_VALUE,c.Thumb.END),d.attributes.INPUT_VALUE),r=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute(d.attributes.INPUT_VALUE,c.Thumb.START),d.attributes.INPUT_VALUE):e,a=this.adapter.getInputAttribute(d.attributes.INPUT_STEP,c.Thumb.END),s=a?this.convertAttributeValueToNumber(a,d.attributes.INPUT_STEP):this.step,o=this.adapter.getAttribute(d.attributes.DATA_MIN_RANGE),u=o?this.convertAttributeValueToNumber(o,d.attributes.DATA_MIN_RANGE):this.minRange;this.validateProperties({min:e,max:i,value:n,valueStart:r,step:s,minRange:u}),this.min=e,this.max=i,this.value=n,this.valueStart=r,this.step=s,this.minRange=u,this.numDecimalPlaces=f(this.step),this.valueBeforeDownEvent=n,this.valueStartBeforeDownEvent=r,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(c.Thumb.START)},this.inputEndChangeListener=function(){t.handleInputChange(c.Thumb.END)},this.inputStartFocusListener=function(){t.handleInputFocus(c.Thumb.START)},this.inputEndFocusListener=function(){t.handleInputFocus(c.Thumb.END)},this.inputStartBlurListener=function(){t.handleInputBlur(c.Thumb.START)},this.inputEndBlurListener=function(){t.handleInputBlur(c.Thumb.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},v.prototype.destroy=function(){this.deregisterEventHandlers()},v.prototype.setMin=function(t){this.min=t,this.isRange||(this.valueStart=t),this.updateUI()},v.prototype.setMax=function(t){this.max=t,this.updateUI()},v.prototype.getMin=function(){return this.min},v.prototype.getMax=function(){return this.max},v.prototype.getValue=function(){return this.value},v.prototype.setValue=function(t){if(this.isRange&&t<this.valueStart+this.minRange)throw new Error("end thumb value ("+t+") must be >= start thumb value ("+this.valueStart+") + min range ("+this.minRange+")");this.updateValue(t,c.Thumb.END)},v.prototype.getValueStart=function(){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");return this.valueStart},v.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,c.Thumb.START)},v.prototype.setStep=function(t){this.step=t,this.numDecimalPlaces=f(t),this.updateUI()},v.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<t)throw new Error("start thumb value ("+this.valueStart+") and end thumb value ("+this.value+") must differ by at least "+t+".");this.minRange=t},v.prototype.setIsDiscrete=function(t){this.isDiscrete=t,this.updateValueIndicatorUI(),this.updateTickMarksUI()},v.prototype.getStep=function(){return this.step},v.prototype.getMinRange=function(){if(!this.isRange)throw new Error("`minRange` is only applicable for range sliders.");return this.minRange},v.prototype.setHasTickMarks=function(t){this.hasTickMarks=t,this.updateTickMarksUI()},v.prototype.getDisabled=function(){return this.isDisabled},v.prototype.setDisabled=function(t){(this.isDisabled=t)?(this.adapter.addClass(d.cssClasses.DISABLED),this.isRange&&this.adapter.setInputAttribute(d.attributes.INPUT_DISABLED,"",c.Thumb.START),this.adapter.setInputAttribute(d.attributes.INPUT_DISABLED,"",c.Thumb.END)):(this.adapter.removeClass(d.cssClasses.DISABLED),this.isRange&&this.adapter.removeInputAttribute(d.attributes.INPUT_DISABLED,c.Thumb.START),this.adapter.removeInputAttribute(d.attributes.INPUT_DISABLED,c.Thumb.END))},v.prototype.getIsRange=function(){return this.isRange},v.prototype.layout=function(t){var e=(void 0===t?{}:t).skipUpdateUI;this.rect=this.adapter.getBoundingClientRect(),this.isRange&&(this.startThumbKnobWidth=this.adapter.getThumbKnobWidth(c.Thumb.START),this.endThumbKnobWidth=this.adapter.getThumbKnobWidth(c.Thumb.END)),e||this.updateUI()},v.prototype.handleResize=function(){this.layout()},v.prototype.handleDown=function(t){if(!this.isDisabled){this.valueStartBeforeDownEvent=this.valueStart,this.valueBeforeDownEvent=this.value;var e=null!=t.clientX?t.clientX:t.targetTouches[0].clientX;this.downEventClientX=e;var i=this.mapClientXOnSliderScale(e);this.thumb=this.getThumbFromDownEvent(e,i),null!==this.thumb&&(this.handleDragStart(t,i,this.thumb),this.updateValue(i,this.thumb,{emitInputEvent:!0}))}},v.prototype.handleMove=function(t){if(!this.isDisabled){t.preventDefault();var e=null!=t.clientX?t.clientX:t.targetTouches[0].clientX,i=null!=this.thumb;if(this.thumb=this.getThumbFromMoveEvent(e),null!==this.thumb){var n=this.mapClientXOnSliderScale(e);i||(this.handleDragStart(t,n,this.thumb),this.adapter.emitDragStartEvent(n,this.thumb)),this.updateValue(n,this.thumb,{emitInputEvent:!0})}}},v.prototype.handleUp=function(){var t,e;if(!this.isDisabled&&null!==this.thumb){(null===(e=(t=this.adapter).shouldHideFocusStylesForPointerEvents)||void 0===e?void 0:e.call(t))&&this.handleInputBlur(this.thumb);var i=this.thumb===c.Thumb.START?this.valueStartBeforeDownEvent:this.valueBeforeDownEvent,n=this.thumb===c.Thumb.START?this.valueStart:this.value;i!==n&&this.adapter.emitChangeEvent(n,this.thumb),this.adapter.emitDragEndEvent(n,this.thumb),this.thumb=null}},v.prototype.handleThumbMouseenter=function(){this.isDiscrete&&this.isRange&&(this.adapter.addThumbClass(d.cssClasses.THUMB_WITH_INDICATOR,c.Thumb.START),this.adapter.addThumbClass(d.cssClasses.THUMB_WITH_INDICATOR,c.Thumb.END))},v.prototype.handleThumbMouseleave=function(){var t,e;this.isDiscrete&&this.isRange&&((null===(e=(t=this.adapter).shouldHideFocusStylesForPointerEvents)||void 0===e||!e.call(t))&&(this.adapter.isInputFocused(c.Thumb.START)||this.adapter.isInputFocused(c.Thumb.END))||this.thumb||(this.adapter.removeThumbClass(d.cssClasses.THUMB_WITH_INDICATOR,c.Thumb.START),this.adapter.removeThumbClass(d.cssClasses.THUMB_WITH_INDICATOR,c.Thumb.END)))},v.prototype.handleMousedownOrTouchstart=function(t){var e=this,i="mousedown"===t.type?"mousemove":"touchmove";function n(){e.handleUp(),e.adapter.deregisterBodyEventHandler(i,e.moveListener),e.adapter.deregisterEventHandler("mouseup",n),e.adapter.deregisterEventHandler("touchend",n)}this.adapter.registerBodyEventHandler(i,this.moveListener),this.adapter.registerBodyEventHandler("mouseup",n),this.adapter.registerBodyEventHandler("touchend",n),this.handleDown(t)},v.prototype.handlePointerdown=function(t){0===t.button&&(null!=t.pointerId&&this.adapter.setPointerCapture(t.pointerId),this.adapter.registerEventHandler("pointermove",this.moveListener),this.handleDown(t))},v.prototype.handleInputChange=function(t){var e=Number(this.adapter.getInputValue(t));t===c.Thumb.START?this.setValueStart(e):this.setValue(e),this.adapter.emitChangeEvent(t===c.Thumb.START?this.valueStart:this.value,t),this.adapter.emitInputEvent(t===c.Thumb.START?this.valueStart:this.value,t)},v.prototype.handleInputFocus=function(t){if(this.adapter.addThumbClass(d.cssClasses.THUMB_FOCUSED,t),this.isDiscrete&&(this.adapter.addThumbClass(d.cssClasses.THUMB_WITH_INDICATOR,t),this.isRange)){var e=t===c.Thumb.START?c.Thumb.END:c.Thumb.START;this.adapter.addThumbClass(d.cssClasses.THUMB_WITH_INDICATOR,e)}},v.prototype.handleInputBlur=function(t){if(this.adapter.removeThumbClass(d.cssClasses.THUMB_FOCUSED,t),this.isDiscrete&&(this.adapter.removeThumbClass(d.cssClasses.THUMB_WITH_INDICATOR,t),this.isRange)){var e=t===c.Thumb.START?c.Thumb.END:c.Thumb.START;this.adapter.removeThumbClass(d.cssClasses.THUMB_WITH_INDICATOR,e)}},v.prototype.handleDragStart=function(t,e,i){var n,r;this.adapter.emitDragStartEvent(e,i),this.adapter.focusInput(i),(null===(r=(n=this.adapter).shouldHideFocusStylesForPointerEvents)||void 0===r?void 0:r.call(n))&&this.handleInputFocus(i),t.preventDefault()},v.prototype.getThumbFromDownEvent=function(t,e){if(!this.isRange)return c.Thumb.END;var i=this.adapter.getThumbBoundingClientRect(c.Thumb.START),n=this.adapter.getThumbBoundingClientRect(c.Thumb.END),r=t>=i.left&&t<=i.right,a=t>=n.left&&t<=n.right;return r&&a?null:r?c.Thumb.START:a?c.Thumb.END:e<this.valueStart?c.Thumb.START:e>this.value?c.Thumb.END:e-this.valueStart<=this.value-e?c.Thumb.START:c.Thumb.END},v.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)<d.numbers.THUMB_UPDATE_MIN_PX?this.thumb:t<this.downEventClientX?this.adapter.isRTL()?c.Thumb.END:c.Thumb.START:this.adapter.isRTL()?c.Thumb.START:c.Thumb.END},v.prototype.updateUI=function(t){t?this.updateThumbAndInputAttributes(t):(this.updateThumbAndInputAttributes(c.Thumb.START),this.updateThumbAndInputAttributes(c.Thumb.END)),this.updateThumbAndTrackUI(t),this.updateValueIndicatorUI(t),this.updateTickMarksUI()},v.prototype.updateThumbAndInputAttributes=function(t){if(t){var e=this.isRange&&t===c.Thumb.START?this.valueStart:this.value,i=String(e);this.adapter.setInputAttribute(d.attributes.INPUT_VALUE,i,t),this.isRange&&t===c.Thumb.START?this.adapter.setInputAttribute(d.attributes.INPUT_MIN,String(e+this.minRange),c.Thumb.END):this.isRange&&t===c.Thumb.END&&this.adapter.setInputAttribute(d.attributes.INPUT_MAX,String(e-this.minRange),c.Thumb.START),this.adapter.getInputValue(t)!==i&&this.adapter.setInputValue(i,t);var n=this.adapter.getValueToAriaValueTextFn();n&&this.adapter.setInputAttribute(d.attributes.ARIA_VALUETEXT,n(e,t),t)}},v.prototype.updateValueIndicatorUI=function(t){if(this.isDiscrete){var e=this.isRange&&t===c.Thumb.START?this.valueStart:this.value;this.adapter.setValueIndicatorText(e,t===c.Thumb.START?c.Thumb.START:c.Thumb.END),!t&&this.isRange&&this.adapter.setValueIndicatorText(this.valueStart,c.Thumb.START)}},v.prototype.updateTickMarksUI=function(){if(this.isDiscrete&&this.hasTickMarks){var t=(this.valueStart-this.min)/this.step,e=(this.value-this.valueStart)/this.step+1,i=(this.max-this.value)/this.step,n=Array.from({length:t}).fill(c.TickMark.INACTIVE),r=Array.from({length:e}).fill(c.TickMark.ACTIVE),a=Array.from({length:i}).fill(c.TickMark.INACTIVE);this.adapter.updateTickMarks(n.concat(r).concat(a))}},v.prototype.mapClientXOnSliderScale=function(t){var e=(t-this.rect.left)/this.rect.width;this.adapter.isRTL()&&(e=1-e);var i=this.min+e*(this.max-this.min);return i===this.max||i===this.min?i:Number(this.quantize(i).toFixed(this.numDecimalPlaces))},v.prototype.quantize=function(t){var e=Math.round((t-this.min)/this.step);return this.min+e*this.step},v.prototype.updateValue=function(t,e,i){var n=(void 0===i?{}:i).emitInputEvent;if(t=this.clampValue(t,e),this.isRange&&e===c.Thumb.START){if(this.valueStart===t)return;this.valueStart=t}else{if(this.value===t)return;this.value=t}this.updateUI(e),n&&this.adapter.emitInputEvent(e===c.Thumb.START?this.valueStart:this.value,e)},v.prototype.clampValue=function(t,e){return t=Math.min(Math.max(t,this.min),this.max),this.isRange&&e===c.Thumb.START&&t>this.value-this.minRange?this.value-this.minRange:this.isRange&&e===c.Thumb.END&&t<this.valueStart+this.minRange?this.valueStart+this.minRange:t},v.prototype.updateThumbAndTrackUI=function(i){var n=this,t=this.max,e=this.min,r=(this.value-this.valueStart)/(t-e),a=r*this.rect.width,s=this.adapter.isRTL(),o=p?h.getCorrectPropertyName(window,"transform"):"transform";if(this.isRange){var u=this.adapter.isRTL()?(t-this.value)/(t-e)*this.rect.width:(this.valueStart-e)/(t-e)*this.rect.width,d=u+a;this.animFrame.request(l.SLIDER_UPDATE,function(){!s&&i===c.Thumb.START||s&&i!==c.Thumb.START?(n.adapter.setTrackActiveStyleProperty("transform-origin","right"),n.adapter.setTrackActiveStyleProperty("left","auto"),n.adapter.setTrackActiveStyleProperty("right",n.rect.width-d+"px")):(n.adapter.setTrackActiveStyleProperty("transform-origin","left"),n.adapter.setTrackActiveStyleProperty("right","auto"),n.adapter.setTrackActiveStyleProperty("left",u+"px")),n.adapter.setTrackActiveStyleProperty(o,"scaleX("+r+")");var t=s?d:u,e=n.adapter.isRTL()?u:d;i!==c.Thumb.START&&i&&n.initialStylesRemoved||(n.adapter.setThumbStyleProperty(o,"translateX("+t+"px)",c.Thumb.START),n.alignValueIndicator(c.Thumb.START,t)),i!==c.Thumb.END&&i&&n.initialStylesRemoved||(n.adapter.setThumbStyleProperty(o,"translateX("+e+"px)",c.Thumb.END),n.alignValueIndicator(c.Thumb.END,e)),n.removeInitialStyles(s),n.updateOverlappingThumbsUI(t,e,i)})}else this.animFrame.request(l.SLIDER_UPDATE,function(){var t=s?n.rect.width-a:a;n.adapter.setThumbStyleProperty(o,"translateX("+t+"px)",c.Thumb.END),n.alignValueIndicator(c.Thumb.END,t),n.adapter.setTrackActiveStyleProperty(o,"scaleX("+r+")"),n.removeInitialStyles(s)})},v.prototype.alignValueIndicator=function(t,e){if(this.isDiscrete){var i=this.adapter.getThumbBoundingClientRect(t).width/2,n=this.adapter.getValueIndicatorContainerWidth(t),r=this.adapter.getBoundingClientRect().width;e+i<n/2?(this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CARET_LEFT,i+"px",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CARET_RIGHT,"auto",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CARET_TRANSFORM,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CONTAINER_LEFT,"0",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CONTAINER_RIGHT,"auto",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CONTAINER_TRANSFORM,"none",t)):r-e+i<n/2?(this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CARET_LEFT,"auto",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CARET_RIGHT,i+"px",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CARET_TRANSFORM,"translateX(50%)",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CONTAINER_LEFT,"auto",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CONTAINER_RIGHT,"0",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CONTAINER_TRANSFORM,"none",t)):(this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CARET_LEFT,"50%",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CARET_RIGHT,"auto",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CARET_TRANSFORM,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CONTAINER_LEFT,"50%",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CONTAINER_RIGHT,"auto",t),this.adapter.setThumbStyleProperty(d.strings.VAR_VALUE_INDICATOR_CONTAINER_TRANSFORM,"translateX(-50%)",t))}},v.prototype.removeInitialStyles=function(t){if(!this.initialStylesRemoved){var e=t?"right":"left";this.adapter.removeThumbStyleProperty(e,c.Thumb.END),this.isRange&&this.adapter.removeThumbStyleProperty(e,c.Thumb.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},v.prototype.resetTrackAndThumbAnimation=function(){var t=this;if(this.isDiscrete){var e=p?h.getCorrectPropertyName(window,"transition"):"transition",i="none 0s ease 0s";this.adapter.setThumbStyleProperty(e,i,c.Thumb.END),this.isRange&&this.adapter.setThumbStyleProperty(e,i,c.Thumb.START),this.adapter.setTrackActiveStyleProperty(e,i),requestAnimationFrame(function(){t.adapter.removeThumbStyleProperty(e,c.Thumb.END),t.adapter.removeTrackActiveStyleProperty(e),t.isRange&&t.adapter.removeThumbStyleProperty(e,c.Thumb.START)})}},v.prototype.updateOverlappingThumbsUI=function(t,e,i){var n=!1;if(this.adapter.isRTL())n=t-this.startThumbKnobWidth/2<=e+this.endThumbKnobWidth/2;else{var r=t+this.startThumbKnobWidth/2;n=e-this.endThumbKnobWidth/2<=r}n?(this.adapter.addThumbClass(d.cssClasses.THUMB_TOP,i||c.Thumb.END),this.adapter.removeThumbClass(d.cssClasses.THUMB_TOP,i===c.Thumb.START?c.Thumb.END:c.Thumb.START)):(this.adapter.removeThumbClass(d.cssClasses.THUMB_TOP,c.Thumb.START),this.adapter.removeThumbClass(d.cssClasses.THUMB_TOP,c.Thumb.END))},v.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},v.prototype.validateProperties=function(t){var e=t.min,i=t.max,n=t.value,r=t.valueStart,a=t.step,s=t.minRange;if(i<=e)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(n<e||i<n||r<e||i<r)throw new Error("MDCSliderFoundation: values must be in [min, max] range. Current values: [start value: "+r+", end value: "+n+", min: "+e+", max: "+i+"]");if(n<r)throw new Error("MDCSliderFoundation: start value must be <= end value. Current values: [start value: "+r+", end value: "+n+"]");if(s<0)throw new Error("MDCSliderFoundation: minimum range must be non-negative. Current min range: "+s);if(n-r<s)throw new Error("MDCSliderFoundation: start value and end value must differ by at least "+s+". Current values: [start value: "+r+", end value: "+n+"]");var o=(r-e)/a,u=(n-e)/a;if(!Number.isInteger(parseFloat(o.toFixed(6)))||!Number.isInteger(parseFloat(u.toFixed(6))))throw new Error("MDCSliderFoundation: Slider values must be valid based on the step value ("+a+"). Current values: [start value: "+r+", end value: "+n+", min: "+e+"]")}else{if(n<e||i<n)throw new Error("MDCSliderFoundation: value must be in [min, max] range. Current values: [value: "+n+", min: "+e+", max: "+i+"]");if(u=(n-e)/a,!Number.isInteger(parseFloat(u.toFixed(6))))throw new Error("MDCSliderFoundation: Slider value must be valid based on the step value ("+a+"). Current value: "+n)}},v.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),v.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(c.Thumb.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(c.Thumb.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(c.Thumb.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(c.Thumb.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(c.Thumb.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(c.Thumb.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(c.Thumb.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(c.Thumb.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(c.Thumb.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(c.Thumb.END,"blur",this.inputEndBlurListener)},v.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),v.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(c.Thumb.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(c.Thumb.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(c.Thumb.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(c.Thumb.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(c.Thumb.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(c.Thumb.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(c.Thumb.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(c.Thumb.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(c.Thumb.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(c.Thumb.END,"blur",this.inputEndBlurListener)},v.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},v.SUPPORTS_POINTER_EVENTS=p&&Boolean(window.PointerEvent)&&!(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document),v);function v(t){var e=u.call(this,a(a({},v.defaultAdapter),t))||this;return e.initialStylesRemoved=!1,e.isDisabled=!1,e.isDiscrete=!1,e.step=d.numbers.STEP_SIZE,e.minRange=d.numbers.MIN_RANGE,e.hasTickMarks=!1,e.isRange=!1,e.thumb=null,e.downEventClientX=null,e.startThumbKnobWidth=0,e.endThumbKnobWidth=0,e.animFrame=new s.AnimationFrame,e}function f(t){var e=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(t));if(!e)return 0;var i=e[1]||"",n=e[2]||0;return Math.max(0,("0"===i?0:i.length)-Number(n))}e.MDCSliderFoundation=m},17:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AnimationFrame=void 0;var n=(r.prototype.request=function(e,i){var n=this;this.cancel(e);var t=requestAnimationFrame(function(t){n.rafIDs.delete(e),i(t)});this.rafIDs.set(e,t)},r.prototype.cancel=function(t){var e=this.rafIDs.get(t);e&&(cancelAnimationFrame(e),this.rafIDs.delete(t))},r.prototype.cancelAll=function(){var i=this;this.rafIDs.forEach(function(t,e){i.cancel(e)})},r.prototype.getQueue=function(){var i=[];return this.rafIDs.forEach(function(t,e){i.push(e)}),i},r);function r(){this.rafIDs=new Map}e.AnimationFrame=n},2:function(t,e,i){"use strict";function n(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.estimateScrollWidth=e.matches=e.closest=void 0,e.closest=function(t,e){if(t.closest)return t.closest(e);for(var i=t;i;){if(n(i,e))return i;i=i.parentElement}return null},e.matches=n,e.estimateScrollWidth=function(t){var e=t;if(null!==e.offsetParent)return e.scrollWidth;var i=e.cloneNode(!0);i.style.setProperty("position","absolute"),i.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(i);var n=i.scrollWidth;return document.documentElement.removeChild(i),n}},229:function(t,e,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,i,n){void 0===n&&(n=i),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[i]}})}:function(t,e,i,n){void 0===n&&(n=i),t[n]=e[i]}),r=this&&this.__exportStar||function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||n(e,t,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(i(230),e),r(i(231),e),r(i(62),e),r(i(116),e),r(i(63),e)},230:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},231:function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),u=this&&this.__assign||function(){return(u=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCSlider=void 0;var a,s=i(1),d=i(5),l=i(2),h=i(6),c=i(4),p=i(62),o=i(116),m=i(63),v=(a=s.MDCComponent,r(f,a),f.attachTo=function(t,e){return void 0===e&&(e={}),new f(t,void 0,e)},f.prototype.getDefaultFoundation=function(){var n=this,t={hasClass:function(t){return n.root.classList.contains(t)},addClass:function(t){n.root.classList.add(t)},removeClass:function(t){n.root.classList.remove(t)},addThumbClass:function(t,e){n.getThumbEl(e).classList.add(t)},removeThumbClass:function(t,e){n.getThumbEl(e).classList.remove(t)},getAttribute:function(t){return n.root.getAttribute(t)},getInputValue:function(t){return n.getInput(t).value},setInputValue:function(t,e){n.getInput(e).value=t},getInputAttribute:function(t,e){return n.getInput(e).getAttribute(t)},setInputAttribute:function(t,e,i){n.getInput(i).setAttribute(t,e)},removeInputAttribute:function(t,e){n.getInput(e).removeAttribute(t)},focusInput:function(t){n.getInput(t).focus()},isInputFocused:function(t){return n.getInput(t)===document.activeElement},shouldHideFocusStylesForPointerEvents:function(){return!1},getThumbKnobWidth:function(t){return n.getThumbEl(t).querySelector("."+p.cssClasses.THUMB_KNOB).getBoundingClientRect().width},getThumbBoundingClientRect:function(t){return n.getThumbEl(t).getBoundingClientRect()},getBoundingClientRect:function(){return n.root.getBoundingClientRect()},getValueIndicatorContainerWidth:function(t){return n.getThumbEl(t).querySelector("."+p.cssClasses.VALUE_INDICATOR_CONTAINER).getBoundingClientRect().width},isRTL:function(){return"rtl"===getComputedStyle(n.root).direction},setThumbStyleProperty:function(t,e,i){n.getThumbEl(i).style.setProperty(t,e)},removeThumbStyleProperty:function(t,e){n.getThumbEl(e).style.removeProperty(t)},setTrackActiveStyleProperty:function(t,e){n.trackActive.style.setProperty(t,e)},removeTrackActiveStyleProperty:function(t){n.trackActive.style.removeProperty(t)},setValueIndicatorText:function(t,e){n.getThumbEl(e).querySelector("."+p.cssClasses.VALUE_INDICATOR_TEXT).textContent=String(t)},getValueToAriaValueTextFn:function(){return n.valueToAriaValueTextFn},updateTickMarks:function(t){var e=n.root.querySelector("."+p.cssClasses.TICK_MARKS_CONTAINER);if(e||((e=document.createElement("div")).classList.add(p.cssClasses.TICK_MARKS_CONTAINER),n.root.querySelector("."+p.cssClasses.TRACK).appendChild(e)),t.length!==e.children.length){for(;e.firstChild;)e.removeChild(e.firstChild);n.addTickMarks(e,t)}else n.updateTickMarks(e,t)},setPointerCapture:function(t){n.root.setPointerCapture(t)},emitChangeEvent:function(t,e){n.emit(p.events.CHANGE,{value:t,thumb:e})},emitInputEvent:function(t,e){n.emit(p.events.INPUT,{value:t,thumb:e})},emitDragStartEvent:function(t,e){n.getRipple(e).activate()},emitDragEndEvent:function(t,e){n.getRipple(e).deactivate()},registerEventHandler:function(t,e){n.listen(t,e)},deregisterEventHandler:function(t,e){n.unlisten(t,e)},registerThumbEventHandler:function(t,e,i){n.getThumbEl(t).addEventListener(e,i)},deregisterThumbEventHandler:function(t,e,i){n.getThumbEl(t).removeEventListener(e,i)},registerInputEventHandler:function(t,e,i){n.getInput(t).addEventListener(e,i)},deregisterInputEventHandler:function(t,e,i){n.getInput(t).removeEventListener(e,i)},registerBodyEventHandler:function(t,e){document.body.addEventListener(t,e)},deregisterBodyEventHandler:function(t,e){document.body.removeEventListener(t,e)},registerWindowEventHandler:function(t,e){window.addEventListener(t,e)},deregisterWindowEventHandler:function(t,e){window.removeEventListener(t,e)}};return new o.MDCSliderFoundation(t)},f.prototype.initialize=function(t){var e=(void 0===t?{}:t).skipInitialUIUpdate;this.inputs=[].slice.call(this.root.querySelectorAll("."+p.cssClasses.INPUT)),this.thumbs=[].slice.call(this.root.querySelectorAll("."+p.cssClasses.THUMB)),this.trackActive=this.root.querySelector("."+p.cssClasses.TRACK_ACTIVE),this.ripples=this.createRipples(),e&&(this.skipInitialUIUpdate=!0)},f.prototype.initialSyncWithDOM=function(){this.foundation.layout({skipUpdateUI:this.skipInitialUIUpdate})},f.prototype.layout=function(){this.foundation.layout()},f.prototype.getValueStart=function(){return this.foundation.getValueStart()},f.prototype.setValueStart=function(t){this.foundation.setValueStart(t)},f.prototype.getValue=function(){return this.foundation.getValue()},f.prototype.setValue=function(t){this.foundation.setValue(t)},f.prototype.getDisabled=function(){return this.foundation.getDisabled()},f.prototype.setDisabled=function(t){this.foundation.setDisabled(t)},f.prototype.setValueToAriaValueTextFn=function(t){this.valueToAriaValueTextFn=t},f.prototype.getThumbEl=function(t){return t===m.Thumb.END?this.thumbs[this.thumbs.length-1]:this.thumbs[0]},f.prototype.getInput=function(t){return t===m.Thumb.END?this.inputs[this.inputs.length-1]:this.inputs[0]},f.prototype.getRipple=function(t){return t===m.Thumb.END?this.ripples[this.ripples.length-1]:this.ripples[0]},f.prototype.addTickMarks=function(t,e){for(var i=document.createDocumentFragment(),n=0;n<e.length;n++){var r=document.createElement("div"),a=e[n]===m.TickMark.ACTIVE?p.cssClasses.TICK_MARK_ACTIVE:p.cssClasses.TICK_MARK_INACTIVE;r.classList.add(a),i.appendChild(r)}t.appendChild(i)},f.prototype.updateTickMarks=function(t,e){for(var i=Array.from(t.children),n=0;n<i.length;n++)e[n]===m.TickMark.ACTIVE?(i[n].classList.add(p.cssClasses.TICK_MARK_ACTIVE),i[n].classList.remove(p.cssClasses.TICK_MARK_INACTIVE)):(i[n].classList.add(p.cssClasses.TICK_MARK_INACTIVE),i[n].classList.remove(p.cssClasses.TICK_MARK_ACTIVE))},f.prototype.createRipples=function(){for(var a=[],s=[].slice.call(this.root.querySelectorAll("."+p.cssClasses.THUMB)),t=function(t){var i=s[t],n=o.inputs[t],e=u(u({},h.MDCRipple.createAdapter(o)),{addClass:function(t){i.classList.add(t)},computeBoundingRect:function(){return i.getBoundingClientRect()},deregisterInteractionHandler:function(t,e){n.removeEventListener(t,e)},isSurfaceActive:function(){return l.matches(n,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,e){n.addEventListener(t,e,d.applyPassive())},removeClass:function(t){i.classList.remove(t)},updateCssVariable:function(t,e){i.style.setProperty(t,e)}}),r=new h.MDCRipple(i,new c.MDCRippleFoundation(e));r.unbounded=!0,a.push(r)},o=this,e=0;e<s.length;e++)t(e);return a},f);function f(){var t=null!==a&&a.apply(this,arguments)||this;return t.skipInitialUIUpdate=!1,t.valueToAriaValueTextFn=null,t}e.MDCSlider=v},3:function(t,e,i){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.getNormalizedEventCoords=e.supportsCssVariables=void 0,e.supportsCssVariables=function(t,e){void 0===e&&(e=!1);var i,n=t.CSS;if("boolean"==typeof s&&!e)return s;if(!(n&&"function"==typeof n.supports))return!1;var r=n.supports("--css-vars","yes"),a=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return i=r||a,e||(s=i),i},e.getNormalizedEventCoords=function(t,e,i){if(!t)return{x:0,y:0};var n,r,a=e.x,s=e.y,o=a+i.left,u=s+i.top;if("touchstart"===t.type){var d=t;n=d.changedTouches[0].pageX-o,r=d.changedTouches[0].pageY-u}else{var l=t;n=l.pageX-o,r=l.pageY-u}return{x:n,y:r}}},4:function(t,e,i){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},s=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.MDCRippleFoundation=void 0;var o,u=i(0),d=i(7),l=i(3),h=["touchstart","pointerdown","mousedown","keydown"],c=["touchend","pointerup","mouseup","contextmenu"],p=[],m=(o=u.MDCFoundation,r(v,o),Object.defineProperty(v,"cssClasses",{get:function(){return d.cssClasses},enumerable:!1,configurable:!0}),Object.defineProperty(v,"strings",{get:function(){return d.strings},enumerable:!1,configurable:!0}),Object.defineProperty(v,"numbers",{get:function(){return d.numbers},enumerable:!1,configurable:!0}),Object.defineProperty(v,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),v.prototype.init=function(){var t=this,e=this.supportsPressRipple();if(this.registerRootHandlers(e),e){var i=v.cssClasses,n=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(n),t.adapter.isUnbounded()&&(t.adapter.addClass(r),t.layoutInternal())})}},v.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(v.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(v.cssClasses.FG_DEACTIVATION));var e=v.cssClasses,i=e.ROOT,n=e.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(i),t.adapter.removeClass(n),t.removeCssVars()})}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},v.prototype.activate=function(t){this.activateImpl(t)},v.prototype.deactivate=function(){this.deactivateImpl()},v.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame(function(){t.layoutInternal(),t.layoutFrame=0})},v.prototype.setUnbounded=function(t){var e=v.cssClasses.UNBOUNDED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},v.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter.addClass(v.cssClasses.BG_FOCUSED)})},v.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter.removeClass(v.cssClasses.BG_FOCUSED)})},v.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},v.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},v.prototype.registerRootHandlers=function(t){var e,i;if(t){try{for(var n=s(h),r=n.next();!r.done;r=n.next()){var a=r.value;this.adapter.registerInteractionHandler(a,this.activateHandler)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},v.prototype.registerDeactivationHandlers=function(t){var e,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var n=s(c),r=n.next();!r.done;r=n.next()){var a=r.value;this.adapter.registerDocumentInteractionHandler(a,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}},v.prototype.deregisterRootHandlers=function(){var e,t;try{for(var i=s(h),n=i.next();!n.done;n=i.next()){var r=n.value;this.adapter.deregisterInteractionHandler(r,this.activateHandler)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},v.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=s(c),n=i.next();!n.done;n=i.next()){var r=n.value;this.adapter.deregisterDocumentInteractionHandler(r,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},v.prototype.removeCssVars=function(){var e=this,i=v.strings;Object.keys(i).forEach(function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(i[t],null)})},v.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var n=this.previousActivationEvent;n&&void 0!==t&&n.type!==t.type||(i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&0<p.length&&p.some(function(t){return e.adapter.containsEventTarget(t)})?this.resetActivationState():(void 0!==t&&(p.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame(function(){p=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive(t),i.wasElementMadeActive&&e.animateActivation()),i.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},v.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},v.prototype.animateActivation=function(){var t=this,e=v.strings,i=e.VAR_FG_TRANSLATE_START,n=e.VAR_FG_TRANSLATE_END,r=v.cssClasses,a=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,o=v.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var u="",d="";if(!this.adapter.isUnbounded()){var l=this.getFgTranslationCoordinates(),h=l.startPoint,c=l.endPoint;u=h.x+"px, "+h.y+"px",d=c.x+"px, "+c.y+"px"}this.adapter.updateCssVariable(i,u),this.adapter.updateCssVariable(n,d),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer=setTimeout(function(){t.activationTimerCallback()},o)},v.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,i=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?l.getNormalizedEventCoords(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},v.prototype.runDeactivationUXLogicIfReady=function(){var t=this,e=v.cssClasses.FG_DEACTIVATION,i=this.activationState,n=i.hasDeactivationUXRun,r=i.isActivated;!n&&r||!this.activationAnimationHasEnded||(this.rmBoundedActivationClasses(),this.adapter.addClass(e),this.fgDeactivationRemovalTimer=setTimeout(function(){t.adapter.removeClass(e)},d.numbers.FG_DEACTIVATION_MS))},v.prototype.rmBoundedActivationClasses=function(){var t=v.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},v.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout(function(){return t.previousActivationEvent=void 0},v.numbers.TAP_DELAY_MS)},v.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var i=a({},e);e.isProgrammatic?(requestAnimationFrame(function(){t.animateDeactivation(i)}),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame(function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()}))}},v.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady()},v.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var e=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?e:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+v.numbers.PADDING;var i=Math.floor(e*v.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!=0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},v.prototype.updateLayoutCssVars=function(){var t=v.strings,e=t.VAR_FG_SIZE,i=t.VAR_LEFT,n=t.VAR_TOP,r=t.VAR_FG_SCALE;this.adapter.updateCssVariable(e,this.initialSize+"px"),this.adapter.updateCssVariable(r,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(n,this.unboundedCoords.top+"px"))},v);function v(t){var e=o.call(this,a(a({},v.defaultAdapter),t))||this;return e.activationAnimationHasEnded=!1,e.activationTimer=0,e.fgDeactivationRemovalTimer=0,e.fgScale="0",e.frame={width:0,height:0},e.initialSize=0,e.layoutFrame=0,e.maxRadius=0,e.unboundedCoords={left:0,top:0},e.activationState=e.defaultActivationState(),e.activationTimerCallback=function(){e.activationAnimationHasEnded=!0,e.runDeactivationUXLogicIfReady()},e.activateHandler=function(t){e.activateImpl(t)},e.deactivateHandler=function(){e.deactivateImpl()},e.focusHandler=function(){e.handleFocus()},e.blurHandler=function(){e.handleBlur()},e.resizeHandler=function(){e.layout()},e}e.MDCRippleFound