1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2488],{72488:(t,e,i)=>{function n(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function s(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),t}function a(t){return+t.replace(/px/,"")}function r(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.floor((Math.random()*(e-t)+t)*Math.pow(10,i))/Math.pow(10,i)}function h(t){return t[r(0,t.length)]}i.r(e),i.d(e,{default:()=>f});var c=["#fcf403","#62fc03","#f4fc03","#03e7fc","#03fca5","#a503fc","#fc03ad","#fc03c2"];function u(t){return Math.log(t)/Math.log(1920)}var l=function(){function t(e){n(this,t);var i=e.initialPosition,s=e.direction,o=e.confettiRadius,a=e.confettiColors,c=e.emojis,l=e.emojiSize,d=e.canvasWidth,f=r(.9,1.7,3)*u(d);this.confettiSpeed={x:f,y:f},this.finalConfettiSpeedX=r(.2,.6,3),this.rotationSpeed=c.length?.01:r(.03,.07,3)*u(d),this.dragForceCoefficient=r(5e-4,9e-4,6),this.radius={x:o,y:o},this.initialRadius=o,this.rotationAngle="left"===s?r(0,.2,3):r(-.2,0,3),this.emojiSize=l,this.emojiRotationAngle=r(0,2*Math.PI),this.radiusYUpdateDirection="down";var m="left"===s?r(82,15)*Math.PI/180:r(-15,-82)*Math.PI/180;this.absCos=Math.abs(Math.cos(m)),this.absSin=Math.abs(Math.sin(m));var p=r(-150,0),v={x:i.x+("left"===s?-p:p)*this.absCos,y:i.y-p*this.absSin};this.currentPosition=Object.assign({},v),this.initialPosition=Object.assign({},v),this.color=c.length?null:h(a),this.emoji=c.length?h(c):null,this.createdAt=new Date().getTime(),this.direction=s}return o(t,[{key:"draw",value:function(t){var e=this.currentPosition,i=this.radius,n=this.color,s=this.emoji,o=this.rotationAngle,a=this.emojiRotationAngle,r=this.emojiSize,h=window.devicePixelRatio;n?(t.fillStyle=n,t.beginPath(),t.ellipse(e.x*h,e.y*h,i.x*h,i.y*h,o,0,2*Math.PI),t.fill()):s&&(t.font="".concat(r,"px serif"),t.save(),t.translate(h*e.x,h*e.y),t.rotate(a),t.textAlign="center",t.fillText(s,0,0),t.restore())}},{key:"updatePosition",value:function(t,e){var i=this.confettiSpeed,n=this.dragForceCoefficient,s=this.finalConfettiSpeedX,o=this.radiusYUpdateDirection,a=this.rotationSpeed,r=this.createdAt,h=this.direction,c=e-r;if(i.x>s&&(this.confettiSpeed.x-=n*t),this.currentPosition.x+=i.x*("left"===h?-this.absCos:this.absCos)*t,this.currentPosition.y=this.initialPosition.y-i.y*this.absSin*c+.00125*Math.pow(c,2)/2,this.rotationSpeed-=this.emoji?1e-4:1e-5*t,this.rotationSpeed<0&&(this.rotationSpeed=0),this.emoji){this.emojiRotationAngle+=this.rotationSpeed*t%(2*Math.PI);return}"down"===o?(this.radius.y-=t*a,this.radius.y<=0&&(this.radius.y=0,this.radiusYUpdateDirection="up")):(this.radius.y+=t*a,this.radius.y>=this.initialRadius&&(this.radius.y=this.initialRadius,this.radiusYUpdateDirection="down"))}},{key:"getIsVisibleOnCanvas",value:function(t){return this.currentPosition.y<t+100}}]),t}(),d=function(){function t(e){var i=this;n(this,t),this.canvasContext=e,this.shapes=[],this.promise=new Promise(function(t){return i.resolvePromise=t})}return o(t,[{key:"getBatchCompletePromise",value:function(){return this.promise}},{key:"addShapes",value:function(){var t;(t=this.shapes).push.apply(t,arguments)}},{key:"complete",value:function(){var t;return!this.shapes.length&&(null==(t=this.resolvePromise)||t.call(this),!0)}},{key:"processShapes",value:function(t,e,i){var n=this,s=t.timeDelta,o=t.currentTime;this.shapes=this.shapes.filter(function(t){return t.updatePosition(s,o),t.draw(n.canvasContext),!i||t.getIsVisibleOnCanvas(e)})}}]),t}();let f=function(){function t(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.activeConfettiBatches=[],this.canvas=i.canvas||((e=document.createElement("canvas")).style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.top="0",e.style.left="0",e.style.zIndex="1000",e.style.pointerEvents="none",document.body.appendChild(e),e),this.canvasContext=this.canvas.getContext("2d"),this.requestAnimationFrameRequested=!1,this.lastUpdated=new Date().getTime(),this.iterationIndex=0,this.loop=this.loop.bind(this),requestAnimationFrame(this.loop)}return o(t,[{key:"loop",value:function(){this.requestAnimationFrameRequested=!1,t=this.canvas,e=window.devicePixelRatio,n=a((i=getComputedStyle(t)).getPropertyValue("width")),s=a(i.getPropertyValue("height")),t.setAttribute("width",(n*e).toString()),t.setAttribute("height",(s*e).toString());var t,e,i,n,s,o=new Date().getTime(),r=o-this.lastUpdated,h=this.canvas.offsetHeight,c=this.iterationIndex%10==0;this.activeConfettiBatches=this.activeConfettiBatches.filter(function(t){return t.processShapes({timeDelta:r,currentTime:o},h,c),!c||!t.complete()}),this.iterationIndex++,this.queueAnimationFrameIfNeeded(o)}},{key:"queueAnimationFrameIfNeeded",value:function(t){this.requestAnimationFrameRequested||this.activeConfettiBatches.length<1||(this.requestAnimationFrameRequested=!0,this.lastUpdated=t||new Date().getTime(),requestAnimationFrame(this.loop))}},{key:"addConfetti",value:function(){for(var t,e,i,n,s,o,a,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=(t=r.confettiRadius,i=void 0===(e=r.confettiNumber)?r.confettiesNumber||(r.emojis?40:250):e,n=r.confettiColors,o=void 0===(s=r.emojis)?r.emojies||[]:s,a=r.emojiSize,r.emojies&&console.error("emojies argument is deprecated, please use emojis instead"),r.confettiesNumber&&console.error("confettiesNumber argument is deprecated, please use confettiNumber instead"),{confettiRadius:void 0===t?6:t,confettiNumber:i,confettiColors:void 0===n?c:n,emojis:o,emojiSize:void 0===a?80:a}),u=h.confettiRadius,f=h.confettiNumber,m=h.confettiColors,p=h.emojis,v=h.emojiSize,y=this.canvas.getBoundingClientRect(),g=y.width,C=5*y.height/7,b={x:0,y:C},S={x:g,y:C},j=new d(this.canvasContext),x=0;x<f/2;x++){var w=new l({initialPosition:b,direction:"right",confettiRadius:u,confettiColors:m,confettiNumber:f,emojis:p,emojiSize:v,canvasWidth:g}),P=new l({initialPosition:S,direction:"left",confettiRadius:u,confettiColors:m,confettiNumber:f,emojis:p,emojiSize:v,canvasWidth:g});j.addShapes(w,P)}return this.activeConfettiBatches.push(j),this.queueAnimationFrameIfNeeded(),j.getBatchCompletePromise()}},{key:"clearCanvas",value:function(){this.activeConfettiBatches=[]}},{key:"destroyCanvas",value:function(){this.canvas.remove()}}]),t}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.