<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <script src="/content/7e37766541506810ba6399c4b2735121f508bd9209df43dd200bf2316b014594i0"></script> </head> <div id="viewer"></div> <input id="blk" type="number" value="012356" style="display:none;" /> <script id="preview" mint="MINT_INSCRIPTION_ID"> let colors=["#e94000","#00A28A","#00A900","#FFD400","#959898","#B36CFF","#6089FF","#c18300","#FF3CAE","#FF002C"],backgroundColors={0:"#C5FAF9",1:"#00A28A",2:"#00A900",3:"#FFD400",4:"#6089FF",5:"#FF3CAE",6:"#B36CFF",7:"#959898",8:"#FF002C",9:"#c18300"},blockNumber=0,blockNumberStr=blockNumber.toString(),reversedBlockNumber=blockNumberStr.split("").reverse().join(""),mintText=document.getElementById("preview").getAttribute("mint");if(mintText.includes("MINT_INSCRIPTION_ID")){let e=document.getElementById("blk");e.style.display="block",e.style.position="absolute",e.style.fontSize="20px",e.style.margin="20px",e.style.top="0",e.value=blockNumber,e.addEventListener("input",(e=>{blockNumber=parseInt(e.target.value),blockNumberStr=blockNumber.toString(),reversedBlockNumber=blockNumberStr.split("").reverse().join(""),draw()}))}else{const e=new XMLHttpRequest;e.open("GET","/content/"+mintText),e.responseType="text",e.onload=()=>initialize(e.response),e.onerror=()=>console.error("XHR error"),e.send()}function initializeViewer(){const e=document.getElementById("blk");e&&(e.style.display="block",e.addEventListener("input",(e=>{blockNumber=parseInt(e.target.value),reversedBlockNumber=blockNumberStr.split("").reverse().join(""),redraw()}))),redraw()}let firstChar=blockNumberStr.charAt(0),lastChar=blockNumberStr.charAt(blockNumberStr.length-1),headgearStyleIndex=parseInt(reversedBlockNumber.charAt(0)),irisColorIndex=parseInt(reversedBlockNumber.charAt(0)),headColorIndex=parseInt(reversedBlockNumber.charAt(1)),mouthDigit=parseInt(reversedBlockNumber.charAt(3)),noseColorIndex=parseInt(reversedBlockNumber.charAt(4)),headgearColorIndex=parseInt(reversedBlockNumber.charAt(2)),backgroundIndex=parseInt(reversedBlockNumber.charAt(5));function setup(){let e=min(windowWidth,windowHeight);canvas=createCanvas(e,e),canvas.parent("viewer");strokeWeight(2*(e/600))}function draw(){drawBackground(blockNumber),generateBlockheadBasedOnBlockNumber(blockNumber)}function windowResized(){let e=min(windowWidth,windowHeight);resizeCanvas(e,e),strokeWeight(2*(e/600))}function drawBackground(e){let r,l=e.toString(),t=l.split("").reverse().join(""),o=parseInt(t.charAt(5)),c=parseInt(t.charAt(1))%colors.length;r=l.includes("8888")?"#ededed":containsSixDigitPalindrome(l)?"#000000":containsFiveDigitPalindrome(l)?"#4E5454":6===c&&l.includes("3")&&l.includes("2")?"#1F27EB":!isNaN(o)&&backgroundColors.hasOwnProperty(o.toString())?backgroundColors[o.toString()]:"#FF5400 ",e%316==0&&e%12!=0&&e%11!=0?drawGradient():background(r)}function generateBlockheadBasedOnBlockNumber(e){let r=blockNumberStr.split("").reverse().join(""),l=width/2,t=l/3,o=l/3,c=width/2-l/2,n=height-l-o,i=width/3-t/2,d=height-o;headColorIndex=parseInt(r.charAt(1))%colors.length,headColor=colors[headColorIndex%colors.length],applyGoldEffect=!0,headgearStyleIndex=parseInt(r.charAt(0)),0===headgearStyleIndex&&blockNumberStr.includes("6")&&!blockNumberStr.includes("2")&&drawHoodieBackLayer(c,n,l,i,d,t,o),containsSixDigitPalindrome(blockNumberStr)?(push(),headColor="#464b4b",applyGoldEffect=!1,stroke("#ededed"),pop()):(push(),stroke(0),e%111==0&&e%69!=0&&e%16!=0?(headColor="#C5FAF9",applyGoldEffect=!0):parseInt(e)%69==0&&parseInt(e)%16==0||parseInt(e)%69==0?headColor="#000000":parseInt(e)%16==0?headColor="#ededed":6===headColorIndex&&blockNumberStr.includes("3")&&blockNumberStr.includes("2")&&(headColor="#95ADF1"),pop()),parseInt(e)%69==0?stroke("#4E5454"):parseInt(e)%16==0||6===headColorIndex&&blockNumberStr.includes("3")&&blockNumberStr.includes("2")?stroke(0):e%111==0&&e%69!=0&&e%16!=0?(headColor="#C5FAF9",applyGoldEffect=!0,stroke(0)):stroke(0),applyGoldEffect&&3===headColorIndex&&blockNumberStr.includes("7")&&blockNumberStr.includes("9")&&gold(c,n,l,l),fill(headColor),3===headColorIndex&&blockNumberStr.includes("7")&&blockNumberStr.includes("9")&&gold(i,d,t,o),rect(i,d,t,o);let a=l/5,s=c-a,u=n+3*l/6-a/2;3===headColorIndex&&blockNumberStr.includes("7")&&blockNumberStr.includes("9")?9===headgearStyleIndex&&blockNumberStr.includes("6")?(fill(headColor),rect(s,u,a,a)):gold(s,u,a,a):(fill(headColor),rect(s,u,a,a)),rect(s,u,a,a),fill(headColor),rect(c,n,l,l),function(e){for(let r=0;r<=e.length-6;r++){let l=e.substring(r,r+6);if(le(parseInt(l)))return!0}return!1}(e)&&drawIpodNextToHead(c,n,l,headColor,blockNumberStr),blockNumberStr.includes("123")&&drawTopEarPiercing(c,n-l,l),blockNumberStr.includes("345")&&drawLittleWhiteSquare(c,n,l);[1,7,3,0].includes(headgearStyleIndex)&&r.includes("8")&&!r.includes("6")&&!r.includes("2")&&drawHalo(c,n-l/10,l),irisColor=e%111==0&&e%69!=0&&e%16!=0?"#6CED2E":colors[irisColorIndex%colors.length];let b=l/5,f=l/5,h=c+4*l/9,w=n+l/3.5,p=c+l-b,F=w;1===headColorIndex&&blockNumberStr.includes("2")&&blockNumberStr.includes("8")&&drawZombieEyes(c,n,l,b,f,h,w,p,F);let k=blockNumberStr.includes("15")&&blockNumberStr.includes("3")&&e%101!=0&&e%60!=0&&e%220!=0&&e%33!=0&&e%35!=0&&e%37!=0&&e%39!=0&&e%31!=0&&e%32!=0&&e%44!=0&&e%41!=0&&e%34!=0&&e%38!=0,g=blockNumberStr.includes("16")&&blockNumberStr.includes("4")&&e%101!=0&&e%60!=0&&e%220!=0&&e%33!=0&&e%35!=0&&e%37!=0&&e%39!=0&&e%31!=0&&e%32!=0&&e%44!=0&&e%41!=0&&e%34!=0&&e%38!=0;k?drawEyeMask(c,n,l,h,w,p,F,b,f):g&&!k&&drawGlasses(c,n,l,b,f,h,w,p,F),e%111==0&&e%69!=0&&e%16!=0&&drawAlienEyeStripe(h,w,p,F,b,f),blockNumberStr.includes("333")&&drawClownEyes(c,n,l,b,f,h,w,p,F,r),e%101==0&&drawEyelashes(h,w,p,F,b,f),irisColorIndex=parseInt(r.charAt(0)),fill(irisColor),rect(h,w,b,f),rect(p,F,b,f);let m,S=parseInt(e.slice(-4));m=S<3700?"right":S>4300?"left":"cross-eyed";let C,N=f/4;"right"===m?C=b/4:"left"===m&&(C=-b/4),fill(irisColor),rect(p,F,b,f);var I="#000000";if(1===headColorIndex&&blockNumberStr.includes("2")&&blockNumberStr.includes("8")&&(I="#FF0000"),"cross-eyed"===m?(fill(I),rect(h+b/4+b/4,w+N,b/2,f/2),fill(I),rect(p+b/4-b/4,F+N,b/2,f/2)):(fill(I),rect(h+b/4+C,w+N,b/2,f/2),fill(I),rect(p+b/4+C,F+N,b/2,f/2)),2===headColorIndex&&blockNumberStr.includes("5")&&blockNumberStr.includes("3")){let e=colors[headColorIndex];drawEyelids(h,w,b,f,e),drawEyelids(p,F,b,f,e)}let D=h+b/4+C+b/4,E=w+N+f/4;(function(e){for(let r=0;r<=e.length-4;r++){let l=e.substring(r,r+4);if(le(parseInt(l)))return!0}return!1})(e)&&(drawEyeGlow(h,w,b,f,headColorIndex),drawEyeGlow(p,F,b,f,headColorIndex));let A=e%44==0&&!(e%12==0||e%220==0||e%33==0||e%35==0),B=blockNumberStr.includes("11111"),x=!B&&blockNumberStr.includes("1111"),y=!B&&!x&&blockNumberStr.includes("111"),v=!B&&!x&&!y&&blockNumberStr.includes("11"),H=blockNumberStr.includes("2");B?function(){let e=1*o,r=10,l=t/r,c=["#00A28A","#00A900","#FFD400","#FF3CAE","#FF002C","#B36CFF","#6089FF"],n=i;for(let t=0;t<r;t++)fill(c[t%9+1]),rect(n,d,l,e),n+=l}():x?function(){let e=o,r=10,l=t/r,c=i;for(let t=0;t<r;t++)fill(t%2==0?"black":"#ededed"),rect(c,d,l,e),c+=l}():y?function(){let e=10,r=1*o/e,l=["#00A28A","#00A900","#FFD400","#FF3CAE","#FF002C","#B36CFF","#6089FF"],c=d;for(let o=0;o<e;o++)fill(l[o%6+1]),rect(i,c,t,r),c+=r}():v&&H&&function(){let e=o/10,r=d;for(let l=0;l<10;l++)fill(l%2==0?"black":"#ededed"),rect(i,r,t,e),r+=e}(),blockNumberStr.includes("21")?drawBowtie(i,d,t,o,"#FF002C"):blockNumberStr.includes("78")&&drawBowtie(i,d,t,o,"#464b4b"),e%12==0?drawChoker(i,d,t,o,"black"):e%13==0?drawChoker(i,d,t,o,"gold"):e%15==0?drawChoker(i,d,t,o,"spiked"):e%14==0&&drawChoker(i,d,t,o,"rainbow"),e%17==0?drawChain(i,d,t,o,"gold"):e%19==0&&drawChain(i,d,t,o,"silver"),blockNumberStr.includes("18")&&blockNumberStr.includes("3")?drawMustache(c,n,l):blockNumberStr.includes("63")&&blockNumberStr.includes("1")?drawBeardShadow(c,n,l):blockNumberStr.includes("71")&&blockNumberStr.includes("3")?drawBigBeard(c,n,l):blockNumberStr.includes("12")&&blockNumberStr.includes("4")?drawGoatee(c,n,l):blockNumberStr.includes("1")&&blockNumberStr.includes("15")?drawBeard(c,n,l):blockNumberStr.split("5").length-1>=3&&drawVendetta(c,n,l),2===headgearStyleIndex&&blockNumberStr.includes("12")&&blockNumberStr.includes("9")&&drawBackSideBob(c,n,l,r,headgearColorIndex),A||(e%12!=0||e%56==0||blockNumberStr.includes("15")&&blockNumberStr.includes("3")?e%220==0?drawColoredSunglasses(c,n,l,b,f,h,w,p,F):e%33==0?draw3DGlasses(c,n,l,b,f,h,w,p):e%35==0?drawRedNounGlasses(c,n,l,b,f,h,w,p):e%37==0&&blockNumberStr.includes("2")?drawBlueNounGlasses(c,n,l,b,f,h,w,p,F):e%39==0?drawDMTGlasses(c,n,l,b,f,h,w,p):e%31==0?drawRainbowSunglasses(c,n,l,b,f,h,w,p):e%32==0?drawEyePatch(c,n,l,b,f,h,w):e%34==0?drawBugGlasses(c,n,l,b,f,h,w,p,r):e%41==0?drawWhiteSunglasses(c,n,l,b,f,h,w,p,r):e%38==0&&drawStripedGlasses(c,n,l,b,f,h,w,p,r):drawSunglasses(c,n,l,b,f,h,w,p,F)),noseColorIndex=parseInt(r.charAt(4));let G,M,T,R,P=colors[noseColorIndex%colors.length];e%111==0&&e%69!=0&&e%16!=0?P="#9BE0E0":parseInt(e)%16==0&&(P="#464b4b"),e%111==0&&e%69!=0&&e%16!=0?(G=l/10,M=l/8):(G=l/10,M=l/12),T=c+(l-G)/1.29,R=w+f,fill(P),rect(T,R,G,M),blockNumberStr.includes("1")&&blockNumberStr.includes("7")&&blockNumberStr.includes("0")&&blockNumberStr.includes("9")&&drawNoseStud(T,R,G,M),blockNumberStr.includes("333")&&drawClownNose(c,n,l,w,f,r),blockNumberStr.includes("21")&&drawMole(c,n,l),function(e){let r=function(){let e=[144],r=0,l=144,t=233;for(;r<=987;)r=l+t,r<=987&&e.push(r),l=t,t=r;return e}();for(let l of r)if(e.includes(l.toString()))return!0;return!1}(e)&&function(){let e=.5*G,r=h+.5*b-e/2,l=w+1.4*f;fill("#6089FF"),rect(r,l,e,e)}(),mouthDigit=parseInt(r.charAt(3));let L=colors[mouthDigit%colors.length];7===mouthDigit&&(L="#EDEDED");let W=.6*l,j=l/10,O=c+.3*l,V=R+.23*l;1===headColorIndex&&blockNumberStr.includes("2")&&blockNumberStr.includes("8")&&drawZombieBlood(O,V,W,j),blockNumberStr.includes("333")&&drawClownMouth(O,V,W,j),2===headColorIndex&&blockNumberStr.includes("5")&&blockNumberStr.includes("3")&&drawPepeMouth(O,V,W,j);let q=blockNumberStr.includes("99999"),z=!q&&blockNumberStr.includes("9999"),J=!q&&blockNumberStr.includes("999"),X=!q&&!z&&blockNumberStr.includes("499"),Z=!q&&!z&&!J&&!X&&blockNumberStr.includes("2")&&blockNumberStr.includes("99"),_=W/6,U=3===(blockNumberStr.match(/7/g)||[]).length,K=3===(blockNumberStr.match(/4/g)||[]).length;for(let e=0;e<6;e++){let l=O+e*j;if(e===Math.floor(3)-1&&q)fill("#000000"),rect(l,V,j,j);else if(z){fill(["#00A28A","#00A900","#FFD400","#FF3CAE","#FF002C","#B36CFF","#6089FF"][e%8+1]);let r=O+Math.random()*(W-j);rect(r,V,j,j)}else if(J){fill(["#00A28A","#00A900","#FFD400","#FF3CAE","#FF002C","#B36CFF","#6089FF"][e%6+1]),rect(O+e*j,V,j,j)}else X?(fill("#000000"),rect(O+e*j,V,j,j)):Z?(fill(e%2==0?"#ededed":"#464b4b"),rect(O+e*j,V,j,j)):2===e&&blockNumberStr.includes("18")&&blockNumberStr.includes("2")?drawGoldTooth(l,V,_,r):U?(fill(L),5===e||2===e?rect(l,V,j,1.4*j):rect(l,V,j,j)):K?(fill(L),3===e||4===e?rect(l,V,j,1.4*j):rect(O+e*j,V,j,j)):(fill(L),rect(O+e*j,V,j,j))}containsFiveDigitFibonacci(e)&&drawMouthBling(O,V,W,j),function(e){for(let r=0;r<=e.length-5;r++){let l=e.substring(r,r+5);if(le(parseInt(l)))return!0}return!1}(e)&&drawGoldGrills(O,V,W,j,6),blockNumberStr.includes("00000")?(drawEarring(a,s,u,"#FFD400"),drawRainbowCheek(O,V,l)):blockNumberStr.includes("0000")?(drawEarring(a,s,u,"#FFD400"),drawOrdinalCheek(O,V,l)):blockNumberStr.includes("000")?(drawEarring(a,s,u,"#FFD400"),drawSquareCheek(O,V,l),drawBraces(O,V,W,j,6)):blockNumberStr.includes("00")?(drawEarring(a,s,u,"#FFD400"),drawSquareCheek(O,V,l)):blockNumberStr.includes("0")&&drawEarring(a,s,u,"#FFD400"),blockNumberStr.includes("0")&&blockNumberStr.includes("5")&&drawEarring(a,s,u,"#6089FF"),blockNumberStr.includes("666")&&drawTattoo(c,n,l),r=blockNumberStr.split("").reverse().join(""),headgearColorIndex=parseInt(r.charAt(2)),headgearStyleIndex=parseInt(r.charAt(0)),function(e,r,l,c){switch(c=blockNumberStr.split("").reverse().join(""),headgearStyleIndex){case 0:blockNumberStr.includes("742600")?drawDMTCrown(e,r,l):blockNumberStr.includes("742560")?drawIceCrown(e,r,l,colors,headgearColorIndex):blockNumberStr.includes("2")?drawCrown(e,r,l,colors,headgearColorIndex):blockNumberStr.includes("3")?drawFadeCut(e,r,l):drawBindi(e,r,l,h,w,p,F);break;case 1:blockNumberStr.includes("743461")?drawJewelledCrown(e,r,l,colors,headgearColorIndex):blockNumberStr.includes("6")&&blockNumberStr.includes("9")?drawDynastyHat(e,r,l):blockNumberStr.includes("4")?drawHeadband(e,r,l):function(e,r,l,t){let o=colors[headgearColorIndex%colors.length];fill(o);let c=1*l,n=l/4.5,i=e-(c-l)/2.3,d=r-.2*n;rect(i,d,c,n)}(e,r,l);break;case 2:blockNumberStr.includes("38582")||blockNumberStr.includes("192572")?drawRegalCrown(e,r,l,colors):blockNumberStr.includes("12")&&blockNumberStr.includes("9")?drawSideBob(e,r,l,c,headgearColorIndex):blockNumberStr.includes("3")?drawBowlerHat(e,r,l):function(e,r,l,t){let o=colors[headgearColorIndex%colors.length];fill(o);let c=1*l,n=l/4.5,i=e-(c-l)/2,d=r-.4*n;rect(i,d,c,n);let a=.8*l,s=r/1.6;rect(i+c-a,s,a,1.72*n)}(e,r,l);break;case 3:blockNumberStr.includes("39643")?drawJewelledCrown(e,r,l,colors,headgearColorIndex):blockNumberStr.includes("5")?drawSummerStrawHat(e,r,l,c):!blockNumberStr.includes("43")||c.includes("8")||c.includes("6")||c.includes("2")?function(e,r,l,t){let o=colors[headgearColorIndex%colors.length];fill(o);let c=1*l,n=l/4.5,i=e-(c-l)/2,d=r-.2*n;rect(i,d,c,n);let a=.8*l,s=r;rect(i+c-a,s,a,.9*n)}(e,r,l):drawVikingHat(e,r,l);break;case 4:blockNumberStr.includes("22")?drawLongHair(e,r,l,i,d,t,o,headgearColorIndex,colors):blockNumberStr.includes("6")?drawBambooHat(e,r,l,colors,headgearColorIndex):function(e,r,l,t){let o=colors[headgearColorIndex%colors.length];fill(o);let c=1*l,n=l/4.5,i=e-(c-l)/2,d=r-.2*n;rect(i,d,c,n);let a=.8*l;rect(i+c-a,d,a,1.32*n)}(e,r,l);break;case 5:case 5:blockNumberStr.includes("449955")?drawOpulentCrown(e,r,l,colors):blockNumberStr.includes("7")&&blockNumberStr.includes("23")?drawRainbowMohawk(e,r,l):blockNumberStr.includes("4")?drawPeak(e,r,l,colors,headgearColorIndex):function(e,r,l,t){let o=colors[headgearColorIndex%colors.length];fill(o);let c=l/7,n=l/2.5,i=e+(l-c)/2,d=r-n;rect(i,d,c,n)}(e,r,l);break;case 6:blockNumberStr.includes("743886")?drawOpulentCrown(e,r,l,colors):blockNumberStr.includes("7")?drawTopHat(e,r,l):function(e,r,l,t){let o=colors[headgearColorIndex%colors.length];fill(o);let c=1.2*l,n=l/5,i=e-(c-l)/1,d=r-.08*n;rect(i,d,c,n);let a=.8*l,s=1.6*n,u=i+c-a-.05*l;rect(u,d+n-s,a,s)}(e,r,l);break;case 7:blockNumberStr.includes("2")?drawBucketHat(e,r,l):blockNumberStr.includes("4")?drawTiara(e,r,l):function(e,r,l,t){let o=colors[headgearColorIndex%colors.length];fill(o);let c=l,n=l/4,i=e,d=r-n/10;rect(i,d,c,n);let a=l/6,s=.7*n;rect(i-a,d+(n-s)/.3,a,s)}(e,r,l);break;case 8:blockNumberStr.includes("22")?drawShortSpikes(e,r,l):blockNumberStr.includes("5")?drawDevilHorns(e,r,l):function(e,r,l){let t=colors[headgearColorIndex%colors.length];fill(t);let o=1.3*l,c=l/5,n=e,i=r-.08*c;rect(n,i,o,c);let d=.8*l,a=1.6*c;rect(n+(o-d)/5,i+c-a/1,d,a)}(e,r,l);break;case 9:blockNumberStr.includes("69")?drawRainbowDreads(e,r,l):blockNumberStr.includes("6")?drawKeffiyeh(e,r,l,i,d,t,o,c):blockNumberStr.includes("2")?drawLongSpikes(e,r,l):blockNumberStr.includes("7")?drawCowboyHat(e,r,l):function(e,r,l){let t=colors[headgearColorIndex%colors.length];fill(t);let o=1*l,c=l/4,n=e+(l-o)/2,i=r-c/10;rect(n,i,o,c);let d=.6*l,a=c/2,s=e+(l-d)/2;rect(s,i-a,d,a)}(e,r,l);break;default:console.log("No headgear for this digit")}}(c,n,l,r),A&&drawVRHeadset(c,n,b,f,h,w),function(e){let r=function(){let e=[],r=1,l=1;for(;;){let t=r+l;if(t>=1e3&&t<=9999)e.push(t);else if(t>9999)break;r=l,l=t}return e}();for(let e of r)if(blockNumberStr.includes(e.toString()))return!0;return!1}()&&function(e,r,l){let t=.5*l,o=e-t,c=r-t;fill("#FFD400"),rect(o,c,t,t)}(h,w,G);let Q=blockNumberStr.includes("420"),Y=["9","0","2"].every((e=>blockNumberStr.includes(e))),$=["2","1","7"].every((e=>blockNumberStr.includes(e))),ee=["5","3","8","9"].every((e=>blockNumberStr.includes(e))),re=blockNumberStr.includes("54");function le(e){return Math.sqrt(e)%1==0}Q?drawJoint(O,V,l,W,j):Y&&!Q?drawCigarette(O,V,l,W,j):!$||Q||Y?!ee||Q||Y||$?re&&drawSmokePipe(O,V,l,W,j):drawVape(O,V,l,W,j):drawBubblegum(O,V,W,j),shouldDrawLaser(m,blockNumberStr)&&drawLaser(D,E),headgearStyleIndex=parseInt(r.charAt(0)),0===headgearStyleIndex&&blockNumberStr.includes("6")&&!blockNumberStr.includes("2")&&drawHoodieFrontLayer(c,n,l,i,d,t,o,colors,headgearColorIndex)}function drawEarring(e,r,l,t){let o=e/3,c=r,n=l+e-o;fill(t),rect(c,n,o,o)}function drawSquareCheek(e,r,l){let t=l/8*1.2,o=.81*e,c=.89*r;fill("#FF5400"),rect(o,c,t,t)}function drawBraces(e,r,l,t,o){push();let c=t/3;for(let l=0;l<o;l++){let o=e+l*t+(t-c)/2,n=r+(t-c)/2;fill("#EDEDED"),noStroke(),rect(o,n,c,c)}pop(),push(),stroke(0),strokeWeight(2),noFill(),beginShape();for(let l=0;l<o;l++){vertex(e+l*t+(t-c)/2+c/2,r+(t-c)/2+c/2)}endShape(),pop()}function drawGoldGrills(e,r,l,t,o){let c=.6*t;for(let l=0;l<o;l++){let o=e+l*t+(t-c)/2,n=r+(t-c)/2;fill("#FFD400"),rect(o,n,c,c)}}function drawEyeGlow(e,r,l,t,o){let c,n;push(),noFill(),3===o?(c=color("#ededed"),n=120):(c=color("#fff04d"),n=150);let i=1.2*max(l,t);for(let o=0;o<2;o++)strokeWeight(4+2*o),stroke(c.levels[0],c.levels[1],c.levels[2],n-40*o),rect(e+l/2-(i+8*o)/2,r+t/2-(i+8*o)/2,i+8*o,i+8*o);pop()}function drawChoker(e,r,l,t,o){let c=t/4,n=r+t/4;switch(o){case"black":fill("#464b4b"),rect(e,n,l,c);break;case"gold":fill("#FFD400"),rect(e,n,l,c);break;case"rainbow":let r=["#00A28A","#00A900","#FFD400","#FF3CAE","#FF002C","#B36CFF","#6089FF"],t=l/r.length;for(let l=0;l<r.length;l++)fill(r[l]),rect(e+l*t,n,t,c);break;case"spiked":fill("#464b4b"),rect(e,n,l,c);let i="#959898",d=6,a=c/3,s=(l-a*d)/(d+1);for(let r=0;r<d;r++){let l=e+s+r*(a+s);fill(i),rect(l,n+c/3,a,a)}break;default:console.log("No choker drawn. Unknown type:",o)}}function drawBeardShadow(e,r,l){push(),fill(0,0,0,50);let t=l/2.5,o=r+l-t;noStroke(),rect(e,o,l,t),pop()}function drawMustache(e,r,l){push(),fill("#464b4b");let t=l/2;rect(e+(l-t)/1.4,r+l/1.6,t,l/15),pop()}function drawBeard(e,r,l){push(),fill("#464b4b");let t=l/2.5;rect(e,r+l-t,l,t),pop()}function drawGoatee(e,r,l){push(),fill("#8D3D21");let t=l/5,o=l/7;rect(e+(l-t)/1.5,r+l-o/3,t,o),pop()}function drawBigBeard(e,r,l){push(),fill("#8D3D21"),rect(e,r+l/1.67,l,l/2.2),pop()}function drawVendetta(e,r,l){push(),fill("#464b4b");let t=l/2;rect(e+(l-t)/1.4,r+l/1.6,t,l/15);let o=l/5,c=l/7;rect(e+(l-o)/1.5,r+l-c/3,o,c),pop()}function drawLittleWhiteSquare(e,r,l){let t=l/25,o=e+l-t-t,c=r+l-t-t;fill("#EDEDED"),rect(o,c,t,t)}function drawEyelashes(e,r,l,t,o,c){push(),stroke(0),strokeWeight(2);let n=c/3,i=o/9;for(let l=0;l<10;l++){let t=e+i*l;line(t,r,t,r-n)}for(let e=0;e<10;e++){let r=l+i*e;line(r,t,r,t-n)}pop()}function drawMole(e,r,l){let t=l/20,o=l/2.3,c=e+l-t-1.5*o,n=r+l-t-1.1*o;fill("#464b4b"),rect(c,n,t,t)}function drawSunglasses(e,r,l,t,o,c,n,i){push(),fill("#464b4b");let d=1.2*t,a=1.2*o,s=c+(t-d)/2,u=i+(t-d)/2,b=n+(o-a)/2;rect(s,b,d,a),rect(u,b,d,a),rect(s+d,b,u-s-d,a/5),rect(s,b,e-s,a/5),pop()}function drawGlasses(e,r,l,t,o,c,n,i){push(),fill("#464b4b");let d=1.2*t,a=1.2*o,s=c+(t-d)/2,u=i+(t-d)/2,b=n+(o-a)/2;rect(s,b,d,a),rect(u,b,d,a),rect(s+d,b,u-s-d,a/5),rect(s,b,e-s,a/5),pop()}function drawColoredSunglasses(e,r,l,t,o,c,n,i){push();let d=1.2*t,a=1.2*o,s=c+(t-d)/2,u=i+(t-d)/2,b=n+(o-a)/2,f=["#FF3CAE","#FF002C","#B36CFF"],h=a/f.length;for(let e=0;e<f.length;e++)fill(f[e]),rect(s,b+e*h,d,h),rect(u,b+e*h,d,h);fill(f[Math.floor(f.length/2)]),rect(s+d,b,u-s-d,a/5),rect(s,b,e-s,a/5),pop()}function draw3DGlasses(e,r,l,t,o,c,n,i){push(),fill("#EDEDED");let d=1.35*t,a=1.34*o,s=c+(t-d)/2,u=i+(t-d)/2,b=n+(o-a)/2;rect(s,b,d,a),rect(u,b,d,a),rect(s+d,b,u-s-d,a/1.5),rect(s,b,-(s-e),a/2),fill("#6089FF");let f=.2*d;rect(s+f,b+f,d-2*f,a-2*f),fill("#FF002C"),rect(u+f,b+f,d-2*f,a-2*f),pop()}function drawCigarette(e,r,l,t,o){push();let c=l/3,n=l/18,i=e+.95*t,d=r+o/2-n/4;fill("#EDEDED"),rect(i,d,c,n),fill("#e94000");let a=1.5*n;rect(i+c-a,d,a,n),pop()}function drawJoint(e,r,l,t,o){push();let c=l/3,n=l/13,i=e+.95*t,d=r+o/2-n/2.5;fill("#c18300"),rect(i,d,c,n),fill("#e94000");let a=.6*n;rect(i+c-a,d,a,n),pop()}function drawClownEyes(e,r,l,t,o,c,n,i,d,a){push(),fill(irisColor);let s=t/3,u=1.5*t;function b(e,r){rect(e-s/2,r-u/2,s,u),rect(e-u/2,r-s/2,u,s)}b(c+t/2,n+o/2),b(i+t/2,d+o/2),pop()}function drawClownNose(e,r,l,t,o,c){let n=c%111==0&&c%69!=0&&c%16!=0,i=n?1.3:1.1,d=l/12;n&&(d=l/7);let a=l/10*i,s=d*i,u=e+(l-a)/1.29,b=t+o;push(),fill("#FF002C"),rect(u,b,a,s),pop()}function drawClownMouth(e,r,l,t){let o=1.2*l,c=1.2*t*1.2,n=e-(o-l)/1.8,i=r-(c-t)/2;push(),fill("#EDEDED"),rect(n,i,o,c),pop()}function drawHoodieBackLayer(e,r,l,t,o,c,n,i){push(),fill("#000000");let d=1.1*l;rect(e-(d-l)/2,r,d,1.1*l);let a=height-n;rect(e-(d-l)/2,a,1.5*c,n),pop()}function drawHoodieFrontLayer(e,r,l,t,o,c,n,i,d){push(),fill("#464b4b");let a=l+n,s=e-.2*l,u=r,b=.4*l;rect(s,u,b,a);let f=l/2.8;rect(e-.2*l,r-f/4.8,1.25*l,f);let h=i[d%i.length],w=.2*l,p=.8*w,F=.2*w,k=s+b-1.2*w+(w-p)/2,g=u+a-w+(w-F)/2;fill(h),rect(k,g,p,F);let m=p/5.5,S=1.2*F,C=m/2;for(let e=0;e<4;e++){let r=k+(m+C)*e,l=g-S;fill(h),rect(r,l,m,S)}pop()}function drawCrown(e,r,l,t,o){const c="#FFD400";let n=t[o%t.length],i=1*l,d=l/4.5,a=e-(i-l)/2,s=r-.2*d;fill(c),rect(a,s,i,d);let u=i/7,b=1.2*d,f=u/2;for(let e=0;e<5;e++){let r=a+(u+f)*e,l=s-b;fill(c),rect(r,l,u,b),fill(n);let t=.2*u,o=b/3;rect(r+t,l+(b-o)/2,u-2*t,o)}}function drawHalo(e,r,l){let t=.6*l,o=.1*l,c=e+(l-t)/2,n=r-2.5*o;fill("#FFD400"),rect(c,n,t,o)}function gold(e,r,l,t){push(),noFill();let o=1*l,c=1*t;for(let n=0;n<2;n++)strokeWeight(2+3*n),stroke(255,204,0,150-40*n),rect(e+l/2-(o+8*n)/2,r+t/2-(c+8*n)/2,o+8*n,c+8*n);pop()}function drawBubblegum(e,r,l,t){let o=l/2.5,c=o/4.5,n=e+l,i=r+t/2-o/2;fill("#FF3CAE"),rect(n,i,o,o),fill("#FFFFFF"),rect(n+o-c-o/5,i+o/5,c,c)}function drawEyelids(e,r,l,t,o){let c=1.2*l,n=t/2.5,i=e+(l-c)/2,d=r;fill(o),rect(i,d,c,n)}function drawPepeMouth(e,r,l,t){let o=1.33*l,c=1.33*t*1.3,n=e-(o-l)/2,i=r-(c-t)/2;push(),fill("#FF002C"),rect(n,i,o,c),pop()}function generateFiveDigitFibonacciNumbers(){let e=[10946],r=0,l=10946,t=17711;for(;r<=99999;)r=l+t,r<=99999&&e.push(r),l=t,t=r;return e}function containsFiveDigitFibonacci(e){let r=generateFiveDigitFibonacciNumbers();for(let l of r)if(e.includes(l.toString()))return!0;return!1}function drawMouthBling(e,r,l,t){let o=t,c=.4*t,n=Math.floor(l/o),i=e+Math.ceil(n/2)*o-o/2+(o-c)/2,d=r+(t-c)/2;fill("#6089FF"),rect(i,d,c,c)}function drawNoseStud(e,r,l,t){let o=l/3,c=e-o,n=r;fill("#FFD400"),rect(c,n,o,o)}function drawOrdinalCheek(e,r,l){let t="#464b4b",o=l/8*1.2,c=.81*e,n=.89*r;fill(t),rect(c,n,o,o);let i=o/1.5,d=c+(o-i)/2,a=n+(o-i)/2;fill("#ededed"),rect(d,a,i,i);let s=i/3,u=d+(i-s)/2,b=a+(i-s)/2;fill(t),rect(u,b,s,s)}function drawRainbowCheek(e,r,l){let t=l/8*1.2,o=.81*e,c=.89*r,n=["#FFD400","#FF3CAE","#FF002C","#B36CFF"],i=t/n.length;for(let e=0;e<n.length;e++)fill(n[e]),rect(o,c+e*i,t,i)}function initializeViewer(){const e=document.getElementById("viewer");e.parentElement.style.width="100%",e.parentElement.style.height="100%",e.parentElement.style.padding="0px",e.parentElement.style.margin="0px";let r=document.getElementById("preview").getAttribute("mint");if(r.includes("MINT_INSCRIPTION_ID")){let e=document.getElementById("blk");e.style.display="block",e.addEventListener("input",(e=>{blockNumber=e.target.value,redraw()})),redraw()}else fetchMintData(r)}function fetchMintData(e){const r=new XMLHttpRequest;r.open("GET","/content/"+e,!0),r.onload=()=>{if(r.status>=200&&r.status<300){const e=JSON.parse(r.responseText);blockNumber=e.blk,redraw()}},r.onerror=()=>console.error("XHR error"),r.send()}function containsSixDigitPalindrome(e){reversedBlockNumber=e.split("").reverse().join("");for(let r=0;r<=e.length-6;r++){let l=e.substring(r,r+6);if(l===l.split("").reverse().join(""))return!0}return!1}function drawRainbowMohawk(e,r,l){let t=["#00A28A","#00A900","#FFD400","#FF3CAE","#FF002C","#B36CFF","#6089FF"],o=l/7,c=l/2.5,n=e+(l-o)/2,i=r-c,d=o/t.length;for(let e=0;e<t.length;e++)fill(t[e]),rect(n+e*d,i,d,c)}function drawBowlerHat(e,r,l,t){fill("#464b4b");let o=parseInt(reversedBlockNumber.charAt(2));t=colors[o%colors.length];let c=l,n=l/2.5,i=e+(l-c)/2,d=r-n/2.6;rect(i,d,c,n);let a=1.2*l,s=l/6;rect(e+(l-a)/2,d+n-s,a,s);let u=n/10,b=d+s;fill(t),rect(i,b,c,u)}function drawHeadband(e,r,l){let t=colors[headgearColorIndex%colors.length],o=l/15/1.5,c=r+.14*l,n=l;fill(t),rect(e,c,n,o),fill("#ededed"),rect(e,c+o,n,o)}function drawTopHat(e,r,l){let t=colors[headgearColorIndex%colors.length];fill("#464b4b");let o=.8*l,c=l/1.5,n=e+(l-o)/2,i=r-c/1.33;rect(n,i,o,c);let d=1.1*l,a=l/6;rect(e+(l-d)/2,i+c-a,d,a);let s=c/10,u=i+c-s-a;fill(t),rect(n,u,o,s)}function drawEyeMask(e,r,l,t,o,c,n,i,d){push();let a=l,s=1.2*d,u=e,b=o+(d-s)/2;fill("#464b4b"),rect(u,b,a,s),pop()}function drawAlienEyeStripe(e,r,l,t,o,c){push(),fill("#9BE0E0");let n=o/3,i=1.5*c;function d(e,r){rect(e-n/2,r-i/2,n,i)}d(e+o/2,r+c/2),d(l+o/2,t+c/2),pop()}function drawLongSpikes(e,r,l){let t=colors[headgearColorIndex%colors.length];const o=l/32,c=(l-15*o)/16,n=.3*l;for(let l=0;l<16;l++){fill(t);rect(e+l*(c+o),r-n,c,n)}}function drawDevilHorns(e,r,l,t){t=parseInt(reversedBlockNumber.charAt(2));let o=colors[t%colors.length];const c=.1*l,n=.3*l,i=.02*l;push(),noStroke(),fill("rgba(255, 51, 94, 0.5)"),rect(e+.1*l-i,r-n-i,c+2*i,n+2*i),rect(e+l-.1*l-c-i,r-n-i,c+2*i,n+2*i),pop(),push(),fill(o),rect(e+.1*l,r-n,c,n),rect(e+l-.1*l-c,r-n,c,n),pop()}function drawRedNounGlasses(e,r,l,t,o,c,n,i){push();let d=1.2*t,a=1.2*o,s=.8*d,u=.8*a,b=c+(t-d)/2,f=i+(t-d)/2,h=n+(o-a)/2,w=(d-s)/2;fill("#FF002C"),rect(b,h,d,a),rect(f,h,d,a),rect(b+d,h+.4*a,f-b-d,a/5),fill("#ededed"),rect(b+w,h+w,s/2,u),fill("#000000"),rect(b+d/2,h+w,s/2,u),fill("#ededed"),rect(f+w,h+w,s/2,u),fill("#000000"),rect(f+d/2,h+w,s/2,u),fill("#FF002C");let p=a/5;rect(e,h+a/2-p/1.5,b-e,p),pop()}function drawBlueNounGlasses(e,r,l,t,o,c,n,i){push();let d=1.2*t,a=1.2*o,s=.8*d,u=.8*a,b=c+(t-d)/2,f=i+(t-d)/2,h=n+(o-a)/2,w=(d-s)/2;fill("#1F27EB"),rect(b,h,d,a),rect(f,h,d,a),rect(b+d,h+.4*a,f-b-d,a/5),fill("#ededed"),rect(b+w,h+w,s/2,u),fill("#000000"),rect(b+d/2,h+w,s/2,u),fill("#ededed"),rect(f+w,h+w,s/2,u),fill("#000000"),rect(f+d/2,h+w,s/2,u),fill("#1F27EB");let p=a/5;rect(e,h+a/2-p/1.5,b-e,p),pop()}function drawVRHeadset(e,r,l,t,o,c){const n=3.5*l,i=1.5*t,d=1.7*e,a=c+t-i;fill("#ededed"),rect(d,a,n,i),fill("#464b4b");const s=.15*i;rect(d+s,a+s,n-2*s,i-2*s)}function drawBowtie(e,r,l,t,o){let c=r+t/2,n=t/4,i=1.5*n,d=n/.8,a=e+(l-n)/2,s=a-i,u=a+n,b=c+(n-d)/2;fill(o),rect(a,c,n,n),rect(s,b,i,d),rect(u,b,i,d)}function drawVikingHat(e,r,l){let t=colors[headgearColorIndex%colors.length];const o=l,c=l/4,n=e,i=.98*r,d=.9*o,a=.6*c,s=e+(o-d)/2,u=i-a;fill("#c18300"),rect(n,i,o,c),rect(s,u,d,a);const b=c/4,f=(o-6*b)/7;fill(t);for(let e=0;e<6;e++){rect(n+f+(b+f)*e,i+(c-b)/2,b,b)}const h=c/3,w=c,p=n-w,F=n+o,k=i+(c/2-h/2);fill("#ededed"),rect(p,k,w,h),rect(F,k,w,h);const g=2*h,m=w/3;rect(p,k-g,m,g),rect(F+w-m,k-g,m,g)}function drawSmokePipe(e,r,l,t,o){push();let c=l/3,n=l/15,i=e+.95*t,d=r+o/2-n/2,a=2*n;fill("#8D3D21"),rect(i,d,c-a,n),rect(i+c-a,d-a+n,a,a),pop()}function drawLaser(e,r){push(),stroke("rgba(255, 255, 255, 0.5)"),strokeWeight(2),line(e,r-6,width,r-6),line(e,r+6,width,r+6),stroke("#FF002C"),strokeWeight(10),strokeCap(SQUARE),line(e,r,width,r),pop()}function shouldDrawLaser(e,r){return!("right"!==e||!r.includes("07"))}function drawLongHair(e,r,l,t,o,c,n,i,d){push();let a=d[i%d.length];fill(a),rect(.8*e,r,.2*l,1.4*l);let s=l/6;rect(.8*e,r-s/4.8,1.2*l,s),pop()}function drawVape(e,r,l,t,o){push();let c=l/3,n=l/15,i=e+.95*t,d=r+o/2-n/4;fill("#464b4b"),rect(i,d,c,n),fill("#6089ff");let a=1.5*n;rect(i+c-a,d,a,n),fill("#00A900");let s=n/4;rect(i+c/2-s/2,d+n/2-s/2,s,s),pop()}function drawBucketHat(e,r,l){let t=colors[headgearColorIndex%colors.length];fill(t);let o=l/3.5,c=r-o/2.5;rect(e+(l-l)/2,c,l,o);let n=1.2*l,i=l/8;rect(e+(l-n)/2,c+o-i/2.3,n,i)}function drawDMTGlasses(e,r,l,t,o,c,n,i){push();let d=1.2*t,a=1.2*o,s=.8*d,u=.8*a,b=c+(t-d)/2,f=i+(t-d)/2,h=n+(o-a)/2;fill("#FF3CAE"),rect(b,h,d,a),rect(f,h,d,a),rect(b+d,h+.4*a,f-b-d,a/5);const w=["#FFD400","#00A28A","#B36CFF"];for(let e=0;e<w.length;e++){let r=.8-.3*e,l=s*r,t=u*r,o=(d-l)/2,c=(a-t)/2;fill(w[e]),rect(b+o,h+c,l,t),rect(f+o,h+c,l,t)}fill("#FF3CAE");let p=a/5;rect(e,h+a/2-p/1.5,b-e,p),pop()}function drawTiara(e,r,l){let t=colors[headgearColorIndex%colors.length],o=r+.14*l,c=.08*l,n=l;fill("#FFD400"),rect(e,o,n,c);let i=1.5*c,d=e+l/2-i/2+.24*l;fill(t),rect(d,o-(i-c)/2,i,i);let a=i/4,s=d-a-.05*l;fill(" #B36CFF"),rect(s,o+c/2-a/2,a,a),rect(d+i+.05*l,o+c/2-a/2,a,a)}function drawRainbowSunglasses(e,r,l,t,o,c,n,i){push();let d=1.2*t,a=1.2*o,s=c+(t-d)/2,u=i+(t-d)/2,b=n+(o-a)/2,f=["#FFD400","#FF5400","#FF3CAE","#FF002C","#B36CFF","#6089FF","#00A28A"],h=a/f.length;for(let e=0;e<f.length;e++)fill(f[e]),rect(s,b+e*h,d,h),rect(u,b+e*h,d,h);let w=a/3.5;for(let e=0;e<2;e++){fill(f[e]),rect(s+d,b+e*(w/2),u-s-d,w/2)}let p=e-s;for(let e=0;e<2;e++)fill(f[e]),rect(s,b+e*(w/2),p,w/2);pop()}function drawEyePatch(e,r,l,t,o,c,n){push(),fill("#464b4b");let i=1.2*t,d=1*o;rect(c-(i-t)/2,n,i,d);let a=d/10;rect(e,n-a,l,a),pop()}function drawKeffiyeh(e,r,l,t,o,c,n,i){push(),fill("#ededed"),rect(e-.22*l,r,.43*l,l+n);let d=1.25*l,a=l/2.8,s=e-.22*l,u=r-a/4.8;rect(s,u,d,a);let b=parseInt(i.charAt(2)),f=colors[b%colors.length];fill(f);let h=.2*a;rect(s,u+a-4*h,d,h),pop()}function drawZombieBlood(e,r,l,t){push(),fill("#FF002C");let o=l/12,c=2*t,n=1.67*e,i=r+1.5*t;rect(n,i,o,c),rect(n-.3*l,i+1.9*t,o,c),pop()}function drawZombieEyes(e,r,l,t,o,c,n,i,d){push(),fill("rgba(100, 100, 100, 0.5)"),noStroke();let a=1*t,s=1*o,u=i+(t-a)/2,b=n+(o-s)/2;b+=l/9,rect(c+(t-a)/2,b,a,s),rect(u,b,a,s),pop()}function drawGradient(){push();let e=["#FFD400","#FF5400","#FF3CAE","#B36CFF","#6089FF"],r=height/(e.length-1);for(let l=0;l<e.length-1;l++){let t=r*l,o=r*(l+1);for(let r=t;r<o;r++){let c=map(r,t,o,0,1),n=lerpColor(color(e[l]),color(e[l+1]),c);stroke(n),line(0,r,width,r)}}pop()}function drawDynastyHat(e,r,l){let t=colors[headgearColorIndex%colors.length];fill(t);let o=l,c=l/4,n=e+(l-o)/2,i=r-c/3,d=l/8,a=c-d;rect(n,i,o,a),fill("#464b4b"),rect(n,i+a,o,d);let s=l/15,u=e+(l-s)/2,b=i-s;fill("#464b4b"),rect(u,b,s,s)}function drawShortSpikes(e,r,l){let t=colors[headgearColorIndex%colors.length];const o=(l-76)/20,c=l/10;fill(t);for(let l=0;l<20;l++){rect(e+l*(o+4),r-c,o,c)}}function drawGoldTooth(e,r,l,t){let o=3===parseInt(t.charAt(3))?"#c18300":"#FFD400",c=e,n=r,i=l,d=l;push(),fill(o),rect(c,n,i,d),pop()}function drawIpodNextToHead(e,r,l,t,o){push();let c=l/10,n=e/1.25,i=r+l/2-c/2,d=1*c,a=c/2,s=n,u=1.09*i;fill("#ededed"),rect(n,i,c,c),fill("#ededed"),rect(s,u,a,d),pop()}function containsSixDigitPerfectSquare(e){for(let r=0;r<=e.length-6;r++){let l=e.substring(r,r+6);if(isPerfectSquare(parseInt(l)))return!0}return!1}function drawCowboyHat(e,r,l){fill("#8D3D21");let t=colors[headgearColorIndex%colors.length],o=l/3,c=r-o/2;rect(e+(l-l)/2,c,l,o);let n=1.5*l,i=l/10,d=e+(l-n)/2,a=c+o-i/2;rect(d,a,n,i);let s=l/15,u=d+n-s,b=a/1.09;rect(d,b,s,s),rect(u,b,s,s);let f=l/8,h=e+.6*l,w=r-f/2;fill(t),rect(h,w,f,f)}function drawSideBob(e,r,l,t){let o=colors[headgearColorIndex%colors.length];fill(o),rect(e,r,l/8,.38*l),rect(e,r,l,l/5)}function drawBackSideBob(e,r,l,t){push(),t=parseInt(reversedBlockNumber.charAt(2));let o=colors[t%colors.length];fill(o),rect(e+l,1.3*r,l/8,.8*l),pop()}function drawJewelledCrown(e,r,l,t,o){const c="#FFD400";t[o%t.length];let n=1*l,i=l/7.5,d=e-(n-l)/2,a=r-.2*i;fill(c),rect(d,a,n,i);let s=n/11.5,u=3.5*i;for(let e=0;e<8;e++){let r=u*(1-(7.2-e)/8),l=d+(s+s/2)*e,t=a-r;fill(c),rect(l,t,s,r)}const b=["#FF002C","#B36CFF","#00A900"];let f=i/2,h=(n-6*f)/7;for(let e=0;e<6;e++){let r=d+h+e*(f+h),l=a+(i-f)/2;fill(b[e%b.length]),rect(r,l,f,f)}}function drawRegalCrown(e,r,l,t){push();const o="#FFD400";let c=l,n=l/7.5,i=e,d=r-.2*n;fill(o),rect(i,d,c,n);let a=c/12,s=2*n;fill("#FF002C"),rect(i,d-s,c,s);for(let e=0;e<6;e++){let r=i+a*(2*e+1),l=d-s;fill("#FFD400"),rect(r,l,a,s)}let u=n/1.6,b=2*e,f=d-s-u;fill(o),rect(b,f,u,u),pop()}function drawOpulentCrown(e,r,l,t){const o="#FFD400";t[headgearColorIndex%t.length];let c=1*l,n=l/8,i=e-(c-l)/2,d=r-.2*n;fill(o),rect(i,d,c,n);let a=c/13,s=3.5*n;for(let e=0;e<9;e++){let r=s*(Math.abs(e-8/2.8)/4),l=i+(a+a/2)*e,t=d-r;fill(o),rect(l,t,a,r)}const u=["#00A28A","#FF3CAE","#6089FF","#e94000","#00A900","#B36CFF"];let b=n/2,f=(c-6*b)/7;for(let e=0;e<6;e++){let r=i+f+e*(b+f),l=d+(n-b)/2;fill(u[e%u.length]),rect(r,l,b,b)}}function drawIceCrown(e,r,l,t,o){const c="#ededed";t[o%t.length];let n=1*l,i=l/7.5,d=e-(n-l)/2,a=r-.2*i;fill(c),rect(d,a,n,i);const s=12;let u=n/17.8,b=4*i;for(let e=0;e<s;e++){let r;r=e<6?(5.9-e)/6:(e-6+.1)/6;let l=b*(1-r),t=d+(u+u/2)*e,o=a-l;fill(c),rect(t,o,u,l)}const f=["#FF002C","#FFD400","#6089FF"];let h=i/2,w=(n-8*h)/9;for(let e=0;e<8;e++){let r=d+w+e*(h+w),l=a+(i-h)/2;fill(f[e%f.length]),rect(r,l,h,h)}}function drawDMTCrown(e,r,l){const t=["#00A28A","#00A900","#FFD400","#FF3CAE","#FF002C","#B36CFF","#6089FF","#c18300","#959898","#e94000"],o="#FFD400";let c=l,n=l/5,i=e,d=r;fill(o),rect(i,d,c,n);let a=c/11.5,s=1.8*n,u=a/2;for(let e=0;e<8;e++){let r=i+(a+u)*e,l=d-s;fill(o),rect(r,l,a,s)}let b=a/5;for(let e=0;e<12;e++)for(let r=0;r<7;r++){let l=i+e*a+a/2-b/2,o=d-s+s/8*(r+1)-b/4;fill(t[(7*e+r)%t.length]),rect(l,o,b,b)}}function drawBambooHat(e,r,l,t,o){let c=t[o%t.length],n=1.5*l,i=l/12,d=e/2,a=1.1*r;fill(c),rect(d,a,n,i);const s=40;let u=n/59.8,b=3*i;for(let e=0;e<s;e++){let r;r=e<20?(19.9-e)/20:(e-20+.1)/20;let l=b*(1-r),t=d+(u+u/2)*e,o=a-l;fill(c),rect(t,o,u,l)}}function drawTattoo(e,r,l){push(),fill("#464b4b");let t=l/12,o=e+l/4-1.5*(l/20),c=r+5.3*t;rect(o+t/4,c,t/2,2*t),rect(o-t/2,c+t,2*t,t/2),pop()}function drawRainbowDreads(e,r,l){let t=colors[headgearColorIndex%colors.length],o=["#00A28A",t,"#00A900",t,"#FFD400",t,"#FF3CAE",t,"#FF002C",t],c=l/10,n=l/2.5,i=e,d=r-n,a=[.8*n,.4*n,1*n,.6*n,.9*n,.5*n,1.1*n,.7*n,.3*n,1*n];for(let e=0;e<o.length;e++){fill(o[e]);let r=a[e%a.length];rect(i+e*c,d+(n-r),c,r)}}function containsFiveDigitPalindrome(e){reversedBlockNumber=e.split("").reverse().join("");for(let r=0;r<=e.length-5;r++){let l=e.substring(r,r+5);if(l===l.split("").reverse().join(""))return!0}return!1}function drawTopEarPiercing(e,r,l){let t=l/5,o=.3*t,c=e-t,n=16*(r+3*l/6-t/2);fill("#FFD400"),rect(c,n,o,o)}function drawBugGlasses(e,r,l,t,o,c,n,i,d){push();let a=parseInt(d.charAt(0)),s=colors[a%colors.length],u=1.26*t,b=.7*u,f=c+(t-u)/2,h=i+(t-u)/2,w=n+(o-u)/2,p=(u-b)/2;fill(s),rect(f,w,u,u),rect(h,w,u,u),rect(f+u,w+.4*u,h-f-u,u/5),fill("#000000"),rect(f+p,w+p,b,b),rect(h+p,w+p,b,b),fill(s);let F=u/5;rect(e,w+u/2-F/1.5,f-e,F),pop()}function drawStripedGlasses(e,r,l,t,o,c,n,i,d){push();let a=parseInt(d.charAt(0)),s=colors[a%colors.length],u=1.2*t,b=u/10,f=c+(t-u)/2,h=i+(t-u)/2,w=n+(o-u)/2;fill(s),rect(f,w,u,u),rect(h,w,u,u),rect(f+u,w+.4*u,h-f-u,u/5);for(let e=0;e<10;e++)fill(e%2==0?"#000000":s),rect(f,w+e*b,u,b),rect(h,w+e*b,u,b);fill(s);let p=u/5;rect(e,w+u/2-p/1.5,f-e,p),pop()}function drawWhiteSunglasses(e,r,l,t,o,c,n,i,d){push();let a=parseInt(d.charAt(0)),s=colors[a%colors.length],u="#ededed",b=1.2*t,f=.7*b,h=c+(t-b)/2,w=i+(t-b)/2,p=n+(o-b)/2,F=(b-f)/2;fill(u),rect(h,p,b,b),rect(w,p,b,b),rect(h+b,p+.4*b,w-h-b,b/5),fill(s),rect(h+F,p+F,f,f),rect(w+F,p+F,f,f),fill(u);let k=b/5;rect(e,p+b/2-k/1.5,h-e,k),pop()}function drawChain(e,r,l,t,o){switch(o){case"gold":drawGoldChain(e,r,l,t);break;case"silver":drawSilverChain(e,r,l,t);break;default:console.log("No chain drawn. Unknown type:",o)}}function drawGoldChain(e,r,l,t){let o=t/6,c=r,n=l/10;fill("#FFD400");for(let r=0;r<10;r++)rect(e+r*n,c,n,o)}function drawSilverChain(e,r,l,t){let o=t/6,c=r,n=l/10;fill("#959898");for(let r=0;r<10;r++)rect(e+r*n,c,n,o)}function drawSummerStrawHat(e,r,l,t){let o="#c18300",c=colors[headgearColorIndex%colors.length],n=l,i=l/5,d=e+(l-n)/2,a=r-i/2;fill(o),rect(d,a,n,i);let s=[c],u=n,b=i/4,f=d+(n-u)/2,h=a+(i-b)/2;for(let e=0;e<s.length;e++){fill(s[e]);let r=u/s.length;rect(f+e*r,h,r,b)}let w=1.5*l,p=l/10,F=e+(l-w)/2,k=a+i-p/2;fill(o),rect(F,k,w,p)}function drawBindi(e,r,l,t,o,c,n){let i=colors[headgearColorIndex%colors.length],d=l/20,a=(t+c)/1.8-d/2,s=(o+n)/2-l/8;fill(i),rect(a,s,d,d)}function drawFadeCut(e,r,l){let t=colors[headgearColorIndex%colors.length];const o=16,c=(l-15*(l/32))/o,n=.4*l,i=(n-.1*l)/15;for(let d=0;d<o;d++){fill(t);rect(e,r,c+d*c/15,n-d*i);let o=1*l,a=l/5.5;rect(e-(o-l)/1.3,r-.2*a,o,a)}}function drawPeak(e,r,l,t,o){let c=t[o%t.length];const n=22;let i=l,d=i/32.8,a=l/6,s=r,u=e+l/2;for(let e=0;e<n;e++){let r;r=e<n/7?(10.9-e)/11:(e-11+.1)/11;let l=a*(1-r),t=u-i/2+(d+d/2)*e,o=s-l;fill(c),rect(t,o,d,l)}}initializeViewer(); </script> </body> </html>
Inscription number 71,446,822
Genesis block 846,939
File type text
File size 36.09 KB
Creation date Jun 7,2024 9:10 pm