(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{480:function(t,e,i){"use strict";i.r(e),i.d(e,"DefaultOptions",(function(){return a})),i.d(e,"default",(function(){return c}));var n=i(13),s=i.n(n);function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function o(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:3e3;if(!t)return;e.context=t.getContext("2d"),e.particles=[];const n=e.options.maxCount;for(;e.particles.length{this.isRunning=!1})),s()(this,"resetParticle",((t,e,i)=>(t.color=this.colors[Math.random()*this.colors.length|0]+(this.options.alpha+")"),this.options.gradient?t.color2=this.colors[Math.random()*this.colors.length|0]+(this.options.alpha+")"):t.color2=t.color,t.x=Math.random()*e,t.y=Math.random()*-i,t.diameter=10*Math.random()+5,t.tilt=-10*Math.random(),t.tiltAngleIncrement=.07*Math.random()+.05,t.tiltAngle=Math.random()*Math.PI,t))),s()(this,"runAnimation",(()=>{if(this.context&&this.context.canvas)if(0===this.particles.length)this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height);else{const t=Date.now(),e=t-this.lastFrameTime;(!this.supportsAnimationFrame||e>this.options.frameInterval)&&(this.context.clearRect(0,0,this.context.canvas.width,this.context.canvas.height),this.updateParticles(),this.drawParticles(this.context),this.lastFrameTime=t-e%this.options.frameInterval),requestAnimationFrame(this.runAnimation)}})),s()(this,"drawParticles",(t=>{if(!this.context||!this.context.canvas)return;let e,i,n;for(const s of this.particles){if(this.context.beginPath(),t.lineWidth=s.diameter,i=s.x+s.tilt,e=i+s.diameter/2,n=s.y+s.tilt+s.diameter/2,this.options.gradient){const r=t.createLinearGradient(e,s.y,i,n);r.addColorStop(0,s.color),r.addColorStop(1,s.color2),t.strokeStyle=r}else t.strokeStyle=s.color;t.moveTo(e,s.y),t.lineTo(i,n),t.stroke()}})),s()(this,"updateParticles",(()=>{if(!this.context||!this.context.canvas)return;const t=this.context.canvas.width,e=this.context.canvas.height;let i;this.waveAngle+=.01;for(let n=0;nt+20||i.x<-20||i.y>e)&&(this.isRunning&&this.particles.length<=this.options.maxCount?this.resetParticle(i,t,e):(this.particles.splice(n,1),n--))})),this.options=o(o({},a),t)}}}}]); //# sourceMappingURL=1.js.map