data-ripple
Version:
Universal ripple effect solution
2 lines • 21.9 kB
JavaScript
/* eslint-disable */!function(t,e){for(var r in e)t[r]=e[r]}(exports,function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=4)}([function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const i=n(r(5)),o=r(1),a=r(2);function s(t,e){const r=i.default(t).getLuminance(),n=i.default(e).getLuminance();return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function u(t){let e="";for(const[r,n]of Object.entries(t))e+=`${r}: ${n};`;return e}e.isEmpty=t=>!Object.keys(t).length,e.getContrastRatio=s,e.getContrastColor=function(t,e=!1,r=3.1,n="#000000",o="#ffffff"){return e?s(t,n)>=r?n:o:i.default(t).complement().toHex8String()},e.fade=function(t,e){return i.default(t).setAlpha(e).toHex8String()},e.convertStylesObjectToString=u,e.addStylesToNode=function(t,e){const r=`${t.getAttribute("style")||""}; ${u(e)}`;t.setAttribute("style",r)},e.getRootFromEvent=function(t){const{currentTarget:e,target:r}=t;return e instanceof HTMLElement?e:r},e.getDistanceToFurthestCorner=function(t,e,r){const n=Math.max(Math.abs(t-r.left),Math.abs(t-r.right)),i=Math.max(Math.abs(e-r.top),Math.abs(e-r.bottom));return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))},e.getCustomAttribute=function(t,e,r,n=!1){let i=t.getAttribute(o.RippleDataOptions[r]);const s=parseFloat(i);return Number.isNaN(s)||s.toString().length!==i.length||(i=s),n&&(i="true"===i||""===i),i||e[r]||a.defaultRippleOptions[r]}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RootRippleDataAttribute="data-ripple",e.RippleDataOptions={root:e.RootRippleDataAttribute,color:`${e.RootRippleDataAttribute}-color`,timingFunction:`${e.RootRippleDataAttribute}-timing-function`,opacity:`${e.RootRippleDataAttribute}-opacity`,enterDuration:`${e.RootRippleDataAttribute}-enter-duration`,exitDuration:`${e.RootRippleDataAttribute}-exit-duration`,sizeModifier:`${e.RootRippleDataAttribute}-size-modifier`,disableCentering:`${e.RootRippleDataAttribute}-disable-centering`,fadeOutOnClick:`${e.RootRippleDataAttribute}-fade-out-on-click`}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultRippleOptions={enterDuration:550,exitDuration:400,timingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",sizeModifier:1,disableCentering:!1,fadeOutOnClick:!1,opacity:1,color:void 0},e.rippleStyles={default:{position:"absolute","border-radius":"50%",transform:"scale(0)"},fadeIn:{transform:"scale(1)",transition:`all ${e.defaultRippleOptions.enterDuration} ${e.defaultRippleOptions.timingFunction}`,"will-change":"transform, opacity"},fadeOut:{opacity:0,transition:`all ${e.defaultRippleOptions.exitDuration} ${e.defaultRippleOptions.timingFunction}`}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(2),i=r(0);e.rippleEffect=function(t,e){const r=i.getRootFromEvent(t);new o(r,e).fadeIn(t)};class o{constructor(t,e){this._fadeInTriggers=["mousedown","touchstart"],this._fadeOutTriggers=["mouseup","mouseleave","touchend"],this._root=t,this._options=Object.assign(Object.assign({},n.defaultRippleOptions),e),function(t){const{position:e}=window.getComputedStyle(t),{display:r}=window.getComputedStyle(t),{overflow:n}=window.getComputedStyle(t),{cursor:o}=window.getComputedStyle(t),a={position:"relative !important",display:"inline-block",overflow:"hidden !important",cursor:"pointer"};"relative"!==e&&"absolute"!==e||delete a.position,"unset"!==r&&"inherit"!==r&&"initial"!==r&&"inline"!==r&&delete a.display,"hidden"===n&&delete a.overflow,o&&"auto"!==o&&"default"!==o&&"unset"!==o&&delete a.cursor,i.isEmpty(a)||i.addStylesToNode(t,a)}(this._root),this._fadeInTriggers.forEach(t=>{this._root[`on${t}`]=t=>this.fadeIn(t)})}fadeIn(t){const e=i.getRootFromEvent(t);this._options=function(t,e){e=Object.assign(Object.assign({},n.defaultRippleOptions),e);const r={};return Object.keys(n.defaultRippleOptions).forEach(o=>{const a="boolean"==typeof n.defaultRippleOptions[o];if(r[o]=i.getCustomAttribute(t,e,o,a),"color"===o){const e=i.fade(i.getContrastColor(window.getComputedStyle(t).backgroundColor,!0,10),.15);r[o]=r[o]||e}}),r}(e,this._options);const r=document.createElement("div");!function(t){i.addStylesToNode(t,n.rippleStyles.default)}(r),function(t,e){const{color:r,opacity:n}=e,o={opacity:n,background:r};i.addStylesToNode(t,o)}(r,this._options),function(t,e,r){const{currentTarget:n,target:o,clientX:a,clientY:s}=t,u=n instanceof HTMLElement?n:o,{disableCentering:f,sizeModifier:l}=r,c=u.getBoundingClientRect(),h=f?c.left+c.width/2:a,d=f?c.top+c.height/2:s,g=i.getDistanceToFurthestCorner(a,s,c)*l,p=h-c.left,b={top:`${d-c.top-g}px`,left:`${p-g}px`,width:`${2*g}px`,height:`${2*g}px`};i.addStylesToNode(e,b)}(t,r,this._options),this._fadeOutTriggers.forEach(t=>{this._root[`on${t}`]=()=>this.fadeOut(r)}),e.appendChild(r);const{enterDuration:o,timingFunction:a}=this._options;this._start=performance.now();const s=Object.assign(Object.assign({},n.rippleStyles.fadeIn),{transition:`all ${o}ms ${a}`});setTimeout(()=>i.addStylesToNode(r,s),0),this._options.fadeOutOnClick&&this.fadeOut(r)}fadeOut(t){const{exitDuration:e,timingFunction:r}=this._options,o=Object.assign(Object.assign({},n.rippleStyles.fadeOut),{transition:`all ${e}ms ${r}`});setTimeout(()=>{i.addStylesToNode(t,o),setTimeout(()=>t.remove(),e)},this.calculateFadeOutDelay())}calculateFadeOutDelay(){const{exitDuration:t,enterDuration:e}=this._options,r=Math.round(performance.now()-this._start),n=e-t/3;return Math.max(n-r,0)}}e.Ripple=o},function(t,e,r){"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0});var i=r(0);e.getContrastColor=i.getContrastColor,e.fade=i.fade,n(r(3)),n(r(6))},function(t,e,r){var n;!function(i){var o=/^\s+/,a=/\s+$/,s=0,u=i.round,f=i.min,l=i.max,c=i.random;function h(t,e){if(e=e||{},(t=t||"")instanceof h)return t;if(!(this instanceof h))return new h(t,e);var r=function(t){var e={r:0,g:0,b:0},r=1,n=null,s=null,u=null,c=!1,h=!1;"string"==typeof t&&(t=function(t){t=t.replace(o,"").replace(a,"").toLowerCase();var e,r=!1;if(F[t])t=F[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=B.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=B.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=B.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=B.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=B.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=B.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=B.hex8.exec(t))return{r:T(e[1]),g:T(e[2]),b:T(e[3]),a:I(e[4]),format:r?"name":"hex8"};if(e=B.hex6.exec(t))return{r:T(e[1]),g:T(e[2]),b:T(e[3]),format:r?"name":"hex"};if(e=B.hex4.exec(t))return{r:T(e[1]+""+e[1]),g:T(e[2]+""+e[2]),b:T(e[3]+""+e[3]),a:I(e[4]+""+e[4]),format:r?"name":"hex8"};if(e=B.hex3.exec(t))return{r:T(e[1]+""+e[1]),g:T(e[2]+""+e[2]),b:T(e[3]+""+e[3]),format:r?"name":"hex"};return!1}(t));"object"==typeof t&&(U(t.r)&&U(t.g)&&U(t.b)?(d=t.r,g=t.g,p=t.b,e={r:255*$(d,255),g:255*$(g,255),b:255*$(p,255)},c=!0,h="%"===String(t.r).substr(-1)?"prgb":"rgb"):U(t.h)&&U(t.s)&&U(t.v)?(n=N(t.s),s=N(t.v),e=function(t,e,r){t=6*$(t,360),e=$(e,100),r=$(r,100);var n=i.floor(t),o=t-n,a=r*(1-e),s=r*(1-o*e),u=r*(1-(1-o)*e),f=n%6;return{r:255*[r,s,a,a,u,r][f],g:255*[u,r,r,s,a,a][f],b:255*[a,a,u,r,r,s][f]}}(t.h,n,s),c=!0,h="hsv"):U(t.h)&&U(t.s)&&U(t.l)&&(n=N(t.s),u=N(t.l),e=function(t,e,r){var n,i,o;function a(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=$(t,360),e=$(e,100),r=$(r,100),0===e)n=i=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,u=2*r-s;n=a(u,s,t+1/3),i=a(u,s,t),o=a(u,s,t-1/3)}return{r:255*n,g:255*i,b:255*o}}(t.h,n,u),c=!0,h="hsl"),t.hasOwnProperty("a")&&(r=t.a));var d,g,p;return r=H(r),{ok:c,format:t.format||h,r:f(255,l(e.r,0)),g:f(255,l(e.g,0)),b:f(255,l(e.b,0)),a:r}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=u(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=u(this._r)),this._g<1&&(this._g=u(this._g)),this._b<1&&(this._b=u(this._b)),this._ok=r.ok,this._tc_id=s++}function d(t,e,r){t=$(t,255),e=$(e,255),r=$(r,255);var n,i,o=l(t,e,r),a=f(t,e,r),s=(o+a)/2;if(o==a)n=i=0;else{var u=o-a;switch(i=s>.5?u/(2-o-a):u/(o+a),o){case t:n=(e-r)/u+(e<r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,l:s}}function g(t,e,r){t=$(t,255),e=$(e,255),r=$(r,255);var n,i,o=l(t,e,r),a=f(t,e,r),s=o,u=o-a;if(i=0===o?0:u/o,o==a)n=0;else{switch(o){case t:n=(e-r)/u+(e<r?6:0);break;case e:n=(r-t)/u+2;break;case r:n=(t-e)/u+4}n/=6}return{h:n,s:i,v:s}}function p(t,e,r,n){var i=[E(u(t).toString(16)),E(u(e).toString(16)),E(u(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function b(t,e,r,n){return[E(P(n)),E(u(t).toString(16)),E(u(e).toString(16)),E(u(r).toString(16))].join("")}function m(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.s-=e/100,r.s=j(r.s),h(r)}function _(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.s+=e/100,r.s=j(r.s),h(r)}function v(t){return h(t).desaturate(100)}function y(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.l+=e/100,r.l=j(r.l),h(r)}function A(t,e){e=0===e?0:e||10;var r=h(t).toRgb();return r.r=l(0,f(255,r.r-u(-e/100*255))),r.g=l(0,f(255,r.g-u(-e/100*255))),r.b=l(0,f(255,r.b-u(-e/100*255))),h(r)}function x(t,e){e=0===e?0:e||10;var r=h(t).toHsl();return r.l-=e/100,r.l=j(r.l),h(r)}function R(t,e){var r=h(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,h(r)}function w(t){var e=h(t).toHsl();return e.h=(e.h+180)%360,h(e)}function O(t){var e=h(t).toHsl(),r=e.h;return[h(t),h({h:(r+120)%360,s:e.s,l:e.l}),h({h:(r+240)%360,s:e.s,l:e.l})]}function S(t){var e=h(t).toHsl(),r=e.h;return[h(t),h({h:(r+90)%360,s:e.s,l:e.l}),h({h:(r+180)%360,s:e.s,l:e.l}),h({h:(r+270)%360,s:e.s,l:e.l})]}function k(t){var e=h(t).toHsl(),r=e.h;return[h(t),h({h:(r+72)%360,s:e.s,l:e.l}),h({h:(r+216)%360,s:e.s,l:e.l})]}function C(t,e,r){e=e||6,r=r||30;var n=h(t).toHsl(),i=360/r,o=[h(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,o.push(h(n));return o}function M(t,e){e=e||6;for(var r=h(t).toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/e;e--;)a.push(h({h:n,s:i,v:o})),o=(o+s)%1;return a}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:i.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=H(t),this._roundA=u(100*this._a)/100,this},toHsv:function(){var t=g(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=g(this._r,this._g,this._b),e=u(360*t.h),r=u(100*t.s),n=u(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=d(this._r,this._g,this._b),e=u(360*t.h),r=u(100*t.s),n=u(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return p(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[E(u(t).toString(16)),E(u(e).toString(16)),E(u(r).toString(16)),E(P(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:u(this._r),g:u(this._g),b:u(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+u(this._r)+", "+u(this._g)+", "+u(this._b)+")":"rgba("+u(this._r)+", "+u(this._g)+", "+u(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:u(100*$(this._r,255))+"%",g:u(100*$(this._g,255))+"%",b:u(100*$(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+u(100*$(this._r,255))+"%, "+u(100*$(this._g,255))+"%, "+u(100*$(this._b,255))+"%)":"rgba("+u(100*$(this._r,255))+"%, "+u(100*$(this._g,255))+"%, "+u(100*$(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+b(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=h(t);r="#"+b(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(A,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(R,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(O,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},h.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:N(t[n]));t=r}return h(t,e)},h.equals=function(t,e){return!(!t||!e)&&h(t).toRgbString()==h(e).toRgbString()},h.random=function(){return h.fromRatio({r:c(),g:c(),b:c()})},h.mix=function(t,e,r){r=0===r?0:r||50;var n=h(t).toRgb(),i=h(e).toRgb(),o=r/100;return h({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},h.readability=function(t,e){var r=h(t),n=h(e);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},h.isReadable=function(t,e,r){var n,i,o=h.readability(t,e);switch(i=!1,(n=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},h.mostReadable=function(t,e,r){var n,i,o,a,s=null,u=0;i=(r=r||{}).includeFallbackColors,o=r.level,a=r.size;for(var f=0;f<e.length;f++)(n=h.readability(t,e[f]))>u&&(u=n,s=h(e[f]));return h.isReadable(t,s,{level:o,size:a})||!i?s:(r.includeFallbackColors=!1,h.mostReadable(t,["#fff","#000"],r))};var F=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=h.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(F);function H(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=f(e,l(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),i.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function j(t){return f(1,l(0,t))}function T(t){return parseInt(t,16)}function E(t){return 1==t.length?"0"+t:""+t}function N(t){return t<=1&&(t=100*t+"%"),t}function P(t){return i.round(255*parseFloat(t)).toString(16)}function I(t){return T(t)/255}var L,q,z,B=(q="[\\s|\\(]+("+(L="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",z="[\\s|\\(]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")[,|\\s]+("+L+")\\s*\\)?",{CSS_UNIT:new RegExp(L),rgb:new RegExp("rgb"+q),rgba:new RegExp("rgba"+z),hsl:new RegExp("hsl"+q),hsla:new RegExp("hsla"+z),hsv:new RegExp("hsv"+q),hsva:new RegExp("hsva"+z),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(t){return!!B.CSS_UNIT.exec(t)}t.exports?t.exports=h:void 0===(n=function(){return h}.call(e,r,e,t))||(t.exports=n)}(Math)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(1),i=r(3);function o(t){const e=new MutationObserver(e=>{for(const r of e){if("childList"!==r.type&&"attributes"!==r.type)return;const e=r.target;if(!e.getAttribute||"function"!=typeof e.getAttribute)return;const o=e.getAttribute(n.RippleDataOptions.root);"true"!==o&&""!==o||new i.Ripple(e,t)}});e.observe(document,{childList:!0,subtree:!0,attributes:!0});const r=document.querySelectorAll(`[${n.RippleDataOptions.root}]`);return r&&Array.from(r).forEach(e=>{new i.Ripple(e,t)}),e.disconnect.bind(e)}e.rippleNodeObserver=o,e.unsubscribeRippleNodeObserver=o()}]));
//# sourceMappingURL=index.js.map