0xa9c2066b…ea61sent to0xa01b85cf…adc2·#25,210,833·0xf60f9b11…6fdc8e
for(let e=0;e<4;e++){const n=be+e*Math.PI/4,a=Math.sin(n);t[y](),t.ellipse(o,r,Math.abs(a)*l,l,0,0,2*Math.PI),t.stroke()}const c=[-.5,0,.5];for(const e of c){const n=r+e*l,a=Math.cos(e)*l;t[y](),t.ellipse(o,n,a,.15*a,0,0,2*Math.PI),t.stroke()}t.restore()}async function Fn(){const t=document.getElementById("punkCanvas"),n=document.getElementById("nftContainer"),a=document.getElementById("modeIndicator");function o(e){const n=e.changedTouches?e.changedTouches[0]:e,a={clientX:n.clientX,clientY:n.clientY};Rn(a,t)||$e(a,t)?e.preventDefault():it=!it}n&&n.classList.add(i),a&&(a.textContent=i+" mode"),t.width=et.canvasWidth,t.height=et.canvasHeight,"ontouchstart"in window?t.addEventListener("touchend",o):t.onclick=o,t.onmousemove=function(e){Mn(e,t)},t.onmouseleave=function(){Je=-1,t.style.cursor="default"};const r=t.getContext("2d");nt=new Image,e&&e.length>0?await new Promise((t,n)=>{nt.onload=t,nt.onerror=n,nt.src="data:image/svg+xml;base64,"+btoa(e)}):await new Promise((t,e)=>{nt.onload=t,nt.onerror=e,nt.src="./CONTRABAND-punk-Feb2026.svg"}),at=document.createElement("canvas"),at.width=24,at.height=24;var s=at.getContext("2d");s.imageSmoothingEnabled=0,s.drawImage(nt,0,0,24,24),ot=new Image,ot.crossOrigin="anonymous",await new Promise(t=>{ot.onload=t,ot.onerror=()=>{t()},ot.src=et.imageURL}),et.scrollText="",st=et.neonColors[0],we="dot",xe=0,Te=0,Me=0,Ie=[...Re],ft="CRT_power_on",ct=0,"function"==typeof pluginInit&&pluginInit(et,t,r),"portrait"===i?Bn(r,t):Wn(r,t)}function Wn(t,e){"function"==typeof yn&&yn();const n=et.punkScale;t.clearRect(0,0,e.width,e.height),ot&&ot.complete&&ot.naturalWidth>0?t.drawImage(ot,0,0,et.leftWidth,et.leftHeight):(t[k]="#d4b896",t[_](0,0,et.leftWidth,et.leftHeight),t[k]="#666",t.font="20px 'Montserrat', sans-serif",t.textAlign="center",t.fillText("Left Side Image",et.leftWidth/2,et.leftHeight/2),t.fillText("(Canvas-LeftSide.jpg)",et.leftWidth/2,et.leftHeight/2+30),t.textAlign="left"),Ln(t,et.leftWidth,0,et.rightWidth,et.canvasHeight),t.font=`500 ${et.headerFontSize}px 'Helvetica Neue', Helvetica, Arial, sans-serif`,t[k]="#ff00fc",t.textAlign="center",t.textBaseline="top";const a=et.leftWidth+et.rightWidth/2;t[T]="rgba(0, 0, 0, 0.5)",t[x]=3,t.shadowOffsetX=2,t.shadowOffsetY=2,t.fillText("CONTRABAND PUNK #0"+("string"==typeof TID?TID.replace(/^#/,""):"?"),a,et.headerY),t[T]="transparent",t[x]=0,t.shadowOffsetX=0,t.shadowOffsetY=0,t.textAlign="left";const o=et.punkOffsetX+et.glassesX*n,r=et.punkOffsetY+et.glassesY*n,i=et.glassesWidth*n,s=et.glassesHeight*n,l=M[W];l.dark&&(t[T]="rgba(255, 255, 255, 0.6)",t[x]=8,t.shadowOffsetX=0,t.shadowOffsetY=0),t.imageSmoothingEnabled=0,t.drawImage(at,et.punkOffsetX,et.punkOffsetY,24*n,24*n),l.dark&&(t[T]="transparent",t[x]=0),Qe(t,n),Cn(t),Hn(t,o,r,i,s,n);const f=et.punkOffsetY+24*n,c=et.leftWidth+et.rightWidth/2;t.font=`bold ${et.attributesTitleFontSize}px 'Helvetica Neue', Helvetica, Arial, sans-serif`,t[k]="#000000",t.textAlign="center",t.textBaseline="top",t.letterSpacing="0px",t[T]="rgba(255, 255, 255, 0.6)",t[x]=4,t.shadowOffsetX=0,t.shadowOffsetY=0,t.fillText("Attributes:",c,f+et.attributesTitleOffsetY),t[T]="transparent",t[x]=0,t.font=`500 ${et.attributesTextFontSize}px 'Helvetica Neue', Helvetica, Arial, sans-serif`,t[k]="#ff00fc",t[T]="rgba(0, 0, 0, 0.70)",t[x]=2,t.shadowOffsetX=1,t.shadowOffsetY=1,t.fillText("VR-MOD, Hot-Cap, Not-Legit",c,f+et.attributesTextOffsetY),t[T]="transparent",t[x]=0,t.shadowOffsetX=0,t.shadowOffsetY=0,t.textAlign="left",t[k]="#000000",t[_](0,0,e.width,5),t[_](0,e.height-5,e.width,5),t[_](0,0,5,e.height),t[_](e.width-5,0,5,e.height),t[_](et.leftWidth-2.5,0,5,e.height),Pn(t,i),Dn(t),rt=requestAnimationFrame(()=>Wn(t,e))}function Bn(t,e){"function"==typeof yn&&yn();const n=et.punkScale;if(t.clearRect(0,0,e.width,e.height),ot&&ot.complete&&ot.naturalWidth>0){const e=ot.naturalWidth/ot.naturalHeight,n=et.canvasWidth/et.topImageHeight;let a=0,o=0,r=ot.naturalWidth,i=ot.naturalHeight;e<n?(i=ot.naturalWidth/n,o=(ot.naturalHeight-i)/2):(r=ot.naturalHeight*n,a=(ot.naturalWidth-r)/2),t.drawImage(ot,a,o,r,i,0,0,et.canvasWidth,et.topImageHeight)}else t[k]="#d4b896",t[_](0,0,et.canvasWidth,et.topImageHeight),t[k]="#666",t.font="32px 'Montserrat', sans-serif",t.textAlign="center",t.fillText("Top Image Placeholder",et.canvasWidth/2,et.topImageHeight/2),t.fillText("(Canvas-TopSide-Portrait.jpg)",et.canvasWidth/2,et.topImageHeight/2+45),t.textAlign="left";Ln(t,0,et.bottomSectionY,et.canvasWidth,et.bottomSectionHeight),t.font=`bold ${et.headerFontSize}px 'Helvetica Neue', Helvetica, Arial, sans-serif`,t[k]="#ff00fc",t.textAlign="center",t.textBaseline="top",t[T]="rgba(0, 0, 0, 0.5)",t[x]=3,t.shadowOffsetX=2,t.shadowOffsetY=2,t.fillText("CONTRABAND 0"+("string"==typeof TID?TID.replace(/^#/,""):"?"),et.canvasWidth/2,et.bottomSectionY+et.headerY),t[T]="transparent",t[x]=0,t.shadowOffsetX=0,t.shadowOffsetY=0,t.textAlign="left";const a=et.punkOffsetX+et.glassesX*n,o=et.punkOffsetY+et.glassesY*n,r=et.glassesWidth*n,i=et.glassesHeight*n,s=M[W];s.dark&&(t[T]="rgba(255, 255, 255, 0.6)",t[x]=8,t.shadowOffsetX=0,t.shadowOffsetY=0),t.imageSmoothingEnabled=0,t.drawImage(at,et.punkOffsetX,et.punkOffsetY,24*n,24*n),s.dark&&(t[T]="transparent",t[x]=0),Qe(t,n),Cn(t),Hn(t,a,o,r,i,n);const l=et.punkOffsetY+24*n,f=et.canvasWidth/2;t.textBaseline="alphabetic",t.letterSpacing="0px";const c=l+et.attributesTitleOffsetY+25;t.font=`bold ${et.attributesTitleFontSize}px 'Helvetica Neue', Helvetica, Arial, sans-serif`;const h="Attributes: ",d=t.measureText(h).width;t.font=`bold ${et.attributesTextFontSize}px 'Helvetica Neue', Helvetica, Arial, sans-serif`;const u="VR-MOD, Hot-Cap, Not-Legit",p=f-(d+t.measureText(u).width)/2;t.font=`bold ${et.attributesTitleFontSize}px 'Helvetica Neue', Helvetica, Arial, sans-serif`,t[k]="#000000",t.textAlign="left",t[T]="rgba(255, 255, 255, 0.6)",t[x]=4,t.shadowOffsetX=0,t.shadowOffsetY=0,t.fillText(h,p,c),t[T]="transparent",t[x]=0,t.font=`bold ${et.attributesTextFontSize}px 'Helvetica Neue', Helvetica, Arial, sans-serif`,t[k]="#ff00fc",t[T]="rgba(0, 0, 0, 0.5)",t[x]=6,t.shadowOffsetX=2,t.shadowOffsetY=2,t.fillText(u,p+d,c),t[T]="transparent",t[x]=0,t.shadowOffsetX=0,t.shadowOffsetY=0,t[k]="#000000",t[_](0,0,e.width,5),t[_](0,e.height-5,e.width,5),t[_](0,0,5,e.height),t[_](e.width-5,0,5,e.height),t[_](0,et.topImageHeight-2.5,e.width,5),Pn(t,r),Dn(t),rt=requestAnimationFrame(()=>Bn(t,e))}function Hn(t,e,n,a,o,r){if(t.save(),t[y](),t.rect(e,n,a,o),t.clip(),t[k]="#000000",t[_](e,n,a,o),"CRT_power_on"===ft||"CRT_power_off"===ft){const r=e+a/2,i=n+o/2,s=parseInt(Fe.slice(1,3),16),l=parseInt(Fe.slice(3,5),16),f=parseInt(Fe.slice(5,7),16);if("dot"===we||"dot_pause"===we){const e="dot_pause"===we?1:Te,n=2+4*e,a=1+1*e;t[T]=Fe,t[x]=8+6*e,t[k]=Fe,t[_](r-n/2,i-a/2,n,a),t[x]=15,t[v]=.6,t[_](r-n/2,i-a/2,n,a),t[v]=1,t[x]=0}else if("expand_h"===we){const e=6+Te*(a-6),n=2+1*Te;t[T]=Fe,t[x]=12,t[k]=Fe,t[_](r-e/2,i-n/2,e,n),t[x]=20,t[v]=.5,t[_](r-e/2,i-n/2,e,n),t[v]=1,t[x]=0}else if("expand_v"===we){const n=a,r=3+Te*(o-3);t[T]=Fe,t[x]=10,t[k]=Fe,t[_](e,i-r/2,n,r),t[x]=0}else if("flash"===we){const r=1-.85*Te;t[k]=`rgba(${s}, ${l}, ${f}, ${r})`,t[_](e,n,a,o)}else if("off_flash"===we){const r=.15+.85*(1-Te);t[k]=`rgba(${s}, ${l}, ${f}, ${r})`,t[_](e,n,a,o)}else if("off_collapse_v"===we){const n=a,r=3+(1-Te)*(o-3);t[T]=Fe,t[x]=10,t[k]=Fe,t[_](e,i-r/2,n,r),t[x]=0}else if("off_collapse_h"===we){const e=1-Te,n=6+e*(a-6),o=2+1*e;t[T]=Fe,t[x]=12,t[k]=Fe,t[_](r-n/2,i-o/2,n,o),t[x]=20,t[v]=.5,t[_](r-n/2,i-o/2,n,o),t[v]=1,t[x]=0}else if("off_dot"===we){const e=1-Te,n=2+4*e,a=1+1*e,o=e;t[T]=Fe,t[x]=8+6*e,t[k]=`rgba(${s}, ${l}, ${f}, ${o})`,t[_](r-n/2,i-a/2,n,a),t[x]=0}if(et.scanLinesEnabled){t[k]=`rgba(0, 0, 0, ${.7*et.scanLineOpacity})`;for(let r=n;r<n+o;r+=et.scanLineSpacing)t[_](e,r,a,1)}return void t.restore()}if(Bt&&me){const r=Math.max(2,Math.round(.06*a)),i=Math.max(1,Math.round(.03*a)),s=C((a-2*r-5*i)/6),l=o-4,f=Math.max(2,Math.round(l/8)),c=1;if(1===Wt)for(let t=0;t<6;t++)Math.abs(Lt[t]-Pt[t])<.02&&(Pt[t]=.1+.9*S(),Nt[t]=.02+.04*S()),Lt[t]<Pt[t]?(Lt[t]+=Nt[t]*d,Lt[t]>Pt[t]&&(Lt[t]=Pt[t])):(Lt[t]-=.7*Nt[t]*d,Lt[t]<Pt[t]&&(Lt[t]=Pt[t]));else if(2===Wt){const t=Xt/$t%16;for(let e=0;e<6;e++){let n=0;for(let a=0;a<zt[e].length;a++){const o=zt[e][a],r=Math.abs(t-o),i=Math.abs(t-o-16);if(Math.min(r,i)<.15){n=Vt[e];break}}n>0?Lt[e]=n*(.85+.15*S()):(Lt[e]-=Ut[e]*d,Lt[e]<.05&&(Lt[e]=.05))}Xt+=d,Xt>=Gt&&(Xt=0)}else if(3===Wt){for(let t=0;t<6;t++){const e=Math.sin(jt+t*qt);Lt[t]=.15+.425*(e+1)}jt+=Kt*d}for(let a=0;a<6;a++){const h=e+r+a*(s+i),d=Math.round(Lt[a]*l),u=Math.max(1,C(d/(f+c)));t[T]=Yt[a],t[x]=4;for(let e=0;e<u;e++){const r=n+o-2-e*(f+c)-f;t[k]=Yt[a],t[_](h,r,s,f)}t[x]=0}if(et.scanLinesEnabled){t[k]=`rgba(0, 0, 0, ${et.scanLineOpacity})`;for(let r=n;r<n+o;r+=et.scanLineSpacing)t[_](e,r,a,1)}return void t.restore()}if(Jt&&me){var i=n+.62*o;t[v]=.15,t.strokeStyle="#004400",t.lineWidth=1;for(var s=a/8,l=1;l<8;l++){var f=e+l*s;t[y](),t.moveTo(f,n),t.lineTo(f,n+o),t.stroke()}for(var c=o/4,h=1;h<4;h++){var u=n+h*c;t[y](),t.moveTo(e,u),t.lineTo(e+a,u),t.stroke()}t[v]=1,Qt+=ne*d,Qt>1&&(Qt-=1,re++,ce=fe()),Zt.push({x:Qt,val:function(){var t=Qt%1;t<0&&(t+=1);for(var e=0;e<ce.length;e++){var n=ce[e];if(t>=n.start&&t<n.end){var a=(t-n.start)/(n.end-n.start);return n.fn(a)}}return 0}()});for(var p=Math.round(.95/(ne*d));Zt.length>p;)Zt.shift();t.strokeStyle=te,t.lineWidth=2,t[T]=ee,t[x]=8,t[y]();for(var g=0,b=0;b<Zt.length-1;b++){var m=Zt[b],w=Zt[b+1];if(Math.abs(w.x-m.x)>.1)g=0;else{var M=(Zt.length-1-b)/Zt.length;t[v]=.3+.7*(1-M);var E=e+m.x*a,O=i-m.val*(.45*o),I=e+w.x*a,A=i-w.val*(.45*o);g||(t.moveTo(E,O),g=1),t.lineTo(I,A)}}if(t[v]=1,t.stroke(),Zt.length>0){var R=Zt[Zt.length-1],D=e+R.x*a,F=i-R.val*(.45*o);t[k]="#ffffff",t[T]=te,t[x]=12,t[y](),t.arc(D,F,2.5,0,2*Math.PI),t.fill()}if(t[x]=0,et.scanLinesEnabled){t[k]="rgba(0, 0, 0, "+et.scanLineOpacity+")";for(var W=n;W<n+o;W+=et.scanLineSpacing)t[_](e,W,a,1)}return void t.restore()}if("function"==typeof Sn&&Sn(t,e,n,a,o,r))return void t.restore();const B=et.fontBold?"bold":"normal",H=vt?"italic":"normal",Y=r*et.fontSize;t.font=`${H} ${B} ${Y}px ${et.fontFamily}`,t.textBaseline="middle";const L=n+o/2+2;let P=1,N=et.scrollText;if("blank"===ft||"CRT_standby"===ft||"CRT_post_blank"===ft||"CRT_post_flash_blank"===ft?P=0:"typewriter_blink"===ft?(P=dt,gt.length>0&&(N=gt[gt.length-1].replace(/_/g," "))):"error_flash"===ft?(P=dt,N="ERROR!!!"):"manic_glitch"===ft?N=xt.join(""):"typing"===ft?N=et.scrollText.substring(0,ut).replace(/_/g," "):"word_typing"===ft?N=gt[bt].substring(0,mt).replace(/_/g," "):"word_pause"===ft?N=gt[bt].replace(/_/g," "):"scrolling"===ft?N=et.scrollText.replace(/_/g," "):"exit_anim"===ft&&(P=0),P&&st){t[T]=st.glow,t[x]=et.glowBlur1,t[k]=st.color;const n=e+a/2;if("scrolling"===ft)t.fillText(N,e+kt,L);else{const e=n-t.measureText(N).width/2;t.fillText(N,e,L)}if(t[x]=et.glowBlur2,t[v]=et.glowIntensity,"scrolling"===ft)t.fillText(N,e+kt,L);else{const e=n-t.measureText(N).width/2;t.fillText(N,e,L)}t[v]=1,t[x]=0}if("exit_anim"===ft&&st){if(0===It.length){const r=e+a/2;let i=et.scrollText;gt.length>0&&(i=gt[gt.length-1]),Ft(i,t,r,L,a,o,e,n)}t[T]=st.glow,t[k]=st.color,t[x]=et.glowBlur1;for(let e=0;e<It.length;e++){const n=It[e];t.fillText(n.char,n.x,n.y)}t[x]=et.glowBlur2,t[v]=et.glowIntensity;for(let e=0;e<It.length;e++){const n=It[e];t.fillText(n.char,n.x,n.y)}t[v]=1,t[x]=0}if(et.scanLinesEnabled){t[k]=`rgba(0, 0, 0, ${et.scanLineOpacity})`;for(let r=n;r<n+o;r+=et.scanLineSpacing)t[_](e,r,a,1)}t.restore()}function Yn(t,e){const n=M[W],a=n.colors,o=n.accent,r=Math.ceil(t/H),i=Math.ceil(e/H),s=[];for(let t=0;t<i;t++)for(let e=0;e<r;e++){let n;n=A()<.08?o[C(A()*o.length)]:a[C(A()*a.length)],s.push({col:e,row:t,color:n})}return{pattern:s,cols:r,rows:i}}function Ln(t,e,n,a,o){if("undefined"!=typeof SOLID&&""!==SOLID)return t[v]=Y,t[k]="#"+SOLID,t[_](e,n,a,o),void(t[v]=1);if(N&&(U&&(V+=.06666666666666667,V>=1&&(L=z,z=null,U=0,V=0)),$++,$>=G[X]&&!U)){$=0;var r=Yn(a,o);X<=2?(z=r,U=1,V=0):L=r}L||(L=Yn(a,o)),t[v]=Y;for(const a of L.pattern){const o=e+a.col*H,r=n+a.row*H;t[k]=a.color,t[_](o,r,H,H)}if(U&&z){t[v]=Y*V;for(const a of z.pattern){const o=e+a.col*H,r=n+a.row*H;t[k]=a.color,t[_](o,r,H,H)}}t[v]=1}function Pn(t,e){if(it)switch(ft){case"typing":pt++,pt>=et.typewriterSpeed&&(pt=0,ut++,ut>=et.scrollText.length&&(ft="typewriter_pause",ct=0));break;case"typewriter_pause":ct++,ct>=(Ae?et.introTypewriterPauseDuration:et.typewriterPauseDuration)&&(ft="exit_anim",ct=0);break;case"typewriter_blink":ct++,dt&&ct>=et.typewriterBlinkOnDuration?(dt=0,ct=0):!dt&&ct>=et.typewriterBlinkOffDuration&&(dt=1,ct=0,ht++,ht>=et.typewriterBlinkCount&&(ft="exit_anim",ct=0));break;case"exit_anim":let t=1;for(let e=0;e<It.length;e++){const n=It[e];n.dx+=n.dx>0?Mt:n.dx<0?-Mt:0,n.dy+=n.dy>0?Mt:n.dy<0?-Mt:0,n.x+=n.dx,n.y+=n.dy,n.y>n.topEdge&&n.y<n.bottomEdge&&n.x>n.leftEdge&&n.x<n.rightEdge&&(t=0)}t&&(ft="blank",ct=0,It=[],Dt="");break;case"word_typing":wt++,wt>=et.wordTypeSpeed&&(wt=0,mt++,mt>=gt[bt].length&&(ft="word_pause",ct=0));break;case"word_pause":ct++;let n=bt+1,a=0;for(;n<gt.length;){const t=Ne(gt[n]);if(!(t>0))break;a=t,n++}const r=n>=gt.length,i=a>0?a:r?et.lastWordPauseDuration:et.wordPauseDuration;ct>=i&&(r?(ft="exit_anim",ct=0):(bt=n,mt=0,wt=0,ft="word_typing"));break;case"blank":if(ct++,ct>=et.blankDuration){if(Ae=0,Ie.length>0){let t=Ie.shift();if(Ae=1,t=t.replace("{tokenId}",lt),t.startsWith("*")?(vt=1,t=t.substring(1)):vt=0,Dt="",t.startsWith("^")&&t.length>=2){const e=t.charAt(1);Ot[e]&&(Dt=Ot[e],t=t.substring(2))}st=et.neonColors[0],t.startsWith(">")?(et.scrollText=t.substring(1).trim(),kt=e,_t=0,ft="scrolling"):(et.scrollText=t,t.length<=et.maxTypewriterLength?(ft="typing",ut=0,pt=0):(gt=t.trim().split(/\s+/),bt=0,mt=0,wt=0,ft="word_typing"))}else if(S()<et.manicGlitchChance&&!de&&!ue){st={color:"#ff0000",glow:"#ff0000"},ft="manic_glitch",ct=0,Tt=0,xt=[];for(let t=0;t<et.manicCharCount;t++)xt.push(et.manicChars.charAt(C(S()*et.manicChars.length)))}else{let t;if(de&&o)t=o;else if(ue){const e=et.messagesArray;t=e[pe%e.length],pe++,st=et.neonColors[ge%et.neonColors.length],ge++}else{const e=et.messagesArray;t=e[he%e.length],he++}if(t=t.replace("{tokenId}",lt),t.startsWith("*")?(vt=1,t=t.substring(1)):vt=0,Dt="",t.startsWith("^")&&t.length>=2){const e=t.charAt(1);Ot[e]&&(Dt=Ot[e],t=t.substring(2))}t.startsWith(">")?(et.scrollText=t.substring(1).trim(),ue||(st=de?{color:"#fcdb3b",glow:"#fcdb3b"}:et.neonColors[0]),kt=e,_t=0,ft="scrolling"):"ERROR!!!"===t?(et.scrollText=t,ue||(st={color:"#ff0000",glow:"#ff0000"}),ft="error_flash",ct=0,ht=0,dt=1):(et.scrollText=t,ue||(st=de?{color:"#fcdb3b",glow:"#fcdb3b"}:et.neonColors[0]),et.scrollText.length<=et.maxTypewriterLength?(ft="typing",ut=0,pt=0):(gt=et.scrollText.trim().split(/\s+/),bt=0,mt=0,wt=0,ft="word_typing"))}ct=0}break;case"error_flash":if(ct++,dt&&ct>=et.typewriterBlinkOnDuration)dt=0,ct=0;else if(!dt&&ct>=et.typewriterBlinkOffDuration&&(dt=1,ct=0,ht++,ht>=5)){ft="manic_glitch",ct=0,Tt=0,xt=[];for(let t=0;t<et.manicCharCount;t++)xt.push(et.manicChars.charAt(C(S()*et.manicChars.length)))}break;case"manic_glitch":if(ct++,Tt++,Tt>=et.manicSpeed){Tt=0;const t=C(S()*xt.length);if(xt[t]=et.manicChars.charAt(C(S()*et.manicChars.length)),S()<.15){const t=et.neonColors;st=t[C(S()*t.length)]}}ct>=et.manicDuration&&(Oe?(Oe=0,ft="CRT_post_blank"):ft="blank",ct=0);break;case"scrolling":if(kt-=et.scrollSpeed,0===_t){const t=document.createElement("canvas").getContext("2d"),e=et.punkScale*et.fontSize;t.font=`${et.fontBold?"bold":"normal"} ${e}px ${et.fontFamily}`,_t=t.measureText(et.scrollText).width}kt<-_t&&(ft="blank",ct=0,_t=0);break;case"CRT_power_on":xe++,"dot"===we?(Te=xe/ke,xe>=ke&&(we="dot_pause",xe=0,Te=0)):"dot_pause"===we?xe>=_e&&(we="expand_h",xe=0,Te=0):"expand_h"===we?(Te=1-Math.pow(1-xe/ve,2),xe>=ve&&(we="expand_v",xe=0,Te=0)):"expand_v"===we?(Te=1-Math.pow(1-xe/ye,2),xe>=ye&&(we="flash",xe=0,Te=0)):"flash"===we&&(Te=xe/Se,xe>=Se&&(Me++,Me<Ce?(xe=0,Te=0):(we="idle",xe=0,Te=0,ft="CRT_post_flash_blank",ct=0)));break;case"CRT_standby":break;case"CRT_post_flash_blank":if(ct++,ct>=Ee){Oe=1,st={color:"#ff0000",glow:"#ff0000"},ft="manic_glitch",ct=0,Tt=0,xt=[];for(let t=0;t<et.manicCharCount;t++)xt.push(et.manicChars.charAt(C(S()*et.manicChars.length)))}break;case"CRT_post_blank":ct++,ct>=Ee&&(me=1,ft="blank",ct=et.blankDuration);break;case"CRT_power_off":xe++,"off_flash"===we?(Te=xe/Se,xe>=Se&&(we="off_collapse_v",xe=0,Te=0)):"off_collapse_v"===we?(Te=1-Math.pow(1-xe/ye,2),xe>=ye&&(we="off_collapse_h",xe=0,Te=0)):"off_collapse_h"===we?(Te=1-Math.pow(1-xe/ve,2),xe>=ve&&(we="off_dot",xe=0,Te=0)):"off_dot"===we&&(Te=xe/ke,xe>=ke&&(we="idle",xe=0,Te=0,me=0,ft="CRT_standby",ct=0))}}window.addEventListener("load",Fn);