vue-material/dist/components/mdButtonToggle/index.js

7 lines
61 KiB
JavaScript
Raw Normal View History

2016-12-16 06:01:17 +00:00
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueMaterial=t():e.VueMaterial=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/",t(0)}({0:function(e,t,n){e.exports=n(12)},1:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=r(o);t.default={props:{mdTheme:String},data:function(){return{closestThemedParent:!1}},methods:{getClosestThemedParent:function(e){return!(!e||!e.$el||0===e._uid)&&(e.mdTheme||e.mdName?e:this.getClosestThemedParent(e.$parent))}},computed:{themeClass:function(){if(this.mdTheme)return"md-theme-"+this.mdTheme;var e=this.closestThemedParent.mdTheme;return e||(e=this.closestThemedParent.mdName),"md-theme-"+(e||i.default.material.currentTheme)}},mounted:function(){this.closestThemedParent=this.getClosestThemedParent(this.$parent),i.default.material.currentTheme||i.default.material.setCurrentTheme("default")}},e.exports=t.default},2:function(e,t,n){(function(t){/*!
* Vue.js v2.1.6
* (c) 2014-2016 Evan You
* Released under the MIT License.
*/
"use strict";function n(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function r(e){var t=parseFloat(e,10);return t||0===t?t:e}function o(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}function i(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function a(e,t){return gn.call(e,t)}function s(e){return"string"==typeof e||"number"==typeof e}function c(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}function l(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function u(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function d(e,t){for(var n in t)e[n]=t[n];return e}function f(e){return null!==e&&"object"==typeof e}function p(e){return An.call(e)===xn}function v(e){for(var t={},n=0;n<e.length;n++)e[n]&&d(t,e[n]);return t}function h(){}function m(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}function g(e,t){return e==t||!(!f(e)||!f(t))&&JSON.stringify(e)===JSON.stringify(t)}function y(e,t){for(var n=0;n<e.length;n++)if(g(e[n],t))return n;return-1}function _(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function b(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function C(e){if(!En.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}function w(e){return/native code/.test(e.toString())}function A(e){qn.target&&Kn.push(qn.target),qn.target=e}function x(){qn.target=Kn.pop()}function O(e,t){e.__proto__=t}function $(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];b(e,i,t[i])}}function k(e){if(f(e)){var t;return a(e,"__ob__")&&e.__ob__ instanceof Zn?t=e.__ob__:Jn.shouldConvert&&!Dn()&&(Array.isArray(e)||p(e))&&Object.isExtensible(e)&&!e._isVue&&(t=new Zn(e)),t}}function E(e,t,n,r){var o=new qn,i=Object.getOwnPropertyDescriptor(e,t);if(!i||i.configurable!==!1){var a=i&&i.get,s=i&&i.set,c=k(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=a?a.call(e):n;return qn.target&&(o.depend(),c&&c.dep.depend(),Array.isArray(t)&&M(t)),t},set:function(t){var i=a?a.call(e):n;t===i||t!==t&&i!==i||(r&&r(),s?s.call(e,t):n=t,c=k(t),o.notify())}})}}function T(e,t,n){if(Array.isArray(e))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(a(e,t))return void(e[t]=n);var r=e.__ob__;return e._isVue||r&&r.vmCount?void Bn("Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option."):r?(E(r.value,t,n),r.dep.notify(),n):void(e[t]=n)}function S(e,t){var n=e.__ob__;return e._isVue||n&&n.vmCount?void Bn("Avoid deleting properties on a Vue instance or its root $data - just set it to null."):void(a(e,t)&&(delete e[t],n&&n.dep.notify()))}function M(e){for(var t=void 0,n=0,r=e.length;n<r;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&M(t)}function N(e,t){if(!t)return e;for(var n,r,o,i=Object.keys(t),s=0;s<i.length;s++)n=i[s],r=e[n],o=t[n],a(e,n)?p(r)&&p(o)&&N(r,o):T(e,n,o);return e}function j(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function P(e,t){var n=Object.create(e||null);return t?d(n,t):n}function L(e){for(var t in e.components){var n=t.toLowerCase();(mn(n)||kn.isReservedTag(n))&&Bn("Do not use built-in or reserved HTML elements as component id: "+t)}}function R(e){var t=e.props;if(t){var n,r,o,i={};if(Array.isArray(t))for(n=t.length;n--;)r=t[n],"string"==typeof r?(o=_n(r),i[o]={type:null}):Bn("props must be strings when using array syntax.");else if(p(t))for(var a in t)r=t[a],o=_n(a),i[o]=p(r)?r:{type:r};e.props=i}}function D(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}function I(e,t,n){function r(r){var o=Qn[r]||er;u[r]=o(e[r],t[r],n,r)}L(t),R(t),D(t);var o=t.extends;if(o&&(e="function"==typeof o?I(e,o.options,n):I(e,o,n)),t.mixins)for(var i=0,s=t.mixins
o.modifiers||(o.modifiers=Gr),n[Ot(o)]=o,o.def=U(t.$options,"directives",o.name,!0);return n}function Ot(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function $t(e,t,n,r){var o=e.def&&e.def[t];o&&o(n.elm,e,n,r)}function kt(e,t){if(e.data.attrs||t.data.attrs){var n,r,o,i=t.elm,a=e.data.attrs||{},s=t.data.attrs||{};s.__ob__&&(s=t.data.attrs=d({},s));for(n in s)r=s[n],o=a[n],o!==r&&Et(i,n,r);jn&&s.value!==a.value&&Et(i,"value",s.value);for(n in a)null==s[n]&&(Lr(n)?i.removeAttributeNS(Pr,Rr(n)):Nr(n)||i.removeAttribute(n))}}function Et(e,t,n){jr(t)?Dr(n)?e.removeAttribute(t):e.setAttribute(t,t):Nr(t)?e.setAttribute(t,Dr(n)||"false"===n?"false":"true"):Lr(t)?Dr(n)?e.removeAttributeNS(Pr,Rr(t)):e.setAttributeNS(Pr,t,n):Dr(n)?e.removeAttribute(t):e.setAttribute(t,n)}function Tt(e,t){var n=t.elm,r=t.data,o=e.data;if(r.staticClass||r.class||o&&(o.staticClass||o.class)){var i=Je(t),a=n._transitionClasses;a&&(i=Xe(i,et(a))),i!==n._prevClass&&(n.setAttribute("class",i),n._prevClass=i)}}function St(e,t,n,r){if(n){var o=t;t=function(n){Mt(e,t,r),1===arguments.length?o(n):o.apply(null,arguments)}}Er.addEventListener(e,t,r)}function Mt(e,t,n){Er.removeEventListener(e,t,n)}function Nt(e,t){if(e.data.on||t.data.on){var n=t.data.on||{},r=e.data.on||{};Er=t.elm,$e(n,r,St,Mt,t.context)}}function jt(e,t){if(e.data.domProps||t.data.domProps){var n,r,o=t.elm,i=e.data.domProps||{},a=t.data.domProps||{};a.__ob__&&(a=t.data.domProps=d({},a));for(n in i)null==a[n]&&(o[n]="");for(n in a)if(r=a[n],"textContent"!==n&&"innerHTML"!==n||(t.children&&(t.children.length=0),r!==i[n]))if("value"===n){o._value=r;var s=null==r?"":String(r);!o.composing&&(document.activeElement!==o&&o.value!==s||Pt(t,s))&&(o.value=s)}else o[n]=r}}function Pt(e,t){var n=e.elm.value,o=e.elm._vModifiers;return o&&o.number||"number"===e.elm.type?r(n)!==r(t):o&&o.trim?n.trim()!==t.trim():n!==t}function Lt(e){var t=Rt(e.style);return e.staticStyle?d(e.staticStyle,t):t}function Rt(e){return Array.isArray(e)?v(e):"string"==typeof e?eo(e):e}function Dt(e,t){var n,r={};if(t)for(var o=e;o.child;)o=o.child._vnode,o.data&&(n=Lt(o.data))&&d(r,n);(n=Lt(e.data))&&d(r,n);for(var i=e;i=i.parent;)i.data&&(n=Lt(i.data))&&d(r,n);return r}function It(e,t){var n=t.data,r=e.data;if(n.staticStyle||n.style||r.staticStyle||r.style){var o,i,a=t.elm,s=e.data.staticStyle,c=e.data.style||{},l=s||c,u=Rt(t.data.style)||{};t.data.style=u.__ob__?d({},u):u;var f=Dt(t,!0);for(i in l)null==f[i]&&ro(a,i,"");for(i in f)o=f[i],o!==l[i]&&ro(a,i,null==o?"":o)}}function Ut(e,t){if(t&&t.trim())if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+e.getAttribute("class")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Ht(e,t){if(t&&t.trim())if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t);else{for(var n=" "+e.getAttribute("class")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");e.setAttribute("class",n.trim())}}function Bt(e){ho(function(){ho(e)})}function Vt(e,t){(e._transitionClasses||(e._transitionClasses=[])).push(t),Ut(e,t)}function Ft(e,t){e._transitionClasses&&i(e._transitionClasses,t),Ht(e,t)}function zt(e,t,n){var r=qt(e,t),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===co?fo:vo,c=0,l=function(){e.removeEventListener(s,u),n()},u=function(t){t.target===e&&++c>=a&&l()};setTimeout(function(){c<a&&l()},i+1),e.addEventListener(s,u)}function qt(e,t){var n,r=window.getComputedStyle(e),o=r[uo+"Delay"].split(", "),i=r[uo+"Duration"].split(", "),a=Kt(o,i),s=r[po+"Delay"].split(", "),c=r[po+"Duration"].split(", "),l=Kt(s,c),u=0,d=0;t===co?a>0&&(n=co,u=a,d=i.length):t===lo?l>0&&(n=lo,u=l,d=c.length):(u=Math.max(a,l),n=u>0?a>l?co:lo:null,d=n?n===co?i.length:c.length:0);var f=n===co&&mo.test(r[uo+"Property"]);return{type:n,timeout:u,propCount:d,hasTransform:f}}function Kt(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return Wt(t)+Wt(e[n])}))}function Wt(e){return 1e3