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R,MAAQ,EACR,MAAQ,MAER,EAAS,KAAK,YAAY,EAC1B,CAfA,CAAY,EACZ,EArBA,GAiDC,CAjED,CAiEG,OAAO","file":"/gh/lovelyemperor/test1.2.7@1.2.7/src/script/heart.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /gh/lovelyemperor/test1.2.7@1.2.7/src/script/heart.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function(window,document,undefined){\nvar hearts = [];\nwindow.requestAnimationFrame = (function(){\nreturn window.requestAnimationFrame ||\nwindow.webkitRequestAnimationFrame ||\nwindow.mozRequestAnimationFrame ||\nwindow.oRequestAnimationFrame ||\nwindow.msRequestAnimationFrame ||\nfunction (callback){\nsetTimeout(callback,1000/60);\n}\n})();\ninit();\nfunction init(){\ncss(\".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: absolute;}.heart:after{top: -5px;}.heart:before{left: -5px;}\");\nattachEvent();\ngameloop();\n}\nfunction gameloop(){\nfor(var i=0;i<hearts.length;i++){\nif(hearts[i].alpha <=0){\ndocument.body.removeChild(hearts[i].el);\nhearts.splice(i,1);\ncontinue;\n}\nhearts[i].y--;\nhearts[i].scale += 0.004;\nhearts[i].alpha -= 0.013;\nhearts[i].el.style.cssText = \"left:\"+hearts[i].x+\"px;top:\"+hearts[i].y+\"px;opacity:\"+hearts[i].alpha+\";transform:scale(\"+hearts[i].scale+\",\"+hearts[i].scale+\") rotate(45deg);background:\"+hearts[i].color;\n}\nrequestAnimationFrame(gameloop);\n}\nfunction attachEvent(){\nvar old = typeof window.onclick===\"function\" && window.onclick;\nwindow.onclick = function(event){\nold && old();\ncreateHeart(event);\n}\n}\nfunction createHeart(event){\nvar d = document.createElement(\"div\");\nd.className = \"heart\";\nhearts.push({\nel : d,\nx : event.clientX - 5,\ny : event.clientY - 5,\nscale : 1,\nalpha : 1,\ncolor : randomColor()\n});\ndocument.body.appendChild(d);\n}\nfunction css(css){\nvar style = document.createElement(\"style\");\nstyle.type=\"text/css\";\ntry{\nstyle.appendChild(document.createTextNode(css));\n}catch(ex){\nstyle.styleSheet.cssText = css;\n}\ndocument.getElementsByTagName('head')[0].appendChild(style);\n}\nfunction randomColor(){\nreturn \"rgb(\"+(~~(Math.random()*255))+\",\"+(~~(Math.random()*255))+\",\"+(~~(Math.random()*255))+\")\";\n}\n})(window,document);"]}