memoscan
← all memos

Memo 0x5b964cb0…f16693 on Ethereum

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