0x4666…6b59

All memos sent from and to 0x4666…6b59.

In the contemporary era, the overwhelming inundation of information and data is a ubiquitous and pervasive reality. This saturation is often accompanied by a sense of disorientation and fragmentation, making it challenging to extract meaningful and valuable insights. As humanity progresses and evolves, this gap between our biological, cognitive, and perceptual capacities and the rapid advancements of our digital world becomes increasingly significant. Infinity, chaos, complexity, self-reproducibility, coherence, and layering are epithets that apply to this work. This artwork seeks to capture the complexity and chaos of our digital existence, utilizing various visual techniques to convey its message. Layering and fragmentation visually depict the scattered and fragmented nature of our digital lives, with each layer representing a different unit of information. This fragmentation is further underscored by the grid of "transport" lines that permeate the canvas, symbolizing the interconnected networks and corporations that seek to control and manipulate our attention. Despite the strict rules governing the forms in the artwork, the overall effect is one of chaos and impending tragedy. This tension between order and disorder is a recurring theme, conveying that we are on the brink of losing control and being consumed by information overload. The visual elements of the artwork convey a "technological coldness" and emotionlessness, reflecting the detachment that can result from our immersion in the digital realm. Some of the elements are unfocused, which creates the effect of discomfort and the inability to concentrate and embrace all the available space at once. A kind of frame is the "traces" of data gathering toward the center - in our minds - and intertwining into an endless tangle of something massive and noisy but with no precise shape. To reinforce the concept, I placed an infinite rotation of all the layers used in the art behind the main canvas. They alternate at great speed, constantly changing their "compression" and background, symbolizing the endless flow of digital information overwhelming our consciousness. Through its visual elements and composition, the artwork urges us to reflect on our collective responsibility to engage with technology more ethically and thoughtfully. It reminds us that while technology can offer many opportunities and benefits, it also significantly challenges our values and ethics. In this sense, the artwork serves as a reminder of the importance of maintaining a balance between technological progress and human values. I used many techniques to create this art. Because of the large number of generated elements and big canvas size, it takes quite a long time to make, "overloading" your device and then entirely using its resources, which is also part of the concept. --- This art is static until you touch it. You can use the mouse wheel to examine the details, and you can also drag the surface of the art. Also, this art is created in two parts. Behind it is an infinite rotation of the layers used in it. **Controls:** Mouse wheel: zoom in/out Mouse click, hold and move: drag the static part Mouse double-click: reset (go static) Press 's' to save the image WARNING: PHOTOSENSITIVITY/EPILEPSY SEIZURES --- ***As always, a pre-sale for TBOA club members and TBOA token holders will be a day before the official release.***
�ヒフヘホマミムメモャヤュユョヨラリルレロヮワヰヱヲンヵヶ・ーヽヿ".split("")}[b],j=[{class:Z,types:["chess","mirror","diagonal","corner","shear","zigzag","something"],specialTypes:[]},{class:te,types:["chess","simple"],specialTypes:["normal","half","third","quarter","max"]}],$=[j[1]];let K=["lr","tb","bt","rl","trbl","tlbr","brtl","bltr"],ee=["solid","lerp","gradient","noise"],ne=["tl","br","tr","bl"],re=!1,le=!1;m&&(j[0].types=[s(j[0].types)],j[1].types=[s(j[1].types)],ne=[s(ne)],re=s([1,2])),g&&(ee=[s(ee)],K=[s(K)],le=n(.1,4)),x&&j.shift();for(let t=0;t<3;t+=1)z(_,G,t,T||W,e,j,K,ee,ne,re,le,Q);const ae={1:.075,2:.075,3:.1,4:.2,5:.25},ce={1:.01,2:.025,3:.04,4:.05,5:.08};let de=ae[D];p5.offsetCoef=de,_.forEach((e=>{ie([e],1,"applyEffects","shrink",{amount:p5.offsetCoef}),o()>.5&&ie([e],1,"applyEffects","glitch2")}));const fe=void 0,ve={min:[10,20],mid:[10,50],max:[50,200]}[C];let we;he.background(O),ie([we],1,"processFunction",(()=>{we=createGraphics(xe[0],xe[1]),we.pixelDensity(1),y(we,G,Ae,Q,e),he.image(_[0].back,0,0,width,height),he.image(we,0,0,width,height)}));let ye=[8,16,32,64,128];const Ce=20,ke=.05,Fe=.025,De=o()>.9;for(let t=0;t<=Ce;t+=1){const i=s(ye);o()>.6&&ie([he],1,"processFunction",(()=>J(he,e,G,Ae))),o()>.8&&ie([he],1,"processFunction",(()=>J(he,e,G,Ae))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,_,i,r(...ve),F,w,[a,E],{filled:!1,iteration:t,doubleShadow:De}))),ie([{back:he}],1,"applyEffects","desaturate",{amount:1-ke*t,contrast:1.5-Fe*t})}let be,Se=de/(1+2*de),Ee,Be;ie([{back:he}],1,"applyEffects","shrink",{amount:p5.offsetCoef}),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>{Ee=createGraphics(xe[0],xe[1]),Ee.pixelDensity(1),Ee.image(he,0,0,width,height)})),ie([he],1,"processFunction",(()=>{he.push(),he.noStroke(),he.rectMode(CENTER),he.translate(width/2,height/2),he.rotate(n(0,TWO_PI)),p(he,width/2,0,width/2,height,[0,1],l(B,2)),he.blendMode(ADD),he.rect(0,0,1.4*height,1.4*height),he.pop()})),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,_,8,r(8,16),!0,w,[a,E],{filled:!1,glitch:!0},0))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>z(I,G,0,T||[8,16,32,64],e,$,K,ee,ne,re,le,[],[Ee,we]))),ie([he],1,"processFunction",(()=>{Be=createGraphics(xe[0],xe[1]),Be.pixelDensity(1),Be.image(he,0,0,width,height),Be.image(we,0,0,width,height)})),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,[{back:Ee},{back:Be}],16,r(4,16),!0,w,[a,E],{filled:!0,scheme:!0},Se))),ie([{back:he}],1,"applyEffects","shrink",{amount:ce[D]}),ie([he],1,"processFunction",(()=>z(I,G,0,T||[16,32,64],e,$,K,ee,ne,re,le,Q,[Ee,we,Be]))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,I,16,r(4,16),!0,w,[a,E],{filled:!1,backs2:!0,smallShadow:!0},0)));const Ge=width*ae[D],ze=height*ae[D];ie([he],1,"processFunction",(()=>k(he,Ae,Ge,ze))),ie([{back:he}],1,"applyEffects","grid",{amount:.1});let Le=!1;if(S||(Le="final"),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0)),Le),S){let t;ie([he],1,"processFunction",(()=>{t=createGraphics(xe[0],xe[1]),t.pixelDensity(1),t.image(he,0,0,width,height)})),ie([{back:he}],1,"applyEffects","desaturate",{amount:1,contrast:1}),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,[{back:t}],32,r(16,32),!0,!0,[a,E],{filled:!0,backs2:!0},Se))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0)),"final")}Ae.setAlpha(255),pe=p5.shaderCanvas.createShader(d,oe)},ae(),windowResized()}let Ge=0,ze=20,Le=0,Oe=0,Pe=0;function draw(){if(2===p5.phase){if(frameRate(30),1===Be){const e=ue[frameCount%ue.length],t=ge[frameCount%ge.length];frameCount%20<10?t.setAlpha(map(frameCount%20,0,10,255,0)):t.setAlpha(map(frameCount%20,10,20,0,255)),ve.background(e),frameCount%20==0&&Ge++,ve.image(me[Ge%me.length].back,0,0,width,height),ve.push(),ve.noStroke(),ve.fill(t),ve.rect(0,0,width,height),ve.pop(),frameCount%5==0&&(Le=.2*de(),Oe=.2*de(),Pe=fe(-.5,1)),p5.shaderCanvas.push(),p5.shaderCanvas.shader(pe),pe.setUniform("v",ve),pe.setUniform("f",[width,height]),pe.setUniform("s",de()),pe.setUniform("t",map(sin(frameCount/10),-1,1,.01,Le)),pe.setUniform("x",Oe),pe.setUniform("y",Pe),p5.shaderCanvas.quad(-1,-1,1,-1,1,1,-1,1),p5.shaderCanvas.pop(),image(p5.shaderCanvas,0,0,width,height)}Fe=lerp(Fe,be,.2),De=lerp(De,Se,.2),we=lerp(we,Ce,.2),ye=lerp(ye,ke,.2),image(p5.finalImage,Fe-we/2,De-ye/2,we,ye),push(),drawingContext.shadowColor=Ae,drawingContext.shadowBlur=width/1e3*16,stroke(Ae),strokeWeight(8*se),noFill(),rect(0,0,width,height),pop()}}function mouseDragged(){be+=mouseX-pmouseX,Se+=mouseY-pmouseY}function mouseWheel(e){var t=-e.delta;if(t>0)for(let e=0;e<t;e+=1){if(Ce>10*width)return;be-=Ee*(mouseX-be),Se-=Ee*(mouseY-Se),Ce*=Ee+1,ke*=Ee+1}if(t<0)for(let e=0;e<-t;e+=1){if(Ce<.9*width)return;be+=Ee/(Ee+1)*(mouseX-be),Se+=Ee/(Ee+1)*(mouseY-Se),ke/=Ee+1,Ce/=Ee+1}}function doubleClicked(){we=Ce=width,ye=ke=height,Fe=be=we/2,De=Se=ye/2,Ee=.1}function windowResized(){const e=void 0,t=ce.canvas.style;let o,i;.666666666667*window.innerHeight>=window.innerWidth?(o=window.innerWidth,i=window.innerWidth/.666666666667):(i=window.innerHeight,o=.666666666667*window.innerHeight),t.position="absolute",t.display="block",t.top=t.left=t.right=t.structure="0",t.width=`${o}px`,t.height=`${i}px`}window.addEventListener("keydown",(e=>{"s"===e.key&&saveCanvas(tokenData.hash,"png")}));console.log('I never intended to and do not intend to kill myself, and if anything happens to me, there can only be one reason - those people behind the fabricated criminal case against me. Shvembldr.')
const e=void 0;var t=e=>{const t=Uint32Array.from([0,0,0,0].map(((t,o)=>parseInt(e.substr(8*o+2,8),16)))),o=()=>{let e,o=t[3];return t[3]=t[2],t[2]=t[1],t[1]=e=t[0],o^=o<<11,o^=o>>>8,t[0]=o^e^e>>>19,t[0]/4294967296},i=(e=.5)=>o()<e,n=void 0,r=(e,t)=>t?o()*(t-e)+e:o()*e,s=(e,t)=>Math.floor(r(e,t)),l=e=>e.length?e[s(0,e.length)]:void 0,a=e=>{let t=e.reduce(((e,t)=>e+t)),i=o()*t;for(let t=0;t<e.length;t++){if(i<e[t])return t;i-=e[t]}return 0},c=(e,t)=>{let o;return h(e).slice(0,t)},h=e=>{let t,i,n=e.length,r=e.slice();for(;n;)t=Math.floor(o()*n--),i=r[n],r[n]=r[t],r[t]=i;return r},p=function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]},d=(e,t)=>{e=p(e,1),t=t||[];var i=2*o()*Math.PI;return t[0]=e*Math.cos(i),t[1]=e*Math.sin(i),t},f=(e,t)=>{e=p(e,1),d(1,t=t||[]);var i=e*Math.sqrt(o());return t[0]*=i,t[1]*=i,t};let u=!1,g=null;const m=(e,t)=>{if(u){u=!1;let o=g;return g=null,e+t*o}{let i=0,n=0,r=0;do{i=2*o()-1,n=2*o()-1,r=i*i+n*n}while(r>=1||0===r);let s=Math.sqrt(-2*Math.log(r)/r);return g=n*s,u=!0,e+t*(i*s)}};return{rnd:o,chance:i,bool:i,range:r,rangeFloor:s,pick:l,pickSome:c,weighted:a,shuffleArray:h,onCircle:d,insideCircle:f,gaussian:m}};const o=void 0;var i=[["#D24F8C","#1EACB7","#D7D6C9","#231E24"],["#111F19","#8AE84F","#F7F61B","#FC5192","#FF686C"],["#22342E","#30443F","#0281BB","#DD809C","#DB473A","#FACF0B"],["#4156A0","#E62630","#3B393D","#9F9FA5","#49678C"],["#F25D26","#1B2934","#A9B3C9","#247F51","#F2A8D4"],["#F23D2D","#F1F3F5","#000101"],["#C0080B","#5C4F40","#245941","#DC9C0B","#101F87","#0E7DCC"],["#CC4939","#724483","#3B3C80","#F0CB4D","#4CA183","#49659E"],["#ffbf00","#e83f6f","#2274a5","#32936f"],["#94afc0","#2289b6","#f7bd40","#e0160a","#871008"],["#1e2022","#52616b","#c9d6df"],["#F4BC01","#002E4B","#176A95","#819EB9","#CFD0DD","#CB090D"],["#075ea8","#d9322b","#f3a606"],["#169b62","#5ec8e5","#f984ca","#e34459"],["#ff6700","#c0c0c0","#3a6ea5","#004e98"],["#01608F","#EF91A9","#EB4626","#F4BA10","#34A096","#2C2F8C"],["#229B9A","#021F19","#F8EBC8","#B33B2B","#F9972B","#E7D540","#558848","#4F8CB6","#B5526D"],["#F8E7C9","#067DB9","#5885C9","#A7A69B","#ECDB3C","#9BB666","#AB3938","#DB4E3A"],["#00283B","#1F656C","#F0F2CF","#F72B01","#F14A39","#AA0067","#4C0082","#D6BC4B","#19A091","#1E67AF"]];const n=(e,t)=>{const o=[],i=Math.ceil(t/e.length),n=1/i;for(let t=0;t<e.length;t+=1)for(let r=0;r<i;r+=1){const i=color(e[t]),s=color(e[(t+1)%e.length]);o.push(lerpColor(i,s,(r+1)*n))}return o},r=void 0,s=e=>e.filter(((t,o)=>{const i=JSON.stringify(t);return o===e.findIndex((e=>JSON.stringify(e)===i))})),l=(e,t,o,i,n,r,s)=>{const l=e.drawingContext.createLinearGradient(t,o,i,n);return r.forEach(((e,t)=>l.addColorStop(e,s[t]))),e.drawingContext.fillStyle=l,l},a=(e,t,o,i,n,r,s)=>{const l=e.drawingContext.createLinearGradient(t,o,i,n);return r.forEach(((e,t)=>l.addColorStop(e,s[t]))),e.drawingContext.strokeStyle=l,l};var c=n,h=e=>new Array(e).fill(0).map(((e,t)=>t)),p=l,d={};d="precision highp float;\n#define GLSLIFY 1\nvarying vec2 vPos;\nattribute vec3 aPosition;\nvoid main() {\n vPos = (gl_Position = vec4(aPosition,1.0)).xy;\n}\n";var f={};f="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;uniform sampler2D p;uniform float rnd,amount1,amount2,amount3;uniform int type;void main(){vec2 st=gl_FragCoord.xy/u_resolution,uv=vec2(st.x,1.-st.y);vec4 col;if(type==1)col.x=texture2D(p,vec2(uv.x+amount1,uv.y)).x,col.y=texture2D(p,vec2(uv.x+amount2,uv.y)).y,col.z=texture2D(p,vec2(uv.x-amount3,uv.y)).z;else col.x=texture2D(p,vec2(uv.x,uv.y+amount1)).x,col.y=texture2D(p,vec2(uv.x,uv.y+amount2)).y,col.z=texture2D(p,vec2(uv.x,uv.y-amount3)).z;col.w=texture2D(p,uv.xy).w;gl_FragColor=col;}\n";var u={};u="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;\nuniform sampler2D p;\nuniform float amount;\n\nvoid main(){\n vec2 st=gl_FragCoord.xy/u_resolution;\n float mult=1.+amount*2.;\n st-=amount/mult;\n st*=mult;\n gl_FragColor=texture2D(p,vec2(st.x,1.-st.y));\n}\n";var g={};g="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;\nuniform sampler2D p;\nuniform float amount;\n\nvoid main(){\n vec2 st=gl_FragCoord.xy/u_resolution;\n vec4 color;\n color.xyz=texture2D(p,vec2(st.x,1.-st.y)).xyz;\n color*=1.-amount+amount*sin(100.+st.x*4e3)+.1;\n color*=1.-amount+amount*sin(100.+st.y*6e3)+.1;\n color.w=1.;\n gl_FragColor=color;\n}\n\n";var m={};m="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;uniform sampler2D p;uniform float rnd,amount,contrast;vec3 i(vec3 c,float f){vec3 l=vec3(.299,.587,.114),g=vec3(dot(l,c));return mix(c,g,f);}mat4 o(float c){float t=(1.-c)/2.;return mat4(c,0,0,0,0,c,0,0,0,0,c,0,t,t,t,1);}void main(){vec2 st=gl_FragCoord.xy/u_resolution,uv=vec2(st.x,1.-st.y);vec4 col;col.xyz=texture2D(p,uv.xy).xyz;col.xyz=i(col.xyz,amount);col.w=texture2D(p,uv.xy).w;gl_FragColor=o(contrast)*col;}\n";const v=(e,t,o,i,n)=>{const{pick:r,range:s,rnd:l}=o,a={glitch2:f,shrink:u,grid:g,desaturate:m},c=void 0;createGraphics(3040,4560).pixelDensity(1);const h=e.createShader(d,a[i]);if("glitch2"===i){const e=s(.005,.005);let t=r([0,e]),o=r([0,e]),i=r([0,e]),l=r([0,1]);n={amount1:t,amount2:o,amount3:i,type:l}}e.push(),e.shader(h),h.setUniform("p",t),h.setUniform("u_resolution",[width,height]),h.setUniform("rnd",l()),n&&Object.keys(n).forEach((e=>{h.setUniform(e,n[e])})),e.quad(-1,-1,1,-1,1,1,-1,1),e.pop(),t.image(e,0,0)};var x=v;const w=void 0;var y=(e,t,o,i,r)=>{const s=width/1e3,{pick:l}=r,a=12,c=n(t,144);let h=0;for(let t=-16*s;t<=width+16*s;t+=width/a)for(let n=-16*s;n<height+16*s;n+=height/a){const r=noise(.002*t,.002*n),a=noise(.001*t,.001*n);c[h%c.length].setAlpha(100*a),e.push(),e.noStroke(),e.fill(o),e.fill(c[h%c.length]),e.textSize(map(r,0,1,2,20)*s),e.text(l(i),t,n),e.pop(),h+=1}};const C=void 0;var k=(e,t,o,i)=>{const n=[1,.95,.01,0].reverse(),r=[t,t,"rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)"];t.setAlpha(100),e.push(),e.noStroke(),l(e,width/2,0,width/2,i,n,r),e.beginShape(),e.vertex(0,0),e.vertex(width,0),e.vertex(width-o,i),e.vertex(o,i),e.endShape(CLOSE),e.beginShape(),l(e,width,height/2,width-o,height/2,n,r),e.vertex(width,0),e.vertex(width,height),e.vertex(width-o,height-i),e.vertex(width-o,i),e.endShape(CLOSE),l(e,width/2,height,width/2,height-i,n,r),e.beginShape(),e.vertex(width,height),e.vertex(0,height),e.vertex(o,height-i),e.vertex(width-o,height-i),e.endShape(CLOSE),l(e,0,height/2,o,height/2,n,r),e.beginShape(),e.vertex(0,height),e.vertex(0,0),e.vertex(o,i),e.vertex(o,height-i),e.endShape(CLOSE),e.pop(),t.setAlpha(255)};const F={renderBacks:S,applyEffects:E,processFunction:b};async function D(e,t,o,i,n){for(let r=0;r<e.length;r+=t){let s=e.slice(r,r+t);const l=F[o];p5.processed=await l(s,i,n),B(n),await new Promise((e=>setTimeout(e,10))),"final"===n&&(p5.phase=2,p5.finalImage.image(p5.mainBack,0,0,width,height),loop())}}function b(e,t){return new Promise((o=>{setTimeout((()=>{let i=e.map((e=>(t(),{item:e,type:"processFunction"})));o(i)}),10)}))}function S(e){return new Promise((t=>{setTimeout((()=>{let o=e.map((e=>(e.render(),{item:e,type:"renderBacks"})));t(o)}),10)}))}function E(e,t,o){return new Promise((i=>{setTimeout((()=>{let n=e.map((e=>(v(p5.shaderCanvas,e.back,p5.globalRandom,t,o),{item:e,type:"applyEffects"})));i(n)}),10)}))}const A="OVERLOADING";function B(e){for(let t=0;t<p5.processed.length;t++){const o=p5.processed[t].item;if(background(p5.backgroundColor),o&&(o.p?image(o.p,0,0):o.back?image(o.back,0,0):image(o,0,0)),"final"!==e){const e=p5.globalRandom.shuffleArray(p5.overloadColors);textSize(120*p5.M),noStroke(),textAlign(CENTER,CENTER),fill(e[0]),text("OVERLOADING",width/2,height/2),fill(e[1]),text("OVERLOADING",width/2*1.01,height/2*1.01),fill(e[2]),text("OVERLOADING",width/2*.99,height/2*.99)}}}const G=void 0;var z=(e,t,o,i,n,r,s,l,a,c,h,p,d)=>{const{pick:f,rnd:u,range:g,rangeFloor:m}=n,v=e.map((e=>{const{back:o}=e,n=f(i);e.count=n;const v=u()>.5,x=!v||u()>.5,{class:w,types:y,specialTypes:C}=f(r);return c=1===c||2!==c&&u()>.5,new w({p:o,count:n,coef:h||g(.1,4),colors:t,type:f(y),specialType:f(C),rotation:f(a),fill:v&&f(l),stroke:x&&f(l),gFillDirection:f(s),gStrokeDirection:f(s),differentFillGradients:u()>.5,differentStrokeGradients:u()>.5,render90deg:c,rnd:u,rangeFloor:m,pick:f,str:p,cutBacks:d})}));(0===o||1===o&&u()>.1||2===o&&u()>.7)&&v.forEach((e=>{D([e],1,"renderBacks")}))};const L=void 0;var O=(e,t,o,i,n,r)=>{const s=([e,t])=>[[e,t],[e+1,t],[e+1,t+1],[e,t+1]],l=[];let a=[e,t],c=0;const h=(e,t)=>(c+=1,c>4&&(a=r(l)[0],c=0),0===l.filter((([[o,i]])=>e===o&&t===i)).length);let p=0;for(;p<o;){const[e,t]=a,o=r(["left","up","right","down"]);"up"===o?t-1>=0&&h(e,t-1)&&(a=[e,t-1],l.push(s(a)),p+=1):"down"===o?t+1<1*n&&h(e,t+1)&&(a=[e,t+1],l.push(s(a)),p+=1):"left"===o?e-1>=0&&h(e-1,t)&&(a=[e-1,t],l.push(s(a)),p+=1):"right"===o&&e+1<1*i&&h(e+1,t)&&(a=[e+1,t],l.push(s(a)),p+=1)}return l};const P=void 0;var _=(e,t,o,i)=>{const n=e=>e.filter((([t,o])=>{const i=e.filter((([e,i])=>t===e&&o===i+1)).length>0,n=e.filter((([e,i])=>t===e+1&&o===i)).length>0,r=e.filter((([e,i])=>t===e&&o===i-1)).length>0,s=e.filter((([e,i])=>t===e-1&&o===i)).length>0,l=e.filter((([e,i])=>t===e-1&&o===i+1)).length>0,a=e.filter((([e,i])=>t===e+1&&o===i+1)).length>0,c=e.filter((([e,i])=>t===e+1&&o===i-1)).length>0,h=e.filter((([e,i])=>t===e-1&&o===i-1)).length>0;return!(i&&n&&r&&s&&l&&a&&c&&h)}));let r=s(e.flat());r=n(r);const l=void 0,a=(e=>{let t=(e=e.sort((([e,t],[o,i])=>e+t-(o+i))))[0];const o=[t];let i=[...e];i.shift();const n=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e&&a===n-1)return t=[l,a],o.push(t),i.splice(s,1),!0}},r=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e+1&&a===n)return t=[l,a],o.push(t),i.splice(s,1),!0}},s=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e&&a===n+1)return t=[l,a],o.push(t),i.splice(s,1),!0}},l=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e-1&&a===n)return t=[l,a],o.push(t),i.splice(s,1),!0}};let a=[{func:l,type:"left"},{func:n,type:"up"},{func:r,type:"right"}],c=null,h="null";for(;o.length<e.length;)"up"===h?a=[{func:l,type:"left"},{func:n,type:"up"},{func:r,type:"right"}]:"right"===h?a=[{func:n,type:"up"},{func:r,type:"right"},{func:s,type:"down"}]:"down"===h?a=[{func:r,type:"right"},{func:s,type:"down"},{func:l,type:"left"}]:"left"===h&&(a=[{func:s,type:"down"},{func:l,type:"left"},{func:n,type:"up"}]),c=a[0].func(...t,i),h=a[0].type,c||(c=a[1].func(...t,i),h=a[1].type),c||(c=a[2].func(...t,i),h=a[2].type),c=null;return o})(r);let c=[],h=[];if(i)for(let e=0;e<a.length;e+=1){let[i,n]=a[e];const r=i*t,s=n*o;h.push({type:"vertex",points:[r,s]})}else for(let e=0;e<a.length;e+=1){let[i,n]=a[e],[r,s]=a[(e+a.length-1)%a.length],[l,c]=a[(e+1)%a.length];const p=i*t,d=n*o;r===i&&s===n+1&&l===i+1&&c===n||r===i&&s===n-1&&l===i-1&&c===n||r===i-1&&s===n&&l===i&&c===n+1||r===i+1&&s===n&&l===i&&c===n-1||h.push({type:"vertex",points:[p,d]})}return{finalPoints:h,arcs:c}};const I=(e,t,o,i,n=0)=>{const{rnd:r,rangeFloor:s,pick:l,pickSome:a,shuffleArray:c}=i,h=e,p=e*(height/width);let d=(width-width*n*2)/h,f=d,u=[];for(let e=0;e<h;e+=1)for(let t=0;t<p;t+=1)u.push([e,t]);u=c(u),u=a(u,t);const g=[];let m;return u.forEach((e=>{const[t,i]=e;g.push(O(t,i,s(...o),h,p,l))})),c(g.map((e=>_(e,d,f,r()>.5))))},W=(e,t,o,i,n)=>{const r=width/1e3;e.drawingContext.shadowColor=t,e.drawingContext.shadowBlur=o*r,e.drawingContext.shadowOffsetX=i?i*r:0,e.drawingContext.shadowOffsetY=n?n*r:0},T=(e,t)=>{e.beginShape(),t.forEach((({points:t})=>{e.vertex(...t)})),e.endShape(CLOSE)},R=void 0,M=(e,t,o,i,n)=>{const{rnd:r,pick:s,range:l}=n;let a=t,c=o,h=s([0,a]),p=s([0,a]),d=s([0,a]);e.loadPixels();let f=e.pixelDensity(),u=e.width*f*4*(e.height*f);for(let t=0;t<u;t+=4)r()<i&&(h=s([0,a]),p=s([0,a]),d=s([0,a])),e.pixels[t]=e.pixels[t+h]+s([-1,1])*l(c),e.pixels[t+1]=e.pixels[t+1+p]+s([-1,1])*l(c),e.pixels[t+2]=e.pixels[t+2+d]+s([-1,1])*l(c);for(let t=u;t>0;t-=4)r()<i&&(h=s([0,a]),p=s([0,a]),d=s([0,a])),e.pixels[t]=e.pixels[t-h]+s([-1,1])*l(c),e.pixels[t+1]=e.pixels[t+1-p]+s([-1,1])*l(c),e.pixels[t+2]=e.pixels[t+2-d]+s([-1,1])*l(c);e.updatePixels()},U=void 0;var N=(e,t,o,i,n,r,s,l,a,c,h,p=0)=>{const{filled:d,glitch:f,backs2:u,scheme:g,doubleShadow:m,smallShadow:v}=h,{pick:x,pickSome:w,rnd:y,rangeFloor:C}=t,k=width/1e3;let F=width*p,D=height*p;const b=[x([-1,0,1]),x([-1,0,1])],S=b.map((e=>-1*e)),E=w(o,2),A=i,B=y()>.5?E[1]:i,G=I(r,s,c,t,p);let z;f&&(z=createGraphics(3040,4560),z.pixelDensity(1),z.image(e,0,0),M(z,x([16,32,64,128,256]),16,2e-6,t)),e.push(),e.translate(F,D),G.forEach((({finalPoints:t})=>{const r=!u&&y()>.5,s=void 0;if(!u&&y()>.8){const i=C(8),n=x(o);n.setAlpha(100),e.push(),e.noStroke(),e.fill(n),W(e,n,1,i*S[0],i*S[1]),T(e,t),e.pop(),y()>.05&&n.setAlpha(255)}if(r){e.push();const i=C(8),n=x(o);e.noStroke(),e.fill(n),W(e,n,i),T(e,t),e.pop()}e.push(),r?e.noFill():e.fill(x(o)),e.strokeWeight(0),a&&y()>.5&&(e.strokeWeight(k),e.stroke(B)),f||(z=x(n).back);let c=1;if(m&&(c=2),l){let o=C(8,16)*c,n=C(8)*c;if(d&&(o=C(4,16),n=C(4)),v&&(o=C(0,4),n=C(2)),W(e,i,o,n*b[0],n*b[1]),y()>.5){const r=[o,0],s=[n,0];y()>.5&&(r.reverse(),s.reverse());const l=map(t[0].points[1],0,height,r[0],r[1]),a=map(t[0].points[1],0,height,s[0],s[1]);W(e,i,l,a*b[0],a*b[1])}}if(d){const t=x(o);t.setAlpha(100),e.fill(t),t.setAlpha(255)}u&&e.noFill(),T(e,t),e.drawingContext.clip(),e.image(z,0,0,width,height),g&&(e.stroke(A),e.strokeWeight(k),e.push(),e.translate(F,D),e.noFill(),T(e,t),e.pop(),t.forEach((({points:t})=>{e.push(),e.translate(F,D),y()>.7&&e.fill(x(o)),e.circle(...t,5*k),e.pop()}))),e.pop()})),e.pop()};const q=void 0,Y=void 0;var X=(e,t,o,i)=>{const{rangeFloor:n,rnd:r}=i,s=e/2*3,l=i=>{const n=.5*r();return!(i[0]<0||i[0]>e||i[1]>height-height*t)&&(n<.25?[i[0]+1,i[1]+o]:n<.5?[i[0]-1,i[1]+o]:n<.75?[i[0]+1,i[1]]:[i[0]-1,i[1]])},a=e=>{const i=r();return!(e[1]<0||e[1]>s||e[0]>width-width*t)&&(i<.25?[e[0]+o,e[1]+1]:i<.5?[e[0]+o,e[1]-1]:i<.75?[e[0],e[1]+1]:[e[0],e[1]-1])},c=n(e+1),h=n(s+1);let p=[c,0],d=l(p);const f=[[p[0]*o,p[1]]];for(;d;)d=l(p),d&&(f.push([d[0]*o,d[1]]),p=d);let u=[0,h],g=a(u),m=[[u[0],u[1]*o]];for(;g;)g=a(u),g&&(m.push([g[0],g[1]*o]),u=g);return{xPoints:f,yPoints:m}},H=(e,t,o,i,n)=>{if(t&&o.length>4){const t=n(1,3),r=n(0,o.length-t-1);e.drawingContext.setLineDash([r*i,t*i])}else e.drawingContext.setLineDash([])},V=W,Q=(e,t,o=0,i=0)=>{e.beginShape(),t.forEach((t=>{e.vertex(t[0]+o,t[1]+i)})),e.endShape()};const j=void 0;var J=(e,t,o,i,n=0,r)=>{const s=createGraphics(3040,4560);s.pixelDensity(1),s.image(e,0,0);const l=width/1e3,{pick:a,range:c,rangeFloor:h,rnd:p,weighted:d}=t,f=[a([-1,0,1]),a([-1,0,1])],u=a([2,4,8,16]),g=a(o),m=void 0,v=(width-width*n*2)/u,x=sqrt(sq(v)+sq(v)),w=p()>.5,y=h(12,48),{xPoints:C,yPoints:k}=X(u,n,v,t);e.strokeCap(SQUARE),e.push(),e.translate(width*n,height*n);const F=void 0;if(p()>.5){const t=h(3,8),i=h(1,6);e.push(),e.noFill();const n=h(1,5)*l;if(e.strokeWeight(n),p()>.5)for(let r=1;r<t;r+=1){H(e,w,C,x,h);const t=r*n*f[0]*i,s=r*n*f[1]*i;e.stroke(o[r%o.length]),Q(e,C,t,s)}else if(p()>.5){H(e,w,k,x,h);for(let r=1;r<t;r+=1){const t=r*n*f[0]*i,s=r*n*f[1]*i;e.stroke(o[r%o.length]),Q(e,k,t,s)}}e.pop()}const D=a([1,2,3,4]);e.push(),e.noFill(),e.stroke(g),r&&e.stroke(i),e.strokeWeight(D*l/2),H(e,w,C,x,h),Q(e,C),H(e,w,k,x,h),Q(e,k),e.strokeWeight(D*l);const b=2*c(1,4);V(e,i,b,y*f[0],y*f[1]),H(e,w,C,x,h),Q(e,C),H(e,w,k,x,h),Q(e,k),D>2&&p()>.5&&(e.drawingContext.shadowBlur=0,e.strokeWeight(l),e.stroke(a(o)),H(e,w,C,x,h),Q(e,C),H(e,w,k,x,h),Q(e,k)),e.pop();const S=10*l,E=n?S-S*n:S,A=t=>{t.forEach(((t,r)=>{if(r!==C.length-2&&0!==r&&p()>.7&&(e.push(),e.noStroke(),e.fill(g),e.ellipse(...t,E),p()>.5&&(e.fill(i),e.ellipse(...t,E/2)),e.pop()),p()>.9){const i=E*[1.5,2,2.5,3,3.5,4][d([4,4,3,3,2,1])]*D,r=p()>.75,f=p()>.75,u=p()>.75,m=h(3,8),v=i/m,x=a([-5,0,5])*l,w=a([-5,0,5])*l;if(e.push(),e.stroke(g),f&&p()>.5&&(e.noStroke(),e.fill(g)),e.strokeWeight(D*l),e.ellipse(...t,i),e.translate(-width*n,-height*n),e.drawingContext.clip(),e.image(s,x,w,1.01*width,1.01*height),r){const r=p()>.5,s=p()>.7;e.translate(width*n,height*n),e.noFill();for(let n=0;n<m;n+=1){const a=i-n*v,h=c(0,TWO_PI),d=h+c(HALF_PI,TWO_PI);r&&e.stroke(o[n%o.length]),p()>.85?e.strokeWeight(D*l-n*v):e.strokeWeight(l-n*v),s?e.arc(...t,a,a,h,d,OPEN):e.ellipse(...t,a)}}if(f){const n=a(o);n.setAlpha(75),e.push(),e.fill(n),e.noStroke(),e.ellipse(...t,i),e.pop(),n.setAlpha(255)}u&&(e.push(),e.stroke(g),e.strokeWeight(D*l),p()>.5?(e.line(t[0]-i/2,t[1],t[0]+i/2,t[1]),e.line(t[0],t[1]-i/2,t[0],t[1]+i/2)):(e.line(t[0]-i/2,t[1]-i/2,t[0]+i/2,t[1]+i/2),e.line(t[0]+i/2,t[1]-i/2,t[0]-i/2,t[1]+i/2)),e.pop()),e.pop()}}))};A(C),A(k),e.pop()};class ${constructor({p:e,count:t,coef:o,colors:i,type:r,specialType:s,rotation:l,fill:a,stroke:c,gFillDirection:h,gStrokeDirection:p,differentFillGradients:d,differentStrokeGradients:f,render90deg:u,rnd:g,rangeFloor:m,str:v,pick:x,cutBacks:w}){const y={c:0,tl:0,tr:.5*PI,bl:1.5*PI,br:PI};this.p=e,this.count=t,this.colors=i,this.type=r,this.rotation=y[l],this.fill=a,this.stroke=c,this.gFillDirection=h,this.gStrokeDirection=p,this.specialType=s,this.lerpColors=n(i,t**2*o),this.size=e.width/t,this.counter=0,this.xCounter=0,this.xCount=e.round(e.width/this.size),this.yCount=e.round(e.height/this.size),this.render90deg=u,this.destinations=u?[this.yCount,this.xCount]:[this.xCount,this.yCount],this.odd=!1,this.lineOdd=!1,this.differentFillGradients=d,this.differentStrokeGradients=f,this.rnd=g,this.rangeFloor=m,this.str=v,this.pick=x,this.cutBacks=w}drawShape(){}render(){let{p:e,colors:t,destinations:o,size:i,counter:n,xCounter:r,rotation:s,lerpColors:l,fill:a,stroke:c,render90deg:h,differentFillGradients:p,differentStrokeGradients:d}=this;for(let f=0;f<o[0];f+=1){for(let u=0;u<o[1];u+=1){let o=f*i,g=u*i;h&&(o=u*i,g=f*i),this.lineOdd=r%2==0,this.lineOdd?this.odd=n%2==0:this.odd=n%2!=0;let m=l[n%l.length];if("noise"===a){const e=noise(.001*o,.001*g);m=l[Math.round(map(e,0,1,0,l.length-1))%l.length]}this.mainColor=t[0],this.secondaryColor=m,e.push(),e.translate(o,g),e.translate(i/2,i/2),e.rotate(s),e.translate(-i/2,-i/2),"solid"===a?e.fill(t[0]):"lerp"===a||"noise"===a?e.fill(m):"gradient"===a?p?this.makeGradient(!0,!1,m):this.makeGradient(!0):a||e.noFill(),"solid"===c?e.stroke(t[1]):"lerp"===c||"noise"===c?e.stroke(m):"gradient"===c?d?this.makeGradient(!1,!1,m):this.makeGradient(!1,!1):c||e.noStroke(),this.drawShape(),e.pop(),n+=1}r+=1}}makeGradient(e,t,o){let{p:i,gFillDirection:n,gStrokeDirection:r,gBackgroundDirection:s,size:c,colors:h}=this;const p=void 0,d=e?n:t?s:r,f=["tb","lr","tlbr","trbl"].includes(d)?[0,1]:[1,0],u=[0,0],g=[c,0],m=[0,c],v=[c,c],x=[c/2,0],w=[c/2,c],y=[0,c/2],C=[c,c/2],k=e||t?l:a,F=o?[h[0],o]:h;"tb"===d||"bt"===d?k(i,...x,...w,f,F):"lr"===d||"rl"===d?k(i,...y,...C,f,F):"tlbr"===d||"bltr"===d?k(i,...u,...v,f,F):"trbl"!==d&&"brtl"!==d||k(i,...g,...m,f,F)}}class K extends ${constructor(e){super(e)}drawShape(){let{p:e,type:t,size:o,odd:i,lineOdd:r,rnd:s,rangeFloor:l,colors:a,mainColor:c,secondaryColor:h}=this,p,d,f,u,g,m,v;if("something"!==t||r||(i=!i),"diagonal"===t&&i?(v=1,p=o,d=0,f=o,u=o,g=0,m=o):"mirror"!==t&&"something"!==t||!i?"chess"===t||"shear"===t||"zigzag"===t?r?i||"shear"===t?(v=2,p=0,d=0,f=o,u=o,g=0,m=o):(v=1,p=o,d=0,f=o,u=o,g=0,m=o):("zigzag"===t&&(i=!i),i||"shear"===t?(v=3,p=0,d=0,f=o,u=0,g=o,m=o):(v=4,p=0,d=0,f=o,u=0,g=0,m=o)):(v=4,p=0,d=0,f=o,u=0,g=0,m=o):(v=2,p=0,d=0,f=o,u=o,g=0,m=o),e.triangle(p,d,f,u,g,m),s()>.9){const t=l(2,21),i=o/t,r=n(a,t),x=s()>.5;for(let n=0;n<t;n+=1)1===v?(p=o,d=n*i,f=o,u=o,g=n*i,m=o):2===v?(p=0,d=n*i,f=o-n*i,u=o,g=0,m=o):3===v?(p=n*i,d=0,f=o,u=0,g=o,m=o-n*i):4===v&&(p=0,d=0,f=o-n*i,u=0,g=0,m=o-n*i),x?e.fill(n%2==0?c:h):e.fill(r[n]),e.triangle(p,d,f,u,g,m)}}}var Z=K;class ee extends ${constructor(e){super(e)}drawShape(){let{p:e,type:t,size:o,odd:i,lineOdd:r,specialType:s,rnd:l,rangeFloor:a,colors:c,mainColor:h,secondaryColor:p,str:d,pick:f,cutBacks:u}=this;"simple"===t&&r&&(i=!i);let g=o;if("half"===s?g=.5*o:"quarter"===s?g=.75*o:"third"===s?g=.66*o:"mid"===s?g=1.2*o:"max"===s&&(g=1.4*o),i){if(e.rectMode(e.CENTER),l()>.2)e.rect(o/2,o/2,g,g);else{const t=a(2,41),i=n(c,t),r=l()>.5,s=l()>.5;for(let n=0;n<t;n+=1){const a=g-g/t*n;r?e.fill(n%2==0?h:p):e.fill(i[n]),s&&l()>.75&&e.noFill(),e.rect(o/2,o/2,a,a)}}u&&l()>.75&&(e.drawingContext.clip(),e.image(f(u),0,0)),l()>.9&&(e.textSize(g),e.textAlign(e.CENTER,e.CENTER),e.text(f(d),o/2,o/2))}}}var te=ee,oe={};oe="precision highp float;\n#define GLSLIFY 1\nuniform sampler2D v;uniform vec2 f;uniform float s,t,x,y;float D(vec2 v){vec3 f=fract(v.xyx*.1031);f+=dot(f,f.yzx+33.33);return fract((f.x+f.y)*f.z);}float D(vec2 v,float s,float f){return s+D(v)*(f-s);}float n(float f,float v,float s){return step(v,f)-step(s,f);}float r=t;void main(){vec2 i=gl_FragCoord.xy/f,t;float z=1.+y*2.,u;i-=y/z;i*=z;t=vec2(i.x,1.-i.y);vec3 m=texture2D(v,t).xyz;u=r/2.;for(float e=0.;e<200.;e+=1.){float h=D(vec2(s,2345.+float(e))),w=D(vec2(s,4851.+float(e)))*.25,g=D(vec2(s,9625.+float(e)),-u,u);vec2 d=t;d.x+=g;if(n(t.y,h,fract(h+w))==1.){float o=r/6.,a=D(vec2(s,9545));vec2 l=vec2(D(vec2(a,2323),-o,o),D(vec2(a,7707),-o,o));if(a<.33)m.x=texture2D(v,d+l).x;else if(a<.66)m.y=texture2D(v,d+l).y;else m.z=texture2D(v,d+l).z;}}vec4 e=vec4(m,1);e*=1.-x+x*sin(100.+i.x*4e3)+.1;e*=1.-x+x*sin(100.+i.y*6e3)+.1;e.w=1.;gl_FragColor=e;}\n";var ie=D;const ne=new URLSearchParams(window.location.search),re=Object.fromEntries(ne.entries());let se;const le=.666666666667;let ae,ce,he,pe,de,fe,ue,ge,me,ve;const xe=[3040,4560];let we,ye,Ce,ke,Fe,De,be,Se,Ee=.002,Ae;const{pd:Be=1}=re;function setup(){noLoop(),p5.phase=0,ce=createCanvas(xe[0],xe[1]),we=Ce=width,ye=ke=height,Fe=be=we/2,De=Se=ye/2,p5.shaderCanvas=createGraphics(3040,4560,WEBGL),p5.shaderCanvas.pixelDensity(1),p5.finalImage=createGraphics(3040,4560),p5.finalImage.pixelDensity(1),ve=createGraphics(3040,4560),ve.pixelDensity(1),se=width/1e3,p5.M=se,pixelDensity(Number(Be)),he=createGraphics(xe[0],xe[1]),he.pixelDensity(1),p5.mainBack=he,strokeWeight(se),strokeCap(SQUARE);const e=t(tokenData.hash);p5.globalRandom=e;const{rnd:o,range:n,rangeFloor:r,pick:s,pickSome:l,weighted:a,shuffleArray:f}=e;for(let e=0;e<4;e+=1)o();const calculateFeatures=()=>{const e={};return e.paletteIndex=r(i.length-1),e.squares=o()>.7,e.sameFill=o()>.7,e.samePattern=o()>.7,e.sameSize=o()>.95,e.outlines=o()>.5,e.shapeOverload=["min","mid","max"][a([1,2,2])],e.volume=o()>.25,e.compression=[1,2,3,4,5][a([11,10,4,1,1])],e.symbols=s(["anime","numbers","binary","squares","arrows","dots","trigrams"]),e.split=o()>.98,e},{paletteIndex:u,sameFill:g,samePattern:m,sameSize:v,squares:x,outlines:w,shapeOverload:C,volume:F,compression:D,symbols:b,split:S}=calculateFeatures();let E;const A=f([...i[u],"#a6a6a6","#404040","#0d0d0d"]);p5.backgroundColor=s(A),p5.overloadColors=A,de=o,fe=n,ae=()=>{p5.processed=[],p5.phase=1;const t=void 0;let a,E;o()>.3?(a=s([6,7,8,9]),E=a):(a=s([5,6,7,8,9]),E=r(a,10)),noiseSeed(1e6*o());const B=c(A,A.length).map((e=>(e.setAlpha(30),e)));let G=c(A,A.length),L=c(f(i[u]),i[u].length);Ae=lerpColor(G[0],color(0),.9);let O=s(L);me=h(r(8,40)).map((()=>createGraphics(xe[0],xe[1]))),ue=c(A,90*me.length),ge=c(A,90*me.length),me.forEach((e=>{e.pixelDensity(1),e.strokeCap(SQUARE),e.strokeWeight(se)})),me=me.map((e=>({back:e,count:0,count2:0})));const P=Math.ceil(me.length/2);let _=me.splice(0,P),I=me.splice(-P);me=f([..._,...I]);let W=[4,8,16,32,64];const T=v&&[s([4,8,16,32])],R=void 0,M=void 0,U=void 0,q=void 0,Y=void 0,X=void 0,H=void 0,V=void 0,Q={numbers:"0123456789".split(""),binary:["0","1","・","●","○"],squares:["□","■","▣","◩","◪"],arrows:["◄","▲","▼","►","◁","△","▽","▷"],dots:["∴","∵","∶","∷","・"],trigrams:["☰","☲","☱","☴","☵","☶","☳","☷"],anime:" .:-=+*#%@゠ァアィイゥウェエォオカキクケコサシスセソタチッツテトナニヌネノ�
�ゥウェエォオカキクケコサシスセソタチッツテトナニヌネノハヒフヘホマミムメモャヤュユョヨラリルレロヮワヰヱヲンヵヶ・ーヽヿ".split("")}[b],j=[{class:Z,types:["chess","mirror","diagonal","corner","shear","zigzag","something"],specialTypes:[]},{class:te,types:["chess","simple"],specialTypes:["normal","half","third","quarter","max"]}],$=[j[1]];let K=["lr","tb","bt","rl","trbl","tlbr","brtl","bltr"],ee=["solid","lerp","gradient","noise"],ne=["tl","br","tr","bl"],re=!1,le=!1;m&&(j[0].types=[s(j[0].types)],j[1].types=[s(j[1].types)],ne=[s(ne)],re=s([1,2])),g&&(ee=[s(ee)],K=[s(K)],le=n(.1,4)),x&&j.shift();for(let t=0;t<3;t+=1)z(_,G,t,T||W,e,j,K,ee,ne,re,le,Q);const ae={1:.075,2:.075,3:.1,4:.2,5:.25},ce={1:.01,2:.025,3:.04,4:.05,5:.08};let de=ae[D];p5.offsetCoef=de,_.forEach((e=>{ie([e],1,"applyEffects","shrink",{amount:p5.offsetCoef}),o()>.5&&ie([e],1,"applyEffects","glitch2")}));const fe=void 0,ve={min:[10,20],mid:[10,50],max:[50,200]}[C];let we;he.background(O),ie([we],1,"processFunction",(()=>{we=createGraphics(xe[0],xe[1]),we.pixelDensity(1),y(we,G,Ae,Q,e),he.image(_[0].back,0,0,width,height),he.image(we,0,0,width,height)}));let ye=[8,16,32,64,128];const Ce=20,ke=.05,Fe=.025,De=o()>.9;for(let t=0;t<=Ce;t+=1){const i=s(ye);o()>.6&&ie([he],1,"processFunction",(()=>J(he,e,G,Ae))),o()>.8&&ie([he],1,"processFunction",(()=>J(he,e,G,Ae))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,_,i,r(...ve),F,w,[a,E],{filled:!1,iteration:t,doubleShadow:De}))),ie([{back:he}],1,"applyEffects","desaturate",{amount:1-ke*t,contrast:1.5-Fe*t})}let be,Se=de/(1+2*de),Ee,Be;ie([{back:he}],1,"applyEffects","shrink",{amount:p5.offsetCoef}),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>{Ee=createGraphics(xe[0],xe[1]),Ee.pixelDensity(1),Ee.image(he,0,0,width,height)})),ie([he],1,"processFunction",(()=>{he.push(),he.noStroke(),he.rectMode(CENTER),he.translate(width/2,height/2),he.rotate(n(0,TWO_PI)),p(he,width/2,0,width/2,height,[0,1],l(B,2)),he.blendMode(ADD),he.rect(0,0,1.4*height,1.4*height),he.pop()})),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,_,8,r(8,16),!0,w,[a,E],{filled:!1,glitch:!0},0))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>z(I,G,0,T||[8,16,32,64],e,$,K,ee,ne,re,le,[],[Ee,we]))),ie([he],1,"processFunction",(()=>{Be=createGraphics(xe[0],xe[1]),Be.pixelDensity(1),Be.image(he,0,0,width,height),Be.image(we,0,0,width,height)})),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,[{back:Ee},{back:Be}],16,r(4,16),!0,w,[a,E],{filled:!0,scheme:!0},Se))),ie([{back:he}],1,"applyEffects","shrink",{amount:ce[D]}),ie([he],1,"processFunction",(()=>z(I,G,0,T||[16,32,64],e,$,K,ee,ne,re,le,Q,[Ee,we,Be]))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,I,16,r(4,16),!0,w,[a,E],{filled:!1,backs2:!0,smallShadow:!0},0)));const Ge=width*ae[D],ze=height*ae[D];ie([he],1,"processFunction",(()=>k(he,Ae,Ge,ze))),ie([{back:he}],1,"applyEffects","grid",{amount:.1});let Le=!1;if(S||(Le="final"),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0)),Le),S){let t;ie([he],1,"processFunction",(()=>{t=createGraphics(xe[0],xe[1]),t.pixelDensity(1),t.image(he,0,0,width,height)})),ie([{back:he}],1,"applyEffects","desaturate",{amount:1,contrast:1}),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,[{back:t}],32,r(16,32),!0,!0,[a,E],{filled:!0,backs2:!0},Se))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0)),"final")}Ae.setAlpha(255),pe=p5.shaderCanvas.createShader(d,oe)},ae(),windowResized()}let Ge=0,ze=20,Le=0,Oe=0,Pe=0;function draw(){if(2===p5.phase){if(frameRate(30),1===Be){const e=ue[frameCount%ue.length],t=ge[frameCount%ge.length];frameCount%20<10?t.setAlpha(map(frameCount%20,0,10,255,0)):t.setAlpha(map(frameCount%20,10,20,0,255)),ve.background(e),frameCount%20==0&&Ge++,ve.image(me[Ge%me.length].back,0,0,width,height),ve.push(),ve.noStroke(),ve.fill(t),ve.rect(0,0,width,height),ve.pop(),frameCount%5==0&&(Le=.2*de(),Oe=.2*de(),Pe=fe(-.5,1)),p5.shaderCanvas.push(),p5.shaderCanvas.shader(pe),pe.setUniform("v",ve),pe.setUniform("f",[width,height]),pe.setUniform("s",de()),pe.setUniform("t",map(sin(frameCount/10),-1,1,.01,Le)),pe.setUniform("x",Oe),pe.setUniform("y",Pe),p5.shaderCanvas.quad(-1,-1,1,-1,1,1,-1,1),p5.shaderCanvas.pop(),image(p5.shaderCanvas,0,0,width,height)}Fe=lerp(Fe,be,.2),De=lerp(De,Se,.2),we=lerp(we,Ce,.2),ye=lerp(ye,ke,.2),image(p5.finalImage,Fe-we/2,De-ye/2,we,ye),push(),drawingContext.shadowColor=Ae,drawingContext.shadowBlur=width/1e3*16,stroke(Ae),strokeWeight(8*se),noFill(),rect(0,0,width,height),pop()}}function mouseDragged(){be+=mouseX-pmouseX,Se+=mouseY-pmouseY}function mouseWheel(e){var t=-e.delta;if(t>0)for(let e=0;e<t;e+=1){if(Ce>10*width)return;be-=Ee*(mouseX-be),Se-=Ee*(mouseY-Se),Ce*=Ee+1,ke*=Ee+1}if(t<0)for(let e=0;e<-t;e+=1){if(Ce<.9*width)return;be+=Ee/(Ee+1)*(mouseX-be),Se+=Ee/(Ee+1)*(mouseY-Se),ke/=Ee+1,Ce/=Ee+1}}function doubleClicked(){we=Ce=width,ye=ke=height,Fe=be=we/2,De=Se=ye/2,Ee=.1}function windowResized(){const e=void 0,t=ce.canvas.style;let o,i;.666666666667*window.innerHeight>=window.innerWidth?(o=window.innerWidth,i=window.innerWidth/.666666666667):(i=window.innerHeight,o=.666666666667*window.innerHeight),t.position="absolute",t.display="block",t.top=t.left=t.right=t.structure="0",t.width=`${o}px`,t.height=`${i}px`}window.addEventListener("keydown",(e=>{"s"===e.key&&saveCanvas(tokenData.hash,"png")}));console.log('I never intended to and do not intend to kill myself, and if anything happens to me, there can only be one reason - those people behind the fabricated criminal case against me. Shvembldr.')
const e=void 0;var t=e=>{const t=Uint32Array.from([0,0,0,0].map(((t,o)=>parseInt(e.substr(8*o+2,8),16)))),o=()=>{let e,o=t[3];return t[3]=t[2],t[2]=t[1],t[1]=e=t[0],o^=o<<11,o^=o>>>8,t[0]=o^e^e>>>19,t[0]/4294967296},i=(e=.5)=>o()<e,n=void 0,r=(e,t)=>t?o()*(t-e)+e:o()*e,s=(e,t)=>Math.floor(r(e,t)),l=e=>e.length?e[s(0,e.length)]:void 0,a=e=>{let t=e.reduce(((e,t)=>e+t)),i=o()*t;for(let t=0;t<e.length;t++){if(i<e[t])return t;i-=e[t]}return 0},c=(e,t)=>{let o;return h(e).slice(0,t)},h=e=>{let t,i,n=e.length,r=e.slice();for(;n;)t=Math.floor(o()*n--),i=r[n],r[n]=r[t],r[t]=i;return r},p=function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]},d=(e,t)=>{e=p(e,1),t=t||[];var i=2*o()*Math.PI;return t[0]=e*Math.cos(i),t[1]=e*Math.sin(i),t},f=(e,t)=>{e=p(e,1),d(1,t=t||[]);var i=e*Math.sqrt(o());return t[0]*=i,t[1]*=i,t};let u=!1,g=null;const m=(e,t)=>{if(u){u=!1;let o=g;return g=null,e+t*o}{let i=0,n=0,r=0;do{i=2*o()-1,n=2*o()-1,r=i*i+n*n}while(r>=1||0===r);let s=Math.sqrt(-2*Math.log(r)/r);return g=n*s,u=!0,e+t*(i*s)}};return{rnd:o,chance:i,bool:i,range:r,rangeFloor:s,pick:l,pickSome:c,weighted:a,shuffleArray:h,onCircle:d,insideCircle:f,gaussian:m}};const o=void 0;var i=[["#D24F8C","#1EACB7","#D7D6C9","#231E24"],["#111F19","#8AE84F","#F7F61B","#FC5192","#FF686C"],["#22342E","#30443F","#0281BB","#DD809C","#DB473A","#FACF0B"],["#4156A0","#E62630","#3B393D","#9F9FA5","#49678C"],["#F25D26","#1B2934","#A9B3C9","#247F51","#F2A8D4"],["#F23D2D","#F1F3F5","#000101"],["#C0080B","#5C4F40","#245941","#DC9C0B","#101F87","#0E7DCC"],["#CC4939","#724483","#3B3C80","#F0CB4D","#4CA183","#49659E"],["#ffbf00","#e83f6f","#2274a5","#32936f"],["#94afc0","#2289b6","#f7bd40","#e0160a","#871008"],["#1e2022","#52616b","#c9d6df"],["#F4BC01","#002E4B","#176A95","#819EB9","#CFD0DD","#CB090D"],["#075ea8","#d9322b","#f3a606"],["#169b62","#5ec8e5","#f984ca","#e34459"],["#ff6700","#c0c0c0","#3a6ea5","#004e98"],["#01608F","#EF91A9","#EB4626","#F4BA10","#34A096","#2C2F8C"],["#229B9A","#021F19","#F8EBC8","#B33B2B","#F9972B","#E7D540","#558848","#4F8CB6","#B5526D"],["#F8E7C9","#067DB9","#5885C9","#A7A69B","#ECDB3C","#9BB666","#AB3938","#DB4E3A"],["#00283B","#1F656C","#F0F2CF","#F72B01","#F14A39","#AA0067","#4C0082","#D6BC4B","#19A091","#1E67AF"]];const n=(e,t)=>{const o=[],i=Math.ceil(t/e.length),n=1/i;for(let t=0;t<e.length;t+=1)for(let r=0;r<i;r+=1){const i=color(e[t]),s=color(e[(t+1)%e.length]);o.push(lerpColor(i,s,(r+1)*n))}return o},r=void 0,s=e=>e.filter(((t,o)=>{const i=JSON.stringify(t);return o===e.findIndex((e=>JSON.stringify(e)===i))})),l=(e,t,o,i,n,r,s)=>{const l=e.drawingContext.createLinearGradient(t,o,i,n);return r.forEach(((e,t)=>l.addColorStop(e,s[t]))),e.drawingContext.fillStyle=l,l},a=(e,t,o,i,n,r,s)=>{const l=e.drawingContext.createLinearGradient(t,o,i,n);return r.forEach(((e,t)=>l.addColorStop(e,s[t]))),e.drawingContext.strokeStyle=l,l};var c=n,h=e=>new Array(e).fill(0).map(((e,t)=>t)),p=l,d={};d="precision highp float;\n#define GLSLIFY 1\nvarying vec2 vPos;\nattribute vec3 aPosition;\nvoid main() {\n vPos = (gl_Position = vec4(aPosition,1.0)).xy;\n}\n";var f={};f="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;uniform sampler2D p;uniform float rnd,amount1,amount2,amount3;uniform int type;void main(){vec2 st=gl_FragCoord.xy/u_resolution,uv=vec2(st.x,1.-st.y);vec4 col;if(type==1)col.x=texture2D(p,vec2(uv.x+amount1,uv.y)).x,col.y=texture2D(p,vec2(uv.x+amount2,uv.y)).y,col.z=texture2D(p,vec2(uv.x-amount3,uv.y)).z;else col.x=texture2D(p,vec2(uv.x,uv.y+amount1)).x,col.y=texture2D(p,vec2(uv.x,uv.y+amount2)).y,col.z=texture2D(p,vec2(uv.x,uv.y-amount3)).z;col.w=texture2D(p,uv.xy).w;gl_FragColor=col;}\n";var u={};u="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;\nuniform sampler2D p;\nuniform float amount;\n\nvoid main(){\n vec2 st=gl_FragCoord.xy/u_resolution;\n float mult=1.+amount*2.;\n st-=amount/mult;\n st*=mult;\n gl_FragColor=texture2D(p,vec2(st.x,1.-st.y));\n}\n";var g={};g="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;\nuniform sampler2D p;\nuniform float amount;\n\nvoid main(){\n vec2 st=gl_FragCoord.xy/u_resolution;\n vec4 color;\n color.xyz=texture2D(p,vec2(st.x,1.-st.y)).xyz;\n color*=1.-amount+amount*sin(100.+st.x*4e3)+.1;\n color*=1.-amount+amount*sin(100.+st.y*6e3)+.1;\n color.w=1.;\n gl_FragColor=color;\n}\n\n";var m={};m="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;uniform sampler2D p;uniform float rnd,amount,contrast;vec3 i(vec3 c,float f){vec3 l=vec3(.299,.587,.114),g=vec3(dot(l,c));return mix(c,g,f);}mat4 o(float c){float t=(1.-c)/2.;return mat4(c,0,0,0,0,c,0,0,0,0,c,0,t,t,t,1);}void main(){vec2 st=gl_FragCoord.xy/u_resolution,uv=vec2(st.x,1.-st.y);vec4 col;col.xyz=texture2D(p,uv.xy).xyz;col.xyz=i(col.xyz,amount);col.w=texture2D(p,uv.xy).w;gl_FragColor=o(contrast)*col;}\n";const v=(e,t,o,i,n)=>{const{pick:r,range:s,rnd:l}=o,a={glitch2:f,shrink:u,grid:g,desaturate:m},c=void 0;createGraphics(3040,4560).pixelDensity(1);const h=e.createShader(d,a[i]);if("glitch2"===i){const e=s(.005,.005);let t=r([0,e]),o=r([0,e]),i=r([0,e]),l=r([0,1]);n={amount1:t,amount2:o,amount3:i,type:l}}e.push(),e.shader(h),h.setUniform("p",t),h.setUniform("u_resolution",[width,height]),h.setUniform("rnd",l()),n&&Object.keys(n).forEach((e=>{h.setUniform(e,n[e])})),e.quad(-1,-1,1,-1,1,1,-1,1),e.pop(),t.image(e,0,0)};var x=v;const w=void 0;var y=(e,t,o,i,r)=>{const s=width/1e3,{pick:l}=r,a=12,c=n(t,144);let h=0;for(let t=-16*s;t<=width+16*s;t+=width/a)for(let n=-16*s;n<height+16*s;n+=height/a){const r=noise(.002*t,.002*n),a=noise(.001*t,.001*n);c[h%c.length].setAlpha(100*a),e.push(),e.noStroke(),e.fill(o),e.fill(c[h%c.length]),e.textSize(map(r,0,1,2,20)*s),e.text(l(i),t,n),e.pop(),h+=1}};const C=void 0;var k=(e,t,o,i)=>{const n=[1,.95,.01,0].reverse(),r=[t,t,"rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)"];t.setAlpha(100),e.push(),e.noStroke(),l(e,width/2,0,width/2,i,n,r),e.beginShape(),e.vertex(0,0),e.vertex(width,0),e.vertex(width-o,i),e.vertex(o,i),e.endShape(CLOSE),e.beginShape(),l(e,width,height/2,width-o,height/2,n,r),e.vertex(width,0),e.vertex(width,height),e.vertex(width-o,height-i),e.vertex(width-o,i),e.endShape(CLOSE),l(e,width/2,height,width/2,height-i,n,r),e.beginShape(),e.vertex(width,height),e.vertex(0,height),e.vertex(o,height-i),e.vertex(width-o,height-i),e.endShape(CLOSE),l(e,0,height/2,o,height/2,n,r),e.beginShape(),e.vertex(0,height),e.vertex(0,0),e.vertex(o,i),e.vertex(o,height-i),e.endShape(CLOSE),e.pop(),t.setAlpha(255)};const F={renderBacks:S,applyEffects:E,processFunction:b};async function D(e,t,o,i,n){for(let r=0;r<e.length;r+=t){let s=e.slice(r,r+t);const l=F[o];p5.processed=await l(s,i,n),B(n),await new Promise((e=>setTimeout(e,10))),"final"===n&&(p5.phase=2,p5.finalImage.image(p5.mainBack,0,0,width,height),loop())}}function b(e,t){return new Promise((o=>{setTimeout((()=>{let i=e.map((e=>(t(),{item:e,type:"processFunction"})));o(i)}),10)}))}function S(e){return new Promise((t=>{setTimeout((()=>{let o=e.map((e=>(e.render(),{item:e,type:"renderBacks"})));t(o)}),10)}))}function E(e,t,o){return new Promise((i=>{setTimeout((()=>{let n=e.map((e=>(v(p5.shaderCanvas,e.back,p5.globalRandom,t,o),{item:e,type:"applyEffects"})));i(n)}),10)}))}const A="OVERLOADING";function B(e){for(let t=0;t<p5.processed.length;t++){const o=p5.processed[t].item;if(background(p5.backgroundColor),o&&(o.p?image(o.p,0,0):o.back?image(o.back,0,0):image(o,0,0)),"final"!==e){const e=p5.globalRandom.shuffleArray(p5.overloadColors);textSize(120*p5.M),noStroke(),textAlign(CENTER,CENTER),fill(e[0]),text("OVERLOADING",width/2,height/2),fill(e[1]),text("OVERLOADING",width/2*1.01,height/2*1.01),fill(e[2]),text("OVERLOADING",width/2*.99,height/2*.99)}}}const G=void 0;var z=(e,t,o,i,n,r,s,l,a,c,h,p,d)=>{const{pick:f,rnd:u,range:g,rangeFloor:m}=n,v=e.map((e=>{const{back:o}=e,n=f(i);e.count=n;const v=u()>.5,x=!v||u()>.5,{class:w,types:y,specialTypes:C}=f(r);return c=1===c||2!==c&&u()>.5,new w({p:o,count:n,coef:h||g(.1,4),colors:t,type:f(y),specialType:f(C),rotation:f(a),fill:v&&f(l),stroke:x&&f(l),gFillDirection:f(s),gStrokeDirection:f(s),differentFillGradients:u()>.5,differentStrokeGradients:u()>.5,render90deg:c,rnd:u,rangeFloor:m,pick:f,str:p,cutBacks:d})}));(0===o||1===o&&u()>.1||2===o&&u()>.7)&&v.forEach((e=>{D([e],1,"renderBacks")}))};const L=void 0;var O=(e,t,o,i,n,r)=>{const s=([e,t])=>[[e,t],[e+1,t],[e+1,t+1],[e,t+1]],l=[];let a=[e,t],c=0;const h=(e,t)=>(c+=1,c>4&&(a=r(l)[0],c=0),0===l.filter((([[o,i]])=>e===o&&t===i)).length);let p=0;for(;p<o;){const[e,t]=a,o=r(["left","up","right","down"]);"up"===o?t-1>=0&&h(e,t-1)&&(a=[e,t-1],l.push(s(a)),p+=1):"down"===o?t+1<1*n&&h(e,t+1)&&(a=[e,t+1],l.push(s(a)),p+=1):"left"===o?e-1>=0&&h(e-1,t)&&(a=[e-1,t],l.push(s(a)),p+=1):"right"===o&&e+1<1*i&&h(e+1,t)&&(a=[e+1,t],l.push(s(a)),p+=1)}return l};const P=void 0;var _=(e,t,o,i)=>{const n=e=>e.filter((([t,o])=>{const i=e.filter((([e,i])=>t===e&&o===i+1)).length>0,n=e.filter((([e,i])=>t===e+1&&o===i)).length>0,r=e.filter((([e,i])=>t===e&&o===i-1)).length>0,s=e.filter((([e,i])=>t===e-1&&o===i)).length>0,l=e.filter((([e,i])=>t===e-1&&o===i+1)).length>0,a=e.filter((([e,i])=>t===e+1&&o===i+1)).length>0,c=e.filter((([e,i])=>t===e+1&&o===i-1)).length>0,h=e.filter((([e,i])=>t===e-1&&o===i-1)).length>0;return!(i&&n&&r&&s&&l&&a&&c&&h)}));let r=s(e.flat());r=n(r);const l=void 0,a=(e=>{let t=(e=e.sort((([e,t],[o,i])=>e+t-(o+i))))[0];const o=[t];let i=[...e];i.shift();const n=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e&&a===n-1)return t=[l,a],o.push(t),i.splice(s,1),!0}},r=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e+1&&a===n)return t=[l,a],o.push(t),i.splice(s,1),!0}},s=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e&&a===n+1)return t=[l,a],o.push(t),i.splice(s,1),!0}},l=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e-1&&a===n)return t=[l,a],o.push(t),i.splice(s,1),!0}};let a=[{func:l,type:"left"},{func:n,type:"up"},{func:r,type:"right"}],c=null,h="null";for(;o.length<e.length;)"up"===h?a=[{func:l,type:"left"},{func:n,type:"up"},{func:r,type:"right"}]:"right"===h?a=[{func:n,type:"up"},{func:r,type:"right"},{func:s,type:"down"}]:"down"===h?a=[{func:r,type:"right"},{func:s,type:"down"},{func:l,type:"left"}]:"left"===h&&(a=[{func:s,type:"down"},{func:l,type:"left"},{func:n,type:"up"}]),c=a[0].func(...t,i),h=a[0].type,c||(c=a[1].func(...t,i),h=a[1].type),c||(c=a[2].func(...t,i),h=a[2].type),c=null;return o})(r);let c=[],h=[];if(i)for(let e=0;e<a.length;e+=1){let[i,n]=a[e];const r=i*t,s=n*o;h.push({type:"vertex",points:[r,s]})}else for(let e=0;e<a.length;e+=1){let[i,n]=a[e],[r,s]=a[(e+a.length-1)%a.length],[l,c]=a[(e+1)%a.length];const p=i*t,d=n*o;r===i&&s===n+1&&l===i+1&&c===n||r===i&&s===n-1&&l===i-1&&c===n||r===i-1&&s===n&&l===i&&c===n+1||r===i+1&&s===n&&l===i&&c===n-1||h.push({type:"vertex",points:[p,d]})}return{finalPoints:h,arcs:c}};const I=(e,t,o,i,n=0)=>{const{rnd:r,rangeFloor:s,pick:l,pickSome:a,shuffleArray:c}=i,h=e,p=e*(height/width);let d=(width-width*n*2)/h,f=d,u=[];for(let e=0;e<h;e+=1)for(let t=0;t<p;t+=1)u.push([e,t]);u=c(u),u=a(u,t);const g=[];let m;return u.forEach((e=>{const[t,i]=e;g.push(O(t,i,s(...o),h,p,l))})),c(g.map((e=>_(e,d,f,r()>.5))))},W=(e,t,o,i,n)=>{const r=width/1e3;e.drawingContext.shadowColor=t,e.drawingContext.shadowBlur=o*r,e.drawingContext.shadowOffsetX=i?i*r:0,e.drawingContext.shadowOffsetY=n?n*r:0},T=(e,t)=>{e.beginShape(),t.forEach((({points:t})=>{e.vertex(...t)})),e.endShape(CLOSE)},R=void 0,M=(e,t,o,i,n)=>{const{rnd:r,pick:s,range:l}=n;let a=t,c=o,h=s([0,a]),p=s([0,a]),d=s([0,a]);e.loadPixels();let f=e.pixelDensity(),u=e.width*f*4*(e.height*f);for(let t=0;t<u;t+=4)r()<i&&(h=s([0,a]),p=s([0,a]),d=s([0,a])),e.pixels[t]=e.pixels[t+h]+s([-1,1])*l(c),e.pixels[t+1]=e.pixels[t+1+p]+s([-1,1])*l(c),e.pixels[t+2]=e.pixels[t+2+d]+s([-1,1])*l(c);for(let t=u;t>0;t-=4)r()<i&&(h=s([0,a]),p=s([0,a]),d=s([0,a])),e.pixels[t]=e.pixels[t-h]+s([-1,1])*l(c),e.pixels[t+1]=e.pixels[t+1-p]+s([-1,1])*l(c),e.pixels[t+2]=e.pixels[t+2-d]+s([-1,1])*l(c);e.updatePixels()},U=void 0;var N=(e,t,o,i,n,r,s,l,a,c,h,p=0)=>{const{filled:d,glitch:f,backs2:u,scheme:g,doubleShadow:m,smallShadow:v}=h,{pick:x,pickSome:w,rnd:y,rangeFloor:C}=t,k=width/1e3;let F=width*p,D=height*p;const b=[x([-1,0,1]),x([-1,0,1])],S=b.map((e=>-1*e)),E=w(o,2),A=i,B=y()>.5?E[1]:i,G=I(r,s,c,t,p);let z;f&&(z=createGraphics(3040,4560),z.pixelDensity(1),z.image(e,0,0),M(z,x([16,32,64,128,256]),16,2e-6,t)),e.push(),e.translate(F,D),G.forEach((({finalPoints:t})=>{const r=!u&&y()>.5,s=void 0;if(!u&&y()>.8){const i=C(8),n=x(o);n.setAlpha(100),e.push(),e.noStroke(),e.fill(n),W(e,n,1,i*S[0],i*S[1]),T(e,t),e.pop(),y()>.05&&n.setAlpha(255)}if(r){e.push();const i=C(8),n=x(o);e.noStroke(),e.fill(n),W(e,n,i),T(e,t),e.pop()}e.push(),r?e.noFill():e.fill(x(o)),e.strokeWeight(0),a&&y()>.5&&(e.strokeWeight(k),e.stroke(B)),f||(z=x(n).back);let c=1;if(m&&(c=2),l){let o=C(8,16)*c,n=C(8)*c;if(d&&(o=C(4,16),n=C(4)),v&&(o=C(0,4),n=C(2)),W(e,i,o,n*b[0],n*b[1]),y()>.5){const r=[o,0],s=[n,0];y()>.5&&(r.reverse(),s.reverse());const l=map(t[0].points[1],0,height,r[0],r[1]),a=map(t[0].points[1],0,height,s[0],s[1]);W(e,i,l,a*b[0],a*b[1])}}if(d){const t=x(o);t.setAlpha(100),e.fill(t),t.setAlpha(255)}u&&e.noFill(),T(e,t),e.drawingContext.clip(),e.image(z,0,0,width,height),g&&(e.stroke(A),e.strokeWeight(k),e.push(),e.translate(F,D),e.noFill(),T(e,t),e.pop(),t.forEach((({points:t})=>{e.push(),e.translate(F,D),y()>.7&&e.fill(x(o)),e.circle(...t,5*k),e.pop()}))),e.pop()})),e.pop()};const q=void 0,Y=void 0;var X=(e,t,o,i)=>{const{rangeFloor:n,rnd:r}=i,s=e/2*3,l=i=>{const n=.5*r();return!(i[0]<0||i[0]>e||i[1]>height-height*t)&&(n<.25?[i[0]+1,i[1]+o]:n<.5?[i[0]-1,i[1]+o]:n<.75?[i[0]+1,i[1]]:[i[0]-1,i[1]])},a=e=>{const i=r();return!(e[1]<0||e[1]>s||e[0]>width-width*t)&&(i<.25?[e[0]+o,e[1]+1]:i<.5?[e[0]+o,e[1]-1]:i<.75?[e[0],e[1]+1]:[e[0],e[1]-1])},c=n(e+1),h=n(s+1);let p=[c,0],d=l(p);const f=[[p[0]*o,p[1]]];for(;d;)d=l(p),d&&(f.push([d[0]*o,d[1]]),p=d);let u=[0,h],g=a(u),m=[[u[0],u[1]*o]];for(;g;)g=a(u),g&&(m.push([g[0],g[1]*o]),u=g);return{xPoints:f,yPoints:m}},H=(e,t,o,i,n)=>{if(t&&o.length>4){const t=n(1,3),r=n(0,o.length-t-1);e.drawingContext.setLineDash([r*i,t*i])}else e.drawingContext.setLineDash([])},V=W,Q=(e,t,o=0,i=0)=>{e.beginShape(),t.forEach((t=>{e.vertex(t[0]+o,t[1]+i)})),e.endShape()};const j=void 0;var J=(e,t,o,i,n=0,r)=>{const s=createGraphics(3040,4560);s.pixelDensity(1),s.image(e,0,0);const l=width/1e3,{pick:a,range:c,rangeFloor:h,rnd:p,weighted:d}=t,f=[a([-1,0,1]),a([-1,0,1])],u=a([2,4,8,16]),g=a(o),m=void 0,v=(width-width*n*2)/u,x=sqrt(sq(v)+sq(v)),w=p()>.5,y=h(12,48),{xPoints:C,yPoints:k}=X(u,n,v,t);e.strokeCap(SQUARE),e.push(),e.translate(width*n,height*n);const F=void 0;if(p()>.5){const t=h(3,8),i=h(1,6);e.push(),e.noFill();const n=h(1,5)*l;if(e.strokeWeight(n),p()>.5)for(let r=1;r<t;r+=1){H(e,w,C,x,h);const t=r*n*f[0]*i,s=r*n*f[1]*i;e.stroke(o[r%o.length]),Q(e,C,t,s)}else if(p()>.5){H(e,w,k,x,h);for(let r=1;r<t;r+=1){const t=r*n*f[0]*i,s=r*n*f[1]*i;e.stroke(o[r%o.length]),Q(e,k,t,s)}}e.pop()}const D=a([1,2,3,4]);e.push(),e.noFill(),e.stroke(g),r&&e.stroke(i),e.strokeWeight(D*l/2),H(e,w,C,x,h),Q(e,C),H(e,w,k,x,h),Q(e,k),e.strokeWeight(D*l);const b=2*c(1,4);V(e,i,b,y*f[0],y*f[1]),H(e,w,C,x,h),Q(e,C),H(e,w,k,x,h),Q(e,k),D>2&&p()>.5&&(e.drawingContext.shadowBlur=0,e.strokeWeight(l),e.stroke(a(o)),H(e,w,C,x,h),Q(e,C),H(e,w,k,x,h),Q(e,k)),e.pop();const S=10*l,E=n?S-S*n:S,A=t=>{t.forEach(((t,r)=>{if(r!==C.length-2&&0!==r&&p()>.7&&(e.push(),e.noStroke(),e.fill(g),e.ellipse(...t,E),p()>.5&&(e.fill(i),e.ellipse(...t,E/2)),e.pop()),p()>.9){const i=E*[1.5,2,2.5,3,3.5,4][d([4,4,3,3,2,1])]*D,r=p()>.75,f=p()>.75,u=p()>.75,m=h(3,8),v=i/m,x=a([-5,0,5])*l,w=a([-5,0,5])*l;if(e.push(),e.stroke(g),f&&p()>.5&&(e.noStroke(),e.fill(g)),e.strokeWeight(D*l),e.ellipse(...t,i),e.translate(-width*n,-height*n),e.drawingContext.clip(),e.image(s,x,w,1.01*width,1.01*height),r){const r=p()>.5,s=p()>.7;e.translate(width*n,height*n),e.noFill();for(let n=0;n<m;n+=1){const a=i-n*v,h=c(0,TWO_PI),d=h+c(HALF_PI,TWO_PI);r&&e.stroke(o[n%o.length]),p()>.85?e.strokeWeight(D*l-n*v):e.strokeWeight(l-n*v),s?e.arc(...t,a,a,h,d,OPEN):e.ellipse(...t,a)}}if(f){const n=a(o);n.setAlpha(75),e.push(),e.fill(n),e.noStroke(),e.ellipse(...t,i),e.pop(),n.setAlpha(255)}u&&(e.push(),e.stroke(g),e.strokeWeight(D*l),p()>.5?(e.line(t[0]-i/2,t[1],t[0]+i/2,t[1]),e.line(t[0],t[1]-i/2,t[0],t[1]+i/2)):(e.line(t[0]-i/2,t[1]-i/2,t[0]+i/2,t[1]+i/2),e.line(t[0]+i/2,t[1]-i/2,t[0]-i/2,t[1]+i/2)),e.pop()),e.pop()}}))};A(C),A(k),e.pop()};class ${constructor({p:e,count:t,coef:o,colors:i,type:r,specialType:s,rotation:l,fill:a,stroke:c,gFillDirection:h,gStrokeDirection:p,differentFillGradients:d,differentStrokeGradients:f,render90deg:u,rnd:g,rangeFloor:m,str:v,pick:x,cutBacks:w}){const y={c:0,tl:0,tr:.5*PI,bl:1.5*PI,br:PI};this.p=e,this.count=t,this.colors=i,this.type=r,this.rotation=y[l],this.fill=a,this.stroke=c,this.gFillDirection=h,this.gStrokeDirection=p,this.specialType=s,this.lerpColors=n(i,t**2*o),this.size=e.width/t,this.counter=0,this.xCounter=0,this.xCount=e.round(e.width/this.size),this.yCount=e.round(e.height/this.size),this.render90deg=u,this.destinations=u?[this.yCount,this.xCount]:[this.xCount,this.yCount],this.odd=!1,this.lineOdd=!1,this.differentFillGradients=d,this.differentStrokeGradients=f,this.rnd=g,this.rangeFloor=m,this.str=v,this.pick=x,this.cutBacks=w}drawShape(){}render(){let{p:e,colors:t,destinations:o,size:i,counter:n,xCounter:r,rotation:s,lerpColors:l,fill:a,stroke:c,render90deg:h,differentFillGradients:p,differentStrokeGradients:d}=this;for(let f=0;f<o[0];f+=1){for(let u=0;u<o[1];u+=1){let o=f*i,g=u*i;h&&(o=u*i,g=f*i),this.lineOdd=r%2==0,this.lineOdd?this.odd=n%2==0:this.odd=n%2!=0;let m=l[n%l.length];if("noise"===a){const e=noise(.001*o,.001*g);m=l[Math.round(map(e,0,1,0,l.length-1))%l.length]}this.mainColor=t[0],this.secondaryColor=m,e.push(),e.translate(o,g),e.translate(i/2,i/2),e.rotate(s),e.translate(-i/2,-i/2),"solid"===a?e.fill(t[0]):"lerp"===a||"noise"===a?e.fill(m):"gradient"===a?p?this.makeGradient(!0,!1,m):this.makeGradient(!0):a||e.noFill(),"solid"===c?e.stroke(t[1]):"lerp"===c||"noise"===c?e.stroke(m):"gradient"===c?d?this.makeGradient(!1,!1,m):this.makeGradient(!1,!1):c||e.noStroke(),this.drawShape(),e.pop(),n+=1}r+=1}}makeGradient(e,t,o){let{p:i,gFillDirection:n,gStrokeDirection:r,gBackgroundDirection:s,size:c,colors:h}=this;const p=void 0,d=e?n:t?s:r,f=["tb","lr","tlbr","trbl"].includes(d)?[0,1]:[1,0],u=[0,0],g=[c,0],m=[0,c],v=[c,c],x=[c/2,0],w=[c/2,c],y=[0,c/2],C=[c,c/2],k=e||t?l:a,F=o?[h[0],o]:h;"tb"===d||"bt"===d?k(i,...x,...w,f,F):"lr"===d||"rl"===d?k(i,...y,...C,f,F):"tlbr"===d||"bltr"===d?k(i,...u,...v,f,F):"trbl"!==d&&"brtl"!==d||k(i,...g,...m,f,F)}}class K extends ${constructor(e){super(e)}drawShape(){let{p:e,type:t,size:o,odd:i,lineOdd:r,rnd:s,rangeFloor:l,colors:a,mainColor:c,secondaryColor:h}=this,p,d,f,u,g,m,v;if("something"!==t||r||(i=!i),"diagonal"===t&&i?(v=1,p=o,d=0,f=o,u=o,g=0,m=o):"mirror"!==t&&"something"!==t||!i?"chess"===t||"shear"===t||"zigzag"===t?r?i||"shear"===t?(v=2,p=0,d=0,f=o,u=o,g=0,m=o):(v=1,p=o,d=0,f=o,u=o,g=0,m=o):("zigzag"===t&&(i=!i),i||"shear"===t?(v=3,p=0,d=0,f=o,u=0,g=o,m=o):(v=4,p=0,d=0,f=o,u=0,g=0,m=o)):(v=4,p=0,d=0,f=o,u=0,g=0,m=o):(v=2,p=0,d=0,f=o,u=o,g=0,m=o),e.triangle(p,d,f,u,g,m),s()>.9){const t=l(2,21),i=o/t,r=n(a,t),x=s()>.5;for(let n=0;n<t;n+=1)1===v?(p=o,d=n*i,f=o,u=o,g=n*i,m=o):2===v?(p=0,d=n*i,f=o-n*i,u=o,g=0,m=o):3===v?(p=n*i,d=0,f=o,u=0,g=o,m=o-n*i):4===v&&(p=0,d=0,f=o-n*i,u=0,g=0,m=o-n*i),x?e.fill(n%2==0?c:h):e.fill(r[n]),e.triangle(p,d,f,u,g,m)}}}var Z=K;class ee extends ${constructor(e){super(e)}drawShape(){let{p:e,type:t,size:o,odd:i,lineOdd:r,specialType:s,rnd:l,rangeFloor:a,colors:c,mainColor:h,secondaryColor:p,str:d,pick:f,cutBacks:u}=this;"simple"===t&&r&&(i=!i);let g=o;if("half"===s?g=.5*o:"quarter"===s?g=.75*o:"third"===s?g=.66*o:"mid"===s?g=1.2*o:"max"===s&&(g=1.4*o),i){if(e.rectMode(e.CENTER),l()>.2)e.rect(o/2,o/2,g,g);else{const t=a(2,41),i=n(c,t),r=l()>.5,s=l()>.5;for(let n=0;n<t;n+=1){const a=g-g/t*n;r?e.fill(n%2==0?h:p):e.fill(i[n]),s&&l()>.75&&e.noFill(),e.rect(o/2,o/2,a,a)}}u&&l()>.75&&(e.drawingContext.clip(),e.image(f(u),0,0)),l()>.9&&(e.textSize(g),e.textAlign(e.CENTER,e.CENTER),e.text(f(d),o/2,o/2))}}}var te=ee,oe={};oe="precision highp float;\n#define GLSLIFY 1\nuniform sampler2D v;uniform vec2 f;uniform float s,t,x,y;float D(vec2 v){vec3 f=fract(v.xyx*.1031);f+=dot(f,f.yzx+33.33);return fract((f.x+f.y)*f.z);}float D(vec2 v,float s,float f){return s+D(v)*(f-s);}float n(float f,float v,float s){return step(v,f)-step(s,f);}float r=t;void main(){vec2 i=gl_FragCoord.xy/f,t;float z=1.+y*2.,u;i-=y/z;i*=z;t=vec2(i.x,1.-i.y);vec3 m=texture2D(v,t).xyz;u=r/2.;for(float e=0.;e<200.;e+=1.){float h=D(vec2(s,2345.+float(e))),w=D(vec2(s,4851.+float(e)))*.25,g=D(vec2(s,9625.+float(e)),-u,u);vec2 d=t;d.x+=g;if(n(t.y,h,fract(h+w))==1.){float o=r/6.,a=D(vec2(s,9545));vec2 l=vec2(D(vec2(a,2323),-o,o),D(vec2(a,7707),-o,o));if(a<.33)m.x=texture2D(v,d+l).x;else if(a<.66)m.y=texture2D(v,d+l).y;else m.z=texture2D(v,d+l).z;}}vec4 e=vec4(m,1);e*=1.-x+x*sin(100.+i.x*4e3)+.1;e*=1.-x+x*sin(100.+i.y*6e3)+.1;e.w=1.;gl_FragColor=e;}\n";var ie=D;const ne=new URLSearchParams(window.location.search),re=Object.fromEntries(ne.entries());let se;tokenData.hash="0xad794bada7b302fa05a3a1d392b09c4583399462533a38d652cb8b107567c390";const le=.666666666667;let ae,ce,he,pe,de,fe,ue,ge,me,ve;const xe=[3040,4560];let we,ye,Ce,ke,Fe,De,be,Se,Ee=.002,Ae;const{pd:Be=1}=re;function setup(){noLoop(),p5.phase=0,ce=createCanvas(xe[0],xe[1]),we=Ce=width,ye=ke=height,Fe=be=we/2,De=Se=ye/2,p5.shaderCanvas=createGraphics(3040,4560,WEBGL),p5.shaderCanvas.pixelDensity(1),p5.finalImage=createGraphics(3040,4560),p5.finalImage.pixelDensity(1),ve=createGraphics(3040,4560),ve.pixelDensity(1),se=width/1e3,p5.M=se,pixelDensity(Number(Be)),he=createGraphics(xe[0],xe[1]),he.pixelDensity(1),p5.mainBack=he,strokeWeight(se),strokeCap(SQUARE);const e=t(tokenData.hash);p5.globalRandom=e;const{rnd:o,range:n,rangeFloor:r,pick:s,pickSome:l,weighted:a,shuffleArray:f}=e;for(let e=0;e<4;e+=1)o();const calculateFeatures=()=>{const e={};return e.paletteIndex=r(i.length-1),e.squares=o()>.7,e.sameFill=o()>.7,e.samePattern=o()>.7,e.sameSize=o()>.95,e.outlines=o()>.5,e.shapeOverload=["min","mid","max"][a([1,2,2])],e.volume=o()>.25,e.compression=[1,2,3,4,5][a([11,10,4,1,1])],e.symbols=s(["anime","numbers","binary","squares","arrows","dots","trigrams"]),e.split=o()>.98,e},{paletteIndex:u,sameFill:g,samePattern:m,sameSize:v,squares:x,outlines:w,shapeOverload:C,volume:F,compression:D,symbols:b,split:S}=calculateFeatures();let E;const A=f([...i[u],"#a6a6a6","#404040","#0d0d0d"]);p5.backgroundColor=s(A),p5.overloadColors=A,de=o,fe=n,ae=()=>{p5.processed=[],p5.phase=1;const t=void 0;let a,E;o()>.3?(a=s([6,7,8,9]),E=a):(a=s([5,6,7,8,9]),E=r(a,10)),noiseSeed(1e6*o());const B=c(A,A.length).map((e=>(e.setAlpha(30),e)));let G=c(A,A.length),L=c(f(i[u]),i[u].length);Ae=lerpColor(G[0],color(0),.9);let O=s(L);me=h(r(8,40)).map((()=>createGraphics(xe[0],xe[1]))),ue=c(A,90*me.length),ge=c(A,90*me.length),me.forEach((e=>{e.pixelDensity(1),e.strokeCap(SQUARE),e.strokeWeight(se)})),me=me.map((e=>({back:e,count:0,count2:0})));const P=Math.ceil(me.length/2);let _=me.splice(0,P),I=me.splice(-P);me=f([..._,...I]);let W=[4,8,16,32,64];const T=v&&[s([4,8,16,32])],R=void 0,M=void 0,U=void 0,q=void 0,Y=void 0,X=void 0,H=void 0,V=void 0,Q={numbers:"0123456789".split(""),binary:["0","1","・","●","○"],squares:["□","■","▣","◩","◪"],arrows:["◄","▲","▼","►","◁","△","▽","▷"],dots:["∴","∵","∶","∷","・"],trigrams:["☰","☲","☱","☴","☵","☶","☳","☷"],anime:" .:-=+*#%@゠ァアィ�
ヤュユョヨラリルレロヮワヰヱヲンヵヶ・ーヽヿ".split("")}[b],j=[{class:Z,types:["chess","mirror","diagonal","corner","shear","zigzag","something"],specialTypes:[]},{class:te,types:["chess","simple"],specialTypes:["normal","half","third","quarter","max"]}],$=[j[1]];let K=["lr","tb","bt","rl","trbl","tlbr","brtl","bltr"],ee=["solid","lerp","gradient","noise"],ne=["tl","br","tr","bl"],re=!1,le=!1;m&&(j[0].types=[s(j[0].types)],j[1].types=[s(j[1].types)],ne=[s(ne)],re=s([1,2])),g&&(ee=[s(ee)],K=[s(K)],le=n(.1,4)),x&&j.shift();for(let t=0;t<3;t+=1)z(_,G,t,T||W,e,j,K,ee,ne,re,le,Q);const ae={1:.075,2:.075,3:.1,4:.2,5:.25},ce={1:.01,2:.025,3:.04,4:.05,5:.08};let de=ae[D];p5.offsetCoef=de,_.forEach((e=>{ie([e],1,"applyEffects","shrink",{amount:p5.offsetCoef}),o()>.5&&ie([e],1,"applyEffects","glitch2")}));const fe=void 0,ve={min:[10,20],mid:[10,50],max:[50,200]}[C];let we;he.background(O),ie([we],1,"processFunction",(()=>{we=createGraphics(xe[0],xe[1]),we.pixelDensity(1),y(we,G,Ae,Q,e),he.image(_[0].back,0,0,width,height),he.image(we,0,0,width,height)}));let ye=[8,16,32,64,128];const Ce=20,ke=.05,Fe=.025,De=o()>.9;for(let t=0;t<=Ce;t+=1){const i=s(ye);o()>.6&&ie([he],1,"processFunction",(()=>J(he,e,G,Ae))),o()>.8&&ie([he],1,"processFunction",(()=>J(he,e,G,Ae))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,_,i,r(...ve),F,w,[a,E],{filled:!1,iteration:t,doubleShadow:De}))),ie([{back:he}],1,"applyEffects","desaturate",{amount:1-ke*t,contrast:1.5-Fe*t})}let be,Se=de/(1+2*de),Ee,Be;ie([{back:he}],1,"applyEffects","shrink",{amount:p5.offsetCoef}),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>{Ee=createGraphics(xe[0],xe[1]),Ee.pixelDensity(1),Ee.image(he,0,0,width,height)})),ie([he],1,"processFunction",(()=>{he.push(),he.noStroke(),he.rectMode(CENTER),he.translate(width/2,height/2),he.rotate(n(0,TWO_PI)),p(he,width/2,0,width/2,height,[0,1],l(B,2)),he.blendMode(ADD),he.rect(0,0,1.4*height,1.4*height),he.pop()})),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,_,8,r(8,16),!0,w,[a,E],{filled:!1,glitch:!0},0))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>z(I,G,0,T||[8,16,32,64],e,$,K,ee,ne,re,le,[],[Ee,we]))),ie([he],1,"processFunction",(()=>{Be=createGraphics(xe[0],xe[1]),Be.pixelDensity(1),Be.image(he,0,0,width,height),Be.image(we,0,0,width,height)})),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,Se))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,[{back:Ee},{back:Be}],16,r(4,16),!0,w,[a,E],{filled:!0,scheme:!0},Se))),ie([{back:he}],1,"applyEffects","shrink",{amount:ce[D]}),ie([he],1,"processFunction",(()=>z(I,G,0,T||[16,32,64],e,$,K,ee,ne,re,le,Q,[Ee,we,Be]))),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,I,16,r(4,16),!0,w,[a,E],{filled:!1,backs2:!0,smallShadow:!0},0)));const Ge=width*ae[D],ze=height*ae[D];ie([he],1,"processFunction",(()=>k(he,Ae,Ge,ze))),ie([{back:he}],1,"applyEffects","grid",{amount:.1});let Le=!1;if(S||(Le="final"),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0)),Le),S){let t;ie([he],1,"processFunction",(()=>{t=createGraphics(xe[0],xe[1]),t.pixelDensity(1),t.image(he,0,0,width,height)})),ie([{back:he}],1,"applyEffects","desaturate",{amount:1,contrast:1}),ie([he],1,"processFunction",(()=>N(he,e,G,Ae,[{back:t}],32,r(16,32),!0,!0,[a,E],{filled:!0,backs2:!0},Se))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0))),ie([he],1,"processFunction",(()=>J(he,e,G,Ae,0)),"final")}Ae.setAlpha(255),pe=p5.shaderCanvas.createShader(d,oe)},ae(),windowResized()}let Ge=0,ze=20,Le=0,Oe=0,Pe=0;function draw(){if(2===p5.phase){if(frameRate(30),1===Be){const e=ue[frameCount%ue.length],t=ge[frameCount%ge.length];frameCount%20<10?t.setAlpha(map(frameCount%20,0,10,255,0)):t.setAlpha(map(frameCount%20,10,20,0,255)),ve.background(e),frameCount%20==0&&Ge++,ve.image(me[Ge%me.length].back,0,0,width,height),ve.push(),ve.noStroke(),ve.fill(t),ve.rect(0,0,width,height),ve.pop(),frameCount%5==0&&(Le=.2*de(),Oe=.2*de(),Pe=fe(-.5,1)),p5.shaderCanvas.push(),p5.shaderCanvas.shader(pe),pe.setUniform("v",ve),pe.setUniform("f",[width,height]),pe.setUniform("s",de()),pe.setUniform("t",map(sin(frameCount/10),-1,1,.01,Le)),pe.setUniform("x",Oe),pe.setUniform("y",Pe),p5.shaderCanvas.quad(-1,-1,1,-1,1,1,-1,1),p5.shaderCanvas.pop(),image(p5.shaderCanvas,0,0,width,height)}Fe=lerp(Fe,be,.2),De=lerp(De,Se,.2),we=lerp(we,Ce,.2),ye=lerp(ye,ke,.2),image(p5.finalImage,Fe-we/2,De-ye/2,we,ye),push(),drawingContext.shadowColor=Ae,drawingContext.shadowBlur=width/1e3*16,stroke(Ae),strokeWeight(8*se),noFill(),rect(0,0,width,height),pop()}}function mouseDragged(){be+=mouseX-pmouseX,Se+=mouseY-pmouseY}function mouseWheel(e){var t=-e.delta;if(t>0)for(let e=0;e<t;e+=1){if(Ce>10*width)return;be-=Ee*(mouseX-be),Se-=Ee*(mouseY-Se),Ce*=Ee+1,ke*=Ee+1}if(t<0)for(let e=0;e<-t;e+=1){if(Ce<.9*width)return;be+=Ee/(Ee+1)*(mouseX-be),Se+=Ee/(Ee+1)*(mouseY-Se),ke/=Ee+1,Ce/=Ee+1}}function doubleClicked(){we=Ce=width,ye=ke=height,Fe=be=we/2,De=Se=ye/2,Ee=.1}function windowResized(){const e=void 0,t=ce.canvas.style;let o,i;.666666666667*window.innerHeight>=window.innerWidth?(o=window.innerWidth,i=window.innerWidth/.666666666667):(i=window.innerHeight,o=.666666666667*window.innerHeight),t.position="absolute",t.display="block",t.top=t.left=t.right=t.structure="0",t.width=`${o}px`,t.height=`${i}px`}window.addEventListener("keydown",(e=>{"s"===e.key&&saveCanvas(tokenData.hash,"png")}));console.log('I never intended to and do not intend to kill myself, and if anything happens to me, there can only be one reason - those people behind the fabricated criminal case against me. Shvembldr.')
const e=void 0;var t=e=>{const t=Uint32Array.from([0,0,0,0].map(((t,o)=>parseInt(e.substr(8*o+2,8),16)))),o=()=>{let e,o=t[3];return t[3]=t[2],t[2]=t[1],t[1]=e=t[0],o^=o<<11,o^=o>>>8,t[0]=o^e^e>>>19,t[0]/4294967296},i=(e=.5)=>o()<e,n=void 0,r=(e,t)=>t?o()*(t-e)+e:o()*e,s=(e,t)=>Math.floor(r(e,t)),l=e=>e.length?e[s(0,e.length)]:void 0,a=e=>{let t=e.reduce(((e,t)=>e+t)),i=o()*t;for(let t=0;t<e.length;t++){if(i<e[t])return t;i-=e[t]}return 0},c=(e,t)=>{let o;return h(e).slice(0,t)},h=e=>{let t,i,n=e.length,r=e.slice();for(;n;)t=Math.floor(o()*n--),i=r[n],r[n]=r[t],r[t]=i;return r},p=function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]},d=(e,t)=>{e=p(e,1),t=t||[];var i=2*o()*Math.PI;return t[0]=e*Math.cos(i),t[1]=e*Math.sin(i),t},f=(e,t)=>{e=p(e,1),d(1,t=t||[]);var i=e*Math.sqrt(o());return t[0]*=i,t[1]*=i,t};let u=!1,g=null;const m=(e,t)=>{if(u){u=!1;let o=g;return g=null,e+t*o}{let i=0,n=0,r=0;do{i=2*o()-1,n=2*o()-1,r=i*i+n*n}while(r>=1||0===r);let s=Math.sqrt(-2*Math.log(r)/r);return g=n*s,u=!0,e+t*(i*s)}};return{rnd:o,chance:i,bool:i,range:r,rangeFloor:s,pick:l,pickSome:c,weighted:a,shuffleArray:h,onCircle:d,insideCircle:f,gaussian:m}};const o=void 0;var i=[["#D24F8C","#1EACB7","#D7D6C9","#231E24"],["#111F19","#8AE84F","#F7F61B","#FC5192","#FF686C"],["#22342E","#30443F","#0281BB","#DD809C","#DB473A","#FACF0B"],["#4156A0","#E62630","#3B393D","#9F9FA5","#49678C"],["#F25D26","#1B2934","#A9B3C9","#247F51","#F2A8D4"],["#F23D2D","#F1F3F5","#000101"],["#C0080B","#5C4F40","#245941","#DC9C0B","#101F87","#0E7DCC"],["#CC4939","#724483","#3B3C80","#F0CB4D","#4CA183","#49659E"],["#ffbf00","#e83f6f","#2274a5","#32936f"],["#94afc0","#2289b6","#f7bd40","#e0160a","#871008"],["#1e2022","#52616b","#c9d6df"],["#F4BC01","#002E4B","#176A95","#819EB9","#CFD0DD","#CB090D"],["#075ea8","#d9322b","#f3a606"],["#169b62","#5ec8e5","#f984ca","#e34459"],["#ff6700","#c0c0c0","#3a6ea5","#004e98"],["#01608F","#EF91A9","#EB4626","#F4BA10","#34A096","#2C2F8C"],["#229B9A","#021F19","#F8EBC8","#B33B2B","#F9972B","#E7D540","#558848","#4F8CB6","#B5526D"],["#F8E7C9","#067DB9","#5885C9","#A7A69B","#ECDB3C","#9BB666","#AB3938","#DB4E3A"],["#00283B","#1F656C","#F0F2CF","#F72B01","#F14A39","#AA0067","#4C0082","#D6BC4B","#19A091","#1E67AF"]];const n=(e,t)=>{const o=[],i=Math.ceil(t/e.length),n=1/i;for(let t=0;t<e.length;t+=1)for(let r=0;r<i;r+=1){const i=color(e[t]),s=color(e[(t+1)%e.length]);o.push(lerpColor(i,s,(r+1)*n))}return o},r=void 0,s=e=>e.filter(((t,o)=>{const i=JSON.stringify(t);return o===e.findIndex((e=>JSON.stringify(e)===i))})),l=(e,t,o,i,n,r,s)=>{const l=e.drawingContext.createLinearGradient(t,o,i,n);return r.forEach(((e,t)=>l.addColorStop(e,s[t]))),e.drawingContext.fillStyle=l,l},a=(e,t,o,i,n,r,s)=>{const l=e.drawingContext.createLinearGradient(t,o,i,n);return r.forEach(((e,t)=>l.addColorStop(e,s[t]))),e.drawingContext.strokeStyle=l,l};var c=n,h=e=>new Array(e).fill(0).map(((e,t)=>t)),p=l,d={};d="precision highp float;\n#define GLSLIFY 1\nvarying vec2 vPos;\nattribute vec3 aPosition;\nvoid main() {\n vPos = (gl_Position = vec4(aPosition,1.0)).xy;\n}\n";var f={};f="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;uniform sampler2D p;uniform float rnd,amount1,amount2,amount3;uniform int type;void main(){vec2 st=gl_FragCoord.xy/u_resolution,uv=vec2(st.x,1.-st.y);vec4 col;if(type==1)col.x=texture2D(p,vec2(uv.x+amount1,uv.y)).x,col.y=texture2D(p,vec2(uv.x+amount2,uv.y)).y,col.z=texture2D(p,vec2(uv.x-amount3,uv.y)).z;else col.x=texture2D(p,vec2(uv.x,uv.y+amount1)).x,col.y=texture2D(p,vec2(uv.x,uv.y+amount2)).y,col.z=texture2D(p,vec2(uv.x,uv.y-amount3)).z;col.w=texture2D(p,uv.xy).w;gl_FragColor=col;}\n";var u={};u="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;\nuniform sampler2D p;\nuniform float amount;\n\nvoid main(){\n vec2 st=gl_FragCoord.xy/u_resolution;\n float mult=1.+amount*2.;\n st-=amount/mult;\n st*=mult;\n gl_FragColor=texture2D(p,vec2(st.x,1.-st.y));\n}\n";var g={};g="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;\nuniform sampler2D p;\nuniform float amount;\n\nvoid main(){\n vec2 st=gl_FragCoord.xy/u_resolution;\n vec4 color;\n color.xyz=texture2D(p,vec2(st.x,1.-st.y)).xyz;\n color*=1.-amount+amount*sin(100.+st.x*4e3)+.1;\n color*=1.-amount+amount*sin(100.+st.y*6e3)+.1;\n color.w=1.;\n gl_FragColor=color;\n}\n\n";var m={};m="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;uniform sampler2D p;uniform float rnd,amount,contrast;vec3 i(vec3 c,float f){vec3 l=vec3(.299,.587,.114),g=vec3(dot(l,c));return mix(c,g,f);}mat4 o(float c){float t=(1.-c)/2.;return mat4(c,0,0,0,0,c,0,0,0,0,c,0,t,t,t,1);}void main(){vec2 st=gl_FragCoord.xy/u_resolution,uv=vec2(st.x,1.-st.y);vec4 col;col.xyz=texture2D(p,uv.xy).xyz;col.xyz=i(col.xyz,amount);col.w=texture2D(p,uv.xy).w;gl_FragColor=o(contrast)*col;}\n";const v=(e,t,o,i,n)=>{const{pick:r,range:s,rnd:l}=o,a={glitch2:f,shrink:u,grid:g,desaturate:m},c=void 0;createGraphics(3040,4560).pixelDensity(1);const h=e.createShader(d,a[i]);if("glitch2"===i){const e=s(.005,.005);let t=r([0,e]),o=r([0,e]),i=r([0,e]),l=r([0,1]);n={amount1:t,amount2:o,amount3:i,type:l}}e.push(),e.shader(h),h.setUniform("p",t),h.setUniform("u_resolution",[width,height]),h.setUniform("rnd",l()),n&&Object.keys(n).forEach((e=>{h.setUniform(e,n[e])})),e.quad(-1,-1,1,-1,1,1,-1,1),e.pop(),t.image(e,0,0)};var x=v;const w=void 0;var y=(e,t,o,i,r)=>{const s=width/1e3,{pick:l}=r,a=12,c=n(t,144);let h=0;for(let t=-16*s;t<=width+16*s;t+=width/a)for(let n=-16*s;n<height+16*s;n+=height/a){const r=noise(.002*t,.002*n),a=noise(.001*t,.001*n);c[h%c.length].setAlpha(100*a),e.push(),e.noStroke(),e.fill(o),e.fill(c[h%c.length]),e.textSize(map(r,0,1,2,20)*s),e.text(l(i),t,n),e.pop(),h+=1}};const C=void 0;var k=(e,t,o,i)=>{const n=[1,.95,.01,0].reverse(),r=[t,t,"rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)"];t.setAlpha(100),e.push(),e.noStroke(),l(e,width/2,0,width/2,i,n,r),e.beginShape(),e.vertex(0,0),e.vertex(width,0),e.vertex(width-o,i),e.vertex(o,i),e.endShape(CLOSE),e.beginShape(),l(e,width,height/2,width-o,height/2,n,r),e.vertex(width,0),e.vertex(width,height),e.vertex(width-o,height-i),e.vertex(width-o,i),e.endShape(CLOSE),l(e,width/2,height,width/2,height-i,n,r),e.beginShape(),e.vertex(width,height),e.vertex(0,height),e.vertex(o,height-i),e.vertex(width-o,height-i),e.endShape(CLOSE),l(e,0,height/2,o,height/2,n,r),e.beginShape(),e.vertex(0,height),e.vertex(0,0),e.vertex(o,i),e.vertex(o,height-i),e.endShape(CLOSE),e.pop(),t.setAlpha(255)};const F={renderBacks:S,applyEffects:E,processFunction:b};async function D(e,t,o,i,n){for(let r=0;r<e.length;r+=t){let s=e.slice(r,r+t);const l=F[o];p5.processed=await l(s,i,n),B(n),await new Promise((e=>setTimeout(e,10))),"final"===n&&(p5.phase=2,p5.finalImage.image(p5.mainBack,0,0,width,height),loop())}}function b(e,t){return new Promise((o=>{setTimeout((()=>{let i=e.map((e=>(t(),{item:e,type:"processFunction"})));o(i)}),10)}))}function S(e){return new Promise((t=>{setTimeout((()=>{let o=e.map((e=>(e.render(),{item:e,type:"renderBacks"})));t(o)}),10)}))}function E(e,t,o){return new Promise((i=>{setTimeout((()=>{let n=e.map((e=>(v(p5.shaderCanvas,e.back,p5.globalRandom,t,o),{item:e,type:"applyEffects"})));i(n)}),10)}))}const A="OVERLOADING";function B(e){for(let t=0;t<p5.processed.length;t++){const o=p5.processed[t].item;if(background(p5.backgroundColor),o&&(o.p?image(o.p,0,0):o.back?image(o.back,0,0):image(o,0,0)),"final"!==e){const e=p5.globalRandom.shuffleArray(p5.overloadColors);textSize(120*p5.M),noStroke(),textAlign(CENTER,CENTER),fill(e[0]),text("OVERLOADING",width/2,height/2),fill(e[1]),text("OVERLOADING",width/2*1.01,height/2*1.01),fill(e[2]),text("OVERLOADING",width/2*.99,height/2*.99)}}}const G=void 0;var z=(e,t,o,i,n,r,s,l,a,c,h,p,d)=>{const{pick:f,rnd:u,range:g,rangeFloor:m}=n,v=e.map((e=>{const{back:o}=e,n=f(i);e.count=n;const v=u()>.5,x=!v||u()>.5,{class:w,types:y,specialTypes:C}=f(r);return c=1===c||2!==c&&u()>.5,new w({p:o,count:n,coef:h||g(.1,4),colors:t,type:f(y),specialType:f(C),rotation:f(a),fill:v&&f(l),stroke:x&&f(l),gFillDirection:f(s),gStrokeDirection:f(s),differentFillGradients:u()>.5,differentStrokeGradients:u()>.5,render90deg:c,rnd:u,rangeFloor:m,pick:f,str:p,cutBacks:d})}));(0===o||1===o&&u()>.1||2===o&&u()>.7)&&v.forEach((e=>{D([e],1,"renderBacks")}))};const L=void 0;var O=(e,t,o,i,n,r)=>{const s=([e,t])=>[[e,t],[e+1,t],[e+1,t+1],[e,t+1]],l=[];let a=[e,t],c=0;const h=(e,t)=>(c+=1,c>4&&(a=r(l)[0],c=0),0===l.filter((([[o,i]])=>e===o&&t===i)).length);let p=0;for(;p<o;){const[e,t]=a,o=r(["left","up","right","down"]);"up"===o?t-1>=0&&h(e,t-1)&&(a=[e,t-1],l.push(s(a)),p+=1):"down"===o?t+1<1*n&&h(e,t+1)&&(a=[e,t+1],l.push(s(a)),p+=1):"left"===o?e-1>=0&&h(e-1,t)&&(a=[e-1,t],l.push(s(a)),p+=1):"right"===o&&e+1<1*i&&h(e+1,t)&&(a=[e+1,t],l.push(s(a)),p+=1)}return l};const P=void 0;var _=(e,t,o,i)=>{const n=e=>e.filter((([t,o])=>{const i=e.filter((([e,i])=>t===e&&o===i+1)).length>0,n=e.filter((([e,i])=>t===e+1&&o===i)).length>0,r=e.filter((([e,i])=>t===e&&o===i-1)).length>0,s=e.filter((([e,i])=>t===e-1&&o===i)).length>0,l=e.filter((([e,i])=>t===e-1&&o===i+1)).length>0,a=e.filter((([e,i])=>t===e+1&&o===i+1)).length>0,c=e.filter((([e,i])=>t===e+1&&o===i-1)).length>0,h=e.filter((([e,i])=>t===e-1&&o===i-1)).length>0;return!(i&&n&&r&&s&&l&&a&&c&&h)}));let r=s(e.flat());r=n(r);const l=void 0,a=(e=>{let t=(e=e.sort((([e,t],[o,i])=>e+t-(o+i))))[0];const o=[t];let i=[...e];i.shift();const n=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e&&a===n-1)return t=[l,a],o.push(t),i.splice(s,1),!0}},r=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e+1&&a===n)return t=[l,a],o.push(t),i.splice(s,1),!0}},s=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e&&a===n+1)return t=[l,a],o.push(t),i.splice(s,1),!0}},l=(e,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===e-1&&a===n)return t=[l,a],o.push(t),i.splice(s,1),!0}};let a=[{func:l,type:"left"},{func:n,type:"up"},{func:r,type:"right"}],c=null,h="null";for(;o.length<e.length;)"up"===h?a=[{func:l,type:"left"},{func:n,type:"up"},{func:r,type:"right"}]:"right"===h?a=[{func:n,type:"up"},{func:r,type:"right"},{func:s,type:"down"}]:"down"===h?a=[{func:r,type:"right"},{func:s,type:"down"},{func:l,type:"left"}]:"left"===h&&(a=[{func:s,type:"down"},{func:l,type:"left"},{func:n,type:"up"}]),c=a[0].func(...t,i),h=a[0].type,c||(c=a[1].func(...t,i),h=a[1].type),c||(c=a[2].func(...t,i),h=a[2].type),c=null;return o})(r);let c=[],h=[];if(i)for(let e=0;e<a.length;e+=1){let[i,n]=a[e];const r=i*t,s=n*o;h.push({type:"vertex",points:[r,s]})}else for(let e=0;e<a.length;e+=1){let[i,n]=a[e],[r,s]=a[(e+a.length-1)%a.length],[l,c]=a[(e+1)%a.length];const p=i*t,d=n*o;r===i&&s===n+1&&l===i+1&&c===n||r===i&&s===n-1&&l===i-1&&c===n||r===i-1&&s===n&&l===i&&c===n+1||r===i+1&&s===n&&l===i&&c===n-1||h.push({type:"vertex",points:[p,d]})}return{finalPoints:h,arcs:c}};const I=(e,t,o,i,n=0)=>{const{rnd:r,rangeFloor:s,pick:l,pickSome:a,shuffleArray:c}=i,h=e,p=e*(height/width);let d=(width-width*n*2)/h,f=d,u=[];for(let e=0;e<h;e+=1)for(let t=0;t<p;t+=1)u.push([e,t]);u=c(u),u=a(u,t);const g=[];let m;return u.forEach((e=>{const[t,i]=e;g.push(O(t,i,s(...o),h,p,l))})),c(g.map((e=>_(e,d,f,r()>.5))))},W=(e,t,o,i,n)=>{const r=width/1e3;e.drawingContext.shadowColor=t,e.drawingContext.shadowBlur=o*r,e.drawingContext.shadowOffsetX=i?i*r:0,e.drawingContext.shadowOffsetY=n?n*r:0},T=(e,t)=>{e.beginShape(),t.forEach((({points:t})=>{e.vertex(...t)})),e.endShape(CLOSE)},R=void 0,M=(e,t,o,i,n)=>{const{rnd:r,pick:s,range:l}=n;let a=t,c=o,h=s([0,a]),p=s([0,a]),d=s([0,a]);e.loadPixels();let f=e.pixelDensity(),u=e.width*f*4*(e.height*f);for(let t=0;t<u;t+=4)r()<i&&(h=s([0,a]),p=s([0,a]),d=s([0,a])),e.pixels[t]=e.pixels[t+h]+s([-1,1])*l(c),e.pixels[t+1]=e.pixels[t+1+p]+s([-1,1])*l(c),e.pixels[t+2]=e.pixels[t+2+d]+s([-1,1])*l(c);for(let t=u;t>0;t-=4)r()<i&&(h=s([0,a]),p=s([0,a]),d=s([0,a])),e.pixels[t]=e.pixels[t-h]+s([-1,1])*l(c),e.pixels[t+1]=e.pixels[t+1-p]+s([-1,1])*l(c),e.pixels[t+2]=e.pixels[t+2-d]+s([-1,1])*l(c);e.updatePixels()},U=void 0;var N=(e,t,o,i,n,r,s,l,a,c,h,p=0)=>{const{filled:d,glitch:f,backs2:u,scheme:g,doubleShadow:m,smallShadow:v}=h,{pick:x,pickSome:w,rnd:y,rangeFloor:C}=t,k=width/1e3;let F=width*p,D=height*p;const b=[x([-1,0,1]),x([-1,0,1])],S=b.map((e=>-1*e)),E=w(o,2),A=i,B=y()>.5?E[1]:i,G=I(r,s,c,t,p);let z;f&&(z=createGraphics(3040,4560),z.pixelDensity(1),z.image(e,0,0),M(z,x([16,32,64,128,256]),16,2e-6,t)),e.push(),e.translate(F,D),G.forEach((({finalPoints:t})=>{const r=!u&&y()>.5,s=void 0;if(!u&&y()>.8){const i=C(8),n=x(o);n.setAlpha(100),e.push(),e.noStroke(),e.fill(n),W(e,n,1,i*S[0],i*S[1]),T(e,t),e.pop(),y()>.05&&n.setAlpha(255)}if(r){e.push();const i=C(8),n=x(o);e.noStroke(),e.fill(n),W(e,n,i),T(e,t),e.pop()}e.push(),r?e.noFill():e.fill(x(o)),e.strokeWeight(0),a&&y()>.5&&(e.strokeWeight(k),e.stroke(B)),f||(z=x(n).back);let c=1;if(m&&(c=2),l){let o=C(8,16)*c,n=C(8)*c;if(d&&(o=C(4,16),n=C(4)),v&&(o=C(0,4),n=C(2)),W(e,i,o,n*b[0],n*b[1]),y()>.5){const r=[o,0],s=[n,0];y()>.5&&(r.reverse(),s.reverse());const l=map(t[0].points[1],0,height,r[0],r[1]),a=map(t[0].points[1],0,height,s[0],s[1]);W(e,i,l,a*b[0],a*b[1])}}if(d){const t=x(o);t.setAlpha(100),e.fill(t),t.setAlpha(255)}u&&e.noFill(),T(e,t),e.drawingContext.clip(),e.image(z,0,0,width,height),g&&(e.stroke(A),e.strokeWeight(k),e.push(),e.translate(F,D),e.noFill(),T(e,t),e.pop(),t.forEach((({points:t})=>{e.push(),e.translate(F,D),y()>.7&&e.fill(x(o)),e.circle(...t,5*k),e.pop()}))),e.pop()})),e.pop()};const q=void 0,Y=void 0;var X=(e,t,o,i)=>{const{rangeFloor:n,rnd:r}=i,s=e/2*3,l=i=>{const n=.5*r();return!(i[0]<0||i[0]>e||i[1]>height-height*t)&&(n<.25?[i[0]+1,i[1]+o]:n<.5?[i[0]-1,i[1]+o]:n<.75?[i[0]+1,i[1]]:[i[0]-1,i[1]])},a=e=>{const i=r();return!(e[1]<0||e[1]>s||e[0]>width-width*t)&&(i<.25?[e[0]+o,e[1]+1]:i<.5?[e[0]+o,e[1]-1]:i<.75?[e[0],e[1]+1]:[e[0],e[1]-1])},c=n(e+1),h=n(s+1);let p=[c,0],d=l(p);const f=[[p[0]*o,p[1]]];for(;d;)d=l(p),d&&(f.push([d[0]*o,d[1]]),p=d);let u=[0,h],g=a(u),m=[[u[0],u[1]*o]];for(;g;)g=a(u),g&&(m.push([g[0],g[1]*o]),u=g);return{xPoints:f,yPoints:m}},H=(e,t,o,i,n)=>{if(t&&o.length>4){const t=n(1,3),r=n(0,o.length-t-1);e.drawingContext.setLineDash([r*i,t*i])}else e.drawingContext.setLineDash([])},V=W,Q=(e,t,o=0,i=0)=>{e.beginShape(),t.forEach((t=>{e.vertex(t[0]+o,t[1]+i)})),e.endShape()};const j=void 0;var J=(e,t,o,i,n=0,r)=>{const s=createGraphics(3040,4560);s.pixelDensity(1),s.image(e,0,0);const l=width/1e3,{pick:a,range:c,rangeFloor:h,rnd:p,weighted:d}=t,f=[a([-1,0,1]),a([-1,0,1])],u=a([2,4,8,16]),g=a(o),m=void 0,v=(width-width*n*2)/u,x=sqrt(sq(v)+sq(v)),w=p()>.5,y=h(12,48),{xPoints:C,yPoints:k}=X(u,n,v,t);e.strokeCap(SQUARE),e.push(),e.translate(width*n,height*n);const F=void 0;if(p()>.5){const t=h(3,8),i=h(1,6);e.push(),e.noFill();const n=h(1,5)*l;if(e.strokeWeight(n),p()>.5)for(let r=1;r<t;r+=1){H(e,w,C,x,h);const t=r*n*f[0]*i,s=r*n*f[1]*i;e.stroke(o[r%o.length]),Q(e,C,t,s)}else if(p()>.5){H(e,w,k,x,h);for(let r=1;r<t;r+=1){const t=r*n*f[0]*i,s=r*n*f[1]*i;e.stroke(o[r%o.length]),Q(e,k,t,s)}}e.pop()}const D=a([1,2,3,4]);e.push(),e.noFill(),e.stroke(g),r&&e.stroke(i),e.strokeWeight(D*l/2),H(e,w,C,x,h),Q(e,C),H(e,w,k,x,h),Q(e,k),e.strokeWeight(D*l);const b=2*c(1,4);V(e,i,b,y*f[0],y*f[1]),H(e,w,C,x,h),Q(e,C),H(e,w,k,x,h),Q(e,k),D>2&&p()>.5&&(e.drawingContext.shadowBlur=0,e.strokeWeight(l),e.stroke(a(o)),H(e,w,C,x,h),Q(e,C),H(e,w,k,x,h),Q(e,k)),e.pop();const S=10*l,E=n?S-S*n:S,A=t=>{t.forEach(((t,r)=>{if(r!==C.length-2&&0!==r&&p()>.7&&(e.push(),e.noStroke(),e.fill(g),e.ellipse(...t,E),p()>.5&&(e.fill(i),e.ellipse(...t,E/2)),e.pop()),p()>.9){const i=E*[1.5,2,2.5,3,3.5,4][d([4,4,3,3,2,1])]*D,r=p()>.75,f=p()>.75,u=p()>.75,m=h(3,8),v=i/m,x=a([-5,0,5])*l,w=a([-5,0,5])*l;if(e.push(),e.stroke(g),f&&p()>.5&&(e.noStroke(),e.fill(g)),e.strokeWeight(D*l),e.ellipse(...t,i),e.translate(-width*n,-height*n),e.drawingContext.clip(),e.image(s,x,w,1.01*width,1.01*height),r){const r=p()>.5,s=p()>.7;e.translate(width*n,height*n),e.noFill();for(let n=0;n<m;n+=1){const a=i-n*v,h=c(0,TWO_PI),d=h+c(HALF_PI,TWO_PI);r&&e.stroke(o[n%o.length]),p()>.85?e.strokeWeight(D*l-n*v):e.strokeWeight(l-n*v),s?e.arc(...t,a,a,h,d,OPEN):e.ellipse(...t,a)}}if(f){const n=a(o);n.setAlpha(75),e.push(),e.fill(n),e.noStroke(),e.ellipse(...t,i),e.pop(),n.setAlpha(255)}u&&(e.push(),e.stroke(g),e.strokeWeight(D*l),p()>.5?(e.line(t[0]-i/2,t[1],t[0]+i/2,t[1]),e.line(t[0],t[1]-i/2,t[0],t[1]+i/2)):(e.line(t[0]-i/2,t[1]-i/2,t[0]+i/2,t[1]+i/2),e.line(t[0]+i/2,t[1]-i/2,t[0]-i/2,t[1]+i/2)),e.pop()),e.pop()}}))};A(C),A(k),e.pop()};class ${constructor({p:e,count:t,coef:o,colors:i,type:r,specialType:s,rotation:l,fill:a,stroke:c,gFillDirection:h,gStrokeDirection:p,differentFillGradients:d,differentStrokeGradients:f,render90deg:u,rnd:g,rangeFloor:m,str:v,pick:x,cutBacks:w}){const y={c:0,tl:0,tr:.5*PI,bl:1.5*PI,br:PI};this.p=e,this.count=t,this.colors=i,this.type=r,this.rotation=y[l],this.fill=a,this.stroke=c,this.gFillDirection=h,this.gStrokeDirection=p,this.specialType=s,this.lerpColors=n(i,t**2*o),this.size=e.width/t,this.counter=0,this.xCounter=0,this.xCount=e.round(e.width/this.size),this.yCount=e.round(e.height/this.size),this.render90deg=u,this.destinations=u?[this.yCount,this.xCount]:[this.xCount,this.yCount],this.odd=!1,this.lineOdd=!1,this.differentFillGradients=d,this.differentStrokeGradients=f,this.rnd=g,this.rangeFloor=m,this.str=v,this.pick=x,this.cutBacks=w}drawShape(){}render(){let{p:e,colors:t,destinations:o,size:i,counter:n,xCounter:r,rotation:s,lerpColors:l,fill:a,stroke:c,render90deg:h,differentFillGradients:p,differentStrokeGradients:d}=this;for(let f=0;f<o[0];f+=1){for(let u=0;u<o[1];u+=1){let o=f*i,g=u*i;h&&(o=u*i,g=f*i),this.lineOdd=r%2==0,this.lineOdd?this.odd=n%2==0:this.odd=n%2!=0;let m=l[n%l.length];if("noise"===a){const e=noise(.001*o,.001*g);m=l[Math.round(map(e,0,1,0,l.length-1))%l.length]}this.mainColor=t[0],this.secondaryColor=m,e.push(),e.translate(o,g),e.translate(i/2,i/2),e.rotate(s),e.translate(-i/2,-i/2),"solid"===a?e.fill(t[0]):"lerp"===a||"noise"===a?e.fill(m):"gradient"===a?p?this.makeGradient(!0,!1,m):this.makeGradient(!0):a||e.noFill(),"solid"===c?e.stroke(t[1]):"lerp"===c||"noise"===c?e.stroke(m):"gradient"===c?d?this.makeGradient(!1,!1,m):this.makeGradient(!1,!1):c||e.noStroke(),this.drawShape(),e.pop(),n+=1}r+=1}}makeGradient(e,t,o){let{p:i,gFillDirection:n,gStrokeDirection:r,gBackgroundDirection:s,size:c,colors:h}=this;const p=void 0,d=e?n:t?s:r,f=["tb","lr","tlbr","trbl"].includes(d)?[0,1]:[1,0],u=[0,0],g=[c,0],m=[0,c],v=[c,c],x=[c/2,0],w=[c/2,c],y=[0,c/2],C=[c,c/2],k=e||t?l:a,F=o?[h[0],o]:h;"tb"===d||"bt"===d?k(i,...x,...w,f,F):"lr"===d||"rl"===d?k(i,...y,...C,f,F):"tlbr"===d||"bltr"===d?k(i,...u,...v,f,F):"trbl"!==d&&"brtl"!==d||k(i,...g,...m,f,F)}}class K extends ${constructor(e){super(e)}drawShape(){let{p:e,type:t,size:o,odd:i,lineOdd:r,rnd:s,rangeFloor:l,colors:a,mainColor:c,secondaryColor:h}=this,p,d,f,u,g,m,v;if("something"!==t||r||(i=!i),"diagonal"===t&&i?(v=1,p=o,d=0,f=o,u=o,g=0,m=o):"mirror"!==t&&"something"!==t||!i?"chess"===t||"shear"===t||"zigzag"===t?r?i||"shear"===t?(v=2,p=0,d=0,f=o,u=o,g=0,m=o):(v=1,p=o,d=0,f=o,u=o,g=0,m=o):("zigzag"===t&&(i=!i),i||"shear"===t?(v=3,p=0,d=0,f=o,u=0,g=o,m=o):(v=4,p=0,d=0,f=o,u=0,g=0,m=o)):(v=4,p=0,d=0,f=o,u=0,g=0,m=o):(v=2,p=0,d=0,f=o,u=o,g=0,m=o),e.triangle(p,d,f,u,g,m),s()>.9){const t=l(2,21),i=o/t,r=n(a,t),x=s()>.5;for(let n=0;n<t;n+=1)1===v?(p=o,d=n*i,f=o,u=o,g=n*i,m=o):2===v?(p=0,d=n*i,f=o-n*i,u=o,g=0,m=o):3===v?(p=n*i,d=0,f=o,u=0,g=o,m=o-n*i):4===v&&(p=0,d=0,f=o-n*i,u=0,g=0,m=o-n*i),x?e.fill(n%2==0?c:h):e.fill(r[n]),e.triangle(p,d,f,u,g,m)}}}var Z=K;class ee extends ${constructor(e){super(e)}drawShape(){let{p:e,type:t,size:o,odd:i,lineOdd:r,specialType:s,rnd:l,rangeFloor:a,colors:c,mainColor:h,secondaryColor:p,str:d,pick:f,cutBacks:u}=this;"simple"===t&&r&&(i=!i);let g=o;if("half"===s?g=.5*o:"quarter"===s?g=.75*o:"third"===s?g=.66*o:"mid"===s?g=1.2*o:"max"===s&&(g=1.4*o),i){if(e.rectMode(e.CENTER),l()>.2)e.rect(o/2,o/2,g,g);else{const t=a(2,41),i=n(c,t),r=l()>.5,s=l()>.5;for(let n=0;n<t;n+=1){const a=g-g/t*n;r?e.fill(n%2==0?h:p):e.fill(i[n]),s&&l()>.75&&e.noFill(),e.rect(o/2,o/2,a,a)}}u&&l()>.75&&(e.drawingContext.clip(),e.image(f(u),0,0)),l()>.9&&(e.textSize(g),e.textAlign(e.CENTER,e.CENTER),e.text(f(d),o/2,o/2))}}}var te=ee,oe={};oe="precision highp float;\n#define GLSLIFY 1\nuniform sampler2D v;uniform vec2 f;uniform float s,t,x,y;float D(vec2 v){vec3 f=fract(v.xyx*.1031);f+=dot(f,f.yzx+33.33);return fract((f.x+f.y)*f.z);}float D(vec2 v,float s,float f){return s+D(v)*(f-s);}float n(float f,float v,float s){return step(v,f)-step(s,f);}float r=t;void main(){vec2 i=gl_FragCoord.xy/f,t;float z=1.+y*2.,u;i-=y/z;i*=z;t=vec2(i.x,1.-i.y);vec3 m=texture2D(v,t).xyz;u=r/2.;for(float e=0.;e<200.;e+=1.){float h=D(vec2(s,2345.+float(e))),w=D(vec2(s,4851.+float(e)))*.25,g=D(vec2(s,9625.+float(e)),-u,u);vec2 d=t;d.x+=g;if(n(t.y,h,fract(h+w))==1.){float o=r/6.,a=D(vec2(s,9545));vec2 l=vec2(D(vec2(a,2323),-o,o),D(vec2(a,7707),-o,o));if(a<.33)m.x=texture2D(v,d+l).x;else if(a<.66)m.y=texture2D(v,d+l).y;else m.z=texture2D(v,d+l).z;}}vec4 e=vec4(m,1);e*=1.-x+x*sin(100.+i.x*4e3)+.1;e*=1.-x+x*sin(100.+i.y*6e3)+.1;e.w=1.;gl_FragColor=e;}\n";var ie=D;const ne=new URLSearchParams(window.location.search),re=Object.fromEntries(ne.entries());let se;const le=.666666666667;let ae,ce,he,pe,de,fe,ue,ge,me,ve;const xe=[3040,4560];let we,ye,Ce,ke,Fe,De,be,Se,Ee=.002,Ae;const{pd:Be=1}=re;function setup(){noLoop(),p5.phase=0,ce=createCanvas(xe[0],xe[1]),we=Ce=width,ye=ke=height,Fe=be=we/2,De=Se=ye/2,p5.shaderCanvas=createGraphics(3040,4560,WEBGL),p5.shaderCanvas.pixelDensity(1),p5.finalImage=createGraphics(3040,4560),p5.finalImage.pixelDensity(1),ve=createGraphics(3040,4560),ve.pixelDensity(1),se=width/1e3,p5.M=se,pixelDensity(Number(Be)),he=createGraphics(xe[0],xe[1]),he.pixelDensity(1),p5.mainBack=he,strokeWeight(se),strokeCap(SQUARE);const e=t(tokenData.hash);p5.globalRandom=e;const{rnd:o,range:n,rangeFloor:r,pick:s,pickSome:l,weighted:a,shuffleArray:f}=e,calculateFeatures=()=>{const e={};return e.paletteIndex=r(i.length-1),e.squares=o()>.7,e.sameFill=o()>.7,e.samePattern=o()>.7,e.sameSize=o()>.95,e.outlines=o()>.5,e.shapeOverload=["min","mid","max"][a([1,2,2])],e.volume=o()>.25,e.compression=[1,2,3,4,5][a([11,10,4,1,1])],e.symbols=s(["anime","numbers","binary","squares","arrows","dots","trigrams"]),e.split=o()>.98,e},{paletteIndex:u,sameFill:g,samePattern:m,sameSize:v,squares:x,outlines:w,shapeOverload:C,volume:F,compression:D,symbols:b,split:S}=calculateFeatures();let E;const A=f([...i[u],"#a6a6a6","#404040","#0d0d0d"]);p5.backgroundColor=s(A),p5.overloadColors=A,de=o,fe=n,ae=()=>{p5.processed=[],p5.phase=1;const t=void 0;let a,E;o()>.3?(a=s([6,7,8,9]),E=a):(a=s([5,6,7,8,9]),E=r(a,10)),noiseSeed(1e6*o());const B=c(A,A.length).map((e=>(e.setAlpha(30),e)));let G=c(A,A.length),L=c(f(i[u]),i[u].length);Ae=lerpColor(G[0],color(0),.9);let O=s(L);me=h(r(8,40)).map((()=>createGraphics(xe[0],xe[1]))),ue=c(A,90*me.length),ge=c(A,90*me.length),me.forEach((e=>{e.pixelDensity(1),e.strokeCap(SQUARE),e.strokeWeight(se)})),me=me.map((e=>({back:e,count:0,count2:0})));const P=Math.ceil(me.length/2);let _=me.splice(0,P),I=me.splice(-P);me=f([..._,...I]);let W=[4,8,16,32,64];const T=v&&[s([4,8,16,32])],R=void 0,M=void 0,U=void 0,q=void 0,Y=void 0,X=void 0,H=void 0,V=void 0,Q={numbers:"0123456789".split(""),binary:["0","1","・","●","○"],squares:["□","■","▣","◩","◪"],arrows:["◄","▲","▼","►","◁","△","▽","▷"],dots:["∴","∵","∶","∷","・"],trigrams:["☰","☲","☱","☴","☵","☶","☳","☷"],anime:" .:-=+*#%@゠ァアィイゥウェエォオカキクケコサシスセソタチッツテトナニヌネノハヒフヘホマミムメモャ
In the contemporary era, the overwhelming inundation of information and data is a ubiquitous and pervasive reality. This saturation is often accompanied by a sense of disorientation and fragmentation, making it challenging to extract meaningful and valuable insights. As humanity progresses and evolves, this gap between our biological, cognitive, and perceptual capacities and the rapid advancements of our digital world becomes increasingly significant. Infinity, chaos, complexity, self-reproducibility, coherence, and layering are epithets that apply to this work. This artwork seeks to capture the complexity and chaos of our digital existence, utilizing various visual techniques to convey its message. Layering and fragmentation visually depict the scattered and fragmented nature of our digital lives, with each layer representing a different unit of information. This fragmentation is further underscored by the grid of "transport" lines that permeate the canvas, symbolizing the interconnected networks and corporations that seek to control and manipulate our attention. Despite the strict rules governing the forms in the artwork, the overall effect is one of chaos and impending tragedy. This tension between order and disorder is a recurring theme, conveying that we are on the brink of losing control and being consumed by information overload. The visual elements of the artwork convey a "technological coldness" and emotionlessness, reflecting the detachment that can result from our immersion in the digital realm. Some of the elements are unfocused, which creates the effect of discomfort and the inability to concentrate and embrace all the available space at once. A kind of frame is the "traces" of data gathering toward the center - in our minds - and intertwining into an endless tangle of something massive and noisy but with no precise shape. To reinforce the concept, I placed an infinite rotation of all the layers used in the art behind the main canvas. They alternate at great speed, constantly changing their "compression" and background, symbolizing the endless flow of digital information overwhelming our consciousness. Through its visual elements and composition, the artwork urges us to reflect on our collective responsibility to engage with technology more ethically and thoughtfully. It reminds us that while technology can offer many opportunities and benefits, it also significantly challenges our values and ethics. In this sense, the artwork serves as a reminder of the importance of maintaining a balance between technological progress and human values. I used many techniques to create this art. Because of the large number of generated elements and big canvas size, it takes quite a long time to make, "overloading" your device and then entirely using its resources, which is also part of the concept. --- This art is static until you touch it. You can use the mouse wheel to examine the details, and you can also drag the surface of the art. Also, this art is created in two parts. Behind it is an infinite rotation of the layers used in it. Controls: Mouse wheel: zoom in/out Mouse click, hold and move: drag the static part Mouse double-click: reset (go static) Press 's' to save the image WARNING: PHOTOSENSITIVITY/EPILEPSY SEIZURES
t:1-bt*e,contrast:1.5-Et*e})}let Bt,Gt=wt/(1+2*wt);it=x(ot,it,t,"shrink",{amount:wt}),q(it,t,L,St,Gt);const zt=createGraphics(gt[0],gt[1]);zt.pixelDensity(1),zt.image(it,0,0,width,height),it.push(),it.noStroke(),it.rectMode(CENTER),it.translate(width/2,height/2),it.rotate(n(0,TWO_PI)),d(it,width/2,0,width/2,height,[0,1],l(z,2)),it.blendMode(ADD),it.rect(0,0,1.4*height,1.4*height),it.pop(),q(it,t,L,St,0),P(it,t,L,St,W,8,r(8,16),!0,C,[a,B],{filled:!1,glitch:!0},0),q(it,t,L,St,Gt),D(T,L,0,M||[8,16,32,64],t,rt,st,at,pt,ft,mt,[],[zt,kt]),P(it,t,L,St,T,16,r(4,8),!0,C,[a,B],{filled:!1,scheme:!0,smallShadow:!0},Gt);const Lt=createGraphics(gt[0],gt[1]);Lt.pixelDensity(1),Lt.image(it,0,0,width,height),Lt.image(kt,0,0,width,height),q(it,t,L,St,Gt),P(it,t,L,St,[{back:zt},{back:Lt}],16,r(4,16),!0,C,[a,B],{filled:!0,scheme:!0},Gt),it=x(ot,it,t,"shrink",{amount:xt[b]}),D(T,L,0,M||[16,32,64],t,rt,st,at,pt,ft,mt,tt,[zt,kt,Lt]),P(it,t,L,St,T,16,r(4,16),!0,C,[a,B],{filled:!1,backs2:!0,smallShadow:!0},0);const Ot=width*vt[b],_t=height*vt[b];if(k(it,St,Ot,_t),it=x(ot,it,t,"grid",{amount:.1}),q(it,t,L,St,0),A){const e=createGraphics(gt[0],gt[1]);e.pixelDensity(1),e.image(it,0,0,width,height),it=x(ot,it,t,"desaturate",{amount:1,contrast:1}),P(it,t,L,St,[{back:e}],32,r(16,32),!0,!0,[a,B],{filled:!0,backs2:!0},Gt),q(it,t,L,St,0),q(it,t,L,St,0),q(it,t,L,St,0)}lt.image(it,0,0,width,height),St.setAlpha(255),nt=ot.createShader(p,j),ut=2},windowResized()}let Et=0,At=20,Bt=0,Gt=0,zt=0;const Lt="OVERLOADING";function draw(){if(background(0),0===ut){let t=map(frameCount%31,0,30,1,1.01),e=map(frameCount%31,0,30,1,.99),i=map(frameCount%31,0,30,0,width);push(),rectMode(CENTER),noStroke(),fill(at),rect(width/2,height/2,i,2*K),pop(),textSize(80*K),noStroke(),textAlign(CENTER,CENTER),fill(pt[0]),text("OVERLOADING",width/2,height/2),fill(pt[1]),text("OVERLOADING",width/2*t,height/2*t),fill(pt[2]),text("OVERLOADING",width/2*e,height/2*e),frameCount>30&&0===ut&&tt()}else if(2===ut){if(frameRate(30),1===bt){const t=ht[frameCount%ht.length],e=ct[frameCount%ct.length];frameCount%20<10?e.setAlpha(map(frameCount%20,0,10,255,0)):e.setAlpha(map(frameCount%20,10,20,0,255)),ft.background(t),frameCount%20==0&&Et++,ft.image(dt[Et%dt.length].back,0,0,width,height),ft.push(),ft.noStroke(),ft.fill(e),ft.rect(0,0,width,height),ft.pop(),frameCount%5==0&&(Bt=.2*rt(),Gt=.2*rt(),zt=st(-.5,1)),ot.push(),ot.shader(nt),nt.setUniform("v",ft),nt.setUniform("f",[width,height]),nt.setUniform("s",rt()),nt.setUniform("t",map(sin(frameCount/10),-1,1,.01,Bt)),nt.setUniform("x",Gt),nt.setUniform("y",zt),ot.quad(-1,-1,1,-1,1,1,-1,1),ot.pop(),image(ot,0,0,width,height)}yt=lerp(yt,kt,.2),Ct=lerp(Ct,Ft,.2),mt=lerp(mt,xt,.2),vt=lerp(vt,wt,.2),image(lt,yt-mt/2,Ct-vt/2,mt,vt),push(),drawingContext.shadowColor=St,drawingContext.shadowBlur=width/1e3*16,stroke(St),strokeWeight(8*K),noFill(),rect(0,0,width,height),pop()}}function mouseDragged(){kt+=mouseX-pmouseX,Ft+=mouseY-pmouseY}function mouseWheel(t){var e=-t.delta;if(e>0)for(let t=0;t<e;t+=1){if(xt>10*width)return;kt-=Dt*(mouseX-kt),Ft-=Dt*(mouseY-Ft),xt*=Dt+1,wt*=Dt+1}if(e<0)for(let t=0;t<-e;t+=1){if(xt<.9*width)return;kt+=Dt/(Dt+1)*(mouseX-kt),Ft+=Dt/(Dt+1)*(mouseY-Ft),wt/=Dt+1,xt/=Dt+1}}function doubleClicked(){mt=xt=width,vt=wt=height,yt=kt=mt/2,Ct=Ft=vt/2,Dt=.1}function windowResized(){const t=void 0,e=et.canvas.style;let i,o;.666666666667*window.innerHeight>=window.innerWidth?(i=window.innerWidth,o=window.innerWidth/.666666666667):(o=window.innerHeight,i=.666666666667*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${o}px`}window.addEventListener("keydown",(t=>{"s"===t.key&&saveCanvas(tokenData.hash,"png")}));console.log('I never intended to and do not intend to kill myself, and if anything happens to me, there can only be one reason - those people behind the fabricated criminal case against me. Shvembldr.')
const t=void 0;var e=t=>{const e=Uint32Array.from([0,0,0,0].map(((e,i)=>parseInt(t.substr(8*i+2,8),16)))),i=()=>{let t,i=e[3];return e[3]=e[2],e[2]=e[1],e[1]=t=e[0],i^=i<<11,i^=i>>>8,e[0]=i^t^t>>>19,e[0]/4294967296},o=(t=.5)=>i()<t,n=void 0,r=(t,e)=>e?i()*(e-t)+t:i()*t,s=(t,e)=>Math.floor(r(t,e)),l=t=>t.length?t[s(0,t.length)]:void 0,a=t=>{let e=t.reduce(((t,e)=>t+e)),o=i()*e;for(let e=0;e<t.length;e++){if(o<t[e])return e;o-=t[e]}return 0},h=(t,e)=>{let i;return c(t).slice(0,e)},c=t=>{let e,o,n=t.length,r=t.slice();for(;n;)e=Math.floor(i()*n--),o=r[n],r[n]=r[e],r[e]=o;return r},d=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},p=(t,e)=>{t=d(t,1),e=e||[];var o=2*i()*Math.PI;return e[0]=t*Math.cos(o),e[1]=t*Math.sin(o),e},f=(t,e)=>{t=d(t,1),p(1,e=e||[]);var o=t*Math.sqrt(i());return e[0]*=o,e[1]*=o,e};let u=!1,g=null;const m=(t,e)=>{if(u){u=!1;let i=g;return g=null,t+e*i}{let o=0,n=0,r=0;do{o=2*i()-1,n=2*i()-1,r=o*o+n*n}while(r>=1||0===r);let s=Math.sqrt(-2*Math.log(r)/r);return g=n*s,u=!0,t+e*(o*s)}};return{rnd:i,chance:o,bool:o,range:r,rangeFloor:s,pick:l,pickSome:h,weighted:a,shuffleArray:c,onCircle:p,insideCircle:f,gaussian:m}};const i=void 0;var o=[["#D24F8C","#1EACB7","#D7D6C9","#231E24"],["#111F19","#8AE84F","#F7F61B","#FC5192","#FF686C"],["#22342E","#30443F","#0281BB","#DD809C","#DB473A","#FACF0B"],["#4156A0","#E62630","#3B393D","#9F9FA5","#49678C"],["#F25D26","#1B2934","#A9B3C9","#247F51","#F2A8D4"],["#F23D2D","#F1F3F5","#000101"],["#C0080B","#5C4F40","#245941","#DC9C0B","#101F87","#0E7DCC"],["#CC4939","#724483","#3B3C80","#F0CB4D","#4CA183","#49659E"],["#ffbf00","#e83f6f","#2274a5","#32936f"],["#94afc0","#2289b6","#f7bd40","#e0160a","#871008"],["#1e2022","#52616b","#c9d6df"],["#F4BC01","#002E4B","#176A95","#819EB9","#CFD0DD","#CB090D"],["#075ea8","#d9322b","#f3a606"],["#169b62","#5ec8e5","#f984ca","#e34459"],["#ff6700","#c0c0c0","#3a6ea5","#004e98"],["#01608F","#EF91A9","#EB4626","#F4BA10","#34A096","#2C2F8C"],["#229B9A","#021F19","#F8EBC8","#B33B2B","#F9972B","#E7D540","#558848","#4F8CB6","#B5526D"],["#F8E7C9","#067DB9","#5885C9","#A7A69B","#ECDB3C","#9BB666","#AB3938","#DB4E3A"],["#00283B","#1F656C","#F0F2CF","#F72B01","#F14A39","#AA0067","#4C0082","#D6BC4B","#19A091","#1E67AF"]];const n=(t,e)=>{const i=[],o=Math.ceil(e/t.length),n=1/o;for(let e=0;e<t.length;e+=1)for(let r=0;r<o;r+=1){const o=color(t[e]),s=color(t[(e+1)%t.length]);i.push(lerpColor(o,s,(r+1)*n))}return i},r=void 0,s=t=>t.filter(((e,i)=>{const o=JSON.stringify(e);return i===t.findIndex((t=>JSON.stringify(t)===o))})),l=(t,e,i,o,n,r,s)=>{const l=t.drawingContext.createLinearGradient(e,i,o,n);return r.forEach(((t,e)=>l.addColorStop(t,s[e]))),t.drawingContext.fillStyle=l,l},a=(t,e,i,o,n,r,s)=>{const l=t.drawingContext.createLinearGradient(e,i,o,n);return r.forEach(((t,e)=>l.addColorStop(t,s[e]))),t.drawingContext.strokeStyle=l,l};var h=n,c=t=>new Array(t).fill(0).map(((t,e)=>e)),d=l,p={};p="precision highp float;\n#define GLSLIFY 1\nvarying vec2 vPos;\nattribute vec3 aPosition;\nvoid main() {\n vPos = (gl_Position = vec4(aPosition,1.0)).xy;\n}\n";var f={};f="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;uniform sampler2D p;uniform float rnd,amount1,amount2,amount3;uniform int type;void main(){vec2 st=gl_FragCoord.xy/u_resolution,uv=vec2(st.x,1.-st.y);vec4 col;if(type==1)col.x=texture2D(p,vec2(uv.x+amount1,uv.y)).x,col.y=texture2D(p,vec2(uv.x+amount2,uv.y)).y,col.z=texture2D(p,vec2(uv.x-amount3,uv.y)).z;else col.x=texture2D(p,vec2(uv.x,uv.y+amount1)).x,col.y=texture2D(p,vec2(uv.x,uv.y+amount2)).y,col.z=texture2D(p,vec2(uv.x,uv.y-amount3)).z;col.w=texture2D(p,uv.xy).w;gl_FragColor=col;}\n";var u={};u="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;\nuniform sampler2D p;\nuniform float amount;\n\nvoid main(){\n vec2 st=gl_FragCoord.xy/u_resolution;\n float mult=1.+amount*2.;\n st-=amount/mult;\n st*=mult;\n gl_FragColor=texture2D(p,vec2(st.x,1.-st.y));\n}\n";var g={};g="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;\nuniform sampler2D p;\nuniform float amount;\n\nvoid main(){\n vec2 st=gl_FragCoord.xy/u_resolution;\n vec4 color;\n color.xyz=texture2D(p,vec2(st.x,1.-st.y)).xyz;\n color*=1.-amount+amount*sin(100.+st.x*4e3)+.1;\n color*=1.-amount+amount*sin(100.+st.y*6e3)+.1;\n color.w=1.;\n gl_FragColor=color;\n}\n\n";var m={};m="#ifdef GL_ES\nprecision mediump float;\n#define GLSLIFY 1\n#endif\nuniform vec2 u_resolution;uniform sampler2D p;uniform float rnd,amount,contrast;vec3 i(vec3 c,float f){vec3 l=vec3(.299,.587,.114),g=vec3(dot(l,c));return mix(c,g,f);}mat4 o(float c){float t=(1.-c)/2.;return mat4(c,0,0,0,0,c,0,0,0,0,c,0,t,t,t,1);}void main(){vec2 st=gl_FragCoord.xy/u_resolution,uv=vec2(st.x,1.-st.y);vec4 col;col.xyz=texture2D(p,uv.xy).xyz;col.xyz=i(col.xyz,amount);col.w=texture2D(p,uv.xy).w;gl_FragColor=o(contrast)*col;}\n";const v=void 0;var x=(t,e,i,o,n)=>{const{pick:r,range:s,rnd:l}=i,a={glitch2:f,shrink:u,grid:g,desaturate:m},h=createGraphics(3040,4560);h.pixelDensity(1);const c=t.createShader(p,a[o]);if("glitch2"===o){const t=s(.005,.005);let e=r([0,t]),i=r([0,t]),o=r([0,t]),l=r([0,1]);n={amount1:e,amount2:i,amount3:o,type:l}}return t.push(),t.shader(c),c.setUniform("p",e),c.setUniform("u_resolution",[width,height]),c.setUniform("rnd",l()),n&&Object.keys(n).forEach((t=>{c.setUniform(t,n[t])})),t.quad(-1,-1,1,-1,1,1,-1,1),t.pop(),h.image(t,0,0),h};const w=void 0;var y=(t,e,i,o,r)=>{const s=width/1e3,{pick:l}=r,a=128,h=n(e,16384);let c=0;for(let e=-16*s;e<=width+16*s;e+=width/a)for(let n=-16*s;n<height+16*s;n+=height/a){const r=noise(.002*e,.002*n),a=noise(.001*e,.001*n);h[c%h.length].setAlpha(100*a),t.push(),t.noStroke(),t.fill(i),t.fill(h[c%h.length]),t.textSize(map(r,0,1,2,20)*s),t.text(l(o),e,n),t.pop(),c+=1}};const C=void 0;var k=(t,e,i,o)=>{const n=[1,.95,.01,0].reverse(),r=[e,e,"rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)"];e.setAlpha(100),t.push(),t.noStroke(),l(t,width/2,0,width/2,o,n,r),t.beginShape(),t.vertex(0,0),t.vertex(width,0),t.vertex(width-i,o),t.vertex(i,o),t.endShape(CLOSE),t.beginShape(),l(t,width,height/2,width-i,height/2,n,r),t.vertex(width,0),t.vertex(width,height),t.vertex(width-i,height-o),t.vertex(width-i,o),t.endShape(CLOSE),l(t,width/2,height,width/2,height-o,n,r),t.beginShape(),t.vertex(width,height),t.vertex(0,height),t.vertex(i,height-o),t.vertex(width-i,height-o),t.endShape(CLOSE),l(t,0,height/2,i,height/2,n,r),t.beginShape(),t.vertex(0,height),t.vertex(0,0),t.vertex(i,o),t.vertex(i,height-o),t.endShape(CLOSE),t.pop(),e.setAlpha(255)};const F=void 0;var D=(t,e,i,o,n,r,s,l,a,h,c,d,p)=>{const{pick:f,rnd:u,range:g,rangeFloor:m}=n,v=t.map((t=>{const{back:i}=t,n=f(o);t.count=n;const v=u()>.5,x=!v||u()>.5,{class:w,types:y,specialTypes:C}=f(r);return h=1===h||2!==h&&u()>.5,new w({p:i,count:n,coef:c||g(.1,4),colors:e,type:f(y),specialType:f(C),rotation:f(a),fill:v&&f(l),stroke:x&&f(l),gFillDirection:f(s),gStrokeDirection:f(s),differentFillGradients:u()>.5,differentStrokeGradients:u()>.5,render90deg:h,rnd:u,rangeFloor:m,pick:f,str:d,cutBacks:p})}));(0===i||1===i&&u()>.1||2===i&&u()>.7||3===i&&u()>.9)&&v.forEach((t=>{t.render()}))};const S=void 0;var b=(t,e,i,o,n,r)=>{const s=([t,e])=>[[t,e],[t+1,e],[t+1,e+1],[t,e+1]],l=[];let a=[t,e],h=0;const c=(t,e)=>(h+=1,h>4&&(a=r(l)[0],h=0),0===l.filter((([[i,o]])=>t===i&&e===o)).length);let d=0;for(;d<i;){const[t,e]=a,i=r(["left","up","right","down"]);"up"===i?e-1>=0&&c(t,e-1)&&(a=[t,e-1],l.push(s(a)),d+=1):"down"===i?e+1<1*n&&c(t,e+1)&&(a=[t,e+1],l.push(s(a)),d+=1):"left"===i?t-1>=0&&c(t-1,e)&&(a=[t-1,e],l.push(s(a)),d+=1):"right"===i&&t+1<1*o&&c(t+1,e)&&(a=[t+1,e],l.push(s(a)),d+=1)}return l};const E=void 0;var A=(t,e,i,o)=>{const n=t=>t.filter((([e,i])=>{const o=t.filter((([t,o])=>e===t&&i===o+1)).length>0,n=t.filter((([t,o])=>e===t+1&&i===o)).length>0,r=t.filter((([t,o])=>e===t&&i===o-1)).length>0,s=t.filter((([t,o])=>e===t-1&&i===o)).length>0,l=t.filter((([t,o])=>e===t-1&&i===o+1)).length>0,a=t.filter((([t,o])=>e===t+1&&i===o+1)).length>0,h=t.filter((([t,o])=>e===t+1&&i===o-1)).length>0,c=t.filter((([t,o])=>e===t-1&&i===o-1)).length>0;return!(o&&n&&r&&s&&l&&a&&h&&c)}));let r=s(t.flat());r=n(r);const l=void 0,a=(t=>{let e=(t=t.sort((([t,e],[i,o])=>t+e-(i+o))))[0];const i=[e];let o=[...t];o.shift();const n=(t,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===t&&a===n-1)return e=[l,a],i.push(e),o.splice(s,1),!0}},r=(t,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===t+1&&a===n)return e=[l,a],i.push(e),o.splice(s,1),!0}},s=(t,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===t&&a===n+1)return e=[l,a],i.push(e),o.splice(s,1),!0}},l=(t,n,r)=>{for(let s=0;s<r.length;s+=1){const[l,a]=r[s];if(l===t-1&&a===n)return e=[l,a],i.push(e),o.splice(s,1),!0}};let a=[{func:l,type:"left"},{func:n,type:"up"},{func:r,type:"right"}],h=null,c="null";for(;i.length<t.length;)"up"===c?a=[{func:l,type:"left"},{func:n,type:"up"},{func:r,type:"right"}]:"right"===c?a=[{func:n,type:"up"},{func:r,type:"right"},{func:s,type:"down"}]:"down"===c?a=[{func:r,type:"right"},{func:s,type:"down"},{func:l,type:"left"}]:"left"===c&&(a=[{func:s,type:"down"},{func:l,type:"left"},{func:n,type:"up"}]),h=a[0].func(...e,o),c=a[0].type,h||(h=a[1].func(...e,o),c=a[1].type),h||(h=a[2].func(...e,o),c=a[2].type),h=null;return i})(r);let h=[],c=[];if(o)for(let t=0;t<a.length;t+=1){let[o,n]=a[t];const r=o*e,s=n*i;c.push({type:"vertex",points:[r,s]})}else for(let t=0;t<a.length;t+=1){let[o,n]=a[t],[r,s]=a[(t+a.length-1)%a.length],[l,h]=a[(t+1)%a.length];const d=o*e,p=n*i;r===o&&s===n+1&&l===o+1&&h===n||r===o&&s===n-1&&l===o-1&&h===n||r===o-1&&s===n&&l===o&&h===n+1||r===o+1&&s===n&&l===o&&h===n-1||c.push({type:"vertex",points:[d,p]})}return{finalPoints:c,arcs:h}};const B=(t,e,i,o,n=0)=>{const{rnd:r,rangeFloor:s,pick:l,pickSome:a,shuffleArray:h}=o,c=t,d=t*(height/width);let p=(width-width*n*2)/c,f=p,u=[];for(let t=0;t<c;t+=1)for(let e=0;e<d;e+=1)u.push([t,e]);u=h(u),u=a(u,e);const g=[];let m;return u.forEach((t=>{const[e,o]=t;g.push(b(e,o,s(...i),c,d,l))})),h(g.map((t=>A(t,p,f,r()>.5))))},G=(t,e,i,o,n)=>{const r=width/1e3;t.drawingContext.shadowColor=e,t.drawingContext.shadowBlur=i*r,t.drawingContext.shadowOffsetX=o?o*r:0,t.drawingContext.shadowOffsetY=n?n*r:0},z=(t,e)=>{t.beginShape(),e.forEach((({points:e})=>{t.vertex(...e)})),t.endShape(CLOSE)},L=void 0,O=(t,e,i,o,n)=>{const{rnd:r,pick:s,range:l}=n;let a=e,h=i,c=s([0,a]),d=s([0,a]),p=s([0,a]);t.loadPixels();let f=t.pixelDensity(),u=t.width*f*4*(t.height*f);for(let e=0;e<u;e+=4)r()<o&&(c=s([0,a]),d=s([0,a]),p=s([0,a])),t.pixels[e]=t.pixels[e+c]+s([-1,1])*l(h),t.pixels[e+1]=t.pixels[e+1+d]+s([-1,1])*l(h),t.pixels[e+2]=t.pixels[e+2+p]+s([-1,1])*l(h);for(let e=u;e>0;e-=4)r()<o&&(c=s([0,a]),d=s([0,a]),p=s([0,a])),t.pixels[e]=t.pixels[e-c]+s([-1,1])*l(h),t.pixels[e+1]=t.pixels[e+1-d]+s([-1,1])*l(h),t.pixels[e+2]=t.pixels[e+2-p]+s([-1,1])*l(h);t.updatePixels()},_=void 0;var P=(t,e,i,o,n,r,s,l,a,h,c,d=0)=>{const{filled:p,glitch:f,backs2:u,scheme:g,doubleShadow:m,smallShadow:v}=c,{pick:x,pickSome:w,rnd:y,rangeFloor:C}=e,k=width/1e3;let F=width*d,D=height*d;const S=[x([-1,0,1]),x([-1,0,1])],b=S.map((t=>-1*t)),E=w(i,2),A=o,L=y()>.5?E[1]:o,_=B(r,s,h,e,d);let P;f&&(P=createGraphics(3040,4560),P.pixelDensity(1),P.image(t,0,0),O(P,x([16,32,64,128,256]),16,2e-6,e)),t.push(),t.translate(F,D),_.forEach((({finalPoints:e})=>{const r=!u&&y()>.5,s=void 0;if(!u&&y()>.8){const o=C(8),n=x(i);n.setAlpha(100),t.push(),t.noStroke(),t.fill(n),G(t,n,1,o*b[0],o*b[1]),z(t,e),t.pop(),y()>.05&&n.setAlpha(255)}if(r){t.push();const o=C(8),n=x(i);t.noStroke(),t.fill(n),G(t,n,o),z(t,e),t.pop()}t.push(),r?t.noFill():t.fill(x(i)),t.strokeWeight(0),a&&y()>.5&&(t.strokeWeight(k),t.stroke(L)),f||(P=x(n).back);let h=1;if(m&&(h=2),l){let i=C(8,16)*h,n=C(8)*h;if(p&&(i=C(4,16),n=C(4)),v&&(i=C(0,4),n=C(2)),G(t,o,i,n*S[0],n*S[1]),y()>.5){const r=[i,0],s=[n,0];y()>.5&&(r.reverse(),s.reverse());const l=map(e[0].points[1],0,height,r[0],r[1]),a=map(e[0].points[1],0,height,s[0],s[1]);G(t,o,l,a*S[0],a*S[1])}}if(p){const e=x(i);e.setAlpha(100),t.fill(e),e.setAlpha(255)}u&&t.noFill(),z(t,e),t.drawingContext.clip(),t.image(P,0,0,width,height),g&&(t.stroke(A),t.strokeWeight(k),t.push(),t.translate(F,D),t.noFill(),z(t,e),t.pop(),e.forEach((({points:e})=>{t.push(),t.translate(F,D),y()>.7&&t.fill(x(i)),t.circle(...e,5*k),t.pop()}))),t.pop()})),t.pop()};const I=void 0,W=void 0;var T=(t,e,i,o)=>{const{rangeFloor:n,rnd:r}=o,s=t/2*3,l=o=>{const n=.5*r();return!(o[0]<0||o[0]>t||o[1]>height-height*e)&&(n<.25?[o[0]+1,o[1]+i]:n<.5?[o[0]-1,o[1]+i]:n<.75?[o[0]+1,o[1]]:[o[0]-1,o[1]])},a=t=>{const o=r();return!(t[1]<0||t[1]>s||t[0]>width-width*e)&&(o<.25?[t[0]+i,t[1]+1]:o<.5?[t[0]+i,t[1]-1]:o<.75?[t[0],t[1]+1]:[t[0],t[1]-1])},h=n(t+1),c=n(s+1);let d=[h,0],p=l(d);const f=[[d[0]*i,d[1]]];for(;p;)p=l(d),p&&(f.push([p[0]*i,p[1]]),d=p);let u=[0,c],g=a(u),m=[[u[0],u[1]*i]];for(;g;)g=a(u),g&&(m.push([g[0],g[1]*i]),u=g);return{xPoints:f,yPoints:m}},R=(t,e,i,o,n)=>{if(e&&i.length>4){const e=n(1,3),r=n(0,i.length-e-1);t.drawingContext.setLineDash([r*o,e*o])}else t.drawingContext.setLineDash([])},M=G,N=(t,e,i=0,o=0)=>{t.beginShape(),e.forEach((e=>{t.vertex(e[0]+i,e[1]+o)})),t.endShape()};const U=void 0;var q=(t,e,i,o,n=0,r)=>{const s=createGraphics(3040,4560);s.pixelDensity(1),s.image(t,0,0);const l=width/1e3,{pick:a,range:h,rangeFloor:c,rnd:d,weighted:p}=e,f=[a([-1,0,1]),a([-1,0,1])],u=a([2,4,8,16]),g=a(i),m=void 0,v=(width-width*n*2)/u,x=sqrt(sq(v)+sq(v)),w=d()>.5,y=c(12,48),{xPoints:C,yPoints:k}=T(u,n,v,e);t.strokeCap(SQUARE),t.push(),t.translate(width*n,height*n);const F=void 0;if(d()>.5){const e=c(3,8),o=c(1,6);t.push(),t.noFill();const n=c(1,5)*l;if(t.strokeWeight(n),d()>.5)for(let r=1;r<e;r+=1){R(t,w,C,x,c);const e=r*n*f[0]*o,s=r*n*f[1]*o;t.stroke(i[r%i.length]),N(t,C,e,s)}else if(d()>.5){R(t,w,k,x,c);for(let r=1;r<e;r+=1){const e=r*n*f[0]*o,s=r*n*f[1]*o;t.stroke(i[r%i.length]),N(t,k,e,s)}}t.pop()}const D=a([1,2,3,4]);t.push(),t.noFill(),t.stroke(g),r&&t.stroke(o),t.strokeWeight(D*l/2),R(t,w,C,x,c),N(t,C),R(t,w,k,x,c),N(t,k),t.strokeWeight(D*l);const S=2*h(1,4);M(t,o,S,y*f[0],y*f[1]),R(t,w,C,x,c),N(t,C),R(t,w,k,x,c),N(t,k),D>2&&d()>.5&&(t.drawingContext.shadowBlur=0,t.strokeWeight(l),t.stroke(a(i)),R(t,w,C,x,c),N(t,C),R(t,w,k,x,c),N(t,k)),t.pop();const b=10*l,E=n?b-b*n:b,A=e=>{e.forEach(((e,r)=>{if(r!==C.length-2&&0!==r&&d()>.7&&(t.push(),t.noStroke(),t.fill(g),t.ellipse(...e,E),d()>.5&&(t.fill(o),t.ellipse(...e,E/2)),t.pop()),d()>.9){const o=E*[1.5,2,2.5,3,3.5,4][p([4,4,3,3,2,1])]*D,r=d()>.75,f=d()>.75,u=d()>.75,m=c(3,8),v=o/m,x=a([-5,0,5])*l,w=a([-5,0,5])*l;if(t.push(),t.stroke(g),f&&d()>.5&&(t.noStroke(),t.fill(g)),t.strokeWeight(D*l),t.ellipse(...e,o),t.translate(-width*n,-height*n),t.drawingContext.clip(),t.image(s,x,w,1.01*width,1.01*height),r){const r=d()>.5,s=d()>.7;t.translate(width*n,height*n),t.noFill();for(let n=0;n<m;n+=1){const a=o-n*v,c=h(0,TWO_PI),p=c+h(HALF_PI,TWO_PI);r&&t.stroke(i[n%i.length]),d()>.85?t.strokeWeight(D*l-n*v):t.strokeWeight(l-n*v),s?t.arc(...e,a,a,c,p,OPEN):t.ellipse(...e,a)}}if(f){const n=a(i);n.setAlpha(75),t.push(),t.fill(n),t.noStroke(),t.ellipse(...e,o),t.pop(),n.setAlpha(255)}u&&(t.push(),t.stroke(g),t.strokeWeight(D*l),d()>.5?(t.line(e[0]-o/2,e[1],e[0]+o/2,e[1]),t.line(e[0],e[1]-o/2,e[0],e[1]+o/2)):(t.line(e[0]-o/2,e[1]-o/2,e[0]+o/2,e[1]+o/2),t.line(e[0]+o/2,e[1]-o/2,e[0]-o/2,e[1]+o/2)),t.pop()),t.pop()}}))};A(C),A(k),t.pop()};class Y{constructor({p:t,count:e,coef:i,colors:o,type:r,specialType:s,rotation:l,fill:a,stroke:h,gFillDirection:c,gStrokeDirection:d,differentFillGradients:p,differentStrokeGradients:f,render90deg:u,rnd:g,rangeFloor:m,str:v,pick:x,cutBacks:w}){const y={c:0,tl:0,tr:.5*PI,bl:1.5*PI,br:PI};this.p=t,this.count=e,this.colors=o,this.type=r,this.rotation=y[l],this.fill=a,this.stroke=h,this.gFillDirection=c,this.gStrokeDirection=d,this.specialType=s,this.lerpColors=n(o,e**2*i),this.size=t.width/e,this.counter=0,this.xCounter=0,this.xCount=t.round(t.width/this.size),this.yCount=t.round(t.height/this.size),this.render90deg=u,this.destinations=u?[this.yCount,this.xCount]:[this.xCount,this.yCount],this.odd=!1,this.lineOdd=!1,this.differentFillGradients=p,this.differentStrokeGradients=f,this.rnd=g,this.rangeFloor=m,this.str=v,this.pick=x,this.cutBacks=w}drawShape(){}render(){let{p:t,colors:e,destinations:i,size:o,counter:n,xCounter:r,rotation:s,lerpColors:l,fill:a,stroke:h,render90deg:c,differentFillGradients:d,differentStrokeGradients:p}=this;for(let f=0;f<i[0];f+=1){for(let u=0;u<i[1];u+=1){let i=f*o,g=u*o;c&&(i=u*o,g=f*o),this.lineOdd=r%2==0,this.lineOdd?this.odd=n%2==0:this.odd=n%2!=0;let m=l[n%l.length],v=l[t.round(n+l.length/2)%l.length];if("noise"===a){const t=noise(.001*i,.001*g);m=l[Math.round(map(t,0,1,0,l.length-1))%l.length]}this.mainColor=e[0],this.secondaryColor=m,t.push(),t.translate(i,g),t.translate(o/2,o/2),t.rotate(s),t.translate(-o/2,-o/2),"solid"===a?t.fill(e[0]):"lerp"===a||"noise"===a?t.fill(m):"gradient"===a?d?this.makeGradient(!0,!1,m):this.makeGradient(!0):a||t.noFill(),"solid"===h?t.stroke(e[1]):"lerp"===h||"noise"===h?t.stroke(m):"gradient"===h?p?this.makeGradient(!1,!1,m):this.makeGradient(!1,!1):h||t.noStroke(),this.drawShape(),t.pop(),n+=1}r+=1}}makeGradient(t,e,i){let{p:o,gFillDirection:n,gStrokeDirection:r,gBackgroundDirection:s,size:h,colors:c}=this;const d=void 0,p=t?n:e?s:r,f=["tb","lr","tlbr","trbl"].includes(p)?[0,1]:[1,0],u=[0,0],g=[h,0],m=[0,h],v=[h,h],x=[h/2,0],w=[h/2,h],y=[0,h/2],C=[h,h/2],k=t||e?l:a,F=i?[c[0],i]:c;"tb"===p||"bt"===p?k(o,...x,...w,f,F):"lr"===p||"rl"===p?k(o,...y,...C,f,F):"tlbr"===p||"bltr"===p?k(o,...u,...v,f,F):"trbl"!==p&&"brtl"!==p||k(o,...g,...m,f,F)}}class X extends Y{constructor(t){super(t)}drawShape(){let{p:t,type:e,size:i,odd:o,lineOdd:r,rnd:s,rangeFloor:l,colors:a,mainColor:h,secondaryColor:c}=this,d,p,f,u,g,m,v;if("something"!==e||r||(o=!o),"diagonal"===e&&o?(v=1,d=i,p=0,f=i,u=i,g=0,m=i):"mirror"!==e&&"something"!==e||!o?"chess"===e||"shear"===e||"zigzag"===e?r?o||"shear"===e?(v=2,d=0,p=0,f=i,u=i,g=0,m=i):(v=1,d=i,p=0,f=i,u=i,g=0,m=i):("zigzag"===e&&(o=!o),o||"shear"===e?(v=3,d=0,p=0,f=i,u=0,g=i,m=i):(v=4,d=0,p=0,f=i,u=0,g=0,m=i)):(v=4,d=0,p=0,f=i,u=0,g=0,m=i):(v=2,d=0,p=0,f=i,u=i,g=0,m=i),t.triangle(d,p,f,u,g,m),s()>.9){const e=l(2,21),o=i/e,r=n(a,e),x=s()>.5;for(let n=0;n<e;n+=1)1===v?(d=i,p=n*o,f=i,u=i,g=n*o,m=i):2===v?(d=0,p=n*o,f=i-n*o,u=i,g=0,m=i):3===v?(d=n*o,p=0,f=i,u=0,g=i,m=i-n*o):4===v&&(d=0,p=0,f=i-n*o,u=0,g=0,m=i-n*o),x?t.fill(n%2==0?h:c):t.fill(r[n]),t.triangle(d,p,f,u,g,m)}}}var H=X;class V extends Y{constructor(t){super(t)}drawShape(){let{p:t,type:e,size:i,odd:o,lineOdd:r,specialType:s,rnd:l,rangeFloor:a,colors:h,mainColor:c,secondaryColor:d,str:p,pick:f,cutBacks:u}=this;"simple"===e&&r&&(o=!o);let g=i;if("half"===s?g=.5*i:"quarter"===s?g=.75*i:"third"===s?g=.66*i:"mid"===s?g=1.2*i:"max"===s&&(g=1.4*i),o){if(t.rectMode(t.CENTER),l()>.2)t.rect(i/2,i/2,g,g);else{const e=a(2,41),o=n(h,e),r=l()>.5,s=l()>.5;for(let n=0;n<e;n+=1){const a=g-g/e*n;r?t.fill(n%2==0?c:d):t.fill(o[n]),s&&l()>.75&&t.noFill(),t.rect(i/2,i/2,a,a)}}u&&l()>.75&&(t.drawingContext.clip(),t.image(f(u),0,0)),l()>.9&&(t.textSize(g),t.textAlign(t.CENTER,t.CENTER),t.text(f(p),i/2,i/2))}}}var Q=V,j={};j="precision highp float;\n#define GLSLIFY 1\nuniform sampler2D v;uniform vec2 f;uniform float s,t,x,y;float D(vec2 v){vec3 f=fract(v.xyx*.1031);f+=dot(f,f.yzx+33.33);return fract((f.x+f.y)*f.z);}float D(vec2 v,float s,float f){return s+D(v)*(f-s);}float n(float f,float v,float s){return step(v,f)-step(s,f);}float r=t;void main(){vec2 i=gl_FragCoord.xy/f,t;float z=1.+y*2.,u;i-=y/z;i*=z;t=vec2(i.x,1.-i.y);vec3 m=texture2D(v,t).xyz;u=r/2.;for(float e=0.;e<200.;e+=1.){float h=D(vec2(s,2345.+float(e))),w=D(vec2(s,4851.+float(e)))*.25,g=D(vec2(s,9625.+float(e)),-u,u);vec2 d=t;d.x+=g;if(n(t.y,h,fract(h+w))==1.){float o=r/6.,a=D(vec2(s,9545));vec2 l=vec2(D(vec2(a,2323),-o,o),D(vec2(a,7707),-o,o));if(a<.33)m.x=texture2D(v,d+l).x;else if(a<.66)m.y=texture2D(v,d+l).y;else m.z=texture2D(v,d+l).z;}}vec4 e=vec4(m,1);e*=1.-x+x*sin(100.+i.x*4e3)+.1;e*=1.-x+x*sin(100.+i.y*6e3)+.1;e.w=1.;gl_FragColor=e;}\n";const J=new URLSearchParams(window.location.search),$=Object.fromEntries(J.entries());let K;const Z=.666666666667;let tt,et,it,ot,nt,rt,st,lt,at,ht,ct,dt,pt,ft,ut=0;const gt=[3040,4560];let mt,vt,xt,wt,yt,Ct,kt,Ft,Dt=.002,St;const{pd:bt=1}=$;function setup(){et=createCanvas(gt[0],gt[1]),mt=xt=width,vt=wt=height,yt=kt=mt/2,Ct=Ft=vt/2,ot=createGraphics(3040,4560,WEBGL),ot.pixelDensity(1),lt=createGraphics(3040,4560),lt.pixelDensity(1),ft=createGraphics(3040,4560),ft.pixelDensity(1),K=width/1e3,pixelDensity(Number(bt)),it=createGraphics(gt[0],gt[1]),it.pixelDensity(1),strokeWeight(K),strokeCap(SQUARE);const t=e(tokenData.hash),{rnd:i,range:n,rangeFloor:r,pick:s,pickSome:l,weighted:a,shuffleArray:f}=t,calculateFeatures=()=>{const t={};return t.paletteIndex=r(o.length-1),t.squares=i()>.7,t.sameFill=i()>.7,t.samePattern=i()>.7,t.sameSize=i()>.95,t.outlines=i()>.5,t.shapeOverload=["min","mid","max"][a([1,2,2])],t.volume=i()>.25,t.compression=[1,2,3,4,5][a([11,10,4,1,1])],t.symbols=s(["anime","numbers","binary","squares","arrows","dots","trigrams"]),t.split=i()>.98,t},{paletteIndex:u,sameFill:g,samePattern:m,sameSize:v,squares:w,outlines:C,shapeOverload:F,volume:S,compression:b,symbols:E,split:A}=calculateFeatures();let B;const G=f([...o[u],"#a6a6a6","#404040","#0d0d0d"]);at=s(G),pt=l(G,3),pt=pt.map((t=>((t=color(t)).setAlpha(85),t))),rt=i,st=n,tt=()=>{ut=1;const e=void 0;let a,B;i()>.3?(a=s([6,7,8,9]),B=a):(a=s([5,6,7,8,9]),B=r(a,10)),noiseSeed(1e6*i());const z=h(G,G.length).map((t=>(t.setAlpha(30),t)));let L=h(G,G.length),O=h(f(o[u]),o[u].length);St=lerpColor(L[0],color(0),.9);let _=s(O);dt=c(r(8,40)).map((()=>createGraphics(gt[0],gt[1]))),ht=h(G,90*dt.length),ct=h(G,90*dt.length),dt.forEach((t=>{t.pixelDensity(1),t.strokeCap(SQUARE),t.strokeWeight(K)})),dt=dt.map((t=>({back:t,count:0,count2:0})));const I=Math.ceil(dt.length/2);let W=dt.splice(0,I),T=dt.splice(-I);dt=f([...W,...T]);let R=[4,8,16,32,64];const M=v&&[s([4,8,16,32])],N=void 0,U=void 0,Y=void 0,X=void 0,V=void 0,J=void 0,$=void 0,Z=void 0,tt={numbers:"0123456789".split(""),binary:["0","1","・","●","○"],squares:["□","■","▣","◩","◪"],arrows:["◄","▲","▼","►","◁","△","▽","▷"],dots:["∴","∵","∶","∷","・"],trigrams:["☰","☲","☱","☴","☵","☶","☳","☷"],anime:" .:-=+*#%@゠ァアィイゥウェエォオカキクケコサシスセソタチッツテトナニヌネノハヒフヘホマミムメモャヤュユョヨラリルレロヮワヰヱヲンヵヶ・ーヽヿ".split("")}[E],et=[{class:H,types:["chess","mirror","diagonal","corner","shear","zigzag","something"],specialTypes:[]},{class:Q,types:["chess","simple"],specialTypes:["normal","half","third","quarter","max"]}],rt=[et[1]];let st=["lr","tb","bt","rl","trbl","tlbr","brtl","bltr"],at=["solid","lerp","gradient","noise"],pt=["tl","br","tr","bl"],ft=!1,mt=!1;m&&(et[0].types=[s(et[0].types)],et[1].types=[s(et[1].types)],pt=[s(pt)],ft=s([1,2])),g&&(at=[s(at)],st=[s(st)],mt=n(.1,4)),w&&et.shift();for(let e=0;e<3;e+=1)D(W,L,e,M||R,t,et,st,at,pt,ft,mt,tt);const vt={1:.075,2:.075,3:.1,4:.2,5:.25},xt={1:.01,2:.025,3:.04,4:.05,5:.08};let wt=vt[b];W.forEach((e=>{e.back=x(ot,e.back,t,"shrink",{amount:wt}),i()>.5&&(e.back=x(ot,e.back,t,"glitch2"))}));const yt=void 0,Ct={min:[10,20],mid:[10,50],max:[50,200]}[F];it.background(_);let kt=createGraphics(gt[0],gt[1]);kt.pixelDensity(1),y(kt,L,St,tt,t),it.image(W[0].back,0,0,width,height),it.image(kt,0,0,width,height);let Ft=[8,16,32,64,128];const Dt=20,bt=.05,Et=.025,At=i()>.9;for(let e=0;e<=Dt;e+=1){const o=s(Ft);i()>.6&&q(it,t,L,St),i()>.8&&q(it,t,L,St),q(it,t,L,St),P(it,t,L,St,W,o,r(...Ct),S,C,[a,B],{filled:!1,iteration:e,doubleShadow:At}),it=x(ot,it,t,"desaturate",{amoun
These are the military alien insects. They are symmetrical and asymmetrical simultaneously for existence in several dimensions. Being in a team, they unite into a collective mind increasing each other's abilities. **Controls:** Click to change mode (standard, skeleton, avatar). Press 1 to 9 to set pixel density according to the numbers. Sometimes before a new Shvembldr release, there is an opportunity to win TBOA tokens in Alien Insects Battle: https://www.tboa.club/insect_battle.
_Somewhere in a galaxy far away, a multidimensional being is looking at this clock and thinking about the impermanence of existence and the infinity of the universe. This art is endless and deterministic._ **Use full screen for total immersion.** Controls: - Click/tap or use keys 1 to 9 to switch speed. - s = toggle starts. - t = toggle hyperspace. - Space = pause.
This project symbolizes generative artists united by the common idea of Art Blocks. Each panel on the block is a small generative art piece with several random parameters that live their own life while simultaneously being part of the composition. Each art contains one letter of the words ART BLOCKS. A collector who possesses all nine letters becomes a member of the TBOA club.
**Attention! Extremely Experimental Project!** This project is the quintessential generative art. Each instance of this project is an infinite deterministic ratio and resolution agnostic art generator. _Every click = new art_. The main format is a 3x4 poster. But by pressing "f," you can stretch the art to the whole screen (any screen). All elements of this art are rectangles, and the main number of this project is 4. You can use the generated images commercially (read the license). 

 **Controls:** - "f" = fullscreen - "s" = save art - "t" = 30-sec interval infinite slideshow - "u" = 3-sec interval slideshow + save (а convenient way to make images for the gallery) - "1 - 9" = change pixel density. 

(Changing the ratio and pixel density resets the art counter to 0).
Ieva [iɛvʌ] is an algorithm that creates a shape in a specific sequence from a random point on the grid and smooths out its corners. Overlapping such shapes creates endless possibilities of combinations that will always remain balanced and aesthetically pleasing. The title of this project is the name of the investigator who made a criminal case against me for making art. This name occupied a big part of my mind while working on this project. And I decided that it should be perpetuated in art. You can do the "investigation" for Ieva (because she doesn't want to do it). To do so, you have to click on the art. **Controls:** - "click" = investigate - "space" = automatic investigation
Ieva [iɛvʌ] is an algorithm that creates a shape in a specific sequence from a random point on the grid and smooths out its corners. Overlapping such shapes creates endless possibilities of combinations that will always remain balanced and aesthetically pleasing. The title of this project is the name of the investigator who made a criminal case against me for making art. This name occupied a big part of my mind while working on this project. And I decided that it should be perpetuated in art. You can do the "investigation" for Ieva (because she doesn't want to do it). To do so, you have to click on the art. **Controls:** - "click" = investigate - "space" = automatic investigation
Ieva [iɛvʌ] is an algorithm that creates a shape in a specific sequence from a random point on the grid and smooths out its corners. Overlapping such shapes creates endless possibilities of combinations that will always remain balanced and aesthetically pleasing. &nbsp; 

 The title of this project is the name of the investigator who made a criminal case against me for making art. This name occupied a big part of my mind while working on this project. And I decided that it should be perpetuated in art. &nbsp; You can do the "investigation" for Ieva (because she doesn't want to do it). To do so, you have to click on the art. &nbsp; **Controls:** &nbsp; - "click" = investigate - "space" = automatic investigation
**Attention! Extremely Experimental Project!** This project is the quintessential generative art. Each instance of this project is an infinite deterministic ratio and resolution agnostic art generator. _Every click = new art_. The main format is a 3x4 poster. But by pressing "f," you can stretch the art to the whole screen (any screen). All elements of this art are rectangles, and the main number of this project is 4. You can use the generated images commercially (read the license). &nbsp; 

 **Controls:** &nbsp; - "f" = fullscreen - "s" = save art - "t" = 30 sec interval infinite slideshow - "u" = 3-sec interval slideshow + save (а convenient way to make images for the gallery) - 1 - 9 = change pixel density. 

(Changing the ratio and pixel density resets the art counter to 0).
These are the military alien insects. They are symmetrical and asymmetrical simultaneously for existence in several dimensions. Being in a team, they unite into a collective mind increasing each other's abilities. &nbsp; **Controls:** &nbsp; Click to change mode (standard, skeleton, avatar). Press 1 to 9 to set pixel density according to the numbers. &nbsp; Sometimes before a new Shvembldr release, there is an opportunity to win TBOA tokens in Alien Insects Battle: https://www.tboa.club/insect_battle.
These are the military alien insects. They are symmetrical and asymmetrical simultaneously for existence in several dimensions. Being in a team, they unite into a collective mind increasing each other's abilities. &nbsp; **Live mode controls:** &nbsp; Click to change the visual mode (standard, skeleton, avatar). Press 1 to 9 to set pixel density according to the numbers. &nbsp; Sometimes before a new Shvembldr release, there is an opportunity to win TBOA tokens in Alien Insects Battle: https://www.tboa.club/insect_battle
This project symbolizes generative artists united by the common idea of Art Blocks. Each panel on the block is a small generative art piece with several random parameters that live their own life while simultaneously being part of the composition. &nbsp; &nbsp; Each art contains one letter of the words ART BLOCKS. A collector who possesses all nine letters becomes a member of the TBOA club.
This project symbolizes generative artists united by the common idea of Art Blocks. Each panel on the block is a small generative art piece with several random parameters that live their own life while simultaneously being part of the composition. &nbsp; Each art contains one letter of the words ART BLOCKS. A collector who possesses all nine letters becomes a member of the TBOA club.
This project symbolizes generative artists united by the common idea of Art Blocks. Each panel on the block is a small generative art piece with several random parameters that live their own life while simultaneously being part of the composition. &nbsp; Each art contains one letter of the words ART BLOCKS. A collector who possesses all nine letters becomes a member of the TBOA club.
This project symbolizes generative artists united by the common idea of Art Blocks. Each panel on the block is a small generative art piece with several random parameters that live their own life while simultaneously being part of the composition. Each art contains one letter of the words ART BLOCKS. A collector who possesses all nine letters becomes a member of the TBOA club.
_Somewhere in a galaxy far away, a multidimensional being is looking at this clock and thinking about the impermanence of existence and the infinity of the universe. This art is endless and deterministic._ &nbsp; **Use full screen for total immersion.** &nbsp; Controls: - Click/tap or use keys 1 to 9 to switch speed. - s = toggle starts. - t = toggle hyperspace. - Space = pause.
_Somewhere in a galaxy far away, a multidimensional being is looking at this clock and thinking about the impermanence of existence and the infinity of the universe. This art is endless and deterministic._ &nbsp; ## **Use full screen for total immersion.** &nbsp; Controls: - Click/tap or use keys 1 to 9 to switch speed. - s = toggle starts. - t = toggle hyperspace. - Space = pause.
_Somewhere in a galaxy far away, a multidimensional being is looking at this clock and thinking about the impermanence of existence and the infinity of the universe. This art is endless and deterministic._ &nbsp; ## **Use full screen for total immersion.** &nbsp; Controls: - Click/tap or use keys 1 to 9 to switch speed. - s = toggle starts. - t = toggle hyperspace. - Space = pause.
_Somewhere in a galaxy far away, a multidimensional being is looking at this clock and thinking about the impermanence of existence and the infinity of the universe. This art is endless and deterministic._ ## **Use full screen for total immersion.** &nbsp; Controls: - Click/tap or use keys 1 to 9 to switch speed. - s = toggle starts. - t = toggle hyperspace. - Space = pause.
Somewhere in a galaxy far away, a multidimensional being is looking at this clock and thinking about the impermanence of existence and the infinity of the universe. This art is endless and deterministic. Use full screen for full immersion. Controls: Click/tap or use keys 1 to 9 to switch speed. s = toggle starts. t = toggle hyperspace. Space = pause.
is.miniCircle&&(this.p.fill(this.thirdColor),this.p.circle(this.x,this.y,this.size/2,this.size/2)),this.p.pop()}}var g=a;let k;const w=new URLSearchParams(window.location.search),y=Object.fromEntries(w.entries());let S,C;const m=1;let v,b,F,x,z,E,W,D,M;1*window.innerHeight>=window.innerWidth?(S=window.innerWidth,C=window.innerWidth/1):(C=window.innerHeight,S=1*window.innerHeight);let A=0,P=!0,B;const R=()=>{A===B?P=!1:0===A&&(P=!0),A<B&&P?A+=1:A>0&&!P&&(A-=1),v()},H=function(){const t=void 0;return!(!("ontouchstart"in window)&&!navigator.maxTouchPoints)};function mouseClicked(){H()&&R()}function touchStarted(){R()}function setup(){b=createCanvas(S,C);const{pd:t=null}=y;t&&pixelDensity(Number(t)),D=new Array(5).fill(null).map((()=>createGraphics(S,C)));const[i,r,o,h]=D;M=D[4],angleMode(DEGREES),M.angleMode(DEGREES);const l=width/1e3;v=()=>{const{rnd:t,rangeFloor:p,pick:u,weighted:a}=e(tokenData.hash),calculateFeatures=()=>{const e={},i=p(s.length);e.palette=s[i],e.grid=[2,3,4,5,6][a([.05,.5,1,1,.2])],e.shapes=["min","mid","max"][a([1,.5,.3])];const r=t()>.95&&u([1,2]);return e.doubleStrokes=1===r,e.tripleStrokes=2===r,e.zoomed="min"!==e.shapes&&t()>.99,e.bundle=t()>.98,e.spirals=t()>.995,e.simple=t()>.9,e.miniature=!e.zoomed&&t()>.95,e.everyPoint=t()>.85,e.metro=t()>.95,e.fixedShapes=!!(e.everyPoint||t()>.9)&&p(2,e.grid+1),e.hidden=t()>.95,e.stepsRange=u(["max","mid","full"]),e.backRects1=t()>.2,e.backRects2=t()>.2,e},{palette:k,grid:w,shapes:y,doubleStrokes:S,tripleStrokes:C,zoomed:m,bundle:v,spirals:b,simple:P,fixedShapes:R,miniature:H,metro:I,everyPoint:L,stepsRange:O,backRects1:N,backRects2:V,hidden:q}=calculateFeatures(),G=w,X=w,Y=n(k,1*k.length);E=Y[0],z=Y[1],W=Y[2];const J=H?.3:.1,U=width*J,$=height*J,j=[2,4,8][a([1,1,.1])],T=void 0,_=(width-2*U)/(G*j),K=_;let Q=m?4:1;const Z=G*Q,tt=X*Q,et=(width-2*U)/Z,it=et,st={2:1.4,3:1.2,4:1,5:.8,6:.6};let rt=[];for(let t=0;t<Z;t+=1)for(let e=0;e<tt;e+=1)rt.push([t,e]);const ot=[];x=[];for(let e=U;e<=Math.ceil(width-U-1);e+=et)for(let i=$;i<=Math.ceil(height-$-1);i+=et){const s=e+et/2,r=i+it/2;let o="min"===y?.5:.3;w<4&&(o=.05),t()>o&&x.push(new g(M,s,r,et/2,Y[u([1,2])],E,W,Q,st[w],t()>.5,t()>.5,t()>.5))}const ht={2:3,3:5,4:9,5:9,6:9},nt={min:1,mid:3,max:10},lt="min"===y?w:G*Q*nt[y];if(L)for(let e=0;e<rt.length;e+=1){B=rt.length;const i=void 0;let s;s=t()>.5?e%2==0?R:1:R,s=2===w?2:s,ot.push(c(...rt[e],s,Z,tt,u,R<4))}else for(let t=0;t<lt;t+=1){let t;B=lt,t="full"===O?p(1,ht[w]):"mid"===O?p(Math.ceil(ht[w]/2),ht[w]):ht[w],R&&(t=R),ot.push(c(...u(rt),t,Z,tt,u))}const ct=u([5,10,20]),pt=u([1,2,4]);F=ot.map(((e,s)=>{const{finalPoints:n,centers:l,arcs:c}=f(e,et,it);let p=t()>.5,a=!p&&t()>.4;(v||s>ot.length-3)&&(p=!1,a=!1);let g=t()>.1;s<ot.length-3&&s>ot.length-6&&(g=!0);let k=!1;b&&s>ot.length-nt[y]*w&&(k=!0);const m=u([i,r,o,h]);let F=t()>.5,x=!F&&t()>.5,z=!x&&!F&&t()>.5;S&&(F=!0,x=!1),C&&(F=!1,x=!0),p||a||(g=!1),P&&(a=!1);const D=PI*et,M=D/ct,A=M*pt,B=t()*D*l.length;return new d(U,$,Q,n,c,l,Y[u([1,2])],E,u([W,E]),p,k,g,F,x,z,a&&m,st[w],t()>.9,!a&&t()>.6,u,I,M,A,B,q)})),background(z),D.forEach((t=>{t.background(z)}));const ft=void 0,ut=st[w]*l;for(let t=U;t<Math.ceil(width-U-1);t+=_)for(let e=$;e<Math.ceil(height-$-1);e+=_)i.push(),i.noFill(),i.strokeWeight(2.5*ut/(j/2)),i.stroke(E),i.rect(t,e,_,_),i.pop();for(let t=U;t<Math.ceil(width-U-1);t+=_/2)for(let e=$;e<Math.ceil(height-$-1);e+=_/2)r.push(),r.noFill(),r.strokeWeight(1.25*ut/(j/2)),r.stroke(E),r.rect(t,e,_,_),r.pop();for(let e=U;e<Math.ceil(width-U-1);e+=_/.5)for(let i=$;i<Math.ceil(height-$-1);i+=_/.5)N&&(o.push(),o.fill(Y[2]),o.strokeWeight(5*ut/(j/2)),o.stroke(E),o.rect(e,i,2*_,2*_),o.pop()),t()>.95&&(o.push(),o.noStroke(),o.strokeWeight(5*ut/(j/2)),o.stroke(N?z:W),o.fill(E),o.circle(e+_,i+K,_),o.pop());for(let e=U;e<Math.ceil(width-U-_);e+=_/.5)for(let i=$;i<Math.ceil(height-$-_);i+=_/.5)V&&(h.push(),h.fill(Y[1]),h.strokeWeight(5*ut/(j/2)),h.stroke(E),h.rect(e,i,2*_,2*_),h.pop()),t()>.95&&(h.push(),h.noStroke(),h.strokeWeight(5*ut/(j/2)),h.stroke(E),h.fill(W),h.circle(e+_,i+K,_),h.pop());x.forEach((t=>{t.draw()}));for(let t=0;t<B-A;t+=1){const e=void 0;F[t].draw(M)}image(M,0,0)},v()}let I=!0;const L=[1,2,3,4,5,6,7,8,9];let O=!1;function windowResized(){const t=void 0,e=b.canvas.style;let i,s;1*window.innerHeight>=window.innerWidth?(i=window.innerWidth,s=window.innerWidth/1):(s=window.innerHeight,i=1*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${s}px`}window.addEventListener("keydown",(t=>{L.includes(Number(t.key))&&(pixelDensity(Number(t.key)),v()),"s"===t.key&&saveCanvas(tokenData.hash,"png")," "===t.key&&(O?(clearInterval(O),O=!1):O=setInterval((()=>{R()}),200))}));
is.miniCircle&&(this.p.fill(this.thirdColor),this.p.circle(this.x,this.y,this.size/2,this.size/2)),this.p.pop()}}var g=a;let k;const w=new URLSearchParams(window.location.search),y=Object.fromEntries(w.entries());let S,C;const m=1;let v,b,F,x,z,E,W,D,M;1*window.innerHeight>=window.innerWidth?(S=window.innerWidth,C=window.innerWidth/1):(C=window.innerHeight,S=1*window.innerHeight);let A=0,P=!0,B;const R=()=>{A===B?P=!1:0===A&&(P=!0),A<B&&P?A+=1:A>0&&!P&&(A-=1),v()},H=function(){const t=void 0;return!(!("ontouchstart"in window)&&!navigator.maxTouchPoints)};function I(){H()&&R()}function L(){R()}function setup(){b=createCanvas(S,C);const{pd:t=null}=y;t&&pixelDensity(Number(t)),D=new Array(5).fill(null).map((()=>createGraphics(S,C)));const[i,r,o,h]=D;M=D[4],angleMode(DEGREES),M.angleMode(DEGREES);const l=width/1e3;v=()=>{const{rnd:t,rangeFloor:p,pick:u,weighted:a}=e(tokenData.hash),calculateFeatures=()=>{const e={},i=p(s.length);e.palette=s[i],e.grid=[2,3,4,5,6][a([.05,.5,1,1,.2])],e.shapes=["min","mid","max"][a([1,.5,.3])];const r=t()>.95&&u([1,2]);return e.doubleStrokes=1===r,e.tripleStrokes=2===r,e.zoomed="min"!==e.shapes&&t()>.99,e.bundle=t()>.98,e.spirals=t()>.995,e.simple=t()>.9,e.miniature=!e.zoomed&&t()>.95,e.everyPoint=t()>.85,e.metro=t()>.95,e.fixedShapes=!!(e.everyPoint||t()>.9)&&p(2,e.grid+1),e.hidden=t()>.95,e.stepsRange=u(["max","mid","full"]),e.backRects1=t()>.2,e.backRects2=t()>.2,e},{palette:k,grid:w,shapes:y,doubleStrokes:S,tripleStrokes:C,zoomed:m,bundle:v,spirals:b,simple:P,fixedShapes:R,miniature:H,metro:I,everyPoint:L,stepsRange:O,backRects1:N,backRects2:V,hidden:q}=calculateFeatures(),G=w,X=w,Y=n(k,1*k.length);E=Y[0],z=Y[1],W=Y[2];const J=H?.3:.1,U=width*J,$=height*J,j=[2,4,8][a([1,1,.1])],T=void 0,_=(width-2*U)/(G*j),K=_;let Q=m?4:1;const Z=G*Q,tt=X*Q,et=(width-2*U)/Z,it=et,st={2:1.4,3:1.2,4:1,5:.8,6:.6};let rt=[];for(let t=0;t<Z;t+=1)for(let e=0;e<tt;e+=1)rt.push([t,e]);const ot=[];x=[];for(let e=U;e<=Math.ceil(width-U-1);e+=et)for(let i=$;i<=Math.ceil(height-$-1);i+=et){const s=e+et/2,r=i+it/2;let o="min"===y?.5:.3;w<4&&(o=.05),t()>o&&x.push(new g(M,s,r,et/2,Y[u([1,2])],E,W,Q,st[w],t()>.5,t()>.5,t()>.5))}const ht={2:3,3:5,4:9,5:9,6:9},nt={min:1,mid:3,max:10},lt="min"===y?w:G*Q*nt[y];if(L)for(let e=0;e<rt.length;e+=1){B=rt.length;const i=void 0;let s;s=t()>.5?e%2==0?R:1:R,s=2===w?2:s,ot.push(c(...rt[e],s,Z,tt,u,R<4))}else for(let t=0;t<lt;t+=1){let t;B=lt,t="full"===O?p(1,ht[w]):"mid"===O?p(Math.ceil(ht[w]/2),ht[w]):ht[w],R&&(t=R),ot.push(c(...u(rt),t,Z,tt,u))}const ct=u([5,10,20]),pt=u([1,2,4]);F=ot.map(((e,s)=>{const{finalPoints:n,centers:l,arcs:c}=f(e,et,it);let p=t()>.5,a=!p&&t()>.4;(v||s>ot.length-3)&&(p=!1,a=!1);let g=t()>.1;s<ot.length-3&&s>ot.length-6&&(g=!0);let k=!1;b&&s>ot.length-nt[y]*w&&(k=!0);const m=u([i,r,o,h]);let F=t()>.5,x=!F&&t()>.5,z=!x&&!F&&t()>.5;S&&(F=!0,x=!1),C&&(F=!1,x=!0),p||a||(g=!1),P&&(a=!1);const D=PI*et,M=D/ct,A=M*pt,B=t()*D*l.length;return new d(U,$,Q,n,c,l,Y[u([1,2])],E,u([W,E]),p,k,g,F,x,z,a&&m,st[w],t()>.9,!a&&t()>.6,u,I,M,A,B,q)})),background(z),D.forEach((t=>{t.background(z)}));const ft=void 0,ut=st[w]*l;for(let t=U;t<Math.ceil(width-U-1);t+=_)for(let e=$;e<Math.ceil(height-$-1);e+=_)i.push(),i.noFill(),i.strokeWeight(2.5*ut/(j/2)),i.stroke(E),i.rect(t,e,_,_),i.pop();for(let t=U;t<Math.ceil(width-U-1);t+=_/2)for(let e=$;e<Math.ceil(height-$-1);e+=_/2)r.push(),r.noFill(),r.strokeWeight(1.25*ut/(j/2)),r.stroke(E),r.rect(t,e,_,_),r.pop();for(let e=U;e<Math.ceil(width-U-1);e+=_/.5)for(let i=$;i<Math.ceil(height-$-1);i+=_/.5)N&&(o.push(),o.fill(Y[2]),o.strokeWeight(5*ut/(j/2)),o.stroke(E),o.rect(e,i,2*_,2*_),o.pop()),t()>.95&&(o.push(),o.noStroke(),o.strokeWeight(5*ut/(j/2)),o.stroke(N?z:W),o.fill(E),o.circle(e+_,i+K,_),o.pop());for(let e=U;e<Math.ceil(width-U-_);e+=_/.5)for(let i=$;i<Math.ceil(height-$-_);i+=_/.5)V&&(h.push(),h.fill(Y[1]),h.strokeWeight(5*ut/(j/2)),h.stroke(E),h.rect(e,i,2*_,2*_),h.pop()),t()>.95&&(h.push(),h.noStroke(),h.strokeWeight(5*ut/(j/2)),h.stroke(E),h.fill(W),h.circle(e+_,i+K,_),h.pop());x.forEach((t=>{t.draw()}));for(let t=0;t<B-A;t+=1){const e=void 0;F[t].draw(M)}image(M,0,0)},v()}let O=!0;const N=[1,2,3,4,5,6,7,8,9];let V=!1;function windowResized(){const t=void 0,e=b.canvas.style;let i,s;1*window.innerHeight>=window.innerWidth?(i=window.innerWidth,s=window.innerWidth/1):(s=window.innerHeight,i=1*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${s}px`}window.addEventListener("keydown",(t=>{N.includes(Number(t.key))&&(pixelDensity(Number(t.key)),v()),"s"===t.key&&saveCanvas(tokenData.hash,"png")," "===t.key&&(V?(clearInterval(V),V=!1):V=setInterval((()=>{R()}),200))}));
const t=void 0;var e=t=>{const e=Uint32Array.from([0,0,0,0].map(((e,i)=>parseInt(t.substr(8*i+2,8),16)))),i=()=>{let t,i=e[3];return e[3]=e[2],e[2]=e[1],e[1]=t=e[0],i^=i<<11,i^=i>>>8,e[0]=i^t^t>>>19,e[0]/4294967296},s=(t,e)=>e?i()*(e-t)+t:i()*t,r=(t,e)=>Math.floor(s(t,e)),o=t=>t.length?t[r(0,t.length)]:void 0,h=t=>{let e=t.reduce(((t,e)=>t+e)),s=i()*e;for(let e=0;e<t.length;e++){if(s<t[e])return e;s-=t[e]}return 0};return{rnd:i,rangeFloor:r,pick:o,weighted:h}};const i=void 0;var s=[["#E26D02","#252926","#E5DDC1"],["#191438","#E51A23","#EDDFDB"],["#FEC400","#33201B","#5A5B64"],["#F30209","#0C0AAD","#F4FCF8"],["#7A64D8","#E4FE02","#161312"],["#efece9","#090906","#efece9"],["#181a1e","#fffaff","#181a1e"],["#D7A1E7","#4406D2","#ECEDE9"],["#B5D6F4","#023BA5","#F4F5F4"],["#f39237","#191923","#fbfef9"],["#DB2800","#012631","#FCFCD6"],["#1268BF","#100C29","#FBEFD7"],["#41aa6d","#262525","#eaefea"],["#B51612","#0F0F0C","#e3e3df"],["#0d0b0b","#d80056","#ecedef"],["#b80c09","#fbfbff","#040f16"],["#3e92cc","#fffaff","#1e1b18"],["#fa110d","#000000","#fec3f0"],["#dd1c1a","#fff1d0","#06aed5"],["#e63946","#f1faee","#1d3557"],["#2b2d42","#edf2f4","#d90429"],["#E4CA18","#0A2349","#0168A7"]];const r=void 0,o=t=>t.filter(((e,i)=>{const s=JSON.stringify(e);return i===t.findIndex((t=>JSON.stringify(t)===s))})),h=(t,e,i,s,r,o,h=0)=>{const n=[];let l=0,c=0,p=0,f=0,u=0,d=0,a=0,g=0,k=o-r;if(1!==h||abs(k)<HALF_PI){let o=cos(k/2),h=sin(k/2),n=o,w=0-h,y=(4-o)/3,S;S=0!==h?(1-o)*(3-o)/(3*h):0;let C=y,m=0-S,v=r+k/2,b=cos(v),F=sin(v),x,z,E,W,D,M,A,P,B=i/2,R=s/2;a=t+B*(b*o-F*h),g=e+R*(F*o+b*h),u=t+B*(b*y-F*S),d=e+R*(F*y+b*S),p=t+B*(b*C-F*m),f=e+R*(F*C+b*m),l=t+B*(b*n-F*w),c=e+R*(F*n+b*w)}return 1!==h&&(vertex(l,c),n.push({type:"vertex",points:[l,c]})),bezierVertex(p,f,u,d,a,g),n.push({type:"bezierVertex",points:[p,f,u,d,a,g]}),n};var n=(t,e)=>{const i=[],s=Math.ceil(e/t.length),r=1/s;for(let e=0;e<t.length;e+=1)for(let o=0;o<s;o+=1){const s=color(t[e]),h=color(t[(e+1)%t.length]);i.push(lerpColor(s,h,(o+1)*r))}return i};const l=void 0;var c=(t,e,i,s,r,o,h)=>{const n=([t,e])=>[[t,e],[t+1,e],[t+1,e+1],[t,e+1]],l=[];let c=[t,e];l.push(n(c));let p=0;const f=(t,e)=>(p+=1,p>4&&(c=o(l)[0],p=0),0===l.filter((([[i,s]])=>t===i&&e===s)).length);let u=1;const d={left:"right",up:"down",right:"left",down:"up"},a=h?o([["dr","dl","ul","ur"],["left","up","right","down"]]):["left","up","right","down","ul","ur","dr","dl"];let g=null;for(;u<i;){const[t,e]=c;let i=[...a];const h=a.indexOf(d[g]);h>-1&&i.splice(h,1);const p=o(i);g=p,"up"===p?e-1>=0&&f(t,e-1)&&(c=[t,e-1],l.push(n(c)),u+=1):"down"===p?e+1<1*r&&f(t,e+1)&&(c=[t,e+1],l.push(n(c)),u+=1):"left"===p?t-1>=0&&f(t-1,e)&&(c=[t-1,e],l.push(n(c)),u+=1):"right"===p?t+1<1*s&&f(t+1,e)&&(c=[t+1,e],l.push(n(c)),u+=1):"ul"===p?t-1>=0&&e-1>=0&&f(t-1,e-1)&&(c=[t-1,e-1],l.push(n(c)),u+=1):"ur"===p?t+1<1*s&&e-1>=0&&f(t+1,e-1)&&(c=[t+1,e-1],l.push(n(c)),u+=1):"dr"===p?t+1<1*s&&e+1<1*r&&f(t+1,e+1)&&(c=[t+1,e+1],l.push(n(c)),u+=1):"dl"===p&&t-1>=0&&e+1<1*r&&f(t-1,e+1)&&(c=[t-1,e+1],l.push(n(c)),u+=1)}return l};const p=void 0;var f=(t,e,i)=>{const s=t=>t.filter((([e,i])=>{const s=t.filter((([t,s])=>e===t&&i===s+1)).length>0,r=t.filter((([t,s])=>e===t+1&&i===s)).length>0,o=t.filter((([t,s])=>e===t&&i===s-1)).length>0,h=t.filter((([t,s])=>e===t-1&&i===s)).length>0,n=t.filter((([t,s])=>e===t-1&&i===s+1)).length>0,l=t.filter((([t,s])=>e===t+1&&i===s+1)).length>0,c=t.filter((([t,s])=>e===t+1&&i===s-1)).length>0,p=t.filter((([t,s])=>e===t-1&&i===s-1)).length>0;return!(s&&r&&o&&h&&n&&l&&c&&p)}));let r;const n=void 0,l=(t=>{let e=(t=t.sort((([t,e],[i,s])=>t+e-(i+s))))[0];const i=[e];let s=[...t];const r=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,n]=r[o];if(h===t&&n===s-1)return e=[h,n],i.push(e),!0}},o=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,n]=r[o];if(h===t+1&&n===s)return e=[h,n],i.push(e),!0}},h=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,n]=r[o];if(h===t&&n===s+1)return e=[h,n],i.push(e),!0}},n=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,n]=r[o];if(h===t-1&&n===s)return e=[h,n],i.push(e),!0}},l=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,n]=r[o];if(h===t-1&&n===s-1)return e=[h,n],i.push(e),!0}},c=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,n]=r[o];if(h===t+1&&n===s-1)return e=[h,n],i.push(e),!0}},p=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,n]=r[o];if(h===t+1&&n===s+1)return e=[h,n],i.push(e),!0}},f=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,n]=r[o];if(h===t-1&&n===s+1)return e=[h,n],i.push(e),!0}};let u=[{func:n,type:"left"},{func:r,type:"up"},{func:o,type:"right"},{func:l,type:"ul"},{func:c,type:"ur"}],d=null,a="null",g=!1;for(;"null"===a||e[0]!==t[0][0]||e[1]!==t[0][1];)"up"===a?u=[{func:n,type:"left"},{func:r,type:"up"},{func:o,type:"right"},{func:l,type:"ul"},{func:c,type:"ur"}]:"ur"===a?u=[{func:r,type:"up"},{func:o,type:"right"},{func:l,type:"ul"},{func:c,type:"ur"},{func:p,type:"dr"}]:"right"===a?u=[{func:r,type:"up"},{func:o,type:"right"},{func:h,type:"down"},{func:c,type:"ur"},{func:p,type:"dr"}]:"dr"===a?u=[{func:o,type:"right"},{func:h,type:"down"},{func:c,type:"ur"},{func:p,type:"dr"},{func:f,type:"dl"}]:"down"===a?u=[{func:o,type:"right"},{func:h,type:"down"},{func:n,type:"left"},{func:p,type:"dr"},{func:f,type:"dl"}]:"dl"===a?u=[{func:h,type:"down"},{func:n,type:"left"},{func:p,type:"dr"},{func:f,type:"dl"},{func:l,type:"ul"}]:"left"===a?u=[{func:h,type:"down"},{func:n,type:"left"},{func:r,type:"up"},{func:f,type:"dl"},{func:l,type:"ul"}]:"ul"===a&&(u=[{func:n,type:"left"},{func:r,type:"up"},{func:f,type:"dl"},{func:l,type:"ul"},{func:c,type:"ur"}]),d=u[0].func(...e,s),a=u[0].type,d||(d=u[1].func(...e,s),a=u[1].type),d||(d=u[2].func(...e,s),a=u[2].type),d||(d=u[3].func(...e,s),a=u[3].type),d||(d=u[4].func(...e,s),a=u[4].type),d=null;return i})(o(t.flat()));l.pop();let c=[],p=[],f=[];for(let i=0;i<t.length;i+=1)p.push([t[i][0][0]*e+e/2,t[i][0][1]*e+e/2]);for(let t=0;t<l.length;t+=1){let[s,r]=l[t],[o,n]=l[(t+l.length-1)%l.length],[p,u]=l[(t+1)%l.length];const d=s*e,a=r*i,g=e,k=i;o===s&&n===r+1&&p===s+1&&u===r?(c.push([d+e/2,a+i/2,g,k,180,270]),f.push(...h(d+e/2,a+i/2,e,i,180,270))):o===s-1&&n===r&&p===s&&u===r+1?(c.push([d-e/2,a+i/2,g,k,-90,0]),f.push(...h(d-e/2,a+i/2,e,i,-90,0))):o===s&&n===r-1&&p===s-1&&u===r?(c.push([d-e/2,a-i/2,g,k,0,90]),f.push(...h(d-e/2,a-i/2,e,i,0,90))):o===s+1&&n===r&&p===s&&u===r-1?(c.push([d+e/2,a-i/2,g,k,90,180]),f.push(...h(d+e/2,a-i/2,e,i,90,180))):o===s&&n===r-1&&p===s+1&&u===r?f.push(...h(d+e/2,a-i/2,e,i,180,90)):o===s+1&&n===r&&p===s&&u===r+1?f.push(...h(d+e/2,a+i/2,e,i,270,180)):o===s&&n===r+1&&p===s-1&&u===r?f.push(...h(d-e/2,a+i/2,e,i,0,-90)):o===s-1&&n===r&&p===s&&u===r-1?f.push(...h(d-e/2,a-i/2,e,i,90,0)):f.push({type:"vertex",points:[d,a]})}return{finalPoints:f,arcs:c,centers:p}};class u{constructor(t,e,i,s,r,o,h,n,l,c,p,f,u,d,a,g,k,w,y,S,C,m,v,b,F){this.offsetX=t,this.offsetY=e,this.strokeSize=width/1e3/i*(10*k),this.arcCount=480/i,this.points=s,this.arcs=r,this.centers=o,this.fillColor=h,this.strokeColor=n,this.thirdColor=l,this.filled=c,this.spirals=p,this.circles=f,this.doubleStroke=u,this.tripleStroke=d,this.quadrupleStroke=a,this.altP=g,this.miniCircle=w,this.circleFullSize=c&&y,this.arc=S(this.arcs),this.metro=C,this.d1=m,this.d2=v,this.offset=b,this.hidden=F}drawShape(t){t.beginShape(),this.points.forEach((({type:e,points:i})=>{"bezierVertex"===e?t.bezierVertex(...i):"vertex"===e&&t.vertex(...i)})),t.endShape(CLOSE),this.metro&&(t.push(),t.drawingContext.setLineDash([]),t.noFill(),this.points.forEach((({type:e,points:i})=>{"vertex"===e&&t.circle(...i,this.strokeSize)})),t.pop())}draw(t){if(t.push(),t.translate(this.offsetX,this.offsetY),t.push(),t.strokeWeight(2*this.strokeSize),this.filled?t.fill(this.fillColor):(t.stroke(this.strokeColor),t.noFill()),this.drawShape(t),this.altP&&(t.drawingContext.clip(),t.image(this.altP,-this.offsetX,-this.offsetY)),t.pop(),t.push(),t.stroke(this.strokeColor),t.strokeWeight(2*this.strokeSize),t.noFill(),this.drawShape(t),this.doubleStroke&&(t.strokeWeight(this.strokeSize/2),t.stroke(this.fillColor),this.drawShape(t)),this.hidden&&(t.drawingContext.setLineDash([this.d1,this.d2]),t.drawingContext.lineDashOffset=this.offset),this.tripleStroke&&(t.strokeWeight(this.strokeSize),t.stroke(this.fillColor),this.drawShape(t),t.strokeWeight(this.strokeSize/2),t.stroke(this.thirdColor),this.drawShape(t)),this.quadrupleStroke&&(t.strokeWeight(1.5*this.strokeSize),t.stroke(this.fillColor),this.drawShape(t),t.strokeWeight(this.strokeSize),t.stroke(this.thirdColor),this.drawShape(t),t.strokeWeight(this.strokeSize/2),t.stroke(this.strokeColor),this.drawShape(t)),t.pop(),this.spirals)t.push(),t.stroke(this.strokeColor),t.noFill(),this.arcs.forEach((([e,i,s,r,o,h],n)=>{if(0===n){const r=4;t.push(),t.noStroke(),t.fill(this.fillColor),t.circle(e,i,s/2),t.pop();for(let n=0;n<this.arcCount;n+=1){const l=s/2-n*s/2/this.arcCount,c=o+n*(360*r/this.arcCount),p=h+n*(360*r/this.arcCount);t.arc(e,i,l,l,c,p)}}})),t.pop();else if(this.circles){t.push(),this.altP?t.noStroke():(t.strokeWeight(2*this.strokeSize),this.circleFullSize&&(t.strokeWeight(this.strokeSize),this.tripleStroke||this.quadrupleStroke?t.strokeWeight(this.strokeSize/4):this.doubleStroke&&t.strokeWeight(this.strokeSize/2)),t.stroke(this.fillColor)),t.fill(this.strokeColor);let e=5;this.tripleStroke?e=3:this.doubleStroke&&(e=2.5),this.fillColor.levels[0]===this.thirdColor.levels[0]&&(e=4);const[i,s,r]=this.arc,o=this.circleFullSize?r-this.strokeSize*e:r/2;t.circle(i,s,o,o),this.miniCircle&&(t.fill(this.thirdColor),t.circle(i,s,o/2,o/2)),t.pop()}t.pop()}}var d=u;class a{constructor(t,e,i,s,r,o,h,n,l,c,p,f){this.p=t,this.x=e,this.y=i,this.fillColor=r,this.color=o,this.thirdColor=h,this.size=s,this.M=width/1e3/n*(10*l),this.stroked=c,this.miniCircle=p,this.empty=f}draw(){this.p.push(),this.stroked?(this.p.strokeWeight(2*this.M),this.p.stroke(this.fillColor)):this.p.noStroke(),this.p.fill(this.color),this.empty&&this.stroked&&noFill(),this.p.circle(this.x,this.y,this.size),th
is.miniCircle&&(this.p.fill(this.thirdColor),this.p.circle(this.x,this.y,this.size/2,this.size/2)),this.p.pop()}}var g=a;let k;const w=new URLSearchParams(window.location.search),y=Object.fromEntries(w.entries());let S,C;const m=1;let b,v,F,z,x,E,W,D,M;function setup(){v=createCanvas(S,C);const{pd:t=null}=y;t&&pixelDensity(Number(t)),D=new Array(5).fill(null).map((()=>createGraphics(S,C)));const[i,r,o,h]=D;M=D[4],angleMode(DEGREES),M.angleMode(DEGREES);const n=width/1e3;b=()=>{const{rnd:t,rangeFloor:c,pick:u,weighted:a}=e(tokenData.hash),calculateFeatures=()=>{const e={},i=c(s.length);e.palette=s[i],e.grid=[2,3,4,5,6][a([.05,.5,1,1,.2])],e.shapes=["min","mid","max"][a([1,.5,.3])];const r=t()>.95&&u([1,2]);return e.doubleStrokes=1===r,e.tripleStrokes=2===r,e.zoomed="min"!==e.shapes&&t()>.99,e.bundle=t()>.98,e.spirals=t()>.995,e.simple=t()>.9,e.miniature=!e.zoomed&&t()>.95,e.everyPoint=t()>.85,e.metro=t()>.95,e.fixedShapes=!!(e.everyPoint||t()>.9)&&c(2,e.grid+1),e.hidden=t()>.95,e.stepsRange=u(["max","mid","full"]),e.backRects1=t()>.2,e.backRects2=t()>.2,e},{palette:k,grid:w,shapes:y,doubleStrokes:S,tripleStrokes:C,zoomed:m,bundle:b,spirals:v,simple:A,fixedShapes:P,miniature:B,metro:R,everyPoint:H,stepsRange:L,backRects1:O,backRects2:N,hidden:I}=calculateFeatures(),V=w,q=w,G=l(k,1*k.length);E=G[0],x=G[1],W=G[2];const X=B?.3:.1,Y=width*X,J=height*X,U=[2,4,8][a([1,1,.1])],$=void 0,j=(width-2*Y)/(V*U),_=j;let K=m?4:1;const Q=V*K,T=q*K,Z=(width-2*Y)/Q,tt=Z,et={2:1.4,3:1.2,4:1,5:.8,6:.6};let it=[];for(let t=0;t<Q;t+=1)for(let e=0;e<T;e+=1)it.push([t,e]);const st=[];z=[];for(let e=Y;e<=Math.ceil(width-Y-1);e+=Z)for(let i=J;i<=Math.ceil(height-J-1);i+=Z){const s=e+Z/2,r=i+tt/2;let o="min"===y?.5:.3;w<4&&(o=.05),t()>o&&z.push(new g(M,s,r,Z/2,G[u([1,2])],E,W,K,et[w],t()>.5,t()>.5,t()>.5))}const rt={2:3,3:5,4:9,5:9,6:9},ot={min:1,mid:3,max:10},ht="min"===y?w:V*K*ot[y];if(H)for(let e=0;e<it.length;e+=1){const i=void 0;let s;s=t()>.5?e%2==0?P:1:P,s=2===w?2:s,st.push(p(...it[e],s,Q,T,u,P<4))}else for(let t=0;t<ht;t+=1){let t;t="full"===L?c(1,rt[w]):"mid"===L?c(Math.ceil(rt[w]/2),rt[w]):rt[w],P&&(t=P),st.push(p(...u(it),t,Q,T,u))}const lt=u([5,10,20]),nt=u([1,2,4]);F=st.map(((e,s)=>{const{finalPoints:l,centers:n,arcs:p}=f(e,Z,tt);let c=t()>.5,a=!c&&t()>.4;(b||s>st.length-3)&&(c=!1,a=!1);let g=t()>.1;s<st.length-3&&s>st.length-6&&(g=!0);let k=!1;v&&s>st.length-ot[y]*w&&(k=!0);const m=u([i,r,o,h]);let F=t()>.5,z=!F&&t()>.5,x=!z&&!F&&t()>.5;S&&(F=!0,z=!1),C&&(F=!1,z=!0),c||a||(g=!1),A&&(a=!1);const D=PI*Z,M=D/lt,P=M*nt,B=t()*D*n.length;return new d(Y,J,K,l,p,n,G[u([1,2])],E,u([W,E]),c,k,g,F,z,x,a&&m,et[w],t()>.9,!a&&t()>.6,u,R,M,P,B,I)})),background(x),D.forEach((t=>{t.background(x)}));const pt=void 0,ct=et[w]*n;for(let t=Y;t<Math.ceil(width-Y-1);t+=j)for(let e=J;e<Math.ceil(height-J-1);e+=j)i.push(),i.noFill(),i.strokeWeight(2.5*ct/(U/2)),i.stroke(E),i.rect(t,e,j,j),i.pop();for(let t=Y;t<Math.ceil(width-Y-1);t+=j/2)for(let e=J;e<Math.ceil(height-J-1);e+=j/2)r.push(),r.noFill(),r.strokeWeight(1.25*ct/(U/2)),r.stroke(E),r.rect(t,e,j,j),r.pop();for(let e=Y;e<Math.ceil(width-Y-1);e+=j/.5)for(let i=J;i<Math.ceil(height-J-1);i+=j/.5)O&&(o.push(),o.fill(G[2]),o.strokeWeight(5*ct/(U/2)),o.stroke(E),o.rect(e,i,2*j,2*j),o.pop()),t()>.95&&(o.push(),o.noStroke(),o.strokeWeight(5*ct/(U/2)),o.stroke(O?x:W),o.fill(E),o.circle(e+j,i+_,j),o.pop());for(let e=Y;e<Math.ceil(width-Y-j);e+=j/.5)for(let i=J;i<Math.ceil(height-J-j);i+=j/.5)N&&(h.push(),h.fill(G[1]),h.strokeWeight(5*ct/(U/2)),h.stroke(E),h.rect(e,i,2*j,2*j),h.pop()),t()>.95&&(h.push(),h.noStroke(),h.strokeWeight(5*ct/(U/2)),h.stroke(E),h.fill(W),h.circle(e+j,i+_,j),h.pop());z.forEach((t=>{t.draw()})),F.forEach((t=>{t.draw(M)})),image(M,0,0)},b()}1*window.innerHeight>=window.innerWidth?(S=window.innerWidth,C=window.innerWidth/1):(C=window.innerHeight,S=1*window.innerHeight);let A=!0;const P=[1,2,3,4,5,6,7,8,9];function windowResized(){const t=void 0,e=v.canvas.style;let i,s;1*window.innerHeight>=window.innerWidth?(i=window.innerWidth,s=window.innerWidth/1):(s=window.innerHeight,i=1*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${s}px`}window.addEventListener("keydown",(t=>{P.includes(Number(t.key))&&(pixelDensity(Number(t.key)),b()),"s"===t.key&&saveCanvas(tokenData.hash,"png")}));
const t=void 0;var e=t=>{const e=Uint32Array.from([0,0,0,0].map(((e,i)=>parseInt(t.substr(8*i+2,8),16)))),i=()=>{let t,i=e[3];return e[3]=e[2],e[2]=e[1],e[1]=t=e[0],i^=i<<11,i^=i>>>8,e[0]=i^t^t>>>19,e[0]/4294967296},s=(t,e)=>e?i()*(e-t)+t:i()*t,r=(t,e)=>Math.floor(s(t,e)),o=t=>t.length?t[r(0,t.length)]:void 0,h=t=>{let e=t.reduce(((t,e)=>t+e)),s=i()*e;for(let e=0;e<t.length;e++){if(s<t[e])return e;s-=t[e]}return 0};return{rnd:i,rangeFloor:r,pick:o,weighted:h}};const i=void 0;var s=[["#E26D02","#252926","#E5DDC1"],["#191438","#E51A23","#EDDFDB"],["#FEC400","#33201B","#5A5B64"],["#F30209","#0C0AAD","#F4FCF8"],["#7A64D8","#E4FE02","#161312"],["#efece9","#090906","#efece9"],["#181a1e","#fffaff","#181a1e"],["#D7A1E7","#4406D2","#ECEDE9"],["#B5D6F4","#023BA5","#F4F5F4"],["#f39237","#191923","#fbfef9"],["#DB2800","#012631","#FCFCD6"],["#1268BF","#100C29","#FBEFD7"],["#41aa6d","#262525","#eaefea"],["#B51612","#0F0F0C","#e3e3df"],["#0d0b0b","#d80056","#ecedef"],["#b80c09","#fbfbff","#040f16"],["#3e92cc","#fffaff","#1e1b18"],["#fa110d","#000000","#fec3f0"],["#dd1c1a","#fff1d0","#06aed5"],["#e63946","#f1faee","#1d3557"],["#2b2d42","#edf2f4","#d90429"],["#E4CA18","#0A2349","#0168A7"]];const r=void 0,o=t=>t.filter(((e,i)=>{const s=JSON.stringify(e);return i===t.findIndex((t=>JSON.stringify(t)===s))})),h=(t,e,i,s,r,o,h=0)=>{const l=[];let n=0,p=0,c=0,f=0,u=0,d=0,a=0,g=0,k=o-r;if(1!==h||abs(k)<HALF_PI){let o=cos(k/2),h=sin(k/2),l=o,w=0-h,y=(4-o)/3,S;S=0!==h?(1-o)*(3-o)/(3*h):0;let C=y,m=0-S,b=r+k/2,v=cos(b),F=sin(b),z,x,E,W,D,M,A,P,B=i/2,R=s/2;a=t+B*(v*o-F*h),g=e+R*(F*o+v*h),u=t+B*(v*y-F*S),d=e+R*(F*y+v*S),c=t+B*(v*C-F*m),f=e+R*(F*C+v*m),n=t+B*(v*l-F*w),p=e+R*(F*l+v*w)}return 1!==h&&(vertex(n,p),l.push({type:"vertex",points:[n,p]})),bezierVertex(c,f,u,d,a,g),l.push({type:"bezierVertex",points:[c,f,u,d,a,g]}),l};var l=(t,e)=>{const i=[],s=Math.ceil(e/t.length),r=1/s;for(let e=0;e<t.length;e+=1)for(let o=0;o<s;o+=1){const s=color(t[e]),h=color(t[(e+1)%t.length]);i.push(lerpColor(s,h,(o+1)*r))}return i};const n=void 0;var p=(t,e,i,s,r,o,h)=>{const l=([t,e])=>[[t,e],[t+1,e],[t+1,e+1],[t,e+1]],n=[];let p=[t,e];n.push(l(p));let c=0;const f=(t,e)=>(c+=1,c>4&&(p=o(n)[0],c=0),0===n.filter((([[i,s]])=>t===i&&e===s)).length);let u=1;const d={left:"right",up:"down",right:"left",down:"up"},a=h?o([["dr","dl","ul","ur"],["left","up","right","down"]]):["left","up","right","down","ul","ur","dr","dl"];let g=null;for(;u<i;){const[t,e]=p;let i=[...a];const h=a.indexOf(d[g]);h>-1&&i.splice(h,1);const c=o(i);g=c,"up"===c?e-1>=0&&f(t,e-1)&&(p=[t,e-1],n.push(l(p)),u+=1):"down"===c?e+1<1*r&&f(t,e+1)&&(p=[t,e+1],n.push(l(p)),u+=1):"left"===c?t-1>=0&&f(t-1,e)&&(p=[t-1,e],n.push(l(p)),u+=1):"right"===c?t+1<1*s&&f(t+1,e)&&(p=[t+1,e],n.push(l(p)),u+=1):"ul"===c?t-1>=0&&e-1>=0&&f(t-1,e-1)&&(p=[t-1,e-1],n.push(l(p)),u+=1):"ur"===c?t+1<1*s&&e-1>=0&&f(t+1,e-1)&&(p=[t+1,e-1],n.push(l(p)),u+=1):"dr"===c?t+1<1*s&&e+1<1*r&&f(t+1,e+1)&&(p=[t+1,e+1],n.push(l(p)),u+=1):"dl"===c&&t-1>=0&&e+1<1*r&&f(t-1,e+1)&&(p=[t-1,e+1],n.push(l(p)),u+=1)}return n};const c=void 0;var f=(t,e,i)=>{const s=t=>t.filter((([e,i])=>{const s=t.filter((([t,s])=>e===t&&i===s+1)).length>0,r=t.filter((([t,s])=>e===t+1&&i===s)).length>0,o=t.filter((([t,s])=>e===t&&i===s-1)).length>0,h=t.filter((([t,s])=>e===t-1&&i===s)).length>0,l=t.filter((([t,s])=>e===t-1&&i===s+1)).length>0,n=t.filter((([t,s])=>e===t+1&&i===s+1)).length>0,p=t.filter((([t,s])=>e===t+1&&i===s-1)).length>0,c=t.filter((([t,s])=>e===t-1&&i===s-1)).length>0;return!(s&&r&&o&&h&&l&&n&&p&&c)}));let r;const l=void 0,n=(t=>{let e=(t=t.sort((([t,e],[i,s])=>t+e-(i+s))))[0];const i=[e];let s=[...t];const r=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t&&l===s-1)return e=[h,l],i.push(e),!0}},o=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t+1&&l===s)return e=[h,l],i.push(e),!0}},h=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t&&l===s+1)return e=[h,l],i.push(e),!0}},l=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t-1&&l===s)return e=[h,l],i.push(e),!0}},n=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t-1&&l===s-1)return e=[h,l],i.push(e),!0}},p=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t+1&&l===s-1)return e=[h,l],i.push(e),!0}},c=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t+1&&l===s+1)return e=[h,l],i.push(e),!0}},f=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t-1&&l===s+1)return e=[h,l],i.push(e),!0}};let u=[{func:l,type:"left"},{func:r,type:"up"},{func:o,type:"right"},{func:n,type:"ul"},{func:p,type:"ur"}],d=null,a="null",g=!1;for(;"null"===a||e[0]!==t[0][0]||e[1]!==t[0][1];)"up"===a?u=[{func:l,type:"left"},{func:r,type:"up"},{func:o,type:"right"},{func:n,type:"ul"},{func:p,type:"ur"}]:"ur"===a?u=[{func:r,type:"up"},{func:o,type:"right"},{func:n,type:"ul"},{func:p,type:"ur"},{func:c,type:"dr"}]:"right"===a?u=[{func:r,type:"up"},{func:o,type:"right"},{func:h,type:"down"},{func:p,type:"ur"},{func:c,type:"dr"}]:"dr"===a?u=[{func:o,type:"right"},{func:h,type:"down"},{func:p,type:"ur"},{func:c,type:"dr"},{func:f,type:"dl"}]:"down"===a?u=[{func:o,type:"right"},{func:h,type:"down"},{func:l,type:"left"},{func:c,type:"dr"},{func:f,type:"dl"}]:"dl"===a?u=[{func:h,type:"down"},{func:l,type:"left"},{func:c,type:"dr"},{func:f,type:"dl"},{func:n,type:"ul"}]:"left"===a?u=[{func:h,type:"down"},{func:l,type:"left"},{func:r,type:"up"},{func:f,type:"dl"},{func:n,type:"ul"}]:"ul"===a&&(u=[{func:l,type:"left"},{func:r,type:"up"},{func:f,type:"dl"},{func:n,type:"ul"},{func:p,type:"ur"}]),d=u[0].func(...e,s),a=u[0].type,d||(d=u[1].func(...e,s),a=u[1].type),d||(d=u[2].func(...e,s),a=u[2].type),d||(d=u[3].func(...e,s),a=u[3].type),d||(d=u[4].func(...e,s),a=u[4].type),d=null;return i})(o(t.flat()));n.pop();let p=[],c=[],f=[];for(let i=0;i<t.length;i+=1)c.push([t[i][0][0]*e+e/2,t[i][0][1]*e+e/2]);for(let t=0;t<n.length;t+=1){let[s,r]=n[t],[o,l]=n[(t+n.length-1)%n.length],[c,u]=n[(t+1)%n.length];const d=s*e,a=r*i,g=e,k=i;o===s&&l===r+1&&c===s+1&&u===r?(p.push([d+e/2,a+i/2,g,k,180,270]),f.push(...h(d+e/2,a+i/2,e,i,180,270))):o===s-1&&l===r&&c===s&&u===r+1?(p.push([d-e/2,a+i/2,g,k,-90,0]),f.push(...h(d-e/2,a+i/2,e,i,-90,0))):o===s&&l===r-1&&c===s-1&&u===r?(p.push([d-e/2,a-i/2,g,k,0,90]),f.push(...h(d-e/2,a-i/2,e,i,0,90))):o===s+1&&l===r&&c===s&&u===r-1?(p.push([d+e/2,a-i/2,g,k,90,180]),f.push(...h(d+e/2,a-i/2,e,i,90,180))):o===s&&l===r-1&&c===s+1&&u===r?f.push(...h(d+e/2,a-i/2,e,i,180,90)):o===s+1&&l===r&&c===s&&u===r+1?f.push(...h(d+e/2,a+i/2,e,i,270,180)):o===s&&l===r+1&&c===s-1&&u===r?f.push(...h(d-e/2,a+i/2,e,i,0,-90)):o===s-1&&l===r&&c===s&&u===r-1?f.push(...h(d-e/2,a-i/2,e,i,90,0)):f.push({type:"vertex",points:[d,a]})}return{finalPoints:f,arcs:p,centers:c}};class u{constructor(t,e,i,s,r,o,h,l,n,p,c,f,u,d,a,g,k,w,y,S,C,m,b,v,F){this.offsetX=t,this.offsetY=e,this.strokeSize=width/1e3/i*(10*k),this.arcCount=480/i,this.points=s,this.arcs=r,this.centers=o,this.fillColor=h,this.strokeColor=l,this.thirdColor=n,this.filled=p,this.spirals=c,this.circles=f,this.doubleStroke=u,this.tripleStroke=d,this.quadrupleStroke=a,this.altP=g,this.miniCircle=w,this.circleFullSize=p&&y,this.arc=S(this.arcs),this.metro=C,this.d1=m,this.d2=b,this.offset=v,this.hidden=F}drawShape(t){t.beginShape(),this.points.forEach((({type:e,points:i})=>{"bezierVertex"===e?t.bezierVertex(...i):"vertex"===e&&t.vertex(...i)})),t.endShape(CLOSE),this.metro&&(t.push(),t.drawingContext.setLineDash([]),t.noFill(),this.points.forEach((({type:e,points:i})=>{"vertex"===e&&t.circle(...i,this.strokeSize)})),t.pop())}draw(t){if(t.push(),t.translate(this.offsetX,this.offsetY),t.push(),t.strokeWeight(2*this.strokeSize),this.filled?t.fill(this.fillColor):(t.stroke(this.strokeColor),t.noFill()),this.drawShape(t),this.altP&&(t.drawingContext.clip(),t.image(this.altP,-this.offsetX,-this.offsetY)),t.pop(),t.push(),t.stroke(this.strokeColor),t.strokeWeight(2*this.strokeSize),t.noFill(),this.drawShape(t),this.doubleStroke&&(t.strokeWeight(this.strokeSize/2),t.stroke(this.fillColor),this.drawShape(t)),this.hidden&&(t.drawingContext.setLineDash([this.d1,this.d2]),t.drawingContext.lineDashOffset=this.offset),this.tripleStroke&&(t.strokeWeight(this.strokeSize),t.stroke(this.fillColor),this.drawShape(t),t.strokeWeight(this.strokeSize/2),t.stroke(this.thirdColor),this.drawShape(t)),this.quadrupleStroke&&(t.strokeWeight(1.5*this.strokeSize),t.stroke(this.fillColor),this.drawShape(t),t.strokeWeight(this.strokeSize),t.stroke(this.thirdColor),this.drawShape(t),t.strokeWeight(this.strokeSize/2),t.stroke(this.strokeColor),this.drawShape(t)),t.pop(),this.spirals)t.push(),t.stroke(this.strokeColor),t.noFill(),this.arcs.forEach((([e,i,s,r,o,h],l)=>{if(0===l){const r=4;t.push(),t.noStroke(),t.fill(this.fillColor),t.circle(e,i,s/2),t.pop();for(let l=0;l<this.arcCount;l+=1){const n=s/2-l*s/2/this.arcCount,p=o+l*(360*r/this.arcCount),c=h+l*(360*r/this.arcCount);t.arc(e,i,n,n,p,c)}}})),t.pop();else if(this.circles){t.push(),this.altP?t.noStroke():(t.strokeWeight(2*this.strokeSize),this.circleFullSize&&(t.strokeWeight(this.strokeSize),this.tripleStroke||this.quadrupleStroke?t.strokeWeight(this.strokeSize/4):this.doubleStroke&&t.strokeWeight(this.strokeSize/2)),t.stroke(this.fillColor)),t.fill(this.strokeColor);let e=5;this.tripleStroke?e=3:this.doubleStroke&&(e=2.5),this.fillColor.levels[0]===this.thirdColor.levels[0]&&(e=4);const[i,s,r]=this.arc,o=this.circleFullSize?r-this.strokeSize*e:r/2;t.circle(i,s,o,o),this.miniCircle&&(t.fill(this.thirdColor),t.circle(i,s,o/2,o/2)),t.pop()}t.pop()}}var d=u;class a{constructor(t,e,i,s,r,o,h,l,n,p,c,f){this.p=t,this.x=e,this.y=i,this.fillColor=r,this.color=o,this.thirdColor=h,this.size=s,this.M=width/1e3/l*(10*n),this.stroked=p,this.miniCircle=c,this.empty=f}draw(){this.p.push(),this.stroked?(this.p.strokeWeight(2*this.M),this.p.stroke(this.fillColor)):this.p.noStroke(),this.p.fill(this.color),this.empty&&this.stroked&&noFill(),this.p.circle(this.x,this.y,this.size),th
const t=void 0;var e=t=>{const e=Uint32Array.from([0,0,0,0].map(((e,i)=>parseInt(t.substr(8*i+2,8),16)))),i=()=>{let t,i=e[3];return e[3]=e[2],e[2]=e[1],e[1]=t=e[0],i^=i<<11,i^=i>>>8,e[0]=i^t^t>>>19,e[0]/4294967296},s=(t,e)=>e?i()*(e-t)+t:i()*t,r=(t,e)=>Math.floor(s(t,e)),o=t=>t.length?t[r(0,t.length)]:void 0,h=t=>{let e=t.reduce(((t,e)=>t+e)),s=i()*e;for(let e=0;e<t.length;e++){if(s<t[e])return e;s-=t[e]}return 0};return{rnd:i,rangeFloor:r,pick:o,weighted:h}};const i=void 0;var s=[["#E26D02","#252926","#E5DDC1"],["#191438","#E51A23","#EDDFDB"],["#FEC400","#33201B","#5A5B64"],["#F30209","#0C0AAD","#F4FCF8"],["#7A64D8","#E4FE02","#161312"],["#efece9","#090906","#efece9"],["#181a1e","#fffaff","#181a1e"],["#D7A1E7","#4406D2","#ECEDE9"],["#B5D6F4","#023BA5","#F4F5F4"],["#f39237","#191923","#fbfef9"],["#DB2800","#012631","#FCFCD6"],["#1268BF","#100C29","#FBEFD7"],["#41aa6d","#262525","#eaefea"],["#B51612","#0F0F0C","#e3e3df"],["#0d0b0b","#d80056","#ecedef"],["#b80c09","#fbfbff","#040f16"],["#3e92cc","#fffaff","#1e1b18"],["#fa110d","#000000","#fec3f0"],["#dd1c1a","#fff1d0","#06aed5"],["#e63946","#f1faee","#1d3557"],["#2b2d42","#edf2f4","#d90429"],["#E4CA18","#0A2349","#0168A7"]];const r=void 0,o=t=>t.filter(((e,i)=>{const s=JSON.stringify(e);return i===t.findIndex((t=>JSON.stringify(t)===s))})),h=(t,e,i,s,r,o,h=0)=>{const l=[];let n=0,c=0,f=0,p=0,u=0,d=0,a=0,g=0,k=o-r;if(1!==h||abs(k)<HALF_PI){let o=cos(k/2),h=sin(k/2),l=o,w=0-h,y=(4-o)/3,S;S=0!==h?(1-o)*(3-o)/(3*h):0;let C=y,m=0-S,b=r+k/2,v=cos(b),F=sin(b),x,z,E,D,W,M,A,P,B=i/2,R=s/2;a=t+B*(v*o-F*h),g=e+R*(F*o+v*h),u=t+B*(v*y-F*S),d=e+R*(F*y+v*S),f=t+B*(v*C-F*m),p=e+R*(F*C+v*m),n=t+B*(v*l-F*w),c=e+R*(F*l+v*w)}return 1!==h&&(vertex(n,c),l.push({type:"vertex",points:[n,c]})),bezierVertex(f,p,u,d,a,g),l.push({type:"bezierVertex",points:[f,p,u,d,a,g]}),l};var l=(t,e)=>{const i=[],s=Math.ceil(e/t.length),r=1/s;for(let e=0;e<t.length;e+=1)for(let o=0;o<s;o+=1){const s=color(t[e]),h=color(t[(e+1)%t.length]);i.push(lerpColor(s,h,(o+1)*r))}return i};const n=void 0;var c=(t,e,i,s,r,o,h)=>{const l=([t,e])=>[[t,e],[t+1,e],[t+1,e+1],[t,e+1]],n=[];let c=[t,e];n.push(l(c));let f=0;const p=(t,e)=>(f+=1,f>4&&(c=o(n)[0],f=0),0===n.filter((([[i,s]])=>t===i&&e===s)).length);let u=1;const d={left:"right",up:"down",right:"left",down:"up"},a=h?o([["dr","dl","ul","ur"],["left","up","right","down"]]):["left","up","right","down","ul","ur","dr","dl"];let g=null;for(;u<i;){const[t,e]=c;let i=[...a];const h=a.indexOf(d[g]);h>-1&&i.splice(h,1);const f=o(i);g=f,"up"===f?e-1>=0&&p(t,e-1)&&(c=[t,e-1],n.push(l(c)),u+=1):"down"===f?e+1<1*r&&p(t,e+1)&&(c=[t,e+1],n.push(l(c)),u+=1):"left"===f?t-1>=0&&p(t-1,e)&&(c=[t-1,e],n.push(l(c)),u+=1):"right"===f?t+1<1*s&&p(t+1,e)&&(c=[t+1,e],n.push(l(c)),u+=1):"ul"===f?t-1>=0&&e-1>=0&&p(t-1,e-1)&&(c=[t-1,e-1],n.push(l(c)),u+=1):"ur"===f?t+1<1*s&&e-1>=0&&p(t+1,e-1)&&(c=[t+1,e-1],n.push(l(c)),u+=1):"dr"===f?t+1<1*s&&e+1<1*r&&p(t+1,e+1)&&(c=[t+1,e+1],n.push(l(c)),u+=1):"dl"===f&&t-1>=0&&e+1<1*r&&p(t-1,e+1)&&(c=[t-1,e+1],n.push(l(c)),u+=1)}return n};const f=void 0;var p=(t,e,i)=>{const s=t=>t.filter((([e,i])=>{const s=t.filter((([t,s])=>e===t&&i===s+1)).length>0,r=t.filter((([t,s])=>e===t+1&&i===s)).length>0,o=t.filter((([t,s])=>e===t&&i===s-1)).length>0,h=t.filter((([t,s])=>e===t-1&&i===s)).length>0,l=t.filter((([t,s])=>e===t-1&&i===s+1)).length>0,n=t.filter((([t,s])=>e===t+1&&i===s+1)).length>0,c=t.filter((([t,s])=>e===t+1&&i===s-1)).length>0,f=t.filter((([t,s])=>e===t-1&&i===s-1)).length>0;return!(s&&r&&o&&h&&l&&n&&c&&f)}));let r;const l=void 0,n=(t=>{let e=(t=t.sort((([t,e],[i,s])=>t+e-(i+s))))[0];const i=[e];let s=[...t];const r=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t&&l===s-1)return e=[h,l],i.push(e),!0}},o=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t+1&&l===s)return e=[h,l],i.push(e),!0}},h=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t&&l===s+1)return e=[h,l],i.push(e),!0}},l=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t-1&&l===s)return e=[h,l],i.push(e),!0}},n=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t-1&&l===s-1)return e=[h,l],i.push(e),!0}},c=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t+1&&l===s-1)return e=[h,l],i.push(e),!0}},f=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t+1&&l===s+1)return e=[h,l],i.push(e),!0}},p=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t-1&&l===s+1)return e=[h,l],i.push(e),!0}};let u=[{func:l,type:"left"},{func:r,type:"up"},{func:o,type:"right"},{func:n,type:"ul"},{func:c,type:"ur"}],d=null,a="null",g=!1;for(;"null"===a||e[0]!==t[0][0]||e[1]!==t[0][1];)"up"===a?u=[{func:l,type:"left"},{func:r,type:"up"},{func:o,type:"right"},{func:n,type:"ul"},{func:c,type:"ur"}]:"ur"===a?u=[{func:r,type:"up"},{func:o,type:"right"},{func:n,type:"ul"},{func:c,type:"ur"},{func:f,type:"dr"}]:"right"===a?u=[{func:r,type:"up"},{func:o,type:"right"},{func:h,type:"down"},{func:c,type:"ur"},{func:f,type:"dr"}]:"dr"===a?u=[{func:o,type:"right"},{func:h,type:"down"},{func:c,type:"ur"},{func:f,type:"dr"},{func:p,type:"dl"}]:"down"===a?u=[{func:o,type:"right"},{func:h,type:"down"},{func:l,type:"left"},{func:f,type:"dr"},{func:p,type:"dl"}]:"dl"===a?u=[{func:h,type:"down"},{func:l,type:"left"},{func:f,type:"dr"},{func:p,type:"dl"},{func:n,type:"ul"}]:"left"===a?u=[{func:h,type:"down"},{func:l,type:"left"},{func:r,type:"up"},{func:p,type:"dl"},{func:n,type:"ul"}]:"ul"===a&&(u=[{func:l,type:"left"},{func:r,type:"up"},{func:p,type:"dl"},{func:n,type:"ul"},{func:c,type:"ur"}]),d=u[0].func(...e,s),a=u[0].type,d||(d=u[1].func(...e,s),a=u[1].type),d||(d=u[2].func(...e,s),a=u[2].type),d||(d=u[3].func(...e,s),a=u[3].type),d||(d=u[4].func(...e,s),a=u[4].type),d=null;return i})(o(t.flat()));n.pop();let c=[],f=[],p=[];for(let i=0;i<t.length;i+=1)f.push([t[i][0][0]*e+e/2,t[i][0][1]*e+e/2]);for(let t=0;t<n.length;t+=1){let[s,r]=n[t],[o,l]=n[(t+n.length-1)%n.length],[f,u]=n[(t+1)%n.length];const d=s*e,a=r*i,g=e,k=i;o===s&&l===r+1&&f===s+1&&u===r?(c.push([d+e/2,a+i/2,g,k,180,270]),p.push(...h(d+e/2,a+i/2,e,i,180,270))):o===s-1&&l===r&&f===s&&u===r+1?(c.push([d-e/2,a+i/2,g,k,-90,0]),p.push(...h(d-e/2,a+i/2,e,i,-90,0))):o===s&&l===r-1&&f===s-1&&u===r?(c.push([d-e/2,a-i/2,g,k,0,90]),p.push(...h(d-e/2,a-i/2,e,i,0,90))):o===s+1&&l===r&&f===s&&u===r-1?(c.push([d+e/2,a-i/2,g,k,90,180]),p.push(...h(d+e/2,a-i/2,e,i,90,180))):o===s&&l===r-1&&f===s+1&&u===r?p.push(...h(d+e/2,a-i/2,e,i,180,90)):o===s+1&&l===r&&f===s&&u===r+1?p.push(...h(d+e/2,a+i/2,e,i,270,180)):o===s&&l===r+1&&f===s-1&&u===r?p.push(...h(d-e/2,a+i/2,e,i,0,-90)):o===s-1&&l===r&&f===s&&u===r-1?p.push(...h(d-e/2,a-i/2,e,i,90,0)):p.push({type:"vertex",points:[d,a]})}return{finalPoints:p,arcs:c,centers:f}};class u{constructor(t,e,i,s,r,o,h,l,n,c,f,p,u,d,a,g,k,w,y,S,C,m,b,v,F){this.offsetX=t,this.offsetY=e,this.strokeSize=width/1e3/i*(10*k),this.arcCount=480/i,this.points=s,this.arcs=r,this.centers=o,this.fillColor=h,this.strokeColor=l,this.thirdColor=n,this.filled=c,this.spirals=f,this.circles=p,this.doubleStroke=u,this.tripleStroke=d,this.quadrupleStroke=a,this.altP=g,this.miniCircle=w,this.circleFullSize=c&&y,this.arc=S(this.arcs),this.metro=C,this.d1=m,this.d2=b,this.offset=v,this.hidden=F}drawShape(t){t.beginShape(),this.points.forEach((({type:e,points:i})=>{"bezierVertex"===e?t.bezierVertex(...i):"vertex"===e&&t.vertex(...i)})),t.endShape(CLOSE),this.metro&&(t.push(),t.drawingContext.setLineDash([]),t.noFill(),this.points.forEach((({type:e,points:i})=>{"vertex"===e&&t.circle(...i,this.strokeSize)})),t.pop())}draw(t){if(t.push(),t.translate(this.offsetX,this.offsetY),t.push(),t.strokeWeight(2*this.strokeSize),this.filled?t.fill(this.fillColor):(t.stroke(this.strokeColor),t.noFill()),this.drawShape(t),this.altP&&(t.drawingContext.clip(),t.image(this.altP,-this.offsetX,-this.offsetY)),t.pop(),t.push(),t.stroke(this.strokeColor),t.strokeWeight(2*this.strokeSize),t.noFill(),this.drawShape(t),this.doubleStroke&&(t.strokeWeight(this.strokeSize/2),t.stroke(this.fillColor),this.drawShape(t)),this.hidden&&(t.drawingContext.setLineDash([this.d1,this.d2]),t.drawingContext.lineDashOffset=this.offset),this.tripleStroke&&(t.strokeWeight(this.strokeSize),t.stroke(this.fillColor),this.drawShape(t),t.strokeWeight(this.strokeSize/2),t.stroke(this.thirdColor),this.drawShape(t)),this.quadrupleStroke&&(t.strokeWeight(1.5*this.strokeSize),t.stroke(this.fillColor),this.drawShape(t),t.strokeWeight(this.strokeSize),t.stroke(this.thirdColor),this.drawShape(t),t.strokeWeight(this.strokeSize/2),t.stroke(this.strokeColor),this.drawShape(t)),t.pop(),this.spirals)t.push(),t.stroke(this.strokeColor),t.noFill(),this.arcs.forEach((([e,i,s,r,o,h],l)=>{if(0===l){const r=4;t.push(),t.noStroke(),t.fill(this.fillColor),t.circle(e,i,s/2),t.pop();for(let l=0;l<this.arcCount;l+=1){const n=s/2-l*s/2/this.arcCount,c=o+l*(360*r/this.arcCount),f=h+l*(360*r/this.arcCount);t.arc(e,i,n,n,c,f)}}})),t.pop();else if(this.circles){t.push(),this.altP?t.noStroke():(t.strokeWeight(2*this.strokeSize),this.circleFullSize&&(t.strokeWeight(this.strokeSize),this.tripleStroke||this.quadrupleStroke?t.strokeWeight(this.strokeSize/4):this.doubleStroke&&t.strokeWeight(this.strokeSize/2)),t.stroke(this.fillColor)),t.fill(this.strokeColor);let e=5;this.tripleStroke?e=3:this.doubleStroke&&(e=2.5),this.fillColor.levels[0]===this.thirdColor.levels[0]&&(e=4);const[i,s,r]=this.arc,o=this.circleFullSize?r-this.strokeSize*e:r/2;t.circle(i,s,o,o),this.miniCircle&&(t.fill(this.thirdColor),t.circle(i,s,o/2,o/2)),t.pop()}t.pop()}}var d=u;class a{constructor(t,e,i,s,r,o,h,l,n,c,f,p){this.p=t,this.x=e,this.y=i,this.fillColor=r,this.color=o,this.thirdColor=h,this.size=s,this.M=width/1e3/l*(10*n),this.stroked=c,this.miniCircle=f,this.empty=p}draw(){this.p.push(),this.stroked?(this.p.strokeWeight(2*this.M),this.p.stroke(this.fillColor)):this.p.noStroke(),this.p.fill(this.color),this.empty&&this.stroked&&noFill(),this.p.circle(this.x,this.y,this.size),th
is.miniCircle&&(this.p.fill(this.thirdColor),this.p.circle(this.x,this.y,this.size/2,this.size/2)),this.p.pop()}}var g=a;let k;tokenData.hash="0xf5e67ef6c9f94d53fb5066763f6f3596a11ee1e2a34e58acfdc159ea86e2fb4c";const w=new URLSearchParams(window.location.search),y=Object.fromEntries(w.entries());let S,C;const m=1;let b,v,F,x,z,E,D,W,M;function setup(){v=createCanvas(S,C);const{pd:t=null}=y;t&&pixelDensity(Number(t)),W=new Array(5).fill(null).map((()=>createGraphics(S,C)));const[i,r,o,h]=W;M=W[4],angleMode(DEGREES),M.angleMode(DEGREES);const n=width/1e3;b=()=>{const{rnd:t,rangeFloor:f,pick:u,weighted:a}=e(tokenData.hash),calculateFeatures=()=>{const e={},i=f(s.length);e.palette=s[i],e.grid=[2,3,4,5,6][a([.05,.5,1,1,.2])],e.shapes=["min","mid","max"][a([1,.5,.3])];const r=t()>.95&&u([1,2]);return e.doubleStrokes=1===r,e.tripleStrokes=2===r,e.zoomed="min"!==e.shapes&&t()>.99,e.bundle=t()>.98,e.spirals=t()>.995,e.simple=t()>.9,e.miniature=!e.zoomed&&t()>.95,e.everyPoint=t()>.85,e.metro=t()>.95,e.fixedShapes=!!(e.everyPoint||t()>.9)&&f(2,e.grid+1),e.hidden=t()>.95,e.stepsRange=u(["max","mid","full"]),e.backRects1=t()>.2,e.backRects2=t()>.2,e},{palette:k,grid:w,shapes:y,doubleStrokes:S,tripleStrokes:C,zoomed:m,bundle:b,spirals:v,simple:A,fixedShapes:P,miniature:B,metro:R,everyPoint:H,stepsRange:L,backRects1:O,backRects2:N,hidden:I}=calculateFeatures(),V=w,q=w,G=l(k,1*k.length);E=G[0],z=G[1],D=G[2];const X=B?.3:.1,Y=width*X,J=height*X,U=[2,4,8][a([1,1,.1])],$=void 0,j=(width-2*Y)/(V*U),_=j;let K=m?4:1;const Q=V*K,T=q*K,Z=(width-2*Y)/Q,tt=Z,et={2:1.4,3:1.2,4:1,5:.8,6:.6};let it=[];for(let t=0;t<Q;t+=1)for(let e=0;e<T;e+=1)it.push([t,e]);const st=[];x=[];for(let e=Y;e<=Math.ceil(width-Y-1);e+=Z)for(let i=J;i<=Math.ceil(height-J-1);i+=Z){const s=e+Z/2,r=i+tt/2;let o="min"===y?.5:.3;w<4&&(o=.05),t()>o&&x.push(new g(M,s,r,Z/2,G[u([1,2])],E,D,K,et[w],t()>.5,t()>.5,t()>.5))}const rt={2:3,3:5,4:9,5:9,6:9},ot={min:1,mid:3,max:10},ht="min"===y?w:V*K*ot[y];if(H)for(let e=0;e<it.length;e+=1){const i=void 0;let s;s=t()>.5?e%2==0?P:1:P,s=2===w?2:s,st.push(c(...it[e],s,Q,T,u,P<4))}else for(let t=0;t<ht;t+=1){let t;t="full"===L?f(1,rt[w]):"mid"===L?f(Math.ceil(rt[w]/2),rt[w]):rt[w],P&&(t=P),st.push(c(...u(it),t,Q,T,u))}const lt=u([5,10,20]),nt=u([1,2,4]);F=st.map(((e,s)=>{const{finalPoints:l,centers:n,arcs:c}=p(e,Z,tt);let f=t()>.5,a=!f&&t()>.4;(b||s>st.length-3)&&(f=!1,a=!1);let g=t()>.1;s<st.length-3&&s>st.length-6&&(g=!0);let k=!1;v&&s>st.length-ot[y]*w&&(k=!0);const m=u([i,r,o,h]);let F=t()>.5,x=!F&&t()>.5,z=!x&&!F&&t()>.5;S&&(F=!0,x=!1),C&&(F=!1,x=!0),f||a||(g=!1),A&&(a=!1);const W=PI*Z,M=W/lt,P=M*nt,B=t()*W*n.length;return new d(Y,J,K,l,c,n,G[u([1,2])],E,u([D,E]),f,k,g,F,x,z,a&&m,et[w],t()>.9,!a&&t()>.6,u,R,M,P,B,I)})),background(z),W.forEach((t=>{t.background(z)}));const ct=void 0,ft=et[w]*n;for(let t=Y;t<Math.ceil(width-Y-1);t+=j)for(let e=J;e<Math.ceil(height-J-1);e+=j)i.push(),i.noFill(),i.strokeWeight(2.5*ft/(U/2)),i.stroke(E),i.rect(t,e,j,j),i.pop();for(let t=Y;t<Math.ceil(width-Y-1);t+=j/2)for(let e=J;e<Math.ceil(height-J-1);e+=j/2)r.push(),r.noFill(),r.strokeWeight(1.25*ft/(U/2)),r.stroke(E),r.rect(t,e,j,j),r.pop();for(let e=Y;e<Math.ceil(width-Y-1);e+=j/.5)for(let i=J;i<Math.ceil(height-J-1);i+=j/.5)O&&(o.push(),o.fill(G[2]),o.strokeWeight(5*ft/(U/2)),o.stroke(E),o.rect(e,i,2*j,2*j),o.pop()),t()>.95&&(o.push(),o.noStroke(),o.strokeWeight(5*ft/(U/2)),o.stroke(O?z:D),o.fill(E),o.circle(e+j,i+_,j),o.pop());for(let e=Y;e<Math.ceil(width-Y-j);e+=j/.5)for(let i=J;i<Math.ceil(height-J-j);i+=j/.5)N&&(h.push(),h.fill(G[1]),h.strokeWeight(5*ft/(U/2)),h.stroke(E),h.rect(e,i,2*j,2*j),h.pop()),t()>.95&&(h.push(),h.noStroke(),h.strokeWeight(5*ft/(U/2)),h.stroke(E),h.fill(D),h.circle(e+j,i+_,j),h.pop());x.forEach((t=>{t.draw()})),F.forEach((t=>{t.draw(M)})),image(M,0,0)},b()}1*window.innerHeight>=window.innerWidth?(S=window.innerWidth,C=window.innerWidth/1):(C=window.innerHeight,S=1*window.innerHeight);let A=!0;const P=[1,2,3,4,5,6,7,8,9];function windowResized(){const t=void 0,e=v.canvas.style;let i,s;1*window.innerHeight>=window.innerWidth?(i=window.innerWidth,s=window.innerWidth/1):(s=window.innerHeight,i=1*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${s}px`}window.addEventListener("keydown",(t=>{P.includes(Number(t.key))&&(pixelDensity(Number(t.key)),b()),"s"===t.key&&saveCanvas(tokenData.hash,"png")}));
Ieva is an algorithm that creates a shape in a specific sequence from a random point on the grid and smooths out its corners. Overlapping such shapes creates endless possibilities of combinations that will always remain balanced and aesthetically pleasing. The title of this project is the name of the investigator who made a criminal case against me for making art. This name occupied a big part of my mind while working on this project. And I decided that it should be perpetuated in art.
is.miniCircle&&(this.p.fill(this.thirdColor),this.p.circle(this.x,this.y,this.size/2,this.size/2)),this.p.pop()}}var g=a;let k;const w=new URLSearchParams(window.location.search),y=Object.fromEntries(w.entries());let S,C;const m=1;let v,b,F,z,E,x,W,D;1*window.innerHeight>=window.innerWidth?(S=window.innerWidth,C=window.innerWidth/1):(C=window.innerHeight,S=1*window.innerHeight);const{rnd:M,rangeFloor:A,pick:P,weighted:B}=e(tokenData.hash),calculateFeatures=()=>{const t={},e=A(s.length);t.palette=s[e],t.grid=[2,3,4,5,6][B([.05,.5,1,1,.2])],t.shapes=["min","mid","max"][B([1,.5,.3])];const i=M()>.95&&P([1,2]);return t.doubleStrokes=1===i,t.tripleStrokes=2===i,t.zoomed="min"!==t.shapes&&M()>.99,t.bundle=M()>.98,t.spirals=M()>.995,t.simple=M()>.9,t.miniature=!t.zoomed&&M()>.95,t.everyPoint=M()>.85,t.metro=M()>.95,t.fixedShapes=!!(t.everyPoint||M()>.9)&&A(2,t.grid+1),t.hidden=M()>.95,t.stepsRange=P(["max","mid","full"]),t.backRects1=M()>.2,t.backRects2=M()>.2,t};let R;function setup(){b=createCanvas(S,C);const{pd:t=null}=y;t&&pixelDensity(Number(t)),D=new Array(5).fill(null).map((()=>createGraphics(S,C)));const[e,i,s,r]=D;R=D[4],angleMode(DEGREES),R.angleMode(DEGREES);const o=width/1e3;v=()=>{const t=calculateFeatures(),{palette:h,grid:n,shapes:c,doubleStrokes:u,tripleStrokes:a,zoomed:k,bundle:w,spirals:y,simple:S,fixedShapes:C,miniature:m,metro:v,everyPoint:b,stepsRange:H,backRects1:L,backRects2:O,hidden:I}=t,V=n,q=n,G=l(h,1*h.length);x=G[0],E=G[1],W=G[2];const N=m?.3:.1,X=width*N,Y=height*N,J=[2,4,8][B([1,1,.1])],U=void 0,$=(width-2*X)/(V*J),j=$;let _=k?4:1;const K=V*_,Q=q*_,T=(width-2*X)/K,Z=T,tt={2:1.4,3:1.2,4:1,5:.8,6:.6};let et=[];for(let t=0;t<K;t+=1)for(let e=0;e<Q;e+=1)et.push([t,e]);const it=[];z=[];for(let t=X;t<=Math.ceil(width-X-1);t+=T)for(let e=Y;e<=Math.ceil(height-Y-1);e+=T){const i=t+T/2,s=e+Z/2;let r="min"===c?.5:.3;n<4&&(r=.05),M()>r&&z.push(new g(R,i,s,T/2,G[P([1,2])],x,W,_,tt[n],M()>.5,M()>.5,M()>.5))}const st={2:3,3:5,4:9,5:9,6:9},rt={min:1,mid:3,max:10},ot="min"===c?n:V*_*rt[c];if(b)for(let t=0;t<et.length;t+=1){const e=void 0;let i;i=M()>.5?t%2==0?C:1:C,i=2===n?2:i,it.push(p(...et[t],i,K,Q,P,C<4))}else for(let t=0;t<ot;t+=1){let t;t="full"===H?A(1,st[n]):"mid"===H?A(Math.ceil(st[n]/2),st[n]):st[n],C&&(t=C),it.push(p(...P(et),t,K,Q,P))}const ht=P([5,10,20]),lt=P([1,2,4]);F=it.map(((t,o)=>{const{finalPoints:h,centers:l,arcs:p}=f(t,T,Z);let g=M()>.5,k=!g&&M()>.4;(w||o>it.length-3)&&(g=!1,k=!1);let C=M()>.1;o<it.length-3&&o>it.length-6&&(C=!0);let m=!1;y&&o>it.length-rt[c]*n&&(m=!0);const b=P([e,i,s,r]);let F=M()>.5,z=!F&&M()>.5,E=!z&&!F&&M()>.5;u&&(F=!0,z=!1),a&&(F=!1,z=!0),g||k||(C=!1),S&&(k=!1);const D=PI*T,A=D/ht,B=A*lt,R=M()*D*l.length;return new d(X,Y,_,h,p,l,G[P([1,2])],x,P([W,x]),g,m,C,F,z,E,k&&b,tt[n],M()>.9,!k&&M()>.6,P,v,A,B,R,I)})),background(E),D.forEach((t=>{t.background(E)}));const nt=void 0,pt=tt[n]*o;for(let t=X;t<Math.ceil(width-X-1);t+=$)for(let i=Y;i<Math.ceil(height-Y-1);i+=$)e.push(),e.noFill(),e.strokeWeight(2.5*pt/(J/2)),e.stroke(x),e.rect(t,i,$,$),e.pop();for(let t=X;t<Math.ceil(width-X-1);t+=$/2)for(let e=Y;e<Math.ceil(height-Y-1);e+=$/2)i.push(),i.noFill(),i.strokeWeight(1.25*pt/(J/2)),i.stroke(x),i.rect(t,e,$,$),i.pop();for(let t=X;t<Math.ceil(width-X-1);t+=$/.5)for(let e=Y;e<Math.ceil(height-Y-1);e+=$/.5)L&&(s.push(),s.fill(G[2]),s.strokeWeight(5*pt/(J/2)),s.stroke(x),s.rect(t,e,2*$,2*$),s.pop()),M()>.95&&(s.push(),s.noStroke(),s.strokeWeight(5*pt/(J/2)),s.stroke(L?E:W),s.fill(x),s.circle(t+$,e+j,$),s.pop());for(let t=X;t<Math.ceil(width-X-$);t+=$/.5)for(let e=Y;e<Math.ceil(height-Y-$);e+=$/.5)O&&(r.push(),r.fill(G[1]),r.strokeWeight(5*pt/(J/2)),r.stroke(x),r.rect(t,e,2*$,2*$),r.pop()),M()>.95&&(r.push(),r.noStroke(),r.strokeWeight(5*pt/(J/2)),r.stroke(x),r.fill(W),r.circle(t+$,e+j,$),r.pop());z.forEach((t=>{t.draw()})),F.forEach((t=>{t.draw(R)})),image(R,0,0)},v()}let H=!0;function windowResized(){const t=void 0,e=b.canvas.style;let i,s;1*window.innerHeight>=window.innerWidth?(i=window.innerWidth,s=window.innerWidth/1):(s=window.innerHeight,i=1*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${s}px`}window.addEventListener("keydown",(t=>{"s"===t.key&&saveCanvas(tokenData.hash,"png")}));
const t=void 0;var e=t=>{const e=Uint32Array.from([0,0,0,0].map(((e,i)=>parseInt(t.substr(8*i+2,8),16)))),i=()=>{let t,i=e[3];return e[3]=e[2],e[2]=e[1],e[1]=t=e[0],i^=i<<11,i^=i>>>8,e[0]=i^t^t>>>19,e[0]/4294967296},s=(t,e)=>e?i()*(e-t)+t:i()*t,r=(t,e)=>Math.floor(s(t,e)),o=t=>t.length?t[r(0,t.length)]:void 0,h=t=>{let e=t.reduce(((t,e)=>t+e)),s=i()*e;for(let e=0;e<t.length;e++){if(s<t[e])return e;s-=t[e]}return 0};return{rnd:i,rangeFloor:r,pick:o,weighted:h}};const i=void 0;var s=[["#E26D02","#252926","#E5DDC1"],["#191438","#E51A23","#EDDFDB"],["#FEC400","#33201B","#5A5B64"],["#F30209","#0C0AAD","#F4FCF8"],["#7A64D8","#E4FE02","#161312"],["#efece9","#090906","#efece9"],["#181a1e","#fffaff","#181a1e"],["#D7A1E7","#4406D2","#ECEDE9"],["#B5D6F4","#023BA5","#F4F5F4"],["#f39237","#191923","#fbfef9"],["#DB2800","#012631","#FCFCD6"],["#1268BF","#100C29","#FBEFD7"],["#41aa6d","#262525","#eaefea"],["#B51612","#0F0F0C","#e3e3df"],["#0d0b0b","#d80056","#ecedef"],["#b80c09","#fbfbff","#040f16"],["#3e92cc","#fffaff","#1e1b18"],["#fa110d","#000000","#fec3f0"],["#dd1c1a","#fff1d0","#06aed5"],["#e63946","#f1faee","#1d3557"],["#2b2d42","#edf2f4","#d90429"],["#E4CA18","#0A2349","#0168A7"]];const r=void 0,o=t=>t.filter(((e,i)=>{const s=JSON.stringify(e);return i===t.findIndex((t=>JSON.stringify(t)===s))})),h=(t,e,i,s,r,o,h=0)=>{const l=[];let n=0,p=0,c=0,f=0,u=0,d=0,a=0,g=0,k=o-r;if(1!==h||abs(k)<HALF_PI){let o=cos(k/2),h=sin(k/2),l=o,w=0-h,y=(4-o)/3,S;S=0!==h?(1-o)*(3-o)/(3*h):0;let C=y,m=0-S,v=r+k/2,b=cos(v),F=sin(v),z,E,x,W,D,M,A,P,B=i/2,R=s/2;a=t+B*(b*o-F*h),g=e+R*(F*o+b*h),u=t+B*(b*y-F*S),d=e+R*(F*y+b*S),c=t+B*(b*C-F*m),f=e+R*(F*C+b*m),n=t+B*(b*l-F*w),p=e+R*(F*l+b*w)}return 1!==h&&(vertex(n,p),l.push({type:"vertex",points:[n,p]})),bezierVertex(c,f,u,d,a,g),l.push({type:"bezierVertex",points:[c,f,u,d,a,g]}),l};var l=(t,e)=>{const i=[],s=Math.ceil(e/t.length),r=1/s;for(let e=0;e<t.length;e+=1)for(let o=0;o<s;o+=1){const s=color(t[e]),h=color(t[(e+1)%t.length]);i.push(lerpColor(s,h,(o+1)*r))}return i};const n=void 0;var p=(t,e,i,s,r,o,h)=>{const l=([t,e])=>[[t,e],[t+1,e],[t+1,e+1],[t,e+1]],n=[];let p=[t,e];n.push(l(p));let c=0;const f=(t,e)=>(c+=1,c>4&&(p=o(n)[0],c=0),0===n.filter((([[i,s]])=>t===i&&e===s)).length);let u=1;const d={left:"right",up:"down",right:"left",down:"up"},a=h?o([["dr","dl","ul","ur"],["left","up","right","down"]]):["left","up","right","down","ul","ur","dr","dl"];let g=null;for(;u<i;){const[t,e]=p;let i=[...a];const h=a.indexOf(d[g]);h>-1&&i.splice(h,1);const c=o(i);g=c,"up"===c?e-1>=0&&f(t,e-1)&&(p=[t,e-1],n.push(l(p)),u+=1):"down"===c?e+1<1*r&&f(t,e+1)&&(p=[t,e+1],n.push(l(p)),u+=1):"left"===c?t-1>=0&&f(t-1,e)&&(p=[t-1,e],n.push(l(p)),u+=1):"right"===c?t+1<1*s&&f(t+1,e)&&(p=[t+1,e],n.push(l(p)),u+=1):"ul"===c?t-1>=0&&e-1>=0&&f(t-1,e-1)&&(p=[t-1,e-1],n.push(l(p)),u+=1):"ur"===c?t+1<1*s&&e-1>=0&&f(t+1,e-1)&&(p=[t+1,e-1],n.push(l(p)),u+=1):"dr"===c?t+1<1*s&&e+1<1*r&&f(t+1,e+1)&&(p=[t+1,e+1],n.push(l(p)),u+=1):"dl"===c&&t-1>=0&&e+1<1*r&&f(t-1,e+1)&&(p=[t-1,e+1],n.push(l(p)),u+=1)}return n};const c=void 0;var f=(t,e,i)=>{const s=t=>t.filter((([e,i])=>{const s=t.filter((([t,s])=>e===t&&i===s+1)).length>0,r=t.filter((([t,s])=>e===t+1&&i===s)).length>0,o=t.filter((([t,s])=>e===t&&i===s-1)).length>0,h=t.filter((([t,s])=>e===t-1&&i===s)).length>0,l=t.filter((([t,s])=>e===t-1&&i===s+1)).length>0,n=t.filter((([t,s])=>e===t+1&&i===s+1)).length>0,p=t.filter((([t,s])=>e===t+1&&i===s-1)).length>0,c=t.filter((([t,s])=>e===t-1&&i===s-1)).length>0;return!(s&&r&&o&&h&&l&&n&&p&&c)}));let r;const l=void 0,n=(t=>{let e=(t=t.sort((([t,e],[i,s])=>t+e-(i+s))))[0];const i=[e];let s=[...t];const r=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t&&l===s-1)return e=[h,l],i.push(e),!0}},o=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t+1&&l===s)return e=[h,l],i.push(e),!0}},h=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t&&l===s+1)return e=[h,l],i.push(e),!0}},l=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t-1&&l===s)return e=[h,l],i.push(e),!0}},n=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t-1&&l===s-1)return e=[h,l],i.push(e),!0}},p=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t+1&&l===s-1)return e=[h,l],i.push(e),!0}},c=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t+1&&l===s+1)return e=[h,l],i.push(e),!0}},f=(t,s,r)=>{for(let o=0;o<r.length;o+=1){const[h,l]=r[o];if(h===t-1&&l===s+1)return e=[h,l],i.push(e),!0}};let u=[{func:l,type:"left"},{func:r,type:"up"},{func:o,type:"right"},{func:n,type:"ul"},{func:p,type:"ur"}],d=null,a="null",g=!1;for(;"null"===a||e[0]!==t[0][0]||e[1]!==t[0][1];)"up"===a?u=[{func:l,type:"left"},{func:r,type:"up"},{func:o,type:"right"},{func:n,type:"ul"},{func:p,type:"ur"}]:"ur"===a?u=[{func:r,type:"up"},{func:o,type:"right"},{func:n,type:"ul"},{func:p,type:"ur"},{func:c,type:"dr"}]:"right"===a?u=[{func:r,type:"up"},{func:o,type:"right"},{func:h,type:"down"},{func:p,type:"ur"},{func:c,type:"dr"}]:"dr"===a?u=[{func:o,type:"right"},{func:h,type:"down"},{func:p,type:"ur"},{func:c,type:"dr"},{func:f,type:"dl"}]:"down"===a?u=[{func:o,type:"right"},{func:h,type:"down"},{func:l,type:"left"},{func:c,type:"dr"},{func:f,type:"dl"}]:"dl"===a?u=[{func:h,type:"down"},{func:l,type:"left"},{func:c,type:"dr"},{func:f,type:"dl"},{func:n,type:"ul"}]:"left"===a?u=[{func:h,type:"down"},{func:l,type:"left"},{func:r,type:"up"},{func:f,type:"dl"},{func:n,type:"ul"}]:"ul"===a&&(u=[{func:l,type:"left"},{func:r,type:"up"},{func:f,type:"dl"},{func:n,type:"ul"},{func:p,type:"ur"}]),d=u[0].func(...e,s),a=u[0].type,d||(d=u[1].func(...e,s),a=u[1].type),d||(d=u[2].func(...e,s),a=u[2].type),d||(d=u[3].func(...e,s),a=u[3].type),d||(d=u[4].func(...e,s),a=u[4].type),d=null;return i})(o(t.flat()));n.pop();let p=[],c=[],f=[];for(let i=0;i<t.length;i+=1)c.push([t[i][0][0]*e+e/2,t[i][0][1]*e+e/2]);for(let t=0;t<n.length;t+=1){let[s,r]=n[t],[o,l]=n[(t+n.length-1)%n.length],[c,u]=n[(t+1)%n.length];const d=s*e,a=r*i,g=e,k=i;o===s&&l===r+1&&c===s+1&&u===r?(p.push([d+e/2,a+i/2,g,k,180,270]),f.push(...h(d+e/2,a+i/2,e,i,180,270))):o===s-1&&l===r&&c===s&&u===r+1?(p.push([d-e/2,a+i/2,g,k,-90,0]),f.push(...h(d-e/2,a+i/2,e,i,-90,0))):o===s&&l===r-1&&c===s-1&&u===r?(p.push([d-e/2,a-i/2,g,k,0,90]),f.push(...h(d-e/2,a-i/2,e,i,0,90))):o===s+1&&l===r&&c===s&&u===r-1?(p.push([d+e/2,a-i/2,g,k,90,180]),f.push(...h(d+e/2,a-i/2,e,i,90,180))):o===s&&l===r-1&&c===s+1&&u===r?f.push(...h(d+e/2,a-i/2,e,i,180,90)):o===s+1&&l===r&&c===s&&u===r+1?f.push(...h(d+e/2,a+i/2,e,i,270,180)):o===s&&l===r+1&&c===s-1&&u===r?f.push(...h(d-e/2,a+i/2,e,i,0,-90)):o===s-1&&l===r&&c===s&&u===r-1?f.push(...h(d-e/2,a-i/2,e,i,90,0)):f.push({type:"vertex",points:[d,a]})}return{finalPoints:f,arcs:p,centers:c}};class u{constructor(t,e,i,s,r,o,h,l,n,p,c,f,u,d,a,g,k,w,y,S,C,m,v,b,F){this.offsetX=t,this.offsetY=e,this.strokeSize=width/1e3/i*(10*k),this.arcCount=480/i,this.points=s,this.arcs=r,this.centers=o,this.fillColor=h,this.strokeColor=l,this.thirdColor=n,this.filled=p,this.spirals=c,this.circles=f,this.doubleStroke=u,this.tripleStroke=d,this.quadrupleStroke=a,this.altP=g,this.miniCircle=w,this.circleFullSize=p&&y,this.arc=S(this.arcs),this.metro=C,this.d1=m,this.d2=v,this.offset=b,this.hidden=F}drawShape(t){t.beginShape(),this.points.forEach((({type:e,points:i})=>{"bezierVertex"===e?t.bezierVertex(...i):"vertex"===e&&t.vertex(...i)})),t.endShape(CLOSE),this.metro&&(t.push(),t.drawingContext.setLineDash([]),t.noFill(),this.points.forEach((({type:e,points:i})=>{"vertex"===e&&t.circle(...i,this.strokeSize)})),t.pop())}draw(t){if(t.push(),t.translate(this.offsetX,this.offsetY),t.push(),t.strokeWeight(2*this.strokeSize),this.filled?t.fill(this.fillColor):(t.stroke(this.strokeColor),t.noFill()),this.drawShape(t),this.altP&&(t.drawingContext.clip(),t.image(this.altP,-this.offsetX,-this.offsetY)),t.pop(),t.push(),t.stroke(this.strokeColor),t.strokeWeight(2*this.strokeSize),t.noFill(),this.drawShape(t),this.doubleStroke&&(t.strokeWeight(this.strokeSize/2),t.stroke(this.fillColor),this.drawShape(t)),this.hidden&&(t.drawingContext.setLineDash([this.d1,this.d2]),t.drawingContext.lineDashOffset=this.offset),this.tripleStroke&&(t.strokeWeight(this.strokeSize),t.stroke(this.fillColor),this.drawShape(t),t.strokeWeight(this.strokeSize/2),t.stroke(this.thirdColor),this.drawShape(t)),this.quadrupleStroke&&(t.strokeWeight(1.5*this.strokeSize),t.stroke(this.fillColor),this.drawShape(t),t.strokeWeight(this.strokeSize),t.stroke(this.thirdColor),this.drawShape(t),t.strokeWeight(this.strokeSize/2),t.stroke(this.strokeColor),this.drawShape(t)),t.pop(),this.spirals)t.push(),t.stroke(this.strokeColor),t.noFill(),this.arcs.forEach((([e,i,s,r,o,h],l)=>{if(0===l){const r=4;t.push(),t.noStroke(),t.fill(this.fillColor),t.circle(e,i,s/2),t.pop();for(let l=0;l<this.arcCount;l+=1){const n=s/2-l*s/2/this.arcCount,p=o+l*(360*r/this.arcCount),c=h+l*(360*r/this.arcCount);t.arc(e,i,n,n,p,c)}}})),t.pop();else if(this.circles){t.push(),this.altP?t.noStroke():(t.strokeWeight(2*this.strokeSize),this.circleFullSize&&(t.strokeWeight(this.strokeSize),this.tripleStroke||this.quadrupleStroke?t.strokeWeight(this.strokeSize/4):this.doubleStroke&&t.strokeWeight(this.strokeSize/2)),t.stroke(this.fillColor)),t.fill(this.strokeColor);let e=5;this.tripleStroke?e=3:this.doubleStroke&&(e=2.5),this.fillColor.levels[0]===this.thirdColor.levels[0]&&(e=4);const[i,s,r]=this.arc,o=this.circleFullSize?r-this.strokeSize*e:r/2;t.circle(i,s,o,o),this.miniCircle&&(t.fill(this.thirdColor),t.circle(i,s,o/2,o/2)),t.pop()}t.pop()}}var d=u;class a{constructor(t,e,i,s,r,o,h,l,n,p,c,f){this.p=t,this.x=e,this.y=i,this.fillColor=r,this.color=o,this.thirdColor=h,this.size=s,this.M=width/1e3/l*(10*n),this.stroked=p,this.miniCircle=c,this.empty=f}draw(){this.p.push(),this.stroked?(this.p.strokeWeight(2*this.M),this.p.stroke(this.fillColor)):this.p.noStroke(),this.p.fill(this.color),this.empty&&this.stroked&&noFill(),this.p.circle(this.x,this.y,this.size),th
This project is dedicated to Art Blocks. Each panel on the block is a small generative art piece with several random parameters that lives its own life, at the same time being part of the composition. This symbolizes generative artists united by the common idea of ArtBlocks. Each art contains one letter of the words ART BLOCKS. A collector who possesses all nine letters becomes a member of TBOA club.
pickSome:C}=L(tokenData.hash);let I;noiseSeed(1e5*n());const N=()=>{const t={};return I=a(z.length-1),t.palette=z[I],t.colors=["strict","gradient","mono","duo"][M([8.5,.5,.1,1])],t.details=[1,2,3,4,5,6][M([1,1,5,3,.5,.5])],t.base=["sNoise","strictH","strictV","dNoise","circles","rhombus","square","hex","portal","rImpulse","sImpulse",!1][M([3,1,1,1,1,1,1,1,1,1,1,1])],t.separation=["circle","false","halfV","halfH"][M([4,.5,1,1])],t.zNucleotides=n()>.5,t.xNucleotides=n()>.5,t.extraLink=["strictH","strictV","noiseH","noiseV","grid",!1][M([1,1,1,1,1,8])],t.topLayer=["full","circle",!1][M([4,4,1])],"duo"===t.colors&&(t.topLayer=f(["full","circle"])),t.backLayer=t.base&&n()>.1,t.connection=n()>.5,t.centered=n()>.95,t.torn=!t.centered&&["h","v",!1][M([1,1,8])],t.spline=n()>.5,t.spirals=[1,2,3,!1][M([1,1,1,1])],t.streams=!t.torn&&!t.extraLink&&["vertical","horizontal","rectangle",!1][M([1,1,1,12])],t.zPoints=[a(0,5),a(6,12)][M([5,5])],t},{palette:D,colors:A,details:B,base:H,separation:V,backLayer:T,topLayer:P,zNucleotides:_,xNucleotides:j,connection:O,extraLink:Y,centered:q,torn:G,spline:R,spirals:U,streams:$,zPoints:Q}=N(),J="mono"===A,K="duo"===A,X="gradient"===A,Z=f(["triangle","block","circle"]),tt=a(30,50),et=J||K||n()>.5,it=!H&&!Y;let rt=[],ot;const ht=s(.0025,.005);let nt=C(g(D),3),st;st=X?e(nt,1e4):nt;const lt=st;(J||K)&&(st=[lt[0]]);const ct=st.map((t=>color(t))),at=nt.map((t=>{const e=color(t);return e.setAlpha(20),e}));ot=[];const dt=width*s(-.1,.3);u(dt,dt,width-2*dt,height-2*dt,B,ot,.7,[.1,.9],n,4);const ft=C(ot,2);let pt=[],gt=[];for(let t=0;t<3;t+=1)gt.push({x:s(width),y:s(height),gravity:s(1,2)});const[ut,yt,xt]=gt;background(0),background(at[0]);for(let t=0;t<1e4;t+=1)push(),noStroke(),fill(lt[0]),circle(s(width),s(height),s(.5,2)*r),pop();let wt=[];const vt={sNoise:[a(400,2e3),a(30,100),s(.1,.5),s(.01,.001),0,0],dNoise:[a(20,100),a(400,2e3),s(.25,.5),s(.01,.001),s(.25,.5),s(.01,.001)],strictH:[a(400,2e3),a(10,25),0,0,0,0],strictV:[a(10,25),a(400,2e3),0,0,0,0]};let mt,kt;if(n()>.97&&noiseDetail(1),H)if("circles"===H)for(let t=0;t<30;t+=1)k(wt,2e3,.5*width,s);else if("rhombus"===H)for(let t=0;t<30;t+=1)k(wt,2e3,.5*width,s,!0);else if("square"===H)for(let t=0;t<30;t+=1)k(wt,2e3,.5*width,s,!0,!0);else if("hex"===H)E(wt,r);else if("sImpulse"===H||"rImpulse"===H)for(let t=height/200;t<=height;t+=height/100){const e=void 0;o(width/2,height/2,100,"rImpulse"===H?100:4,t,0).forEach((({x:t,y:e})=>{wt.push([t,e])}))}else if("portal"===H){let t=0;const e=a(10,30);for(let i=height/200;i<=height;i+=height/e){const e=void 0;o(width/2,height/2,100+100*t,4,i,45).forEach((({x:t,y:e})=>{wt.push([t,e])})),t+=1}}else{const t=void 0;y(wt,r,...vt[H])}if(!H)for(let t=0;t<a(2,5);t+=1)x(wt,r,s(100,500),10,s,f,n()>.5);mt=[...wt],kt=[...wt],mt=mt.filter((([t,e])=>c(t,e,ut.x,ut.y,width*s(.1,.2))||c(t,e,yt.x,yt.y,width*s(.1,.2)))),kt=kt.filter((([t,e])=>c(t,e,xt.x,xt.y,width*s(.1,.2)))),rt=new Array(tt).fill(null).map((()=>({x:s(width),y:s(height),radius:width*s(.05,.15)})));for(let t=0;t<rt.length;t+=1){const{x:e,y:i,radius:r}=rt[t];wt=wt.filter((([t,o])=>dist(t,o,e,i)>r*s(.8,1.2)))}pt=[...wt];const Et=C(ot,U);if(Et.forEach((({x:t,y:e,w:i,h:r})=>{const o=min(i,r),h=l(t+i/2,e+r/2,a(500,2e3),2*o,s(360),s(.001,.005),n()>.5);wt=wt.filter((([h,n])=>!c(h,n,t+i/2,e+r/2,2*o))),pt=pt.filter((([h,n])=>!c(h,n,t+i/2,e+r/2,2*o)));const d=n()>.8;for(let t=0;t<h.length;t+=1){const{x:e,y:i}=h[t];wt.push([e,i]),d&&pt.push([e,i])}})),Z){let t="circle"===Z?100:"block"===Z?6:3;const e=width*s(.2,.45),i=s(360),r=o(ut.x,ut.y,t,t,e,i).map((({x:t,y:e})=>[t,e])).flat();wt=wt.filter((([t,e])=>!p([t,e],r))),pt=pt.filter((([t,e])=>!p([t,e],r)));const h=void 0;o(ut.x,ut.y,a(500,1e3),t,e/1.5,360-i).forEach((({x:t,y:e})=>{wt.push([t,e]),pt.push([t,e])})),wt.push([ut.x,ut.y])}if(it)for(let t=0;t<a(2,5);t+=1)x(wt,r,a(100,500),10,s,f,n()>.5);if(_){const{x:t,y:e,w:i,h:r}=ft[0];w(wt,t+i/2,e+r/2,s(100,500),a(10,21),s,s(.2*width),!0)}if(j){const{x:t,y:e,w:i,h:r}=f(ot);w(wt,t+i/2,e+r/2,s(500,2e3),a(10,21),s,width*s(.2,.4))}if(G){let t;t="v"===G?[.2*width,0,.8*width,0,.8*width,height,.2*width,height]:[0,.2*height,width,.2*height,width,.8*height,0,.8*height],wt=wt.filter((([e,i])=>!p([e,i],t))),pt=pt.filter((([e,i])=>!p([e,i],t)));for(let t=0;t<a(1,4);t+=1)x(wt,r,s(100,500),10,s,f,n()>.5)}const bt=a(200,600);if(Q){const t=C(ot,Q).map((({x:t,y:e,w:i,h:r})=>({x:t+i/2,y:e+r/2,radius:2*min(i,r)})));for(let e=0;e<t.length;e+=1)if(e%3!=0){const i=s(.8,1.5),{x:r,y:o,radius:h}=t[e];wt=wt.filter((([t,e])=>dist(t,e,r,o)>h/i*s(.8,1.2))),pt=pt.filter((([t,e])=>dist(t,e,r,o)>h/i*s(.8,1.2)))}t.forEach((({x:t,y:e,radius:i})=>{const r=Math.floor(i/width*500),h=f([3,6,400]),l=s(360),c=o(t,e,r,h,i/2,l),a=i>.6*width,d=o(t,e,r,h,i/s(3,5),l).reverse(),p=n()>.75,g=n()>.75;push(),noStroke(),fill(f(K?[lt[0],lt[1]]:st)),beginShape(),c.forEach((({x:t,y:e})=>{vertex(t,e)})),(a||n()>.5)&&(beginContour(),d.forEach((({x:t,y:e})=>{vertex(t,e),wt.push([t,e]),p&&pt.push([t,e])})),endContour()),endShape(CLOSE),pop(),push(),noFill(),stroke(0),strokeWeight(i/10),beginShape(),c.forEach((({x:t,y:e})=>{vertex(t,e)})),endShape(CLOSE),pop(),push(),noFill(),stroke(at[0]),!J&&!K&&n()>.5&&stroke(f(st)),strokeWeight(i/10),beginShape(),c.forEach((({x:t,y:e})=>{vertex(t,e),wt.push([t,e]),g&&pt.push([t,e])})),endShape(CLOSE),pop()}))}if("vertical"===$)for(let t=0;t<width;t+=width/a(8,50)){const e=[t,height*s(.2,.4),t,height*s(.6,.8)];wt=wt.filter((([t,i])=>!d(t,i,...e)));const r=void 0;i(...e,bt).forEach((({x:t,y:e})=>{wt.push([t,e])}))}if("horizontal"===$)for(let t=0;t<height;t+=height/a(8,50)){const e=[width*s(.2,.4),t,width*s(.6,.8),t];wt=wt.filter((([t,i])=>!d(t,i,...e)));const r=void 0;i(...e,bt).forEach((({x:t,y:e})=>{wt.push([t,e])}))}if("rectangle"===$){const t=a(2,6);for(let e=0;e<t;e+=1){const r=width*(.4-.4/t*e),o=void 0,h=void 0,n=void 0,s=void 0,l=void 0;[...i(r,r,width-r,r,bt),...i(width-r,r,width-r,height-r,bt),...i(width-r,height-r,r,height-r,bt),...i(r,height-r,r,r,bt)].forEach((({x:t,y:e})=>{wt.push([t,e])}))}}if(Et.forEach((({x:t,y:e,w:i,h:r})=>{const o=min(i,r),h=l(t+i/2,e+r/2,a(100,500),o/2,s(360),s(.001,.005),n()>.5),c=n()>.8;for(let t=0;t<h.length;t+=1){const{x:e,y:i}=h[t];wt.push([e,i]),c&&pt.push([e,i])}})),q&&(wt=wt.filter((([t,e])=>{const i=width*s(.1,.3);return p([t,e],[i,i,width-i,i,width-i,height-i,i,height-i])})),pt=pt.filter((([t,e])=>{const i=width*s(.1,.3);return p([t,e],[i,i,width-i,i,width-i,height-i,i,height-i])}))),_){const{x:t,y:e,w:i,h:r}=ft[1];w(wt,t+i/2,e+r/2,s(100,500),a(10,21),s,s(.2*width),!0)}if(R&&x(wt,r,a(50,100),a(10,20),s,f,n()>.5),Y){const t=a(8,15),e=void 0,i={strictH:[a(500,1e3),a(4,11),0,0,0,0],strictV:[a(4,11),a(500,1e3),0,0,s(.01,.001),0,0],noiseH:[a(500,1e3),a(4,11),.1,.001,0,0],noiseV:[a(4,11),a(500,1e3),0,0,.1,.001],grid:[t,t,0,0,0,0]}[Y];y(wt,r,...i)}"circle"===P&&(pt=pt.filter((([t,e])=>c(t,e,xt.x,xt.y,width*s(.3,.55)))));const Ft=t(S).triangulate(wt,r);let St=[];for(let t=0;t<Ft.length;t+=3)St.push([wt[Ft[t]],wt[Ft[t+1]],wt[Ft[t+2]]]);const Mt=[],Ct=[],It=C([2,3,4,5,6,7],2),Nt=s(.1,.3);for(let t=0;t<St.length;t+=1){const[e,i,o]=St[t],{x:n,y:s,r:l}=h([[e[0],e[1]],[i[0],i[1]],[o[0],o[1]]]);let c;"circle"===V?c=dist(n,s,ut.x,ut.y)>width*Nt:"halfV"===V?c=n>width/2:"halfH"===V?c=s>height/2:"false"===V&&(c=!0),l<.1*width&&(c?Ct.push({x:n,y:s,r:l}):Mt.push({x:n,y:s,r:l}));const a=noise(n/r*ht,s/r*ht);O&&rt.forEach((({x:t,y:h,radius:c},d)=>{dist(n,s,t,h)<.6*c&&(push(),noFill(),strokeWeight(constrain(map(dist(n,s,xt.x,xt.y),0,width/2,0,r)),0,r),drawingContext.setLineDash([l/10,l/10]),d%Math.round(rt.length/10)==0?(push(),stroke(ct[Math.round(map(a,0,1,0,ct.length-1))]),beginShape(),vertex(e[0],e[1]),vertex(i[0],i[1]),vertex(o[0],o[1]),endShape(),pop()):d%Math.round(rt.length/12)==0&&(push(),stroke(0),beginShape(),vertex(e[0],e[1]),vertex(i[0],i[1]),vertex(o[0],o[1]),endShape(),stroke(at[0]),beginShape(),vertex(e[0],e[1]),vertex(i[0],i[1]),vertex(o[0],o[1]),endShape(),pop()),pop())}))}T&&(mt.forEach((([t,e])=>{push();const i=noise(t/r*ht,e/r*ht),o=map(i,0,1,0,5*r);noStroke(),fill(ct[ct.length-1]),K&&fill(lt[1]),J&&fill(lt[0]),circle(t,e,o),pop()})),kt.forEach((([t,e])=>{push();const i=noise(t/r*ht,e/r*ht),o=map(i,0,1,0,5*r);noStroke(),fill(0),circle(t,e,o),fill(at[0]),circle(t,e,o),pop()})));const Dt=n()>.5,At=[...Mt,...Ct],Bt=n()>.9,Wt=s(2,10);if(F(At,ct,at,r,yt,xt,ht,Wt),W(At,ct,at,r,ut,xt,ht,Wt,et),b(At,ct,at,r,ut,yt,ht,Wt),P){const t=s(15,100),e=pt.map((([e,i])=>{let o=noise(e/r*ht,i/r*ht);const h=void 0;return{x:e,y:i,r:map(o,0,1,0,map(dist(e,i,xt.x,xt.y),0,width/xt.gravity,0,t*r))}}));Dt?v(e,K?[lt[1]]:ct,at,r,ut,yt,ht,Wt,n,Bt):m(e,ct,at,r,ut,xt,ht,Wt,[1e4,1e4])}v(Mt,K?[lt[1]]:ct,at,r,ut,yt,ht,Wt,s,Bt),m(Ct,ct,at,r,ut,xt,ht,Wt,It),push(),noFill(),stroke(0),strokeWeight(80*r),rect(0,0,width,height),stroke(at[0]),rect(0,0,width,height),strokeWeight(30*r),stroke(lt[0]),rect(0,0,width,height),pop()},Y()}.75*window.innerHeight>=window.innerWidth?(_=window.innerWidth,j=window.innerWidth/.75):(j=window.innerHeight,_=.75*window.innerHeight);const G=[1,2,3,4,5,6,7,8,9];function windowResized(){const t=void 0,e=q.canvas.style;let i,r;.75*window.innerHeight>=window.innerWidth?(i=window.innerWidth,r=window.innerWidth/.75):(r=window.innerHeight,i=.75*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${r}px`}window.addEventListener("keydown",(t=>{G.includes(Number(t.key))&&(pixelDensity(Number(t.key)),Y()),"s"===t.key&&saveCanvas(P,"png")}));
function t(t){return t&&t.__esModule?t.default:t}const e=(t,e)=>{const i=[],r=Math.ceil(e/t.length),o=1/r;for(let e=0;e<t.length;e+=1)for(let h=0;h<r;h+=1){const r=color(t[e]),n=color(t[(e+1)%t.length]);i.push(lerpColor(r,n,(h+1)*o))}return i},i=(t,e,i,r,o)=>{const h=[];for(let n=0;n<o-1;n+=1){const s=lerp(t,i,n/(o-1)),l=lerp(e,r,n/(o-1));h.push({x:s,y:l})}return h.push({x:i,y:r}),h},r=(t,e,i,r,o)=>{const h=[];for(let n=0;n<i;n+=1)h.push({x:t+r*cos(o),y:e+r*sin(o)}),o+=360/i;return h},o=(t,e,i,o,h,n)=>{const s=r(t,e,o,h,n),l=i/o,c=[];for(let t=0;t<o;t+=1)for(let e=0;e<l;e+=1){const i=lerp(s[t].x,s[(t+1)%s.length].x,e/l),r=lerp(s[t].y,s[(t+1)%s.length].y,e/l);c.push({x:i,y:r})}return c},h=t=>{const e=1e-6,i={},r=t[0][0],o=t[0][1],h=t[1][0],n=t[1][1],s=t[2][0],l=t[2][1],c=h-r,a=n-o,d=s-r,f=l-o,p=c*(r+h)+a*(o+n),g=d*(r+s)+f*(o+l),u=2*(c*(l-n)-a*(s-h));let y,x;if(Math.abs(u)<e){const t=Math.min(r,h,s),e=Math.min(o,n,l),c=Math.max(r,h,s),a=Math.max(o,n,l);i.x=.5*(t+c),i.y=.5*(e+a),y=i.x-t,x=i.y-e}else{const t=(f*p-a*g)/u,e=(c*g-d*p)/u;i.x=t,i.y=e,y=i.x-r,x=i.y-o}return i.r=Math.sqrt(y*y+x*x),i},n=(t,e,i,r,o,h,n,s,l)=>{const c=[];for(let a=0;a<=l;a+=1){const d=a/l,f=bezierPoint(t,i,o,n,d),p=bezierPoint(e,r,h,s,d);c.push({x:f,y:p})}return c},s=(t,e)=>{let i=floor(t*e*3.14)/e**2;return t>=1&&(i=-1),i},l=(t,e,i,r,o,h,n)=>{const s=[];let l=0;for(let c=0;c<i;c+=1){const i=n?cos(o):sin(o),c=n?sin(o):cos(o);s.push({x:t+r*i*l,y:e+r*c*l}),o+=2,l+=h}return s},c=(t,e,i,r,o)=>{var h=t-i,n=e-r;return h*h+n*n<=o*o},a=(t,e,i,r,o,h,n=width/1e3)=>abs(dist(t,e,i,r)-(dist(t,e,o,h)+dist(i,r,o,h)))<=n,d=(t,e,i,r,o,h)=>a(i,r,o,h,t,e),f=(t,e,i,r=width/1e3)=>{var o=t.length,h=!1,n,s;for(n=0,s=o-2;n<o;n+=2)t[n+1]>i!=t[s+1]>i&&e<(t[s]-t[n])*(i-t[n+1])/(t[s+1]-t[n+1])+t[n]&&(h=!h),s=n;if(h)return!0;for(n=0;n<o;n+=2){var l=t[n],c=t[n+1],d,f;if(n===o-2?(d=t[0],f=t[1]):(d=t[n+2],f=t[n+3]),a(l,c,d,f,e,i,r))return!0}return!1},p=(t,e)=>f(e,t[0],t[1]),g=(t,e,i)=>Array.isArray(e)?e[t*e.length|0]:e||0===e?i||0===i?(e>i&&([e,i]=[i,e]),e+t()*(i-e)):t()*e:t(),u=(t,e,i,r,o,h,n,s,l,c)=>{if(o--,(c-=1)>0||o>=0&&g(l)<n)if(i>=r){let a=i*g(l,s[0],s[1]);u(t,e,a,r,o,h,n,s,l,c),u(t+a,e,i-a,r,o,h,n,s,l,c)}else{let a=r*g(l,s[0],s[1]);u(t,e,i,a,o,h,n,s,l,c),u(t,e+a,i,r-a,o,h,n,s,l,c)}else h.push({x:t,y:e,w:i,h:r,n:o})},y=(t,e,r,o,h,n,s,l)=>{const c=i(0,0,0,height,o),a=i(width,0,width,height,o);for(let o=0;o<c.length;o+=1){const{x:d,y:f}=c[o],{x:p,y:g}=a[o],u=i(d,f,p,g,r);for(let i=0;i<u.length;i+=1){const{x:r,y:o}=u[i];let c=map(noise(r/e*n,o/e*n),0,1,o-width*h,o+width*h),a=map(noise(r/e*l,o/e*l),0,1,r-height*s,r+height*s);t.push([a,c])}}},x=(t,e,i,r,h,s,l)=>{const c=h(360),a={x:l?h(-width/4,width/4):h(width),y:l?h(height):h(-height/4,height/4)},d={x:l?h(.75*width,1.25*width):h(width),y:l?h(height):h(.75*height,1.25*height)},f=o(a.x,a.y,i,i,h(width/4),c),p=o(d.x,d.y,i,i,h(width/4),c);let g,u;l?(g=a.y>height/2?h(.5):h(.5,1),u=d.y>height/2?h(.5):h(.5,1)):(g=a.x>width/2?h(.5):h(.5,1),u=d.x>width/2?h(.5):h(.5,1));for(let e=0;e<f.length;e+=1){const{x:i,y:o}=f[e],{x:h,y:s}=p[e];let c;c=l?n(i,o,.25*width,height*g,.75*width,height*u,h,s,r):n(i,o,width*g,.25*height,width*u,.75*height,h,s,r);for(let e=0;e<c.length;e+=1){const{x:i,y:r}=c[e];t.push([i,r])}}},w=(t,e,i,r,h,s,l,c)=>{let a=o(e,i,r,r,l,s(360)),d=o(e,i,r,r,l,s(360));for(let e=0;e<Math.round(a.length/2);e+=1){let i=s(4);c||(i=2);const{x:r,y:o}=a[e],{x:l,y:f}=a[Math.round(e+a.length/i)%a.length],{x:p,y:g}=d[Math.round(e+d.length/i)%d.length],{x:u,y:y}=d[e],x=n(r,o,l,f,p,g,u,y,h);for(let e=0;e<x.length;e+=1){const{x:i,y:r}=x[e];t.push([i,r])}}},v=(t,e,i,r,o,h,n,l,c,a)=>{for(let d=0;d<t.length-1;d+=1){const{x:f,y:p,r:g}=t[d];let u=noise(f/r*n,p/r*n);u=s(u,l);let y=constrain(map(dist(f,p,o.x,o.y),0,width/o.gravity,.1*g,g),.1*g,1.1*g);push();const x=p+constrain(map(p-h.y,-h.y,h.y,.2*-g,.2*g),.2*-g,.2*g),w=f+constrain(map(f-h.x,-h.x,h.x,.2*-g,.2*g),.2*-g,.2*g);noStroke(),fill(0),circle(w,x,y),fill(i[0]),a&&fill(e[0]),circle(w,x,y),fill(e[abs(Math.round(map(u,0,1,0,e.length))%e.length)]),noStroke(),circle(f,p,y),stroke(0);const v=map(u,0,1,0,360);arc(f,p,y,y,v,v+180),stroke(i[0]),arc(f,p,y,y,v,v+c(85,95)),pop()}},m=(t,e,i,r,o,h,n,l,c)=>{for(let a=0;a<t.length-1;a+=1){const{x:d,y:f,r:p}=t[a];let g=noise(d/r*n,f/r*n);g=s(g,l);let u=constrain(map(dist(d,f,o.x,o.y),0,width/o.gravity,.1*p,p),.1*p,1.1*p);push();const y=f+constrain(map(f-h.y,-h.y,h.y,.2*p,.2*-p),.2*p,.2*-p),x=d+constrain(map(d-h.x,-h.x,h.x,.2*p,.2*-p),.2*p,.2*-p),w=e[abs(Math.round(map(g,0,1,0,e.length))%e.length)];noStroke(),fill(w),circle(x,y,u),fill(0),circle(d,f,u),fill(i[0]),circle(d,f,u),Math.round(d/r+f/r)%c[0]==0&&(fill(w),circle(d,f,u/2)),Math.round(d/r+f/r)%c[1]==0&&(noFill(),stroke(w),circle(d,f,u/2)),pop()}},k=(t,e,i,r,h,n)=>{const s=r(width),l=r(height),c=o(s,l,e,h?4:e,i,n?45:0);for(let e=0;e<c.length;e+=1){const{x:i,y:r}=c[e];t.push([i,r])}return t},E=(t,e)=>{const i=(t,e,i)=>{const r=[];let o=30;for(let h=0;h<6;h+=1)r.push({x:t+i*cos(o),y:e+i*sin(o)}),o+=60;return{dots:r,center:{x:t,y:e}}},r=190*e/8,o=165*e/8,h=110*e/8,n=void 0,s=void 0;(()=>{const t=[];for(let e=0;e<64;e+=1){const n=[];for(let t=0;t<44;t+=1)e%2==0?n.push(i(t*r,e*o,h)):n.push(i(r/2+t*r,e*o,h));t.push(n)}return t})().forEach((e=>{e.forEach((({dots:e})=>{e.forEach((({x:e,y:i})=>{t.push([e,i])}))}))}))},b=(t,e,i,r,o,h,n,l)=>{for(let i=0;i<t.length-1;i+=1){const{x:c,y:a,r:d}=t[i];let f=noise(c/r*n*2,a/r*n*2);f=s(f,l);let p=constrain(map(dist(c,a,o.x,o.y),0,width/o.gravity,.2*d,d),.2*d,1.2*d);const g=e[abs(Math.round(map(f,0,1,0,e.length))%e.length)];push(),strokeWeight(constrain(map(dist(h.x,h.y,c,a),0,width/h.gravity,0,5*r),0,5*r)),noFill(),stroke(g),circle(c,a,p),pop()}},F=(t,e,i,r,o,h,n,l)=>{for(let i=0;i<t.length-1;i+=1){const{x:c,y:a,r:d}=t[i];let f=noise(c/r*n*2,a/r*n*2);f=s(f,l);let p=constrain(map(dist(c,a,o.x,o.y),0,width/o.gravity,.2*d,d),.2*d,1.2*d);const g=e[abs(Math.round(map(f,1,0,0,e.length)))%e.length];push(),strokeWeight(constrain(map(dist(h.x,h.y,c,a),0,width/h.gravity,0,10*r),0,10*r)),noFill(),stroke(g),circle(c,a,p),pop()}};var S={},M,C=1/1048576;function I(t){var e=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h,n,s,l,c,a;for(h=t.length;h--;)t[h][0]<e&&(e=t[h][0]),t[h][0]>r&&(r=t[h][0]),t[h][1]<i&&(i=t[h][1]),t[h][1]>o&&(o=t[h][1]);return s=o-i,[[(c=e+.5*(n=r-e))-20*(l=Math.max(n,s)),(a=i+.5*s)-l],[c,a+20*l],[c+20*l,a-l]]}function N(t,e,i,r){var o=t[e][0],h=t[e][1],n=t[i][0],s=t[i][1],l=t[r][0],c=t[r][1],a=Math.abs(h-s),d=Math.abs(s-c),f,p,g,u,y,x,w,v,m,k;return a<9.5367431640625e-7?p=(u=-(l-n)/(c-s))*((f=(n+o)/2)-(x=(n+l)/2))+(v=(s+c)/2):d<9.5367431640625e-7?p=(g=-(n-o)/(s-h))*((f=(l+n)/2)-(y=(o+n)/2))+(w=(h+s)/2):(f=((g=-(n-o)/(s-h))*(y=(o+n)/2)-(u=-(l-n)/(c-s))*(x=(n+l)/2)+(v=(s+c)/2)-(w=(h+s)/2))/(g-u),p=a>d?g*(f-y)+w:u*(f-x)+v),{i:e,j:i,k:r,x:f,y:p,r:(m=n-f)*m+(k=s-p)*k}}function D(t){var e,i,r,o,h,n;for(i=t.length;i;)for(o=t[--i],r=t[--i],e=i;e;)if(n=t[--e],r===(h=t[--e])&&o===n||r===n&&o===h){t.splice(i,2),t.splice(e,2);break}}let A=0,B=0;S=M={triangulate:function(t,e){var i=t.length,r,o,h,n,s,l,c,a,d,f,p,g;if(i<3)return[];for(t=t.slice(0),h=new Array(i).fill(null).map(((t,e)=>e)),h.sort((function(e,i){var r=t[i][0]-t[e][0];return 0!==r?r:e-i})),n=I(t),t.push(n[0],n[1],n[2]),s=[N(t,i+0,i+1,i+2)],l=[],c=[],r=h.length;r--;c.length=0){for(g=h[r],o=s.length;o--;)B+=1,(a=t[g][0]-s[o].x)>0&&a*a>s[o].r?(l.push(s[o]),s.splice(o,1)):a*a+(d=t[g][1]-s[o].y)*d-s[o].r>9.5367431640625e-7||(A+=1,c.push(s[o].i,s[o].j,s[o].j,s[o].k,s[o].k,s[o].i),s.splice(o,1));for(D(c),o=c.length;o;)p=c[--o],f=c[--o],s.push(N(t,f,p,g))}for(r=s.length;r--;)l.push(s[r]);for(s.length=0,r=l.length;r--;)l[r].i<i&&l[r].j<i&&l[r].k<i&&s.push(l[r].i,l[r].j,l[r].k);return s}};const W=(t,e,i,r,o,h,n,s,l)=>{for(let n=0;n<t.length-1;n+=1){const{x:s,y:c,r:a}=t[n];let d=constrain(map(dist(s,c,h.x,h.y),0,width/h.gravity,.2*a,a),.2*a,1.2*a);push(),strokeWeight(constrain(map(dist(o.x,o.y,s,c),0,width/o.gravity,0,7.5*r),0,7.5*r)),noFill(),l&&(stroke(0),fill(0),circle(s,c,d)),stroke(i[0]),fill(i[0]),l||(stroke(e[0]),fill(e[0])),circle(s,c,d),pop()}},H=void 0;var L=t=>{const e=Uint32Array.from([0,0,0,0].map(((e,i)=>parseInt(t.substr(8*i+2,9),16)))),i=()=>{let t,i=e[3];return e[3]=e[2],e[2]=e[1],e[1]=t=e[0],i^=i<<11,i^=i>>>8,e[0]=i^t^t>>>19,e[0]/4294967296},r=(t,e)=>e?i()*(e-t)+t:i()*t,o=(t,e)=>Math.floor(r(t,e)),h=t=>t.length?t[o(0,t.length)]:void 0,n=t=>{let e=t.reduce(((t,e)=>t+e)),r=i()*e;for(let e=0;e<t.length;e++){if(r<t[e])return e;r-=t[e]}return 0},s=t=>{let e,r,o=t.length,h=t.slice();for(;o;)e=Math.floor(i()*o--),r=h[o],h[o]=h[e],h[e]=r;return h},l=(t,e)=>{let i;return s(t).slice(0,e)};return{rnd:i,range:r,rangeFloor:o,pick:h,weighted:n,shuffleArray:s,pickSome:l}};const V=void 0;var z=[["#ff6700","#ebebeb","#3a6ea5"],["#FDD6E8","#FA801C","#A94B51"],["#fa2d19","#3565a3","#f5d5d6"],["#9B0A0B","#745F67","#D5D8CD"],["#fa4659","#2eb872","#feffe4"],["#058581","#C6BC07","#EAEADE"],["#6639a6","#3490de","#6fe7dd"],["#ff206e","#fbff12","#41ead4"],["#047af6","#32fa00","#ff00d5"],["#708d81","#f4d58d","#bf0603"],["#fa110d","#ffffff","#fec3f0"],["#8d99ae","#edf2f4","#ef233c"],["#fffcf2","#ccc5b9","#eb5e28"],["#E3D0B1","#DB6C38","#009272"],["#01638d","#abcecc","#fff2cd"],["#213571","#77B494","#E34F24"],["#3F8A8C","#E5340B","#F28A0F","#FFE7BD"],["#C84837","#183045","#EBD3AD"],["#169b62","#5ec8e5","#f984ca","#ff4c65","#ffe800"],["#B59C89","#007C9B","#F4F5F4"],["#dd1c1a","#06aed5","#f0c808","#fff1d0"],["#2138ff","#FEC23B","#EAE8D5","#DA292C"],["#6d5bcf","#ffd400","#ff1080","#eadeda"],["#3FBBB9","#E92C41","#D0D1CE"],["#4375E2","#5CF7F5","#EC37DB","#FAEE44"],["#DF5024","#5E6359","#F4F5F4"],["#075ea8","#d9322b","#f3a606","#e1d2b3"]];let T;const{hash:P}=tokenData;let _,j;const O=.75;let Y,q;function setup(){q=createCanvas(_,j),strokeCap(SQUARE);let r=width/1e3;strokeWeight(r),angleMode(DEGREES),Y=()=>{const{rnd:n,range:s,rangeFloor:a,pick:f,shuffleArray:g,weighted:M,
e(DEGREES),Y=()=>{const{rnd:n,range:s,rangeFloor:a,pick:f,shuffleArray:g,weighted:M,pickSome:C}=L(tokenData.hash);let D;noiseSeed(1e5*n());const I=()=>{const t={};return D=a(z.length-1),t.palette=z[D],t.colors=["strict","gradient","mono","duo"][M([8.5,.5,.1,1])],t.details=[1,2,3,4,5,6][M([1,1,5,3,.5,.5])],t.base=["sNoise","strictH","strictV","dNoise","circles","rhombus","square","hex","portal","rImpulse","sImpulse",!1][M([3,1,1,1,1,1,1,1,1,1,1,1])],t.separation=["circle","false","halfV","halfH"][M([4,.5,1,1])],t.zNucleotides=n()>.5,t.xNucleotides=n()>.5,t.extraLink=["strictH","strictV","noiseH","noiseV","grid",!1][M([1,1,1,1,1,8])],t.topLayer=["full","circle",!1][M([4,4,1])],"duo"===t.colors&&(t.topLayer=f(["full","circle"])),t.backLayer=t.base&&n()>.1,t.connection=n()>.5,t.centered=n()>.95,t.torn=!t.centered&&["h","v",!1][M([1,1,8])],t.spline=n()>.5,t.spirals=[1,2,3,!1][M([1,1,1,1])],t.streams=!t.torn&&!t.extraLink&&["vertical","horizontal","rectangle",!1][M([1,1,1,12])],t.zPoints=[a(0,5),a(6,12)][M([5,5])],t},{palette:N,colors:A,details:B,base:H,separation:V,backLayer:T,topLayer:P,zNucleotides:_,xNucleotides:j,connection:O,extraLink:Y,centered:q,torn:G,spline:R,spirals:U,streams:$,zPoints:Q}=I(),J="mono"===A,K="duo"===A,X="gradient"===A,Z=f(["triangle","block","circle"]),tt=a(30,50),et=J||K||n()>.5,it=!H&&!Y;let rt=[],ot;const ht=s(.0025,.005);let nt=C(g(N),3),st;st=X?e(nt,1e4):nt;const lt=st;(J||K)&&(st=[lt[0]]);const ct=st.map((t=>color(t))),at=nt.map((t=>{const e=color(t);return e.setAlpha(20),e}));ot=[];const dt=width*s(-.1,.3);u(dt,dt,width-2*dt,height-2*dt,B,ot,.7,[.1,.9],n,4);const ft=C(ot,2);let pt=[],gt=[];for(let t=0;t<3;t+=1)gt.push({x:s(width),y:s(height),gravity:s(1,2)});const[ut,yt,xt]=gt;background(0),background(at[0]);for(let t=0;t<1e4;t+=1)push(),noStroke(),fill(lt[0]),circle(s(width),s(height),s(.5,2)*r),pop();let wt=[];const vt={sNoise:[a(400,2e3),a(30,100),s(.1,.5),s(.01,.001),0,0],dNoise:[a(20,100),a(400,2e3),s(.25,.5),s(.01,.001),s(.25,.5),s(.01,.001)],strictH:[a(400,2e3),a(10,25),0,0,0,0],strictV:[a(10,25),a(400,2e3),0,0,0,0]};let kt,mt;if(n()>.97&&noiseDetail(1),H)if("circles"===H)for(let t=0;t<30;t+=1)m(wt,2e3,.5*width,s);else if("rhombus"===H)for(let t=0;t<30;t+=1)m(wt,2e3,.5*width,s,!0);else if("square"===H)for(let t=0;t<30;t+=1)m(wt,2e3,.5*width,s,!0,!0);else if("hex"===H)b(wt,r);else if("sImpulse"===H||"rImpulse"===H)for(let t=height/200;t<=height;t+=height/100){const e=void 0;o(width/2,height/2,100,"rImpulse"===H?100:4,t,0).forEach((({x:t,y:e})=>{wt.push([t,e])}))}else if("portal"===H){let t=0;const e=a(10,30);for(let i=height/200;i<=height;i+=height/e){const e=void 0;o(width/2,height/2,100+100*t,4,i,45).forEach((({x:t,y:e})=>{wt.push([t,e])})),t+=1}}else{const t=void 0;y(wt,r,...vt[H])}if(!H)for(let t=0;t<a(2,5);t+=1)x(wt,r,s(100,500),10,s,f,n()>.5);kt=[...wt],mt=[...wt],kt=kt.filter((([t,e])=>c(t,e,ut.x,ut.y,width*s(.1,.2))||c(t,e,yt.x,yt.y,width*s(.1,.2)))),mt=mt.filter((([t,e])=>c(t,e,xt.x,xt.y,width*s(.1,.2)))),rt=new Array(tt).fill(null).map((()=>({x:s(width),y:s(height),radius:width*s(.05,.15)})));for(let t=0;t<rt.length;t+=1){const{x:e,y:i,radius:r}=rt[t];wt=wt.filter((([t,o])=>dist(t,o,e,i)>r*s(.8,1.2)))}pt=[...wt];const bt=C(ot,U);if(bt.forEach((({x:t,y:e,w:i,h:r})=>{const o=min(i,r),h=l(t+i/2,e+r/2,a(500,2e3),2*o,s(360),s(.001,.005),n()>.5);wt=wt.filter((([h,n])=>!c(h,n,t+i/2,e+r/2,2*o))),pt=pt.filter((([h,n])=>!c(h,n,t+i/2,e+r/2,2*o)));const d=n()>.8;for(let t=0;t<h.length;t+=1){const{x:e,y:i}=h[t];wt.push([e,i]),d&&pt.push([e,i])}})),Z){let t="circle"===Z?100:"block"===Z?6:3;const e=width*s(.2,.45),i=s(360),r=o(ut.x,ut.y,t,t,e,i).map((({x:t,y:e})=>[t,e])).flat();wt=wt.filter((([t,e])=>!p([t,e],r))),pt=pt.filter((([t,e])=>!p([t,e],r)));const h=void 0;o(ut.x,ut.y,a(500,1e3),t,e/1.5,360-i).forEach((({x:t,y:e})=>{wt.push([t,e]),pt.push([t,e])})),wt.push([ut.x,ut.y])}if(it)for(let t=0;t<a(2,5);t+=1)x(wt,r,a(100,500),10,s,f,n()>.5);if(_){const{x:t,y:e,w:i,h:r}=ft[0];w(wt,t+i/2,e+r/2,s(100,500),a(10,21),s,s(.2*width),!0)}if(j){const{x:t,y:e,w:i,h:r}=f(ot);w(wt,t+i/2,e+r/2,s(500,2e3),a(10,21),s,width*s(.2,.4))}if(G){let t;t="v"===G?[.2*width,0,.8*width,0,.8*width,height,.2*width,height]:[0,.2*height,width,.2*height,width,.8*height,0,.8*height],wt=wt.filter((([e,i])=>!p([e,i],t))),pt=pt.filter((([e,i])=>!p([e,i],t)));for(let t=0;t<a(1,4);t+=1)x(wt,r,s(100,500),10,s,f,n()>.5)}const Et=a(200,600);if(Q){const t=C(ot,Q).map((({x:t,y:e,w:i,h:r})=>({x:t+i/2,y:e+r/2,radius:2*min(i,r)})));for(let e=0;e<t.length;e+=1)if(e%3!=0){const i=s(.8,1.5),{x:r,y:o,radius:h}=t[e];wt=wt.filter((([t,e])=>dist(t,e,r,o)>h/i*s(.8,1.2))),pt=pt.filter((([t,e])=>dist(t,e,r,o)>h/i*s(.8,1.2)))}t.forEach((({x:t,y:e,radius:i})=>{const r=Math.floor(i/width*500),h=f([3,6,400]),l=s(360),c=o(t,e,r,h,i/2,l),a=i>.6*width,d=o(t,e,r,h,i/s(3,5),l).reverse(),p=n()>.75,g=n()>.75;push(),noStroke(),fill(f(K?[lt[0],lt[1]]:st)),beginShape(),c.forEach((({x:t,y:e})=>{vertex(t,e)})),(a||n()>.5)&&(beginContour(),d.forEach((({x:t,y:e})=>{vertex(t,e),wt.push([t,e]),p&&pt.push([t,e])})),endContour()),endShape(CLOSE),pop(),push(),noFill(),stroke(0),strokeWeight(i/10),beginShape(),c.forEach((({x:t,y:e})=>{vertex(t,e)})),endShape(CLOSE),pop(),push(),noFill(),stroke(at[0]),!J&&!K&&n()>.5&&stroke(f(st)),strokeWeight(i/10),beginShape(),c.forEach((({x:t,y:e})=>{vertex(t,e),wt.push([t,e]),g&&pt.push([t,e])})),endShape(CLOSE),pop()}))}if("vertical"===$)for(let t=0;t<width;t+=width/a(8,50)){const e=[t,height*s(.2,.4),t,height*s(.6,.8)];wt=wt.filter((([t,i])=>!d(t,i,...e)));const r=void 0;i(...e,Et).forEach((({x:t,y:e})=>{wt.push([t,e])}))}if("horizontal"===$)for(let t=0;t<height;t+=height/a(8,50)){const e=[width*s(.2,.4),t,width*s(.6,.8),t];wt=wt.filter((([t,i])=>!d(t,i,...e)));const r=void 0;i(...e,Et).forEach((({x:t,y:e})=>{wt.push([t,e])}))}if("rectangle"===$){const t=a(2,6);for(let e=0;e<t;e+=1){const r=width*(.4-.4/t*e),o=void 0,h=void 0,n=void 0,s=void 0,l=void 0;[...i(r,r,width-r,r,Et),...i(width-r,r,width-r,height-r,Et),...i(width-r,height-r,r,height-r,Et),...i(r,height-r,r,r,Et)].forEach((({x:t,y:e})=>{wt.push([t,e])}))}}if(bt.forEach((({x:t,y:e,w:i,h:r})=>{const o=min(i,r),h=l(t+i/2,e+r/2,a(100,500),o/2,s(360),s(.001,.005),n()>.5),c=n()>.8;for(let t=0;t<h.length;t+=1){const{x:e,y:i}=h[t];wt.push([e,i]),c&&pt.push([e,i])}})),q&&(wt=wt.filter((([t,e])=>{const i=width*s(.1,.3);return p([t,e],[i,i,width-i,i,width-i,height-i,i,height-i])})),pt=pt.filter((([t,e])=>{const i=width*s(.1,.3);return p([t,e],[i,i,width-i,i,width-i,height-i,i,height-i])}))),_){const{x:t,y:e,w:i,h:r}=ft[1];w(wt,t+i/2,e+r/2,s(100,500),a(10,21),s,s(.2*width),!0)}if(R&&x(wt,r,a(50,100),a(10,20),s,f,n()>.5),Y){const t=a(8,15),e=void 0,i={strictH:[a(500,1e3),a(4,11),0,0,0,0],strictV:[a(4,11),a(500,1e3),0,0,s(.01,.001),0,0],noiseH:[a(500,1e3),a(4,11),.1,.001,0,0],noiseV:[a(4,11),a(500,1e3),0,0,.1,.001],grid:[t,t,0,0,0,0]}[Y];y(wt,r,...i)}"circle"===P&&(pt=pt.filter((([t,e])=>c(t,e,xt.x,xt.y,width*s(.3,.55)))));const Ft=t(S).triangulate(wt,r);let St=[];for(let t=0;t<Ft.length;t+=3)St.push([wt[Ft[t]],wt[Ft[t+1]],wt[Ft[t+2]]]);const Mt=[],Ct=[],Dt=C([2,3,4,5,6,7],2),It=s(.1,.3);for(let t=0;t<St.length;t+=1){const[e,i,o]=St[t],{x:n,y:s,r:l}=h([[e[0],e[1]],[i[0],i[1]],[o[0],o[1]]]);let c;"circle"===V?c=dist(n,s,ut.x,ut.y)>width*It:"halfV"===V?c=n>width/2:"halfH"===V?c=s>height/2:"false"===V&&(c=!0),l<.1*width&&(c?Ct.push({x:n,y:s,r:l}):Mt.push({x:n,y:s,r:l}));const a=noise(n/r*ht,s/r*ht);O&&rt.forEach((({x:t,y:h,radius:c},d)=>{dist(n,s,t,h)<.6*c&&(push(),noFill(),strokeWeight(constrain(map(dist(n,s,xt.x,xt.y),0,width/2,0,r)),0,r),drawingContext.setLineDash([l/10,l/10]),d%Math.round(rt.length/10)==0?(push(),stroke(ct[Math.round(map(a,0,1,0,ct.length-1))]),beginShape(),vertex(e[0],e[1]),vertex(i[0],i[1]),vertex(o[0],o[1]),endShape(),pop()):d%Math.round(rt.length/12)==0&&(push(),stroke(0),beginShape(),vertex(e[0],e[1]),vertex(i[0],i[1]),vertex(o[0],o[1]),endShape(),stroke(at[0]),beginShape(),vertex(e[0],e[1]),vertex(i[0],i[1]),vertex(o[0],o[1]),endShape(),pop()),pop())}))}T&&(kt.forEach((([t,e])=>{push();const i=noise(t/r*ht,e/r*ht),o=map(i,0,1,0,5*r);noStroke(),fill(ct[ct.length-1]),K&&fill(lt[1]),J&&fill(lt[0]),circle(t,e,o),pop()})),mt.forEach((([t,e])=>{push();const i=noise(t/r*ht,e/r*ht),o=map(i,0,1,0,5*r);noStroke(),fill(0),circle(t,e,o),fill(at[0]),circle(t,e,o),pop()})));const Nt=n()>.5,At=[...Mt,...Ct],Bt=n()>.9,Wt=s(2,10);if(F(At,ct,at,r,yt,xt,ht,Wt),W(At,ct,at,r,ut,xt,ht,Wt,et),E(At,ct,at,r,ut,yt,ht,Wt),P){const t=s(15,100),e=pt.map((([e,i])=>{let o=noise(e/r*ht,i/r*ht);const h=void 0;return{x:e,y:i,r:map(o,0,1,0,map(dist(e,i,xt.x,xt.y),0,width/xt.gravity,0,t*r))}}));Nt?v(e,K?[lt[1]]:ct,at,r,ut,yt,ht,Wt,n,Bt):k(e,ct,at,r,ut,xt,ht,Wt,[1e4,1e4])}v(Mt,K?[lt[1]]:ct,at,r,ut,yt,ht,Wt,s,Bt),k(Ct,ct,at,r,ut,xt,ht,Wt,Dt),push(),noFill(),stroke(0),strokeWeight(80*r),rect(0,0,width,height),stroke(at[0]),rect(0,0,width,height),strokeWeight(30*r),stroke(lt[0]),rect(0,0,width,height),pop()},Y()}.75*window.innerHeight>=window.innerWidth?(_=window.innerWidth,j=window.innerWidth/.75):(j=window.innerHeight,_=.75*window.innerHeight);const G=[1,2,3,4,5,6,7,8,9];function windowResized(){const t=void 0,e=q.canvas.style;let i,r;.75*window.innerHeight>=window.innerWidth?(i=window.innerWidth,r=window.innerWidth/.75):(r=window.innerHeight,i=.75*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${r}px`}window.addEventListener("keydown",(t=>{G.includes(Number(t.key))&&(pixelDensity(Number(t.key)),Y()),"s"===t.key&&saveCanvas(P,"png")}));
function t(t){return t&&t.__esModule?t.default:t}const e=(t,e)=>{const i=[],r=Math.ceil(e/t.length),o=1/r;for(let e=0;e<t.length;e+=1)for(let h=0;h<r;h+=1){const r=color(t[e]),n=color(t[(e+1)%t.length]);i.push(lerpColor(r,n,(h+1)*o))}return i},i=(t,e,i,r,o)=>{const h=[];for(let n=0;n<o-1;n+=1){const s=lerp(t,i,n/(o-1)),l=lerp(e,r,n/(o-1));h.push({x:s,y:l})}return h.push({x:i,y:r}),h},r=(t,e,i,r,o)=>{const h=[];for(let n=0;n<i;n+=1)h.push({x:t+r*cos(o),y:e+r*sin(o)}),o+=360/i;return h},o=(t,e,i,o,h,n)=>{const s=r(t,e,o,h,n),l=i/o,c=[];for(let t=0;t<o;t+=1)for(let e=0;e<l;e+=1){const i=lerp(s[t].x,s[(t+1)%s.length].x,e/l),r=lerp(s[t].y,s[(t+1)%s.length].y,e/l);c.push({x:i,y:r})}return c},h=t=>{const e=1e-6,i={},r=t[0][0],o=t[0][1],h=t[1][0],n=t[1][1],s=t[2][0],l=t[2][1],c=h-r,a=n-o,d=s-r,f=l-o,p=c*(r+h)+a*(o+n),g=d*(r+s)+f*(o+l),u=2*(c*(l-n)-a*(s-h));let y,x;if(Math.abs(u)<e){const t=Math.min(r,h,s),e=Math.min(o,n,l),c=Math.max(r,h,s),a=Math.max(o,n,l);i.x=.5*(t+c),i.y=.5*(e+a),y=i.x-t,x=i.y-e}else{const t=(f*p-a*g)/u,e=(c*g-d*p)/u;i.x=t,i.y=e,y=i.x-r,x=i.y-o}return i.r=Math.sqrt(y*y+x*x),i},n=(t,e,i,r,o,h,n,s,l)=>{const c=[];for(let a=0;a<=l;a+=1){const d=a/l,f=bezierPoint(t,i,o,n,d),p=bezierPoint(e,r,h,s,d);c.push({x:f,y:p})}return c},s=(t,e)=>{let i=floor(t*e*3.14)/e**2;return t>=1&&(i=-1),i},l=(t,e,i,r,o,h,n)=>{const s=[];let l=0;for(let c=0;c<i;c+=1){const i=n?cos(o):sin(o),c=n?sin(o):cos(o);s.push({x:t+r*i*l,y:e+r*c*l}),o+=2,l+=h}return s},c=(t,e,i,r,o)=>{var h=t-i,n=e-r;return h*h+n*n<=o*o},a=(t,e,i,r,o,h,n=width/1e3)=>abs(dist(t,e,i,r)-(dist(t,e,o,h)+dist(i,r,o,h)))<=n,d=(t,e,i,r,o,h)=>a(i,r,o,h,t,e),f=(t,e,i,r=width/1e3)=>{var o=t.length,h=!1,n,s;for(n=0,s=o-2;n<o;n+=2)t[n+1]>i!=t[s+1]>i&&e<(t[s]-t[n])*(i-t[n+1])/(t[s+1]-t[n+1])+t[n]&&(h=!h),s=n;if(h)return!0;for(n=0;n<o;n+=2){var l=t[n],c=t[n+1],d,f;if(n===o-2?(d=t[0],f=t[1]):(d=t[n+2],f=t[n+3]),a(l,c,d,f,e,i,r))return!0}return!1},p=(t,e)=>f(e,t[0],t[1]),g=(t,e,i)=>Array.isArray(e)?e[t*e.length|0]:e||0===e?i||0===i?(e>i&&([e,i]=[i,e]),e+t()*(i-e)):t()*e:t(),u=(t,e,i,r,o,h,n,s,l,c)=>{if(o--,(c-=1)>0||o>=0&&g(l)<n)if(i>=r){let a=i*g(l,s[0],s[1]);u(t,e,a,r,o,h,n,s,l,c),u(t+a,e,i-a,r,o,h,n,s,l,c)}else{let a=r*g(l,s[0],s[1]);u(t,e,i,a,o,h,n,s,l,c),u(t,e+a,i,r-a,o,h,n,s,l,c)}else h.push({x:t,y:e,w:i,h:r,n:o})},y=(t,e,r,o,h,n,s,l)=>{const c=i(0,0,0,height,o),a=i(width,0,width,height,o);for(let o=0;o<c.length;o+=1){const{x:d,y:f}=c[o],{x:p,y:g}=a[o],u=i(d,f,p,g,r);for(let i=0;i<u.length;i+=1){const{x:r,y:o}=u[i];let c=map(noise(r/e*n,o/e*n),0,1,o-width*h,o+width*h),a=map(noise(r/e*l,o/e*l),0,1,r-height*s,r+height*s);t.push([a,c])}}},x=(t,e,i,r,h,s,l)=>{const c=h(360),a={x:l?h(-width/4,width/4):h(width),y:l?h(height):h(-height/4,height/4)},d={x:l?h(.75*width,1.25*width):h(width),y:l?h(height):h(.75*height,1.25*height)},f=o(a.x,a.y,i,i,h(width/4),c),p=o(d.x,d.y,i,i,h(width/4),c);let g,u;l?(g=a.y>height/2?h(.5):h(.5,1),u=d.y>height/2?h(.5):h(.5,1)):(g=a.x>width/2?h(.5):h(.5,1),u=d.x>width/2?h(.5):h(.5,1));for(let e=0;e<f.length;e+=1){const{x:i,y:o}=f[e],{x:h,y:s}=p[e];let c;c=l?n(i,o,.25*width,height*g,.75*width,height*u,h,s,r):n(i,o,width*g,.25*height,width*u,.75*height,h,s,r);for(let e=0;e<c.length;e+=1){const{x:i,y:r}=c[e];t.push([i,r])}}},w=(t,e,i,r,h,s,l,c)=>{let a=o(e,i,r,r,l,s(360)),d=o(e,i,r,r,l,s(360));for(let e=0;e<Math.round(a.length/2);e+=1){let i=s(4);c||(i=2);const{x:r,y:o}=a[e],{x:l,y:f}=a[Math.round(e+a.length/i)%a.length],{x:p,y:g}=d[Math.round(e+d.length/i)%d.length],{x:u,y:y}=d[e],x=n(r,o,l,f,p,g,u,y,h);for(let e=0;e<x.length;e+=1){const{x:i,y:r}=x[e];t.push([i,r])}}},v=(t,e,i,r,o,h,n,l,c,a)=>{for(let d=0;d<t.length-1;d+=1){const{x:f,y:p,r:g}=t[d];let u=noise(f/r*n,p/r*n);u=s(u,l);let y=constrain(map(dist(f,p,o.x,o.y),0,width/o.gravity,.1*g,g),.1*g,1.1*g);push();const x=p+constrain(map(p-h.y,-h.y,h.y,.2*-g,.2*g),.2*-g,.2*g),w=f+constrain(map(f-h.x,-h.x,h.x,.2*-g,.2*g),.2*-g,.2*g);noStroke(),fill(0),circle(w,x,y),fill(i[0]),a&&fill(e[0]),circle(w,x,y),fill(e[abs(Math.round(map(u,0,1,0,e.length))%e.length)]),noStroke(),circle(f,p,y),stroke(0);const v=map(u,0,1,0,360);arc(f,p,y,y,v,v+180),stroke(i[0]),arc(f,p,y,y,v,v+c(85,95)),pop()}},k=(t,e,i,r,o,h,n,l,c)=>{for(let a=0;a<t.length-1;a+=1){const{x:d,y:f,r:p}=t[a];let g=noise(d/r*n,f/r*n);g=s(g,l);let u=constrain(map(dist(d,f,o.x,o.y),0,width/o.gravity,.1*p,p),.1*p,1.1*p);push();const y=f+constrain(map(f-h.y,-h.y,h.y,.2*p,.2*-p),.2*p,.2*-p),x=d+constrain(map(d-h.x,-h.x,h.x,.2*p,.2*-p),.2*p,.2*-p),w=e[abs(Math.round(map(g,0,1,0,e.length))%e.length)];noStroke(),fill(w),circle(x,y,u),fill(0),circle(d,f,u),fill(i[0]),circle(d,f,u),Math.round(d/r+f/r)%c[0]==0&&(fill(w),circle(d,f,u/2)),Math.round(d/r+f/r)%c[1]==0&&(noFill(),stroke(w),circle(d,f,u/2)),pop()}},m=(t,e,i,r,h,n)=>{const s=r(width),l=r(height),c=o(s,l,e,h?4:e,i,n?45:0);for(let e=0;e<c.length;e+=1){const{x:i,y:r}=c[e];t.push([i,r])}return t},b=(t,e)=>{const i=(t,e,i)=>{const r=[];let o=30;for(let h=0;h<6;h+=1)r.push({x:t+i*cos(o),y:e+i*sin(o)}),o+=60;return{dots:r,center:{x:t,y:e}}},r=190*e/8,o=165*e/8,h=110*e/8,n=void 0,s=void 0;(()=>{const t=[];for(let e=0;e<64;e+=1){const n=[];for(let t=0;t<44;t+=1)e%2==0?n.push(i(t*r,e*o,h)):n.push(i(r/2+t*r,e*o,h));t.push(n)}return t})().forEach((e=>{e.forEach((({dots:e})=>{e.forEach((({x:e,y:i})=>{t.push([e,i])}))}))}))},E=(t,e,i,r,o,h,n,l)=>{for(let i=0;i<t.length-1;i+=1){const{x:c,y:a,r:d}=t[i];let f=noise(c/r*n*2,a/r*n*2);f=s(f,l);let p=constrain(map(dist(c,a,o.x,o.y),0,width/o.gravity,.2*d,d),.2*d,1.2*d);const g=e[abs(Math.round(map(f,0,1,0,e.length))%e.length)];push(),strokeWeight(constrain(map(dist(h.x,h.y,c,a),0,width/h.gravity,0,5*r),0,5*r)),noFill(),stroke(g),circle(c,a,p),pop()}},F=(t,e,i,r,o,h,n,l)=>{for(let i=0;i<t.length-1;i+=1){const{x:c,y:a,r:d}=t[i];let f=noise(c/r*n*2,a/r*n*2);f=s(f,l);let p=constrain(map(dist(c,a,o.x,o.y),0,width/o.gravity,.2*d,d),.2*d,1.2*d);const g=e[abs(Math.round(map(f,1,0,0,e.length)))%e.length];push(),strokeWeight(constrain(map(dist(h.x,h.y,c,a),0,width/h.gravity,0,10*r),0,10*r)),noFill(),stroke(g),circle(c,a,p),pop()}};var S={},M,C=1/1048576;function D(t){var e=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h,n,s,l,c,a;for(h=t.length;h--;)t[h][0]<e&&(e=t[h][0]),t[h][0]>r&&(r=t[h][0]),t[h][1]<i&&(i=t[h][1]),t[h][1]>o&&(o=t[h][1]);return s=o-i,[[(c=e+.5*(n=r-e))-20*(l=Math.max(n,s)),(a=i+.5*s)-l],[c,a+20*l],[c+20*l,a-l]]}function I(t,e,i,r){var o=t[e][0],h=t[e][1],n=t[i][0],s=t[i][1],l=t[r][0],c=t[r][1],a=Math.abs(h-s),d=Math.abs(s-c),f,p,g,u,y,x,w,v,k,m;return a<9.5367431640625e-7?p=(u=-(l-n)/(c-s))*((f=(n+o)/2)-(x=(n+l)/2))+(v=(s+c)/2):d<9.5367431640625e-7?p=(g=-(n-o)/(s-h))*((f=(l+n)/2)-(y=(o+n)/2))+(w=(h+s)/2):(f=((g=-(n-o)/(s-h))*(y=(o+n)/2)-(u=-(l-n)/(c-s))*(x=(n+l)/2)+(v=(s+c)/2)-(w=(h+s)/2))/(g-u),p=a>d?g*(f-y)+w:u*(f-x)+v),{i:e,j:i,k:r,x:f,y:p,r:(k=n-f)*k+(m=s-p)*m}}function N(t){var e,i,r,o,h,n;for(i=t.length;i;)for(o=t[--i],r=t[--i],e=i;e;)if(n=t[--e],r===(h=t[--e])&&o===n||r===n&&o===h){t.splice(i,2),t.splice(e,2);break}}let A=0,B=0;S=M={triangulate:function(t,e){var i=t.length,r,o,h,n,s,l,c,a,d,f,p,g;if(i<3)return[];for(t=t.slice(0),h=new Array(i).fill(null).map(((t,e)=>e)),h.sort((function(e,i){var r=t[i][0]-t[e][0];return 0!==r?r:e-i})),n=D(t),t.push(n[0],n[1],n[2]),s=[I(t,i+0,i+1,i+2)],l=[],c=[],r=h.length;r--;c.length=0){for(g=h[r],o=s.length;o--;)B+=1,(a=t[g][0]-s[o].x)>0&&a*a>s[o].r?(l.push(s[o]),s.splice(o,1)):a*a+(d=t[g][1]-s[o].y)*d-s[o].r>9.5367431640625e-7||(A+=1,c.push(s[o].i,s[o].j,s[o].j,s[o].k,s[o].k,s[o].i),s.splice(o,1));for(N(c),o=c.length;o;)p=c[--o],f=c[--o],s.push(I(t,f,p,g))}for(r=s.length;r--;)l.push(s[r]);for(s.length=0,r=l.length;r--;)l[r].i<i&&l[r].j<i&&l[r].k<i&&s.push(l[r].i,l[r].j,l[r].k);return s}};const W=(t,e,i,r,o,h,n,s,l)=>{for(let n=0;n<t.length-1;n+=1){const{x:s,y:c,r:a}=t[n];let d=constrain(map(dist(s,c,h.x,h.y),0,width/h.gravity,.2*a,a),.2*a,1.2*a);push(),strokeWeight(constrain(map(dist(o.x,o.y,s,c),0,width/o.gravity,0,7.5*r),0,7.5*r)),noFill(),l&&(stroke(0),fill(0),circle(s,c,d)),stroke(i[0]),fill(i[0]),l||(stroke(e[0]),fill(e[0])),circle(s,c,d),pop()}},H=void 0;var L=t=>{const e=Uint32Array.from([0,0,0,0].map(((e,i)=>parseInt(t.substr(8*i+2,9),16)))),i=()=>{let t,i=e[3];return e[3]=e[2],e[2]=e[1],e[1]=t=e[0],i^=i<<11,i^=i>>>8,e[0]=i^t^t>>>19,e[0]/4294967296},r=(t,e)=>e?i()*(e-t)+t:i()*t,o=(t,e)=>Math.floor(r(t,e)),h=t=>t.length?t[o(0,t.length)]:void 0,n=t=>{let e=t.reduce(((t,e)=>t+e)),r=i()*e;for(let e=0;e<t.length;e++){if(r<t[e])return e;r-=t[e]}return 0},s=t=>{let e,r,o=t.length,h=t.slice();for(;o;)e=Math.floor(i()*o--),r=h[o],h[o]=h[e],h[e]=r;return h},l=(t,e)=>{let i;return s(t).slice(0,e)};return{rnd:i,range:r,rangeFloor:o,pick:h,weighted:n,shuffleArray:s,pickSome:l}};const V=void 0;var z=[["#ff6700","#ebebeb","#3a6ea5"],["#FDD6E8","#FA801C","#A94B51"],["#fa2d19","#3565a3","#f5d5d6"],["#9B0A0B","#745F67","#D5D8CD"],["#fa4659","#2eb872","#feffe4"],["#058581","#C6BC07","#EAEADE"],["#6639a6","#3490de","#6fe7dd"],["#ff206e","#fbff12","#41ead4"],["#047af6","#32fa00","#ff00d5"],["#708d81","#f4d58d","#bf0603"],["#fa110d","#ffffff","#fec3f0"],["#8d99ae","#edf2f4","#ef233c"],["#fffcf2","#ccc5b9","#eb5e28"],["#E3D0B1","#DB6C38","#009272"],["#01638d","#abcecc","#fff2cd"],["#213571","#77B494","#E34F24"],["#3F8A8C","#E5340B","#F28A0F","#FFE7BD"],["#C84837","#183045","#EBD3AD"],["#169b62","#5ec8e5","#f984ca","#ff4c65","#ffe800"],["#B59C89","#007C9B","#F4F5F4"],["#dd1c1a","#06aed5","#f0c808","#fff1d0"],["#2138ff","#FEC23B","#EAE8D5","#DA292C"],["#6d5bcf","#ffd400","#ff1080","#eadeda"],["#3FBBB9","#E92C41","#D0D1CE"],["#4375E2","#5CF7F5","#EC37DB","#FAEE44"],["#DF5024","#5E6359","#F4F5F4"],["#075ea8","#d9322b","#f3a606","#e1d2b3"]];let T;tokenData.hash="0xc10e04b14c241fd98dc83fe5f660b006563ce4567483529daf0ebe6e092b152b";const{hash:P}=tokenData;let _,j;const O=.75;let Y,q;function setup(){q=createCanvas(_,j),strokeCap(SQUARE);let r=width/1e3;strokeWeight(r),angleMod
Realities overlap and are reflected in the shards of hope for the proper world of geometric shapes. An endless loop of time, seeming changes, the absorption of one space by another, and futile attempts to make sense of and structure the reflection of the world within oneself. This is the concept of this project. It's a living infinite art. It responds to touches and mouse movements. Press space to pause. Press “s” to save png.
Factors:new Array(5).fill(null).map((()=>i(.8,1))),sSpeeds:new Array(5).fill(null).map((()=>i(10))),M:O})),v=F[0],F=[h[0]],B+=1}for(let t=0;t<W;t+=1)if(E){const{x:t,y:e}=E;let s=[];A[0]&&(s=p(R.points.filter((({x:i,y:s})=>{const h=B%4!=0||e<s;return y=B%2==1?.1*width:.001*width,dist(t,e,i,s)>y&&dist(t,e,i,s)<k&&dist(A[0].x,A[0].y,i,s)>y&&dist(A[0].x,A[0].y,i,s)<k&&h})))),A.length>0&&s.length>0&&R.triangles2.push(new m(Y,[E,A[0],s[0]],{opacity:i(.1,.7),sColor:R.backColor,bColor:R.backColor3,sFactor:i(.8,1),sSpeed:i(10),strokeSpeed:i(50,100),M:O})),E=A[0],A=[s[0]],B+=1}R.circles=new Array(h(1,7)).fill(null).map((()=>{const e=i(.05*width,.3*width),s=i(.05*width,.3*width);return new b(Y,{center:o(R.triangles).points[0],color:o(R.lerpColors),backColor:o(R.backColors),size1:e,size2:s,offsetX:i(.05*-e,.05*e),offsetY:i(.05*-e,.05*e),isColored:t()>.5,isOutside:t()>.7,outsideNoFill:t()>.5,speed1:i(10,30),speed2:i(10,30),diff:t()>.5})}));const L=i(.5*width),M=i(.5*height),X=i(width-L,.5*width),I=i(height-X,.5*height),P=X*i(.02,.05);R.rects=[],R.gridShearX=i(-5,5),R.gridShearY=i(-5,5);for(let t=L;t<X;t+=P)for(let e=M;e<I;e+=P)R.rects.push({x:t,y:e,w:P,h:P});R.ld=[i(5*O,30*O),i(5*O,20*O)],G=i(.1)},M()}function draw(){const{backColor:t,backColorN:e,backColor2:i,backColor3:s,rects:h,ld:o,gridShearX:r,gridShearY:n,circles:p,triangles:a,triangles2:l}=R,{mOffsetX:d,mOffsetY:c}=N,w=width/2+sin(100*G)*(width/2.2),f=height/2+cos(100*G)*(width/2.2),g=constrain(map(w-width/2,-width/2,width/2,-d,d),-d,d),x=constrain(map(f-height/2,-height/2,height/2,-c,c),-c,c),u=constrain(map(mouseX-width/2,-width/2,width/2,-d,d),-d,d),y=constrain(map(mouseY-height/2,-height/2,height/2,-c,c),-c,c),C=g+u,k=x+y;Y.background(255),Y.push(),Y.noStroke(),Y.fill(s),Y.rect(0,0,width,height),Y.pop();const b=map(cos(G*$+1),-1,1,.3,0),S=map(cos(G*z+1),-1,1,.5,1.2),m=map(cos(G*D+1),-1,1,5,0),v={x:width*b-C*m,y:width*b-k*m},E={x:width*(1-b)-C*m,y:width*b-k*m},F={x:width*(1-b)-C*m,y:height-width*b-k*m},A={x:width*b-C*m,y:height-width*b-k*m},W=map(sin(20*G),-1,1,0,v.y),B=map(sin(20*G),-1,1,height,A.y),L=map(sin(20*G),-1,1,0,v.x),M=map(sin(20*G),-1,1,width,E.x);Y.push(),Y.noStroke(),Y.fill(t),Y.beginShape(),Y.vertex(0,0),Y.vertex(L,W),Y.vertex(M,W),Y.vertex(Y.width,0),Y.endShape(CLOSE),Y.pop(),Y.push(),Y.stroke(0),Y.strokeWeight(2*O),Y.line(L,W,M,W),Y.pop(),Y.push(),Y.noStroke(),Y.fill(t),Y.beginShape(),Y.vertex(Y.width,0),Y.vertex(M,W),Y.vertex(M,B),Y.vertex(Y.width,Y.height),Y.endShape(CLOSE),Y.pop(),Y.push(),Y.stroke(0),Y.strokeWeight(2*O),Y.line(M,W,M,B),Y.pop(),Y.push(),Y.noStroke(),Y.fill(t),Y.beginShape(),Y.vertex(Y.width,Y.height),Y.vertex(M,B),Y.vertex(L,B),Y.vertex(0,Y.height),Y.endShape(CLOSE),Y.pop(),Y.push(),Y.stroke(0),Y.strokeWeight(2*O),Y.line(L,B,M,B),Y.pop(),Y.push(),Y.noStroke(),Y.fill(t),Y.beginShape(),Y.vertex(0,Y.height),Y.vertex(L,B),Y.vertex(L,W),Y.vertex(0,0),Y.endShape(CLOSE),Y.pop(),Y.push(),Y.stroke(0),Y.strokeWeight(2*O),Y.line(L,W,L,B),Y.pop(),Y.push(),Y.stroke(0),Y.strokeWeight(2*O),Y.line(0,0,v.x,v.y),Y.line(width,0,E.x,E.y),Y.line(width,height,F.x,F.y),Y.line(0,height,A.x,A.y),Y.fill(t),Y.rect(v.x,v.y,width*(1-2*b),height-width*b*2),Y.pop(),h.forEach((({x:e,y:s,w:h,h:o},p)=>{Y.push(),Y.strokeWeight(O),Y.shearX(r),Y.shearY(n),Math.round(p+400*G)%10==0?(Y.drawingContext.shadowColor=i,Y.drawingContext.shadowBlur=O,Y.drawingContext.shadowOffsetX=-g,Y.drawingContext.shadowOffsetY=-x,Y.fill(0)):Y.fill(t),Y.stroke(0),Y.rect(e,s,h,o),Y.pop()})),a.forEach(((t,e)=>{e%2==1&&t.draw(G,C,k)})),Y.push(),Y.drawingContext.shadowColor="black",Y.drawingContext.shadowBlur=O,Y.drawingContext.shadowOffsetX=2*-g,Y.drawingContext.shadowOffsetY=2*-x,Y.noFill(),Y.stroke(i),Y.strokeWeight(40*O),Y.rect(0,0,width,height),Y.pop(),Y.push(),Y.noFill(),Y.stroke(0),Y.strokeWeight(20*O),Y.rect(0,0,width,height),Y.strokeWeight(2*O),Y.rect(20*O,20*O,width-40*O,height-40*O),Y.pop(),p.forEach(((t,e)=>{e%3==2&&t.draw(G,C,k)})),p.forEach(((t,e)=>{e%3==1&&t.draw(G,C,k)})),Y.push(),Y.noFill(),Y.drawingContext.setLineDash(o),Y.drawingContext.lineDashOffset=1e3*G,Y.stroke(0),Y.strokeWeight(O),Y.beginShape();for(let t=0;t<a.length;t+=1)if(t%15==0){const[e,i,s]=a[t].points;Y.vertex(e.x-C,e.y+k),Y.vertex(i.x-C,i.y+k),Y.vertex(s.x-C,s.y+k)}Y.endShape(),Y.pop(),p.forEach(((t,e)=>{e%3==0&&t.draw(G,C,k)})),a.forEach(((t,e)=>{e%2==0&&t.draw(G)})),push(),noStroke(),rect(0,0,width,height),drawingContext.clip(),image(Y,0,0),pop(),push(),noFill(),stroke(0),strokeWeight(20*O),rect(0,0,width,height),strokeWeight(O),rect(20*O,20*O,width-40*O,height-40*O),pop();const I=map(cos(G*H),-1,1,0,255);l.forEach(((t,e)=>{e%2==0&&t.draw(C,k,G)})),e.setAlpha(I),push(),stroke(0,I),strokeWeight(O),line(0,0,v.x,v.y),line(width,0,E.x,E.y),line(width,height,F.x,F.y),line(0,height,A.x,A.y),fill(e),rect(v.x,v.y,width*(1-2*b),height-width*b*2),translate(width/2-C,height/2-k),scale(S),translate(-(width/2-C),-(height/2-k)),drawingContext.clip(),image(X,0,0),pop(),p.forEach(((t,e)=>{e%3==0&&t.draw2(G,C,k,map(cos(100*G),-1,1,0,255))})),l.forEach(((t,e)=>{e%2==1&&t.draw(-C,-k,G)})),G+=5e-5}const I=()=>{console.log("click")};window.addEventListener("click",I),window.addEventListener("touchstart",I);let P=!0;function windowResized(){const t=void 0,e=X.canvas.style;let i,s;.75*window.innerHeight>=window.innerWidth?(i=window.innerWidth,s=window.innerWidth/.75):(s=window.innerHeight,i=.75*window.innerHeight),e.position="absolute",e.display="block",e.top=e.left=e.right=e.structure="0",e.width=`${i}px`,e.height=`${s}px`}window.addEventListener("keydown",(t=>{"s"===t.key&&saveCanvas(tokenData.hash,"png")," "===t.key&&(P?(noLoop(),P=!1):(loop(),P=!0))}));
const t=void 0;var e=t=>{const e=Uint32Array.from([0,0,0,0].map(((e,i)=>parseInt(t.substr(8*i+2,8),16)))),i=()=>{let t,i=e[3];return e[3]=e[2],e[2]=e[1],e[1]=t=e[0],i^=i<<11,i^=i>>>8,e[0]=i^t^t>>>19,e[0]/4294967296},s=(t=.5)=>i()<t,h=void 0,o=(t,e)=>e?i()*(e-t)+t:i()*t,r=(t,e)=>Math.floor(o(t,e)),n=t=>t.length?t[r(0,t.length)]:void 0,p=t=>{let e=t.reduce(((t,e)=>t+e)),s=i()*e;for(let e=0;e<t.length;e++){if(s<t[e])return e;s-=t[e]}return 0};let a=!1,l=null;const d=(t,e)=>{if(a){a=!1;let i=l;return l=null,t+e*i}{let s=0,h=0,o=0;do{s=2*i()-1,h=2*i()-1,o=s*s+h*h}while(o>=1||0===o);let r=Math.sqrt(-2*Math.log(o)/o);return l=h*r,a=!0,t+e*(s*r)}},c=(t,e)=>{let i;return w(t).slice(0,e)},w=t=>{let e,s,h=t.length,o=t.slice();for(;h;)e=Math.floor(i()*h--),s=o[h],o[h]=o[e],o[e]=s;return o};return{rnd:i,chance:s,bool:s,range:o,rangeFloor:r,pick:n,pickSome:c,weighted:p,shuffleArray:w,gaussian:d}};const i=void 0;var s=[["#5E1C9F",["#4375E2","#5CF7F5","#EC37DB","#FAEE44","#FF636A"]],["#0B0835",["#3F8A8C","#E5340B","#FFE7BD"]],["#4C0082",["#F14A39","#AA0067","#D6BC4B","#1E67AF"]],["#252422",["#fffcf2","#ccc5b9","#403d39","#eb5e28"]],["#032b43",["#d00000","#ffba08","#3f88c5"]],["#000000",["#ffffff","#dddddd","#ffffff","#999999"]],["#100c08",["#ff206e","#fbff12","#41ead4"]],["#00204a",["#d9faff","#00bbf0","#005792"]],["#2d2d2d",["#ffffff","#fec3f0","#fa110d","#54282a"]],["#2289b6",["#94afc0","#f7bd40","#e0160a"]],["#102E4D",["#E3E3E3","#B7181E","#E4AA11","#09678A"]],["#202532",["#047af6","#7401df","#32fa00","#ff00d5"]],["#323031",["#177e89","#084c61","#db3a34","#ffc857"]],["#4B1351",["#AC314B","#DFE5E4","#285599","#E0AB56"]],["#001524",["#15616d","#ffecd1","#ff7d00","#78290f"]],["#001427",["#708d81","#f4d58d","#bf0603","#8d0801"]],["#0d0b0b",["#d80056","#ff8c01","#ecedef","#5cb8d7"]],["#0e0e0e",["#d9322b","#f3a606","#075ea8","#e1d2b3"]],["#075ea8",["#d9322b","#f3a606","#e1d2b3"]],["#2138ff",["#FEC23B","#EAE8D5","#DA292C"]]];const h=(t,e,i)=>t.map(((s,h)=>lerp(t[h],e[h],i))),o=t=>[...t.substr(1)].reduce(((t,e,i,s)=>i%2?t.concat(parseInt(`${s[i-1]}${s[i]}`,16)):t),[]),r=(t,e)=>{const i=[],s=Math.ceil(e/t.length),r=1/s,n=t.map((t=>o(t)));for(let t=0;t<n.length;t+=1)for(let e=0;e<s;e+=1){const s=n[t],o=n[(t+1)%n.length];i.push(h(s,o,(e+1)*r))}return i},n=(t,e,i)=>Array.isArray(e)?e[t*e.length|0]:e||0===e?i||0===i?(e>i&&([e,i]=[i,e]),e+t()*(i-e)):t()*e:t(),p=(t,e,i,s,h,o,r,a,l,d)=>{if(h--,(d-=1)>0||h>=0&&n(l)<r)if(i>=s){let c=i*n(l,a[0],a[1]);p(t,e,c,s,h,o,r,a,l,d),p(t+c,e,i-c,s,h,o,r,a,l,d)}else{let c=s*n(l,a[0],a[1]);p(t,e,i,c,h,o,r,a,l,d),p(t,e+c,i,s-c,h,o,r,a,l,d)}else o.push({x:t,y:e,w:i,h:s,n:h})},a=(t,e,i,s,h,o,r=.7,n,p)=>{if(h--,p||h>=0&&n()<r){let p=i/2,l=s/2;a(t,e,p,l,h,o,r,n),a(t+p,e,p,l,h,o,r,n),a(t+p,e+l,p,l,h,o,r,n),a(t,e+l,p,l,h,o,r,n)}else o.push({x:t,y:e,w:i,h:s,n:h})},l=(t,e,i,s,h,o,r)=>{const n=t.drawingContext.createLinearGradient(e,i,s,h);return o.forEach(((t,e)=>n.addColorStop(t,r[e]))),t.drawingContext.fillStyle=n,n},d=(t,e,i,s,h,o)=>{const r=drawingContext.createLinearGradient(t,e,i,s);return h.forEach(((t,e)=>r.addColorStop(t,o[e]))),drawingContext.fillStyle=r,r},c=(t,e,i,s,h,o)=>{const r=t.drawingContext.createRadialGradient(e,i,0,e,i,s);return h.forEach(((t,e)=>r.addColorStop(t,o[e]))),t.drawingContext.fillStyle=r,r},w=(t,e,i,s,h)=>{const o=[];for(let r=0;r<h-1;r+=1){const n=lerp(t,i,r/(h-1)),p=lerp(e,s,r/(h-1));o.push({x:n,y:p})}return o.push({x:i,y:s}),o},f=(t,e,i,s,h)=>{const o=[];for(let r=0;r<i;r+=1)o.push({x:t+s*cos(h),y:e+s*sin(h)}),h+=360/i;return o},g=(t,e,i,s,h,o)=>{const r=f(t,e,s,h,o),n=i/s,p=[];for(let t=0;t<s;t+=1)for(let e=0;e<n;e+=1){const i=lerp(r[t].x,r[(t+1)%r.length].x,e/n),s=lerp(r[t].y,r[(t+1)%r.length].y,e/n);p.push({x:i,y:s})}return p},x=void 0;var u=(t,e,i,s,h,o,r,n,p)=>{const a=[];for(let l=0;l<=p;l+=1){const d=l/p,c=bezierPoint(t,i,h,r,d),w=bezierPoint(e,s,o,n,d);a.push({x:c,y:w})}return a};class y{constructor(t,e,i){this.p=t,this.points=e,this.opts=i}draw(t,e,i){const[s,h,o]=this.points,{r:r,backColor:n,isBlack:p,isCircle:a,circle1:d,circle2:c,circle3:w,col:f,speed1:g,offsetX:x,offsetY:u,circleSw:y,sFactors:C,sSpeeds:k,M:b}=this.opts,S=map(cos(t*g),-1,1,0,1.5);this.p.push(),r>.9?(this.p.push(),this.p.translate(this.p.width/2,this.p.height/2),this.p.scale(map(cos(t*k[0]),-1,1,1,C[0])),this.p.translate(-this.p.width/2,-this.p.height/2),this.p.stroke(0),this.p.noFill(),this.p.beginShape(),this.p.vertex(s.x,s.y),this.p.vertex(h.x,h.y),this.p.vertex(o.x,o.y),this.p.endShape(CLOSE),this.p.fill(0),this.p.circle(s.x,s.y,.01*width),this.p.circle(h.x,h.y,.01*width),this.p.circle(o.x,o.y,.01*width),this.p.pop(),a&&(this.p.push(),this.p.translate(this.p.width/2,this.p.height/2),this.p.scale(map(cos(t*k[1]),-1,1,1,C[1])),this.p.translate(-this.p.width/2,-this.p.height/2),this.p.stroke(0),this.p.strokeWeight(y),this.p.fill(0),this.p.circle(s.x+i,s.y+e,d),this.p.noFill(),this.p.circle(s.x+i,s.y+e,c),this.p.pop())):r>.7?(this.p.push(),this.p.translate(this.p.width/2,this.p.height/2),this.p.scale(map(cos(t*k[2]),-1,1,1,C[2])),this.p.translate(-this.p.width/2,-this.p.height/2),this.p.drawingContext.shadowColor="rgba(0, 0, 0, 0.5)",this.p.drawingContext.shadowBlur=b,this.p.drawingContext.shadowOffsetX=x+e,this.p.drawingContext.shadowOffsetY=u+i,this.p.noStroke(),l(this.p,s.x,s.y,lerp(h.x,o.x,S),lerp(h.y,o.y,S),[0,1],[f,n]),this.p.beginShape(),this.p.vertex(s.x+e,s.y+i),this.p.vertex(h.x+e,h.y+i),this.p.vertex(o.x+e,o.y+i),this.p.endShape(CLOSE),this.p.pop()):r>.65?(this.p.push(),this.p.translate(this.p.width/2,this.p.height/2),this.p.scale(map(cos(t*k[3]),-1,1,1,C[3])),this.p.translate(-this.p.width/2,-this.p.height/2),this.p.noStroke(),this.p.fill(p?0:n),this.p.beginShape(),this.p.vertex(s.x-e,s.y-i),this.p.vertex(h.x-e,h.y-i),this.p.vertex(o.x-e,o.y-i),this.p.endShape(CLOSE),this.p.pop()):r>.4&&(this.p.push(),this.p.translate(this.p.width/2,this.p.height/2),this.p.scale(map(cos(t*k[4]),-1,1,1,C[4])),this.p.translate(-this.p.width/2,-this.p.height/2),this.p.fill(0,255),this.p.circle(s.x-e,s.y+i,w),this.p.pop()),this.p.pop()}}var C=y;class k{constructor(t,e){this.p=t,this.opts=e}draw(t,e,i){const{center:s,color:h,backColor:o,offsetX:r,offsetY:n,size1:p,size2:a,isColored:l,isOutside:d,outsideNoFill:c,speed1:w,speed2:f,diff:g}=this.opts;this.p.push(),this.p.stroke(0),l?this.p.fill(h):this.p.fill(0),this.p.circle(s.x+map(sin(t*w),-1,1,-r,r)-e,s.y+map(cos(t*f),-1,1,-n,n)-i,p),g&&(this.p.drawingContext.globalCompositeOperation="difference"),this.p.fill(o),this.p.circle(s.x,s.y,p),this.p.pop(),d&&(this.p.push(),this.p.stroke(0),c?this.p.noFill():this.p.fill(o),this.p.circle(s.x+map(sin(t*f),-1,1,-r,r)-e,s.y+map(cos(t*w),-1,1,-n,n)-i,a),this.p.pop())}draw2(t,e,i,s){const{center:h,offsetX:o,offsetY:r,size1:n,size2:p,isOutside:a,speed1:l,speed2:d}=this.opts;push(),stroke(0,s),noFill(),circle(h.x+map(sin(t*l),-1,1,-o,o)-e,h.y+map(cos(t*d),-1,1,-r,r)-i,n),circle(h.x,h.y,n),pop(),a&&(push(),noFill(),circle(h.x+map(sin(t*d),-1,1,-o,o)-e,h.y+map(cos(t*l),-1,1,-r,r)-i,p),pop())}}var b=k;class S{constructor(t,e,i){this.p=t,this.points=e,this.opts=i}draw(t,e,i){const[s,h,o]=this.points,{sColor:r,bColor:n,opacity:p,sFactor:a,sSpeed:l,strokeSpeed:d,M:c}=this.opts;push(),translate(width/2,height/2),scale(map(cos(i*l),-1,1,1,a)),translate(-width/2,-height/2),noStroke(),strokeWeight(2*c),stroke(0,map(cos(i*d),-1,1,0,255)),beginShape(),drawingContext.shadowColor=`rgba(0, 0, 0, ${p})`,drawingContext.shadowColor=r,drawingContext.shadowBlur=c,drawingContext.shadowOffsetX=-t,drawingContext.shadowOffsetY=-e,fill(n),vertex(s.x,s.y),vertex(h.x,h.y),vertex(o.x,o.y),endShape(CLOSE),drawingContext.clip(),image(this.p,t/2,e/2),pop()}}var m=S;let v=1e3,E=window.innerWidth,F=window.innerHeight,A,O=Math.min(E,F)/1e3,W,B;const L=.75;let M,X,Y,$,D,z,H,G;.75*window.innerHeight>=window.innerWidth?(W=window.innerWidth,B=window.innerWidth/.75):(B=window.innerHeight,W=.75*window.innerHeight);const N={count:1e4,mOffsetX:5*O,mOffsetY:5*O*1.25},R={};function setup(){X=createCanvas(W,B),strokeWeight(O),Y=createGraphics(W,B),Y.strokeWeight(2*O),Y.angleMode(DEGREES),Y.strokeCap(SQUARE),Y.strokeWeight(2*O),M=()=>{const{rnd:t,range:i,rangeFloor:h,pick:o,pickSome:r,gaussian:n,shuffleArray:p}=e(tokenData.hash),calculateFeatures=()=>{const t={},e=h(s.length-1),i=s[e];return t.palette=i,t},{palette:a}=calculateFeatures(),l=[a[0],...p(a[1])],{count:d}=N;R.lerpColors=l.map((t=>color(t))),R.backColors=a[1].map((t=>{const e=color(t);return e.setAlpha(255),e}));const[c,w]=r(R.backColors);$=i(3,6),D=i(3,7.5),z=i(3,9),H=i(30,200),R.backColor=color(`hsb(${Math.round(hue(c))}, ${saturation(c)/2}%, ${2*lightness(c)}%)`),R.backColorN=color(`hsb(${Math.round(hue(c))}, ${saturation(c)/2}%, ${2*lightness(c)}%)`),R.backColor3=color(`hsb(${Math.round(1.1*hue(c))}, ${saturation(c)/2}%, ${2*lightness(c)}%)`),R.backColor2=w,R.points=[];const f=i(.1*width,.9*width),g=width-f;let x=u(f,i(.2*height,.4*height),g,.25*height,f,.75*height,g,i(.9*height,height),d);t()>.5&&(x=x.reverse());for(let t=0;t<x.length;t+=1){const{x:e,y:i}=x[t],s=e+n(0,10)*width*.02,h=i+n(0,10)*width*.02;R.points.push({x:s,y:h})}R.triangles=[],R.triangles2=[];let y=.01*width,k=.6*width;const S=R.points.filter((({y:t})=>t<.03*height));let v=o(S),E=o(S),F,A;if(v){const{x:t,y:e}=v;F=p(R.points.filter((({x:i,y:s})=>dist(t,e,i,s)>y&&dist(t,e,i,s)<k&&s>e))),A=p(R.points.filter((({x:i,y:s})=>dist(t,e,i,s)>y&&dist(t,e,i,s)<k&&s>e)))}const W=20;let B=0;for(let e=0;e<W;e+=1)if(v){const{x:e,y:s}=v;let h=[];F[0]&&(h=p(R.points.filter((({x:t,y:i})=>{const h=B%4!=0||s<i;return y=B%2==1?.1*width:.001*width,dist(e,s,t,i)>y&&dist(e,s,t,i)<k&&dist(F[0].x,F[0].y,t,i)>y&&dist(F[0].x,F[0].y,t,i)<k&&h})))),F.length>0&&h.length>0&&R.triangles.push(new C(Y,[v,F[0],h[0]],{r:t(),isBlack:t()>.5,isCircle:t()>.8,circle1:i(.01*width,.04*width),circle2:i(.07*width,.12*width),circle3:i(.01*width),col:o(R.lerpColors),backColor:R.backColor,speed1:i(10,30),offsetX:i(.01*-width,.01*width),offsetY:i(.01*-width,.01*width),circleSw:i(O,3*O),s
1-50 of 109