(()=>{const n=document.querySelector(".fireworks");if(!n)return;const e="false"===n.getAttribute("mobile"),t=/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent);if(e&&t)return;(()=>{var n,e;n=this,e=function(){"use strict";var n={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},e={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},t=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],r={CSS:{},springs:{}};function a(n,e,t){return Math.min(Math.max(n,e),t)}function o(n,e){return-1{const{innerWidth:e,innerHeight:t}=window;n.width=e,n.height=t,n.style.width=`${e}px`,n.style.height=`${t}px`,r.scale(1,1)}),500),s=anime({duration:1/0,update:()=>{r.clearRect(0,0,n.width,n.height)}}),c="ontouchstart"in window||navigator.maxTouchPoints?"touchstart":"mousedown";document.addEventListener(c,(n=>{["sidebar","toggle-sidebar"].includes(n.target.id)||["A","IMG"].includes(n.target.nodeName)||(s.play(),l(n),h(o,i))}),!1),u(),window.addEventListener("resize",u,!1);const l=e=>{const t=n.getBoundingClientRect();o=(e.clientX||e.touches[0].clientX)-t.left,i=(e.clientY||e.touches[0].clientY)-t.top},d=n=>{const e=anime.random(0,360)*Math.PI/180,t=anime.random(50,180),r=[-1,1][anime.random(0,1)]*t;return{x:n.x+r*Math.cos(e),y:n.y+r*Math.sin(e)}},f=n=>{n.animatables.forEach((n=>n.target.draw()))},h=(n,e)=>{const t=((n,e)=>{const t={x:n,y:e,color:"#F00",radius:.1,alpha:.5,lineWidth:6,draw:()=>{r.globalAlpha=t.alpha,r.beginPath(),r.arc(t.x,t.y,t.radius,0,2*Math.PI,!0),r.lineWidth=t.lineWidth,r.strokeStyle=t.color,r.stroke(),r.globalAlpha=1}};return t})(n,e),o=Array.from({length:30},(()=>((n,e)=>{const t={x:n,y:e,color:a[anime.random(0,a.length-1)],radius:anime.random(16,32),endPos:d({x:n,y:e}),draw:()=>{r.beginPath(),r.arc(t.x,t.y,t.radius,0,2*Math.PI,!0),r.fillStyle=t.color,r.fill()}};return t})(n,e)));anime.timeline().add({targets:o,x:n=>n.endPos.x,y:n=>n.endPos.y,radius:.1,duration:anime.random(1200,1800),easing:"easeOutExpo",update:f}).add({targets:t,radius:anime.random(80,160),lineWidth:0,alpha:{value:0,easing:"linear",duration:anime.random(600,800)},duration:anime.random(1200,1800),easing:"easeOutExpo",update:f},0)}})();