diff --git a/dist/mouse-follower.js b/dist/mouse-follower.js
index ef60bb1..2e0570f 100644
--- a/dist/mouse-follower.js
+++ b/dist/mouse-follower.js
@@ -3,8 +3,8 @@
* Cuberto Mouse Follower
* https://cuberto.com/
*
- * @version 1.0.3
+ * @version 1.0.4
* @author Cuberto, Artem Dordzhiev (Draft)
*/
-var i=function(){function t(e){this.gsap=t.gsap,this.options=Object.assign({},{el:null,container:document.body,className:"mf-cursor",innerClassName:"mf-cursor-inner",textClassName:"mf-cursor-text",mediaClassName:"mf-cursor-media",mediaBoxClassName:"mf-cursor-media-box",iconSvgClassName:"mf-svgsprite",iconSvgNamePrefix:"-",iconSvgSrc:"",dataAttr:"cursor",hiddenState:"-hidden",textState:"-text",iconState:"-icon",activeState:"-active",mediaState:"-media",stateDetection:{"-pointer":"a,button","-hidden":"iframe"},visible:!0,speed:.55,ease:"expo.out",overwrite:!0,skewing:0,skewingText:2,skewingIcon:2,skewingMedia:2,skewingDelta:.001,skewingDeltaMax:.15,stickDelta:.15,showTimeout:20,hideOnLeave:!0,hideTimeout:300,hideMediaTimeout:300,initialPos:[-window.innerWidth,-window.innerHeight]},e),this.el="string"==typeof this.options.el?document.querySelector(this.options.el):this.options.el,this.container="string"==typeof this.options.container?document.querySelector(this.options.container):this.options.container,this.skewing=this.options.skewing,this.pos={x:this.options.initialPos[0],y:this.options.initialPos[1]},this.vel={x:0,y:0},this.event={},this.init()}t.registerGSAP=function(e){t.gsap=e};var e=t.prototype;return e.init=function(){this.el||this.create(),this.createSetter(),this.bind(),this.render(!0),this.ticker=this.render.bind(this,!1),this.gsap.ticker.add(this.ticker)},e.create=function(){this.el=document.createElement("div"),this.el.className=this.options.className,this.el.classList.add(this.options.hiddenState),this.inner=document.createElement("div"),this.inner.className=this.options.innerClassName,this.text=document.createElement("div"),this.text.className=this.options.textClassName,this.media=document.createElement("div"),this.media.className=this.options.mediaClassName,this.mediaBox=document.createElement("div"),this.mediaBox.className=this.options.mediaBoxClassName,this.media.appendChild(this.mediaBox),this.inner.appendChild(this.media),this.inner.appendChild(this.text),this.el.appendChild(this.inner),this.container.appendChild(this.el)},e.createSetter=function(){this.setter={x:this.gsap.quickSetter(this.el,"x","px"),y:this.gsap.quickSetter(this.el,"y","px"),rotation:this.gsap.quickSetter(this.el,"rotation","deg"),scaleX:this.gsap.quickSetter(this.el,"scaleX"),scaleY:this.gsap.quickSetter(this.el,"scaleY"),wc:this.gsap.quickSetter(this.el,"willChange"),inner:{rotation:this.gsap.quickSetter(this.inner,"rotation","deg")}}},e.bind=function(){var t=this;this.event.mouseleave=function(){return t.hide()},this.event.mouseenter=function(){return t.show()},this.event.mousedown=function(){return t.addState(t.options.activeState)},this.event.mouseup=function(){return t.removeState(t.options.activeState)},this.event.mousemoveOnce=function(){return t.show()},this.event.mousemove=function(e){t.gsap.to(t.pos,{x:t.stick?t.stick.x-(t.stick.x-e.clientX)*t.options.stickDelta:e.clientX,y:t.stick?t.stick.y-(t.stick.y-e.clientY)*t.options.stickDelta:e.clientY,overwrite:t.options.overwrite,ease:t.options.ease,duration:t.visible?t.options.speed:0,onUpdate:function(){return t.vel={x:e.clientX-t.pos.x,y:e.clientY-t.pos.y}}})},this.event.mouseover=function(e){for(var i=e.target;i&&i!==t.container&&(!e.relatedTarget||!i.contains(e.relatedTarget));i=i.parentNode){for(var s in t.options.stateDetection)i.matches(t.options.stateDetection[s])&&t.addState(s);if(t.options.dataAttr){var o=t.getFromDataset(i);o.state&&t.addState(o.state),o.text&&t.setText(o.text),o.icon&&t.setIcon(o.icon),o.img&&t.setImg(o.img),o.video&&t.setVideo(o.video),void 0!==o.show&&t.show(),void 0!==o.stick&&t.setStick(o.stick||i)}}},this.event.mouseout=function(e){for(var i=e.target;i&&i!==t.container&&(!e.relatedTarget||!i.contains(e.relatedTarget));i=i.parentNode){for(var s in t.options.stateDetection)i.matches(t.options.stateDetection[s])&&t.removeState(s);if(t.options.dataAttr){var o=t.getFromDataset(i);o.state&&t.removeState(o.state),o.text&&t.removeText(),o.icon&&t.removeIcon(),o.img&&t.removeImg(),o.video&&t.removeVideo(),void 0!==o.show&&t.hide(),void 0!==o.stick&&t.removeStick()}}},this.options.hideOnLeave&&this.container.addEventListener("mouseleave",this.event.mouseleave,{passive:!0}),this.options.visible&&this.container.addEventListener("mouseenter",this.event.mouseenter,{passive:!0}),this.container.addEventListener("mousedown",this.event.mousedown,{passive:!0}),this.container.addEventListener("mouseup",this.event.mouseup,{passive:!0}),this.container.addEventListener("mousemove",this.event.mousemove,{passive:!0}),this.options.visible&&this.container.addEventListener("mousemove",this.event.mousemoveOnce,{passive:!0,once:!0}),(this.options.stateDetection||this.options.dataAttr)&&(this.container.addEventListener("mouseover",this.event.mouseover,{passive:!0}),this.container.addEventListener("mouseout",this.event.mouseout,{passive:!0}))},e.render=function(t){if(!0===t||0!==this.vel.y&&0!==this.vel.x){if(this.setter.wc("transform"),this.setter.x(this.pos.x),this.setter.y(this.pos.y),this.skewing){var e=Math.sqrt(Math.pow(this.vel.x,2)+Math.pow(this.vel.y,2)),i=Math.min(e*this.options.skewingDelta,this.options.skewingDeltaMax)*this.skewing,s=180*Math.atan2(this.vel.y,this.vel.x)/Math.PI;this.setter.rotation(s),this.setter.scaleX(1+i),this.setter.scaleY(1-i),this.setter.inner.rotation(-s)}}else this.setter.wc("auto")},e.show=function(){var t=this;clearInterval(this.visibleInt),this.el.classList.remove(this.options.hiddenState),this.visibleInt=setTimeout((function(){return t.visible=!0}),this.options.showTimeout)},e.hide=function(){var t=this;clearInterval(this.visibleInt),this.el.classList.add(this.options.hiddenState),this.visibleInt=setTimeout((function(){return t.visible=!1}),this.options.hideTimeout)},e.toggle=function(t){void 0===t&&(t=!1),!this.visible||t?this.show():this.hide()},e.addState=function(t){var e;if(t===this.options.hiddenState)return this.hide();(e=this.el.classList).add.apply(e,t.split(" "))},e.removeState=function(t){var e;if(t===this.options.hiddenState)return this.show();(e=this.el.classList).remove.apply(e,t.split(" "))},e.toggleState=function(t,e){this.el.classList.toggle(""+t,e)},e.setSkewing=function(t){this.gsap.to(this,{skewing:t})},e.removeSkewing=function(){this.gsap.to(this,{skewing:this.options.skewing})},e.setStick=function(t){var e=("string"==typeof t?document.querySelector(t):t).getBoundingClientRect();this.stick={y:e.top+e.height/2,x:e.left+e.height/2}},e.removeStick=function(){this.stick=!1},e.setText=function(t){this.text.innerHTML=t,this.addState(this.options.textState),this.setSkewing(this.options.skewingText)},e.removeText=function(){this.removeState(this.options.textState),this.removeSkewing()},e.setIcon=function(t,e){void 0===e&&(e=""),this.text.innerHTML='',this.addState(this.options.iconState),this.setSkewing(this.options.skewingIcon)},e.removeIcon=function(){this.removeState(this.options.iconState),this.removeSkewing()},e.setMedia=function(t){var e=this;clearTimeout(this.mediaInt),t&&(this.mediaBox.innerHTML="",this.mediaBox.appendChild(t)),this.mediaInt=setTimeout((function(){return e.addState(e.options.mediaState)}),20),this.setSkewing(this.options.skewingMedia)},e.removeMedia=function(){var t=this;clearTimeout(this.mediaInt),this.removeState(this.options.mediaState),this.mediaInt=setTimeout((function(){return t.mediaBox.innerHTML=""}),this.options.hideMediaTimeout),this.removeSkewing()},e.setImg=function(t){this.mediaImg||(this.mediaImg=new Image),this.mediaImg.src!==t&&(this.mediaImg.src=t),this.setMedia(this.mediaImg)},e.removeImg=function(){this.removeMedia()},e.setVideo=function(t){this.mediaVideo||(this.mediaVideo=document.createElement("video"),this.mediaVideo.muted=!0,this.mediaVideo.loop=!0,this.mediaVideo.autoplay=!0),this.mediaVideo.src!==t&&(this.mediaVideo.src=t,this.mediaVideo.load()),this.mediaVideo.play(),this.setMedia(this.mediaVideo)},e.removeVideo=function(){this.mediaVideo&&this.mediaVideo.readyState>2&&this.mediaVideo.pause(),this.removeMedia()},e.getFromDataset=function(t){var e=t.dataset;return{state:e[this.options.dataAttr],show:e[this.options.dataAttr+"Show"],text:e[this.options.dataAttr+"Text"],icon:e[this.options.dataAttr+"Icon"],img:e[this.options.dataAttr+"Img"],video:e[this.options.dataAttr+"Video"],stick:e[this.options.dataAttr+"Stick"]}},e.destroy=function(){this.gsap.ticker.remove(this.ticker),this.container.removeEventListener("mouseleave",this.event.mouseleave),this.container.removeEventListener("mouseenter",this.event.mouseenter),this.container.removeEventListener("mousedown",this.event.mousedown),this.container.removeEventListener("mouseup",this.event.mouseup),this.container.removeEventListener("mousemove",this.event.mousemove),this.container.removeEventListener("mousemove",this.event.mousemoveOnce),this.container.removeEventListener("mouseover",this.event.mouseover),this.container.removeEventListener("mouseout",this.event.mouseout),this.el&&(this.container.removeChild(this.el),this.el=null,this.mediaImg=null,this.mediaVideo=null)},t}();return e=e.default}()}));
+var i=function(){function t(e){this.gsap=t.gsap||window.gsap,this.options=Object.assign({},{el:null,container:document.body,className:"mf-cursor",innerClassName:"mf-cursor-inner",textClassName:"mf-cursor-text",mediaClassName:"mf-cursor-media",mediaBoxClassName:"mf-cursor-media-box",iconSvgClassName:"mf-svgsprite",iconSvgNamePrefix:"-",iconSvgSrc:"",dataAttr:"cursor",hiddenState:"-hidden",textState:"-text",iconState:"-icon",activeState:"-active",mediaState:"-media",stateDetection:{"-pointer":"a,button"},visible:!0,visibleOnState:!1,speed:.55,ease:"expo.out",overwrite:!0,skewing:0,skewingText:2,skewingIcon:2,skewingMedia:2,skewingDelta:.001,skewingDeltaMax:.15,stickDelta:.15,showTimeout:20,hideOnLeave:!0,hideTimeout:300,hideMediaTimeout:300,initialPos:[-window.innerWidth,-window.innerHeight]},e),this.options.visible&&!e.stateDetection&&(this.options.stateDetection["-hidden"]="iframe"),this.el="string"==typeof this.options.el?document.querySelector(this.options.el):this.options.el,this.container="string"==typeof this.options.container?document.querySelector(this.options.container):this.options.container,this.skewing=this.options.skewing,this.pos={x:this.options.initialPos[0],y:this.options.initialPos[1]},this.vel={x:0,y:0},this.event={},this.events=[],this.init()}t.registerGSAP=function(e){t.gsap=e};var e=t.prototype;return e.init=function(){this.el||this.create(),this.createSetter(),this.bind(),this.render(!0),this.ticker=this.render.bind(this,!1),this.gsap.ticker.add(this.ticker)},e.create=function(){this.el=document.createElement("div"),this.el.className=this.options.className,this.el.classList.add(this.options.hiddenState),this.inner=document.createElement("div"),this.inner.className=this.options.innerClassName,this.text=document.createElement("div"),this.text.className=this.options.textClassName,this.media=document.createElement("div"),this.media.className=this.options.mediaClassName,this.mediaBox=document.createElement("div"),this.mediaBox.className=this.options.mediaBoxClassName,this.media.appendChild(this.mediaBox),this.inner.appendChild(this.media),this.inner.appendChild(this.text),this.el.appendChild(this.inner),this.container.appendChild(this.el)},e.createSetter=function(){this.setter={x:this.gsap.quickSetter(this.el,"x","px"),y:this.gsap.quickSetter(this.el,"y","px"),rotation:this.gsap.quickSetter(this.el,"rotation","deg"),scaleX:this.gsap.quickSetter(this.el,"scaleX"),scaleY:this.gsap.quickSetter(this.el,"scaleY"),wc:this.gsap.quickSetter(this.el,"willChange"),inner:{rotation:this.gsap.quickSetter(this.inner,"rotation","deg")}}},e.bind=function(){var t=this;this.event.mouseleave=function(){return t.hide()},this.event.mouseenter=function(){return t.show()},this.event.mousedown=function(){return t.addState(t.options.activeState)},this.event.mouseup=function(){return t.removeState(t.options.activeState)},this.event.mousemoveOnce=function(){return t.show()},this.event.mousemove=function(e){t.gsap.to(t.pos,{x:t.stick?t.stick.x-(t.stick.x-e.clientX)*t.options.stickDelta:e.clientX,y:t.stick?t.stick.y-(t.stick.y-e.clientY)*t.options.stickDelta:e.clientY,overwrite:t.options.overwrite,ease:t.options.ease,duration:t.visible?t.options.speed:0,onUpdate:function(){return t.vel={x:e.clientX-t.pos.x,y:e.clientY-t.pos.y}}})},this.event.mouseover=function(e){for(var i=e.target;i&&i!==t.container&&(!e.relatedTarget||!i.contains(e.relatedTarget));i=i.parentNode){for(var s in t.options.stateDetection)i.matches(t.options.stateDetection[s])&&t.addState(s);if(t.options.dataAttr){var o=t.getFromDataset(i);o.state&&t.addState(o.state),o.text&&t.setText(o.text),o.icon&&t.setIcon(o.icon),o.img&&t.setImg(o.img),o.video&&t.setVideo(o.video),void 0!==o.show&&t.show(),void 0!==o.stick&&t.setStick(o.stick||i)}}},this.event.mouseout=function(e){for(var i=e.target;i&&i!==t.container&&(!e.relatedTarget||!i.contains(e.relatedTarget));i=i.parentNode){for(var s in t.options.stateDetection)i.matches(t.options.stateDetection[s])&&t.removeState(s);if(t.options.dataAttr){var o=t.getFromDataset(i);o.state&&t.removeState(o.state),o.text&&t.removeText(),o.icon&&t.removeIcon(),o.img&&t.removeImg(),o.video&&t.removeVideo(),void 0!==o.show&&t.hide(),void 0!==o.stick&&t.removeStick()}}},this.options.hideOnLeave&&this.container.addEventListener("mouseleave",this.event.mouseleave,{passive:!0}),this.options.visible&&this.container.addEventListener("mouseenter",this.event.mouseenter,{passive:!0}),this.container.addEventListener("mousedown",this.event.mousedown,{passive:!0}),this.container.addEventListener("mouseup",this.event.mouseup,{passive:!0}),this.container.addEventListener("mousemove",this.event.mousemove,{passive:!0}),this.options.visible&&this.container.addEventListener("mousemove",this.event.mousemoveOnce,{passive:!0,once:!0}),(this.options.stateDetection||this.options.dataAttr)&&(this.container.addEventListener("mouseover",this.event.mouseover,{passive:!0}),this.container.addEventListener("mouseout",this.event.mouseout,{passive:!0}))},e.render=function(t){if(!0===t||0!==this.vel.y&&0!==this.vel.x){if(this.trigger("render"),this.setter.wc("transform"),this.setter.x(this.pos.x),this.setter.y(this.pos.y),this.skewing){var e=Math.sqrt(Math.pow(this.vel.x,2)+Math.pow(this.vel.y,2)),i=Math.min(e*this.options.skewingDelta,this.options.skewingDeltaMax)*this.skewing,s=180*Math.atan2(this.vel.y,this.vel.x)/Math.PI;this.setter.rotation(s),this.setter.scaleX(1+i),this.setter.scaleY(1-i),this.setter.inner.rotation(-s)}}else this.setter.wc("auto")},e.show=function(){var t=this;this.trigger("show"),clearInterval(this.visibleInt),this.el.classList.remove(this.options.hiddenState),this.visibleInt=setTimeout((function(){return t.visible=!0}),this.options.showTimeout)},e.hide=function(){var t=this;this.trigger("hide"),clearInterval(this.visibleInt),this.el.classList.add(this.options.hiddenState),this.visibleInt=setTimeout((function(){return t.visible=!1}),this.options.hideTimeout)},e.toggle=function(t){!0===t||!1!==t&&!this.visible?this.show():this.hide()},e.addState=function(t){var e;if(this.trigger("addState",t),t===this.options.hiddenState)return this.hide();(e=this.el.classList).add.apply(e,t.split(" ")),this.options.visibleOnState&&this.show()},e.removeState=function(t){var e;if(this.trigger("removeState",t),t===this.options.hiddenState)return this.show();(e=this.el.classList).remove.apply(e,t.split(" ")),this.options.visibleOnState&&this.el.className===this.options.className&&this.hide()},e.toggleState=function(t,e){!0===e||!1!==e&&!this.el.classList.contains(t)?this.addState(t):this.removeState(t)},e.setSkewing=function(t){this.gsap.to(this,{skewing:t})},e.removeSkewing=function(){this.gsap.to(this,{skewing:this.options.skewing})},e.setStick=function(t){var e=("string"==typeof t?document.querySelector(t):t).getBoundingClientRect();this.stick={y:e.top+e.height/2,x:e.left+e.height/2}},e.removeStick=function(){this.stick=!1},e.setText=function(t){this.text.innerHTML=t,this.addState(this.options.textState),this.setSkewing(this.options.skewingText)},e.removeText=function(){this.removeState(this.options.textState),this.removeSkewing()},e.setIcon=function(t,e){void 0===e&&(e=""),this.text.innerHTML="",this.addState(this.options.iconState),this.setSkewing(this.options.skewingIcon)},e.removeIcon=function(){this.removeState(this.options.iconState),this.removeSkewing()},e.setMedia=function(t){var e=this;clearTimeout(this.mediaInt),t&&(this.mediaBox.innerHTML="",this.mediaBox.appendChild(t)),this.mediaInt=setTimeout((function(){return e.addState(e.options.mediaState)}),20),this.setSkewing(this.options.skewingMedia)},e.removeMedia=function(){var t=this;clearTimeout(this.mediaInt),this.removeState(this.options.mediaState),this.mediaInt=setTimeout((function(){return t.mediaBox.innerHTML=""}),this.options.hideMediaTimeout),this.removeSkewing()},e.setImg=function(t){this.mediaImg||(this.mediaImg=new Image),this.mediaImg.src!==t&&(this.mediaImg.src=t),this.setMedia(this.mediaImg)},e.removeImg=function(){this.removeMedia()},e.setVideo=function(t){this.mediaVideo||(this.mediaVideo=document.createElement("video"),this.mediaVideo.muted=!0,this.mediaVideo.loop=!0,this.mediaVideo.autoplay=!0),this.mediaVideo.src!==t&&(this.mediaVideo.src=t,this.mediaVideo.load()),this.mediaVideo.play(),this.setMedia(this.mediaVideo)},e.removeVideo=function(){this.mediaVideo&&this.mediaVideo.readyState>2&&this.mediaVideo.pause(),this.removeMedia()},e.on=function(t,e){this.events[t]instanceof Array||this.off(t),this.events[t].push(e)},e.off=function(t,e){this.events[t]=e?this.events[t].filter((function(t){return t!==e})):[]},e.trigger=function(t){for(var e=this,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o this.hide();\n this.event.mouseenter = () => this.show();\n this.event.mousedown = () => this.addState(this.options.activeState);\n this.event.mouseup = () => this.removeState(this.options.activeState);\n this.event.mousemoveOnce = () => this.show();\n this.event.mousemove = (e) => {\n this.gsap.to(this.pos, {\n x: this.stick ? this.stick.x - ((this.stick.x - e.clientX) * this.options.stickDelta) : e.clientX,\n y: this.stick ? this.stick.y - ((this.stick.y - e.clientY) * this.options.stickDelta) : e.clientY,\n overwrite: this.options.overwrite,\n ease: this.options.ease,\n duration: this.visible ? this.options.speed : 0,\n onUpdate: () => this.vel = {x: e.clientX - this.pos.x, y: e.clientY - this.pos.y}\n });\n };\n this.event.mouseover = (e) => {\n for (let target = e.target; target && target !== this.container; target = target.parentNode) {\n if (e.relatedTarget && target.contains(e.relatedTarget)) break;\n\n for (let state in this.options.stateDetection) {\n if (target.matches(this.options.stateDetection[state])) this.addState(state);\n }\n\n if (this.options.dataAttr) {\n const params = this.getFromDataset(target);\n if (params.state) this.addState(params.state);\n if (params.text) this.setText(params.text);\n if (params.icon) this.setIcon(params.icon);\n if (params.img) this.setImg(params.img);\n if (params.video) this.setVideo(params.video);\n if (typeof (params.show) !== \"undefined\") this.show();\n if (typeof (params.stick) !== \"undefined\") this.setStick(params.stick || target);\n }\n }\n };\n this.event.mouseout = (e) => {\n for (let target = e.target; target && target !== this.container; target = target.parentNode) {\n if (e.relatedTarget && target.contains(e.relatedTarget)) break;\n\n for (let state in this.options.stateDetection) {\n if (target.matches(this.options.stateDetection[state])) this.removeState(state);\n }\n\n if (this.options.dataAttr) {\n const params = this.getFromDataset(target);\n if (params.state) this.removeState(params.state);\n if (params.text) this.removeText();\n if (params.icon) this.removeIcon();\n if (params.img) this.removeImg();\n if (params.video) this.removeVideo();\n if (typeof (params.show) !== \"undefined\") this.hide();\n if (typeof (params.stick) !== \"undefined\") this.removeStick();\n }\n }\n };\n\n if (this.options.hideOnLeave) {\n this.container.addEventListener('mouseleave', this.event.mouseleave, {passive: true});\n }\n if (this.options.visible) {\n this.container.addEventListener('mouseenter', this.event.mouseenter, {passive: true});\n }\n this.container.addEventListener('mousedown', this.event.mousedown, {passive: true});\n this.container.addEventListener('mouseup', this.event.mouseup, {passive: true});\n this.container.addEventListener('mousemove', this.event.mousemove, {passive: true});\n if (this.options.visible) {\n this.container.addEventListener('mousemove', this.event.mousemoveOnce, {\n passive: true,\n once: true\n });\n }\n if (this.options.stateDetection || this.options.dataAttr) {\n this.container.addEventListener('mouseover', this.event.mouseover, {passive: true});\n this.container.addEventListener('mouseout', this.event.mouseout, {passive: true});\n }\n }\n\n /**\n * Render the cursor in a new position.\n *\n * @param {boolean} [force=false] Force render.\n */\n render(force) {\n if (force !== true && (this.vel.y === 0 || this.vel.x === 0)) {\n this.setter.wc('auto');\n return;\n }\n\n this.setter.wc('transform');\n this.setter.x(this.pos.x);\n this.setter.y(this.pos.y);\n\n if (this.skewing) {\n const distance = Math.sqrt(Math.pow(this.vel.x, 2) + Math.pow(this.vel.y, 2));\n const scale = Math.min(distance * this.options.skewingDelta,\n this.options.skewingDeltaMax) * this.skewing;\n const angle = Math.atan2(this.vel.y, this.vel.x) * 180 / Math.PI;\n\n this.setter.rotation(angle);\n this.setter.scaleX(1 + scale);\n this.setter.scaleY(1 - scale);\n this.setter.inner.rotation(-angle);\n }\n }\n\n /**\n * Show cursor.\n */\n show() {\n clearInterval(this.visibleInt);\n this.el.classList.remove(this.options.hiddenState);\n this.visibleInt = setTimeout(() => this.visible = true, this.options.showTimeout);\n }\n\n /**\n * Hide cursor.\n */\n hide() {\n clearInterval(this.visibleInt);\n this.el.classList.add(this.options.hiddenState);\n this.visibleInt = setTimeout(() => this.visible = false, this.options.hideTimeout);\n }\n\n /**\n * Toggle cursor.\n *\n * @param {boolean} [force=false] Force state.\n */\n toggle(force = false) {\n if (!this.visible || force) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Add state/states to the cursor.\n *\n * @param {string} state State name.\n */\n addState(state) {\n if (state === this.options.hiddenState) return this.hide();\n this.el.classList.add(...state.split(\" \"))\n }\n\n /**\n * Remove state/states from cursor.\n *\n * @param {string} state State name.\n */\n removeState(state) {\n if (state === this.options.hiddenState) return this.show();\n this.el.classList.remove(...state.split(\" \"))\n }\n\n /**\n * Toggle cursor state.\n *\n * @param {string} state State name.\n * @param {boolean} force Force state.\n */\n toggleState(state, force) {\n this.el.classList.toggle(`${state}`, force)\n }\n\n /**\n * Set factor of skewing effect.\n *\n * @param {number} value Skewing factor.\n */\n setSkewing(value) {\n this.gsap.to(this, {skewing: value});\n }\n\n /**\n * Reverts skewing factor to default.\n */\n removeSkewing() {\n this.gsap.to(this, {skewing: this.options.skewing});\n }\n\n /**\n * Stick cursor to the element.\n *\n * @param {string|HTMLElement} element Element or selector.\n */\n setStick(element) {\n const el = typeof (element) === \"string\" ? document.querySelector(element) : element\n const rect = el.getBoundingClientRect();\n this.stick = {\n y: rect.top + (rect.height / 2),\n x: rect.left + (rect.height / 2)\n };\n }\n\n /**\n * Unstick cursor from the element.\n */\n removeStick() {\n this.stick = false;\n }\n\n /**\n * Transform cursor to text mode with a given string.\n *\n * @param {string} text Text.\n */\n setText(text) {\n this.text.innerHTML = text;\n this.addState(this.options.textState);\n this.setSkewing(this.options.skewingText);\n }\n\n /**\n * Reverts cursor from text mode.\n */\n removeText() {\n this.removeState(this.options.textState);\n this.removeSkewing();\n }\n\n /**\n * Transform cursor to svg icon mode.\n *\n * @param {string} name Icon identifier.\n * @param {string} [style=\"\"] Additional SVG styles.\n */\n setIcon(name, style = '') {\n this.text.innerHTML = ``;\n this.addState(this.options.iconState);\n this.setSkewing(this.options.skewingIcon);\n }\n\n /**\n * Reverts cursor from icon mode.\n */\n removeIcon() {\n this.removeState(this.options.iconState);\n this.removeSkewing();\n }\n\n /**\n * Transform cursor to media mode with a given element.\n *\n * @param {HTMLElement} element Element.\n */\n setMedia(element) {\n clearTimeout(this.mediaInt);\n if (element) {\n this.mediaBox.innerHTML = \"\";\n this.mediaBox.appendChild(element);\n }\n this.mediaInt = setTimeout(() => this.addState(this.options.mediaState), 20);\n this.setSkewing(this.options.skewingMedia);\n }\n\n /**\n * Revert cursor from media mode.\n */\n removeMedia() {\n clearTimeout(this.mediaInt);\n this.removeState(this.options.mediaState);\n this.mediaInt = setTimeout(() => this.mediaBox.innerHTML = \"\", this.options.hideMediaTimeout);\n this.removeSkewing();\n }\n\n /**\n * Transform cursor to image mode.\n *\n * @param {string} url Image url.\n */\n setImg(url) {\n if (!this.mediaImg) this.mediaImg = new Image();\n if (this.mediaImg.src !== url) this.mediaImg.src = url;\n this.setMedia(this.mediaImg);\n }\n\n /**\n * Reverts cursor from image mode.\n */\n removeImg() {\n this.removeMedia();\n }\n\n /**\n * Transform cursor to video mode.\n *\n * @param {string} url Video url.\n */\n setVideo(url) {\n if (!this.mediaVideo) {\n this.mediaVideo = document.createElement('video');\n this.mediaVideo.muted = true;\n this.mediaVideo.loop = true;\n this.mediaVideo.autoplay = true;\n }\n if (this.mediaVideo.src !== url) {\n this.mediaVideo.src = url;\n this.mediaVideo.load();\n }\n this.mediaVideo.play();\n this.setMedia(this.mediaVideo);\n }\n\n /**\n * Reverts cursor from video mode.\n */\n removeVideo() {\n if (this.mediaVideo && this.mediaVideo.readyState > 2) this.mediaVideo.pause();\n this.removeMedia();\n }\n\n /**\n * Get cursor options from data attribute of a given element.\n *\n * @param {HTMLElement} element Element.\n * @return {object} Options.\n */\n getFromDataset(element) {\n const dataset = element.dataset;\n return {\n state: dataset[this.options.dataAttr],\n show: dataset[this.options.dataAttr + \"Show\"],\n text: dataset[this.options.dataAttr + \"Text\"],\n icon: dataset[this.options.dataAttr + \"Icon\"],\n img: dataset[this.options.dataAttr + \"Img\"],\n video: dataset[this.options.dataAttr + \"Video\"],\n stick: dataset[this.options.dataAttr + \"Stick\"],\n }\n }\n\n /**\n * Destroy cursor instance.\n */\n destroy() {\n this.gsap.ticker.remove(this.ticker);\n this.container.removeEventListener('mouseleave', this.event.mouseleave);\n this.container.removeEventListener('mouseenter', this.event.mouseenter);\n this.container.removeEventListener('mousedown', this.event.mousedown);\n this.container.removeEventListener('mouseup', this.event.mouseup);\n this.container.removeEventListener('mousemove', this.event.mousemove);\n this.container.removeEventListener('mousemove', this.event.mousemoveOnce);\n this.container.removeEventListener('mouseover', this.event.mouseover);\n this.container.removeEventListener('mouseout', this.event.mouseout);\n if (this.el) {\n this.container.removeChild(this.el);\n this.el = null;\n this.mediaImg = null;\n this.mediaVideo = null;\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","MouseFollower","options","gsap","assign","el","container","document","body","className","innerClassName","textClassName","mediaClassName","mediaBoxClassName","iconSvgClassName","iconSvgNamePrefix","iconSvgSrc","dataAttr","hiddenState","textState","iconState","activeState","mediaState","stateDetection","visible","speed","ease","overwrite","skewing","skewingText","skewingIcon","skewingMedia","skewingDelta","skewingDeltaMax","stickDelta","showTimeout","hideOnLeave","hideTimeout","hideMediaTimeout","initialPos","window","innerWidth","innerHeight","querySelector","pos","x","y","vel","event","init","registerGSAP","create","createSetter","bind","render","ticker","add","createElement","classList","inner","text","media","mediaBox","appendChild","setter","quickSetter","rotation","scaleX","scaleY","wc","mouseleave","hide","mouseenter","show","mousedown","addState","mouseup","removeState","mousemoveOnce","mousemove","e","to","stick","clientX","clientY","duration","onUpdate","mouseover","target","relatedTarget","contains","parentNode","state","matches","params","getFromDataset","setText","icon","setIcon","img","setImg","video","setVideo","setStick","mouseout","removeText","removeIcon","removeImg","removeVideo","removeStick","addEventListener","passive","once","force","distance","Math","sqrt","pow","scale","min","angle","atan2","PI","clearInterval","visibleInt","remove","setTimeout","toggle","split","toggleState","setSkewing","value","removeSkewing","element","rect","getBoundingClientRect","top","height","left","innerHTML","name","style","setMedia","clearTimeout","mediaInt","removeMedia","url","mediaImg","Image","src","mediaVideo","muted","loop","autoplay","load","play","readyState","pause","dataset","destroy","removeEventListener","removeChild"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"mouse-follower.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAuB,cAAID,IAE3BD,EAAoB,cAAIC,IAR1B,CASGK,MAAM,WACT,O,wBCTA,IAAIC,EAAsB,CCA1BA,EAAwB,SAASL,EAASM,GACzC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EF,EAAwB,SAASQ,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,K;;;;;;;;ACM5F,IAEkBI,EAAAA,WAgDjB,WAAYC,GACRf,KAAKgB,KAAOF,EAAcE,MAAQC,OAAOD,KACzChB,KAAKe,QAAUV,OAAOa,OAAO,GAAI,CAC7BC,GAAI,KACJC,UAAWC,SAASC,KACpBC,UAAW,YACXC,eAAgB,kBAChBC,cAAe,iBACfC,eAAgB,kBAChBC,kBAAmB,sBACnBC,iBAAkB,eAClBC,kBAAmB,IACnBC,WAAY,GACZC,SAAU,SACVC,YAAa,UACbC,UAAW,QACXC,UAAW,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IC,eAAA,SAAeuC,GACX,IAAMiC,EAAUjC,EAAQiC,QACxB,MAAO,CACH3E,MAAO2E,EAAQtL,KAAKe,QAAQgB,UAC5ByD,KAAM8F,EAAQtL,KAAKe,QAAQgB,SAAW,QACtC4C,KAAM2G,EAAQtL,KAAKe,QAAQgB,SAAW,QACtCiF,KAAMsE,EAAQtL,KAAKe,QAAQgB,SAAW,QACtCmF,IAAKoE,EAAQtL,KAAKe,QAAQgB,SAAW,OACrCqF,MAAOkE,EAAQtL,KAAKe,QAAQgB,SAAW,SACvCkE,MAAOqF,EAAQtL,KAAKe,QAAQgB,SAAW,WAMnD,EACIwJ,QAAA,WACIvL,KAAKiI,QAAQ,WACbjI,KAAKgB,KAAKsD,OAAOuE,OAAO7I,KAAKsE,QAC7BtE,KAAKoB,UAAUoK,oBAAoB,aAAcxL,KAAK8D,MAAMuB,YAC5DrF,KAAKoB,UAAUoK,oBAAoB,aAAcxL,KAAK8D,MAAMyB,YAC5DvF,KAAKoB,UAAUoK,oBAAoB,YAAaxL,KAAK8D,MAAM2B,WAC3DzF,KAAKoB,UAAUoK,oBAAoB,UAAWxL,KAAK8D,MAAM6B,SACzD3F,KAAKoB,UAAUoK,oBAAoB,YAAaxL,KAAK8D,MAAMgC,WAC3D9F,KAAKoB,UAAUoK,oBAAoB,YAAaxL,KAAK8D,MAAM+B,eAC3D7F,KAAKoB,UAAUoK,oBAAoB,YAAaxL,KAAK8D,MAAMwC,WAC3DtG,KAAKoB,UAAUoK,oBAAoB,WAAYxL,KAAK8D,MAAMyD,UACtDvH,KAAKmB,KACLnB,KAAKoB,UAAUqK,YAAYzL,KAAKmB,IAChCnB,KAAKmB,GAAK,KACVnB,KAAKmK,SAAW,KAChBnK,KAAKsK,WAAa,OAEzB,EApjBgBxJ,G","sources":["webpack://MouseFollower/webpack/universalModuleDefinition","webpack://MouseFollower/webpack/bootstrap","webpack://MouseFollower/webpack/runtime/define property getters","webpack://MouseFollower/webpack/runtime/hasOwnProperty shorthand","webpack://MouseFollower/./src/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MouseFollower\"] = factory();\n\telse\n\t\troot[\"MouseFollower\"] = factory();\n})(this, function() {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/*!\n * Cuberto Mouse Follower\n * https://cuberto.com/\n *\n * @version 1.0.4\n * @author Cuberto, Artem Dordzhiev (Draft)\n */\n\nexport default class MouseFollower {\n /**\n * Register GSAP animation library.\n *\n * @param {gsap} gsap GSAP library.\n */\n static registerGSAP(gsap) {\n MouseFollower.gsap = gsap;\n }\n\n /**\n * Create cursor instance.\n *\n * @param {object} [options] Cursor options.\n * @param {HTMLElement|null} options.el Existed cursor element.\n * @param {HTMLElement|null} options.container Cursor container.\n * @param {string} options.className Cursor root element class name.\n * @param {string} options.innerClassName Inner element class name.\n * @param {string} options.textClassName Text element class name.\n * @param {string} options.mediaClassName Media element class name.\n * @param {string} options.mediaBoxClassName Media inner element class name.\n * @param {string} options.iconSvgClassName SVG sprite class name.\n * @param {string} options.iconSvgNamePrefix SVG sprite icon class name prefix.\n * @param {string} options.iconSvgSrc SVG sprite source.\n * @param {string|null} options.dataAttr Name of data attribute for changing cursor state directly in HTML.\n * @param {string} options.hiddenState Hidden state name.\n * @param {string} options.textState Text state name.\n * @param {string} options.iconState Icon state name.\n * @param {string} options.activeState Active (mousedown) state name.\n * @param {string} options.mediaState Media (image/video) state name.\n * @param {object} options.stateDetection State detection rules.\n * @param {boolean} options.visible Is cursor visible by default.\n * @param {boolean} options.visibleOnState Automatically show/hide cursor when state added.\n * @param {number} options.speed Cursor movement speed.\n * @param {string} options.ease Timing function of cursor movement.\n * @param {boolean} options.overwrite Overwrite or remain cursor position when `mousemove` event happens.\n * @param {number} options.skewing Default skewing factor.\n * @param {number} options.skewingText Skewing effect factor in a text state.\n * @param {number} options.skewingIcon Skewing effect factor in a icon state.\n * @param {number} options.skewingMedia Skewing effect factor in a media (image/video) state.\n * @param {number} options.skewingDelta Skewing effect base delta.\n * @param {number} options.skewingDeltaMax Skew effect max delta.\n * @param {number} options.stickDelta Stick effect delta.\n * @param {number} options.showTimeout Delay before show.\n * @param {boolean} options.hideOnLeave Hide the cursor when mouse leave container.\n * @param {number} options.hideTimeout Delay before hiding. It should be equal to the CSS hide animation time.\n * @param {array} options.initialPos Array (x, y) of initial cursor position.\n */\n constructor(options) {\n this.gsap = MouseFollower.gsap || window.gsap;\n this.options = Object.assign({}, {\n el: null,\n container: document.body,\n className: 'mf-cursor',\n innerClassName: 'mf-cursor-inner',\n textClassName: 'mf-cursor-text',\n mediaClassName: 'mf-cursor-media',\n mediaBoxClassName: 'mf-cursor-media-box',\n iconSvgClassName: 'mf-svgsprite',\n iconSvgNamePrefix: '-',\n iconSvgSrc: '',\n dataAttr: 'cursor',\n hiddenState: '-hidden',\n textState: '-text',\n iconState: '-icon',\n activeState: '-active',\n mediaState: '-media',\n stateDetection: {\n '-pointer': 'a,button',\n },\n visible: true,\n visibleOnState: false,\n speed: 0.55,\n ease: 'expo.out',\n overwrite: true,\n skewing: 0,\n skewingText: 2,\n skewingIcon: 2,\n skewingMedia: 2,\n skewingDelta: 0.001,\n skewingDeltaMax: 0.15,\n stickDelta: 0.15,\n showTimeout: 20,\n hideOnLeave: true,\n hideTimeout: 300,\n hideMediaTimeout: 300,\n initialPos: [-window.innerWidth, -window.innerHeight],\n }, options);\n\n if (this.options.visible && !options.stateDetection) this.options.stateDetection['-hidden'] = 'iframe';\n\n this.el = typeof (this.options.el) === 'string' ?\n document.querySelector(this.options.el) : this.options.el;\n this.container = typeof (this.options.container) === 'string' ?\n document.querySelector(this.options.container) : this.options.container;\n this.skewing = this.options.skewing;\n this.pos = {x: this.options.initialPos[0], y: this.options.initialPos[1]};\n this.vel = {x: 0, y: 0};\n this.event = {};\n this.events = [];\n\n this.init();\n }\n\n /**\n * Init cursor.\n */\n init() {\n if (!this.el) this.create();\n this.createSetter();\n this.bind();\n this.render(true);\n this.ticker = this.render.bind(this, false);\n this.gsap.ticker.add(this.ticker);\n }\n\n /**\n * Create cursor DOM element and append to container.\n */\n create() {\n this.el = document.createElement('div');\n this.el.className = this.options.className;\n this.el.classList.add(this.options.hiddenState);\n\n this.inner = document.createElement('div');\n this.inner.className = this.options.innerClassName;\n\n this.text = document.createElement('div');\n this.text.className = this.options.textClassName;\n\n this.media = document.createElement('div');\n this.media.className = this.options.mediaClassName;\n\n this.mediaBox = document.createElement('div');\n this.mediaBox.className = this.options.mediaBoxClassName;\n\n this.media.appendChild(this.mediaBox);\n this.inner.appendChild(this.media);\n this.inner.appendChild(this.text);\n this.el.appendChild(this.inner);\n this.container.appendChild(this.el);\n }\n\n /**\n * Create GSAP setters.\n */\n createSetter() {\n this.setter = {\n x: this.gsap.quickSetter(this.el, 'x', 'px'),\n y: this.gsap.quickSetter(this.el, 'y', 'px'),\n rotation: this.gsap.quickSetter(this.el, 'rotation', 'deg'),\n scaleX: this.gsap.quickSetter(this.el, 'scaleX'),\n scaleY: this.gsap.quickSetter(this.el, 'scaleY'),\n wc: this.gsap.quickSetter(this.el, 'willChange'),\n inner: {\n rotation: this.gsap.quickSetter(this.inner, 'rotation', 'deg'),\n },\n };\n }\n\n /**\n * Create and attach events.\n */\n bind() {\n this.event.mouseleave = () => this.hide();\n this.event.mouseenter = () => this.show();\n this.event.mousedown = () => this.addState(this.options.activeState);\n this.event.mouseup = () => this.removeState(this.options.activeState);\n this.event.mousemoveOnce = () => this.show();\n this.event.mousemove = (e) => {\n this.gsap.to(this.pos, {\n x: this.stick ? this.stick.x - ((this.stick.x - e.clientX) * this.options.stickDelta) : e.clientX,\n y: this.stick ? this.stick.y - ((this.stick.y - e.clientY) * this.options.stickDelta) : e.clientY,\n overwrite: this.options.overwrite,\n ease: this.options.ease,\n duration: this.visible ? this.options.speed : 0,\n onUpdate: () => this.vel = {x: e.clientX - this.pos.x, y: e.clientY - this.pos.y},\n });\n };\n this.event.mouseover = (e) => {\n for (let target = e.target; target && target !== this.container; target = target.parentNode) {\n if (e.relatedTarget && target.contains(e.relatedTarget)) break;\n\n for (let state in this.options.stateDetection) {\n if (target.matches(this.options.stateDetection[state])) this.addState(state);\n }\n\n if (this.options.dataAttr) {\n const params = this.getFromDataset(target);\n if (params.state) this.addState(params.state);\n if (params.text) this.setText(params.text);\n if (params.icon) this.setIcon(params.icon);\n if (params.img) this.setImg(params.img);\n if (params.video) this.setVideo(params.video);\n if (typeof (params.show) !== 'undefined') this.show();\n if (typeof (params.stick) !== 'undefined') this.setStick(params.stick || target);\n }\n }\n };\n this.event.mouseout = (e) => {\n for (let target = e.target; target && target !== this.container; target = target.parentNode) {\n if (e.relatedTarget && target.contains(e.relatedTarget)) break;\n\n for (let state in this.options.stateDetection) {\n if (target.matches(this.options.stateDetection[state])) this.removeState(state);\n }\n\n if (this.options.dataAttr) {\n const params = this.getFromDataset(target);\n if (params.state) this.removeState(params.state);\n if (params.text) this.removeText();\n if (params.icon) this.removeIcon();\n if (params.img) this.removeImg();\n if (params.video) this.removeVideo();\n if (typeof (params.show) !== 'undefined') this.hide();\n if (typeof (params.stick) !== 'undefined') this.removeStick();\n }\n }\n };\n\n if (this.options.hideOnLeave) {\n this.container.addEventListener('mouseleave', this.event.mouseleave, {passive: true});\n }\n if (this.options.visible) {\n this.container.addEventListener('mouseenter', this.event.mouseenter, {passive: true});\n }\n this.container.addEventListener('mousedown', this.event.mousedown, {passive: true});\n this.container.addEventListener('mouseup', this.event.mouseup, {passive: true});\n this.container.addEventListener('mousemove', this.event.mousemove, {passive: true});\n if (this.options.visible) {\n this.container.addEventListener('mousemove', this.event.mousemoveOnce, {\n passive: true,\n once: true,\n });\n }\n if (this.options.stateDetection || this.options.dataAttr) {\n this.container.addEventListener('mouseover', this.event.mouseover, {passive: true});\n this.container.addEventListener('mouseout', this.event.mouseout, {passive: true});\n }\n }\n\n /**\n * Render the cursor in a new position.\n *\n * @param {boolean} [force=false] Force render.\n */\n render(force) {\n if (force !== true && (this.vel.y === 0 || this.vel.x === 0)) {\n this.setter.wc('auto');\n return;\n }\n\n this.trigger('render');\n this.setter.wc('transform');\n this.setter.x(this.pos.x);\n this.setter.y(this.pos.y);\n\n if (this.skewing) {\n const distance = Math.sqrt(Math.pow(this.vel.x, 2) + Math.pow(this.vel.y, 2));\n const scale = Math.min(distance * this.options.skewingDelta,\n this.options.skewingDeltaMax) * this.skewing;\n const angle = Math.atan2(this.vel.y, this.vel.x) * 180 / Math.PI;\n\n this.setter.rotation(angle);\n this.setter.scaleX(1 + scale);\n this.setter.scaleY(1 - scale);\n this.setter.inner.rotation(-angle);\n }\n }\n\n /**\n * Show cursor.\n */\n show() {\n this.trigger('show');\n clearInterval(this.visibleInt);\n this.el.classList.remove(this.options.hiddenState);\n this.visibleInt = setTimeout(() => this.visible = true, this.options.showTimeout);\n }\n\n /**\n * Hide cursor.\n */\n hide() {\n this.trigger('hide');\n clearInterval(this.visibleInt);\n this.el.classList.add(this.options.hiddenState);\n this.visibleInt = setTimeout(() => this.visible = false, this.options.hideTimeout);\n }\n\n /**\n * Toggle cursor.\n *\n * @param {boolean} [force] Force state.\n */\n toggle(force) {\n if (force === true || force !== false && !this.visible) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n /**\n * Add state/states to the cursor.\n *\n * @param {string} state State name.\n */\n addState(state) {\n this.trigger('addState', state);\n if (state === this.options.hiddenState) return this.hide();\n this.el.classList.add(...state.split(' '));\n if (this.options.visibleOnState) this.show();\n }\n\n /**\n * Remove state/states from cursor.\n *\n * @param {string} state State name.\n */\n removeState(state) {\n this.trigger('removeState', state);\n if (state === this.options.hiddenState) return this.show();\n this.el.classList.remove(...state.split(' '));\n if (this.options.visibleOnState && this.el.className === this.options.className) this.hide();\n }\n\n /**\n * Toggle cursor state.\n *\n * @param {string} state State name.\n * @param {boolean} [force] Force state.\n */\n toggleState(state, force) {\n if (force === true || force !== false && !this.el.classList.contains(state)) {\n this.addState(state);\n } else {\n this.removeState(state);\n }\n }\n\n /**\n * Set factor of skewing effect.\n *\n * @param {number} value Skewing factor.\n */\n setSkewing(value) {\n this.gsap.to(this, {skewing: value});\n }\n\n /**\n * Reverts skewing factor to default.\n */\n removeSkewing() {\n this.gsap.to(this, {skewing: this.options.skewing});\n }\n\n /**\n * Stick cursor to the element.\n *\n * @param {string|HTMLElement} element Element or selector.\n */\n setStick(element) {\n const el = typeof (element) === 'string' ? document.querySelector(element) : element;\n const rect = el.getBoundingClientRect();\n this.stick = {\n y: rect.top + (rect.height / 2),\n x: rect.left + (rect.height / 2),\n };\n }\n\n /**\n * Unstick cursor from the element.\n */\n removeStick() {\n this.stick = false;\n }\n\n /**\n * Transform cursor to text mode with a given string.\n *\n * @param {string} text Text.\n */\n setText(text) {\n this.text.innerHTML = text;\n this.addState(this.options.textState);\n this.setSkewing(this.options.skewingText);\n }\n\n /**\n * Reverts cursor from text mode.\n */\n removeText() {\n this.removeState(this.options.textState);\n this.removeSkewing();\n }\n\n /**\n * Transform cursor to svg icon mode.\n *\n * @param {string} name Icon identifier.\n * @param {string} [style=\"\"] Additional SVG styles.\n */\n setIcon(name, style = '') {\n this.text.innerHTML = ``;\n this.addState(this.options.iconState);\n this.setSkewing(this.options.skewingIcon);\n }\n\n /**\n * Reverts cursor from icon mode.\n */\n removeIcon() {\n this.removeState(this.options.iconState);\n this.removeSkewing();\n }\n\n /**\n * Transform cursor to media mode with a given element.\n *\n * @param {HTMLElement} element Element.\n */\n setMedia(element) {\n clearTimeout(this.mediaInt);\n if (element) {\n this.mediaBox.innerHTML = '';\n this.mediaBox.appendChild(element);\n }\n this.mediaInt = setTimeout(() => this.addState(this.options.mediaState), 20);\n this.setSkewing(this.options.skewingMedia);\n }\n\n /**\n * Revert cursor from media mode.\n */\n removeMedia() {\n clearTimeout(this.mediaInt);\n this.removeState(this.options.mediaState);\n this.mediaInt = setTimeout(() => this.mediaBox.innerHTML = '', this.options.hideMediaTimeout);\n this.removeSkewing();\n }\n\n /**\n * Transform cursor to image mode.\n *\n * @param {string} url Image url.\n */\n setImg(url) {\n if (!this.mediaImg) this.mediaImg = new Image();\n if (this.mediaImg.src !== url) this.mediaImg.src = url;\n this.setMedia(this.mediaImg);\n }\n\n /**\n * Reverts cursor from image mode.\n */\n removeImg() {\n this.removeMedia();\n }\n\n /**\n * Transform cursor to video mode.\n *\n * @param {string} url Video url.\n */\n setVideo(url) {\n if (!this.mediaVideo) {\n this.mediaVideo = document.createElement('video');\n this.mediaVideo.muted = true;\n this.mediaVideo.loop = true;\n this.mediaVideo.autoplay = true;\n }\n if (this.mediaVideo.src !== url) {\n this.mediaVideo.src = url;\n this.mediaVideo.load();\n }\n this.mediaVideo.play();\n this.setMedia(this.mediaVideo);\n }\n\n /**\n * Reverts cursor from video mode.\n */\n removeVideo() {\n if (this.mediaVideo && this.mediaVideo.readyState > 2) this.mediaVideo.pause();\n this.removeMedia();\n }\n\n /**\n * Attach an event handler function.\n *\n * @param {string} event Event name.\n * @param {function} callback Callback.\n */\n on(event, callback) {\n if (!(this.events[event] instanceof Array)) this.off(event);\n this.events[event].push(callback);\n }\n\n /**\n * Remove an event handler.\n *\n * @param {string} event Event name.\n * @param {function} [callback] Callback.\n */\n off(event, callback) {\n if (callback) {\n this.events[event] = this.events[event].filter((f) => f !== callback);\n } else {\n this.events[event] = [];\n }\n }\n\n /**\n * Execute all handlers for the given event type.\n *\n * @param {string} event Event name.\n * @param params Extra parameters.\n */\n trigger(event, ...params) {\n if (!this.events[event]) return;\n this.events[event].forEach((f) => f.call(this, this, ...params));\n }\n\n /**\n * Get cursor options from data attribute of a given element.\n *\n * @param {HTMLElement} element Element.\n * @return {object} Options.\n */\n getFromDataset(element) {\n const dataset = element.dataset;\n return {\n state: dataset[this.options.dataAttr],\n show: dataset[this.options.dataAttr + 'Show'],\n text: dataset[this.options.dataAttr + 'Text'],\n icon: dataset[this.options.dataAttr + 'Icon'],\n img: dataset[this.options.dataAttr + 'Img'],\n video: dataset[this.options.dataAttr + 'Video'],\n stick: dataset[this.options.dataAttr + 'Stick'],\n };\n }\n\n /**\n * Destroy cursor instance.\n */\n destroy() {\n this.trigger('destroy');\n this.gsap.ticker.remove(this.ticker);\n this.container.removeEventListener('mouseleave', this.event.mouseleave);\n this.container.removeEventListener('mouseenter', this.event.mouseenter);\n this.container.removeEventListener('mousedown', this.event.mousedown);\n this.container.removeEventListener('mouseup', this.event.mouseup);\n this.container.removeEventListener('mousemove', this.event.mousemove);\n this.container.removeEventListener('mousemove', this.event.mousemoveOnce);\n this.container.removeEventListener('mouseover', this.event.mouseover);\n this.container.removeEventListener('mouseout', this.event.mouseout);\n if (this.el) {\n this.container.removeChild(this.el);\n this.el = null;\n this.mediaImg = null;\n this.mediaVideo = null;\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","MouseFollower","options","gsap","window","assign","el","container","document","body","className","innerClassName","textClassName","mediaClassName","mediaBoxClassName","iconSvgClassName","iconSvgNamePrefix","iconSvgSrc","dataAttr","hiddenState","textState","iconState","activeState","mediaState","stateDetection","visible","visibleOnState","speed","ease","overwrite","skewing","skewingText","skewingIcon","skewingMedia","skewingDelta","skewingDeltaMax","stickDelta","showTimeout","hideOnLeave","hideTimeout","hideMediaTimeout","initialPos","innerWidth","innerHeight","querySelector","pos","x","y","vel","event","events","init","registerGSAP","create","createSetter","bind","render","ticker","add","createElement","classList","inner","text","media","mediaBox","appendChild","setter","quickSetter","rotation","scaleX","scaleY","wc","mouseleave","hide","mouseenter","show","mousedown","addState","mouseup","removeState","mousemoveOnce","mousemove","e","to","stick","clientX","clientY","duration","onUpdate","mouseover","target","relatedTarget","contains","parentNode","state","matches","params","getFromDataset","setText","icon","setIcon","img","setImg","video","setVideo","setStick","mouseout","removeText","removeIcon","removeImg","removeVideo","removeStick","addEventListener","passive","once","force","trigger","distance","Math","sqrt","pow","scale","min","angle","atan2","PI","clearInterval","visibleInt","remove","setTimeout","toggle","split","toggleState","setSkewing","value","removeSkewing","element","rect","getBoundingClientRect","top","height","left","innerHTML","name","style","setMedia","clearTimeout","mediaInt","removeMedia","url","mediaImg","Image","src","mediaVideo","muted","loop","autoplay","load","play","readyState","pause","on","callback","Array","off","push","filter","f","forEach","dataset","destroy","removeEventListener","removeChild"],"sourceRoot":""}
\ No newline at end of file
diff --git a/package.json b/package.json
index 1a98940..b696706 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "mouse-follower",
- "version": "1.0.3",
+ "version": "1.0.4",
"description": "A powerful javascript library to create amazing and smooth effects for the mouse cursor on your website.",
"license": "MIT",
"main": "dist/mouse-follower.js",
diff --git a/src/index.js b/src/index.js
index f60ca57..ce2e750 100644
--- a/src/index.js
+++ b/src/index.js
@@ -2,7 +2,7 @@
* Cuberto Mouse Follower
* https://cuberto.com/
*
- * @version 1.0.3
+ * @version 1.0.4
* @author Cuberto, Artem Dordzhiev (Draft)
*/