PageSourceSearch

https://algokids.vercel.app/_next/static/chunks/887-dd162cdd2598f3d1.js

js algokids.vercel.app collected 2026-10-03 06:14:49 UTC 9,475 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[887],{4454:t=>{var e={linear:function(t,e,i,n){return(i-e)*t/n+e},easeInQuad:function(t,e,i,n){return(i-e)*(t/=n)*t+e},easeOutQuad:function(t,e,i,n){return-(i-e)*(t/=n)*(t-2)+e},easeInOutQuad:function(t,e,i,n){var s=i-e;return(t/=n/2)<1?s/2*t*t+e:-s/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,i,n){return(i-e)*(t/=n)*t*t+e},easeOutCubic:function(t,e,i,n){return(i-e)*((t=t/n-1)*t*t+1)+e},easeInOutCubic:function(t,e,i,n){var s=i-e;return(t/=n/2)<1?s/2*t*t*t+e:s/2*((t-=2)*t*t+2)+e},easeInQuart:function(t,e,i,n){return(i-e)*(t/=n)*t*t*t+e},easeOutQuart:function(t,e,i,n){return-(i-e)*((t=t/n-1)*t*t*t-1)+e},easeInOutQuart:function(t,e,i,n){var s=i-e;return(t/=n/2)<1?s/2*t*t*t*t+e:-s/2*((t-=2)*t*t*t-2)+e},easeInQuint:function(t,e,i,n){return(i-e)*(t/=n)*t*t*t*t+e},easeOutQuint:function(t,e,i,n){return(i-e)*((t=t/n-1)*t*t*t*t+1)+e},easeInOutQuint:function(t,e,i,n){var s=i-e;return(t/=n/2)<1?s/2*t*t*t*t*t+e:s/2*((t-=2)*t*t*t*t+2)+e},easeInSine:function(t,e,i,n){var s=i-e;return-s*Math.cos(t/n*(Math.PI/2))+s+e},easeOutSine:function(t,e,i,n){return(i-e)*Math.sin(t/n*(Math.PI/2))+e},easeInOutSine:function(t,e,i,n){return-(i-e)/2*(Math.cos(Math.PI*t/n)-1)+e},easeInExpo:function(t,e,i,n){return 0==t?e:(i-e)*Math.pow(2,10*(t/n-1))+e},easeOutExpo:function(t,e,i,n){var s=i-e;return t==n?e+s:s*(-Math.pow(2,-10*t/n)+1)+e},easeInOutExpo:function(t,e,i,n){var s=i-e;return 0===t?e:t===n?e+s:(t/=n/2)<1?s/2*Math.pow(2,10*(t-1))+e:s/2*(-Math.pow(2,-10*--t)+2)+e},easeInCirc:function(t,e,i,n){return-(i-e)*(Math.sqrt(1-(t/=n)*t)-1)+e},easeOutCirc:function(t,e,i,n){return(i-e)*Math.sqrt(1-(t=t/n-1)*t)+e},easeInOutCirc:function(t,e,i,n){var s=i-e;return(t/=n/2)<1?-s/2*(Math.sqrt(1-t*t)-1)+e:s/2*(Math.sqrt(1-(t-=2)*t)+1)+e},easeInElastic:function(t,e,i,n){var s,a,r,o=i-e;return(r=1.70158,a=0,s=o,0===t)?e:1==(t/=n)?e+o:(a||(a=.3*n),s<Math.abs(o)?(s=o,r=a/4):r=a/(2*Math.PI)*Math.asin(o/s),-(s*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t*n-r)/a))+e)},easeOutElastic:function(t,e,i,n){var s,a,r,o=i-e;return(r=1.70158,a=0,s=o,0===t)?e:1==(t/=n)?e+o:(a||(a=.3*n),s<Math.abs(o)?(s=o,r=a/4):r=a/(2*Math.PI)*Math.asin(o/s),s*Math.pow(2,-10*t)*Math.sin(2*Math.PI*(t*n-r)/a)+o+e)},easeInOutElastic:function(t,e,i,n){var s,a,r,o=i-e;return(r=1.70158,a=0,s=o,0===t)?e:2==(t/=n/2)?e+o:(a||(a=.3*1.5*n),s<Math.abs(o)?(s=o,r=a/4):r=a/(2*Math.PI)*Math.asin(o/s),t<1)?-.5*(s*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t*n-r)/a))+e:s*Math.pow(2,-10*(t-=1))*Math.sin(2*Math.PI*(t*n-r)/a)*.5+o+e},easeInBack:function(t,e,i,n,s){return void 0===s&&(s=1.70158),(i-e)*(t/=n)*t*((s+1)*t-s)+e},easeOutBack:function(t,e,i,n,s){return void 0===s&&(s=1.70158),(i-e)*((t=t/n-1)*t*((s+1)*t+s)+1)+e},easeInOutBack:function(t,e,i,n,s){var a=i-e;return(void 0===s&&(s=1.70158),(t/=n/2)<1)?a/2*(t*t*(((s*=1.525)+1)*t-s))+e:a/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+e},easeInBounce:function(t,i,n,s){var a,r=n-i;return a=e.easeOutBounce(s-t,0,r,s),r-a+i},easeOutBounce:function(t,e,i,n){var s=i-e;return(t/=n)<1/2.75?7.5625*t*t*s+e:t<2/2.75?s*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?s*(7.5625*(t-=2.25/2.75)*t+.9375)+e:s*(7.5625*(t-=2.625/2.75)*t+.984375)+e},easeInOutBounce:function(t,i,n,s){var a=n-i;return t<s/2?.5*e.easeInBounce(2*t,0,a,s)+i:.5*e.easeOutBounce(2*t-s,0,a,s)+.5*a+i}};t.exports=e},2887:(t,e,i)=>{i.d(e,{A:()=>g});var n,s,a=i(5155),r=i(2115),o=i(4454);function h(t,e){return t+Math.random()*(e-t)}!function(t){t[t.Circle=0]="Circle",t[t.Square=1]="Square",t[t.Strip=2]="Strip"}(n||(n={})),function(t){t[t.Positive=1]="Positive",t[t.Negative=-1]="Negative"}(s||(s={}));class c{constructor(t,e,i,n){this.getOptions=e;let{colors:a,initialVelocityX:r,initialVelocityY:o}=this.getOptions();this.context=t,this.x=i,this.y=n,this.w=h(5,20),this.h=h(5,20),this.radius=h(5,10),this.vx="number"==typeof r?h(-r,r):h(r.min,r.max),this.vy="number"==typeof o?h(-o,0):h(o.min,o.max),this.shape=Math.floor(0+3*Math.random()),this.angle=h(0,360)*Math.PI/180,this.angularSpin=h(-.2,.2),this.color=a[Math.floor(Math.random()*a.length)],this.rotateY=h(0,1),this.rotationDirection=h(0,1)?s.Positive:s.Negative}update(){let{gravity:t,wind:e,friction:i,opacity:a,drawShape:r}=this.getOptions();this.x+=this.vx,this.y+=this.vy,this.vy+=t,this.vx+=e,this.vx*=i,this.vy*=i,this.rotateY>=1&&this.rotationDirection===s.Positive?this.rotationDirection=s.Negative:this.rotateY<=-1&&this.rotationDirection===s.Negative&&(this.rotationDirection=s.Positive);let o=.1*this.rotationDirection;if(this.rotateY+=o,this.angle+=this.angularSpin,this.context.save(),this.context.translate(this.x,this.y),this.context.rotate(this.angle),this.context.scale(1,this.rotateY),this.context.rotate(this.angle),this.context.beginPath(),this.context.fillStyle=this.color,this.context.strokeStyle=this.color,this.context.globalAlpha=a,this.context.lineCap="round",this.context.lineWidth=2,r&&"function"==typeof r)r.call(this,this.context);else switch(this.shape){case n.Circle:this.context.beginPath(),this.context.arc(0,0,this.radius,0,2*Math.PI),this.context.fill();break;case n.Square:this.context.fillRect(-this.w/2,-this.h/2,this.w,this.h);break;case n.Strip:this.context.fillRect(-this.w/6,-this.h/2,this.w/3,this.h)}
1this.context.closePath(),this.context.restore()}}class u{constructor(t,e){this.x=0,this.y=0,this.w=0,this.h=0,this.lastNumberOfPieces=0,this.tweenInitTime=Date.now(),this.particles=[],this.particlesGenerated=0,this.removeParticleAt=t=>{this.particles.splice(t,1)},this.getParticle=()=>{let t=h(this.x,this.w+this.x),e=h(this.y,this.h+this.y);return new c(this.context,this.getOptions,t,e)},this.animate=()=>{let{canvas:t,context:e,particlesGenerated:i,lastNumberOfPieces:n}=this,{run:s,recycle:a,numberOfPieces:r,debug:o,tweenFunction:h,tweenDuration:c}=this.getOptions();if(!s)return!1;let u=this.particles.length,l=a?u:i,f=Date.now();if(l<r){n!==r&&(this.tweenInitTime=f,this.lastNumberOfPieces=r);let{tweenInitTime:t}=this,e=Math.round(h(f-t>c?c:Math.max(0,f-t),l,r,c)-l);for(let t=0;t<e;t++)this.particles.push(this.getParticle());this.particlesGenerated+=e}return o&&(e.font="12px sans-serif",e.fillStyle="#333",e.textAlign="right",e.fillText(`Particles: ${u}`,t.width-10,t.height-20)),this.particles.forEach((e,i)=>{e.update(),(e.y>t.height||e.y<-100||e.x>t.width+100||e.x<-100)&&(a&&l<=r?this.particles[i]=this.getParticle():this.removeParticleAt(i))}),u>0||l<r},this.canvas=t;let i=this.canvas.getContext("2d");if(!i)throw Error("Could not get canvas context");this.context=i,this.getOptions=e}}let l={width:"undefined"!=typeof window?window.innerWidth:300,height:"undefined"!=typeof window?window.innerHeight:200,numberOfPieces:200,friction:.99,wind:0,gravity:.1,initialVelocityX:4,initialVelocityY:10,colors:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548"],opacity:1,debug:!1,tweenFunction:o.easeInOutQuad,tweenDuration:5e3,recycle:!0,run:!0};class f{constructor(t,e){this.lastFrameTime=Date.now(),this.setOptionsWithDefaults=t=>{let e={confettiSource:{x:0,y:0,w:this.canvas.width,h:0}};this._options={...e,...l,...t},Object.assign(this,t.confettiSource)},this.update=()=>{let{options:{run:t,onConfettiComplete:e,frameRate:i},canvas:n,context:s}=this;if(i){let t=Date.now(),e=t-this.lastFrameTime;if(e<1e3/i){this.rafId=requestAnimationFrame(this.update);return}this.lastFrameTime=t-e%i}t&&(s.fillStyle="white",s.clearRect(0,0,n.width,n.height)),this.generator.animate()?this.rafId=requestAnimationFrame(this.update):(e&&"function"==typeof e&&this.generator.particlesGenerated>0&&e.call(this,this),this._options.run=!1)},this.reset=()=>{this.generator&&this.generator.particlesGenerated>0&&(this.generator.particlesGenerated=0,this.generator.particles=[],this.generator.lastNumberOfPieces=0)},this.stop=()=>{this.options={run:!1},this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)},this.canvas=t;let i=this.canvas.getContext("2d");if(!i)throw Error("Could not get canvas context");this.context=i,this.generator=new u(this.canvas,()=>this.options),this.options=e,this.update()}get options(){return this._options}set options(t){let e=this._options?.run,i=this._options?.recycle;this.setOptionsWithDefaults(t),this.generator&&(Object.assign(this.generator,this.options.confettiSource),"boolean"==typeof t.recycle&&t.recycle&&!1===i&&(this.generator.lastNumberOfPieces=this.generator.particles.length)),"boolean"==typeof t.run&&t.run&&!1===e&&this.update()}}let p=r.createRef();class d extends r.Component{constructor(t){super(t),this.canvas=r.createRef(),this.canvas=t.canvasRef||p}componentDidMount(){if(this.canvas.current){let t=v(this.props)[0];this.confetti=new f(this.canvas.current,t)}}componentDidUpdate(){let t=v(this.props)[0];this.confetti&&(this.confetti.options=t)}componentWillUnmount(){this.confetti&&this.confetti.stop(),this.confetti=void 0}render(){let[t,e]=v(this.props),i={zIndex:2,position:"absolute",pointerEvents:"none",top:0,left:0,bottom:0,right:0,...e.style};return(0,a.jsx)("canvas",{width:t.width,height:t.height,ref:this.canvas,...e,style:i})}}function v(t){let e={},i={},n=[...Object.keys(l),"confettiSource","drawShape","onConfettiComplete","frameRate"],s=["canvasRef"];for(let a in t){let r=t[a];n.includes(a)?e[a]=r:s.includes(a)?s[a]=r:i[a]=r}return[e,i,{}]}d.defaultProps={...l},d.displayName="ReactConfetti";let g=r.forwardRef((t,e)=>(0,a.jsx)(d,{canvasRef:e,...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.