0x3942c585…919esent to0x99a9b7c1…b069·#19,275,730·view on Etherscan
(-.6*I,I),Y.lineTo(-I,-.8*I),Y.lineTo(-.5*I,-.5*I),Y.lineTo(0,-I),Y.lineTo(.5*I,-.5*I),Y.lineTo(I,-.8*I),Y.lineTo(.6*I,I),Y.closePath();break;case 1:F.push(new e(-2*I,I)),F.push(new e(-2*I,I)),F.push(new e(-1.2*I,0*I)),F.push(new e(-.8*I,-.8*I)),F.push(new e(-.8*I,-.8*I)),F.push(new e(-.45*I,-.6*I)),F.push(new e(0*I,-1*I)),F.push(new e(0*I,-1*I)),F.push(new e(.45*I,-.6*I)),F.push(new e(.8*I,-.8*I)),F.push(new e(.8*I,-.8*I)),F.push(new e(1.2*I,0*I)),F.push(new e(2*I,I)),F.push(new e(2*I,I)),G(F,Y);break;case 2:F.push(new e(0*I,-.3*I)),F.push(new e(0*I,-.3*I)),F.push(new e(1.2*I,-1*I)),F.push(new e(1.6*I,-.7*I)),F.push(new e(1.6*I,.7*I)),F.push(new e(1.2*I,.8*I)),F.push(new e(0*I,.4*I)),F.push(new e(-1.2*I,.8*I)),F.push(new e(-1.6*I,.7*I)),F.push(new e(-1.6*I,-.7*I)),F.push(new e(-1.2*I,-1*I)),F.push(new e(0*I,-.3*I)),G(F,Y);break;case 3:F.push(new e(0*I,-.2*I)),F.push(new e(0*I,-.2*I)),F.push(new e(1.6*I,-.6*I)),F.push(new e(2*I,-.5*I)),F.push(new e(1.9*I,.2*I)),F.push(new e(.8*I,1*I)),F.push(new e(0*I,1.2*I)),F.push(new e(-.8*I,1*I)),F.push(new e(-1.9*I,.2*I)),F.push(new e(-2*I,-.5*I)),F.push(new e(-1.6*I,-.6*I)),F.push(new e(0*I,-.2*I)),G(F,Y)}Y.restore()},h=(A,B,I,Q,Y)=>{switch(Y.save(),Y.translate(A,B),Q){case 0:Y.beginPath(),Y.arc(-I,-.85*I,.14*I,0,2*Math.PI),Y.moveTo(.15*I,-1.1*I),Y.arc(0,-1.1*I,.15*I,0,2*Math.PI),Y.moveTo(1.14*I,-.85*I),Y.arc(I,-.85*I,.14*I,0,2*Math.PI);break;case 1:Y.beginPath(),Y.arc(-.8*I,-.85*I,.12*I,0,2*Math.PI),Y.moveTo(.125*I,-1.1*I),Y.arc(0,-1.1*I,.125*I,0,2*Math.PI),Y.moveTo(.92*I,-.85*I),Y.arc(.8*I,-.85*I,.12*I,0,2*Math.PI),Y.closePath();break;case 2:Y.beginPath(),Y.roundRect(-.4*I,-.6*I,.8*I,1.2*I,.2*I);break;case 3:let A=[];A.push(new e(0*I,-.4*I)),A.push(new e(0*I,-.4*I)),A.push(new e(1.2*I,-.9*I)),A.push(new e(1.6*I,-.8*I)),A.push(new e(1.5*I,0*I)),A.push(new e(.8*I,.6*I)),A.push(new e(0*I,.8*I)),A.push(new e(-.8*I,.6*I)),A.push(new e(-1.5*I,0*I)),A.push(new e(-1.6*I,-.8*I)),A.push(new e(-1.2*I,-.9*I)),A.push(new e(0*I,-.4*I)),G(A,Y)}Y.restore()},C=(A,B,I,Q,Y)=>{Y.save(),Y.translate(A,B),o(0,-.4*I,.8*I,Y),Y.restore()};g>-1&&(D.save(),c(I,Q,E,g,D),D.clip(),D.fillStyle=F[U],D.fillRect(0,0,A,B),D.fillStyle=Y[U],c(I,Q-.1*E,.96*E,g,D),D.fill(),D.fillStyle=M[U],z(I-.6*E,Q-1.5*E,.9*E,D),D.fill(),j.drawImage(R,0,0),j.strokeStyle="#000000",c(I,Q,E,g,j),j.stroke(),D.restore(),D.clearRect(0,0,A,B)),g>-1&&(D.save(),h(I,Q,E,g,D),D.clip(),D.fillStyle=F[U],D.fillRect(0,0,A,B),D.fillStyle=Y[U],h(I,Q-.1*E,.96*E,g,D),D.fill(),j.drawImage(R,0,0),j.strokeStyle="#000000",h(I,Q,E,g,j),j.stroke(),D.restore(),D.clearRect(0,0,A,B)),3==g&&(D.save(),C(I,Q,E,0,D),D.clip(),D.fillStyle=F[U],D.fillRect(0,0,A,B),D.fillStyle=Y[U],C(I,Q-.1*E,.96*E,0,D),D.fill(),D.fillStyle=M[U],z(I-1*E,Q-2*E,1*E,D),D.fill(),j.drawImage(R,0,0),j.strokeStyle="#000000",C(I,Q,E,0,j),j.stroke(),D.restore(),D.clearRect(0,0,A,B))})(Q,s+(0==i?-1*t:-.9*t),.4*t,c),((Q,c,h,C,i)=>{const w=()=>{const E=I.rand(.7*h,.8*h),g=E-I.rand(.08*h,.12*h);switch(D.save(),0==C?z(Q,c,h,D):o(Q,c,h,D),D.clip(),D.save(),i){case 0:z(Q,c,E,D),D.clip(),D.fillStyle=F[U],D.fillRect(0,0,A,B),D.fillStyle=Y[U],z(Q,c-.04*E,E,D),D.fill(),D.fillStyle=M[U],z(Q-.4*E,c-.8*E,.2*E,D),D.fill(),D.fillStyle=F[U],z(Q,c-.04*E,g,D),D.fill(),D.globalCompositeOperation="destination-out",z(Q,c,g,D),D.fill(),j.drawImage(R,0,0),D.restore(),D.clearRect(0,0,A,B),D.strokeStyle="#000000",z(Q,c,E,D),D.stroke(),z(Q,c,g,D),D.stroke(),j.drawImage(R,0,0);break;case 1:o(Q,c,E,D),D.clip(),D.fillStyle=F[U],D.fillRect(0,0,A,B),D.fillStyle=Y[U],o(Q,c-.04*E,E,D),D.fill(),D.fillStyle=M[U],z(Q-.4*E,c-.8*E,.2*E,D),D.fill(),D.fillStyle=F[U],o(Q,c-.04*E,g,D),D.fill(),D.globalCompositeOperation="destination-out",o(Q,c,g,D),D.fill(),j.drawImage(R,0,0),D.restore(),D.clearRect(0,0,A,B),D.strokeStyle="#000000",o(Q,c,E,D),D.stroke(),o(Q,c,g,D),D.stroke(),j.drawImage(R,0,0);break;case 2:H(Q,c,E,D),D.clip(),D.fillStyle=F[U],D.fillRect(0,0,A,B),D.fillStyle=Y[U],H(Q,c-.04*E,E,D),D.fill(),D.fillStyle=M[U],z(Q-.3*E,c-.7*E,.2*E,D),D.fill(),D.fillStyle=F[U],H(Q,c-.02*E,g,D),D.fill(),D.globalCompositeOperation="destination-out",H(Q,c,.96*g,D),D.fill(),j.drawImage(R,0,0),D.restore(),D.clearRect(0,0,A,B),D.strokeStyle="#000000",H(Q,c,E,D),D.stroke(),H(Q,c,.96*g,D),D.stroke(),j.drawImage(R,0,0)}D.restore(),D.clearRect(0,0,A,B)};0==C?(D.save(),z(Q,c,1.1*h,D),D.clip(),D.fillStyle=F[U],D.fillRect(0,0,A,B),D.fillStyle=Y[U],z(Q,c-.03*h,1.1*h,D),D.fill(),D.fillStyle=M[U],z(Q-.4*h,c-.9*h,.3*h,D),D.fill(),D.fillStyle=F[U],z(Q,c-.01*h,1.02*h,D),D.fill(),j.drawImage(R,0,0),j.strokeStyle="#000000",z(Q,c,1.1*h,j),j.stroke(),D.restore(),D.clearRect(0,0,A,B),D.save(),z(Q,c,h,D),D.clip(),D.fillStyle=g[y],D.fillRect(0,0,A,B),D.fillStyle=E[y],z(Q,c-.1*h,.9*h,D),D.fill(),j.drawImage(R,0,0),j.strokeStyle="#000000",z(Q,c,h,j),j.stroke(),D.restore(),D.clearRect(0,0,A,B),w()):1==C&&(D.save(),o(Q,c,1.1*h,D),D.clip(),D.fillStyle=F[U],D.fillRect(0,0,A,B),D.fillStyle=Y[U],o(Q,c-.03*h,1.1*h,D),D.fill(),D.fillStyle=M[U],z(Q-.5*h,c-.9*h,.3*h,D),D.fill(),D.fillStyle=F[U],o(Q,c-.01*h,1.02*h,D),D.fill(),j.drawImage(R,0,0),j.strokeStyle="#000000",o(Q,c,1.1*h,j),j.stroke(),D.restore(),D.clearRect(0,0,A,B),D.save(),o(Q,c,h,D),D.clip(),D.fillStyle=g[y],D.fillRect(0,0,A,B),D.fillStyle=E[y],o(Q,c-.1*h,.9*h,D),D.fill(),j.drawImage(R,0,0),j.strokeStyle="#000000",o(Q,c,h,j),j.stroke(),D.restore(),D.clearRect(0,0,A,B),w())})(Q,s,t,i,w),((Q,E,g,c,h)=>{let C,i,w,J,y=[],N=[];switch(c){case 0:C=.9*g;for(let A=0;A<24;A++){const B=A/12*Math.PI;N.push(new e(1.2*C*Math.cos(B),1.2*C*Math.sin(B)))}for(let A=0;A<10;A++){const B=A/5*Math.PI;y.push(new e(C*Math.cos(B),C*Math.sin(B)))}[w,J]=x(y,.15*g);break;case 1:C=.9*g;for(let A=0;A<8;A++){const B=(A+.5)/4*Math.PI,I=Math.sin(B);N.push(new e(1.2*C*Math.cos(B),1.2*C*Math.sin(B)+(I>0?.25*C:-.25*C)))}for(let A=0;A<8;A++){const B=(A+.5)/4*Math.PI,I=Math.sin(B);y.push(new e(C*Math.cos(B),C*Math.sin(B)+(I>0?.25*C:-.25*C)))}[w,J]=x(y,.2*g);break;case 2:C=1*g,i=.55*g;for(let A=0;A<10;A++){const B=A/5*Math.PI;N.push(new e(1.25*(A%2==0?i:C)*Math.sin(B),1.25*(A%2==0?i:C)*Math.cos(B)))}for(let A=0;A<10;A++){const B=A/5*Math.PI;y.push(new e((A%2==0?i:C)*Math.sin(B),(A%2==0?i:C)*Math.cos(B)))}[w,J]=x(y,.15*g);break;case 3:C=.9*g;for(let A=0;A<32;A++){const B=Math.asin(2*(A<16?A/16:A/16-1)-1)+(A<16?.5*Math.PI:1.5*Math.PI),I=1.2*C*(.9*Math.sin(B)+.04*Math.sin(2*B)-.26*Math.sin(3*B)-.01*Math.sin(4*B)),Q=1.2*C*(1*Math.cos(B)-.1+.3*Math.cos(2*B)-.2*Math.cos(3*B)+.01*Math.cos(4*B));N.push(new e(I,Q))}for(let A=0;A<16;A++){const B=Math.asin(2*(A<8?A/8:A/8-1)-1)+(A<8?.5*Math.PI:1.5*Math.PI),I=C*(.9*Math.sin(B)+.04*Math.sin(2*B)-.26*Math.sin(3*B)-.01*Math.sin(4*B)),Q=C*(1*Math.cos(B)-.1+.3*Math.cos(2*B)-.2*Math.cos(3*B)+.01*Math.cos(4*B));y.push(new e(I,Q))}[w,J]=x(y,.2*g);break;case 4:C=1*g,i=.7*g;for(let A=0;A<40;A++){const B=A/20*Math.PI,I=i+(C-i)*Math.abs(Math.sin(2.5*B));N.push(new e(1.2*I*Math.sin(B),1.2*I*Math.cos(B)))}for(let A=0;A<20;A++){const B=A/10*Math.PI,I=i+(C-i)*Math.abs(Math.sin(2.5*B));y.push(new e(I*Math.sin(B),I*Math.cos(B)))}[w,J]=x(y,.15*g);break;case 5:C=1.4*g,i=.7*g;for(let A=0;A<32;A++){const B=A/16*Math.PI,I=C-(C-i)*Math.sqrt(Math.abs(Math.sin(.5*B))),Q=1.2*I*Math.sin(B+Math.PI),Y=1.2*I*Math.cos(B+Math.PI)+.54*i;N.push(new e(Q,Y))}for(let A=0;A<16;A++){const B=A/8*Math.PI,I=C-(C-i)*Math.sqrt(Math.abs(Math.sin(.5*B))),Q=I*Math.sin(B+Math.PI),Y=I*Math.cos(B+Math.PI)+.5*i;y.push(new e(Q,Y))}[w,J]=x(y,.2*g);break;case 6:C=1.2*g,i=.9*g;for(let A=0;A<24;A++){const B=A/12*Math.PI,I=C-(C-i)*Math.sqrt(Math.abs(Math.sin(B))),Q=1.2*I*Math.sin(B+Math.PI),Y=1.2*I*Math.cos(B+Math.PI);N.push(new e(Q,Y))}for(let A=0;A<12;A++){const B=A/6*Math.PI,I=C-(C-i)*Math.sqrt(Math.abs(Math.sin(B))),Q=I*Math.sin(B+Math.PI),Y=I*Math.cos(B+Math.PI)+.5;y.push(new e(Q,Y))}[w,J]=x(y,.2*g);break;case 7:C=.9*g;for(let A=0;A<4;A++){const B=(A/2-.05)*Math.PI,I=(A/2+.05)*Math.PI;N.push(new e(1.25*C*Math.cos(B),1.25*C*Math.sin(B))),N.push(new e(1.25*C*Math.cos(I),1.25*C*Math.sin(I)))}for(let A=0;A<4;A++){const B=(A/2-.05)*Math.PI,I=(A/2+.05)*Math.PI;y.push(new e(C*Math.cos(B),C*Math.sin(B))),y.push(new e(C*Math.cos(I),C*Math.sin(I)))}[w,J]=x(y,.2*g);break;case 8:C=g;for(let A=0;A<4;A++){const B=(A<2?A+4:A+5)/4*Math.PI,I=0==A||3==A?C:C/Math.sqrt(2);N.push(new e(1.25*I*Math.cos(B),1.25*I*Math.sin(B)-.2*C))}N.push(new e(0,1.25*C-.2*C));for(let A=0;A<4;A++){const B=(A<2?A+4:A+5)/4*Math.PI,I=0==A||3==A?C:C/Math.sqrt(2);y.push(new e(I*Math.cos(B),I*Math.sin(B)-.2*C))}y.push(new e(0,C-.2*C)),[w,J]=x(y,.2*g)}j.save(),j.translate(Q,E),D.save(),D.translate(Q,E),D.beginPath(),D.moveTo(N[0].x,N[0].y);for(let A=1;A<N.length;A++)D.lineTo(N[A].x,N[A].y);j.closePath(),D.clip(),D.fillStyle=F[U],D.fillRect(-A/2,-B/2,A,B),D.fillStyle=Y[U],D.beginPath(),D.moveTo(N[0].x,N[0].y-.08*g);for(let A=1;A<N.length;A++)D.lineTo(N[A].x,N[A].y-.08*g);j.closePath(),D.fill(),D.fillStyle=M[U],z(-.6*g,-.8*g,.45*g,D),D.fill(),D.fillStyle=F[U],D.beginPath(),D.moveTo(.86*N[0].x,.86*N[0].y-.05*g);for(let A=1;A<N.length;A++)D.lineTo(.86*N[A].x,.86*N[A].y-.05*g);j.closePath(),D.fill(),j.drawImage(R,-Q,-E),j.strokeStyle="#000000",j.beginPath(),j.moveTo(N[0].x,N[0].y);for(let A=1;A<N.length;A++)j.lineTo(N[A].x,N[A].y);j.closePath(),j.stroke();for(let A of J)j.fillStyle=`hsl(${Math.floor(360+h+I.rand(-10,10))%360} ${Math.floor(I.rand(50,100))}% ${Math.floor(I.rand(20,80))}%)`,j.beginPath(),j.moveTo(w[A.index[0]].x,w[A.index[0]].y),j.lineTo(w[A.index[1]].x,w[A.index[1]].y),j.lineTo(w[A.index[2]].x,w[A.index[2]].y),j.closePath(),j.fill();j.beginPath(),j.moveTo(y[0].x,y[0].y);for(let A=1;A<y.length;A++)j.lineTo(y[A].x,y[A].y);j.closePath(),j.stroke(),D.restore(),D.clearRect(0,0,A,B),j.restore()})(Q,s,.4*t,J,N)};let S;switch(Q){case 0:s(),S=I.rand(240,320),t(A/2,B/2,S);break;case 1:s(),S=Math.floor(I.rand(70,85)),t(3*A/4,B/2,.66*S),t(17*A/32,B/2,S),t(A/4,B/2,1.5*S);break;case 2:s(),S=I.rand(90,110),t(A/5,B/3,S),t(4*A/5,B/3,S),t(A/2,B/3,S),t(A/3,2*B/3,S),t(2*A/3,2*B/3,S);break;case 3:s(),S=I.rand(120,140);for(let I=0;I<4;I++)t(A/2,B/2-2.25*S,S),j.translate(A/2,B/2),j.rotate(Math.PI/2),j.translate(-A/2,-B/2);break;case 4:s(),S=I.rand(140,160),t(4*A/15,B/2,S),t(11*A/15,B/2,S)}}}class m{constructor(B){this.canvas=document.createElement("canvas"),this.canvas.width=1600,this.canvas.height=1200,this.draw(this.canvas,1600,1200,B),this.texture=new A.CanvasTexture(this.canvas),this.texture.needsUpdate=!1}draw(A,B,I,Q){const Y=Math.floor(Q.rand_rarity([.3,.3,.24,.16])),F=["#8f2424","#384ca8","#2c87a3","#7a5d1f","#48733d","#673e78"],M=["#bf9f9d","#949fd1","#98c6d4","#ad9665","#97ad86","#a888b5"];let E,g,c,h,C,i;const w=()=>{E=Math.floor(Q.rand(0,6)),g=Math.floor(Q.rand(0,5)),c=Math.floor(Q.rand(0,4)),h=Math.floor(Q.rand(0,2)),C=Math.floor(Q.rand(0,4)),i=Math.floor(Q.rand(0,8))},J=document.createElement("canvas"),U=A.getContext("2d"),y=J.getContext("2d");J.width=B,J.height=I,U.lineWidth=3,y.lineWidth=3;class N{constructor(A=0,B=0){this.x=A,this.y=B}add(A){this.x+=A.x,this.y+=A.y}sub(A){this.x-=A.x,this.y-=A.y}subVec(A){return new N(this.x-A.x,this.y-A.y)}mul(A){this.x*=A,this.y*=A}normalize(){const A=Math.sqrt(this.x*this.x+this.y*this.y);this.x/=A,this.y/=A}dist(A){const B=this.x-A.x,I=this.y-A.y;return Math.sqrt(B*B+I*I)}lerp(A,B){return new N(this.x*(1-B)+A.x*B,this.y*(1-B)+A.y*B)}}const s=(A,B)=>{let I=[];for(let Q=B?0:1;Q<A.length;Q++){const Y=A[B?(Q-2+A.length)%A.length:Math.max(0,Q-2)],F=A[(Q-1+A.length)%A.length],M=A[Q],E=A[B?(Q+1+A.length)%A.length:Math.min(A.length-1,Q+1)];for(let A=0;A<1;A+=.1){const B=new N(.5*(2*F.x+(-Y.x+M.x)*A+(2*Y.x-5*F.x+4*M.x-E.x)*A*A+(-Y.x+3*F.x-3*M.x+E.x)*A*A*A),.5*(2*F.y+(-Y.y+M.y)*A+(2*Y.y-5*F.y+4*M.y-E.y)*A*A+(-Y.y+3*F.y-3*M.y+E.y)*A*A*A));I.push(B)}}return I},R=A=>{let B=[];for(let I=1;I<A.length;I++)for(let Q=0;Q<1;Q+=.1)B.push(A[I-1]*(1-Q)+A[I]*Q);return B},j=(A,B,I,Q,Y)=>{Y.beginPath();for(let F=0;F<I.length;F++){const M=I[Math.min(I.length-1,F+1)].subVec(I[Math.max(0,F-1)]),E=new N(M.y,-M.x);E.normalize(),0==F?Y.moveTo(A+I[F].x+Q[F]*E.x,B+I[F].y+Q[F]*E.y):Y.lineTo(A+I[F].x+Q[F]*E.x,B+I[F].y+Q[F]*E.y)}for(let F=I.length-1;F>=0;F--){const M=I[Math.min(I.length-1,F+1)].subVec(I[Math.max(0,F-1)]),E=new N(-M.y,M.x);E.normalize(),Y.lineTo(A+I[F].x+Q[F]*E.x,B+I[F].y+Q[F]*E.y)}Y.closePath()},D=(A,B,I,Q,Y)=>{let F=[];switch(Y){case 0:for(let A=0;A<12;A++){const B=A/6*Math.PI;F.push(new N(.9*I*Math.cos(B),I*Math.sin(B)))}break;case 1:for(let A=0;A<12;A++){const B=A/6*Math.PI;F.push(new N(.5*I*Math.cos(B),1.1*I*Math.sin(B)))}break;case 2:for(let A=0;A<12;A++){const B=A/6*Math.PI;F.push(new N(.9*I*Math.cos(B),1.2*I*Math.sin(B)))}break;case 3:for(let A=0;A<12;A++){const B=A/6*Math.PI;F.push(new N(I*Math.cos(B),1.1*I*Math.sin(B)))}}F=s(F,!0),Q.beginPath();for(let I=0;I<F.length;I++)0==I?Q.moveTo(A+F[I].x,B+F[I].y):Q.lineTo(A+F[I].x,B+F[I].y);Q.closePath()},e=(A,Q,Y,g,w)=>{let e=[],G=[],n=[],z=[],o=[],H=[],x=[];switch(y.clearRect(0,0,B,I),U.save(),1==w&&(U.translate(B,0),U.scale(-1,1)),g){case 0:e.push(new N(-.72*Y,-.62*Y)),e.push(new N(0,-.9*Y)),e.push(new N(.8*Y,-.6*Y)),e.push(new N(.92*Y,.14*Y)),e.push(new N(.65*Y,.62*Y)),e.push(new N(0*Y,.62*Y)),e.push(new N(-.65*Y,.6*Y)),e.push(new N(-.9*Y,.12*Y)),G.push(new N(-1.1*Y,-.25*Y)),G.push(new N(-.6*Y,-.76*Y)),G.push(new N(0*Y,-.94*Y)),G.push(new N(.55*Y,-.8*Y)),G.push(new N(.94*Y,-.4*Y)),G.push(new N(1.08*Y,.05*Y)),G.push(new N(.96*Y,.45*Y)),n.push(0),n.push(.07*Y),n.push(.11*Y),n.push(.1*Y),n.push(.08*Y),n.push(.04*Y),n.push(0),z.push(new N(.72*Y,.72*Y)),z.push(new N(.42*Y,.68*Y)),z.push(new N(-.1,.65*Y)),z.push(new N(-.46*Y,.66*Y)),z.push(new N(-.74*Y,.68*Y)),o.push(0),o.push(.014*Y),o.push(.02*Y),o.push(.014*Y),o.push(0),x.push([new N(0*Y,-.98*Y),new N(-.25*Y,-1.14*Y),new N(-.36*Y,-1.32*Y)]),H.push([.07*Y,.03*Y,0]),x.push([new N(-.4*Y,-.86*Y),new N(-.62*Y,-1*Y),new N(-.82*Y,-1.25*Y),new N(-.88*Y,-1.4*Y)]),H.push([.09*Y,.06*Y,.015*Y,0]);break;case 1:e.push(new N(-.76*Y,-.62*Y)),e.push(new N(0,-.92*Y)),e.push(new N(.8*Y,-.6*Y)),e.push(new N(.94*Y,.22*Y)),e.push(new N(.48*Y,.92*Y)),e.push(new N(-.48*Y,.9*Y)),e.push(new N(-.92*Y,.18*Y)),G.push(new N(-1*Y,-.7*Y)),G.push(new N(-.6*Y,-.85*Y)),G.push(new N(0*Y,-.98*Y)),G.push(new N(.6*Y,-.8*Y)),G.push(new N(.95*Y,-.42*Y)),G.push(new N(1.05*Y,.15*Y)),G.push(new N(.98*Y,.6*Y)),n.push(0),n.push(.05*Y),n.push(.08*Y),n.push(.1*Y),n.push(.08*Y),n.push(.03*Y),n.push(0),z.push(new N(.55*Y,.92*Y)),z.push(new N(.3*Y,1*Y)),z.push(new N(0,1.02*Y)),z.push(new N(-.3*Y,.98*Y)),z.push(new N(-.55*Y,.9*Y)),o.push(0),o.push(.018*Y),o.push(.028*Y),o.push(.018*Y),o.push(0),x.push([new N(.777*Y,-.66*Y),new N(1.05*Y,-.62*Y),new N(1.4*Y,-.68*Y),new N(1.65*Y,-.78*Y)]),H.push([.118*Y,.08*Y,.02*Y,0]),x.push([new N(.3*Y,.99*Y),new N(.46*Y,1.02*Y),new N(.56*Y,1.1*Y)]),H.push([.016*Y,.007*Y,0]),x.push([new N(-.1*Y,1.01*Y),new N(.18*Y,1.05*Y),new N(.3*Y,1.16*Y)]),H.push([.02*Y,.01*Y,0]);break;case 2:e.push(new N(-.72*Y,-.62*Y)),e.push(new N(0,-.9*Y)),e.push(new N(.8*Y,-.6*Y)),e.push(new N(.92*Y,.22*Y)),e.push(new N(.45*Y,.95*Y)),e.push(new N(-.45*Y,.95*Y)),e.push(new N(-.9*Y,.18*Y)),G.push(new N(-1.05*Y,-.3*Y)),G.push(new N(-.6*Y,-.8*Y)),G.push(new N(0*Y,-.98*Y)),G.push(new N(.55*Y,-.84*Y)),G.push(new N(.9*Y,-.43*Y)),G.push(new N(1*Y,0*Y)),G.push(new N(.92*Y,.4*Y)),n.push(0),n.push(.06*Y),n.push(.1*Y),n.push(.09*Y),n.push(.08*Y),n.push(.04*Y),n.push(0),z.push(new N(.45*Y,.95*Y)),z.push(new N(.25*Y,1.02*Y)),z.push(new N(0,1.05*Y)),z.push(new N(-.25*Y,1.02*Y)),z.push(new N(-.45*Y,.95*Y)),o.push(0),o.push(.01*Y),o.push(.016*Y),o.push(.01*Y),o.push(0),x.push([new N(.2*Y,-1*Y),new N(-.1*Y,-1.15*Y),new N(-.2*Y,-1.3*Y)]),H.push([.06*Y,.03*Y,0]),x.push([new N(-.3*Y,-.91*Y),new N(-.57*Y,-1.05*Y),new N(-.72*Y,-1.24*Y),new N(-.78*Y,-1.4*Y)]),H.push([.085*Y,.055*Y,.01*Y,0]),x.push([new N(.78*Y,-.62*Y),new N(1.05*Y,-.56*Y),new N(1.35*Y,-.62*Y),new N(1.5*Y,-.7*Y)]),H.push([.11*Y,.07*Y,.02*Y,0]);break;case 3:e.push(new N(-.88*Y,-.15*Y)),e.push(new N(.1*Y,-.85*Y)),e.push(new N(.92*Y,-.3*Y)),e.push(new N(.55*Y,.85*Y)),e.push(new N(-.55*Y,.85*Y)),G.push(new N(-1.2*Y,.1*Y)),G.push(new N(-.7*Y,-.45*Y)),G.push(new N(.1*Y,-.85*Y)),G.push(new N(.8*Y,-.6*Y)),G.push(new N(1.2*Y,-.05*Y)),n.push(0),n.push(.067*Y),n.push(.1*Y),n.push(.067*Y),n.push(0),z.push(new N(.65*Y,.8*Y)),z.push(new N(.4*Y,.95*Y)),z.push(new N(0*Y,1*Y)),z.push(new N(-.4*Y,.95*Y)),z.push(new N(-.65*Y,.85*Y)),o.push(0),o.push(.021*Y),o.push(.033*Y),o.push(.021*Y),o.push(0),x.push([new N(1*Y,-.4*Y),new N(1.3*Y,-.5*Y),new N(1.55*Y,-.65*Y)]),H.push([.067*Y,.025*Y,0]),x.push([new N(.6*Y,-.75*Y),new N(.9*Y,-.85*Y),new N(1.2*Y,-1*Y)]),H.push([.067*Y,.025*Y,0]);break;case 4:e.push(new N(-1*Y,-.15*Y)),e.push(new N(0,-.3*Y)),e.push(new N(1*Y,-.15*Y)),e.push(new N(.7*Y,.8*Y)),e.push(new N(-.7*Y,.8*Y)),G.push(new N(-1.45*Y,.25*Y)),G.push(new N(-1.1*Y,-.1*Y)),G.push(new N(-.9*Y,-.25*Y)),G.push(new N(0,-.3*Y)),G.push(new N(Y,-.25*Y)),G.push(new N(1.15*Y,-.1*Y)),G.push(new N(1.05*Y,.25*Y)),n.push(0),n.push(.087*Y),n.push(.133*Y),n.push(.087*Y),n.push(.133*Y),n.push(.075*Y),n.push(0),z.push(new N(.9*Y,.7*Y)),z.push(new N(.5*Y,.85*Y)),z.push(new N(0,.9*Y)),z.push(new N(-.5*Y,.85*Y)),z.push(new N(-.95*Y,.7*Y)),o.push(0),o.push(.042*Y),o.push(.05*Y),o.push(.042*Y),o.push(0),x.push([new N(1.05*Y,-.22*Y),new N(1.4*Y,-.3*Y),new N(1.75*Y,-.4*Y)]),H.push([.15*Y,.075*Y,0]),x.push([new N(.65*Y,.802*Y),new N(.85*Y,.85*Y),new N(1*Y,1*Y)]),H.push([.033*Y,.021*Y,0]),x.push([new N(.35*Y,.88*Y),new N(.6*Y,.95*Y),new N(.75*Y,1.1*Y)]),H.push([.033*Y,.021*Y,0])}e=s(e,!0),G=s(G,!1),n=R(n),z=s(z,!1),o=R(o);for(let A=0;A<x.length;A++)x[A]=s(x[A],!1),H[A]=R(H[A]);y.save(),y.beginPath();for(let B=0;B<e.length;B++)0==B?y.moveTo(A+e[B].x,Q+e[B].y):y.lineTo(A+e[B].x,Q+e[B].y);y.closePath(),y.clip(),y.fillStyle="#eeeeff",y.fillRect(0,0,B,I),D(A,Q,.8*Y,y,c),y.clip(),((A,Q,Y,g,c)=>{let h=[],C=[];switch(c){case 0:for(let A=0;A<12;A++){const B=A/6*Math.PI;h.push(new N(1.2*Y*Math.cos(B),Y*(Math.sin(B)+1.1)))}g.fillStyle=F[E],g.fillRect(0,0,B,I);break;case 1:for(let A=0;A<12;A++){const B=A/6*Math.PI;C.push(new N(1.2*Y*Math.cos(B),Y*(1*Math.sin(B)+1)))}for(let A=0;A<12;A++){const B=A/6*Math.PI;h.push(new N(.8*Y*Math.cos(B),Y*(.6*Math.sin(B)+1)))}g.fillStyle="#000000",g.fillRect(0,0,B,I)}if(1==c){C=s(C,!0),g.beginPath();for(let B=0;B<C.length;B++)0==B?g.moveTo(A+C[B].x,Q+C[B].y):g.lineTo(A+C[B].x,Q+C[B].y);g.closePath(),g.fillStyle=F[E],g.fill()}h=s(h,!0),g.beginPath();for(let B=0;B<h.length;B++)0==B?g.moveTo(A+h[B].x,Q+h[B].y):g.lineTo(A+h[B].x,Q+h[B].y);g.closePath(),g.fillStyle=M[E],g.fill()})(A,Q,1.2*Y,y,h),((A,B,I,Q,Y)=>{let F=[];switch(Y){case 0:for(let A=0;A<12;A++){const B=A/6*Math.PI;F.push(new N(.8*I*Math.cos(B),.8*I*Math.sin(B)))}break;case 1:for(let A=0;A<12;A++){const B=A/6*Math.PI;F.push(new N(.6*I*Math.cos(B),.6*I*Math.sin(B)))}break;case 2:F.push(new N(.6*I,0*I)),F.push(new N(.3*I,I)),F.push(new N(-.3*I,I)),F.push(new N(-.6*I,0*I)),F.push(new N(-.3*I,-I)),F.push(new N(.3*I,-I));break;case 3:F.push(new N(.2*I,0*I)),F.push(new N(.05*I,1.2*I)),F.push(new N(-.05*I,1.2*I)),F.push(new N(-.2*I,0*I)),F.push(new N(-.05*I,-1.2*I)),F.push(new N(.05*I,-1.2*I))}F=s(F,!0),Q.beginPath();for(let I=0;I<F.length;I++)0==I?Q.moveTo(A+F[I].x,B+F[I].y):Q.lineTo(A+F[I].x,B+F[I].y);Q.closePath()})(A,Q,.3*Y,y,C),y.fillStyle="#000033",y.strokeStyle="#000000",y.fill(),y.stroke(),((A,B,I,Q,Y,F)=>{let M=[],E=[];switch(Y){case 0:M.push(new N(.8*I,-1.7*I)),M.push(new N(1.2*I,-1*I)),M.push(new N(1*I,-.3*I)),M.push(new N(-.2*I,-.1*I)),M.push(new N(-.6*I,-1*I)),M.push(new N(-.4*I,-1.6*I)),E.push(new N(-.8*I,1.8*I)),E.push(new N(-1.4*I,1.2*I)),E.push(new N(-1.2*I,.7*I)),E.push(new N(-.5*I,.7*I)),E.push(new N(-0*I,1.2*I)),E.push(new N(-.2*I,1.8*I));break;case 1:for(let A=0;A<10;A++){const B=A/5*Math.PI;M.push(new N(1.2*I+1.6*I*Math.cos(B),1.6*I+1.2*I*Math.sin(B)))}for(let A=0;A<10;A++){const B=A/5*Math.PI;E.push(new N(-.8*I+1.2*I*Math.cos(B),-1*I+1*I*Math.sin(B)))}break;case 2:for(let A=0;A<10;A++){const B=A/5*Math.PI,Q=A%2==1?.9*I:.5*I;M.push(new N(.5*I+Q*Math.cos(B),.8*I+Q*Math.sin(B)))}for(let A=0;A<10;A++){const B=A/5*Math.PI;E.push(new N(-.8*I+1.2*I*Math.cos(B),-1*I+I*Math.sin(B)))}break;case 3:for(let A=0;A<10;A++){const B=A/5*Math.PI,Q=A%2==0?1*I:.6*I;M.push(new N(-.5*I+Q*Math.cos(B),-.4*I+Q*Math.sin(B)))}for(let A=0;A<10;A++){const B=A/5*Math.PI;E.push(new N(.8*I+.9*I*Math.cos(B),1*I+.7*I*Math.sin(B)))}break;case 4:M.push(new N(.8*I,-2.1*I)),M.push(new N(I,-.3*I)),M.push(new N(-I,-.3*I)),M.push(new N(-.8*I,-2*I));for(let A=0;A<10;A++){const B=A/5*Math.PI;E.push(new N(.6*I+.6*I*Math.cos(B),1.2*I+.62*I*Math.sin(B)))}break;case 5:M.push(new N(.8*I,-.5*I)),M.push(new N(1*I,-.8*I)),M.push(new N(.6*I,-1.2*I)),M.push(new N(-.4*I,-1.4*I)),M.push(new N(-1.2*I,-.8*I)),M.push(new N(-1.3*I,0*I)),M.push(new N(-.8*I,.2*I)),M.push(new N(-.1*I,-.3*I));for(let A=0;A<24;A++){const B=A/12*Math.PI;E.push(new N(I*(.4+.3*(.9*Math.sin(B)+.04*Math.sin(2*B)-.26*Math.sin(3*B)-.01*Math.sin(4*B))),I*(.6+.28*(1*Math.cos(B)-.1+.3*Math.cos(2*B)-.2*Math.cos(3*B)+.01*Math.cos(4*B)))))}break;case 6:for(let A=0;A<10;A++){const B=A/5*Math.PI;M.push(new N(.4*I+.9*I*Math.cos(B),-.6*I+1.2*I*Math.sin(B)))}for(let A=0;A<10;A++){const B=A/5*Math.PI;E.push(new N(-.6*I+.5*I*Math.cos(B),1.2*I+.6*I*Math.sin(B)))}break;case 7:M.push(new N(-1.2*I,-.1*I)),M.push(new N(-.4*I,-.2*I)),M.push(new N(.2*I,-1.4*I)),M.push(new N(-.9*I,-1.2*I));for(let A=0;A<10;A++){const B=A/5*Math.PI;E.push(new N(.4*I+.4*I*Math.cos(B),.4*I+.1*I*Math.sin(B)))}}M=s(M,!0),E=s(E,!0),Q.beginPath();for(let I=0;I<=M.length;I++)0==I?Q.moveTo(A+M[I].x*(0==F?1:-1),B+M[I].y):Q.lineTo(A+M[I%M.length].x*(0==F?1:-1),B+M[I%M.length].y);for(let I=0;I<=E.length;I++)0==I?Q.moveTo(A+E[I].x*(0==F?1:-1),B+E[I].y):Q.lineTo(A+E[I%E.length].x*(0==F?1:-1),B+E[I%E.length].y);Q.closePath()})(A,Q,.5*Y,y,i,w),y.fillStyle="#eeeeff",y.fill(),D(A,Q,.8*Y,y,c),y.strokeStyle="#000000",y.stroke(),U.drawImage(J,0,0),y.restore(),j(A,Q,G,n,U),U.fillStyle="#000000",U.fill(),j(A,Q,z,o,U),U.fillStyle="#000000",U.fill();for(let B=0;B<x.length;B++)j(A,Q,x[B],H[B],U),U.fillStyle="#000000",U.fill();U.restore()};let G;switch(Y){case 0:w(),G=Q.rand(180,300),e(B/2,I/2,G,g,0);break;case 1:w(),G=Q.rand(140,200),e(B/2+2*G,I/2,G,g,0),e(B/2+2*G,I/2,G,g,1);break;case 2:w(),G=Q.rand(90,100),e(B/4+1.9*G,I/2,G,g,0),e(3*B/4+1.9*G,I/2,G,g,1),w(),e(3*B/4+1.9*G,I/2,G,g,0),e(B/4+1.9*G,I/2,G,g,1);break;case 3:w(),G=Q.rand(120,140),e(B/2-3.6*G,I/2,G,g,0),e(B/2,I/2,G,g,0),e(B/2+3.6*G,I/2,G,g,0)}}}class r{constructor(B){this.canvas=document.createElement("canvas"),this.canvas.width=1600,this.canvas.height=1200,this.draw(1600,1200,B),this.texture=new A.CanvasTexture(this.canvas),this.texture.needsUpdate=!1}draw(A,B,I){const Q=Math.floor(I.rand_rarity([.27,.18,.15,.15,.25])),Y=["#f5edf1","#64afd1","#e6aa50","#cf4c89","#e4ebed"],F=["#e3dade","#579bba","#cf9744","#b84279","#d0d7d9"],M=["#ba186a","#2d77a6","#f5f0e9","#f0dd0e","#8acbde"],E=["#eeee00","#ee99ee","#99eeee"];let g,c,h,C,i,w,J,U,y,N;const s=()=>{g=Math.floor(I.rand(0,5)),c=Math.floor(I.rand(0,2)),h=Math.floor(I.rand(0,2)),C=Math.floor(I.rand(0,3)),i=Math.floor(I.rand(0,2)),w=Math.floor(I.rand(0,2)),J=Math.floor(I.rand(0,2)),U=Math.floor(I.rand(0,3)),y=Math.floor(I.rand(0,4)),N=Math.floor(I.rand(0,4))},R=document.createElement("canvas"),j=this.canvas.getContext("2d"),D=R.getContext("2d");R.width=A,R.height=B,j.lineWidth=2,D.lineWidth=2;class e{constructor(A=0,B=0){this.x=A,this.y=B}add(A){this.x+=A.x,this.y+=A.y}sub(A){this.x-=A.x,this.y-=A.y}subVec(A){return new e(this.x-A.x,this.y-A.y)}mul(A){this.x*=A,this.y*=A}normalize(){const A=Math.sqrt(this.x*this.x+this.y*this.y);this.x/=A,this.y/=A}dist(A){const B=this.x-A.x,I=this.y-A.y;return Math.sqrt(B*B+I*I)}lerp(A,B){return new e(this.x*(1-B)+A.x*B,this.y*(1-B)+A.y*B)}}const G=(A,B,I)=>{((A,B,I)=>{j.beginPath(),j.moveTo(A-.6*I,B+.8*I),j.lineTo(A+.6*I,B+.8*I),j.lineTo(A+.7*I,B+1.12*I),j.lineTo(A+1.22*I,B+1.12*I),j.lineTo(A+1.22*I,B+2*I),j.lineTo(A-1.22*I,B+2*I),j.lineTo(A-1.22*I,B+1.12*I),j.lineTo(A-.7