material-components-vue
Version:
Material Design components for Vue.js
2 lines • 23.2 kB
JavaScript
/*! For license information please see slider.min.js.LICENSE */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=78)}({0:function(t,e,n){"use strict";n.d(e,"b",function(){return i}),n.d(e,"a",function(){return a}),n.d(e,"e",function(){return o}),n.d(e,"c",function(){return s}),n.d(e,"d",function(){return u});var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function o(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}},1:function(t,e,n){"use strict";var r={inheritAttrs:!1},i=["primary","secondary","background","surface","on-primary","on-secondary","on-surface","primary-bg","secondary-bg","text-primary-on-light","text-secondary-on-light","text-hint-on-light","text-disabled-on-light","text-icon-on-light","text-primary-on-dark","text-secondary-on-dark","text-hint-on-dark","text-disabled-on-dark","text-icon-on-dark"],a={props:{theming:{type:String,default:""}},mounted:function(){-1<i.indexOf(this.theming)&&this.$el.classList.add("mdc-theme--"+this.theming)}};n.d(e,"a",function(){return r}),n.d(e,"b",function(){return a})},16:function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"a",function(){return s});var r={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},i={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 a(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}function o(t,e){if(a(t)&&e in r){var n=t.document.createElement("div"),i=r[e],o=i.standard,s=i.prefixed;return o in n.style?o:s}return e}function s(t,e){if(a(t)&&e in i){var n=t.document.createElement("div"),r=i[e],o=r.standard,s=r.prefixed;return r.cssProperty in n.style?o:s}return e}},2:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},4:function(t,e,n){"use strict";function r(t,e,n,r,i,a,o,s){var u,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=n,d._compiled=!0),r&&(d.functional=!0),a&&(d._scopeId="data-v-"+a),o?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=u):i&&(u=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(d.functional){d._injectStyles=u;var c=d.render;d.render=function(t,e){return u.call(e),c(t,e)}}else{var l=d.beforeCreate;d.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:d}}n.d(e,"a",function(){return r})},49:function(t,e,n){},5:function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(0),i=n(2),a=function(){function t(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root_=t,this.initialize.apply(this,r.d(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new i.a({}))},t.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},t.prototype.initialSyncWithDOM=function(){},t.prototype.destroy=function(){this.foundation_.destroy()},t.prototype.listen=function(t,e){this.root_.addEventListener(t,e)},t.prototype.unlisten=function(t,e){this.root_.removeEventListener(t,e)},t.prototype.emit=function(t,e,n){var r;void 0===n&&(n=!1),"function"==typeof CustomEvent?r=new CustomEvent(t,{bubbles:n,detail:e}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root_.dispatchEvent(r)},t}()},7:function(t,e,n){"use strict";function r(t){"undefined"!=typeof window&&window.Vue&&window.Vue.use(t)}n.d(e,"a",function(){return r})},78:function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(5),a={ACTIVE:"mdc-slider--active",DISABLED:"mdc-slider--disabled",DISCRETE:"mdc-slider--discrete",FOCUS:"mdc-slider--focus",HAS_TRACK_MARKER:"mdc-slider--display-markers",IN_TRANSIT:"mdc-slider--in-transit",IS_DISCRETE:"mdc-slider--discrete"},o={ARIA_DISABLED:"aria-disabled",ARIA_VALUEMAX:"aria-valuemax",ARIA_VALUEMIN:"aria-valuemin",ARIA_VALUENOW:"aria-valuenow",CHANGE_EVENT:"MDCSlider:change",INPUT_EVENT:"MDCSlider:input",LAST_TRACK_MARKER_SELECTOR:".mdc-slider__track-marker:last-child",PIN_VALUE_MARKER_SELECTOR:".mdc-slider__pin-value-marker",STEP_DATA_ATTR:"data-step",THUMB_CONTAINER_SELECTOR:".mdc-slider__thumb-container",TRACK_MARKER_CONTAINER_SELECTOR:".mdc-slider__track-marker-container",TRACK_SELECTOR:".mdc-slider__track"},s={PAGE_FACTOR:4},u=n(16),d=n(2),c=["mousedown","pointerdown","touchstart"],l=["mouseup","pointerup","touchend"],h={mousedown:"mousemove",pointerdown:"pointermove",touchstart:"touchmove"},f="ArrowDown",_="ArrowLeft",p="ArrowRight",m="ArrowUp",y="End",b="Home",g="PageDown",v="PageUp",C=function(t){function e(n){var i=t.call(this,r.a({},e.defaultAdapter,n))||this;return i.savedTabIndex_=NaN,i.active_=!1,i.inTransit_=!1,i.isDiscrete_=!1,i.hasTrackMarker_=!1,i.handlingThumbTargetEvt_=!1,i.min_=0,i.max_=100,i.step_=0,i.value_=0,i.disabled_=!1,i.preventFocusState_=!1,i.thumbContainerPointerHandler_=function(){return i.handlingThumbTargetEvt_=!0},i.interactionStartHandler_=function(t){return i.handleDown_(t)},i.keydownHandler_=function(t){return i.handleKeydown_(t)},i.focusHandler_=function(){return i.handleFocus_()},i.blurHandler_=function(){return i.handleBlur_()},i.resizeHandler_=function(){return i.layout()},i}return r.b(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return o},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},getAttribute:function(){return null},setAttribute:function(){},removeAttribute:function(){},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabIndex:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},registerThumbContainerInteractionHandler:function(){},deregisterThumbContainerInteractionHandler:function(){},registerBodyInteractionHandler:function(){},deregisterBodyInteractionHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},notifyInput:function(){},notifyChange:function(){},setThumbContainerStyleProperty:function(){},setTrackStyleProperty:function(){},setMarkerValue:function(){},appendTrackMarkers:function(){},removeTrackMarkers:function(){},setLastTrackMarkersStyleProperty:function(){},isRTL:function(){return!1}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=this;this.isDiscrete_=this.adapter_.hasClass(a.IS_DISCRETE),this.hasTrackMarker_=this.adapter_.hasClass(a.HAS_TRACK_MARKER),c.forEach(function(e){t.adapter_.registerInteractionHandler(e,t.interactionStartHandler_),t.adapter_.registerThumbContainerInteractionHandler(e,t.thumbContainerPointerHandler_)}),this.adapter_.registerInteractionHandler("keydown",this.keydownHandler_),this.adapter_.registerInteractionHandler("focus",this.focusHandler_),this.adapter_.registerInteractionHandler("blur",this.blurHandler_),this.adapter_.registerResizeHandler(this.resizeHandler_),this.layout(),this.isDiscrete_&&0===this.getStep()&&(this.step_=1)},e.prototype.destroy=function(){var t=this;c.forEach(function(e){t.adapter_.deregisterInteractionHandler(e,t.interactionStartHandler_),t.adapter_.deregisterThumbContainerInteractionHandler(e,t.thumbContainerPointerHandler_)}),this.adapter_.deregisterInteractionHandler("keydown",this.keydownHandler_),this.adapter_.deregisterInteractionHandler("focus",this.focusHandler_),this.adapter_.deregisterInteractionHandler("blur",this.blurHandler_),this.adapter_.deregisterResizeHandler(this.resizeHandler_)},e.prototype.setupTrackMarker=function(){if(this.isDiscrete_&&this.hasTrackMarker_&&0!==this.getStep()){var t=this.getMin(),e=this.getMax(),n=this.getStep(),r=(e-t)/n,i=Math.ceil(r)!==r;if(i&&(r=Math.ceil(r)),this.adapter_.removeTrackMarkers(),this.adapter_.appendTrackMarkers(r),i){var a=(e-r*n)/n+1;this.adapter_.setLastTrackMarkersStyleProperty("flex-grow",String(a))}}},e.prototype.layout=function(){this.rect_=this.adapter_.computeBoundingRect(),this.updateUIForCurrentValue_()},e.prototype.getValue=function(){return this.value_},e.prototype.setValue=function(t){this.setValue_(t,!1)},e.prototype.getMax=function(){return this.max_},e.prototype.setMax=function(t){if(t<this.min_)throw new Error("Cannot set max to be less than the slider's minimum value");this.max_=t,this.setValue_(this.value_,!1,!0),this.adapter_.setAttribute(o.ARIA_VALUEMAX,String(this.max_)),this.setupTrackMarker()},e.prototype.getMin=function(){return this.min_},e.prototype.setMin=function(t){if(t>this.max_)throw new Error("Cannot set min to be greater than the slider's maximum value");this.min_=t,this.setValue_(this.value_,!1,!0),this.adapter_.setAttribute(o.ARIA_VALUEMIN,String(this.min_)),this.setupTrackMarker()},e.prototype.getStep=function(){return this.step_},e.prototype.setStep=function(t){if(t<0)throw new Error("Step cannot be set to a negative number");this.isDiscrete_&&("number"!=typeof t||t<1)&&(t=1),this.step_=t,this.setValue_(this.value_,!1,!0),this.setupTrackMarker()},e.prototype.isDisabled=function(){return this.disabled_},e.prototype.setDisabled=function(t){this.disabled_=t,this.toggleClass_(a.DISABLED,this.disabled_),this.disabled_?(this.savedTabIndex_=this.adapter_.getTabIndex(),this.adapter_.setAttribute(o.ARIA_DISABLED,"true"),this.adapter_.removeAttribute("tabindex")):(this.adapter_.removeAttribute(o.ARIA_DISABLED),isNaN(this.savedTabIndex_)||this.adapter_.setAttribute("tabindex",String(this.savedTabIndex_)))},e.prototype.handleDown_=function(t){var e=this;if(!this.disabled_){this.preventFocusState_=!0,this.setInTransit_(!this.handlingThumbTargetEvt_),this.handlingThumbTargetEvt_=!1,this.setActive_(!0);var n=function(t){e.handleMove_(t)},r=h[t.type],i=function t(){e.handleUp_(),e.adapter_.deregisterBodyInteractionHandler(r,n),l.forEach(function(n){return e.adapter_.deregisterBodyInteractionHandler(n,t)})};this.adapter_.registerBodyInteractionHandler(r,n),l.forEach(function(t){return e.adapter_.registerBodyInteractionHandler(t,i)}),this.setValueFromEvt_(t)}},e.prototype.handleMove_=function(t){t.preventDefault(),this.setValueFromEvt_(t)},e.prototype.handleUp_=function(){this.setActive_(!1),this.adapter_.notifyChange()},e.prototype.getPageX_=function(t){return t.targetTouches&&0<t.targetTouches.length?t.targetTouches[0].pageX:t.pageX},e.prototype.setValueFromEvt_=function(t){var e=this.getPageX_(t),n=this.computeValueFromPageX_(e);this.setValue_(n,!0)},e.prototype.computeValueFromPageX_=function(t){var e=this.max_,n=this.min_,r=(t-this.rect_.left)/this.rect_.width;return this.adapter_.isRTL()&&(r=1-r),n+r*(e-n)},e.prototype.handleKeydown_=function(t){var e=this.getKeyId_(t),n=this.getValueForKeyId_(e);isNaN(n)||(t.preventDefault(),this.adapter_.addClass(a.FOCUS),this.setValue_(n,!0),this.adapter_.notifyChange())},e.prototype.getKeyId_=function(t){return t.key===_||37===t.keyCode?_:t.key===p||39===t.keyCode?p:t.key===m||38===t.keyCode?m:t.key===f||40===t.keyCode?f:t.key===b||36===t.keyCode?b:t.key===y||35===t.keyCode?y:t.key===v||33===t.keyCode?v:t.key===g||34===t.keyCode?g:""},e.prototype.getValueForKeyId_=function(t){var e=this.max_,n=this.min_,r=this.step_||(e-n)/100;switch(this.adapter_.isRTL()&&(t===_||t===p)&&(r=-r),t){case _:case f:return this.value_-r;case p:case m:return this.value_+r;case b:return this.min_;case y:return this.max_;case v:return this.value_+r*s.PAGE_FACTOR;case g:return this.value_-r*s.PAGE_FACTOR;default:return NaN}},e.prototype.handleFocus_=function(){this.preventFocusState_||this.adapter_.addClass(a.FOCUS)},e.prototype.handleBlur_=function(){this.preventFocusState_=!1,this.adapter_.removeClass(a.FOCUS)},e.prototype.setValue_=function(t,e,n){if(void 0===n&&(n=!1),t!==this.value_||n){var r=this.min_,i=this.max_,a=t===r||t===i;this.step_&&!a&&(t=this.quantize_(t)),t<r?t=r:i<t&&(t=i),this.value_=t,this.adapter_.setAttribute(o.ARIA_VALUENOW,String(this.value_)),this.updateUIForCurrentValue_(),e&&(this.adapter_.notifyInput(),this.isDiscrete_&&this.adapter_.setMarkerValue(t))}},e.prototype.quantize_=function(t){return Math.round(t/this.step_)*this.step_},e.prototype.updateUIForCurrentValue_=function(){var t=this,e=this.max_,n=this.min_,r=(this.value_-n)/(e-n),i=r*this.rect_.width;this.adapter_.isRTL()&&(i=this.rect_.width-i);var a=Object(u.b)(window,"transform"),o=Object(u.a)(window,"transitionend");this.inTransit_&&this.adapter_.registerThumbContainerInteractionHandler(o,function e(){t.setInTransit_(!1),t.adapter_.deregisterThumbContainerInteractionHandler(o,e)}),requestAnimationFrame(function(){t.adapter_.setThumbContainerStyleProperty(a,"translateX("+i+"px) translateX(-50%)"),t.adapter_.setTrackStyleProperty(a,"scaleX("+r+")")})},e.prototype.setActive_=function(t){this.active_=t,this.toggleClass_(a.ACTIVE,this.active_)},e.prototype.setInTransit_=function(t){this.inTransit_=t,this.toggleClass_(a.IN_TRANSIT,this.inTransit_)},e.prototype.toggleClass_=function(t,e){e?this.adapter_.addClass(t):this.adapter_.removeClass(t)},e}(d.a),A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.b(e,t),e.attachTo=function(t){return new e(t)},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation_.getValue()},set:function(t){this.foundation_.setValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this.foundation_.getMin()},set:function(t){this.foundation_.setMin(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this.foundation_.getMax()},set:function(t){this.foundation_.setMax(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this.foundation_.getStep()},set:function(t){this.foundation_.setStep(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation_.isDisabled()},set:function(t){this.foundation_.setDisabled(t)},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){this.thumbContainer_=this.root_.querySelector(o.THUMB_CONTAINER_SELECTOR),this.track_=this.root_.querySelector(o.TRACK_SELECTOR),this.pinValueMarker_=this.root_.querySelector(o.PIN_VALUE_MARKER_SELECTOR),this.trackMarkerContainer_=this.root_.querySelector(o.TRACK_MARKER_CONTAINER_SELECTOR)},e.prototype.getDefaultFoundation=function(){var t=this;return new C({hasClass:function(e){return t.root_.classList.contains(e)},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},getAttribute:function(e){return t.root_.getAttribute(e)},setAttribute:function(e,n){return t.root_.setAttribute(e,n)},removeAttribute:function(e){return t.root_.removeAttribute(e)},computeBoundingRect:function(){return t.root_.getBoundingClientRect()},getTabIndex:function(){return t.root_.tabIndex},registerInteractionHandler:function(e,n){return t.listen(e,n)},deregisterInteractionHandler:function(e,n){return t.unlisten(e,n)},registerThumbContainerInteractionHandler:function(e,n){t.thumbContainer_.addEventListener(e,n)},deregisterThumbContainerInteractionHandler:function(e,n){t.thumbContainer_.removeEventListener(e,n)},registerBodyInteractionHandler:function(t,e){return document.body.addEventListener(t,e)},deregisterBodyInteractionHandler:function(t,e){return document.body.removeEventListener(t,e)},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},notifyInput:function(){return t.emit(o.INPUT_EVENT,t)},notifyChange:function(){return t.emit(o.CHANGE_EVENT,t)},setThumbContainerStyleProperty:function(e,n){t.thumbContainer_.style.setProperty(e,n)},setTrackStyleProperty:function(e,n){return t.track_.style.setProperty(e,n)},setMarkerValue:function(e){return t.pinValueMarker_.innerText=e.toLocaleString()},appendTrackMarkers:function(e){for(var n=document.createDocumentFragment(),r=0;r<e;r++){var i=document.createElement("div");i.classList.add("mdc-slider__track-marker"),n.appendChild(i)}t.trackMarkerContainer_.appendChild(n)},removeTrackMarkers:function(){for(;t.trackMarkerContainer_.firstChild;)t.trackMarkerContainer_.removeChild(t.trackMarkerContainer_.firstChild)},setLastTrackMarkersStyleProperty:function(e,n){t.root_.querySelector(o.LAST_TRACK_MARKER_SELECTOR).style.setProperty(e,n)},isRTL:function(){return"rtl"===getComputedStyle(t.root_).direction}})},e.prototype.initialSyncWithDOM=function(){var t=this.parseFloat_(this.root_.getAttribute(o.ARIA_VALUENOW),this.value),e=this.parseFloat_(this.root_.getAttribute(o.ARIA_VALUEMIN),this.min),n=this.parseFloat_(this.root_.getAttribute(o.ARIA_VALUEMAX),this.max);e>=this.max?(this.max=n,this.min=e):(this.min=e,this.max=n),this.step=this.parseFloat_(this.root_.getAttribute(o.STEP_DATA_ATTR),this.step),this.value=t,this.disabled=this.root_.hasAttribute(o.ARIA_DISABLED)&&"false"!==this.root_.getAttribute(o.ARIA_DISABLED),this.foundation_.setupTrackMarker()},e.prototype.layout=function(){this.foundation_.layout()},e.prototype.stepUp=function(t){void 0===t&&(t=this.step||1),this.value+=t},e.prototype.stepDown=function(t){void 0===t&&(t=this.step||1),this.value-=t},e.prototype.parseFloat_=function(t,e){var n=parseFloat(t);return"number"==typeof n&&isFinite(n)?n:e},e}(i.a),T=n(1),E={mixins:[T.a,T.b],model:{prop:"value",event:"change"},props:{ariaLabel:{type:String,default:""},displayMarkers:{type:Boolean,default:!1},discrete:{type:Boolean,default:!1},value:{type:Number,default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,validator:function(t){return 0<t},default:1},disabled:{type:Boolean,default:!1}},data:function(){return{mdcSlider:void 0}},computed:{classes:function(){return{"mdc-slider--discrete":this.discrete,"mdc-slider--display-markers":this.displayMarkers}}},watch:{value:function(){this.mdcSlider.value=this.value},min:function(){this.mdcSlider.min=this.min},max:function(){this.mdcSlider.max=this.max},step:function(){this.mdcSlider.step=this.step},disabled:function(){this.mdcSlider.disabled=this.disabled}},mounted:function(){this.mdcSlider=A.attachTo(this.$el),this.mdcSlider.value=this.value,this.mdcSlider.min=this.min,this.mdcSlider.max=this.max,this.mdcSlider.step=this.step,this.mdcSlider.disabled=this.disabled},beforeDestroy:function(){this.mdcSlider.destroy()},methods:{onChange:function(t){this.$emit("change",this.mdcSlider.value)}}},S=n(4),k=Object(S.a)(E,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mdc-slider",class:t.classes,attrs:{"aria-disabled":t.disabled,"aria-label":t.ariaLabel,role:"slider",tabindex:"0"},on:{"MDCSlider:change":t.onChange}},[n("div",{staticClass:"mdc-slider__track-container"},[n("div",{staticClass:"mdc-slider__track"}),t._v(" "),t.displayMarkers?n("div",{staticClass:"mdc-slider__track-marker-container"}):t._e()]),t._v(" "),t.discrete?n("div",{staticClass:"mdc-slider__thumb-container"},[t._m(0),t._v(" "),n("svg",{staticClass:"mdc-slider__thumb",attrs:{width:"21",height:"21"}},[n("circle",{attrs:{cx:"10.5",cy:"10.5",r:"7.875"}})]),t._v(" "),n("div",{staticClass:"mdc-slider__focus-ring"})]):n("div",{staticClass:"mdc-slider__thumb-container"},[n("svg",{staticClass:"mdc-slider__thumb",attrs:{width:"21",height:"21"}},[n("circle",{attrs:{cx:"10.5",cy:"10.5",r:"7.875"}})]),t._v(" "),n("div",{staticClass:"mdc-slider__focus-ring"})])])},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"mdc-slider__pin"},[e("span",{staticClass:"mdc-slider__pin-value-marker"})])}],!1,null,null,null).exports,I=(n(49),n(7)),R={install:function(t){t.component("m-slider",k)}};e.default=R,Object(I.a)(R)}})});