0xe4f5…f7b9

All memos sent from and to 0xe4f5…f7b9.

,bt);z("Lavender",Mt);z("GreenInThe trees",Lt);z("bleuets1new",St);z("Blue Autumn 2",yt);z("Summer classic b",mt);z("Spring classic2",At);z("redBlueDark4b",vt);z("Impressionnist4b2",xt);z("pinkSakuraEtcB",Pt);z("Pink2",Tt);z("Autumn new pale",_t);z("Autumn gold 2c",pt);z("blueblue2",wt);z("garden2",Ct);z("bleuetsnew",Dt);const fe={skipPattern:!1,color:"hsl( 125, 50%, 50% )",countLines:1e6,alpha:.4,lengthA:20,rotationType:0};class Sa{constructor(){this._isFirst=!0,this.isNewHash=!1}generate(){if(console.log(`[${a.id}] Generating params...`),this._idx=-1,this.isNewHash||this._isFirst){const e=[2,2,4,8];let t=e[a.rand()*e.length>>0];c.compositionsData.divider=t;const s=a.rand()*ye.length>>0;c.paletteData.palette=s,a.palettes=[s];const i=Array.from({length:ye.length},(n,l)=>l).filter(n=>n!==s);for(let n=0;n<3;n++){const l=Math.floor(a.rand()*i.length);a.palettes.push(i[l]),i.splice(l,1)}a.idxPalette=0,t<8&&(c.gridPatternData.linesGridAlpha=.7),this.isBroken=!0,this.isBrokenVerticaly=!0,this.isExtraBrokenVerticaly=!1,t<=4?t==4?(this.isBroken=a.rand()<.5,this.isBrokenVerticaly=a.rand()<.25):t==2&&(this.isBroken=a.rand()<.5,this.isBrokenVerticaly=a.rand()<.25):(this.isBroken=a.rand()<.8,this.isBrokenVerticaly=a.rand()<.5,this.isExtraBrokenVerticaly=a.rand()<.25,!this.isBroken&&this.isBrokenVerticaly&&this.isExtraBrokenVerticaly&&(this.isBroken=!0)),this.isSmallTrees=!1}(this._isFirst||this.divider!==c.compositionsData.divider)&&(this.divider=c.compositionsData.divider,this.divider==4?(c.gridData.divisions.chance=.96,c.gridData.divisions.friction=.93,c.gridData.divisions.maxDivisions=6):this.divider==2?(c.gridData.divisions.chance=.98,c.gridData.divisions.friction=.95,c.gridData.divisions.maxDivisions=7):this.divider==8&&(c.gridData.divisions.chance=.83,c.gridData.divisions.friction=.89,c.gridData.divisions.maxDivisions=5),this.isBroken=a.rand()<.5,this.isBroken=!0),this._isFirst=!1,this.isNewHash=!1,this.refreshLayers()}refreshLayers(){this.layers=[];const e=c.compositionsData.layers;this.layers.push(this._createLayer(e.background));for(let s=0;s<5;s++)this.layers.push(this._createLayer(e[`greenLayer${s+1}`]));const t=this._createTreesLayer();c.compositionsData.putTreesBefore?this.layers.splice(this.layers.length-1,0,t):this.layers.push(t),this.layers.push(this._createLayer(e.windLayer));for(let s=0;s<4;s++)s==2&&this.layers.push(this._createFlowersLayer()),this.layers.push(this._createLayer(e[`flowerLayer${s+1}`]));this.layers.push(this._createLayer(e.blueWindLayer)),this.layers.push(this._createLayer(e.greenFlowerLayer)),this.layers.push(this._createLayer(e.bonusLayer))}_createLayer(e){let t={};for(const s in e.params)t[s]=e.params[s].value;if(t.type="vege",t.id=++this._idx,t.patternId="classic",t={...fe,...t},e.noise){t.noise={};for(const s in e.noise.params)t.noise[s]=e.noise.params[s].value}return t}_createTreesLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="tree",e.skipPattern=!1,e}_createFlowersLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="flowers",e.skipPattern=!1,e}_createGridLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="grid",e.skipPattern=!1,e}}function Da(){const r=document.createElement("div");r.className="ryokans-menu",r.style.display="none";const e=document.createElement("style");e.innerHTML=` .ryokans-menu-action-button { width: 60px; height: 60px; border: 1px solid #fff; color: #fff; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 0.5em; cursor: pointer; margin: 5px; transition: background 0.2s, color 0.2s; text-align: center; opacity: .35; background: rgba(0,0,0,0.8); } .ryokans-menu-action-button:hover { background: rgba(255,255,255,0.1); } `,document.head.appendChild(e);const t=new URLSearchParams(window.location.search),s=t.get("fullscreen")==="true",i=t.get("dpr")||"0.5",n=[s?{label:"Centered",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fullscreen","false"),window.location.href=u.toString()}}:{label:"Fullscreen",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fullscreen","true"),window.location.href=u.toString()}},i==="1"?{label:"LD",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("dpr","0.5"),window.location.href=u.toString()}}:{label:"HD",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("dpr","1"),window.location.href=u.toString()}},t.get("fixed")==="true"?{label:"Animated",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fixed","false"),window.location.href=u.toString()}}:{label:"Fixed",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fixed","true"),window.location.href=u.toString()}}];n.push({label:"Save",onClick:()=>{zt(a.gl.canvas)}}),document.body.appendChild(r),n.forEach(({label:u,onClick:f})=>{const g=document.createElement("button");g.className="ryokans-menu-action-button",g.innerText=u,g.onclick=f,r.appendChild(g)});let l=null;function o(){r.style.display="flex",r.style.justifyContent="center",r.style.alignItems="center",r.style.position="fixed",r.style.left="0",r.style.right="0",r.style.bottom="10px",r.style.top="",r.style.zIndex="1000",l&&clearTimeout(l),l=setTimeout(h,2e3)}function h(){r.style.display="none"}function d(){o()}window.addEventListener("mousemove",d),window.addEventListener("touchstart",d),h()}function Ca(){const r=a.sketch,e=a.generator,t=a.artwork;document.body.style.backgroundColor="#17140b",a.renderStartTime=performance.now(),t.init().then(async function(){r.setBgColor(c.backgroundData.globalBackgroundColor),r.clear(),ht.resetHash(),e.generate(),console.warn("First rand: ",a.rand()),console.warn("First rand 2: ",a.rand2()),c.isDirty=!0,a.seed=a.rand()*1e3,await t.generate(),await t.prerenderAnimated(),a.loader?.update(),Da(),await t.renderMoments(),r.artwork=t.texture,r.renderWebGL({options:c.postprocessData,displayArtwork:t!=null}),a.onRender.dispatch();let s=0;const i=async()=>{await t.regenerateAndRenderGrids(),await t.reRenderAnimated(),s=0,Be.add(n)},n=()=>{s+=1,s%1400===0&&(Be.remove(n),i())};!a.isRender&&!a.isFixed&&Be.add(n)}),Gt.add(()=>{t.renderAnimated(),r.artwork=t.textureAnimated,r.renderWebGL({options:c.postprocessData,displayArtwork:t!=null})})}class Aa{constructor(e,t={}){this.options={color:"#fff",width:"30%",...t},this.steps=7,this.step=1/this.steps,this.progress=0,this.progressRender=.001,this.progressRenderLocal=.001,this._isVisible=!1,this.element=document.createElement("div"),this.element.className="ryokan-loader",this.element.style.width="30%",this.element.style.zIndex="9999",this.element.style.position="absolute",this.element.style.bottom=0,this.element.style.left="50%",this.element.style.transform="translate(-50%, -50%)",this.element.style.backgroundColor="#17140B",this.element.style.padding="20px",this.element.style.border="1px solid #fff",this.barContainer=document.createElement("div"),this.barContainer.className="ryokan-loader-bar-container",this.barContainer.style.height="4px",this.barContainer.style.backgroundColor="#000",this.barContainer.style.opacity=.8,this.barContainer.style.overflow="hidden",this.barContainer.style.position="relative",this.bar=document.createElement("div"),this.bar.className="ryokan-loader-bar",this.bar.style.height="100%",this.bar.style.width="0%",this.bar.style.backgroundColor="#fff",this.bar.style.transition="width 0.3s ease-in-out",this.bar.style.position="absolute",this.bar.style.left="0",this.bar.style.top="0",this.barContainer.appendChild(this.bar),this.element.appendChild(this.barContainer),e&&(typeof e=="string"?document.querySelector(e).appendChild(this.element):e.appendChild(this.element)),this.setProgress(0)}update(){return this.progress+=this.step,this.setProgress(this.progress),this}setProgress(e){const t=Math.max(0,Math.min(1,e));return this.bar.style.width=`${t*100>>0}%`,this}setProgressRender(e){this.progressRender=e}setProgressRenderLocal(e){this.progressRenderLocal=e}getElement(){return this.element}show(){this._isVisible=!0,this.setProgress(0),this.element.style.display="block"}hide(){this._isVisible&&(this._isVisible=!1,this.element.style.display="none")}}ht.start(ls);ft.init(Oe);c.registerGUI(ft);a.data=c;c.init();new Gi(c);const qe=new kr(a.size.width,a.size.height);qe.initWebGL();qe.setBgColor(c.backgroundData.globalBackgroundColor);a.sketch=qe;const Pa=new La;a.artwork=Pa;const Ta=new Sa;a.generator=Ta;function za(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}if(za()){const r=document.createElement("div");r.innerText="Please open this page on a desktop for the full experience.",r.style.position="fixed",r.style.top="50%",r.style.left="50%",r.style.transform="translate(-50%, -50%)",r.style.backgroundColor="rgba(0,0,0,0.85)",r.style.color="#fff",r.style.padding="24px 32px",r.style.fontSize="12px",r.style.textAlign="center",r.style.maxWidth="90vw",document.body.appendChild(r)}else{const r=new Aa(document.body,{color:"#000",height:"10px"});a.loader=r,a.loader.show(),Ca()}
,bt);z("Lavender",Mt);z("GreenInThe trees",Lt);z("bleuets1new",St);z("Blue Autumn 2",yt);z("Summer classic b",mt);z("Spring classic2",At);z("redBlueDark4b",vt);z("Impressionnist4b2",xt);z("pinkSakuraEtcB",Pt);z("Pink2",Tt);z("Autumn new pale",_t);z("Autumn gold 2c",pt);z("blueblue2",wt);z("garden2",Ct);z("bleuetsnew",Dt);const fe={skipPattern:!1,color:"hsl( 125, 50%, 50% )",countLines:1e6,alpha:.4,lengthA:20,rotationType:0};class Sa{constructor(){this._isFirst=!0,this.isNewHash=!1}generate(){if(console.log(`[${a.id}] Generating params...`),this._idx=-1,this.isNewHash||this._isFirst){const e=[2,2,4,8];let t=e[a.rand()*e.length>>0];c.compositionsData.divider=t;const s=a.rand()*ye.length>>0;c.paletteData.palette=s,a.palettes=[s];const i=Array.from({length:ye.length},(n,l)=>l+1).filter(n=>n!==s);for(let n=0;n<3;n++){const l=Math.floor(a.rand()*i.length);a.palettes.push(i[l]),i.splice(l,1)}a.idxPalette=0,t<8&&(c.gridPatternData.linesGridAlpha=.7),this.isBroken=!0,this.isBrokenVerticaly=!0,this.isExtraBrokenVerticaly=!1,t<=4?t==4?(this.isBroken=a.rand()<.5,this.isBrokenVerticaly=a.rand()<.25):t==2&&(this.isBroken=a.rand()<.5,this.isBrokenVerticaly=a.rand()<.25):(this.isBroken=a.rand()<.8,this.isBrokenVerticaly=a.rand()<.5,this.isExtraBrokenVerticaly=a.rand()<.25,!this.isBroken&&this.isBrokenVerticaly&&this.isExtraBrokenVerticaly&&(this.isBroken=!0)),this.isSmallTrees=!1}(this._isFirst||this.divider!==c.compositionsData.divider)&&(this.divider=c.compositionsData.divider,this.divider==4?(c.gridData.divisions.chance=.96,c.gridData.divisions.friction=.93,c.gridData.divisions.maxDivisions=6):this.divider==2?(c.gridData.divisions.chance=.98,c.gridData.divisions.friction=.95,c.gridData.divisions.maxDivisions=7):this.divider==8&&(c.gridData.divisions.chance=.83,c.gridData.divisions.friction=.89,c.gridData.divisions.maxDivisions=5),this.isBroken=a.rand()<.5,this.isBroken=!0),this._isFirst=!1,this.isNewHash=!1,this.refreshLayers()}refreshLayers(){this.layers=[];const e=c.compositionsData.layers;this.layers.push(this._createLayer(e.background));for(let s=0;s<5;s++)this.layers.push(this._createLayer(e[`greenLayer${s+1}`]));const t=this._createTreesLayer();c.compositionsData.putTreesBefore?this.layers.splice(this.layers.length-1,0,t):this.layers.push(t),this.layers.push(this._createLayer(e.windLayer));for(let s=0;s<4;s++)s==2&&this.layers.push(this._createFlowersLayer()),this.layers.push(this._createLayer(e[`flowerLayer${s+1}`]));this.layers.push(this._createLayer(e.blueWindLayer)),this.layers.push(this._createLayer(e.greenFlowerLayer)),this.layers.push(this._createLayer(e.bonusLayer))}_createLayer(e){let t={};for(const s in e.params)t[s]=e.params[s].value;if(t.type="vege",t.id=++this._idx,t.patternId="classic",t={...fe,...t},e.noise){t.noise={};for(const s in e.noise.params)t.noise[s]=e.noise.params[s].value}return t}_createTreesLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="tree",e.skipPattern=!1,e}_createFlowersLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="flowers",e.skipPattern=!1,e}_createGridLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="grid",e.skipPattern=!1,e}}function Da(){const r=document.createElement("div");r.className="ryokans-menu",r.style.display="none";const e=document.createElement("style");e.innerHTML=` .ryokans-menu-action-button { width: 60px; height: 60px; border: 1px solid #fff; color: #fff; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 0.5em; cursor: pointer; margin: 5px; transition: background 0.2s, color 0.2s; text-align: center; opacity: .35; background: rgba(0,0,0,0.8); } .ryokans-menu-action-button:hover { background: rgba(255,255,255,0.1); } `,document.head.appendChild(e);const t=new URLSearchParams(window.location.search),s=t.get("fullscreen")==="true",i=t.get("dpr")||"0.5",n=[s?{label:"Centered",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fullscreen","false"),window.location.href=u.toString()}}:{label:"Fullscreen",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fullscreen","true"),window.location.href=u.toString()}},i==="1"?{label:"LD",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("dpr","0.5"),window.location.href=u.toString()}}:{label:"HD",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("dpr","1"),window.location.href=u.toString()}},t.get("fixed")==="true"?{label:"Animated",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fixed","false"),window.location.href=u.toString()}}:{label:"Fixed",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fixed","true"),window.location.href=u.toString()}}];n.push({label:"Save",onClick:()=>{zt(a.gl.canvas)}}),document.body.appendChild(r),n.forEach(({label:u,onClick:f})=>{const g=document.createElement("button");g.className="ryokans-menu-action-button",g.innerText=u,g.onclick=f,r.appendChild(g)});let l=null;function o(){r.style.display="flex",r.style.justifyContent="center",r.style.alignItems="center",r.style.position="fixed",r.style.left="0",r.style.right="0",r.style.bottom="10px",r.style.top="",r.style.zIndex="1000",l&&clearTimeout(l),l=setTimeout(h,2e3)}function h(){r.style.display="none"}function d(){o()}window.addEventListener("mousemove",d),window.addEventListener("touchstart",d),h()}function Ca(){const r=a.sketch,e=a.generator,t=a.artwork;document.body.style.backgroundColor="#17140b",a.renderStartTime=performance.now(),t.init().then(async function(){r.setBgColor(c.backgroundData.globalBackgroundColor),r.clear(),ht.resetHash(),e.generate(),console.warn("First rand: ",a.rand()),console.warn("First rand 2: ",a.rand2()),c.isDirty=!0,a.seed=a.rand()*1e3,await t.generate(),await t.prerenderAnimated(),a.loader?.update(),Da(),await t.renderMoments(),r.artwork=t.texture,r.renderWebGL({options:c.postprocessData,displayArtwork:t!=null}),a.onRender.dispatch();let s=0;const i=async()=>{await t.regenerateAndRenderGrids(),await t.reRenderAnimated(),s=0,Be.add(n)},n=()=>{s+=1,s%1400===0&&(Be.remove(n),i())};!a.isRender&&!a.isFixed&&Be.add(n)}),Gt.add(()=>{t.renderAnimated(),r.artwork=t.textureAnimated,r.renderWebGL({options:c.postprocessData,displayArtwork:t!=null})})}class Aa{constructor(e,t={}){this.options={color:"#fff",width:"30%",...t},this.steps=7,this.step=1/this.steps,this.progress=0,this.progressRender=.001,this.progressRenderLocal=.001,this._isVisible=!1,this.element=document.createElement("div"),this.element.className="ryokan-loader",this.element.style.width="30%",this.element.style.zIndex="9999",this.element.style.position="absolute",this.element.style.bottom=0,this.element.style.left="50%",this.element.style.transform="translate(-50%, -50%)",this.element.style.backgroundColor="#17140B",this.element.style.padding="20px",this.element.style.border="1px solid #fff",this.barContainer=document.createElement("div"),this.barContainer.className="ryokan-loader-bar-container",this.barContainer.style.height="4px",this.barContainer.style.backgroundColor="#000",this.barContainer.style.opacity=.8,this.barContainer.style.overflow="hidden",this.barContainer.style.position="relative",this.bar=document.createElement("div"),this.bar.className="ryokan-loader-bar",this.bar.style.height="100%",this.bar.style.width="0%",this.bar.style.backgroundColor="#fff",this.bar.style.transition="width 0.3s ease-in-out",this.bar.style.position="absolute",this.bar.style.left="0",this.bar.style.top="0",this.barContainer.appendChild(this.bar),this.element.appendChild(this.barContainer),e&&(typeof e=="string"?document.querySelector(e).appendChild(this.element):e.appendChild(this.element)),this.setProgress(0)}update(){return this.progress+=this.step,this.setProgress(this.progress),this}setProgress(e){const t=Math.max(0,Math.min(1,e));return this.bar.style.width=`${t*100>>0}%`,this}setProgressRender(e){this.progressRender=e}setProgressRenderLocal(e){this.progressRenderLocal=e}getElement(){return this.element}show(){this._isVisible=!0,this.setProgress(0),this.element.style.display="block"}hide(){this._isVisible&&(this._isVisible=!1,this.element.style.display="none")}}ht.start(ls);ft.init(Oe);c.registerGUI(ft);a.data=c;c.init();new Gi(c);const qe=new kr(a.size.width,a.size.height);qe.initWebGL();qe.setBgColor(c.backgroundData.globalBackgroundColor);a.sketch=qe;const Pa=new La;a.artwork=Pa;const Ta=new Sa;a.generator=Ta;function za(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}if(za()){const r=document.createElement("div");r.innerText="Please open this page on a desktop for the full experience.",r.style.position="fixed",r.style.top="50%",r.style.left="50%",r.style.transform="translate(-50%, -50%)",r.style.backgroundColor="rgba(0,0,0,0.85)",r.style.color="#fff",r.style.padding="24px 32px",r.style.fontSize="12px",r.style.textAlign="center",r.style.maxWidth="90vw",document.body.appendChild(r)}else{const r=new Aa(document.body,{color:"#000",height:"10px"});a.loader=r,a.loader.show(),Ca()}
,bt);z("Lavender",Mt);z("GreenInThe trees",Lt);z("bleuets1new",St);z("Blue Autumn 2",yt);z("Summer classic b",mt);z("Spring classic2",At);z("redBlueDark4b",vt);z("Impressionnist4b2",xt);z("pinkSakuraEtcB",Pt);z("Pink2",Tt);z("Autumn new pale",_t);z("Autumn gold 2c",pt);z("blueblue2",wt);z("garden2",Ct);z("bleuetsnew",Dt);const fe={skipPattern:!1,color:"hsl( 125, 50%, 50% )",countLines:1e6,alpha:.4,lengthA:20,rotationType:0};class Sa{constructor(){this._isFirst=!0,this.isNewHash=!1}generate(){if(console.log(`[${a.id}] Generating params...`),this._idx=-1,this.isNewHash||this._isFirst){const e=[2,4,8];let t=e[a.rand()*e.length>>0];c.compositionsData.divider=t;const s=a.rand()*ye.length>>0;c.paletteData.palette=s,a.palettes=[s];const i=Array.from({length:ye.length},(n,l)=>l+1).filter(n=>n!==s);for(let n=0;n<3;n++){const l=Math.floor(a.rand()*i.length);a.palettes.push(i[l]),i.splice(l,1)}a.idxPalette=0,t<8&&(c.gridPatternData.linesGridAlpha=.7),this.isBroken=!0,this.isBrokenVerticaly=!0,this.isExtraBrokenVerticaly=!1,t<=4?t==4?(this.isBroken=a.rand()<.5,this.isBrokenVerticaly=a.rand()<.25):t==2&&(this.isBroken=a.rand()<.5,this.isBrokenVerticaly=a.rand()<.25):(this.isBroken=a.rand()<.8,this.isBrokenVerticaly=a.rand()<.5,this.isExtraBrokenVerticaly=a.rand()<.25,!this.isBroken&&this.isBrokenVerticaly&&this.isExtraBrokenVerticaly&&(this.isBroken=!0)),this.isSmallTrees=!1}(this._isFirst||this.divider!==c.compositionsData.divider)&&(this.divider=c.compositionsData.divider,this.divider==4?(c.gridData.divisions.chance=.96,c.gridData.divisions.friction=.93,c.gridData.divisions.maxDivisions=6):this.divider==2?(c.gridData.divisions.chance=.98,c.gridData.divisions.friction=.95,c.gridData.divisions.maxDivisions=7):this.divider==8&&(c.gridData.divisions.chance=.83,c.gridData.divisions.friction=.89,c.gridData.divisions.maxDivisions=5),this.isBroken=a.rand()<.5,this.isBroken=!0),this._isFirst=!1,this.isNewHash=!1,this.refreshLayers()}refreshLayers(){this.layers=[];const e=c.compositionsData.layers;this.layers.push(this._createLayer(e.background));for(let s=0;s<5;s++)this.layers.push(this._createLayer(e[`greenLayer${s+1}`]));const t=this._createTreesLayer();c.compositionsData.putTreesBefore?this.layers.splice(this.layers.length-1,0,t):this.layers.push(t),this.layers.push(this._createLayer(e.windLayer));for(let s=0;s<4;s++)s==2&&this.layers.push(this._createFlowersLayer()),this.layers.push(this._createLayer(e[`flowerLayer${s+1}`]));this.layers.push(this._createLayer(e.blueWindLayer)),this.layers.push(this._createLayer(e.greenFlowerLayer)),this.layers.push(this._createLayer(e.bonusLayer))}_createLayer(e){let t={};for(const s in e.params)t[s]=e.params[s].value;if(t.type="vege",t.id=++this._idx,t.patternId="classic",t={...fe,...t},e.noise){t.noise={};for(const s in e.noise.params)t.noise[s]=e.noise.params[s].value}return t}_createTreesLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="tree",e.skipPattern=!1,e}_createFlowersLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="flowers",e.skipPattern=!1,e}_createGridLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="grid",e.skipPattern=!1,e}}function Da(){const r=document.createElement("div");r.className="ryokans-menu",r.style.display="none";const e=document.createElement("style");e.innerHTML=` .ryokans-menu-action-button { width: 60px; height: 60px; border: 1px solid #fff; color: #fff; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 0.5em; cursor: pointer; margin: 5px; transition: background 0.2s, color 0.2s; text-align: center; opacity: .35; background: rgba(0,0,0,0.8); } .ryokans-menu-action-button:hover { background: rgba(255,255,255,0.1); } `,document.head.appendChild(e);const t=new URLSearchParams(window.location.search),s=t.get("fullscreen")==="true",i=t.get("dpr")||"0.5",n=[s?{label:"Centered",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fullscreen","false"),window.location.href=u.toString()}}:{label:"Fullscreen",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fullscreen","true"),window.location.href=u.toString()}},i==="1"?{label:"LD",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("dpr","0.5"),window.location.href=u.toString()}}:{label:"HD",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("dpr","1"),window.location.href=u.toString()}},t.get("fixed")==="true"?{label:"Animated",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fixed","false"),window.location.href=u.toString()}}:{label:"Fixed",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fixed","true"),window.location.href=u.toString()}}];n.push({label:"Save",onClick:()=>{zt(a.gl.canvas)}}),document.body.appendChild(r),n.forEach(({label:u,onClick:f})=>{const g=document.createElement("button");g.className="ryokans-menu-action-button",g.innerText=u,g.onclick=f,r.appendChild(g)});let l=null;function o(){r.style.display="flex",r.style.justifyContent="center",r.style.alignItems="center",r.style.position="fixed",r.style.left="0",r.style.right="0",r.style.bottom="10px",r.style.top="",r.style.zIndex="1000",l&&clearTimeout(l),l=setTimeout(h,2e3)}function h(){r.style.display="none"}function d(){o()}window.addEventListener("mousemove",d),window.addEventListener("touchstart",d),h()}function Ca(){const r=a.sketch,e=a.generator,t=a.artwork;document.body.style.backgroundColor="#17140b",a.renderStartTime=performance.now(),t.init().then(async function(){r.setBgColor(c.backgroundData.globalBackgroundColor),r.clear(),ht.resetHash(),e.generate(),console.warn("First rand: ",a.rand()),console.warn("First rand 2: ",a.rand2()),c.isDirty=!0,a.seed=a.rand()*1e3,await t.generate(),await t.prerenderAnimated(),a.loader?.update(),Da(),await t.renderMoments(),r.artwork=t.texture,r.renderWebGL({options:c.postprocessData,displayArtwork:t!=null}),a.onRender.dispatch();let s=0;const i=async()=>{await t.regenerateAndRenderGrids(),await t.reRenderAnimated(),s=0,Be.add(n)},n=()=>{s+=1,s%1400===0&&(Be.remove(n),i())};!a.isRender&&!a.isFixed&&Be.add(n)}),Gt.add(()=>{t.renderAnimated(),r.artwork=t.textureAnimated,r.renderWebGL({options:c.postprocessData,displayArtwork:t!=null})})}class Aa{constructor(e,t={}){this.options={color:"#fff",width:"30%",...t},this.steps=7,this.step=1/this.steps,this.progress=0,this.progressRender=.001,this.progressRenderLocal=.001,this._isVisible=!1,this.element=document.createElement("div"),this.element.className="ryokan-loader",this.element.style.width="30%",this.element.style.zIndex="9999",this.element.style.position="absolute",this.element.style.bottom=0,this.element.style.left="50%",this.element.style.transform="translate(-50%, -50%)",this.element.style.backgroundColor="#17140B",this.element.style.padding="20px",this.element.style.border="1px solid #fff",this.barContainer=document.createElement("div"),this.barContainer.className="ryokan-loader-bar-container",this.barContainer.style.height="4px",this.barContainer.style.backgroundColor="#000",this.barContainer.style.opacity=.8,this.barContainer.style.overflow="hidden",this.barContainer.style.position="relative",this.bar=document.createElement("div"),this.bar.className="ryokan-loader-bar",this.bar.style.height="100%",this.bar.style.width="0%",this.bar.style.backgroundColor="#fff",this.bar.style.transition="width 0.3s ease-in-out",this.bar.style.position="absolute",this.bar.style.left="0",this.bar.style.top="0",this.barContainer.appendChild(this.bar),this.element.appendChild(this.barContainer),e&&(typeof e=="string"?document.querySelector(e).appendChild(this.element):e.appendChild(this.element)),this.setProgress(0)}update(){return this.progress+=this.step,this.setProgress(this.progress),this}setProgress(e){const t=Math.max(0,Math.min(1,e));return this.bar.style.width=`${t*100>>0}%`,this}setProgressRender(e){this.progressRender=e}setProgressRenderLocal(e){this.progressRenderLocal=e}getElement(){return this.element}show(){this._isVisible=!0,this.setProgress(0),this.element.style.display="block"}hide(){this._isVisible&&(this._isVisible=!1,this.element.style.display="none")}}ht.start(ls);ft.init(Oe);c.registerGUI(ft);a.data=c;c.init();new Gi(c);const qe=new kr(a.size.width,a.size.height);qe.initWebGL();qe.setBgColor(c.backgroundData.globalBackgroundColor);a.sketch=qe;const Pa=new La;a.artwork=Pa;const Ta=new Sa;a.generator=Ta;function za(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}if(za()){const r=document.createElement("div");r.innerText="Please open this page on a desktop for the full experience.",r.style.position="fixed",r.style.top="50%",r.style.left="50%",r.style.transform="translate(-50%, -50%)",r.style.backgroundColor="rgba(0,0,0,0.85)",r.style.color="#fff",r.style.padding="24px 32px",r.style.fontSize="12px",r.style.textAlign="center",r.style.maxWidth="90vw",document.body.appendChild(r)}else{const r=new Aa(document.body,{color:"#000",height:"10px"});a.loader=r,a.loader.show(),Ca()}
sk.value=t.skipMask||this._skipMask,e>.7&&(n.uSkipMask.value=t.skipMask||this._skipMask)):n.uSkipMask.value=!0,n.uPercentGrid.value=e,n.uIsFlower.value=!0}update(e,t,s,i=1){const n=this.u;n.tPattern.value=e,n.uPercentGrid.value=s-.1,n.uSkipMask.value=t.skipMask,s>.7&&(n.uSkipMask.value=t.skipMask||this._skipMask),n.uThM.value*=2,n.uThA.value=(c.vegeLinesData.lines.thA+s*.1)*2,n.uDontUsePattern.value=t.skipPattern,n.uCountLines.value=t.countLines,n.uLineColor.value=new E(t.color),n.uLengthA.value=t.lengthA*2,n.uRotType.value=t.rotationType,n.uAlpha.value.x=t.alpha*i,n.uAlpha.value.y=t.alpha*i+.01,n.ugenhash.value=a.seed+t.id*1234,n.uIsFlower.value=!1}setPattern(e){this.u.tPattern.value=e}}var ua=`#define M_PI 3.1415926535897932384626433832795 #i_ noiseUtils #i_ snoise2d #i_ snoise3d #injectUniforms _u _f uSeed;_u bool hasMask;_u _s2 tMask;in _v2 vUv;out _v4 outColor0;_vm_f z=uTime+uSeed;_v2 uv=vUv;uv-=.5;uv*=uScale;uv+=.5;if(uMode==0){_f noise=sn3d(_v3(uv,z))*uStr;outColor0=_v4(_v3(noise),1.0);}else{_v3 p=_v3(uv,z);_v3 curl=curlNoise(p);_f noise=atan(curl.y,curl.x)/M_PI*2.;outColor0=_v4(_v3(noise*uStr),1.0);}if(hasMask){_v4 mask=texture(tMask,vUv);outColor0*=mask;}}`;class da extends j{constructor({textures:e={},cellSize:t=1024}={}){const s=a.gl,n=a.size.width/t/a.size.width;super(1,{type:s.FLOAT,internalFormat:s.renderer.isWebgl2?s.RGBA32F:s.RGBA,wrapS:s.CLAMP_TO_EDGE,wrapT:s.CLAMP_TO_EDGE,generateMipmaps:!1,minFilter:s.NEAREST,magFilter:s.NEAREST},{ratio:n}),this.init({uniforms:{uSeed:{value:0}},textures:e,fs:ua,dataFroms:[c.patternNoiseData,c.gridData]}),this._mask=new G({ratio:.1}),this.uniforms.hasMask={value:!1},this.uniforms.tMask={value:this._mask.texture}}generate(e){this.uniforms.uSeed.value=a.seed}render(e=1,t,s=!1,i=null){this._programLinker?.update(),s&&(i?this.uniforms.tMask.value=i:(this._drawMask(),this.uniforms.tMask.value=this._mask.texture)),this.uniforms.hasMask.value=s,t?(this.uniforms.uScale.value=c.patternNoiseData.scale+t.scaleMax,this.uniforms.uTime.value=t.time,this.uniforms.uMode.value=t.mode):(this.uniforms.uScale.value=c.patternNoiseData.scale+e*c.patternNoiseData.scaleMax,this.uniforms.uTime.value+=.1),super.render({hasToUpdateUniforms:!1})}_drawMask(){this._mask.clear();const e=a.size.width,t=a.size.height;this._mask.ctx.fillStyle="#fff";const s=this._mask.ratio;this._mask.ctx.beginPath(),this._mask.ctx.moveTo(0,0),this._mask.ctx.lineTo(e*.5*s,0),this._mask.ctx.lineTo(0,t*.5*s),this._mask.ctx.fill(),this._mask.ctx.closePath(),this._mask.ctx.beginPath(),this._mask.ctx.moveTo(e*.5*s,0),this._mask.ctx.lineTo(e*s,0),this._mask.ctx.lineTo(e*s,t*.5*s),this._mask.ctx.fill(),this._mask.ctx.closePath(),this._mask.ctx.beginPath(),this._mask.ctx.moveTo(0,t*.5*s),this._mask.ctx.lineTo(e*.5*s,t*s),this._mask.ctx.lineTo(0,t*s),this._mask.ctx.fill(),this._mask.ctx.closePath(),this._mask.ctx.beginPath(),this._mask.ctx.moveTo(e*.5*s,t*s),this._mask.ctx.lineTo(e*s,t*s),this._mask.ctx.lineTo(e*s,t*.5*s),this._mask.ctx.fill(),this._mask.ctx.closePath(),this._mask.texture.needsUpdate=!0}}function ca(r){const e=r>>16&255,t=r>>8&255,s=r&255;return{r:e/255,g:t/255,b:s/255}}function fa(r,e,t,s="array"){var i=Math.max(r,e,t),n=Math.min(r,e,t),l,o,h=(i+n)/2;if(i==n)l=o=0;else{var d=i-n;switch(o=h>.5?d/(2-i-n):d/(i+n),i){case r:l=(e-t)/d+(e<t?6:0);break;case e:l=(t-r)/d+2;break;case t:l=(r-e)/d+4;break}l/=6}return s==="array"?[l,o,h]:s==="rgb"?{r:l,g:o,b:h}:{h:l,s:o,l:h}}function ga(r,e=!0){const t=ca(r),s=fa(t.r,t.g,t.b);return e?(s[0]*=360,s[1]*=100,s[2]*=100,`hsl( ${s[0]}, ${s[1]}%, ${s[2]}% )`):s}const tt=function(r){const e=ga(r,!1);return{h:e[0]*360,s:e[1]*100,l:e[2]*100}};class st{constructor({x:e,y:t,a:s,length:i=220,color:n,maxDepth:l=15,branchAngle:o=.99,type:h="tree"}={}){this.x=e,this.y=t,this.a=s,this.length=i,this.color=n,this.maxDepth=l,this.branchAngle=o,this.type=h,this._boundaryDepthRatio=12,this.branches=[],this.flowers=[],this.flowersSpecial=[]}async generate(){this._countSplit=0,this.branches.push({x:this.x,y:this.y,z:0,a:this.a,length:this.length,color:this.color}),await this._split(this.x+Math.cos(this.a)*this.length,this.y+Math.sin(this.a)*this.length,this.a,this.length,0,this.color)}async _split(e,t,s,i,n=0,l={h:a.rand()*360,s:100,l:50},o=0){const h=c.treebstractData;let d=h.splitCountMin+h.splitCountAdd*a.rand()>>0;n>8?d=Math.min(2,d):n>12&&(d=Math.min(1,d));const u=this.maxDepth*.4;let f;this.maxDepth<=this._boundaryDepthRatio?f=ie(n,0,this.maxDepth,1,1.2):f=ie(n,0,u,1,1.4)+ie(n,u,this.maxDepth,0,.2);let g=s;d>1&&(g-=this.branchAngle*.5*f);let _=i*.9;_=Math.max(h.minLength,_);const m=this.maxDepth>this._boundaryDepthRatio;this._countSplit++,this._countSplit%250===0&&await P();for(let p=0;p<d;p++){const w=p>=3&&p<5&&m?10:1,v=a.rand()*this.branchAngle*f*w,x=g+v,y={x:e,y:t,z:o,a:x,length:_,color:l,type:"branch"};n>4&&a.rand3()<.4&&this.branches.push(y);const M=n+1,k=ie(M,0,this.maxDepth,.9,.3);if(M<3||M<this.maxDepth&&a.rand()<k){l={...l},l.h=a.rand()<.3?l.h+a.rand()*20-10:l.h;const S=e+Math.cos(x)*_,U=t+Math.sin(x)*_,C=o+a.rand()*4-2;if(S<-300||U<-300||S>a.size.width+300||U>a.size.height+300)continue;this._split(S,U,x,_,n+1,l,C)}else{this.flowers.push({x:e+Math.cos(x)*_,y:t+Math.sin(x)*_,z:o+4,a:x,color:l,type:"flower"});const S=1+a.rand()*3>>0,U=Math.PI*.6/S;let L=x-Math.PI*.3;for(let D=0;D<S;D++){const A=-20+a.rand()*60,I=a.rand()<.15?"radial":"tangent",q=e+Math.cos(L)*(_+A),H=t+Math.sin(L)*(_+A);if(q<0||H<0||q>a.size.width||H>a.size.height)continue;const Y={x:q,y:H,z:o+4,dir:L,color:l,size:a.rand2()*40+4,type:"flower",typeOrientation:I};this.flowers.length<600&&this.flowers.push(Y),I=="radial"&&this.flowersSpecial.push(Y),L+=U}}}}prepareRendering(){this.elementsByZ=this.branches.concat(this.flowers)}async render(e,t,s){let i=16,n=36*2;e.fillStyle="#fff";let l=0;for(const o of this.elementsByZ){const h=Math.cos(o.a)*.5+.5,d=Math.sin(o.a)*.5+.5;if(o.type=="flower"){const u=o.x,f=o.y,g=n;e.fillRect((u-g*.5)*s,(f-g*.5)*s,g*s,g*s)}else{const u=o.x,f=o.y,g=o.x+Math.cos(o.a)*o.length,_=o.y+Math.sin(o.a)*o.length;t.beginPath(),t.strokeStyle=`rgb(${h*255}, ${d*255}, 255)`,t.lineWidth=i*s,t.moveTo(u*s,f*s),t.lineTo(g*s,_*s),t.stroke(),t.closePath()}l++,l%300===0&&await P()}}}class _a{constructor(){this.position={x:a.size.width*.5,y:0},this._ratio=.1;const e={flipY:!1};this.canvasBranch=new G({renderTargetOpts:e,ratio:this._ratio}),this.canvasElements=new G({renderTargetOpts:e,ratio:this._ratio})}generate(){this._trees=[];const e=1+a.rand()*12>>0,t=a.size.width/(e+1);for(let i=0;i<e;i++){const n=t*(i+1)+a.rand()*a.size.width*.2-a.size.width*.1;this._generateForestTree(n)}let s=0;e==1?s=a.rand()<.5?0:2:s=a.rand()*3>>0,this._generateForegroundTree(s)}async generateForest(e){this.color=e,this._trees=[];const t=3+a.rand()*5>>0,s=a.size.width/(t+1);for(let i=0;i<t;i++){const n=s*(i+1)+a.rand()*a.size.width*.2-a.size.width*.1;a.renderingMode!=="editor"?(await this._generateForestTree(n),P()):this._generateForestTree(n)}}generateForeground(e){this.color=e,this._trees=[],this._generateForegroundTree(a.rand()*3>>0)}async _generateForegroundTree(e=-1){e==-1&&(e=a.rand()*3>>0);let t=0;e==0?t=.25+a.rand()*.15-.075:e==1?t=.4+a.rand()*.2:t=.6+a.rand()*.15;const s=a.size.width*t,i=0;let n=(a.size.width<a.size.height?200:0)+500;n*=2;const l=this._getColor(),o=new st({x:s,y:i,a:Math.PI*.45+a.rand()*Math.PI*.1,length:n,color:l,maxDepth:12,branchAngle:1.503,type:"foreground"});a.renderingMode!=="editor"?await o.generate():o.generate(),this._trees.push(o)}async _generateForestTree(e){const t=e,s=a.rand()*-600,i=Math.PI*.45+a.rand()*Math.PI*.1,n=11+a.rand()*5>>0;let l=(a.size.width<a.size.height?200:-130*a.rand())+300+a.rand()*ie(n,11,16,150+a.rand()*150,100)>>0;l*=2;const o=.85+a.rand()*.3,h=this._getColor(),d=new st({x:t,y:s,a:i,length:l,color:h,maxDepth:n,branchAngle:o,type:"forest"});a.renderingMode!=="editor"?await d.generate():d.generate(),this._trees.push(d)}_getColor(){if(this.color){let e;return typeof this.color=="string"?e=tt(parseInt(this.color.replace("#",""),16)):e=tt(this.color),e.h=(e.h+a.rand()*150)%360,e}return{h:2.68392420373857+a.rand()*150,s:100,l:50}}getFlowerSpecial(){const e=[];for(const t of this._trees)for(const s of t.flowersSpecial)e.push(s);return e}get trees(){return this._trees}get flowersSpecial(){return this._trees.reduce((e,t)=>e.concat(t.flowersSpecial),[])}get texture(){return this.canvasElements.texture}get textureOrientation(){return this.texture}get textureBranch(){return this.canvasBranch.texture}get textureBranchOrientation(){return this.canvasBranch.texture}}class le{constructor(e,t,s,i,n){this._layer=e,this._sceneDeformer=t,this._patternsRenderer=s,this._vegeLines=i,this._elements=n,this._percentRender=0}setLayer(e){this._layer=e}async generate(){}_getPattern(e){return this._sceneDeformer.render(this._patternsRenderer.texture,e),this._sceneDeformer.texture}async renderScene(e,t,s=1){const i=this._layer.isSingleDir?[new F(1,1)]:[new F(1,0),new F(0,1)],n=i.length,l=1/a.size.width*2;for(let o=0;o<n;o++){const h=i[o];let d=this._getPattern(h);this._vegeLines.updateProgramLinker(),this._vegeLines.uniforms.uIsNormal.value=o==0;const u=o==0?0:l;this._vegeLines.uniforms.uOffset.value.x=h.x*u,this._vegeLines.uniforms.uOffset.value.y=h.y*u,this._vegeLines.update(d,this._layer,t),a.renderingMode!=="editor"?await this.renderVegeLines(s/n):this.renderVegeLines(s/n),this._vegeLines.uniforms.hasToCheckColor.value=!1}}async renderVegeLines(e=1,t=a.linesPerGeometry){const s=Math.ceil(a.linesTotal/t),i=e/s;this._vegeLines.uniforms.uIDAdd.value=0;for(let n=0;n<s;n++)this._vegeLines.render({hasToClear:!1,hasToUpdateUniforms:!1}),this._vegeLines.uniforms.uIDAdd.value+=t,this._percentRender+=i,a.loader.setProgressRender(a.loader.progressRenderLocal+this._percentRender),a.renderingMode!=="editor"&&await Nt()}get patternId(){return this._layer.patternId}}class pa extends le{constructor(e,t,s,i,n){super(e,t,s,i,n),this._treebstract=new _a}async generate(){a.renderingMode!=="editor"?this._layer.maskType==1?await this._treebstract.generateForest(this._layer.color):await this._treebstract.generateForeground(this._layer.color):this._layer.maskType==1?this._treebstract.generateForest(this._layer.color):this._treebstract.generateForeground(this._layer.color)}_getPattern(){return this._elements.treebstractRenderer.texture}async render(e,t,s){this._percentRender=0;const i=s/3,n=this._elements.treebstractRenderer;await n.render(this._treebstract.trees);const l=this._elements.flowersRenderer,o=this._treebstract.getFlowerSpecial();l.renderFlowers(o),this._vegeLines.updateProgramLinker(),this._vegeLines.uniforms.tTrees.value=n.textureBranch,this._vegeLines.uniforms.tTreesOrientation.value=n.textureBranchOrientation,this._vegeLines.updateForTrees(t,!0),await this.renderVegeLines(i),this._vegeLines.updateProgramLinker(),this._vegeLines.uniforms.tTrees.value=l.texture,this._vegeLines.uniforms.tTreesOrientation.value=l.textureOrientation,this._vegeLines.updateForFlowers(t,this._layer,null,!1),await this.renderVegeLines(i),await this.renderScene(e,t,i)}}class ma extends le{constructor(e,t,s,i,n){super(e,t,s,i,n)}async render(e,t,s){this._percentRender=0,this._patternsRenderer.render(e,this._layer.noise,this._layer.hasMask),await this.renderScene(e,t,s)}}class xa{constructor(){}prepare(e){this._ryokanCellSize=e}async generate(){const e=a.size.width/this._ryokanCellSize,t=a.size.height/this._ryokanCellSize;this._noise=new je(a.rand2),this._branches=[],this._dir=Math.PI*.1+Math.PI*a.rand2()*.8;const s=10+a.rand2()*10>>0;for(let i=0;i<s;i++){const n=Math.floor(6+a.rand2()*(e-3))*this._ryokanCellSize,l=Math.floor(6+a.rand2()*(t-3))*this._ryokanCellSize;this._branches.push(this._generateFromNewOrigin(n,l,i)),await P()}}_generateFromNewOrigin(e,t,s){this._leavesData=[];const i=this._generateTrunk(e,t,this._dir,5+a.rand2()*15>>0,s),n=this._generateLeaves();return{trunk:i,leaves:n}}_generateTrunk(e,t,s,i,n=0,l=!0){const o=c.treesData.flowers,h=[];h.push({x:e,y:t});const d=[];let u=e,f=t;for(let _=0;_<i;_++){s+=this._noise.noise3D(u*o.trunkNoiseScale,f*o.trunkNoiseScale,n)*(o.trunkNoiseStr*(l?1:.5)),u+=Math.cos(s)*o.trunkStep,f+=Math.sin(s)*o.trunkStep;const m=_/i;if(m>.3&&a.rand2()<o.leavesChance&&this._leavesData.push({x:u,y:f,a:s}),l&&m>.4&&a.rand2()<o.trunkBranchChance){const p=a.rand2()<.5?2:4;d.push(this._generateTrunk(u,f,s+Math.PI*.5*(a.rand2()<.5?-1:1),i/p>>0,n,!1))}h.push({x:u,y:f,a:s})}const g=[h];for(const _ of d)g.push(_);return l?g:h}_generateLeaves(){const e=[];for(const t of this._leavesData){const s=a.rand2()*12+1>>0;for(let i=0;i<s;i++){const n=t.a+Math.PI*a.rand2()-Math.PI*.5,l=a.rand2()*200,o=t.x+Math.cos(n)*l,h=t.y+Math.sin(n)*l,d={x:o,y:h,size:a.rand2()*50+4,a:n};e.push(d)}}return e}get branches(){return this._branches}}class va extends le{constructor(e,t,s,i,n){super(e,t,s,i,n),this._flowers=new xa}async generate(e){this._flowers.prepare(e),a.renderingMode!=="editor"?await this._flowers.generate():this._flowers.generate()}async render(e,t,s){this._percentRender=0;const i=this._elements.flowersRenderer,n=this._flowers.branches;i.render(n),this._vegeLines.updateProgramLinker(),this._vegeLines.uniforms.tTrees.value=i.texture,this._vegeLines.uniforms.tTreesOrientation.value=i.textureOrientation,this._vegeLines.updateForFlowers(t,this._layer,c.treesData.flowers.color2,!1),await this.renderVegeLines(s)}}class ya extends le{constructor(e,t,s,i,n){super(e,t,s,i,n)}async render(e,t,s){const i=this._elements.trees;this._vegeLines.updateProgramLinker(),this._vegeLines.uniforms.tTrees.value=i.texture,this._vegeLines.uniforms.tTreesOrientation.value=i.textureOrientation,this._vegeLines.updateForTrees(t,!0,!0),await this.renderVegeLines(1*s)}}class it extends le{constructor(e,t,s,i,n){super(e,t,s,i,n)}async render(){const e=this._elements.gridPattern;e.render({hasToClear:!1}),this._vegeLines.addChild(e.mesh),this._vegeLines.removeChild(this._vegeLines._mesh),this._vegeLines.render({hasToClear:!1,hasToUpdateUniforms:!1}),this._vegeLines.addChild(this._vegeLines._mesh),this._vegeLines.removeChild(e.mesh)}}class wa{constructor(e,t=512,s=!1,i=null,n){e=e,this._flowers=i.flowers,this._flowersRenderer=i.flowersRenderer,this._gridPattern=i.gridPattern,this._treebstract=i.treebstract,this._treebstractRenderer=i.treebstractRenderer,this._elements=i,this._vegeLines=i.vegeLines,this._texturesDeformer={...e},this._texturesVegeLines={...e},this._cellSize=t,this._idx=n,this._patternsRenderer=new da({cellSize:t}),this._sceneDeformer=new sa(this._texturesDeformer)}async generate(e,t=-1){this._idxPalette=t,this._patternsRenderer.generate(e),this._layers=[];const s=a.generator.layers,i=s.length;for(let n=0;n<i;n++){const l=s[n];let o=null;switch(l.patternId){case"classic":l.maskType!==0?o=pa:o=ma;break;case"flowers":o=va;break;case"tree":o=ya;break;case"grid":o=it;break}const h=new o(l,this._sceneDeformer,this._patternsRenderer,this._vegeLines,this._elements);a.renderingMode!=="editor"?await h.generate(e):h.generate(e),this._layers.push(h)}this._sceneLayerGrid=new it(null,this._sceneDeformer,this._patternsRenderer,this._vegeLines,this._elements)}refreshLayers(){const e=a.generator.layers;for(let t=0;t<e.length;t++){const s=e[t];this._layers[t].setLayer(s)}}async render(){this._vegeLines.clear();let e=c.compositionsData.layers.totalDivider;const t=.34*this._idx;a.isOver||a.loader.setProgressRenderLocal(t);const s=this._layers.length,i=1/s;for(let n=0;n<s;n++){const l=this._layers[n],o=n/s,h=Math.floor(o*e)/e;n===c.gridPatternData.index&&this._sceneLayerGrid.render(),await l.render(o,h,i/3),a.isOver||(a.loader.setProgressRenderLocal(t+o/3),a.loader.setProgressRender(t+o/3))}}get texture(){return this._vegeLines.texture}}class ba{constructor(e,t){this._textures=e,this._elements=t,this._vegeLines=new ha(e,!1),this._elements.vegeLines=this._vegeLines;const s=1;this._sceneBuilder0=this._createSceneBuilder(512*s,0),this._sceneBuilder1=this._createSceneBuilder(128*s,1),this._sceneBuilder2=this._createSceneBuilder(32*s,2),this._assembler=new ea({tGrid:t.deformerGridScene.texture,tFlow:t.flow.texture}),this._assemblerAnimated=new Zr({tAssembler:this._assembler.texture,tVegeLines:this._vegeLines.texture,tGrid:t.deformerGrid.texture,tGridScene:t.deformerGridScene.texture,tGridLines:t.gridLines.texture,tFlow:t.flow.texture})}_createSceneBuilder(e,t){return new wa(this._textures,e,!1,this._elements,t)}async generate(e){await this._vegeLines?.generate(),a.loader?.update(),a.renderingMode!=="editor"?(await this._sceneBuilder0?.generate(e,3),a.loader?.update(),await this._sceneBuilder1?.generate(e,5),a.loader?.update(),await this._sceneBuilder2?.generate(e,4),a.loader?.update()):(await this._sceneBuilder0?.generate(e,3),await this._sceneBuilder1?.generate(e,5),await this._sceneBuilder2?.generate(e,4))}async render(){if(a.loader?.setProgress(1),a.gl.renderer.autoClear=!0,this._assemblerAnimated.render({hasToClear:!0,clearBG:!0}),a.gl.renderer.autoClear=!1,this._step=0,await this._sceneBuilder0?.render(),a.gl.renderer.autoClear=!0,this._assembler.render({hasToClear:!0,texture:this._sceneBuilder0.texture,min:0,max:.2499}),a.gl.renderer.autoClear=!1,this._step=1,await this._sceneBuilder1?.render(),this._assembler.render({hasToClear:!1,texture:this._sceneBuilder1.texture,min:.25,max:.4999}),this._assembler.render({hasToClear:!1,texture:this._sceneBuilder1.texture,min:.75,max:1}),this._step=2,await this._sceneBuilder2?.render(),this._assembler.render({hasToClear:!1,texture:this._sceneBuilder2.texture,min:.5,max:.7499}),a.renderingMode==="animated"&&!a.isOver){let e=1-a.loader.progressRender;const t=10;let s=e/t;for(let i=0;i<t;i++)a.loader.setProgressRender(a.loader.progressRender+s),await Nt();await P()}if(a.infoDiv){const e=document.createElement("p");e.innerHTML=`<strong>Render Time:</strong> ${renderTime}ms`,a.infoDiv.appendChild(e)}this._assemblerAnimated.setPercent(2),a.isOver=!0}renderAnimated(){let e=0,t=.25,s=!1,i=0,n=1;this._step==1?(e=.25,t=.4999,i=.75,n=1,s=!0):this._step==2&&(e=.5,t=.7499),this._assemblerAnimated.render({hasToClear:!1,min1:e,max1:t,minMax2Activated:s,min2:i,max2:n})}async reRenderAnimated(){this._step=0,this._sceneBuilder0?.refreshLayers(),await this._sceneBuilder0?.render(),this._assembler.render({hasToClear:!1,texture:this._sceneBuilder0.texture,min:0,max:.2499}),this._step=1,this._sceneBuilder1?.refreshLayers(),await this._sceneBuilder1?.render(),this._assembler.render({hasToClear:!1,texture:this._sceneBuilder1.texture,min:.25,max:.4999}),this._assembler.render({hasToClear:!1,texture:this._sceneBuilder1.texture,min:.75,max:1}),this._step=2,this._sceneBuilder2?.refreshLayers(),await this._sceneBuilder2?.render(),this._assembler.render({hasToClear:!1,texture:this._sceneBuilder2.texture,min:.5,max:.7499}),this._assemblerAnimated.setPercent(2)}get texture(){return this._assembler.texture}get textureAnimated(){return this._assemblerAnimated.texture}}class Ma{constructor(){this._ratio=.1;const e={flipY:!1};this.canvasBranch=new G({renderTargetOpts:e,ratio:this._ratio}),this.canvasElements=new G({renderTargetOpts:e,ratio:this._ratio})}async render(e){this.canvasElements.clear(),this.canvasBranch.clear();for(const t of e)t.prepareRendering();for(const t of e)await t.render(this.canvasElements.ctx,this.canvasBranch.ctx,this._ratio);this.canvasElements.texture.needsUpdate=!0,this.canvasBranch.texture.needsUpdate=!0}get texture(){return this.canvasElements.texture}get textureOrientation(){return this.texture}get textureBranch(){return this.canvasBranch.texture}get textureBranchOrientation(){return this.canvasBranch.texture}}class La extends Fr{constructor(){super()}async init(){this._grid=new jr,this.add(this._grid,[c.gridData,c.compositionsData,c.gridPatternData]),this._flow=new Gr,this.add(this._flow,c.flowData),this._deformerGrid=new Ue({tToDeform:this._grid.texture}),this.add(this._deformerGrid),this._deformerGridScene=new Ue({tToDeform:this._grid.textureScene}),this.add(this._deformerGridScene),this._deformerGridLines=new Ue({tToDeform:this._grid.textureLines},1),this.add(this._deformerGridLines),this._trees=new Xr,this.add(this._trees,c.treesData),this._treebstractRenderer=new Ma,this._flowersRenderer=new qr,this._gridPattern=new Yr({tGridPattern:this._deformerGridLines.texture}),this._texturesScenes={tFlow:this._flow.texture,tGrid:this._deformerGrid.texture,tTrees:this._trees.texture,tTreesOrientation:this._trees.textureOrientation,tPattern:new oe(a.gl,{})},this._momentsRenderer=new ba(this._texturesScenes,{trees:this._trees,flowersRenderer:this._flowersRenderer,gridPattern:this._gridPattern,gridLines:this._deformerGridLines,treebstractRenderer:this._treebstractRenderer,deformerGrid:this._deformerGrid,deformerGridScene:this._deformerGridScene,flow:this._flow}),this.add(this._momentsRenderer,[c.treesData,c.treebstractData,c.patternNoiseData,c.vegeLinesData,c.compositionsData,c.gridPatternData,c.composerData])}async generate(){const e=c.gridData.isDirty,t=c.gridRyokanData.isDirty,s=c.compositionsData.isDirty||c.compositionsData.layers.isDirty;if(!this._gridRyokanCellSize||e||t||s){let i=Or.getNewRandomCellSize(128);i=1024/c.compositionsData.divider,await this._grid.generate(i),a.loader?.update();const l=[32,64,128];this._gridRyokanCellSize=l[l.length*a.rand2()>>0],a.renderingMode!=="editor"?await this._grid.seasonize():this._grid.seasonize(),a.loader?.update(),this._trees?.prepare(i)}this._trees?.generate(this._gridRyokanCellSize),await this._momentsRenderer.generate(this._gridRyokanCellSize)}async prerenderAnimated(){await this._grid.render(),this._flow.render(),await P(),this._deformerGrid.render(),this._deformerGridScene.render(),this._deformerGridLines.render(),this._trees.render(),await P()}async renderMoments(){await this._momentsRenderer.render()}async regenerateAndRenderGrids(){a.idxPalette+=1,c.paletteData.palette=a.palettes[a.idxPalette%4],a.generator.refreshLayers(),await this._grid.render(),await P(),this._flow.render(),await P(),this._deformerGrid.render(),await P(),this._deformerGridScene.render(),await P(),this._deformerGridLines.render(),await P()}renderAnimated(){a.loader.hide(),this._momentsRenderer.renderAnimated()}async reRenderAnimated(){await this._momentsRenderer.reRenderAnimated()}get texture(){return c.displayData.showExtra?c.displayData.getSelectedExtraTexture():c.displayData.getSelectedCoreTexture()}get textureAnimated(){return this._momentsRenderer.textureAnimated}}const ye=[];function z(r,e){ye.push({text:r,value:ye.length,data:e})}z("Autumn classic 3",gt);z("Green spring pluie"
peration="lighter",s.fillStyle=n,this._fillRect(s,t.x-t.size,t.y-t.size,t.size*2,t.size*2),s.restore()}}renderFlowers(e){this.clear(),this._renderFlowers(e),this.texture.needsUpdate=!0}_renderFlowers(e){const t=this.ctx;for(const s of e){const i=s.size,n=this._createLinearGradient(t,s.x-i,s.y,s.x+i,s.y);n.addColorStop(0,"rgba(0,0,255,1)"),n.addColorStop(1,"rgba(255,0,255,1)");const l=this._createLinearGradient(t,s.x,s.y-i,s.x,s.y+i);l.addColorStop(0,"rgba(0,0,255,1)"),l.addColorStop(1,"rgba(0,255,255,1)"),t.save(),t.beginPath(),this._rect(t,s.x-i,s.y-i,i*2,i*2),t.clip(),t.fillStyle=n,this._fillRect(t,s.x-i,s.y-i,i*2,i*2),t.globalCompositeOperation="lighter",t.fillStyle=l,this._fillRect(t,s.x-i,s.y-i,i*2,i*2),t.restore()}}_createLinearGradient(e,t,s,i,n){return e.createLinearGradient(t*this._ratio,s*this._ratio,i*this._ratio,n*this._ratio)}_fillRect(e,t,s,i,n){e.fillRect(t*this._ratio,s*this._ratio,i*this._ratio,n*this._ratio)}_rect(e,t,s,i,n){e.rect(t*this._ratio,s*this._ratio,i*this._ratio,n*this._ratio)}get textureOrientation(){return this.texture}get textureTrees(){return this._canvasTrees.texture}}var Hr=`#i_ noiseUtils #i_ snoise2d #injectUniforms _u _f uDecal;in _v2 vUv;out _v4 outColor0;void main(){_f a=snoise2d(vUv*10.+uDecal);_v2 uv=vUv+_v2(cos(a),sin(a))*.002*uDecal;outColor0=texture(tToDeform,uv);}`;class Ue extends j{constructor(e={},t=1,s={}){super(1,s,{ratio:.25}),this.init({textures:e,fs:Hr}),this.uniforms.uDecal={value:t}}}var Wr=`#injectUniforms in vec2 vUv;out vec4 outColor0;void main(){vec4 gridPattern=texture(tGridPattern,vUv);float alphagrid=gridPattern.r;outColor0=vec4(uLinesGridColor,alphagrid*uLinesGridAlpha);}`;class Yr extends j{constructor(e={},t={}){super(1,t,{ratio:.5}),this.init({textures:e,fs:Wr,dataFroms:[c.gridPatternData]})}}class Xr extends G{constructor(){const e={flipY:!1};super({renderTargetOpts:e,ratio:.05})}prepare(e){this._ryokanCellSize=e}generate(){let e=2+a.rand2()*3>>0;a.generator.isSmallTrees&&(e*=4),this._trees=[];for(let t=0;t<e;t++){const s=this._generateStraight(t);s&&this._trees.push(s)}this._generateOrientationsData()}_generateStraight(e=0){let t=this._findStartingX();if(t==-1)return null;let s=-Math.PI*.6+a.rand2()*Math.PI*.3,i=-200,n=!1;const l=[{x:t,y:i}];let o=100,h=.1,d=1.075,u=.5,f=0;for(;this._isStillIn(t,i,n);){const g=50+a.rand2()*50,_=t+Math.cos(s)*g,m=i+g;if(l.push({x:_,y:m}),t=_,i=m,f%6==0&&(s+=(a.rand()*Math.PI*.2-Math.PI*.1)*h),h*=d,h=Math.min(h,u),i>0&&(n=!0),f++,o--<0)break}return l.push({x:t+Math.cos(s)*200,y:i+200}),{path:l}}_findStartingX(){let e=0;return this._trees.length==0?e=this._getFirstX():e=this._getNewX(),e}_getFirstX(){const e=[.25,.382,.5,.618,.75],t=e.length*a.rand2()>>0;return a.size.width*e[t]}_getNewX(){let e=a.rand()*a.size.width;const t=c.treesData.treeThickness*(this._trees.length>2?3.5:5);let s=10;for(;this._isTooCloseFromOtherTrees(e,t);)if(e=a.rand()*a.size.width,s--<0)return-1;return e}_isTooCloseFromOtherTrees(e,t){for(const s of this._trees){const n=s.path[0].x;if(Math.abs(n-e)<t)return!0}return!1}_isStillIn(e,t,s=!1){return!(e<0||e>a.size.width||t>a.size.height||s&&t<0)}_generateOrientationsData(){for(const e of this._trees){const t=e.path,s=[],i=c.treesData.treeThickness,n=t[0];let l={x:n.x+i,y:n.y},o={x:n.x-i,y:n.y};const h=[],d=[],u=t.length;for(let f=1;f<u;f++){const g=t[f],_=t[f-1],m=g.x-_.x,p=g.y-_.y,w=Math.atan2(p,m);let v=i*1.4-i*.4*(f/u);a.generator.isSmallTrees&&(v*=.25);const x={x:g.x+Math.cos(w-Math.PI*.5)*v,y:g.y+Math.sin(w-Math.PI*.5)*v},y={x:g.x+Math.cos(w+Math.PI*.5)*v,y:g.y+Math.sin(w+Math.PI*.5)*v};h.push(x),d.push(y);const M=(Math.cos(w)*.5+.5)*255>>0,k=(Math.sin(w)*.5+.5)*255>>0,S=255;s.push({color:`rgb(${M}, ${k}, ${S})`,coords:[{...l},{...o},{...y},{...x}]}),l=x,o=y}e.blocks=s,e.pointsLeft=h,e.pointsRight=d}}render(){this.clear();for(const e of this._trees)this._renderTree(e);this.texture.needsUpdate=!0}_renderTree(e){const t=e.blocks;for(let s=0;s<t.length;s++){const i=t[s];this.ctx.fillStyle=i.color,this.ctx.beginPath(),this.ctx.moveTo(i.coords[0].x*this._ratio,i.coords[0].y*this._ratio);for(let n=1;n<i.coords.length;n++)this.ctx.lineTo(i.coords[n].x*this._ratio,i.coords[n].y*this._ratio);this.ctx.fill()}}get textureOrientation(){return this.texture}}let Ee=performance.now(),ce=0;const Kr=a.isRender?240:60,ve=1e3/Kr,me=[];function It(r){let e=r-Ee;if(e>ve*100?(e=0,ce=0,Ee=r):(ce+=e,Ee=r),ce>=ve){for(const t of me)t(e);ce=0}requestAnimationFrame(It)}requestAnimationFrame(It);const Be={add:r=>{me.push(r)},remove:r=>{const e=me.indexOf(r);e!==-1&&me.splice(e,1)},useDeltaTime:r=>{useDeltaTime=r},resume:()=>{},pause:()=>{}},Gt=new V,Nt=()=>new Promise(r=>{let e=performance.now(),t=0;function s(i){let n=i-e;n>ve*100?(n=0,t=0,e=i):(t+=n,e=i),t>=ve?(Gt.dispatch(),r()):requestAnimationFrame(s)}requestAnimationFrame(s)});var Jr=`#i_ blendmodes #injectUniforms _u _f uMin1;_u _f uMax1;_u bool uMinMax2Activated;_u _f uMin2;_u _f uMax2;_u _v3 uColor;_u bool uClearBG;_u _f uPercent;in _v2 vUv;out _v4 outColor0;_vm_v4 gridLines=_t(tGridLines,vUv);_v4 grid=_t(tGrid,vUv);_v4 result=_v4(uColor,1.);result.rgb=blendMode(2,result.rgb,_v3(grid.r),.5);result.rgb=blendMode(2,result.rgb,uLinesGridColor,gridLines.r*2.);if(uClearBG==true){outColor0=result;return;}_v4 gridScene=_t(tGridScene,vUv);_v4 vegeLines=_t(tVegeLines,vUv);_v4 assembler=_t(tAssembler,vUv);_f gridVal=gridScene.g;_v4 sb=assembler;bool isVegelinesOk=false;if(gridVal>=uMin1&&gridVal<=uMax1){sb.rgb=vegeLines.rgb;sb.a=1.;isVegelinesOk=true;}if(uMinMax2Activated==true){if(gridVal>=uMin2&&gridVal<=uMax2){sb.rgb=vegeLines.rgb;sb.a=1.;isVegelinesOk=true;}}_f vegeLinesLuminance=dot(vegeLines.rgb,_v3(0.299,0.587,0.114));result.rgb=mix(result.rgb,_v3(vegeLinesLuminance),(0.15+(0.35*(1.-uPercent)))*(1.-grid.b));if(uPercent<1.){outColor0=grid.b<uPercent ? sb : result;outColor0.rgb=blendMode(2,outColor0.rgb,uLinesGridColor,gridLines.r*2.*(1.-uPercent));}else{outColor0=sb;}}`;class Zr extends j{constructor(e){super(),this.init({fs:Jr,textures:e,dataFroms:[c.gridPatternData]}),this.uniforms.uMin1={value:1e-4},this.uniforms.uMax1={value:1.0001},this.uniforms.uMinMax2Activated={value:!1},this.uniforms.uMin2={value:1e-4},this.uniforms.uMax2={value:1.0001},this.uniforms.uColor={value:new E(16711935)},this.uniforms.uClearBG={value:!1},this.uniforms.uPercent={value:0}}render({hasToClear:e=!0,min1:t=0,max1:s=1,minMax2Activated:i=!1,min2:n=0,max2:l=1,clearBG:o=!1}={}){this.uniforms.uMin1.value=t,this.uniforms.uMax1.value=s,this.uniforms.uMinMax2Activated.value=i,this.uniforms.uMin2.value=n,this.uniforms.uMax2.value=l,this.uniforms.uColor.value.set(c.backgroundData.globalBackgroundColor),this.uniforms.uClearBG.value=o,this.uniforms.uPercent.value=a.loader.progressRender,super.render({hasToClear:e})}setPercent(e){this.uniforms.uPercent.value=e}}var Qr=`#injectUniforms _u _s2 tMoment;_u _f uMin;_u _f uMax;_u _v2 uScreenRatioV2;in _v2 vUv;out _v4 outColor0;_vm_v4 flow=_t(tFlow,vUv);_v4 grid=_t(tGrid,vUv);_v4 moment=_t(tMoment,vUv);_v4 sb=_v4(0.);if(grid.g>=uMin&&grid.g<=uMax){sb.rgb=moment.rgb;sb.a=1.;}outColor0=sb;}`;class ea extends j{constructor(e){super(),this.init({fs:Qr,textures:e,dataFroms:[c.composerData]}),this.uniforms.tMoment={value:null},this.uniforms.uMin={value:1e-4},this.uniforms.uMax={value:1.0001}}render({hasToClear:e=!0,texture:t=null,min:s=0,max:i=1,color:n=null}={}){this.uniforms.tMoment.value=t,this.uniforms.uMin.value=s,this.uniforms.uMax.value=i,super.render({hasToClear:e})}}a.rand;function ie(r,e,t,s,i){return s+(r-e)*(i-s)/(t-e)}var ta=`#injectUniforms _u _v2 uDirMultiplier;in _v2 vUv;out _v4 outColor0;_vm_v2 uvGrid=vUv;float percent=texture(tGrid,uvGrid).r*2.-1.;_v2 offset=_v2(uDispX,uDispY)*uDirMultiplier*uStrength;offset*=percent;_v4 pattern=texture(tPattern,mod(vUv+offset,1.));outColor0=pattern;}`;class sa extends j{constructor(e={},t={}){super(1,t,{ratio:.25});const s=.25;this._grid=new G({ratio:.25}),e.tGrid=this._grid.texture,this._grid.clear();const i=4,n=4;for(let l=0;l<a.size.width;l+=i)for(let o=0;o<a.size.height;o+=n){const h=a.rand2()*255>>0;this._grid.ctx.fillStyle=`rgba( ${h}, ${h}, ${h}, 1 )`,this._grid.ctx.fillRect(l*s,o*s,i*s,n*s)}this._grid.texture.needsUpdate=!0,this.init({textures:e,fs:ta,dataFroms:[a.data.compositionsData.deformer,a.data.gridData]}),this.uniforms.uDirMultiplier={value:new F(1,1)}}render(e,t){this.uniforms.tPattern.value=e,this.uniforms.uDirMultiplier.value=t,super.render()}get textureGrid(){return this._grid.texture}}class ia{constructor(e,t){this.reset(e,t)}reset(e,t){this.width=e,this.height=t,this.count=this.width*this.height>>0,this.count4=this.count<<2,this.data=new Float32Array(this.count4);const s=a.gl;this.textureMain=new oe(s,{image:this.data,width:this.width,height:this.height,type:s.FLOAT,generateMipmaps:!1,target:s.TEXTURE_2D,format:s.RGBA,internalFormat:s.renderer.isWebgl2?s.RGBA32F:s.RGBA,wrapS:s.CLAMP_TO_EDGE,wrapT:s.CLAMP_TO_EDGE,minFilter:s.NEAREST,magFilter:s.NEAREST,flipY:!1});for(let i=0;i<this.count4;i+=4)this.textureMain.image[i+0]=0,this.textureMain.image[i+1]=0,this.textureMain.image[i+2]=0,this.textureMain.image[i+3]=1;this.textureMain.needsUpdate=!0}init(){this.uniforms={tData:{value:this.textureMain}}}setX(e,t){this.textureMain.image[t*4+0]=e,this.textureMain.needsUpdate=!0}setY(e,t){this.textureMain.image[t*4+1]=e,this.textureMain.needsUpdate=!0}setZ(e,t){this.textureMain.image[t*4+2]=e,this.textureMain.needsUpdate=!0}setW(e,t){this.textureMain.image[t*4+3]=e,this.textureMain.needsUpdate=!0}}class ra extends be{constructor(e){e=e;const t=a.linesPerGeometry,s=t<<1,i=t<<2;let n=0,l=0,o=0,h=0,d=0;const u=new Float32Array(i);for(let y=0;y<i;y++){const M=y;for(let k=0;k<4;k++)u[n]=M,n+=1,l+=2;d+=1,d>e.width-1&&(d=0)}n=0,l=0;let f=1,g=1;const _=new Float32Array(i*2),m=new Float32Array(i*2);for(let y=0;y<s;y++)_[h+0]=-1*f,_[h+1]=-1*g,m[h+0]=0,m[h+1]=0,_[h+2]=-1*f,_[h+3]=1*g,m[h+2]=0,m[h+3]=1,_[h+4]=1*f,_[h+5]=-1*g,m[h+4]=1,m[h+5]=0,_[h+6]=1*f,_[h+7]=1*g,m[h+6]=1,m[h+7]=1,h+=8;const p=new Float32Array(i);let w=0;for(let y=0;y<s;y++){const M=y;p[w]=M,p[w+1]=M,p[w+2]=M,p[w+3]=M,w+=4}l=0;const v=new Uint32Array(i*3);for(let y=0;y<t;y++)v[o+0]=l,v[o+1]=v[o+4]=l+1,v[o+2]=v[o+3]=l+2,v[o+5]=l+3,l+=4,o+=12;const x={uid:{data:u},side:{size:2,data:_},uv:{size:2,data:m},index:{data:v},zs:{size:1,data:p}};super(a.gl,x),this.count=t}generate(){const e=this.attributes.zs.data;for(let t=0;t<this.count;t++){const s=a.rand(),i=t*4;e[i]=s,e[i+1]=s,e[i+2]=s,e[i+3]=s}this.attributes.zs.needsUpdate=!0}}class aa{constructor(e,t,s){this.idx=e,this.data=t,this.dataColors=s,this._x=0,this._y=0}reset(){this.x=0,this.y=0,this.alpha=0}setRGB(e,t=-1){this.dataColors.setRGB(e,this.idx),t!=-1&&this.dataColors.setAlpha(t,this.idx)}set x(e){this._x=e,this.data.setX(this._x,this.idx)}get x(){return this._x}set y(e){this._y=e,this.data.setY(this._y,this.idx)}get y(){return this._y}set z(e){this._z=e,this.data.setZ(this._z,this.idx)}get z(){return this._z}set w(e){this._w=e,this.data.setW(this._w,this.idx)}get w(){return this._w}}class na extends Le{constructor(e,t){const s=new ra(e);super(a.gl,{geometry:s,program:t}),this.lines=[];for(let i=0;i<e.count;i++)this.lines.push(new aa(i,e));this.idxLine=0}generate(){this.geometry.generate()}get(){if(!this.helpers)throw new Error("Property 'helpers' set to false. Switch to true to be able to target lines through objects.");if(this.lines.length<=0)throw new Error("No more line available.");return this.lines.pop()}}var oa=`#define M_PI 3.1415 #define HALF_PI 1.5707 _u _f ugenhash; #injectUniforms _u _v2 uResolution;_u _f uScreenRatio;_u _v2 uScreenRatioV2;_u _v2 uOffset;_u _f uPercentGrid;_u bool uSkipMask;_u _v3 uLineColor;_u bool uIsFlower;_u _s2 tColor;_u bool hasToCheckColor;_u _f uIDAdd;_u _f uMarg;in _f uid;in _v2 side;in _v2 uv;in _f zs;out _v2 vUv;out _v3 vColor;out _f isVisible;out _f isVisibles[4];out _f vUid;out _f vModColor1;out _f vModColor2;out _f vAlpha;out _v3 vLineColor; #i_ noiseUtils #i_ snoise2d #i_ rgb2hsl #i_ hsl2rgb #i_ cubic _f _getUID(){return uid+uIDAdd;}_f vhash(_v3 p){p=fract(p*0.3183099+.1);p*=17.0;return fract(p.x*p.y*p.z*(p.x+p.y+p.z));}_f vnoise(in _v3 x){_v3 i=floor(x);_v3 f=fract(x);f=f*f*(3.0-2.0*f);return mix(mix(mix(vhash(i+_v3(0,0,0)),vhash(i+_v3(1,0,0)),f.x),mix(vhash(i+_v3(0,1,0)),vhash(i+_v3(1,1,0)),f.x),f.y),mix(mix(vhash(i+_v3(0,0,1)),vhash(i+_v3(1,0,1)),f.x),mix(vhash(i+_v3(0,1,1)),vhash(i+_v3(1,1,1)),f.x),f.y),f.z);}_f hash12(_v2 p){_v3 p3=fract(_v3(p.xyx)*.1031);p3+=dot(p3,p3.yzx+33.33);return fract((p3.x+p3.y)*p3.z);}_f cbv(_v3 p1,_v3 p2,_v3 rgbToCompare){_f dx=p2.x-p1.x;_f dy=p2.y-p1.y;_f a=atan(dy,dx);_f dist=sqrt(dx*dx+dy*dy);_f acc=dist/2.;_f x=p1.x;_f y=p1.y;for(int i=0;i<2;i++){_v3 p=_t(tPattern,_v2(x,y)).rgb;_f diff=abs(p.z-rgbToCompare.z);if(diff>uVisibleThreshold){return 0.;}x+=cos(a)*acc;y+=sin(a)*acc;}return 1.;}_f mapToPower(_f value,_f minValue,_f maxValue,_f power){_f valueSign=sign(value);value=(value-minValue)/(maxValue-minValue);value=valueSign>0. ? value : value-1.;value=pow(value*valueSign,abs(power));value=valueSign>0. ? value : 1.-value;return value*(maxValue-minValue)+minValue;}_f rbp(_f minValue,_f maxValue,_f power){if(minValue==maxValue){return minValue;}_f value=hash12(_v2(_getUID(),ugenhash))*(maxValue-minValue)+minValue;return mapToPower(value,minValue,maxValue,power);}_v3 iqhash3(_v2 p){_v3 q=_v3(dot(p,_v2(127.1,311.7)),dot(p,_v2(269.5,183.3)),dot(p,_v2(419.2,371.9)));return fract(sin(q)*43758.5453);}_f iqnoise(in _v3 P,_f u,_f v){_v2 x=P.xy;_v2 p=floor(x);_v2 f=fract(x);_f k=1.0+63.0*pow(1.0-v,4.0);_f va=0.0;_f wt=0.0;for(int j=-2;j<=2;j++)for(int i=-2;i<=2;i++){_v2 g=_v2(_f(i),_f(j));_v3 o=iqhash3(p+g)*_v3(u,u,1.0);o=0.5+0.5*sin(P.z+6.2831*o);_v2 r=g-f+o.xy;_f d=dot(r,r);_f ww=pow(1.0-smoothstep(0.0,1.414,sqrt(d)),k);va+=o.z*ww;wt+=ww;}return va/wt;}_f fxrand(){return hash12(_v2(_getUID(),ugenhash));}_f _fxrandInc=0.;_f fxrandInc(){_fxrandInc+=.1;return hash12(_v2(_getUID()+_fxrandInc,ugenhash+_fxrandInc));}out _v3 vDebug;void main(){vUv=uv;_f id=_getUID();_f width=1000.0;_f height=1000.0;_f x=mod(id,width);_f y=floor(id/width);_v2 uvDataTexture=_v2((x+0.5)/width,(y+0.5)/height);vec4 dataMain=_t(tDataMain,uvDataTexture);vec4 dataMain2=dataMain.xyzw;dataMain2.x=mod(dataMain2.x+uOffset.x,1.);dataMain2.y=mod(dataMain2.y+uOffset.y,1.);_f mrgo=uMarg;dataMain2.x=(dataMain2.x*1.-.5)*(2.-mrgo*uScreenRatioV2.x);dataMain2.y=(dataMain2.y*1.-.5)*(2.-mrgo*uScreenRatioV2.y);_v2 uvFlow=dataMain2.xy*.5+.5;vec4 colorValue=_t(tPattern,dataMain2.xy);vec4 flow=_t(tFlow,uvFlow);_f valueFlow=(flow.r+flow.g)*0.5*uValueFlowAdjust;_f angleFlow=atan(flow.y,flow.x);_f rt=0.;_f canAdd=0.;_f rotationType=uRotType;\${rotation}_f segmentLength=uLengthM+rbp(0.,uLengthA,uLengthP);_f segmentTh=uThM+rbp(0.,uThA,uThP);_v3 posBase=_v3(0.);posBase.x+=side.x*(segmentLength/uResolution.x);posBase.y+=side.y*(segmentTh/uResolution.y)*(2.*1./uScreenRatio);_f sinRot=sin(rt);_f cosRot=cos(rt);_v3 p1=_v3(0.);p1.x=-1.*(segmentLength/uResolution.x);p1.x=0.;_f p1x=p1.x;_f p1y=p1.y;p1.x=cosRot*p1x-sinRot*p1y;p1.y=sinRot*p1x+cosRot*p1y;p1.y*=uScreenRatio;p1+=(dataMain2.xyz*.5+.5);_v3 p2=_v3(0.);p2.x=1.*(segmentLength/uResolution.x);_f p2x=p2.x;_f p2y=p2.y;p2.x=cosRot*p2x-sinRot*p2y;p2.y=sinRot*p2x+cosRot*p2y;p2.y*=uScreenRatio;p2+=(dataMain2.xyz*.5+.5);if(uDontUsePattern==true){isVisible=1.;isVisibles[3]=1.;}else{isVisibles[3]=cbv(p1,p2,_v3(1.,1.,1.));_f isVisibleSum=isVisibles[3];isVisible=isVisibleSum>0. ? 1. : 0.;}vec4 valueGrid=_t(tGrid,p1.xy);if(uSkipMask==false){isVisibles[3]*=valueGrid.r<uPercentGrid ? 0. : 1.;}_f posBasex=posBase.x;_f posBasey=posBase.y;posBase.x=cosRot*posBasex-sinRot*posBasey;posBase.y=sinRot*posBasex+cosRot*posBasey;posBase.y*=uScreenRatio;_v2 pUV=posBase.xy;pUV+=(dataMain2.xy*.5+.5);_f hue=rbp(-.03,.06,1.);_f saturation=rbp(-.05,.05,1.);_f luminosity=rbp(-.1,.1,1.);vAlpha=rbp(uAlpha.x,uAlpha.y,4.);vColor=_v3(hue,saturation,luminosity);vLineColor=uLineColor;posBase+=_v3(dataMain2.x,dataMain2.y,0.);_v4 pos=_v4(posBase,1.);vModColor1=vnoise(_v3((dataMain2.x)*uCaScale,(dataMain2.y)*uCaScale,0.))*uCaValue;vModColor2=vnoise(_v3((dataMain2.x)*uCaScale,(dataMain2.y)*uCaScale,0.))*uCaValue;_f percentModColor=snoise2d(_v2((dataMain2.x)*uCaScale2,(dataMain2.y)*uCaScale2));_f baseValue2=1.-uCaValue2;vModColor1*=(baseValue2+percentModColor*uCaValue2);vModColor2*=(baseValue2+percentModColor*uCaValue2);if(valueGrid.r<.9){_f rx=1.-mrgo*(.5-mrgo)*uScreenRatioV2.x;_f ry=1.-mrgo*(.5-mrgo)*uScreenRatioV2.y;pos.x=max(-rx,min(pos.x,rx));pos.y=max(-ry,min(pos.y,ry));}else{_f rx=1.-mrgo*.5*(.5-mrgo*.5)*uScreenRatioV2.x;_f ry=1.-mrgo*.5*(.5-mrgo*.5)*uScreenRatioV2.y;pos.x=max(-rx,min(pos.x,rx));pos.y=max(-ry,min(pos.y,ry));}gl_Position=pos;vUid=_getUID();}`,la=`#ifndef PI #define PI 3.141592653589793 #endif #injectUniforms _u _v3 uLineColor;_u bool uIsNormal;in _v2 vUv;in _v3 vColor;in _f isVisible;in _f isVisibles[4];in _f vUid;in _f vModColor1;in _f vModColor2;in _f vAlpha;in _f vBrush; #i_ rgb2hsl #i_ hsl2rgb #i_ cubic #i_ exponential layout(location=0)out vec4 outColor0;_v3 applyMod(_v3 color,_v3 mod){_f hue=color.r+mod.r;_f sat=color.g+mod.g;_f lum=color.b+mod.b;color=hsl2rgb(hue,sat,lum);return color;}in _v3 vDebug;in _v3 vLineColor;void main(){if(vUid>uCountLines){discard;}_v3 color=rgb2hsl(vLineColor);_f hue=color.r+vColor.r;_f sat=color.g+vColor.g-vModColor1*.2+uCaSat*exponentialOut(vUv.y);_f lum=color.b+vColor.b-vModColor2*.4-uCaLum*cubicIn(vUv.y);color=hsl2rgb(hue,sat,lum);_f a=1.;outColor0=vec4(color,vAlpha)*isVisibles[3];if(uDontUsePattern==true){outColor0=vec4(color,vAlpha);}outColor0.a*=a;}`;const Qe={0:` rt = fxrandInc() * M_PI * 2.; canAdd = 1.; `,1:` if( fxrandInc() < .75 ) { rt = fxrandInc() * M_PI * 2.; canAdd = 1.; } else { if( fxrandInc() < .5 ) { rt = 0.; } else { rt = M_PI * .5; } } `,2:` if( fxrandInc() < .3 ) { rt = fxrandInc() * M_PI * 2.; canAdd = 1.; } else { if( fxrandInc() < .5 ) { rt = 0.; } else { rt = M_PI * .5; } } `,3:` rt = vnoise( vec3( ( dataMain.x + ugenhash * .001 ) * uRotNoise.x, ( dataMain.y + ugenhash * .001 ) * uRotNoise.y, 0. ) ); rt *= M_PI * 2.; rt += mix( angleFlow * uAngleFlowBoost, fxrandInc() * M_PI * 2., valueFlow * .1 ); `,4:` if( fxrandInc() < .675 ) { rt = iqnoise( vec3( ( dataMain.x + ugenhash * .001 ) * uRotNoise.x, ( dataMain.y + ugenhash * .001 ) * uRotNoise.y, 0. ), .2, .0 ) * M_PI * 2.; } else { if( fxrandInc() < .5 ) { rt = 0.; } else { rt = M_PI * .5; } } `,6:` rt = mix( angleFlow * uAngleFlowBoost, fxrandInc() * M_PI * 2., valueFlow * .1 ); rt += mix( angleFlow * uAngleFlowBoost, fxrandInc() * M_PI * 2., valueFlow * .1 ); `,7:` vec2 treesOrientations = texture( tTreesOrientation, uvFlow ).rg; treesOrientations.rg -= .5; rt = atan( treesOrientations.y, treesOrientations.x ); rt += mix( angleFlow * uAngleFlowBoost * .1, fxrandInc() * M_PI * 2., valueFlow * .1 ); `,8:` vec2 treesOrientations = texture( tTreesOrientation, uvFlow ).rg; treesOrientations.rg -= .5; rt = atan( treesOrientations.y, treesOrientations.x ) + M_PI * .5; rt += mix( angleFlow * uAngleFlowBoost, fxrandInc() * M_PI * 2., valueFlow * .1 ); `},et=new E(1,1,1);class ha extends j{constructor(e={},t=!1){super(1),this._skipMask=t;const s=1e3;this._texData=new ia(s,s),e.tDataMain=this._texData.textureMain,this._programLinker=new Bt,this._programLinker.init({uniforms:{ugenhash:{value:0},sizePlanes:{value:10}},vs:oa,fs:la,textures:e,dataFroms:c.vegeLinesData});const i=this.u;i.uLineColor={value:et},i.uOffset={value:new F(0,0)},i.uPercentGrid={value:1},i.uSkipMask={value:!1},i.uIsNormal={value:!0},i.uIsFlower={value:!1},i.tBrushes={value:a.textureBrushes},i.tColor={value:a.textureBrushes},i.hasToCheckColor={value:!1},i.uIDAdd={value:0},i.uMarg={value:a.isPrint?.017:0},this._programs={};for(const n in Qe){const l=Qe[n],o=this._programLinker.vs.replace("${rotation}",l);this._programs[n]=new ae(a.gl,{vertex:o,fragment:this._programLinker.fs,uniforms:this._programLinker.uniforms,transparent:!0,cullFace:a.gl.FRONT,depthWrite:!1})}this._program=this._programs[0]||new ae(a.gl,{vertex:this._programLinker.vs,fragment:this._programLinker.fs,uniforms:this._programLinker.uniforms,transparent:!0,cullFace:a.gl.FRONT,depthWrite:!1}),this._mesh=new na(this._texData,this._program),this.addChild(this._mesh),this._hasLineBeenGenerated=!1}async generate(){if(!this._hasLineBeenGenerated){let e=0;const t=this._mesh.lines;for(const s of t)s.x=a.rand(),s.y=a.rand(),s.z=a.rand(),s.w=a.rand(),e++,e%25e3===0&&await P();this._hasLineBeenGenerated=!0}this._mesh.generate()}render({hasToClear:e=!0,hasToUpdateUniforms:t=!0}={}){e||(a.gl.renderer.autoClear=!1,a.gl.clearColor(0,0,0,0));const s=this._programs[this.u.uRotType.value]||this._program;this._mesh.program=s,super.render({hasToClear:e,hasToUpdateUniforms:t})}clear(){a.gl.clearColor(a.bgColor.r,a.bgColor.g,a.bgColor.b,0),a.gl.renderer.autoClear=!0,this._render(this,this._renderTarget,!0),a.gl.renderer.autoClear=!1}prepare({uDontUsePattern:e=!1,uRotType:t=0,uLengthA:s=100,uCountLines:i=1e6,uLineColor:n=et,uAlpha:l=null,uOffset:o=new F(0,0)}){const h=this.u;l&&(h.uAlpha.value.x=l.min,h.uAlpha.value.y=l.max),h.uLengthA.value=s,h.uRotType.value=t,h.uCountLines.value=i,h.uDontUsePattern.value=e,h.uLineColor.value=n,h.uOffset.value=o}updateForTrees(e,t=!0,s=!1){const i=this.u;i.tPattern.value=i.tTrees.value,i.uDontUsePattern.value=!1,i.uLengthM.value=c.treesData.lengthM+(s?20:-10),i.uLengthA.value=c.treesData.lengthA,i.uLengthP.value=c.treesData.lengthP,i.uThM.value=c.treesData.thM+(s?.1:-.1),i.uThA.value=c.treesData.thA,i.uThP.value=c.treesData.thP,i.uRotType.value=7,i.uAlpha.value.x=c.treesData.alpha,i.uAlpha.value.y=c.treesData.alpha+.01,i.ugenhash.value=a.seed+1234,i.uLineColor.value=new E(c.treesData.color),i.uCountLines.value=c.treesData.countLines,i.uSkipMask.value=t,i.uPercentGrid.value=e,i.uIsFlower.value=!1}updateForFlowers(e,t,s=null,i=!0){const n=this.u,l=c.treesData.flowers;n.tPattern.value=n.tTrees.value,n.uDontUsePattern.value=!1,n.uLengthM.value=l.lengthM,n.uLengthA.value=l.lengthA,n.uLengthP.value=l.lengthP,n.uThM.value=l.thM,n.uThA.value=l.thA,n.uThP.value=l.thP,n.uRotType.value=8,n.uAlpha.value.x=l.alpha,n.uAlpha.value.y=l.alpha+.01,n.ugenhash.value=a.seed+1234,n.uLineColor.value=new E(s||l.color),n.uCountLines.value=l.countLines,n.uAngleFlowBoost.value=l.angleFlowBoost,i?(n.uSkipMa
ogramLinker=new Bt({width:this._width,height:this._height}),this._programLinker.init({uniforms:e,textures:t,vs:s,fs:i,dataFroms:l}),this.mesh=Br({uniforms:this._programLinker.uniforms,vertex:this._programLinker.vs,fragment:this._programLinker.fs,width:2,height:2}),this.addChild(this.mesh)),this._onInit()}_onInit(){}refreshTextures(e){this._programLinker.refreshTextures(e)}_createRT(e,t){const s={width:this._width,height:this._height,minFilter:a.gl.LINEAR,magFilter:a.gl.NEAREST,wrapS:a.gl.CLAMP_TO_EDGE,wrapT:a.gl.CLAMP_TO_EDGE,color:e,depth:!1},i=Object.assign({},s,t);return new Ie(a.gl,i)}generate(){}updateProgramLinker(){this._programLinker?.update()}render({hasToClear:e=!0,hasToUpdateUniforms:t=!0}={}){t&&this._programLinker?.update(),this._render(this,this._renderTarget,e)}_setClear(e=-1,t=1){e>=0&&(e=e instanceof E?e:new E(e),a.gl.clearColor(e.r,e.g,e.b,t))}_render(e,t,s=!0){a.renderer.render({scene:e,camera:this._camera,target:t,sort:!1,update:!1,clear:s})}clear(){a.gl.clearColor(a.bgColor.r,a.bgColor.g,a.bgColor.b,0),a.gl.renderer.autoClear=!0,this._render(this,this._renderTarget,!0),a.gl.renderer.autoClear=!1}get uniforms(){return this._programLinker.uniforms}get u(){return this.uniforms}get texture(){return this._renderTarget.texture}get textures(){return this._renderTarget.textures}get renderTarget(){return this._renderTarget}get camera(){return this._camera}}var Ir=`#define M_PI 3.1415926535897932384626433832795 #i_ noiseUtils #i_ snoise2d _v4 pperm(_v4 x){return mod(((x*34.0)+1.0)*x,289.0);}_v4 ptisq(_v4 r){return 1.79-0.85*r;}_v3 pfade(_v3 t){return t*t*t*(t*(t*6.0-15.0)+10.0);}_f pnoise(_v3 P){_v3 Pi0=floor(P);_v3 Pi1=Pi0+_v3(1.0);Pi0=mod(Pi0,289.0);Pi1=mod(Pi1,289.0);_v3 Pf0=fract(P);_v3 Pf1=Pf0-_v3(1.0);_v4 ix=_v4(Pi0.x,Pi1.x,Pi0.x,Pi1.x);_v4 iy=_v4(Pi0.yy,Pi1.yy);_v4 iz0=Pi0.zzzz;_v4 iz1=Pi1.zzzz;_v4 ixy=pperm(pperm(ix)+iy);_v4 ixy0=pperm(ixy+iz0);_v4 ixy1=pperm(ixy+iz1);_v4 gx0=ixy0/7.0;_v4 gy0=fract(floor(gx0)/7.0)-0.5;gx0=fract(gx0);_v4 gz0=_v4(0.5)-abs(gx0)-abs(gy0);_v4 sz0=step(gz0,_v4(0.0));gx0-=sz0*(step(0.0,gx0)-0.5);gy0-=sz0*(step(0.0,gy0)-0.5);_v4 gx1=ixy1/7.0;_v4 gy1=fract(floor(gx1)/7.0)-0.5;gx1=fract(gx1);_v4 gz1=_v4(0.5)-abs(gx1)-abs(gy1);_v4 sz1=step(gz1,_v4(0.0));gx1-=sz1*(step(0.0,gx1)-0.5);gy1-=sz1*(step(0.0,gy1)-0.5);_v3 g000=_v3(gx0.x,gy0.x,gz0.x);_v3 g100=_v3(gx0.y,gy0.y,gz0.y);_v3 g010=_v3(gx0.z,gy0.z,gz0.z);_v3 g110=_v3(gx0.w,gy0.w,gz0.w);_v3 g001=_v3(gx1.x,gy1.x,gz1.x);_v3 g101=_v3(gx1.y,gy1.y,gz1.y);_v3 g011=_v3(gx1.z,gy1.z,gz1.z);_v3 g111=_v3(gx1.w,gy1.w,gz1.w);_v4 norm0=ptisq(_v4(dot(g000,g000),dot(g010,g010),dot(g100,g100),dot(g110,g110)));g000*=norm0.x;g010*=norm0.y;g100*=norm0.z;g110*=norm0.w;_v4 norm1=ptisq(_v4(dot(g001,g001),dot(g011,g011),dot(g101,g101),dot(g111,g111)));g001*=norm1.x;g011*=norm1.y;g101*=norm1.z;g111*=norm1.w;_f n000=dot(g000,Pf0);_f n100=dot(g100,_v3(Pf1.x,Pf0.yz));_f n010=dot(g010,_v3(Pf0.x,Pf1.y,Pf0.z));_f n110=dot(g110,_v3(Pf1.xy,Pf0.z));_f n001=dot(g001,_v3(Pf0.xy,Pf1.z));_f n101=dot(g101,_v3(Pf1.x,Pf0.y,Pf1.z));_f n011=dot(g011,_v3(Pf0.x,Pf1.yz));_f n111=dot(g111,Pf1);_v3 fade_xyz=pfade(Pf0);_v4 n_z=mix(_v4(n000,n100,n010,n110),_v4(n001,n101,n011,n111),fade_xyz.z);vec2 n_yz=mix(n_z.xy,n_z.zw,fade_xyz.y);_f n_xyz=mix(n_yz.x,n_yz.y,fade_xyz.x);return 2.2*n_xyz;} #injectUniforms _f sn3m(_v3 v,_f nb){const _v2 C=_v2(1.0/6.0,1.0/3.0);const _v4 D=_v4(0.0,0.5,1.0,2.0);_v3 i=floor(v+dot(v,C.yyy));_v3 x0=v-i+dot(i,C.xxx);_v3 g=step(x0.yzx,x0.xyz);_v3 l=1.0-g;_v3 i1=min(g.xyz,l.zxy);_v3 i2=max(g.xyz,l.zxy);_v3 x1=x0-i1+C.xxx;_v3 x2=x0-i2+C.yyy;_v3 x3=x0-D.yyy;i=mod289(i);_v4 p=permute(permute(permute(i.z+_v4(0.0,i1.z,i2.z,1.0))+i.y+_v4(0.0,i1.y,i2.y,1.0))+i.x+_v4(0.0,i1.x,i2.x,1.0));_f n_=0.1428;_v3 ns=n_*D.wyz-D.xzx;_v4 j=p-49.0*floor(p*ns.z*ns.z);_v4 x_=floor(j*ns.z);_v4 y_=floor(j-7.0*x_);_v4 x=x_*ns.x+ns.yyyy;_v4 y=y_*ns.x+ns.yyyy;_v4 h=1.0-abs(x)-abs(y);_v4 b0=_v4(x.xy,y.xy);_v4 b1=_v4(x.zw,y.zw);_v4 s0=floor(b0)*2.0+1.0;_v4 s1=floor(b1)*2.0+1.0;_v4 sh=-step(h,_v4(0.));_v4 a0=b0.xzyw+s0.xzyw*sh.xxyy;_v4 a1=b1.xzyw+s1.xzyw*sh.zzww;_v3 p0=_v3(a0.xy,h.x);_v3 p1=_v3(a0.zw,h.y);_v3 p2=_v3(a1.xy,h.z);_v3 p3=_v3(a1.zw,h.w);if(uModMax2==true){p0=max(p0,_v3(0.));p1=max(p1,_v3(0.));p2=max(p2,_v3(0.));p3=max(p3,_v3(0.));}_v4 norm=taylorInvSqrt(_v4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;_f m0=dot(x0,x0);_f m1=dot(x1,x1);_f m2=dot(x2,x2);_f m3=dot(x3,x3);_v4 m=_v4(0.);if(uModMax==true){m=max(nb-_v4(m0,m1,m2,m3),0.);}else{m=nb-_v4(m0,m1,m2,m3);};m=m*m;m=m*m*m*m*m;_f noise=42.*dot(m,_v4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));return noise;}_v3 snv3m(_v3 x,_f noiseBase){_f s=sn3m(_v3(x),noiseBase);_f s1=sn3m(_v3(x.y-19.1,x.z+33.4,x.x+47.2),noiseBase);_f s2=sn3m(_v3(x.z+74.2,x.x-124.5,x.y+99.4),noiseBase);_v3 c=_v3(s,s1,s2);return c;}_v3 cnm(_v3 p,_f nb){const _f e=.1;_v3 dx=_v3(e,0.0,0.0);_v3 dy=_v3(0.0,e,0.0);_v3 dz=_v3(0.0,0.0,e);_v3 p_x0=snv3m(p-dx,nb);_v3 p_x1=snv3m(p+dx,nb);_v3 p_y0=snv3m(p-dy,nb);_v3 p_y1=snv3m(p+dy,nb);_v3 p_z0=snv3m(p-dz,nb);_v3 p_z1=snv3m(p+dz,nb);_f x=p_y1.z-p_y0.z-p_z1.y+p_z0.y;_f y=p_z1.x-p_z0.x-p_x1.z+p_x0.z;_f z=p_x1.y-p_x0.y-p_y1.x+p_y0.x;const _f divisor=1.0/(2.0*e);return normalize(_v3(x,y,z)*divisor);}_u _f uSeed;_u _v2 uResolution;_u _f uScreenRatio;in _v2 vUv;_lay 0)out _v4 outColor0;_vm_v2 uv=vUv*_v2(uScreenRatio,1.);uv.x+=uOffset;_v2 uvOrigin=uv;_v3 curl=_v3(0.);_v2 zeroUV=_v2(0.);_v2 valueTest=_v2(0.);_f cum=uCUvMult;_f cra=uCRatioAccu;_v2 ucu=cum*_v2(uCUvMultX,uCUvMultY);_f crx=uCRatioX*cra;_f cry=uCRatioY*cra;curl=cnm(_v3((uv+zeroUV)*ucu,uSeed*uCSeedMult),uModBase);curl*=uCStr;uv.x+=curl.x*crx;uv.y+=curl.y*cry;valueTest.x+=curl.x*crx;valueTest.y+=curl.y*cry;for(int i=0;i<uCLoop;i++){curl=cnm(_v3((uv+zeroUV)*ucu,uSeed*uCSeedMult),uModBase);curl*=uCStr;uv.x+=curl.x*crx;uv.y+=curl.y*cry;valueTest.x+=curl.x*crx;valueTest.y+=curl.y*cry;}_v2 valueTest2=_v2(0.);_v2 uv2=uvOrigin;_v2 suv=_v2(uSnUvMultX,uSnUvMultY);_f cvalue=snoise2d(_v2(uv2*uSnUvMult*suv+uSeed*uSnSeedMult))*M_PI;cvalue*=uSnStr;_f srx=uSnRatioX*uSnRatioAccu;_f sry=uSnRatioY*uSnRatioAccu;uv2.x+=cos(cvalue)*srx;uv2.y+=sin(cvalue)*sry;valueTest2.x+=cos(cvalue)*srx;valueTest2.y+=sin(cvalue)*sry;for(int i=0;i<uSnLoop;i++){cvalue=snoise2d(_v2(uv2*uSnUvMult*suv+uSeed*uSnSeedMult))*M_PI;cvalue*=uSnStr;uv2.x+=cos(cvalue)*srx;uv2.y+=sin(cvalue)*sry;valueTest2.x+=cos(cvalue)*srx;valueTest2.y+=sin(cvalue)*sry;}_f pvalue=pnoise(_v3(uvOrigin*uPNoiseUvMult,uSeed*uPNoiseSeedMult))*uPNoiseStr;_v2 uvMix=mix(uv,uv2,uMixRatio);_v2 uvFinal=mix(uv,uvMix,pvalue);_v2 uvTestMix=mix(valueTest,valueTest2,uMixRatio*pvalue);_v2 uvTestFinal=mix(valueTest,uvTestMix,pvalue);outColor0=_v4(normalize(uvTestMix.xy),0.,1.);}`;class Gr extends j{constructor(e){const t=a.gl;super(.15,{type:t.FLOAT,internalFormat:t.renderer.isWebgl2?t.RGBA32F:t.RGBA,wrapS:t.CLAMP_TO_EDGE,wrapT:t.CLAMP_TO_EDGE,generateMipmaps:!1,minFilter:t.NEAREST,magFilter:t.NEAREST}),this.init({fs:Ir,textures:e,dataFroms:[c.flowData]})}render(){this.uniforms.uSeed.value=a.seed,this.uniforms.uOffset.value=a.rand()*100-50,super.render({hasToUpdateUniforms:a.renderingMode=="animated"?!a.isOver:!0})}}class Nr{constructor(){this.possibleCols=[];let e=2048;for(;e>4;)this.possibleCols.push(e),e>>=1;this.possibleLines=[];let t=1024;for(;t>4;)this.possibleLines.push(t),t>>=1}getNewRandomCellSize(e=1024){const t=[];let s=e;for(;s>4;)t.push(s),s>>=1;return s=t[a.rand2()*t.length>>0],a.size.height/s}getNextPowerOfTwo(e){const t=[];let s=e;for(;s>=2;)s&s-1||t.push(s),s>>=1;const i=a.rand2()*t.length>>0;return t[i]}getPowerOfTwoBetween(e,t){const s=[];let i=t;for(;i>=e;)i&i-1||s.push(i),i>>=1;const n=a.rand2()*s.length>>0;return s[n]}}const Or=new Nr;class G{constructor({width:e=a.size.width,height:t=a.size.height,ratio:s=1,hasToCreateDebugMesh:i=!1,renderTargetOpts:n={},willReadFrequently:l=!1}={}){this._width=e*s,this._height=t*s,this._ratio=s,this._willReadFrequently=l,this._initEngine(n),i&&this._createDebugMesh()}_initEngine(e){this.canvas=document.createElement("canvas"),this.canvas.width=this._width,this.canvas.height=this._height,this.canvas.classList.add("patterns"),this.ctx=this.canvas.getContext("2d",{willReadFrequently:this._willReadFrequently});const t={image:this.canvas,minFilter:a.gl.NEAREST,magFilter:a.gl.NEAREST,generateMipmaps:!1},s=Object.assign({},t,e);this._texture=new oe(a.gl,s)}_createDebugMesh(){this._uniforms={uTexture:{value:this._texture},uOpacity:{value:.2}},this.mesh=new Le(a.gl,{geometry:new Ve(a.gl,{width:1,height:1}),program:new ae(a.gl,{vertex:` attribute vec2 uv; attribute vec3 position; varying vec2 vUv; void main() { vUv = uv; gl_Position = vec4( position * 2., 1.0 ); } `,fragment:` precision highp float; uniform sampler2D uTexture; uniform float uOpacity; varying vec2 vUv; void main() { gl_FragColor = texture2D( uTexture, vUv ) * uOpacity; } `,uniforms:this._uniforms,transparent:!0})})}createDebugView({ratioSize:e=.05,marginTop:t=10}={}){this.canvas.style.zIndex=1001,this.canvas.style.width=this._width*e+"px",this.canvas.style.height=this._height*e+"px",this.canvas.style.top=idx*this._height*e+t+"px",this.canvas.style.left="5px",this.canvas.style.transform="translate( 0, 0 )",this.canvas.style.border="2px solid #444",this.canvas.classList.add("debug"+idx),document.body.appendChild(this.canvas)}clear({clearColor:e="#000"}={}){this.ctx.fillStyle=e,this.ctx.fillRect(0,0,this._width,this._height)}draw(){}render(){}_refreshDebugMesh(){this._uniforms.uOpacity.value=.1}resize(e,t){this._width=e*this._ratio,this._height=t*this._ratio,this.canvas.width=this._width,this.canvas.height=this._height,this.canvas.style.width=this._width+"px",this.canvas.style.height=this._height+"px",this._texture.needsUpdate=!0}dispose(){this.canvas.width=0,this.canvas.height=0,this.canvas=null,this._texture.dispose()}get texture(){return this._texture}get width(){return this._width}get height(){return this._height}get ratio(){return this._ratio}}const P=()=>new Promise(requestAnimationFrame);function je(r){this.p=new Uint8Array(256),this.perm=new Uint8Array(512),this.permMod12=new Uint8Array(512);for(var e=0;256>e;e++)this.p[e]=256*a.rand();for(e=0;512>e;e++)this.perm[e]=this.p[255&e],this.permMod12[e]=this.perm[e]%12}var Vr=1/3,N=1/6;je.prototype={grad3:new Float32Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]),noise3D:function(r,e,t){var s,i,n,l,o,h,d,u,f,g,_=this.permMod12,m=this.perm,p=this.grad3,w=(r+e+t)*Vr,v=Math.floor(r+w),x=Math.floor(e+w),y=Math.floor(t+w),M=(v+x+y)*N,k=v-M,S=x-M,U=y-M,C=r-k,L=e-S,D=t-U;C>=L?L>=D?(o=1,h=0,d=0,u=1,f=1,g=0):C>=D?(o=1,h=0,d=0,u=1,f=0,g=1):(o=0,h=0,d=1,u=1,f=0,g=1):D>L?(o=0,h=0,d=1,u=0,f=1,g=1):D>C?(o=0,h=1,d=0,u=0,f=1,g=1):(o=0,h=1,d=0,u=1,f=1,g=0);var A=C-o+N,I=L-h+N,q=D-d+N,H=C-u+2*N,Y=L-f+2*N,Se=D-g+2*N,De=C-1+3*N,Ce=L-1+3*N,Ae=D-1+3*N,he=255&v,ue=255&x,de=255&y,Q=.6-C*C-L*L-D*D;if(0>Q)s=0;else{var Pe=3*_[he+m[ue+m[de]]];Q*=Q,s=Q*Q*(p[Pe]*C+p[Pe+1]*L+p[Pe+2]*D)}var ee=.6-A*A-I*I-q*q;if(0>ee)i=0;else{var Te=3*_[he+o+m[ue+h+m[de+d]]];ee*=ee,i=ee*ee*(p[Te]*A+p[Te+1]*I+p[Te+2]*q)}var te=.6-H*H-Y*Y-Se*Se;if(0>te)n=0;else{var ze=3*_[he+u+m[ue+f+m[de+g]]];te*=te,n=te*te*(p[ze]*H+p[ze+1]*Y+p[ze+2]*Se)}var se=.6-De*De-Ce*Ce-Ae*Ae;if(0>se)l=0;else{var ke=3*_[he+1+m[ue+1+m[de+1]]];se*=se,l=se*se*(p[ke]*De+p[ke+1]*Ce+p[ke+2]*Ae)}return 32*(s+i+n+l)}};class K{constructor(e,t,s,i){this.x=e,this.y=t,this.width=s,this.height=i,this._lines=[],this._data=c.gridData.divisions,this._isFinal=!1,this._isEmpty=!1}divide(e=0,t=1){this._idxDivision=e,this._chanceDivision=t;const s=this.x,i=this.y;this._idxDivision<this._data.linesDivisions&&(this._lines.push({xFrom:s,yFrom:i,xTo:s+this.width,yTo:i}),this._lines.push({xFrom:s,yFrom:i,xTo:s,yTo:i+this.height}),this._lines.push({xFrom:s+this.width,yFrom:i,xTo:s+this.width,yTo:i+this.height}),this._lines.push({xFrom:s,yFrom:i+this.height,xTo:s+this.width,yTo:i+this.height}));const n=this._divide(this.x,this.y,this.width,this.height),l=a.rand2(),o=this._data.activateChanceFilling?l<this._data.chanceFilling:!0;n||(o?this._isFinal=!0:this._isEmpty=!0)}_divide(e,t,s,i){const n=a.rand2(),l=a.rand2();if(this._idxDivision>=this._data.maxDivisions||n>this._chanceDivision)return!1;c.gridData.divisionsType;let o=c.gridData.margin;const h=s/2-o*.5,d=i/2-o*.5;this._cells=[],l<.95&&(this._cells.push(new K(e,t,h,d)),this._cells.push(new K(e+h+o,t,h,d)),this._cells.push(new K(e,t+d+o,h,d)),this._cells.push(new K(e+h+o,t+d+o,h,d)));for(let u of this._cells)u.divide(this._idxDivision+1,this._chanceDivision*this._data.friction);return!0}seasonize(e,t){if(!this._isFinal){for(let o of this._cells)o.seasonize();return}let s=e.noise3D(this.x/c.gridData.divisions.noiseScale,this.y/c.gridData.divisions.noiseScale,0+a.seed),i=e.noise3D(this.x/c.gridData.divisions.noiseScale,this.y/c.gridData.divisions.noiseScale,1e3+a.seed);if(s=(s+1)/2,i=(s+1)/2,c.gridData.divisions.useMacroScale){const o=c.gridData.divisions.noiseScale*c.gridData.divisions.macroScale;let h=e.noise3D(this.x/o,this.y/o,0+a.seed);s+=h*.5}const n=c.compositionsData.layers.totalDivider,l=c.compositionsData.layers.totalDivider2;this.value=Math.floor(s*n)/(n-1),this.value3=s,this.value2=Math.floor(i*l)/l}draw=(e,t,s=1)=>{if(!this._isFinal)return;const i=this.value*255>>0,n=this.value3*255>>0,l=this.value2*255>>0,o=this.x*s,h=this.y*s,d=this.width*s,u=this.height*s;e.fillStyle="rgb("+i+","+i+","+n+")",t.fillStyle="rgb("+l+","+l+","+l+")",e.fillRect(o,h,d,u),t.fillRect(o,h,d,u)};drawLines=e=>{if(!this._isFinal)return;const t=2,s=t>>1;e.save(),e.strokeStyle="#fff",e.lineWidth=t,e.translate(this.x,this.y),e.strokeRect(-s,-s,this.width+s,this.height+s),e.restore()};drawEmpty=e=>{this._isEmpty&&(e.save(),e.fillStyle="#fff",e.translate(this.x,this.y),e.fillRect(0,0,this.width,this.height),e.restore())};collectFinalCells(e){if(this._isFinal){e.push(this);return}if(this._cells)for(const t of this._cells)t.collectFinalCells(e)}collectFinalLines(e){if(this._lines)for(let t=0;t<this._lines.length;t++)e.push(this._lines[t]);if(this._cells)for(const t of this._cells)t.collectFinalLines(e)}get finalCells(){if(this._isFinal)return[this];if(!this._cells)return[];const e=[];for(const t of this._cells){const s=t.finalCells;for(let i=0;i<s.length;i++)e.push(s[i])}return e}get lines(){let e=[...this._lines||[]];if(this._cells)for(const t of this._cells)e=e.concat(t.lines);return e}get emptyCells(){if(this._isEmpty)return[this];{let e=[];if(this._cells)for(let t of this._cells)e=e.concat(t.emptyCells);return e}}}class $r{constructor(e){this._ratio=e}generate(e=null,t,s){e==null&&this.clear(),this._ctx=e||this.ctx,this._ctx.willReadFrequently=!0,s.willReadFrequently=!0;let i=100+a.rand()*200>>0;const n=[{x:0,y:1},{x:1,y:0},{x:-1,y:0},{x:0,y:-1}];let l=[2,1];t==512&&(l=[4,2]),i=a.rand()*50+150>>0;for(let o=0;o<i;o++){const h=t/l[a.rand()*l.length>>0],d=a.size.width/h,u=a.size.height/h,f=a.rand()*d>>0,g=u*.5+a.rand()*u*.5>>0;let _=a.rand()*255>>0,m=_,p=_,w=0;if(e&&a.rand()<.5){p=0;for(let v of n){const x=(f+v.x)*h,y=(g+v.y)*h;if(x>=0&&x<a.size.width&&y>=0&&y<a.size.height){let M=this._getImageData(this._ctx,x,y,1,1);p+=M,M=this._getImageData(s,x,y,1,1),w++}}w>0&&(p=p/w>>0,_=p>127?Math.max(0,p-100):Math.min(255,p+100),m=p>127?Math.max(0,p-100):Math.min(255,p+100))}this._ctx.fillStyle=`rgba( ${_}, ${_}, ${_}, .5 )`,this._fillRect(this._ctx,f*h,g*h,h,h),a.rand()<.8&&(s.fillStyle=`rgba( ${m}, ${m}, ${m}, .5 )`,this._fillRect(s,f*h,g*h,h,h))}e==null&&(this.texture.needsUpdate=!0)}generateVertLines(e=null,t,s){this._ctx=e;let i=30+a.rand()*40>>0,n=1;switch(t){case 512:n=4;break;case 256:n=2;break;case 128:n=2;break}for(let l=0;l<i;l++){const o=t/n,h=a.size.height/o,d=a.size.width/o,u=a.rand()*d>>0,f=1+a.rand()*h*.5>>0,g=a.size.height/o;let _=(a.rand()*(g-Math.ceil(f/o))>>0)*o,m=a.rand()*75>>0;m=0;let p=m+75+a.rand()*100>>0;if(p=255,_<a.size.height*.5){let x=m;m=p,p=x}const w=_/o,v=f/w>>0;_-=o;for(let x=0;x<w;x++){const y=u*o,M=_+x*o*v;let k=0,S=0,U=0,C=0;y>0&&(k=this._getImageData(this._ctx,y-o,M),S=this._getImageData(s,y-o,M)),y+o<a.size.width&&(U=this._getImageData(this._ctx,y+o,M),C=this._getImageData(s,y+o,M));let L=m+(p-m)*x/w>>0,D=L;const A=(k+U)/2;Math.abs(L-A)<50&&(L=A>127?Math.max(0,A-100):Math.min(255,A+100));const I=(S+C)/2;Math.abs(D-I)<50&&(D=I>127?Math.max(0,I-100):Math.min(255,I+100)),this._ctx.fillStyle=`rgba(${L}, ${L}, ${L}, .85)`,this._fillRect(this._ctx,y,M,o,o*v),s.fillStyle=`rgba(${D}, ${D}, ${D}, .85)`,this._fillRect(s,y,M,o,o*v)}}}generateVertLines2(e=null,t,s){this._ctx=e,this._ctx.willReadFrequently=!0,s.willReadFrequently=!0;let i=30+a.rand()*40>>0,n=1;switch(t){case 512:n=4;break;case 256:n=2;break;case 128:n=2;break}for(let l=0;l<i;l++){const o=t/n,h=a.size.height/o,d=a.size.width/o,u=a.rand()*d>>0,f=1+a.rand()*h*.5>>0,g=a.size.height/o,_=a.size.height-(a.rand()*(g-Math.ceil(f/o))>>0)*o-o*f;let m=a.rand()*75>>0;m=0;let p=m+75+a.rand()*100>>0;if(p=255,_>a.size.height*.5){let v=m;m=p,p=v}const w=f;for(let v=0;v<w;v++){const x=u*o,y=_+v*o;let M=0,k=0,S=0,U=0;x>0&&(M=this._getImageData(this._ctx,x-o,y),k=this._getImageData(s,x-o,y)),x+o<a.size.width&&(S=this._getImageData(this._ctx,x+o,y),U=this._getImageData(s,x+o,y));let C=m+(p-m)*v/w>>0,L=C;const D=(M+S)/2;Math.abs(C-D)<50&&(C=D>127?Math.max(0,D-100):Math.min(255,D+100));const A=(k+U)/2;Math.abs(L-A)<50&&(L=A>127?Math.max(0,A-100):Math.min(255,A+100)),this._ctx.fillStyle=`rgba(${C}, ${C}, ${C}, .85)`,this._fillRect(this._ctx,x,y,o,o),s.fillStyle=`rgba(${L}, ${L}, ${L}, .85)`,this._fillRect(s,x,y,o,o)}}}_fillRect(e,t,s,i,n){e.fillRect(t*this._ratio,s*this._ratio,i*this._ratio,n*this._ratio)}_getImageData(e,t,s){return e.getImageData(t*this._ratio,s*this._ratio,1,1).data[0]}}class jr extends G{constructor(){const t={flipY:!1};super({renderTargetOpts:t,ratio:.25,willReadFrequently:!0}),this._textures=[],this._gridLines=new G({renderTargetOpts:t}),this._gridScene=new G({renderTargetOpts:t,ratio:.25,willReadFrequently:!0}),this._gridCustom=new $r(.25),this._noise=new je(a.rand2)}getNoiseValues(e,t){const s=Math.floor(e/this._cellSizeMin),i=Math.floor(t/this._cellSizeMin);return this._noiseCompiled[i][s]}async generate(e){this._cellSize=e,this._cells=[],this._finalCells=null;const t=c.gridData,s=t.margin,i=a.size.width/e,n=a.size.height/e,l=(a.size.width-s*(i+1))/i,o=(a.size.height-s*(n+1))/n;let h=s,d=s;for(let u=0;u<n;u++){for(let f=0;f<i;f++){const g=new K(h,d,l,o);g.divide(0,t.divisions.chance),this._cells.push(g),h+=l+s}h=s,d+=o+s,await P()}this._finalCells=[],this._finalLines=[],this._finalLines.push({xFrom:s,yFrom:s,xTo:a.size.width-s,yTo:s}),this._finalLines.push({xFrom:s,yFrom:s,xTo:s,yTo:a.size.height-s}),this._finalLines.push({xFrom:a.size.width-s,yFrom:s,xTo:a.size.width-s,yTo:a.size.height-s}),this._finalLines.push({xFrom:s,yFrom:a.size.height-s,xTo:a.size.width-s,yTo:a.size.height-s});for(const u of this._cells)u.collectFinalCells(this._finalCells),u.collectFinalLines(this._finalLines)}async seasonize(){let e=0;for(let t of this.finalCells)t.seasonize(this._noise,this),e++,e%1e3===0&&await P()}async render(){this.clear({clearColor:"#000"}),this._gridLines.clear(),this._gridScene.clear();let e=0;for(let t of this._finalCells)t.draw(this.ctx,this._gridScene.ctx,this._ratio),e%1e3==0&&await P(),e+=1;a.generator.isBroken&&(this._customizeGrid(),this._gridCustom.generate(this._gridScene.ctx,this._cellSize,this.ctx),a.generator.isBrokenVerticaly&&this._gridCustom.generateVertLines(this._gridScene.ctx,this._cellSize,this.ctx),a.generator.isExtraBrokenVerticaly&&this._gridCustom.generateVertLines2(this._gridScene.ctx,this._cellSize,this.ctx)),await P(),this.texture.needsUpdate=!0,this._gridScene.texture.needsUpdate=!0,this._gridLines.ctx.strokeStyle="rgba(255, 255, 255, 0.8)",this._gridLines.ctx.lineCap="square";for(let t of this.finalLines){if(!t||a.rand()>c.gridData.divisions.chanceDrawLine)continue;const s=t.xFrom===t.xTo,i=1+a.rand3()*6>>0;for(let n=0;n<i;n++)this._gridLines.ctx.beginPath(),this._gridLines.ctx.lineWidth=c.gridPatternData.width,s?(this._gridLines.ctx.moveTo(t.xFrom+a.rand()*8-4,t.yFrom+a.rand()*4-2),this._gridLines.ctx.lineTo(t.xTo+a.rand()*8-4,t.yTo+a.rand()*4-2)):(this._gridLines.ctx.moveTo(t.xFrom+a.rand()*4-2,t.yFrom+a.rand()*8-4),this._gridLines.ctx.lineTo(t.xTo+a.rand()*4-2,t.yTo+a.rand()*8-4)),this._gridLines.ctx.stroke(),this._gridLines.ctx.closePath()}await P(),this._gridLines.texture.needsUpdate=!0}_customizeGrid(){this._cellSize=this._cellSize;const e=a.size.width/this._cellSize,t=a.size.height/this._cellSize;if(Math.floor(a.size.width/this._cellSize),Math.floor(a.size.height/this._cellSize),a.generator.isBroken)for(let s=0;s<e;s++){let i=-1;const n=a.rand3();if(n<.33?i=a.rand3()*255:n<.66?i=a.rand3()*125:n<.75&&(i=-2),i!=-1)for(let l=0;l<t;l++){i==-2&&(i=l%2===0?25:150,s%4===0?i=l%2===0?25:150:s%4===1?i=l%2===0?125:10:s%4===2?i=200:s%4===3&&(i=l%2===0?25:225));const o=s*this._cellSize,h=l*this._cellSize;this._gridScene.ctx.fillStyle=`rgba(${i}, ${i}, ${i}, 0.5)`,this._gridScene.ctx.fillRect(o*this._ratio,h*this._ratio,this._cellSize*this._ratio,this._cellSize*this._ratio)}}for(let s=0;s<10;s++)for(let i=0;i<e;i++){if(a.rand()<.25)return;const n=i*this._cellSize,l=s*this._cellSize;this.ctx.fillStyle=`rgba(${10}, ${10}, ${10}, 0.25)`,this.ctx.fillRect(n*this._ratio,l*this._ratio,this._cellSize*this._ratio,this._cellSize*this._ratio)}}get finalCells(){return this._finalCells}get finalLines(){return this._finalLines}get textures(){return this._textures}get textureLines(){return this._gridLines.texture}get textureUV(){return this._gridUV.texture}get textureEmpty(){return this._gridEmpty.texture}get textureScene(){return this._gridScene.texture}}class qr extends G{constructor(){const e={flipY:!1};super({renderTargetOpts:e,ratio:.1})}render(e){this.clear();for(const t of e)this._renderBranch(t);this.texture.needsUpdate=!0}_renderBranch(e){this._renderLeaves(e)}_renderLeaves(e){for(const t of e.leaves){const s=this.ctx,i=this._createLinearGradient(s,t.x-t.size,t.y,t.x+t.size,t.y);i.addColorStop(0,"rgba(0,0,255,1)"),i.addColorStop(1,"rgba(255,0,255,1)");const n=this._createLinearGradient(s,t.x,t.y-t.size,t.x,t.y+t.size);n.addColorStop(0,"rgba(0,0,255,1)"),n.addColorStop(1,"rgba(0,255,255,1)"),s.save(),s.beginPath(),this._rect(s,t.x-t.size,t.y-t.size,t.size*2,t.size*2),s.clip(),s.fillStyle=i,this._fillRect(s,t.x-t.size,t.y-t.size,t.size*2,t.size*2),s.globalCompositeO
rr(r){return r=parseInt(r),[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255]}function Je(r){return r===void 0?[0,0,0]:arguments.length===3?arguments:isNaN(r)?r[0]==="#"?Ke(r):Xe[r.toLowerCase()]?Ke(Xe[r.toLowerCase()]):[0,0,0]:rr(r)}class E extends Array{constructor(e){return Array.isArray(e)?super(...e):super(...Je(...arguments))}get r(){return this[0]}get g(){return this[1]}get b(){return this[2]}set r(e){this[0]=e}set g(e){this[1]=e}set b(e){this[2]=e}set(e){return Array.isArray(e)?this.copy(e):this.copy(Je(...arguments))}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this}}function ar(r,e){return r[0]=e[0],r[1]=e[1],r}function nr(r,e,t){return r[0]=e,r[1]=t,r}class F extends Array{constructor(e=0,t=e){return super(e,t),this}get x(){return this[0]}get y(){return this[1]}set x(e){this[0]=e}set y(e){this[1]=e}set(e,t=e){return e.length?this.copy(e):(nr(this,e,t),this)}copy(e){return ar(this,e),this}}class Ve extends be{constructor(e,{width:t=1,height:s=1,widthSegments:i=1,heightSegments:n=1,attributes:l={}}={}){const o=i,h=n,d=(o+1)*(h+1),u=o*h*6,f=new Float32Array(d*3),g=new Float32Array(d*3),_=new Float32Array(d*2),m=u>65536?new Uint32Array(u):new Uint16Array(u);Ve.buildPlane(f,g,_,m,t,s,0,o,h),Object.assign(l,{position:{size:3,data:f},normal:{size:3,data:g},uv:{size:2,data:_},index:{data:m}}),super(e,l)}static buildPlane(e,t,s,i,n,l,o,h,d,u=0,f=1,g=2,_=1,m=-1,p=0,w=0){const v=p,x=n/h,y=l/d;for(let M=0;M<=d;M++){let k=M*y-l/2;for(let S=0;S<=h;S++,p++){let U=S*x-n/2;if(e[p*3+u]=U*_,e[p*3+f]=k*m,e[p*3+g]=o/2,t[p*3+u]=0,t[p*3+f]=0,t[p*3+g]=o>=0?1:-1,s[p*2]=S/h,s[p*2+1]=1-M/d,M===d||S===h)continue;let C=v+S+M*(h+1),L=v+S+(M+1)*(h+1),D=v+S+(M+1)*(h+1)+1,A=v+S+M*(h+1)+1;i[w*6]=C,i[w*6+1]=L,i[w*6+2]=A,i[w*6+3]=L,i[w*6+4]=D,i[w*6+5]=A,w++}}}}class or extends be{constructor(e,{attributes:t={}}={}){Object.assign(t,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(e,t)}}class lr{constructor(e,{width:t,height:s,dpr:i,wrapS:n=e.CLAMP_TO_EDGE,wrapT:l=e.CLAMP_TO_EDGE,minFilter:o=e.LINEAR,magFilter:h=e.LINEAR,geometry:d=new or(e),targetOnly:u=null}={}){this.gl=e,this.options={wrapS:n,wrapT:l,minFilter:o,magFilter:h},this.passes=[],this.geometry=d,this.uniform={value:null},this.targetOnly=u;const f=this.fbo={read:null,write:null,swap:()=>{let g=f.read;f.read=f.write,f.write=g}};this.resize({width:t,height:s,dpr:i})}addPass({vertex:e="",fragment:t="",uniforms:s={},textureUniform:i="tMap",enabled:n=!0}={}){s[i]={value:this.fbo.read.texture};const l=new ae(this.gl,{vertex:e,fragment:t,uniforms:s}),h={mesh:new Le(this.gl,{geometry:this.geometry,program:l}),program:l,uniforms:s,enabled:n,textureUniform:i};return this.passes.push(h),h}resize({width:e,height:t,dpr:s}={}){s&&(this.dpr=s),e&&(this.width=e,this.height=t||e),s=this.dpr||this.gl.renderer.dpr,e=Math.floor((this.width||this.gl.renderer.width)*s),t=Math.floor((this.height||this.gl.renderer.height)*s),this.options.width=e,this.options.height=t,this.fbo.read=new Ie(this.gl,this.options),this.fbo.write=new Ie(this.gl,this.options)}render({scene:e,camera:t,texture:s,target:i=null,update:n=!0,sort:l=!0,frustumCull:o=!0,beforePostCallbacks:h}){const d=this.passes.filter(u=>u.enabled);s||(this.gl.renderer.render({scene:e,camera:t,target:d.length||!i&&this.targetOnly?this.fbo.write:i,update:n,sort:l,frustumCull:o}),this.fbo.swap(),h&&h.forEach(u=>u&&u())),d.forEach((u,f)=>{u.mesh.program.uniforms[u.textureUniform].value=!f&&s?s:this.fbo.read.texture,this.gl.renderer.render({scene:u.mesh,target:f===d.length-1&&(i||!this.targetOnly)?i:this.fbo.write,clear:!0}),this.fbo.swap()}),this.uniform.value=this.fbo.read.texture}}var hr="_m4 bmx(_f b){return _m4(1,0,0,0,0,1,0,0,0,0,1,0,b,b,b,1);}_v3 brn(_v3 c,_f v){return c+v;}",ur="_m4 contrastMatrix(_f contrast){_f t=(1.0-contrast)/2.0;return _m4(contrast,0,0,0,0,contrast,0,0,0,0,contrast,0,t,t,t,1);}_v3 contrast(_v3 color,_f value){return 0.5+value*(color-0.5);}",dr="_v3 hueshift(_v3 color,_f hue){const _v3 k=_v3(0.57735,0.57735,0.57735);_f cosAngle=cos(hue);return _v3(color*cosAngle+cross(k,color)*sin(hue)+k*dot(k,color)*(1.0-cosAngle));}_v3 hueshift2(_v3 color,_f shift){_v3 P=_v3(0.55735)*dot(_v3(0.55735),color);_v3 U=color-P;_v3 V=cross(_v3(0.55735),U);color=U*cos(shift*6.2832)+V*sin(shift*6.2832)+P;return color;}",cr="_v3 saturation(_v3 rgb,_f adjustment){const _v3 W=_v3(0.2125,0.7154,0.0721);_v3 intensity=_v3(dot(rgb,W));return mix(intensity,rgb,adjustment);}_v3 saturation2(_v3 rgb,_f adjustment){const _v3 W=_v3(0.2125,0.7154,0.0721);_v3 intensity=_v3(dot(rgb,W));return mix(rgb,intensity,adjustment);}",fr="vec3 blAverage(vec3 base,vec3 bl){return(base+bl)/2.0;}vec3 blAverage(vec3 base,vec3 bl,float opacity){return(blAverage(base,bl)*opacity+base*(1.0-opacity));}_v3 blmd(_i mode,_v3 base,_v3 bl,_f opacity){if(mode==2){return blAverage(base,bl,opacity);}}_v3 blendMode(_i mode,_v3 base,_v3 bl,_f opacity){return blmd(mode,base,bl,opacity);}",gr="_v4 sharpen(in _s2 tex,in _v2 coords,in _v2 renderSize){_f dx=1.0/renderSize.x;_f dy=1.0/renderSize.y;_v4 sum=_v4(0.0);sum+=-1.*_t(tex,coords+_v2(-1.0*dx,0.0*dy));sum+=-1.*_t(tex,coords+_v2(0.0*dx,-1.0*dy));sum+=5.*_t(tex,coords+_v2(0.0*dx,0.0*dy));sum+=-1.*_t(tex,coords+_v2(0.0*dx,1.0*dy));sum+=-1.*_t(tex,coords+_v2(1.0*dx,0.0*dy));return sum;}",_r="vec3 exposure(vec3 color,float value){return(1.0+value)*color;}_f Lum(_v3 c){return 0.299*c.r+0.587*c.g+0.114*c.b;}_v3 ClipColor(_v3 c){_f l=Lum(c);_f n=min(min(c.r,c.g),c.b);_f x=max(max(c.r,c.g),c.b);if(n<0.0)c=max((c-l)*l/(l-n)+l,0.0);if(x>1.0)c=min((c-l)*(1.0-l)/(x-l)+l,1.0);return c;}_v3 SetLum(_v3 c,_f l){c+=l-Lum(c);return ClipColor(c);}_f Sat(_v3 c){_f n=min(min(c.r,c.g),c.b);_f x=max(max(c.r,c.g),c.b);return x-n;}_v3 SetSat(_v3 c,_f s){_f cmin=min(min(c.r,c.g),c.b);_f cmax=max(max(c.r,c.g),c.b);_v3 res=_v3(0.0);if(cmax>cmin){if(c.r==cmin&&c.b==cmax){res.r=0.0;res.g=((c.g-cmin)*s)/(cmax-cmin);res.b=s;}else if(c.r==cmin&&c.g==cmax){res.r=0.0;res.b=((c.b-cmin)*s)/(cmax-cmin);res.g=s;}else if(c.g==cmin&&c.b==cmax){res.g=0.0;res.r=((c.r-cmin)*s)/(cmax-cmin);res.b=s;}else if(c.g==cmin&&c.r==cmax){res.g=0.0;res.b=((c.b-cmin)*s)/(cmax-cmin);res.r=s;}else if(c.b==cmin&&c.r==cmax){res.b=0.0;res.g=((c.g-cmin)*s)/(cmax-cmin);res.r=s;}else{res.b=0.0;res.r=((c.r-cmin)*s)/(cmax-cmin);res.g=s;}}return res;}vec3 autoExposure(_v4 artwork,_f highlights,_f shadows,bool autoExposure){_f amt=mix(highlights,shadows,Lum(artwork.rgb))*artwork.a;if(amt<0.0)amt*=2.0;_v3 res=mix(artwork.rgb,_v3(1.0),amt);if(autoExposure==true){_v3 blend=mix(_v3(1.0),pow(artwork.rgb,_v3(1.0/0.7)),amt);res=max(1.0-((1.0-res)/blend),0.0);res=SetLum(SetSat(artwork.rgb,Sat(res)),Lum(res));}return res;}vec3 autoExposure(_v4 artwork,_f highlights,_f shadows){return autoExposure(artwork,highlights,shadows,true);}",pr="_f hue2rgb(_f f1,_f f2,_f hue){if(hue<0.0)hue+=1.0;else if(hue>1.0)hue-=1.0;_f res;if((6.0*hue)<1.0)res=f1+(f2-f1)*6.0*hue;else if((2.0*hue)<1.0)res=f2;else if((3.0*hue)<2.0)res=f1+(f2-f1)*((2.0/3.0)-hue)*6.0;else res=f1;return res;}_v3 hsl2rgb(_v3 hsl){_v3 rgb;if(hsl.y==0.0){rgb=_v3(hsl.z);}else{_f f2;if(hsl.z<0.5)f2=hsl.z*(1.0+hsl.y);else f2=hsl.z+hsl.y-hsl.y*hsl.z;_f f1=2.0*hsl.z-f2;rgb.r=hue2rgb(f1,f2,hsl.x+(1.0/3.0));rgb.g=hue2rgb(f1,f2,hsl.x);rgb.b=hue2rgb(f1,f2,hsl.x-(1.0/3.0));}return rgb;}_v3 hsl2rgb(_f h,_f s,_f l){return hsl2rgb(_v3(h,s,l));}",mr="vec3 rgb2hsl(vec3 c){float cMin=min(min(c.r,c.g),c.b),cMax=max(max(c.r,c.g),c.b),delta=cMax-cMin;vec3 hsl=vec3(0.,0.,(cMax+cMin)/2.);if(delta!=0.0){if(hsl.z<.5){hsl.y=delta/(cMax+cMin);}else{hsl.y=delta/(2.-cMax-cMin);}float deltaR=(((cMax-c.r)/6.)+(delta/2.))/delta,deltaG=(((cMax-c.g)/6.)+(delta/2.))/delta,deltaB=(((cMax-c.b)/6.)+(delta/2.))/delta;if(c.r==cMax){hsl.x=deltaB-deltaG;}else if(c.g==cMax){hsl.x=(1./3.)+deltaR-deltaB;}else{hsl.x=(2./3.)+deltaG-deltaR;}hsl.x=fract(hsl.x);}return hsl;}",xr="const _v4 C=_v4(0.21,0.36,-0.57,0.02);_f snoise2d(_v2 v){_v2 i=floor(v+dot(v,C.yy));_v2 x0=v-i+dot(i,C.xx);_v2 i1;i1=(x0.x>x0.y)? _v2(1.0,0.0): _v2(0.0,1.0);_v4 x12=x0.xyxy+C.xxzz;x12.xy-=i1;i=mod(i,289.0);_v3 p=permute(permute(i.y+_v3(0.0,i1.y,1.0))+i.x+_v3(0.0,i1.x,1.0));_v3 m=max(0.5-_v3(dot(x0,x0),dot(x12.xy,x12.xy),dot(x12.zw,x12.zw)),0.0);m=m*m;m=m*m;_v3 x=2.0*fract(p*C.www)-1.0;_v3 h=abs(x)-0.5;_v3 ox=floor(x+0.5);_v3 a0=x-ox;m*=1.792-0.853*(a0*a0+h*h);_v3 g;g.x=a0.x*x0.x+h.x*x0.y;g.yz=a0.yz*x12.xz+h.yz*x12.yw;return 130.0*dot(m,g);}",vr=`const float PI=3.14;const float PI2=PI*2.;_f sn3d(_v3 v){ #i_ snoise3dpart _v4 norm=taylorInvSqrt(_v4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;_v4 m=max(0.6-_v4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);m=m*m*m;return 42.0*dot(m,_v4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));}_v3 snv3(_v3 x){_f s=sn3d(_v3(x));_f s1=sn3d(_v3(x.y-9.07,x.z+31.2,x.x+23.12));_f s2=sn3d(_v3(x.z+74.2,x.x-130.2,x.y+99.4));_v3 c=_v3(s,s1,s2);return c;}_v3 curlNoise(_v3 p){const _f e=.1;_v3 dx=_v3(e,0.0,0.0);_v3 dy=_v3(0.0,e,0.0);_v3 dz=_v3(0.0,0.0,e);_v3 p_x0=snv3(p-dx);_v3 p_x1=snv3(p+dx);_v3 p_y0=snv3(p-dy);_v3 p_y1=snv3(p+dy);_v3 p_z0=snv3(p-dz);_v3 p_z1=snv3(p+dz);_f x=p_y1.z-p_y0.z-p_z1.y+p_z0.y;_f y=p_z1.x-p_z0.x-p_x1.z+p_x0.z;_f z=p_x1.y-p_x0.y-p_y1.x+p_y0.x;const _f divisor=1.0/(2.0*e);return normalize(_v3(x,y,z)*divisor);}`,yr="const _v2 C=_v2(1.0/6.0,1.0/3.0);const _v4 D=_v4(0.0,0.5,1.0,2.0);_v3 i=floor(v+dot(v,C.yyy));_v3 x0=v-i+dot(i,C.xxx);_v3 g=step(x0.yzx,x0.xyz);_v3 l=1.0-g;_v3 i1=min(g.xyz,l.zxy);_v3 i2=max(g.xyz,l.zxy);_v3 x1=x0-i1+C.xxx;_v3 x2=x0-i2+C.yyy;_v3 x3=x0-D.yyy;i=mod289(i);_v4 p=permute(permute(permute(i.z+_v4(0.0,i1.z,i2.z,1.0))+i.y+_v4(0.0,i1.y,i2.y,1.0))+i.x+_v4(0.0,i1.x,i2.x,1.0));_v3 ns=0.1428*D.wyz-D.xzx;_v4 j=p-49.0*floor(p*ns.z*ns.z);_v4 x_=floor(j*ns.z);_v4 y_=floor(j-7.0*x_);_v4 x=x_*ns.x+ns.yyyy;_v4 y=y_*ns.x+ns.yyyy;_v4 h=1.0-abs(x)-abs(y);_v4 b0=_v4(x.xy,y.xy);_v4 b1=_v4(x.zw,y.zw);_v4 s0=floor(b0)*2.0+1.0;_v4 s1=floor(b1)*2.0+1.0;_v4 sh=-step(h,_v4(0.));_v4 a0=b0.xzyw+s0.xzyw*sh.xxyy;_v4 a1=b1.xzyw+s1.xzyw*sh.zzww;_v3 p0=_v3(a0.xy,h.x);_v3 p1=_v3(a0.zw,h.y);_v3 p2=_v3(a1.xy,h.z);_v3 p3=_v3(a1.zw,h.w);",wr="vec2 mod289(vec2 x){return x-floor(x*(1.0/289.0))*289.0;}vec3 mod289(vec3 x){return x-floor(x*(1.0/289.0))*289.0;}vec4 mod289(vec4 x){return x-floor(x*(1.0/289.0))*289.0;}vec3 mod7(vec3 x){return x-floor(x*(1.0/7.0))*7.0;}vec3 permute(vec3 x){return mod289(((x*34.0)+10.0)*x);}vec4 permute(vec4 x){return mod289(((x*34.0)+1.0)*x);}vec4 taylorInvSqrt(vec4 r){return 1.792-0.853*r;}vec3 fade(vec3 t){return t*t*t*(t*(t*6.0-15.0)+10.0);}",br="_f grain(_v2 texCoord,_v2 resolution,_f frame,_f multiplier){_v2 mult=texCoord*resolution;_f offset=snoise3d(vec3(mult/multiplier,frame));_f n1=pnoise3D(vec3(mult,offset),vec3(1.0/texCoord*resolution,1.0));return n1/2.0+0.5;}_f grain(_v2 texCoord,_v2 resolution,_f frame){return grain(texCoord,resolution,frame,2.5);}_f grain(_v2 texCoord,_v2 resolution){return grain(texCoord,resolution,0.0);}",Mr="float cubicIn(float t){return t*t*t;}float cubicOut(float t){float f=t-1.0;return f*f*f+1.0;}",Lr="float exponentialOut(float t){return t==1.0 ? t : 1.0-pow(2.0,-10.0*t);}float exponentialIn(float t){return t==0.0 ? t : pow(2.0,10.0*(t-1.0));}";const Ze=/(#i_ .*)/gi,Rt={snoise3dpart:R(yr),brightness:R(hr),contrast:R(ur),hueShift:R(dr),saturation:R(cr),blendmodes:R(fr),sharpen:R(gr),hsl2rgb:R(pr),rgb2hsl:mr,snoise2d:R(xr),noiseUtils:R(wr),grain:R(br),exposure:R(_r),cubic:R(Mr),exponential:R(Lr)};Rt.snoise3d=R(Ft(vr));function ne(r){return r=Ft(r),r=R(r),r=`#version 300 es precision highp float; `+r,r}function R(r){return r=r.replace(/_i/g,"int"),r=r.replace(/_f/g,"float"),r=r.replace(/_v2/g,"vec2"),r=r.replace(/_v3/g,"vec3"),r=r.replace(/_v4/g,"vec4"),r=r.replace(/_m2/g,"mat2"),r=r.replace(/_m3/g,"mat3"),r=r.replace(/_m4/g,"mat4"),r=r.replace(/_4/g,"mat4"),r=r.replace(/_s2/g,"sampler2D"),r=r.replace(/_t/g,"texture"),r=r.replace(/_u/g,"uniform"),r=r.replace(/_gte/g,"greaterThanEqual"),r=r.replace(/_lte/g,"lessThanEqual"),r=r.replace(/_smst/g,"smoothstep"),r=r.replace(/_lay/g,"layout(location = "),r=r.replace(/_vm/g,"void main() {"),r}function Ft(r){const e=Sr(r);for(const t of e){const s=Dr(t);let i=Rt[s];i=i.replace("#define GLSLIFY 1",""),r=r.replace(t,i)}return r}function Sr(r){Ze.lastIndex=0;let e=null,t=0;const s=[];for(;(e=Ze.exec(r))&&t<100;)s.push(e[0]);return s}function Dr(r){return r.replace("#i_","").replace(/ /g,"")}var Cr=`_u _v2 uArtworkSize;_u sampler2D tArtwork;_u _v3 uBgColor;_u _f uBrightness;_u _f uContrast;_u _f uSaturation;_u _f uHighlights;_u _f uShadows;_u _f uHueAdjust;_u _f uSharpenBlur;_u _f uSharpenSize;_u _i uSharpenBlend;_u _f uNormalStr;_u _v2 uLightPos;_u _f uLightStr;in _v2 vUv;out _v4 fragColor; #i_ contrast #i_ brightness #i_ sharpen #i_ exposure _v2 stdNormalMap(_f height){return-_v2(dFdx(height),dFdy(height));}_v3 applyHue(_v3 col,_f hueAdjust){_v3 k=_v3(0.57735,0.57735,0.57735);_f cosAngle=cos(hueAdjust);return col*cosAngle+cross(k,col)*sin(hueAdjust)+k*dot(k,col)*(1.0-cosAngle);}_vm_v2 uv=vUv;_v4 artwork=_t(tArtwork,uv).rgba;_v2 areaSize=uSharpenSize/uArtworkSize;_v4 c1=texture(tArtwork,mod(uv-areaSize,1.));_v4 c2=texture(tArtwork,mod(_v2(uv.x,uv.y-areaSize.y),1.));_v4 c3=texture(tArtwork,mod(_v2(uv.x+areaSize.x,uv.y-areaSize.y),1.));_v4 c4=texture(tArtwork,mod(_v2(uv.x-areaSize.x,uv.y),1.));_v4 c5=texture(tArtwork,mod(_v2(uv.x+areaSize.x,uv.y),1.));_v4 c6=texture(tArtwork,mod(_v2(uv.x-areaSize.x,uv.y+areaSize.y),1.));_v4 c7=texture(tArtwork,mod(_v2(uv.x,uv.y+areaSize.y),1.));_v4 c8=texture(tArtwork,mod(uv+areaSize,1.));_v4 blur=(c1+c3+c6+c8+2.*(c2+c4+c5+c7)+4.*artwork)/16.;artwork=(1.+uSharpenBlur)*artwork-uSharpenBlur*blur;artwork=bmx(uBrightness)*contrastMatrix(uContrast)*artwork;_v3 res=autoExposure(artwork,uHighlights,uShadows);res=applyHue(res,uHueAdjust);const _v3 W=_v3(0.2125,0.7154,0.0721);_v3 intensity=_v3(dot(res,W));res=mix(intensity,res,uSaturation);artwork.rgb=res;_f height=(artwork.r+artwork.g+artwork.b)/3.;_v2 normal=stdNormalMap(height);normal*=uNormalStr;normal+=.5;_f lighting=dot(normal,normalize(uLightPos));artwork.rgb+=lighting*uLightStr*.5;fragColor=artwork;}`,Ar=`#version 300 es precision highp float;in vec2 position;in vec2 uv;out vec2 vUv;void main(){gl_Position=vec4(position,0.,1.);vUv=uv;}`;const pe=[];function $e(){a.screen.width=window.innerWidth,a.screen.height=window.innerHeight;for(const r of pe)r()}window.addEventListener("resize",$e,!1);window.addEventListener("orientationchange",$e,!1);$e();const Pr={add:r=>{pe.push(r)},remove:r=>{const e=pe.indexOf(r);e!==-1&&pe.splice(e,1)}};function Tr(r,e="center"){if(r.style.boxShadow="0 0 10px rgba(0,0,0,0.5)",r.style.position="absolute",a.isRender){r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%";return}function t(){let{width:s,height:i}=a.screen;const n=a.isFullScreen?0:100,l=a.isFullScreen?a.dpr:.25;s=s-n,i=i-n,s=Math.min(a.size.width*l,s),i=Math.min(a.size.height*l,i);let o=r.width,h=r.height;if(a.screen.height<r.height){let u=o/h;h=i,o=i*u,o>s&&(u=h/o,o=s,h=s*u)}else{let u=h/o;o=s,h=s*u,h>i&&(u=o/h,h=i,o=i*u)}r.style.height=h+"px",r.style.width=o+"px";const d=0;if(a.renderingMode!="animated"||location.href.indexOf("localhost")>-1)switch(e){case"center":r.style.left=(a.screen.width-o)*.5+d+"px",r.style.top=(a.screen.height-h)*.5+"px";break}}Pr.add(t),t()}const zr=ne(Cr);class kr{constructor(e,t){this.width=e,this.height=t,this.setBgColor(16777215),this.setClearAlpha(1),this._isFirstRender=!0}initWebGL(){this._initEngine(),this._scene=new Me(this._gl),this._camera=new kt(this._gl,{fov:35,near:.1,far:1e3,aspect:this.width/this.height}),this._camera.position.set(0,0,7),this._camera.lookAt([0,0,0]),a.resolution=new F(a.size.width*a.dpr,a.size.height*a.dpr),a.resolutionNoDPR=new F(a.size.width,a.size.height),this._initArtwork(),this._postComposite=new lr(this._gl,{width:this.width,height:this.height,dpr:a.dpr||1}),this._renderPass=this._postComposite.addPass({fragment:zr,vertex:Ar,uniforms:this._uniforms})}_initArtwork(){this._uniforms={uArtworkSize:{value:a.resolution},uBgColor:{value:new E},tArtwork:{value:new oe(a.gl,{image:new Uint8Array([191,25,54,255,96,18,54,255,96,18,54,255,37,13,53,255]),width:2,height:2,magFilter:a.gl.NEAREST})},uDAT:{value:1},uBrightness:{value:1},uContrast:{value:1},uSaturation:{value:1},uHighlights:{value:1},uShadows:{value:1},uHueAdjust:{value:0},uSharpenBlur:{value:0},uSharpenSize:{value:1},uSharpenBlend:{value:2},uNormalStr:{value:10},uLightPos:{value:new F(-.3,.8)},uLightStr:{value:.1}}}_initEngine(){this._renderer=new Xi({width:this.width,height:this.height,dpr:a.dpr||1,antialias:!1,preserveDrawingBuffer:!0}),this._gl=this._renderer.gl,a.gl=this._gl,this._gl.canvas.style.zIndex=1e3,this._gl.canvas.style.display="none",this._gl.autoClear=!1,Tr(this._gl.canvas),document.body.appendChild(this._gl.canvas),a.renderer=this._renderer}clear(){this._gl.clearColor(this._bgColor.r,this._bgColor.g,this._bgColor.b,this._clearAlpha)}renderWebGL=({options:e,skipComposer:t=!1,scene:s=null,displayArtwork:i=!0}={})=>{this._uniforms.uBgColor.value=this._bgColor,e&&(this._uniforms.uBrightness.value=e.brightness,this._uniforms.uContrast.value=e.contrast,this._uniforms.uSaturation.value=e.saturation,this._uniforms.uHighlights.value=e.highlights,this._uniforms.uShadows.value=e.shadows,this._uniforms.uHueAdjust.value=e.hue,this._uniforms.uSharpenBlur.value=Math.max(.2,e.sharpen.sharpenBlur),this._uniforms.uSharpenSize.value=e.sharpen.sharpenSize,this._uniforms.uSharpenBlend.value=e.sharpen.sharpenBlend,this._uniforms.uNormalStr.value=e.normal.normalStr-3.5,this._uniforms.uLightPos.value.x=e.light.lightPosX,this._uniforms.uLightPos.value.y=e.light.lightPosY,this._uniforms.uLightStr.value=e.light.lightStr),this._uniforms.uDAT.value=i?1:0,t||!i?this._renderer.render({scene:s||this._scene,camera:this._camera}):(this._renderPass.enabled=!0,this._postComposite.targetOnly=!1,this._postComposite.render({scene:this._scene})),this._isFirstRender&&(this._gl.canvas.style.display="block",this._isFirstRender=!1)};setBgColor(e){e instanceof E||(this._bgColor instanceof E?this._bgColor.set(e):this._bgColor=new E(e)),a.bgColor=this._bgColor}setClearAlpha(e){this._clearAlpha=e}get artwork(){return this._uniforms.tArtwork.value}set artwork(e){this._uniforms.tArtwork.value=e}get scene(){return this._scene}get renderer(){return this._renderer}get camera(){return this._camera}}function Rr(r,e){a.data&&a.data.displayData&&a.data.displayData.addCoreDisplay(r,e)}class Fr{constructor(){this._orders=[]}add(e,t){this._orders.push({renderable:e,data:t});const s=e.constructor.name;Rr(s,e.texture)}generate(){for(let e of this._orders)e.renderable.generate&&e.renderable.generate()}async render(e=!1){let t=!1;for(let s of this._orders){if(!s.data){(t||e)&&(await s.renderable?.render(),t=!0);continue}const i=Array.isArray(s.data)?s.data.some(n=>n.isDirty):s.data.isDirty;(e||i||t)&&(await s.renderable.render(),t=!0)}return t}get texture(){return this._orders[this._orders.length-1].renderable.texture}}var Ut="in _v2 uv;in _v2 position;out _v2 vUv;_vmvUv=uv;gl_Position=_v4(_v3(position,0.),1.0);}",Et="in _v2 vUv;_lay 0)out _v4 outColor0;_vmoutColor0=vec4(vUv,0.,1.);}";const Ur=ne(Ut),Er=ne(Et);function Br({uniforms:r={},vertex:e=Ur,fragment:t=Er,width:s=1,height:i=1}={}){return new Le(a.gl,{geometry:new be(a.gl,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),program:new ae(a.gl,{vertex:e,fragment:t,uniforms:r,transparent:!0,depthWrite:!1})})}class Bt{constructor({width:e=a.size.width,height:t=a.size.height}={}){this.vs=null,this.fs=null,this._width=e,this._height=t,this._uniformsInjected=[],this._uniforms={}}init({uniforms:e=this._uniforms,textures:t={},vs:s=null,fs:i=null,dataFroms:n=null,hasToAddSystemData:l=!0}={}){Object.entries(t).forEach(([h,d])=>{d!==null&&(e[h]={value:d})});const o=a.size.width/a.size.height;if(this._uniforms=Object.assign({uSeed:{value:0},uResolution:{value:a.resolutionNoDPR},uResolutionRatio:{value:o>1?1/a.resolutionNoDPR.x:1/a.resolutionNoDPR.y},uResolutionInv:{value:o>1?new F(1/a.resolutionNoDPR.x,1/a.resolutionNoDPR.y):new F(1/a.resolutionNoDPR.y,1/a.resolutionNoDPR.x)},uScreenRatio:{value:o},uScreenRatioV2:{value:o>1?new F(1,o):new F(1/o,1)},uArtworkSize:{value:new F(this._width,this._height)}},e),s||i){n=n?n.length?n:[n]:[],l&&a.data&&a.data.backgroundData&&n.push(a.data.backgroundData);const{vs:h,fs:d}=this.gatherUniformsFromData(n,{vs:s,fs:i,uniformsToFeed:this._uniforms,textures:t,hasToResolveShader:!0});this.vs=h,this.fs=d}}refreshTextures(e){Object.entries(e).forEach(([t,s])=>{s!==null&&(this._uniforms[t].value=s)})}gatherUniformsFromData(e,{vs:t=null,fs:s=null,uniformsToFeed:i=this._uniforms,hasToResolveShader:n=!0,textures:l=null}={}){let o="";e=e.length?e:[e];for(const h of e){o=this._gatherUniformsFromParams(i,h.params,o);for(let d in h.dataLayers){let u=h.dataLayers[d];o=this._gatherUniformsFromParams(i,u.params,o)}}for(let h in l)i[h].value!==null&&(o+=`uniform sampler2D ${h}; `);return t&&(n&&(t=ne(t)),t=t.replace("#injectUniforms",o),this.vs=t),s&&(n&&(s=ne(s)),s=s.replace("#injectUniforms",o),this.fs=s),{vs:t,fs:s}}_gatherUniformsFromParams(e,t,s){for(let i in t){let n=t[i];if(n.isUniform){let l="u"+i.charAt(0).toUpperCase()+i.slice(1),o="float";typeof n.value=="boolean"&&(o="bool");let h=n.value;n.type==="color"?(h=new E(h),o="vec3"):typeof h=="object"&&("min"in h||"max"in h)?(h=new F(h.min,h.max),o="vec2"):typeof h=="object"&&("x"in h||"y"in h)?(h=new F(h.x,h.y),o="vec2"):n.type==="int"&&(o="int"),e[l]={value:h},s+=`uniform ${o} ${l}; `,this._uniformsInjected.push({name:l,type:o,from:t,nameParam:i})}}return s}update(){this._updateInjectedUniforms(this._uniforms)}_updateInjectedUniforms(e){for(let t of this._uniformsInjected){let s=t.from[t.nameParam].value;const i=t.type;i==="vec3"?e[t.name].value.set(new E(s)):i==="vec2"?"min"in s||"max"in s?e[t.name].value.set(s.min,s.max):e[t.name].value.set(s.x,s.y):e[t.name].value=s}}get uniforms(){return this._uniforms}}class j extends Me{constructor(e=1,t={},{width:s=a.size.width,height:i=a.size.height,ratio:n=1}={}){super(),this._width=s*n,this._height=i*n,this._camera=new kt(this._gl,{fov:50,near:.1,far:1e3,aspect:this._width/this._height}),this._camera.position.set(0,0,5),this._camera.lookAt([0,0,0]),this._renderTarget=this._createRT(e,t)}init({uniforms:e={},textures:t={},vs:s=Ut,fs:i=Et,createMesh:n=!0,dataFroms:l=null}={}){n&&(this._pr
ttributes(e)}bindAttributes(e){e.attributeLocations.forEach((t,{name:s,type:i})=>{if(!this.attributes[s]){console.warn(`active attribute ${s} not being supplied`);return}const n=this.attributes[s];this.gl.bindBuffer(n.target,n.buffer),this.glState.boundBuffer=n.buffer;let l=1;i===35674&&(l=2),i===35675&&(l=3),i===35676&&(l=4);const o=n.size/l,h=l===1?0:l*l*4,d=l===1?0:l*4;for(let u=0;u<l;u++)this.gl.vertexAttribPointer(t+u,o,n.type,n.normalized,n.stride+h,n.offset+u*d),this.gl.enableVertexAttribArray(t+u),this.gl.renderer.vertexAttribDivisor(t+u,n.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:e,mode:t=this.gl.TRIANGLES}){this.gl.renderer.currentGeometry!==`${this.id}_${e.attributeOrder}`&&(this.VAOs[e.attributeOrder]||this.createVAO(e),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${e.attributeOrder}`),e.attributeLocations.forEach((i,{name:n})=>{const l=this.attributes[n];l.needsUpdate&&this.updateAttribute(l)});let s=2;this.attributes.index?.type===this.gl.UNSIGNED_INT&&(s=4),this.attributes.index?this.gl.drawElements(t,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*s):this.gl.drawArrays(t,this.drawRange.start,this.drawRange.count)}getPosition(){const e=this.attributes.position;if(e.data)return e;if(!He)return He=!0}remove(){for(let e in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[e]),delete this.VAOs[e];for(let e in this.attributes)this.gl.deleteBuffer(this.attributes[e].buffer),delete this.attributes[e]}}let ji=1;const We={};class ae{constructor(e,{vertex:t,fragment:s,uniforms:i={},transparent:n=!1,cullFace:l=e.BACK,frontFace:o=e.CCW,depthTest:h=!0,depthWrite:d=!0,depthFunc:u=e.LESS}={}){e.canvas||console.error("gl not passed as first argument to Program"),this.gl=e,this.uniforms=i,this.id=ji++,t||console.warn("vertex shader not supplied"),s||console.warn("fragment shader not supplied"),this.transparent=n,this.cullFace=l,this.frontFace=o,this.depthTest=h,this.depthWrite=d,this.depthFunc=u,this.blendFunc={},this.blendEquation={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA));const f=e.createShader(e.VERTEX_SHADER);e.shaderSource(f,t),e.compileShader(f),e.getShaderInfoLog(f)!==""&&console.warn(`${e.getShaderInfoLog(f)} Vertex Shader ${Ye(t)}`);const g=e.createShader(e.FRAGMENT_SHADER);if(e.shaderSource(g,s),e.compileShader(g),e.getShaderInfoLog(g)!==""&&console.warn(`${e.getShaderInfoLog(g)} Fragment Shader ${Ye(s)}`),this.program=e.createProgram(),e.attachShader(this.program,f),e.attachShader(this.program,g),e.linkProgram(this.program),!e.getProgramParameter(this.program,e.LINK_STATUS))return console.warn(e.getProgramInfoLog(this.program));e.deleteShader(f),e.deleteShader(g),this.uniformLocations=new Map;let _=e.getProgramParameter(this.program,e.ACTIVE_UNIFORMS);for(let w=0;w<_;w++){let v=e.getActiveUniform(this.program,w);this.uniformLocations.set(v,e.getUniformLocation(this.program,v.name));const x=v.name.match(/(\w+)/g);v.uniformName=x[0],x.length===3?(v.isStructArray=!0,v.structIndex=Number(x[1]),v.structProperty=x[2]):x.length===2&&isNaN(Number(x[1]))&&(v.isStruct=!0,v.structProperty=x[1])}this.attributeLocations=new Map;const m=[],p=e.getProgramParameter(this.program,e.ACTIVE_ATTRIBUTES);for(let w=0;w<p;w++){const v=e.getActiveAttrib(this.program,w),x=e.getAttribLocation(this.program,v.name);x!==-1&&(m[x]=v.name,this.attributeLocations.set(v,x))}this.attributeOrder=m.join("")}setBlendFunc(e,t,s,i){this.blendFunc.src=e,this.blendFunc.dst=t,this.blendFunc.srcAlpha=s,this.blendFunc.dstAlpha=i,e&&(this.transparent=!0)}setBlendEquation(e,t){this.blendEquation.modeRGB=e,this.blendEquation.modeAlpha=t}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha)}use({flipFaces:e=!1}={}){let t=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((i,n)=>{let l=n.uniformName,o=this.uniforms[l];if(o.value.texture)return t=t+1,o.value.update(t),Fe(this.gl,n.type,i,t);if(o.value.length&&o.value[0].texture){const h=[];return o.value.forEach(d=>{t=t+1,d.update(t),h.push(t)}),Fe(this.gl,n.type,i,h)}Fe(this.gl,n.type,i,o.value)}),this.applyState(),e&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function Fe(r,e,t,s){s=s.length?qi(s):s;const i=r.renderer.state.uniformLocations.get(t);if(s.length)if(i===void 0||i.length!==s.length)r.renderer.state.uniformLocations.set(t,s.slice(0));else{if(Hi(i,s))return;i.set?i.set(s):Wi(i,s),r.renderer.state.uniformLocations.set(t,i)}else{if(i===s)return;r.renderer.state.uniformLocations.set(t,s)}switch(e){case 5126:return s.length?r.uniform1fv(t,s):r.uniform1f(t,s);case 35664:return r.uniform2fv(t,s);case 35665:return r.uniform3fv(t,s);case 35666:return r.uniform4fv(t,s);case 35670:case 5124:case 35678:case 35680:return s.length?r.uniform1iv(t,s):r.uniform1i(t,s);case 35671:case 35667:return r.uniform2iv(t,s);case 35672:case 35668:return r.uniform3iv(t,s);case 35673:case 35669:return r.uniform4iv(t,s);case 35674:return r.uniformMatrix2fv(t,!1,s);case 35675:return r.uniformMatrix3fv(t,!1,s);case 35676:return r.uniformMatrix4fv(t,!1,s)}}function Ye(r){let e=r.split(` `);for(let t=0;t<e.length;t++)e[t]=t+1+": "+e[t];return e.join(` `)}function qi(r){const e=r.length,t=r[0].length;if(t===void 0)return r;const s=e*t;let i=We[s];i||(We[s]=i=new Float32Array(s));for(let n=0;n<e;n++)i.set(r[n],n*t);return i}function Hi(r,e){if(r.length!==e.length)return!1;for(let t=0,s=r.length;t<s;t++)if(r[t]!==e[t])return!1;return!0}function Wi(r,e){for(let t=0,s=r.length;t<s;t++)r[t]=e[t]}new Z;let Yi=1;class Xi{constructor({canvas:e=document.createElement("canvas"),width:t=300,height:s=150,dpr:i=1,alpha:n=!1,depth:l=!0,stencil:o=!1,antialias:h=!1,premultipliedAlpha:d=!1,preserveDrawingBuffer:u=!1,powerPreference:f="default",autoClear:g=!0,webgl:_=2}={}){const m={alpha:n,depth:l,stencil:o,antialias:h,premultipliedAlpha:d,preserveDrawingBuffer:u,powerPreference:f};this.dpr=i,this.alpha=n,this.color=!0,this.depth=l,this.stencil=o,this.premultipliedAlpha=d,this.autoClear=g,this.id=Yi++,_===2&&(this.gl=e.getContext("webgl2",m)),this.isWebgl2=!!this.gl,this.gl||(this.gl=e.getContext("webgl",m)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(t,s),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=null,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LESS,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2&&(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(e,t){this.width=e,this.height=t,this.gl.canvas.width=e*this.dpr,this.gl.canvas.height=t*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:e+"px",height:t+"px"})}setViewport(e,t,s=0,i=0){this.state.viewport.width===e&&this.state.viewport.height===t||(this.state.viewport.width=e,this.state.viewport.height=t,this.state.viewport.x=s,this.state.viewport.y=i,this.gl.viewport(s,i,e,t))}setScissor(e,t,s=0,i=0){this.gl.scissor(s,i,e,t)}enable(e){this.state[e]!==!0&&(this.gl.enable(e),this.state[e]=!0)}disable(e){this.state[e]!==!1&&(this.gl.disable(e),this.state[e]=!1)}setBlendFunc(e,t,s,i){this.state.blendFunc.src===e&&this.state.blendFunc.dst===t&&this.state.blendFunc.srcAlpha===s&&this.state.blendFunc.dstAlpha===i||(this.state.blendFunc.src=e,this.state.blendFunc.dst=t,this.state.blendFunc.srcAlpha=s,this.state.blendFunc.dstAlpha=i,s!==void 0?this.gl.blendFuncSeparate(e,t,s,i):this.gl.blendFunc(e,t))}setBlendEquation(e,t){e=e||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===e&&this.state.blendEquation.modeAlpha===t)&&(this.state.blendEquation.modeRGB=e,this.state.blendEquation.modeAlpha=t,t!==void 0?this.gl.blendEquationSeparate(e,t):this.gl.blendEquation(e))}setCullFace(e){this.state.cullFace!==e&&(this.state.cullFace=e,this.gl.cullFace(e))}setFrontFace(e){this.state.frontFace!==e&&(this.state.frontFace=e,this.gl.frontFace(e))}setDepthMask(e){this.state.depthMask!==e&&(this.state.depthMask=e,this.gl.depthMask(e))}setDepthFunc(e){this.state.depthFunc!==e&&(this.state.depthFunc=e,this.gl.depthFunc(e))}activeTexture(e){this.state.activeTextureUnit!==e&&(this.state.activeTextureUnit=e,this.gl.activeTexture(this.gl.TEXTURE0+e))}bindFramebuffer({target:e=this.gl.FRAMEBUFFER,buffer:t=null}={}){this.state.framebuffer!==t&&(this.state.framebuffer=t,this.gl.bindFramebuffer(e,t))}getExtension(e,t,s){return t&&this.gl[t]?this.gl[t].bind(this.gl):(this.extensions[e]||(this.extensions[e]=this.gl.getExtension(e)),t?this.extensions[e]?this.extensions[e][s].bind(this.extensions[e]):null:this.extensions[e])}getRenderList({scene:e,camera:t,frustumCull:s,sort:i}){let n=[];return e.traverse(l=>{if(!l.visible)return!0;l.draw&&n.push(l)}),n}render({scene:e,camera:t,target:s=null,update:i=!0,sort:n=!0,frustumCull:l=!0,clear:o}){s===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(s),this.setViewport(s.width,s.height)),(o||this.autoClear&&o!==!1)&&(this.depth&&(!s||s.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),i&&e.updateMatrixWorld(),t&&t.updateMatrixWorld(),this.getRenderList({scene:e,camera:t,frustumCull:l,sort:n}).forEach(d=>{d.draw({camera:t})})}}class Ki extends Array{constructor(e=0,t=0,s=0,i=1){return super(e,t,s,i),this.onChange=()=>{},this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(e){this[0]=e,this.onChange()}set y(e){this[1]=e,this.onChange()}set z(e){this[2]=e,this.onChange()}set w(e){this[3]=e,this.onChange()}}function Ji(r,e,t,s,i){let n=1/Math.tan(e/2),l=1/(s-i);return r[0]=n/t,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=n,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+s)*l,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*s*l,r[15]=0,r}class $ extends Array{constructor(e=1,t=0,s=0,i=0,n=0,l=1,o=0,h=0,d=0,u=0,f=1,g=0,_=0,m=0,p=0,w=1){return super(e,t,s,i,n,l,o,h,d,u,f,g,_,m,p,w),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(e){this[12]=e}set y(e){this[13]=e}set z(e){this[14]=e}set w(e){this[15]=e}multiply(e,t){return this}identity(){}copy(e){return this}fromPerspective({fov:e,aspect:t,near:s,far:i}={}){return Ji(this,e,t,s,i),this}setPosition(e){return this.x=e[0],this.y=e[1],this.z=e[2],this}compose(e,t,s){return this}getRotation(e){return this}getTranslation(e){return this}getScaling(e){return this}}new $;class Zi extends Array{constructor(e=0,t=e,s=e,i="YXZ"){return super(e,t,s),this.order=i,this.onChange=()=>{},this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this[0]=e,this.onChange()}set y(e){this[1]=e,this.onChange()}set z(e){this[2]=e,this.onChange()}set(e,t=e,s=e){return e.length?this.copy(e):(this[0]=e,this[1]=t,this[2]=s,this.onChange(),this)}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.onChange(),this}reorder(e){}fromRotationMatrix(e,t=this.order){}fromQuaternion(e,t=this.order){}fromArray(e,t=0){}toArray(e=[],t=0){}}class Me{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new $,this.worldMatrix=new $,this.matrixAutoUpdate=!0,this.position=new Z,this.quaternion=new Ki,this.scale=new Z(1),this.rotation=new Zi,this.up=new Z(0,1,0),this.rotation.onChange=()=>this.quaternion.fromEuler(this.rotation),this.quaternion.onChange=()=>this.rotation.fromQuaternion(this.quaternion)}setParent(e,t=!0){this.parent&&e!==this.parent&&this.parent.removeChild(this,!1),this.parent=e,t&&e&&e.addChild(this,!1)}addChild(e,t=!0){~this.children.indexOf(e)||this.children.push(e),t&&e.setParent(this,!1)}removeChild(e,t=!0){~this.children.indexOf(e)&&this.children.splice(this.children.indexOf(e),1),t&&e.setParent(null,!1)}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||e)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,e=!0);for(let t=0,s=this.children.length;t<s;t++)this.children[t].updateMatrixWorld(e)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(e){if(!e(this))for(let t=0,s=this.children.length;t<s;t++)this.children[t].traverse(e)}lookAt(e,t=!1){this.matrix.getRotation(this.quaternion),this.rotation.fromQuaternion(this.quaternion)}}const Qi=new $;class kt extends Me{constructor(e,{near:t=.1,far:s=100,fov:i=45,aspect:n=1,left:l,right:o,bottom:h,top:d,zoom:u=1}={}){super(),Object.assign(this,{near:t,far:s,fov:i,aspect:n,left:l,right:o,bottom:h,top:d,zoom:u}),this.projectionMatrix=new $,this.viewMatrix=new $,this.projectionViewMatrix=new $,this.worldPosition=new Z,this.type="perspective",this.perspective()}perspective({near:e=this.near,far:t=this.far,fov:s=this.fov,aspect:i=this.aspect}={}){return Object.assign(this,{near:e,far:t,fov:s,aspect:i}),this.projectionMatrix.fromPerspective({fov:s*(Math.PI/180),aspect:i,near:e,far:t}),this.type="perspective",this}updateMatrixWorld(){return super.updateMatrixWorld(),this.worldMatrix.getTranslation(this.worldPosition),this.projectionViewMatrix.multiply(this.projectionMatrix,this.viewMatrix),this}lookAt(e){return super.lookAt(e,!0),this}project(e){return e.applyMatrix4(this.viewMatrix),e.applyMatrix4(this.projectionMatrix),this}unproject(e){return e.applyMatrix4(Qi.inverse(this.projectionMatrix)),e.applyMatrix4(this.worldMatrix),this}}class er extends Array{constructor(e=1,t=0,s=0,i=0,n=1,l=0,o=0,h=0,d=1){return super(e,t,s,i,n,l,o,h,d),this}set(e,t,s,i,n,l,o,h,d){return e.length?this.copy(e):this}translate(e,t=this){return this}rotate(e,t=this){return this}scale(e,t=this){return this}multiply(e,t){return this}identity(){return this}copy(e){return this}fromMatrix4(e){return this}fromQuaternion(e){return this}fromBasis(e,t,s){return this}inverse(e=this){return this}getNormalMatrix(e){return this}}let tr=0;class Le extends Me{constructor(e,{geometry:t,program:s,mode:i=e.TRIANGLES,frustumCulled:n=!0,renderOrder:l=0}={}){super(),e.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=e,this.id=tr++,this.geometry=t,this.program=s,this.mode=i,this.frustumCulled=n,this.renderOrder=l,this.modelViewMatrix=new $,this.normalMatrix=new er}draw({camera:e}={}){e&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=e.projectionMatrix,this.program.uniforms.cameraPosition.value=e.worldPosition,this.program.uniforms.viewMatrix.value=e.viewMatrix,this.modelViewMatrix.multiply(e.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.program.use(),this.geometry.draw({mode:this.mode,program:this.program})}}const sr=new Uint8Array(4);let ir=1;class oe{constructor(e,{image:t,target:s=e.TEXTURE_2D,type:i=e.UNSIGNED_BYTE,format:n=e.RGBA,internalFormat:l=n,wrapS:o=e.CLAMP_TO_EDGE,wrapT:h=e.CLAMP_TO_EDGE,generateMipmaps:d=!0,minFilter:u=d?e.NEAREST_MIPMAP_LINEAR:e.LINEAR,magFilter:f=e.LINEAR,premultiplyAlpha:g=!1,unpackAlignment:_=4,flipY:m=s==e.TEXTURE_2D,anisotropy:p=0,level:w=0,width:v,height:x=v}={}){this.gl=e,this.id=ir++,this.image=t,this.target=s,this.type=i,this.format=n,this.internalFormat=l,this.minFilter=u,this.magFilter=f,this.wrapS=o,this.wrapT=h,this.generateMipmaps=d,this.premultiplyAlpha=g,this.unpackAlignment=_,this.flipY=m,this.anisotropy=Math.min(p,this.gl.renderer.parameters.maxAnisotropy),this.level=w,this.width=v,this.height=x,this.texture=this.gl.createTexture(),this.store={image:null},this.glState=this.gl.renderer.state,this.state={},this.state.minFilter=this.gl.NEAREST_MIPMAP_LINEAR,this.state.magFilter=this.gl.LINEAR,this.state.wrapS=this.gl.REPEAT,this.state.wrapT=this.gl.REPEAT,this.state.anisotropy=0}bind(){this.glState.textureUnits[this.glState.activeTextureUnit]!==this.id&&(this.gl.bindTexture(this.target,this.texture),this.glState.textureUnits[this.glState.activeTextureUnit]=this.id)}update(e=0){const t=!(this.image===this.store.image&&!this.needsUpdate);(t||this.glState.textureUnits[e]!==this.id)&&(this.gl.renderer.activeTexture(e),this.bind()),t&&(this.needsUpdate=!1,this.flipY!==this.glState.flipY&&(this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,this.flipY),this.glState.flipY=this.flipY),this.premultiplyAlpha!==this.glState.premultiplyAlpha&&(this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),this.glState.premultiplyAlpha=this.premultiplyAlpha),this.unpackAlignment!==this.glState.unpackAlignment&&(this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,this.unpackAlignment),this.glState.unpackAlignment=this.unpackAlignment),this.minFilter!==this.state.minFilter&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.minFilter),this.state.minFilter=this.minFilter),this.magFilter!==this.state.magFilter&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.magFilter),this.state.magFilter=this.magFilter),this.wrapS!==this.state.wrapS&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.wrapS),this.state.wrapS=this.wrapS),this.wrapT!==this.state.wrapT&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.wrapT),this.state.wrapT=this.wrapT),this.image?(this.image.width&&(this.width=this.image.width,this.height=this.image.height),ArrayBuffer.isView(this.image)?this.gl.texImage2D(this.target,this.level,this.internalFormat,this.width,this.height,0,this.format,this.type,this.image):this.gl.texImage2D(this.target,this.level,this.internalFormat,this.format,this.type,this.image),this.onUpdate&&this.onUpdate()):this.width?this.gl.texImage2D(this.target,this.level,this.internalFormat,this.width,this.height,0,this.format,this.type,null):this.gl.texImage2D(this.target,0,this.gl.RGBA,1,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,sr),this.store.image=this.image)}}class Ie{constructor(e,{width:t=e.canvas.width,height:s=e.canvas.height,target:i=e.FRAMEBUFFER,color:n=1,depth:l=!0,stencil:o=!1,depthTexture:h=!1,wrapS:d=e.CLAMP_TO_EDGE,wrapT:u=e.CLAMP_TO_EDGE,minFilter:f=e.LINEAR,magFilter:g=f,type:_=e.UNSIGNED_BYTE,format:m=e.RGBA,internalFormat:p=m,unpackAlignment:w,premultiplyAlpha:v}={}){this.gl=e,this.width=t,this.height=s,this.depth=l,this.buffer=this.gl.createFramebuffer(),this.target=i,this.gl.renderer.bindFramebuffer(this),this.textures=[];const x=[];for(let y=0;y<n;y++)this.textures.push(new oe(e,{width:t,height:s,wrapS:d,wrapT:u,minFilter:f,magFilter:g,type:_,format:m,internalFormat:p,unpackAlignment:w,premultiplyAlpha:v,flipY:!1,generateMipmaps:!1})),this.textures[y].update(),this.gl.framebufferTexture2D(this.target,this.gl.COLOR_ATTACHMENT0+y,this.gl.TEXTURE_2D,this.textures[y].texture,0),x.push(this.gl.COLOR_ATTACHMENT0+y);x.length>1&&this.gl.renderer.drawBuffers(x),this.texture=this.textures[0],this.gl.renderer.bindFramebuffer({target:this.target})}setSize(e,t){if(!(this.width===e&&this.height===t)){this.width=e,this.height=t,this.gl.renderer.bindFramebuffer(this);for(let s=0;s<this.textures.length;s++)this.textures[s].width=e,this.textures[s].height=t,this.textures[s].needsUpdate=!0,this.textures[s].update(),this.gl.framebufferTexture2D(this.target,this.gl.COLOR_ATTACHMENT0+s,this.gl.TEXTURE_2D,this.textures[s].texture,0);this.gl.renderer.bindFramebuffer({target:this.target})}}}const Xe={black:"#000000",white:"#ffffff"};function Ke(r){r.length===4&&(r=r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return[parseInt(e[1],16)/255,parseInt(e[2],16)/255,parseInt(e[3],16)/255]}function
6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#eba60f",n:569547,a:.21,d:196,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#e8cd34",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#6f7059",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#c3b968",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#eadfdf",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},ks={o:"#3f3838",a:.13,f:{o:"#c17f08",o2:"#e0dcce",b:.1,a:.43}},Rs={u:{m:6.96,q:.01}},Fs={c2:"#9f9f75",p:.36},pt={c:zs,t:ks,w:Rs,g:Fs},Us={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#7d94a3",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#49b1c7",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#c3b5aa",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#bbc35a",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#21230f",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#25341e",n:608418,a:.48,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#1e2a16",n:999547,a:.17,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#56534f",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#90a268",n:569547,a:.21,d:147,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#f8ee63",n:246547,a:.32,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#687059",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#d2c76f",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#b00909",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},Es={o:"#3f3838",a:.5,f:{o:"#f71a1a",o2:"#f71a1a",b:.1,a:.34}},Bs={u:{m:6.96,q:.01}},Is={c2:"#959558",p:.48},mt={c:Us,t:Es,w:Bs,g:Is},Gs={l:{bg:{o:"#fde4c9",n:999547,a:.63,d:82,r:0,s:!1},g1:{o:"#333e2f",n:911547,a:.29,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#133d5a",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#b09a7f",n:999547,a:.17,d:1239,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#484b4e",n:853547,a:.16,d:750,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#0dc0d7",n:902547,a:.3,d:1076,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#cabb3f",n:608418,a:.14,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#333e2f",n:999547,a:.21,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#f8f6d6",n:794547,a:.3,d:130,r:3,s:!0,x:75,e:0,i:9.24},f3:{o:"#e72d22",n:667547,a:.26,d:375,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#9d3112",n:246547,a:.29,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#7a8772",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#c3b968",n:550188,a:.42,d:25,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#f6e187",n:550188,a:.34,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},Ns={o:"#383739",a:.16,f:{o:"#eb6c14",o2:"#e44b2f",b:.1,a:.5}},Os={u:{m:6.96,q:.01}},Vs={c2:"#c5bd95",p:.7},xt={c:Gs,t:Ns,w:Os,g:Vs},$s={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#015c97",n:686547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#70e5fd",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#1e85d3",n:999547,a:.22,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#d8e714",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#1a1b0c",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#37342d",n:608418,a:.48,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#102c34",n:999547,a:.17,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#9a8857",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#ed4d36",n:569547,a:.21,d:130,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#d74c39",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#85906f",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#e0d390",n:550188,a:.28,d:0,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#0e0d0d",n:550188,a:.24,d:1141,r:4,s:!0,x:32.17,e:0,i:9.38}}},js={o:"#3f3838",a:.5,f:{o:"#e72615",o2:"#ed2210",b:.1,a:.34}},qs={u:{m:6.96,q:.01}},Hs={c2:"#8c8c63",p:.55},vt={c:$s,t:js,w:qs,g:Hs},Ws={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#74bae7",n:686547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#49b1c7",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#8fb9d7",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#bbc35a",n:853547,a:.14,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#35434a",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#bd8374",n:608418,a:.39,d:0,r:3,s:!0,x:73.91,e:1,i:8.7},f1:{o:"#252227",n:999547,a:.17,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#ede0cf",n:784547,a:.11,d:293,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#dd6b2a",n:569547,a:.21,d:147,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#e85434",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#ea362e",n:989825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#c3b692",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#b00909",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},Ys={o:"#2f160f",a:.5,f:{o:"#e72615",o2:"#94271d",b:.1}},Xs={u:{m:6.96,q:.01}},Ks={p:.35},yt={c:Ws,t:Ys,w:Xs,g:Ks},Js={l:{bg:{o:"#fde4c9",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#37a3ea",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#c6fd90",n:745547,a:.26,d:799,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#445126",n:999547,a:.17,d:880,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#aff02f",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#142627",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#8c9a70",n:941418,a:.24,d:0,r:3,s:!1,x:8.7,e:1,i:.38},f1:{o:"#3e2b20",n:872547,a:.17,d:65,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#258ee3",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#49ade7",n:569547,a:.21,d:130,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#52a4e7",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#7b90d7",n:158825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#e3d776",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#7cb5c3",n:550188,a:.34,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},Zs={o:"#3f3838",a:.5,f:{o:"#f4f3f0",o2:"#f0d6a1",b:.1,a:.43}},Qs={u:{m:6.96,q:.01}},ei={c2:"#a8a87a",p:.45},wt={c:Js,t:Zs,w:Qs,g:ei},ti={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#84cbfa",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#18b1d0",n:686547,a:.42,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#949145",n:999547,a:.21,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#ddc5b2",n:823547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#272912",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#41361b",n:608418,a:.48,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#271e16",n:999547,a:.33,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#615e3f",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#a1ad86",n:403547,a:.21,d:0,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#faf7f2",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#817c58",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#a4a472",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#e9eadf",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},si={o:"#3f3838",a:.13,f:{o:"#faf9cd",o2:"#ffd33c",b:.1,a:.29}},ii={u:{m:6.96,q:.01}},ri={c2:"#4f4f3d",p:0},bt={c:ti,t:si,w:ii,g:ri},ai={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#ede07f",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#49b1c7",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#c3b5aa",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#8cd9fa",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#272912",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#271d06",n:608418,a:.48,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#271e16",n:999547,a:.17,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#d083bb",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#7d875a",n:569547,a:.21,d:82,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#e8e334",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#6f7059",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#c3b968",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#08b08d",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},ni={o:"#3f3838",a:.13,f:{o:"#f4e178",o2:"#e0dcce",b:.1,a:.43}},oi={u:{m:6.96,q:.01}},li={c2:"#afaf88",p:0},Mt={c:ai,t:ni,w:oi,g:li},hi={l:{bg:{o:"#f3f3f3",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#c2dced",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#81e2f6",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#c3f7fa",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#5aa9c3",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#272912",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#413b2e",n:608418,a:.48,d:571,r:4,s:!1,x:3.04,e:1,i:.38},f1:{o:"#0a2706",n:999547,a:.17,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#4b543e",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#86a759",n:569547,a:.21,d:130,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#bfdd78",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#9baa7e",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#c3b968",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#b0a408",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},ui={o:"#393522",a:.5,f:{o:"#f7fad7",o2:"#f4ffe3",b:.1,a:.34}},di={u:{m:6.96,q:.01}},ci={c2:"#bfbc8a",p:.46},Lt={c:hi,t:ui,w:di,g:ci},fi={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#a3977d",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#b9ebf5",n:960547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#d1edf2",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#3a643c",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#081609",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#999f71",n:677418,a:.24,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#201a04",n:804547,a:.17,d:1125,r:2,s:!1,x:36.52,e:1,i:3.38},f2:{o:"#6b9bf5",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#84a9cd",n:569547,a:.21,d:130,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#da9336",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#687059",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#cdc564",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#adb008",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},gi={o:"#3c2d20",a:.5,f:{o:"#fff3eb",o2:"#edcf4e",b:.1,a:.34}},_i={u:{m:6.96,q:0}},pi={c2:"#cfe8aa",p:.32},St={c:fi,t:gi,w:_i,g:pi},mi={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#7d94a3",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#beeaf3",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#d1edf2",n:999547,a:.39,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#5c643a",n:853547,a:.46,d:620,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#272912",n:999547,a:.22,d:668,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#444931",n:647418,a:.17,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#0a112c",n:872547,a:.17,d:1125,r:2,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#5e7fbd",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#81b1df",n:569547,a:.21,d:130,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#f5b56e",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#9ba28f",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#bfb54e",n:550188,a:.33,d:30,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#e9ed9f",n:550188,a:.21,d:49,r:1,s:!0,x:32.17,e:0,i:9.38}}},xi={o:"#3c2d20",a:.5,f:{o:"#f3f7f1",o2:"#42577e",b:.1,a:.34}},vi={u:{m:6.96,q:0}},yi={c2:"#afad73",p:.52},Dt={c:mi,t:xi,w:vi,g:yi},wi={l:{bg:{o:"#b89875",n:999547,a:.65,d:82,r:0,s:!1},g1:{o:"#80c7f5",n:833547,a:.33,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#493d72",n:686547,a:.25,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#3dd0ef",n:999547,a:.48,d:1207,r:2,s:!1,x:24,e:1,i:2.38},g4:{o:"#f8e071",n:823547,a:.14,d:1484,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#272249",n:999547,a:.33,d:750,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#413b1b",n:608418,a:.48,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#222716",n:999547,a:.33,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#566344",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#94ad86",n:403547,a:.21,d:0,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#f8f7f7",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#4d764a",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#cddc96",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#f8ecc2",n:922188,a:.21,d:293,r:4,s:!0,x:32.17,e:0,i:9.38}}},bi={o:"#3f3838",a:.13,f:{o:"#fff57d",o2:"#eb3608",b:.1,a:.29}},Mi={u:{m:6.96,q:0}},Li={c2:"#ccc56b",p:.5},Ct={c:wi,t:bi,w:Mi,g:Li},Si={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#7d94a3",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#49b1c7",n:960547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#c3b5aa",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#bbc35a",n:853547,a:.12,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#272912",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#37342d",n:608418,a:.48,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#0f2b34",n:999547,a:.17,d:734,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#56534f",n:784547,a:.11,d:1304,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#aab7a1",n:569547,a:.21,d:260,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#aab7a1",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#687059",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#c3b968",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#5dd6ed",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},Di={o:"#3f3838",a:.5,f:{o:"#f36cd0",o2:"#f4aae0",b:.1,a:.34}},Ci={u:{m:6.96,q:0}},Ai={c2:"#4f4f3d",p:.74},At={c:Si,t:Di,w:Ci,g:Ai},Pi={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#7d94a3",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#ff7e06",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#bde7f8",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#3a643c",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#151602",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#363426",n:608418,a:.48,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#4a4e08",n:412547,a:.17,d:424,r:2,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#a796bd",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#845dd2",n:569547,a:.21,d:130,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#372089",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#84926b",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#ecde71",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#adb008",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},Ti={o:"#3f2917",a:.5,f:{o:"#f9f7fa",o2:"#f3dcf6",b:.1,a:.34}},zi={u:{m:6.96,q:0}},ki={c2:"#87b269",p:.46},Pt={c:Pi,t:Ti,w:zi,g:ki},Ri={l:{bg:{o:"#fde4c9",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#37a3ea",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#fddf90",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#25b0bd",n:951547,a:.21,d:163,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#567719",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#1e373a",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#e7da6d",n:608418,a:.14,d:0,r:3,s:!1,x:8.7,e:1,i:.38},f1:{o:"#3a322d",n:999547,a:.17,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#d925e3",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#e74b4b",n:569547,a:.21,d:130,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#e37bdc",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#d77bd7",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#c3b968",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#25b0bd",n:843188,a:.34,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},Fi={o:"#3f3838",a:.5,f:{o:"#f0d6a1",o2:"#f0d6a1",b:.1,a:.5}},Ui={u:{m:6.96,q:.01}},Ei={c2:"#60b1f2",p:.18},Tt={c:Ri,t:Fi,w:Ui,g:Ei},_e=[];function T(r){_e.push({text:_e.length+"",value:_e.length,data:r})}T(gt);T(bt);T(Mt);T(Lt);T(St);T(yt);T(mt);T(At);T(vt);T(xt);T(Pt);T(Tt);T(_t);T(pt);T(wt);T(Ct);T(Dt);class X extends b{constructor(e=null){super(e),this.ap("palette",-1,{onChange:this._onPaletteSelected})}_saveNewPalette=()=>{const e=this._serializePalette(),t=this.minifyPaletteData(e),s=JSON.stringify(t,null,2),i=new Blob([s],{type:"application/json"}),n=URL.createObjectURL(i),l=document.createElement("a");l.href=n,l.download="palette.json",document.body.appendChild(l),l.click(),setTimeout(()=>{document.body.removeChild(l),URL.revokeObjectURL(n)},100)};_onPaletteSelected=(e=-1)=>{e=e!==-1?e:this.palette;const t=_e.find(n=>n.value===e),s=t?t.data:null;if(!s)return;const i=this._unminifyPaletteData(s);if(i.compositionsData&&i.compositionsData.layers)for(const n in i.compositionsData.layers){const l=i.compositionsData.layers[n],o=c.compositionsData.layers.dataLayers[n];o&&(l.color&&(o.color=l.color),l.countLines!==void 0&&(o.countLines=l.countLines),l.alpha!==void 0&&(o.alpha=l.alpha),l.lengthA!==void 0&&(o.lengthA=l.lengthA),l.rotationType!==void 0&&(o.rotationType=l.rotationType),l.isSingleDir!==void 0&&(o.isSingleDir=l.isSingleDir),l.noiseScaleMax!==void 0&&(o.noise.scaleMax=l.noiseScaleMax),l.noiseMode!==void 0&&(o.noise.mode=l.noiseMode),l.noiseTime!==void 0&&(o.noise.time=l.noiseTime))}i.treesData&&(i.treesData.color&&(c.treesData.color=i.treesData.color),i.treesData.alpha&&(c.treesData.alpha=i.treesData.alpha),i.treesData.flowers&&(i.treesData.flowers.color&&(c.treesData.flowers.color=i.treesData.flowers.color),i.treesData.flowers.color2&&(c.treesData.flowers.color2=i.treesData.flowers.color2),i.treesData.flowers.alpha&&(c.treesData.flowers.alpha=i.treesData.flowers.alpha),i.treesData.flowers.angleFlowBoost!==void 0&&(c.treesData.flowers.angleFlowBoost=i.treesData.flowers.angleFlowBoost))),i.flowData&&i.flowData.curl&&(i.flowData.curl.curlUvMult!==void 0&&(c.flowData.curl.curlUvMult=i.flowData.curl.curlUvMult),i.flowData.curl.curlRatioAccum!==void 0&&(c.flowData.curl.curlRatioAccum=i.flowData.curl.curlRatioAccum)),i.gridPatternData&&(i.gridPatternData.linesGridColor!==void 0&&(c.gridPatternData.linesGridColor=i.gridPatternData.linesGridColor),i.gridPatternData.linesGridAlpha!==void 0&&(c.gridPatternData.linesGridAlpha=i.gridPatternData.linesGridAlpha))};static get KEY_MAPPINGS(){return{compositionsData:"c",layers:"l",color:"o",color2:"o2",countLines:"n",alpha:"a",lengthA:"d",rotationType:"r",treesData:"t",flowers:"f",angleFlowBoost:"b",flowData:"w",curl:"u",curlUvMult:"m",curlRatioAccum:"q",isSingleDir:"s",noiseScaleMax:"x",noiseMode:"e",noiseTime:"i",gridPatternData:"g",linesGridAlpha:"p",linesGridColor:"c2"}}static get LAYER_MAPPINGS(){return{background:"bg",greenLayer1:"g1",greenLayer2:"g2",greenLayer3:"g3",greenLayer4:"g4",greenLayer5:"g5",windLayer:"wl",flowerLayer1:"f1",flowerLayer2:"f2",flowerLayer3:"f3",flowerLayer4:"f4",blueWindLayer:"bw",greenFlowerLayer:"gf",bonusLayer:"bn"}}static getReverseMapping(e){const t={};for(const[s,i]of Object.entries(e))t[i]=s;return t}_unminifyPaletteData(e){const t=X.getReverseMapping(X.KEY_MAPPINGS),s=X.getReverseMapping(X.LAYER_MAPPINGS),i=o=>{if(o.length===4){const h=o[1],d=o[2],u=o[3];return`#${h}${h}${d}${d}${u}${u}`}return o},n=(o,h=[])=>{if(typeof o!="object"||o===null)return typeof o=="string"&&o.startsWith("#")?i(o):o;if(Array.isArray(o))return o.map(u=>n(u,h));const d={};for(const[u,f]of Object.entries(o)){let g=t[u]||u;h.length===1&&h[0]==="layers"&&s[u]&&(g=s[u]);let _=[...h];g==="layers"&&_.push("layers"),d[g]=n(f,_)}return d};return n(e,[])}}class Bi extends b{constructor(e=null){super(e),this.ap("branchLength",220),this.ap("minLength",45),this.ap("splitCountMin",2),this.ap("splitCountAdd",2),this.ap("maxDepth",15),this.ap("branchAngle",.99)}}class Ii extends fs{constructor(){super()}_initCustoms(){this.paletteData=new X(this.guiSystem?.addFolder("Palettes")),this.addDataLayer(gs,{name:"gridRyokan"}),this.gridRyokanData.gui.mainFolder.expanded=!1,this.addDataLayer(Bi,{name:"treebstract",style:{top:"290px"}}),this.treebstractData.gui.mainFolder.expanded=!1;let e=270;this.addDataLayer(xs,{name:"grid",style:{right:`${e}px`}}),this.gridData.gui.mainFolder.expanded=!1,this.addDataLayer(vs,{name:"compositions",style:{right:`${e}px`,top:"40px"}}),this.compositionsData.gui.mainFolder.expanded=!1,e+=264,this.addDataLayer(_s,{name:"flow",style:{right:`${e}px`}}),this.flowData.gui.mainFolder.expanded=!1,e+=264,this.addDataLayer(ws,{name:"trees",style:{right:`${e}px`}}),this.treesData.gui.mainFolder.expanded=!1,e+=264,this.addDataLayer(ys,{name:"patternNoise",style:{right:`${e}px`}}),this.patternNoiseData.gui.mainFolder.expanded=!1,e+=264,this.addDataLayer(bs,{name:"gridPattern",style:{right:`${e}px`}}),e+=264,this.addDataLayer(ms,{name:"vegeLines",style:{right:`${e}px`}}),e+=264,this.addDataLayer(ps,{name:"composer",style:{right:`${e}px`}})}}const c=new Ii;function zt(r,{prefix:e="",postfix:t=""}={}){const s=document.createElement("a");s.setAttribute("download",(e?e+"_":"")+a.id+"-"+tokenData.hash+(t?"_"+t:"")+".jpg"),s.setAttribute("href",r.toDataURL("image/jpg",1)),s.click()}class Gi{constructor(){window.addEventListener("keydown",e=>{if(console.log(e.key),e.key.toLowerCase()==="s"&&zt(a.gl.canvas),e.key.toLowerCase()==="f"){const t=new URL(window.location.href);t.searchParams.set("fullscreen","true"),window.location.href=t.toString()}if(e.key==="1"){const t=new URL(window.location.href);t.searchParams.set("dpr","1"),window.location.href=t.toString()}})}}function Ni(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function Oi(r,e,t,s){return r[0]=e,r[1]=t,r[2]=s,r}class Z extends Array{constructor(e=0,t=e,s=e){return super(e,t,s),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this[0]=e}set y(e){this[1]=e}set z(e){this[2]=e}set(e,t=e,s=e){return e.length?this.copy(e):(Oi(this,e,t,s),this)}copy(e){return Ni(this,e),this}}new Z;let Vi=1,$i=1,He=!1;class be{constructor(e,t={}){e.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=e,this.attributes=t,this.id=Vi++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let s in t)this.addAttribute(s,t[s])}addAttribute(e,t){this.attributes[e]=t,t.id=$i++,t.size=t.size||1,t.type=t.type||(t.data.constructor===Float32Array?this.gl.FLOAT:t.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),t.target=e==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,t.normalized=t.normalized||!1,t.stride=t.stride||0,t.offset=t.offset||0,t.count=t.count||(t.stride?t.data.byteLength/t.stride:t.data.length/t.size),t.divisor=t.instanced||0,t.needsUpdate=!1,t.usage=t.usage||this.gl.STATIC_DRAW,t.buffer||this.updateAttribute(t),this.drawRange.count=Math.max(this.drawRange.count,t.count)}updateAttribute(e){const t=!e.buffer;t&&(e.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==e.buffer&&(this.gl.bindBuffer(e.target,e.buffer),this.glState.boundBuffer=e.buffer),t?this.gl.bufferData(e.target,e.data,e.usage):this.gl.bufferSubData(e.target,0,e.data),e.needsUpdate=!1}setIndex(e){this.addAttribute("index",e)}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}setInstancedCount(e){this.instancedCount=e}createVAO(e){this.VAOs[e.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.bindA
class V{constructor(){this._entities=[]}add(e){if(typeof e!="function")throw new Error("Entity must be a function");this._entities.push(e)}remove(e){const t=this._entities.indexOf(e);t!==-1&&this._entities.splice(t,1)}dispatch(...e){for(const t of this._entities)typeof t=="function"?t(...e):console.error("Event: dispatch: entity is not a function")}clear(){this._entities=[]}dispose(){this._entities=null}}let xe=.5,rt="animated";const B=new URLSearchParams(window.location.search),Ot=B.has("render")&&B.get("render")==="true",Vt=B.has("fullscreen")&&B.get("fullscreen")==="true",$t=B.has("print")&&B.get("print")==="true",jt=B.has("fixed")&&B.get("fixed")==="true";B.has("r")&&(rt=B.get("r"));if(B.has("dpr")){const r=parseFloat(B.get("dpr"));!isNaN(r)&&r>0&&(xe=r)}xe=Math.min(xe,1);const a={id:"mmts",screen:{width:0,height:0},isFullScreen:Vt,isPrint:$t,isFixed:jt,size:{width:4096*2,height:2048*2},dpr:xe,linesSize:512,linesPerGeometry:1e5,linesTotal:1e6,onRender:new V,rand:Math.random,useGUI:!0,renderingMode:rt,isRender:Ot,isOver:!1},O={metaKey:!1,shiftKey:!1,altKey:!1,ctrlKey:!1},at=new V,nt=new V;window&&(window?.addEventListener("keydown",r=>{O.metaKey=r.metaKey,O.shiftKey=r.shiftKey,O.altKey=r.altKey,O.ctrlKey=r.ctrlKey,at.dispatch(r.key)}),window?.addEventListener("keyup",r=>{O.metaKey=r.metaKey,O.shiftKey=r.shiftKey,O.altKey=r.altKey,O.ctrlKey=r.ctrlKey,nt.dispatch(r.key)}));const qt={enter:13,space:32,q:81,w:87,e:69,r:82,t:84,y:89,u:85,i:73,o:79,p:80,a:65,s:83,d:68,f:70,g:71,h:72,j:74,k:75,l:76,z:90,x:88,c:67,v:86,b:66,n:78,m:77,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,0:48,"[":219,"]":221,"\\":220,";":186,"'":222,",":188,".":190,"/":191,down:40,up:38,left:37,right:39,esc:27};function Ht(r){r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation()}const Re={prevent:Ht,special:O,onDown:at,onUp:nt,touches:qt},Wt=5;function Ge(r){const e=JSON.parse(localStorage.getItem("hashes-history"))||[];e.includes(r)||(e.length==Wt&&e.shift(),e.push(r),localStorage.setItem("hashes-history",JSON.stringify(e)))}function re(r){return`${global.id}-${r}`}function Yt(r,e){const t=JSON.parse(localStorage.getItem(re(r)))||[];t.includes(e)||(t.push(e),localStorage.setItem(re(r),JSON.stringify(t)))}function Xt(r){return JSON.parse(localStorage.getItem(re(r)))||[]}function Kt(r){const e=Xt(r),t=document.createElement("a"),s=new Blob([JSON.stringify(e)],{type:"application/json"});t.href=URL.createObjectURL(s),t.download=re(r)+".json",t.click()}function Jt(r){localStorage.removeItem(re(r))}let J=null;const ot=new V,Ne=new V,we=new V;function lt(){return tokenData.hash}function Zt(r,e=null){J=r,J.init(e),J.createPrerand()}function Qt(r=!0,e=!0){J.reset(e),r&&(ot.dispatch(),we.dispatch())}function es(r){J.setHash(r),Ne.dispatch(),we.dispatch()}function ts(){J.generateNewHash(),Ne.dispatch(),we.dispatch()}function ss(r){Re.onDown.add(e=>{if(Re.special.shiftKey){if(Re.special.ctrlKey){switch(console.log("here"),e){case"H":Jt(r),console.log('... hashes clear for project "',r,'"');break}return}switch(e){case"S":Yt(r,lt()),console.log('... hash saved for project "',r,'"');break;case"E":Kt(r),console.log('... export hashes for project "',r,'"');break}}})}const W={load:Zt,reset:Qt,setHash:es,generateNewHash:ts,getHash:lt,activateKeyboard:ss,onReset:ot,onChangeHash:Ne,onResetOrChangeHash:we};class is{constructor(){this.onChangeHash=W.onChangeHash}start(e,t=null){console.log("Engine: start"),W.load(e,t),W.activateKeyboard(a.id)}resetHash({andDispatch:e=!0,andLog:t=!0}={}){W.reset(e,t)}generateNewHash(){W.generateNewHash()}setHash(e){W.setHash(e)}get hash(){return W.getHash()}}const ht=new is;class ge{constructor(e){this.S=new Uint32Array(4),this.initializeFromHash(e.hash)}initializeFromHash(e){for(let t=0;t<4;t++)this.S[t]=parseInt(e.substr(t*16+2,16),16);for(let t=0;t<12;t++)this.R()}R(e=1){e*=this.S[3],this.S[3]=this.S[2],this.S[2]=this.S[1];let t=this.S[3];return t^=t<<11,this.S[0]^=t^t>>>8^(this.S[1]=this.S[0])>>>19,this.S[0]/2**32}random_dec=()=>this.R();random_num=(e,t)=>e+this.R()*(t-e);random_int=(e,t)=>Math.floor(e+this.R()*(t-e+1));random_bool=e=>this.R()<e;random_choice=e=>e[Math.floor(this.R()*e.length)]}function ut(){console.log(`%c Change seed: %c`+tokenData.hash,"color: white; background-color:green","color: green; background-color:yellow")}function rs(r=null){window.genTokenData||(window.genTokenData=function(t){let s={},i="0x";for(var n=0;n<64;n++)i+=Math.floor(Math.random()*16).toString(16);return s.hash=i,s.tokenId=(t*1e6+Math.floor(Math.random()*1e3)).toString(),s},window.tokenData=genTokenData(123),r?tokenData.hash=r:Ge(tokenData.hash),ut(),ct())}function as(){const r=genTokenData(3122021);r.hash="0xs03122021m13021990z";const e=new ge(r);a.prerand=e.random_dec}function dt(r=!0){ct(),r&&console.log("%c Reset hash ","color: white; background-color: gray")}function ct(){const r=new ge(tokenData);a.rand=r.random_dec;const e=new ge(tokenData);a.rand2=e.random_dec;const t=new ge(tokenData);a.rand3=t.random_dec}function ns(r){tokenData.hash=r,Ge(tokenData.hash),dt(!1),console.log("%c Set hash %c","color: white; background-color:red","color: red; background-color:yellow")}function os(){tokenData=genTokenData(123),Ge(tokenData.hash),ut()}const ls={init:rs,reset:dt,setHash:ns,generateNewHash:os,createPrerand:as};class hs{constructor(){this._guis=new Map}init(e=null){this.guiClass=e}get(e,t={}){return this.guiClass?(this._guis.has(e)||this._guis.set(e,new this.guiClass(e,t)),this._guis.get(e)):null}}const ft=new hs;class Oe{constructor(){this._folder={expanded:!1}}addFolder(){return new Oe}addBlade(){return{on:()=>this}}addButton(){return{on:()=>this}}addBinding(){return{on:()=>this}}apply(){}refresh(){}open(){}close(){}get mainFolder(){return this._folder}}class b{constructor(e=null,t=null){this._gui=e,this._params={},this._dataLayers={},this.canDispatch=!0,this._isDirty=!1,this.onChange=t||new V}reset(){for(let e in this._params)this[e]=this._params[e].value}serialize(){const e={};for(let t in this._params){const s=this._params[t];e[t]=s.serializeMethod?s.serializeMethod(s.value):s.value}for(let t in this._dataLayers)e[t]=this._dataLayers[t].serialize();return e}setParams(e){for(let t in e){const s=this._params[t];if(s)s.isLocked||(this[t]=s.setMethod?s.setMethod(e[t]):e[t]);else{const i=this._dataLayers[t];i&&i.setParams(e[t])}}}ap(...e){this.addParam(...e)}addParam(e,t,{serializeMethod:s=null,setMethod:i=null,onChange:n=null,isUniform:l=!1,type:o=null,isLocked:h=!1}={}){if(this._params[e]!==void 0)throw new Error(`DataLayer: addParam: name already exists: ${e}`);return this._params[e]={value:t,defaultValue:t,serializeMethod:s,setMethod:i,isUniform:l,type:o,isLocked:h},Object.defineProperty(this,e,{get:function(){return this._params[e].value},set:function(d){d!==this._params[e].value&&(this._params[e].value=d,this._isDirty=!0,this.onChange.dispatch(),n&&this.canDispatch&&n(d),this._gui&&this._gui.refresh())}}),this._gui?{gui:(d,u)=>{this._gui&&(typeof t=="object"&&("min"in t&&"max"in t||"x"in t&&"y"in t)&&(u=this._dispatch),this._gui.apply(this,e,d,u))}}:{gui:()=>{}}}updateGUIParam(e,t,s=null){this._gui&&this._gui.apply(this,e,t,s)}addParamU(e,t,{serializeMethod:s=null,setMethod:i=null,onChange:n=null,isUniform:l=!0,type:o=null,isLocked:h=!1}={}){return this.addParam(e,t,{serializeMethod:s,setMethod:i,onChange:n,isUniform:l,type:o,isLocked:h})}addParamUI(e,t,{serializeMethod:s=null,setMethod:i=null,onChange:n=null,isUniform:l=!0,type:o="int",isLocked:h=!1}={}){return this.addParam(e,t,{serializeMethod:s,setMethod:i,onChange:n,isUniform:l,type:o,isLocked:h})}addParamUC(e,t,{serializeMethod:s=null,setMethod:i=null,onChange:n=null,isUniform:l=!0,type:o="color",isLocked:h=!1}={}){return this.addParam(e,t,{serializeMethod:s,setMethod:i,onChange:n,isUniform:l,type:o,isLocked:h})}addParamU2(e,t,{serializeMethod:s=null,setMethod:i=null,onChange:n=null,isUniform:l=!0,type:o="vec2",isLocked:h=!1}={}){return this.addParam(e,t,{serializeMethod:s,setMethod:i,onChange:n,isUniform:l,type:o,isLocked:h})}addParamU3(e,t,{serializeMethod:s=null,setMethod:i=null,onChange:n=null,isUniform:l=!0,type:o="vec3",isLocked:h=!1}={}){return this.addParam(e,t,{serializeMethod:s,setMethod:i,onChange:n,isUniform:l,type:o,isLocked:h})}addParamUB(e,t,{serializeMethod:s=null,setMethod:i=null,onChange:n=null,isUniform:l=!0,type:o="bool",isLocked:h=!1}={}){return this.addParam(e,t,{serializeMethod:s,setMethod:i,onChange:n,isUniform:l,type:o,isLocked:h})}apU(...e){return this.addParamU(...e)}apUI(...e){return this.addParamUI(...e)}apUC(...e){return this.addParamUC(...e)}apU2(...e){return this.addParamU2(...e)}apU3(...e){return this.addParamU3(...e)}apUB(...e){return this.addParamUB(...e)}resetParam(e){this[e]=this._params[e].defaultValue}addDataLayer(e,t){if(this._dataLayers[e]!==void 0)throw new Error(`DataLayer: addDataLayer: name already exists: ${e}`);t.onChange||(t.onChange=this.onChange),this._dataLayers[e]=t,Object.defineProperty(this,e,{get:function(){return this._dataLayers[e]}})}adl(...e){this.addDataLayer(...e)}_dispatch=()=>{this._isDirty=!0,this.onChange.dispatch()};get dataLayers(){return this._dataLayers}get params(){return this._params}get gui(){return this._gui}set isDirty(e){for(let t in this._dataLayers)this._dataLayers[t].isDirty=e;this._isDirty=e}get isDirty(){for(let e in this._dataLayers)if(this._dataLayers[e].isDirty)return!0;return this._isDirty}}class us extends b{constructor(e){super(e),this.apUC("globalBackgroundColor",15526362)}}class ds extends b{constructor(e){super(e),this._optionsCore=[],this._idxCore=0,this.ap("core",0),this._hasExtra=!1,this._optionsExtra=[],this._idxExtra=0}addCoreDisplay(e,t){this._optionsCore.push({text:e,value:this._idxCore,texture:t}),this.canDispatch=!1,this.core=this._idxCore,this.canDispatch=!0,this._idxCore++}addExtraDisplay(e,t){}getSelectedCoreTexture(){return this._optionsCore[this.core].texture}getSelectedExtraTexture(){return this._optionsExtra[this.extra].texture}}class cs extends b{constructor(e){super(e),this.ap("brightness",0),this.ap("contrast",.98),this.ap("saturation",1.1),this.ap("highlights",.1),this.ap("shadows",1.05),this.ap("hue",0);let t=.2;a.dpr==1?t=.2:a.dpr==2?t=.4:a.dpr>2&&(t=.6),this.addDataLayer("sharpen",new b),this.sharpen.ap("sharpenBlur",t),this.sharpen.ap("sharpenSize",1),this.sharpen.ap("sharpenBlend",2),this.addDataLayer("normal",new b),this.normal.ap("normalStr",10),this.addDataLayer("light",new b),this.light.ap("lightPosX",.75),this.light.ap("lightPosY",-.57),this.light.ap("lightStr",.09)}}class fs{constructor(){this.onChange=new V,this._dataLayers=[],this._isDirty=!0,this.canDispatch=!0}init(){this._initSystem(),this._initCustoms()}_initSystem(){this.hasBackgroundChange=!1,this.backgroundData=new us(this.guiSystem),this.backgroundData.onChange.add(()=>{this.hasBackgroundChange=!0,this._dispatch()}),this._dataLayers.push(this.backgroundData),this.hasPostProcessChange=!1,this.postprocessData=new cs(this.guiSystem?.addFolder("Postprocess")),this.postprocessData.onChange.add(()=>{console.log(">>> post process change"),this.hasPostProcessChange=!0,this._dispatch()}),this._dataLayers.push(this.postprocessData),this.hasDisplayChange=!1,this.displayData=new ds(this.guiSystem?.addFolder("Display")),this.displayData.onChange.add(()=>{this.hasDisplayChange=!0,this._dispatch()}),this._dataLayers.push(this.displayData)}_initCustoms(){}_dispatch=()=>{this.canDispatch&&this.onChange.dispatch()};registerGUI(e){this._gui=e}addDataLayer(e,{style:t={},onChange:s=null,name:i=null,closeGUI:n=!1}={}){i=i||e.prototype.constructor.name.replace("Data","");const l=i.charAt(0).toUpperCase()+i.slice(1),o=i.charAt(0).toLowerCase()+i.slice(1)+"Data",h=this._gui?.get(l,{style:t}),d=new e(h);this[o]=d,d.onChange.add(()=>{s&&s(),this._dispatch()}),this._dataLayers.push(d),n&&(h._folder.expanded=!1)}resetChangesStatus(){this.hasBackgroundChange=!1,this.hasPostProcessChange=!1,this.hasDisplayChange=!1}set isDirty(e){for(let t of this._dataLayers)t.isDirty=e;this._isDirty=e}get isDirty(){for(let e of this._dataLayers)if(e.isDirty)return!0;return this._isDirty}get isDirtyExceptDisplay(){for(let e of this._dataLayers)if(e.isDirty&&e!==this.displayData)return!0;return!1}}class gs extends b{constructor(e=null){super(e),this.ap("lineWidth",4),this.ap("linesBigWidth",18),this.adl("divisions",new b),this.divisions.ap("chance",.83)}}class _s extends b{constructor(e=null){super(e),this.apU("offset",0),this.adl("curl",new b),this.curl.apUI("cLoop",8),this.curl.apU("cUvMult",6.96),this.curl.apU("cUvMultX",1),this.curl.apU("cUvMultY",1),this.curl.apU("cSeedMult",1),this.curl.apU("cStr",1.09),this.curl.apU("cRatioX",.22),this.curl.apU("cRatioY",.26),this.curl.apU("cRatioAccu",.01),this.adl("cm",new b);const t=this.cm;t.apU("modBase",1.022),t.apUI("modMaths",10),t.apU("modMax",!1),t.apU("modMax2",!0),this.adl("sn",new b);const s=this.sn;s.apUI("snLoop",1),s.apU("snUvMult",2.07),s.apU("snUvMultX",1),s.apU("snUvMultY",.22),s.apU("snSeedMult",1),s.apU("snStr",.87),s.apU("snRatioX",.22),s.apU("snRatioY",.23),s.apU("snRatioAccu",.017),this.adl("pnoise",new b);const i=this.pnoise;i.apU("pNoiseUvMult",2.826),i.apU("pNoiseSeedMult",1.63),i.apU("pNoiseStr",3.261),this.adl("mix",new b),this.mix.apU("mixRatio",1)}}class ps extends b{constructor(e=null){super(e),this.adl("lines",new b),this.lines.apU("linesGridAlpha",.489),this.lines.apUI("linesGridBlendmode",3),this.lines.apUC("linesGridColor",13156797),this.lines.apUB("linesGridInvert",!1)}}class ms extends b{constructor(e=null){super(e);const t=1,s=.3,i=8,n=50;this.adl("lines",new b),this.lines.apU("countLines",1e6),this.lines.apU("thM",t),this.lines.apU("thA",s),this.lines.apU("thP",i),this.lines.apU("lengthM",n),this.lines.apU("lengthA",157),this.lines.apU("lengthP",50),this.lines.apU("rotType",6),this.lines.apU2("rotNoise",{x:4.36,y:7.69}),this.lines.apU("valueFlowAdjust",.06),this.lines.apU("angleFlowBoost",.435),this.lines.apU("visibleThreshold",.859),this.lines.apU("dontUsePattern",!1),this.adl("colors",new b),this.colors.apU2("alpha",{min:.14,max:.774}),this.colors.apUB("applyAlpha",!0),this.adl("ca",new b),this.ca.apU("caValue",.761),this.ca.apU("caSat",.261),this.ca.apU("caLum",0),this.ca.apU("caScale",782),this.ca.apU("caValue2",.359),this.ca.apU("caScale2",1e3)}}class xs extends b{constructor(e=null){super(e),this.ap("margin",0),this.ap("lineWidth",4),this.adl("divisions",new b),this.divisions.ap("chance",.83),this.divisions.ap("friction",.89),this.divisions.ap("maxDivisions",4),this.divisions.ap("activateChanceFilling",!0),this.divisions.ap("chanceFilling",.99),this.divisions.ap("chanceDrawLine",1),this.divisions.ap("noiseScale",30),this.divisions.ap("macroScale",20),this.divisions.ap("useMacroScale",!1),this.divisions.ap("linesDivisions",2),this.divisions.ap("chanceLinesDivisions",.65)}}class vs extends b{constructor(e=null){super(e),this.ap("divider",8),this.ap("putTreesBefore",!1),this.adl("deformer",new b),this.deformer.apU("dispX",.39),this.deformer.apU("dispY",.39),this.deformer.apU("strength",.152),this.adl("layers",new b),this.layers.ap("totalDivider",13),this.layers.ap("totalDivider2",3),this.layers.adl("background",new b),this._setupLayer(this.layers.background,{color:"#b89875",countLines:999547,alpha:.36,lengthA:82,rotationType:0,skipPattern:!0}),this.layers.adl("greenLayer1",new b),this._setupLayer(this.layers.greenLayer1,{color:"#7d94a3",countLines:276547,alpha:.14,lengthA:1500,rotationType:6,noise:{scaleMax:27.3,mode:1,time:.38}}),this.layers.adl("greenLayer2",new b),this._setupLayer(this.layers.greenLayer2,{color:"#49b1c7",countLines:686547,alpha:.26,lengthA:1500,rotationType:2,noise:{scaleMax:31.3,mode:1,time:1.38}}),this.layers.adl("greenLayer3",new b),this._setupLayer(this.layers.greenLayer3,{color:"#c3b5aa",countLines:999547,alpha:.17,lengthA:1500,rotationType:2,noise:{scaleMax:34.78,mode:1,time:2.38}}),this.layers.adl("greenLayer4",new b),this._setupLayer(this.layers.greenLayer4,{color:"#bbc35a",countLines:853547,alpha:.09,lengthA:1500,rotationType:2,noise:{scaleMax:34.78,mode:1,time:3.38}}),this.layers.adl("greenLayer5",new b),this._setupLayer(this.layers.greenLayer5,{color:"#272912",countLines:999547,alpha:.33,lengthA:1500,rotationType:4,noise:{scaleMax:34.35,mode:1,time:4.38}}),this.layers.adl("windLayer",new b),this._setupLayer(this.layers.windLayer,{color:"#37342d",colorSummer:"#25341e",countLines:608418,alpha:.48,lengthA:0,rotationType:3,skipMask:!1,isSingleDir:!1,noise:{scaleMax:3.04,mode:1,time:.38}}),this.layers.adl("flowerLayer1",new b),this._setupLayer(this.layers.flowerLayer1,{color:"#102b34",colorSummer:"#1e2a16",countLines:999547,alpha:.17,lengthA:424,rotationType:6,noise:{scaleMax:3.04,mode:1,time:3.38}}),this.layers.adl("flowerLayer2",new b),this._setupLayer(this.layers.flowerLayer2,{color:"#56534f",countLines:784547,alpha:.11,lengthA:717,rotationType:6,maskType:1,noise:{scaleMax:9.57,mode:1,time:4.38}}),this.layers.adl("flowerLayer3",new b),this._setupLayer(this.layers.flowerLayer3,{color:"#eb5f0f",colorWinter:"#dfe7ec",colorSpring:"#aab7a1",colorAutumn:"#eb5f0f",colorSummer:"#8d9d68",countLines:569547,alpha:.21,lengthA:130,rotationType:6,maskType:1,noise:{scaleMax:3.48,mode:1,time:7.38}}),this.layers.adl("flowerLayer4",new b),this._setupLayer(this.layers.flowerLayer4,{color:"#e85434",colorWinter:"#68757d",colorSpring:"#aab7a1",colorAutumn:"#e85434",colorSummer:"#dad159",countLines:246547,alpha:.41,lengthA:0,rotationType:6,maskType:2,noise:{scaleMax:3.48,mode:0,time:6.38}}),this.layers.adl("blueWindLayer",new b),this._setupLayer(this.layers.blueWindLayer,{color:"#687059",colorWinter:"#dfe7ec",countLines:999825,alpha:.28,lengthA:293,rotationType:6,noise:{scaleMax:34.78,mode:1,time:6.38}}),this.layers.adl("greenFlowerLayer",new b),this._setupLayer(this.layers.greenFlowerLayer,{color:"#c3b968",colorWinter:"#a4bdcd",countLines:550188,alpha:.33,lengthA:130,rotationType:6,noise:{scaleMax:16.09,mode:0,time:8.38}}),this.layers.adl("bonusLayer",new b),this._setupLayer(this.layers.bonusLayer,{color:"#b00909",colorWinter:"#0f93ec",countLines:550188,alpha:.21,lengthA:668,rotationType:4,hasMask:!0,noise:{scaleMax:32.17,mode:0,time:9.38}})}_setupLayer(e,t){e.ap("color",t.color),e.apU("countLines",t.countLines),e.apU("alpha",t.alpha),e.ap("skipMask",t.skipMask||!1),e.apU("lengthA",t.lengthA),e.apU("rotationType",t.rotationType),e.apU("isSingleDir",t.hasMask||!1),e.apU("hasMask",t.hasMask||!1),e.ap("maskType",t.maskType||0),e.apU("skip",t.skip||!1),e.apU("skipPattern",t.skipPattern||!1),t.noise&&(e.adl("noise",new b),e.noise.ap("scaleMax",t.noise.scaleMax),e.noise.ap("mode",t.noise.mode),e.noise.ap("time",t.noise.time))}}class ys extends b{constructor(e=null){super(e),this.apU("scale",.543),this.ap("scaleMax",26.1),this.apU("str",.35),this.apU("time",.38),this.apUI("mode",0)}}class ws extends b{constructor(e){super(e),this.ap("color","#3f3838"),this.ap("treeThickness",280),this.ap("countLines",15e4),this.ap("thM",2),this.ap("thA",2),this.ap("thP",8),this.ap("lengthM",47*2),this.ap("lengthA",184*2),this.ap("lengthP",50),this.ap("alpha",.5),this.ap("angleFlowBoost",.1),this.adl("flowers",new b),this.flowers.ap("color","#e72615"),this.flowers.ap("color2","#e44b2f"),this.flowers.ap("trunkStep",50),this.flowers.ap("trunkNoiseScale",.3587),this.flowers.ap("trunkNoiseStr",.7513),this.flowers.ap("trunkBranchChance",.3),this.flowers.ap("leavesChance",.6),this.flowers.ap("countLines",804348),this.flowers.ap("thM",1.9),this.flowers.ap("thA",.4),this.flowers.ap("thP",8),this.flowers.ap("lengthM",30),this.flowers.ap("lengthA",146),this.flowers.ap("lengthP",50),this.flowers.ap("alpha",.337),this.flowers.ap("angleFlowBoost",.1)}}class bs extends b{constructor(e=null){super(e),this.ap("index",10),this.ap("width",.25),this.apU("linesGridAlpha",.5),this.apUI("linesGridBlendmode",3),this.apUC("linesGridColor","#4f4f3d"),this.apUB("linesGridInvert",!1)}}const Ms={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#7d94a3",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#39cded",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#c3b5aa",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#bbc35a",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#272912",n:999547,a:.33,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#37342d",n:608418,a:.48,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#102b34",n:999547,a:.17,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#56534f",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#fa640f",n:569547,a:.26,d:130,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#e85434",n:246547,a:.41,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#687059",n:999825,a:.28,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#c3b968",n:550188,a:.33,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#b00909",n:550188,a:.21,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},Ls={o:"#3f3838",a:.5,f:{o:"#e72615",o2:"#e44b2f",b:.1}},Ss={u:{m:6.96,q:.01}},Ds={c2:"#9c9677",p:.46},gt={c:Ms,t:Ls,w:Ss,g:Ds},Cs={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#7d94a3",n:941547,a:.22,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#3e95e7",n:951547,a:.36,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#c3b5aa",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#bbc35a",n:960547,a:.21,d:750,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#272912",n:960547,a:.12,d:1500,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#37342d",n:980418,a:.13,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#102b34",n:999547,a:.17,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#56534f",n:784547,a:.11,d:717,r:6,s:!1,x:9.57,e:1,i:4.38},f3:{o:"#fa9220",n:794547,a:.11,d:130,r:6,s:!1,x:3.48,e:1,i:7.38},f4:{o:"#e85434",n:951547,a:.14,d:0,r:6,s:!1,x:3.48,e:0,i:6.38},bw:{o:"#687059",n:999825,a:.12,d:293,r:6,s:!1,x:34.78,e:1,i:6.38},gf:{o:"#e0d36c",n:970188,a:.16,d:130,r:6,s:!1,x:16.09,e:0,i:8.38},bn:{o:"#b00909",n:550188,a:.12,d:668,r:4,s:!0,x:32.17,e:0,i:9.38}}},As={o:"#3f3838",a:.3,f:{o:"#fa5f2d",o2:"#e44b2f",b:.1,a:.21}},Ps={u:{m:6.96,q:.01}},Ts={c2:"#9f9f6f",p:.46},_t={c:Cs,t:As,w:Ps,g:Ts},zs={l:{bg:{o:"#b89875",n:999547,a:.36,d:82,r:0,s:!1},g1:{o:"#7d94a3",n:276547,a:.14,d:1500,r:6,s:!1,x:27.3,e:1,i:.38},g2:{o:"#2bcef0",n:686547,a:.26,d:1500,r:2,s:!1,x:31.3,e:1,i:1.38},g3:{o:"#49b1c7",n:999547,a:.17,d:1500,r:2,s:!1,x:34.78,e:1,i:2.38},g4:{o:"#ddc5b2",n:853547,a:.09,d:1500,r:2,s:!1,x:34.78,e:1,i:3.38},g5:{o:"#272912",n:999547,a:.33,d:832,r:4,s:!1,x:34.35,e:1,i:4.38},wl:{o:"#37342d",n:608418,a:.48,d:0,r:3,s:!1,x:3.04,e:1,i:.38},f1:{o:"#271e16",n:999547,a:.17,d:424,r:6,s:!1,x:3.04,e:1,i:3.38},f2:{o:"#56534f",n:784547,a:.11,d:717,r:
**Moments** is an exploration of memory and nostalgia, with nature and architecture as its subjects, inspired by my peaceful experiences in traditional Japanese ryokans. Some kind of memories reconstructed while souvenirs are fading as time passes. ## **The Digital Collection** The Digital Collection is a long form series and an animated piece that will loop through 4 different palettes for each NFT, emulating the time passing through seasons. My inspiration for this collection comes from serene and dear memories of my time in Japan. For me, traveling there means experiencing relaxing, inspiring moments in traditional ryokans—far away from the city, surrounded by nature (sometimes literally in the middle of the forest), where you can genuinely focus on self-care. You spend time in an onsen, enjoy beautifully curated and prepared meals, and return to your room with an incredible view of the outdoors. These places have a unique kind of architecture: minimalistic yet carefully constructed. Last year, I read a book called In Praise of Shadows by Junichiro Tanizaki, which helped me connect more deeply with the evolution of Japanese culture, linking a past I didn't know with the present day. Everything suddenly made sense to me. In a way, because of this book, I started seeing the Japan I knew differently (I noticed many many details), but also I started to have a look at my life and surroundings differently. Today, whenever I’m faced with complicated moments or need to figure out a solution, I mentally revisit my time in those ryokans. It’s become a kind of escape for me, a place where I find peace. It also brings up a lot of nostalgia from my experiences there. Earlier, I mentioned the architecture—I've decided to use that as the foundation for Moments. My starting point was the Japanese Shoji doors, constructed from wooden frames and washi paper. They became the structural basis for my artwork, where each block acts as a window into a memory, a window into a particular moment or passage of time. Nature appears either clearly through a seasonal color palette or more subtly suggested by organic elements and movements. The geometric structure is blending with more organic elements. This approach reflects the idea of ephemerality—representing nostalgia, memories that were once clear but have since been reconstructed again and again, ultimately transforming into something uniquely ours, reshaped through multiple layers of reflection.
class Loader{constructor(t,e={}){this.options={color:"#fff",width:"30%",...e},this.steps=7,this.step=1/this.steps,this.progress=0,this.progressRender=.001,this.progressRenderLocal=.001,this._isVisible=!1,this.element=document.createElement("div"),this.element.className="ryokan-loader",this.element.style.width="30%",this.element.style.zIndex="9999",this.element.style.position="absolute",this.element.style.bottom=0,this.element.style.left="50%",this.element.style.transform="translate(-50%, -50%)",this.element.style.backgroundColor="#17140B",this.element.style.padding="20px",this.element.style.border="1px solid #fff",this.barContainer=document.createElement("div"),this.barContainer.className="ryokan-loader-bar-container",this.barContainer.style.height="4px",this.barContainer.style.backgroundColor="#000",this.barContainer.style.opacity=.8,this.barContainer.style.overflow="hidden",this.barContainer.style.position="relative",this.bar=document.createElement("div"),this.bar.className="ryokan-loader-bar",this.bar.style.height="100%",this.bar.style.width="0%",this.bar.style.backgroundColor="#fff",this.bar.style.transition="width 0.3s ease-in-out",this.bar.style.position="absolute",this.bar.style.left="0",this.bar.style.top="0",this.barContainer.appendChild(this.bar),this.element.appendChild(this.barContainer),t&&("string"==typeof t?document.querySelector(t).appendChild(this.element):t.appendChild(this.element)),this.setProgress(0)}update(t){return this.progress+=this.step,this.setProgress(this.progress),this}setProgress(t){const e=Math.max(0,Math.min(1,t));return this.bar.style.width=`${e*100>>0}%`,this}setProgressRender(t){this.progressRender=t}setProgressRenderLocal(t){this.progressRenderLocal=t}getElement(){return this.element}show(){this._isVisible=!0,this.setProgress(0),this.element.style.display="block"}hide(){this._isVisible&&(this._isVisible=!1,this.element.style.display="none")}}let loader;const urlParams=new URLSearchParams(window.location.search),isRender=urlParams.has("render")&&"true"===urlParams.get("render");document.body.style.backgroundColor="#17140b";const canvas=document.querySelector("canvas")||document.createElement("canvas");canvas.id="defaultCanvas0",canvas.parentNode||document.body.appendChild(canvas);const cid=tokenData.externalAssetDependencies[0].cid,preferredGateway=tokenData.preferredIPFSGateway,tokenId=tokenData.tokenId.slice(-1);function createUrl(t,e,r){return`${t}${e}/moments-${r}.jpg`}async function loadImage(){const t=canvas.getContext("2d");loader=new Loader(document.body),loader.show(),loader.setProgress(.1);const e=createUrl(preferredGateway,cid,tokenId);console.log("Trying URL:",e),loader.update();try{const r=await loadImageFromUrl(e);loader.update(),displayImage(r,canvas,t),loader.hide()}catch(r){console.log("Failed to load from preferred gateway, trying fallback..."),loader.update();const a=createUrl("https://ipfs.io/ipfs/",cid,tokenId);console.log("Trying fallback URL:",a);try{const e=await loadImageFromUrl(a);loader.update(),displayImage(e,canvas,t),loader.hide()}catch(e){console.log("Failed to load from ipfs.io, trying florianzumbrunn.com fallback..."),loader.update();const r=`https://florianzumbrunn.com/fallbacks/moments/moments-${tokenId}.jpg`;console.log("Trying final fallback URL:",r);try{const e=await loadImageFromUrl(r);loader.update(),displayImage(e,canvas,t),loader.hide()}catch(e){console.error("Failed to load image from all sources",e),loader.setProgress(1),setTimeout(()=>loader.hide(),1500),t.fillStyle="red",t.font="20px Arial",t.fillText("Error loading image",50,100)}}}}function loadImageFromUrl(t){return new Promise((e,r)=>{const a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{loader.setProgress(.9),e(a)},a.onerror=t=>r(t),a.src=t,loader.setProgress(.5)})}function displayImage(t,e,r){const a=isRender?.25:1;console.log("displaying image",t.width,t.height,isRender),e.width=t.width*a,e.height=t.height*a,e.style.width=e.width+"px",e.style.height=e.height+"px",r.drawImage(t,0,0,t.width*a,t.height*a),applyResponsiveStyling(e,t.width,t.height),loader&&(loader.setProgress(1),setTimeout(()=>loader.hide(),500))}function applyResponsiveStyling(t,e,r){t.style.maxWidth="100%",t.style.maxHeight="100vh",t.style.width="auto",t.style.height="auto";const a=t.parentElement||document.body;a.style.display="flex",a.style.justifyContent="center",a.style.alignItems="center",a.style.height="100vh",a.style.margin="0",a.style.padding="0"}window.addEventListener("resize",()=>{canvas.width>0&&canvas.height>0&&applyResponsiveStyling(canvas,canvas.width,canvas.height)}),document.addEventListener("DOMContentLoaded",()=>{document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden",loadImage()});
**Moments** is an exploration of memory and nostalgia, with nature and architecture as its subjects, inspired by my peaceful experiences in traditional Japanese ryokans. Each artwork uses a structural grid inspired by *shoji* doors, acting as windows into fragmented yet familiar landscapes. Some kind of memories reconstructed while souvenirs are fading as time pass. ## **The Curated Collection** The Curated Collection is a special selection of 10 distinct pieces, handpicked at different times over four months of experimentation and refinement. Each artwork captures a unique moment, showcasing variations in composition, palette, and mood. They narrate the evolution of my algorithm, from initial explorations to sophisticated states closer to its final form. Printed on **Canson watercolor paper 310g** and elegantly framed in **white aluminum**, each piece is individually **enhanced by hand with dry and wet pastel pencils and oil pastel**— adding depth, texture, and tangibility. Adding a new layer of "human hand" that will add the final stroke to the artwork. The NFT contains the original digital piece, before any hand intervention. These pieces invite viewers to slow down and fully immerse themselves in their subtle details and evocative atmospheres. Observing them from afar reveals their harmonious structure and contemplative movement; moving closer uncovers all its details, textures and subtile layers of colors that live on top of each others. My intention is for each viewer to experience a sense of calm surprise, encouraging curiosity and introspection, and ultimately feeling transported into their own serene "moment."
"Odysseys" is all about diving into a mix of cool digital vibes and a splash of old-school storybook magic. Imagine flipping through your favorite childhood adventure book, but with a twist—there's a bit of a pixel party going on. It's like these pieces are little puzzles, maps of epic tales that happened once upon a time, captured in a single frame. Think of it as a snapshot of a whole adventure from start to finish, with every corner holding a piece of the action. Each artwork is kind of like a treasure map or a game level that's already been played through. You can zoom into any part of the picture and spot different bits of the story—maybe a fierce battle here, a wild discovery there. It's like having a bird's-eye view of a whole world of tales, all squished into one vibrant, living scene. The cool thing about these pieces? They're a mix of old and new. You've got pixels and glitches that might remind you of video games, mashed up with these swirly waves that could totally belong in a Van Gogh painting. But let's not stop there. Imagine those waves carrying a bit of that serene, intricate beauty you find in Japanese byōbu panels or estampes—those stunning artworks that tell a story all on their own. It's this blend that's all about sparking that feeling of nostalgia, like a nod to the fun, colorful, and sometimes chaotic stories that filled our heads as kids. I'm not trying to spell out a specific message with the digital and organic bits clashing and mingling in my work. It's more about creating something that looks cool and feels a bit nostalgic, something that makes you think of adventures and stories in a new way. What I really hope is that when you check out these pieces, you'll start seeing your own stories in them. I've set the stage with these algorithms and designs, but it's up to you to fill in the blanks. Maybe you'll see a piece and think, "Hey, that looks like the secret forest from that game I loved," or "That totally reminds me of the pirate stories I used to dream about." Or maybe you'll catch a hint of that tranquil, detailed vibe you get from Japanese art, making the story even richer. That's the goal—making art that's not just mine but becomes a bit of yours too.
._width,this.canvas.height=this._height,this.canvas.classList.add("patterns"),this.ctx=this.canvas.getContext("2d"),this.ctx.fillStyle="#fff",this.ctx.fillRect(0,0,this._width,this._height),this.texture=new Qt(u.gl,{image:this.canvas,minFilter:u.gl.NEAREST,magFilter:u.gl.NEAREST,generateMipmaps:!1})}clear({clearColor:t="#000"}={}){this.ctx.fillStyle=t,this.ctx.fillRect(0,0,this._width,this._height)}draw(){}_refreshDebugMesh(){this._UNF.uOpacity.value=.1}resize(t,e){this._width=t,this._height=e,this.canvas.width=this._width,this.canvas.height=this._height,this.canvas.style.width=this._width+"px",this.canvas.style.height=this._height+"px",this.texture.needsUpdate=!0}}class lt{constructor(t,e,s,i){this.x=t,this.y=e,this.width=s,this.height=i,this._ls=[],this._data=y.gridData.divisions,this._isFinal=!1}divide(t=0,e=1){this._idxDivision=t,this._chanceDivision=e;const s=this.x,i=this.y;this._ls.push({xFrom:s,yFrom:i,xTo:s+this.width,yTo:i}),this._ls.push({xFrom:s,yFrom:i,xTo:s,yTo:i+this.height}),this._ls.push({xFrom:s+this.width,yFrom:i,xTo:s+this.width,yTo:i+this.height}),this._ls.push({xFrom:s,yFrom:i+this.height,xTo:s+this.width,yTo:i+this.height});const n=this._divide(this.x,this.y,this.width,this.height),a=u.rand();!n&&(!this._data.activateChanceFilling||a<this._data.chanceFilling)&&(this._isFinal=!0)}_divide(t,e,s,i){const n=u.rand(),a=u.rand();if(this._idxDivision>=this._data.maxDivisions||n>this._chanceDivision)return!1;const l=y.gridData.divisionsType;let h=y.gridData.margin;const c=s/2-h*.5,_=i/2-h*.5;this._cs=[],a>l.full&&a<l.full+l.vertical?(this._cs.push(new lt(t,e,c,i)),this._cs.push(new lt(t+c+h,e,c,i))):a>l.full+l.vertical&&a<l.full+l.vertical+l.horizontal&&(this._cs.push(new lt(t,e,s,_)),this._cs.push(new lt(t,e+_+h,s,_)));for(let v of this._cs)v.divide(this._idxDivision+1,this._chanceDivision*this._data.friction);return!0}seasonize(){if(!this._isFinal){for(let e of this._cs)e.seasonize();return}const t=u.rand();t<.25?this.se="w":t<.5?this.se="sp":t<.75?this.se="su":this.se="a"}draw=t=>{this._isFinal&&(t.save(),t.fillStyle=y.cbs[this.se],t.translate(this.x,this.y),t.fillRect(0,0,this.width,this.height),t.restore())};drawLines=t=>{if(!this._isFinal)return;const e=2,s=e>>1;t.save(),t.strokeStyle="#fff",t.lineWidth=e,t.translate(this.x,this.y),t.strokeRect(-s,-s,this.width+s,this.height+s),t.restore()};get finalCells(){if(this._isFinal)return[this];{let t=[];if(this._cs)for(let e of this._cs)t=t.concat(e.finalCells);return t}}get lines(){let t=[];if(t=t.concat(this._ls),this._cs)for(let e of this._cs)t=t.concat(e.lines);return t}}class aa extends vr{constructor(){super(),this._grids=[],this._gridLines=new vr}generate(){this._cells=[],this._fc=null;const t=y.gridData,e=t.margin,s=(this._width-e*(t.cols+1))/t.cols,i=(this._height-e*(t.lines+1))/t.lines;let n=e,a=e;for(let l=0;l<t.lines;l++){for(let h=0;h<t.cols;h++){const c=new lt(n,a,s,i);c.divide(0,t.divisions.chance),this._cells.push(c),n+=s+e}n=e,a+=i+e}this._fc=[],this._fl=[],this._fl.push({xFrom:e,yFrom:e,xTo:this._width-e,yTo:e}),this._fl.push({xFrom:e,yFrom:e,xTo:e,yTo:this._height-e}),this._fl.push({xFrom:this._width-e,yFrom:e,xTo:this._width-e,yTo:this._height-e}),this._fl.push({xFrom:e,yFrom:this._height-e,xTo:this._width-e,yTo:this._height-e});for(let l of this._cells)Array.prototype.push.apply(this._fc,l.finalCells),Array.prototype.push.apply(this._fl,l.lines)}seasonize(){for(let t of this.finalCells)t.seasonize()}render(){this.clear({clearColor:"#fff"});for(let t of this._grids)t.clear();this._gridLines.clear();for(let t of this._fc)t.draw(this.ctx);this.texture.needsUpdate=!0,this._gridLines.ctx.strokeStyle="#fff",this._gridLines.ctx.lineWidth=y.gridData.lineWidth,this._gridLines.ctx.beginPath();for(let t of this.finalLines)!t||u.rand()>y.gridData.divisions.chanceDrawLine||(this._gridLines.ctx.moveTo(t.xFrom,t.yFrom),this._gridLines.ctx.lineTo(t.xTo,t.yTo));this._gridLines.ctx.stroke(),this._gridLines.texture.needsUpdate=!0}get finalCells(){return this._fc}get finalLines(){return this._fl}get textureLines(){return this._gridLines.texture}}class la extends ne{constructor(t){t=t;const e=t.count,s=e<<1,i=e<<2;let n=0,a=0,l=0,h=0,c=0,_=0;const v=new Float32Array(i),f=new Float32Array(i*2);for(let k=0;k<i;k++){const te=k;for(let B=0;B<4;B++)v[n]=te,f[a+0]=c/(t.width-1),f[a+1]=_/(t.height-1),n+=1,a+=2;c+=1,c>t.width-1&&(c=0,_+=1)}n=0,a=0;let A=1,b=1;const C=new Float32Array(i*2),g=new Float32Array(i*2),p=new Float32Array(i*2);for(let k=0;k<s;k++)g[h+0]=-1*A,g[h+1]=-1*b,p[h+0]=0,p[h+1]=0,g[h+2]=-1*A,g[h+3]=1*b,p[h+2]=0,p[h+3]=1,g[h+4]=1*A,g[h+5]=-1*b,p[h+4]=1,p[h+5]=0,g[h+6]=1*A,g[h+7]=1*b,p[h+6]=1,p[h+7]=1,h+=8;a=0;const m=new Uint32Array(i*3);for(let k=0;k<e;k++)m[l+0]=a,m[l+1]=m[l+4]=a+1,m[l+2]=m[l+3]=a+2,m[l+5]=a+3,a+=4,l+=12;const P={uid:{data:v},uvDataTexture:{size:2,data:f},side:{size:2,data:g},uv:{size:2,data:p},index:{data:m},pos:{size:2,data:C}};super(u.gl,P)}}class zr extends wt{constructor({size:t=10,vs:e=null,fs:s=null,UNF:i={}}={}){i={...i,...{sizePlanes:{value:t},tdtm:{value:null}}};let a="",l="";super(u.gl,{UNF:i,vertex:a+e,fragment:l+s,transparent:!0,cullFace:u.gl.FRONT,depthWrite:!1})}init(t){this.UNF.tdtm.value=t.textureMain}}class ha extends yt{constructor(t,{material:e=new zr}={}){const s=new la(t);e.init(t),super(u.gl,{geometry:s,_pr:e})}}class ua{constructor(t,e){this.reset(t,e)}reset(t,e){this.width=t,this.height=e,this.count=this.width*this.height>>0,this.count4=this.count<<2;const s=new Float32Array(this.count4),i=u.gl;this.tm=new Qt(i,{image:s,width:this.width,height:this.height,type:i.FLOAT,generateMipmaps:!1,target:i.TEXTURE_2D,format:i.RGBA,internalFormat:i.renderer.isWebgl2?i.RGBA32F:i.RGBA,wrapS:i.CLAMP_TO_EDGE,wrapT:i.CLAMP_TO_EDGE,generateMipmaps:!1,minFilter:i.NEAREST,magFilter:i.NEAREST,flipY:!1});for(let n=0;n<this.count4;n+=4)this.tm.image[n+0]=u.prerand(),this.tm.image[n+1]=u.prerand(),this.tm.image[n+2]=0,this.tm.image[n+3]=0;this.tm.needsUpdate=!0}get textureMain(){return this.tm}}var ca=`#define M_PI 3.1415 #define HALF_PI 1.5707 _u _s2 tdtm;_u _s2 tPattern;_u _f ugenhash;_u _f ultMin;_u _f ultAdd;_u _f ultPower;_u _f ullMin;_u _f ullAdd;_u _f ullPower;_u _f urType;_u _v2 urNoise;_u _v2 uHr;_u _v2 uSr;_u _v2 uLr;_u _f ucadV;_u _f ucadSl;_u _f ucadV2;_u _f ucadSl2;_u _v2 uA;_u _f uAPower;_u _f uVisibleThreshold;_u _v2 uTextureSize;_u _f uTextureRatio;in _f uid;in _v2 uvDataTexture;in _v2 side;in _v2 uv;out _v2 vUv;out _v3 vColor;out _f iv;out _f ivs[4];out _f vUid;out _f vUidBase;out _f vModColor1;out _f vModColor2;out _f vAlpha; #i_ rgb2hsl #i_ noiseUtils #i_ snoise2d _f vh(_v3 p){p=fract(p*0.31+.1);p*=17.0;return fract(p.x*p.y*p.z*(p.x+p.y+p.z));}_f vn(in _v3 x){_v3 i=floor(x);_v3 f=fract(x);f=f*f*(3.0-2.0*f);return mix(mix(mix(vh(i+_v3(0,0,0)),vh(i+_v3(1,0,0)),f.x),mix(vh(i+_v3(0,1,0)),vh(i+_v3(1,1,0)),f.x),f.y),mix(mix(vh(i+_v3(0,0,1)),vh(i+_v3(1,0,1)),f.x),mix(vh(i+_v3(0,1,1)),vh(i+_v3(1,1,1)),f.x),f.y),f.z);}_f hash12(_v2 p){_v3 p3=fract(_v3(p.xyx)*.11);p3+=dot(p3,p3.yzx+33.33);return fract((p3.x+p3.y)*p3.z);}mat3 mfe(_v3 eu){mat3 m;_f a=cos(eu.x);_f b=sin(eu.x);_f c=cos(eu.y);_f d=sin(eu.y);_f e=cos(eu.z);_f f=sin(eu.z);_f ae=a*e;_f af=a*f;_f be=b*e;_f bf=b*f;m[0][0]=c*e;m[0][1]=-c*f;m[0][2]=d;m[1][0]=af+be*d;m[1][1]=ae-bf*d;m[1][2]=-b*c;m[2][0]=bf-ae*d;m[2][1]=be+af*d;m[2][2]=a*c;return m;}_f cBV(_v3 p1,_v3 p2,_f hueToCompare){_f dx=p2.x-p1.x;_f dy=p2.y-p1.y;_f a=atan(dy,dx);_f dist=sqrt(dx*dx+dy*dy);_f acc=dist/4.;_f x=p1.x;_f y=p1.y;for(_i i=0;i<4;i++){_v3 p=_t(tPattern,_v2(x,y)).rgb;_v3 hsl=rgb2hsl(p);_f hDiff=abs(hueToCompare-hsl.r);if(hDiff>uVisibleThreshold*.19){return 0.;}x+=cos(a)*acc;y+=sin(a)*acc;}return 1.;}_f mtp(_f v,_f miv,_f mav,_f po){_f vSign=sign(v);v=(v-miv)/(mav-miv);v=vSign>0. ? v : v-1.;v=pow(v*vSign,abs(po));v=vSign>0. ? v : 1.-v;return v*(mav-miv)+miv;}_f rBP(_f miv,_f mav,_f po){if(miv==mav){return miv;}_f value=hash12(_v2(uid,ugenhash))*(mav-miv)+miv;return mtp(value,miv,mav,po);} #i_ hsl2rgb _f grnd(){return hash12(_v2(uid,ugenhash));}_f _grinc=0.;_f grinc(){_grinc+=.1;return hash12(_v2(uid+_grinc,ugenhash+_grinc));}_vmvUv=uv;_f id=uid;_v4 dtm=_t(tdtm,uvDataTexture);_v4 dtm2=dtm.xyzw;dtm2.x=mod(dtm2.x,1.);dtm2.y=mod(dtm2.y,1.);dtm2.x=(dtm2.x*1.-.5)*2.;dtm2.y=(dtm2.y*1.-.5)*2.;_f rt=0.;_f canAdd=0.;_f rtType=urType;if(rtType==0.){rt=grinc()*M_PI*2.;canAdd=1.;}else if(rtType==1.){if(grinc()<.75){rt=grinc()*M_PI*2.;canAdd=1.;}else{if(grinc()<.5){rt=0.;}else{rt=M_PI*.5;}}}else if(rtType==2.){if(grinc()<.3){rt=grinc()*M_PI*2.;canAdd=1.;}else{if(grinc()<.5){rt=0.;}else{rt=M_PI*.5;}}}else if(rtType==3.){rt=vn(_v3((dtm.x+ugenhash*.001)*urNoise.x,(dtm.y+ugenhash*.001)*urNoise.y,0.))*M_PI*2.;}_f sgl=ullMin+rBP(0.,ullAdd,ullPower);_f sgt=ultMin+rBP(0.,ultAdd,ultPower);_f scl=1./uTextureSize.x*2.;_v3 posBase=_v3(0.);posBase.x+=side.x*sgl*scl;posBase.y+=side.y*sgt*scl;mat3 rtm=mfe(_v3(0.,0.,rt));_v3 p1=_v3(0.);p1.x=-1.*sgl*scl;p1*=rtm;p1.y*=uTextureRatio;p1+=(dtm2.xyz*.5+.5);_v3 p2=_v3(0.);p2.x=1.*sgl*scl;p2*=rtm;p2.y*=uTextureRatio;p2+=(dtm2.xyz*.5+.5);ivs[0]=cBV(p1,p2,65./360.);ivs[1]=cBV(p1,p2,130./360.);ivs[2]=cBV(p1,p2,195./360.);ivs[3]=cBV(p1,p2,260./360.);_f ivSum=ivs[0]+ivs[1]+ivs[2]+ivs[3];iv=ivSum>0. ? 1. : 0.;posBase.xyz*=rtm;posBase.y*=uTextureRatio;_v2 pUV=posBase.xy;pUV+=(dtm2.xy*.5+.5);_f hue=rBP(uHr.x,uHr.y,1.);_f saturation=rBP(uSr.x,uSr.y,1.);_f luminosity=rBP(uLr.x,uLr.y,1.);vAlpha=rBP(uA.x,uA.y,uAPower);vColor=_v3(hue,saturation,luminosity);posBase+=_v3(dtm2.x,dtm2.y,0.);_v4 pos=_v4(posBase,1.);vModColor1=vn(_v3((dtm2.x)*ucadSl,(dtm2.y)*ucadSl,0.))*ucadV;vModColor2=vn(_v3((dtm2.x)*ucadSl,(dtm2.y)*ucadSl,0.))*ucadV;_f percentModColor=snoise2d(_v2((dtm2.x)*ucadSl2,(dtm2.y)*ucadSl2));_f baseValue2=1.-ucadV2;vModColor1*=(baseValue2+percentModColor*ucadV2);vModColor2*=(baseValue2+percentModColor*ucadV2);gl_Position=pos;gl_Position.z=grnd();vUid=id;vUidBase=uid;}`,_a=`#ifndef PI #define PI 3.141592653589793 #endif _u _f uCountLines;_u _v3 uCs[4];_u _f ucadSat;_u _f ucadLum;_u bool uApplyAlpha;in _v3 vColor;in _f iv;in _f ivs[4];in _f vUid;in _f vModColor1;in _f vModColor2;in _f vAlpha; #i_ hsl2rgb _lay0)out vec4 o0;_v3 am(_v3 c,_v3 mod){_f hue=c.r+mod.r;_f sat=c.g+mod.g;_f lum=c.b+mod.b;c=hsl2rgb(hue,sat,lum);return c;}_vmif(vUid>uCountLines){discard;}_v3 mod=_v3(0.);mod.r=vColor.r;mod.g=vColor.g+vModColor1*ucadSat;mod.b=vColor.b+vModColor2*ucadLum;_v3 c0=am(uCs[0],mod);_v3 c1=am(uCs[1],mod);_v3 c2=am(uCs[2],mod);_v3 c3=am(uCs[3],mod);_f a=2.;a=1.;a*=vAlpha;if(uApplyAlpha==false){a=1.;a*=.88;}if(iv==0.){discard;}o0=vec4(c0,a)*ivs[0]+vec4(c1,a)*ivs[1]+vec4(c2,a)*ivs[2]+vec4(c3,a)*ivs[3];}`;function va(r){const t=r>>16&255,e=r>>8&255,s=r&255;return{r:t/255,g:e/255,b:s/255}}function da(r,t,e){var s=Math.max(r,t,e),i=Math.min(r,t,e),n,a,l=(s+i)/2;if(s==i)n=a=0;else{var h=s-i;switch(a=l>.5?h/(2-s-i):h/(s+i),s){case r:n=(t-e)/h+(t<e?6:0);break;case t:n=(e-r)/h+2;break;case e:n=(r-t)/h+4;break}n/=6}return[n,a,l]}function pa(r,t=!0){const e=va(r),s=da(e.r,e.g,e.b);return t?(s[0]*=360,s[1]*=100,s[2]*=100,`hsl( ${s[0]}, ${s[1]}%, ${s[2]}% )`):s}const dr=function(r){const t=pa(r,!1);return{h:t[0]*360,s:t[1]*100,l:t[2]*100}},fa=z(ca),ga=z(_a);class ba extends ft{constructor(t){super(1),this._u={ugenhash:{value:0},tPattern:{value:t},ultMin:{value:1},ultAdd:{value:0},ultPower:{value:1},ullMin:{value:10},ullAdd:{value:100},ullPower:{value:1},urType:{value:0},urNoise:{value:new L(0,0)},uCs:{value:[new V,new V,new V,new V]},uA:{value:new L},uAPower:{value:4},uApplyAlpha:{value:!0},uHr:{value:new L},uSr:{value:new L},uLr:{value:new L},ucadV:{value:0},ucadSat:{value:0},ucadLum:{value:0},ucadSl:{value:0},ucadV2:{value:0},ucadSl2:{value:0},uVisibleThreshold:{value:1},uCountLines:{value:2e5},uTextureSize:{value:u.resolutionNoDPR},uTextureRatio:{value:u.size.width/u.size.height}};const e=new zr({UNF:this._u,vs:fa,fs:ga}),s=new ua(1024,1024);this._lines=new ha(s,{material:e}),this.addChild(this._lines)}generate(){this._u.ugenhash.value=u.rand()*15e6+10}render(t=!0){const e=y.vegeData.lines;this._u.uCountLines.value=e.count,this._u.ultMin.value=e.thicknessM,this._u.ultAdd.value=e.thicknessA,this._u.ultPower.value=e.thicknessP,this._u.ullMin.value=e.lengthM,this._u.ullAdd.value=e.lengthA,this._u.ullPower.value=e.lengthP,this._u.urType.value=Math.min(e.rotationType,3),this._u.urNoise.value.set(e.rotationNoise.x,e.rotationNoise.y),this._u.uVisibleThreshold.value=e.visibleThreshold;const s=y.vegeData.colors;let i=s.color1,n=dr(i);for(let l=0;l<4;l++)i=s["color"+(l+1)],n=dr(i),this._u.uCs.value[l].set(n.h/360,n.s/100,n.l/100);this._u.uHr.value.set(s.hueRand.min,s.hueRand.max),this._u.uSr.value.set(s.saturationRand.min,s.saturationRand.max),this._u.uLr.value.set(s.luminosityRand.min,s.luminosityRand.max);const a=y.vegeData.colorAdjustement;this._u.ucadV.value=a.colorAdjustementValue,this._u.ucadSat.value=a.colorAdjustementSat,this._u.ucadLum.value=a.colorAdjustementLum,this._u.ucadSl.value=a.colorAdjustementScale,this._u.ucadV2.value=a.colorAdjustementValue2,this._u.ucadSl2.value=a.colorAdjustementScale2,this._u.uA.value.set(s.alpha.min,s.alpha.max),this._u.uAPower.value=s.alphaPower,this._u.uApplyAlpha.value=s.applyAlpha,t&&super.render()}}var ma="uniform _v2 uRes;uniform _f uBoost;in _v3 position;in _v2 uv;out _v2 vUv;out _v2 vnw;out _v2 vne;out _v2 vsw;out _v2 vse;out _v2 vbm;void texcoords(_v2 fc,_v2 res,out _v2 vnw,out _v2 vne,out _v2 vsw,out _v2 vse,out _v2 vbm){_v2 ivp=1.0/res.xy;vnw=(fc+_v2(-1.0,-1.0))*ivp;vne=(fc+_v2(1.0,-1.0))*ivp;vsw=(fc+_v2(-1.0,1.0))*ivp;vse=(fc+_v2(1.0,1.0))*ivp;vbm=_v2(fc*ivp);}_vmvUv=uv;_v2 resolution=uRes*uBoost;_v2 fragCoord=vUv*resolution;texcoords(fragCoord,resolution,vnw,vne,vsw,vse,vbm);gl_Position=vec4(position*2.,1.);}",xa=`#define TC {texcount} _u _s2 _ts[{texcount}];_u _v2 uRes;_u _f uBoost;in _v2 vnw;in _v2 vne;in _v2 vsw;in _v2 vse;in _v2 vbm;in _v2 vUv;_lay0)out _v4 oc0; #if TC > 1 _lay1)out _v4 oc1; #endif #if TC > 2 _lay2)out _v4 oc2; #endif #if TC > 3 _lay3)out _v4 oc3; #endif #ifndef FRM #define FRM (1.0/ 128.0) #endif #ifndef FRMU #define FRMU (1.0 / 8.0) #endif #ifndef FSM #define FSM 8.0 #endif _v4 fxaa(_s2 tex,_v2 fc,_v2 res,_v2 vnw,_v2 vne,_v2 vsw,_v2 vse,_v2 vbm){_v4 color;mediump _v2 ivp=_v2(1.0/res.x,1.0/res.y);_v3 rgbNW=_t(tex,vnw).xyz;_v3 rgbNE=_t(tex,vne).xyz;_v3 rgbSW=_t(tex,vsw).xyz;_v3 rgbSE=_t(tex,vse).xyz;_v4 tc=_t(tex,vbm);_v3 rgbM=tc.xyz;_v3 l=_v3(0.299,0.587,0.114);_f lNW=dot(rgbNW,l);_f lNE=dot(rgbNE,l);_f lSW=dot(rgbSW,l);_f lSE=dot(rgbSE,l);_f lM=dot(rgbM,l);_f lMin=min(lM,min(min(lNW,lNE),min(lSW,lSE)));_f lMax=max(lM,max(max(lNW,lNE),max(lSW,lSE)));mediump _v2 dir;dir.x=-((lNW+lNE)-(lSW+lSE));dir.y=((lNW+lSW)-(lNE+lSE));_f dr=max((lNW+lNE+lSW+lSE)*(0.25*FRMU),FRM);_f rc=1.0/(min(abs(dir.x),abs(dir.y))+dr);dir=min(_v2(FSM,FSM),max(_v2(-FSM,-FSM),dir*rc))*ivp;_v3 rgbA=0.5*(_t(tex,fc*ivp+dir*(1.0/3.0-0.5)).xyz+_t(tex,fc*ivp+dir*(2.0/3.0-0.5)).xyz);_v3 rgbB=rgbA*0.5+0.25*(_t(tex,fc*ivp+dir*-0.5).xyz+_t(tex,fc*ivp+dir*0.5).xyz);_f lB=dot(rgbB,l);if((lB<lMin)||(lB>lMax))color=_v4(rgbA,tc.a);else color=_v4(rgbB,tc.a);return color;}_vm_v2 r=uRes*uBoost;_v2 fc=vUv*r;oc0=fxaa(_ts[0],fc,r,vnw,vne,vsw,vse,vbm); #if TC > 1 oc1=fxaa(_ts[1],fc,r,vnw,vne,vsw,vse,vbm); #endif #if TC > 2 oc2=fxaa(_ts[2],fc,r,vnw,vne,vsw,vse,vbm); #endif #if TC > 3 oc3=fxaa(_ts[3],fc,r,vnw,vne,vsw,vse,vbm); #endif }`;const Ca=z(ma);class wa extends ft{constructor({textures:t=null,resolution:e=new L(u.size.width,u.size.height),boost:s=1}={}){super(t.length,!1),this._UNF={textures:{value:t},uRes:{value:u.resolution},uBoost:{value:s}};let i=z(xa);i=i.replaceAll("{texcount}",t.length),this.mesh=new yt(u.gl,{geometry:new At(u.gl,{width:1,height:1}),_pr:new wt(u.gl,{vertex:Ca,fragment:i,UNF:this._UNF,transparent:!0})}),this.addChild(this.mesh)}}var ya=`#i_ noiseUtils #i_ snoise3d #i_ pnoise2d #i_ pnoise3d #i_ blendmodes #i_ edge #i_ contrast #i_ khwr #i_ hueShift #i_ brightness #i_ saturation #i_ grain #iu_ _u _s2 tp;_u _s2 tl;_u _s2 tb;_u _s2 tbe;_u _s2 tn;_u _s2 tne;_u _s2 tne2;_u _s2 tve;_u _s2 tze;_u _v2 uRes;_u _f uSeed;in _v2 vUv;_lay0)out _v4 oc0;_v4 perm(_v4 x){return mod289(((x*34.0)+1.0)*x);}_f ns(_v3 p){_v3 a=floor(p);_v3 d=p-a;d=d*d*(3.0-2.0*d);_v4 b=a.xxyy+_v4(0.0,1.0,0.0,1.0);_v4 k1=perm(b.xyxy);_v4 k2=perm(k1.xyxy+b.zzww);_v4 c=k2+a.zzzz;_v4 k3=perm(c);_v4 k4=perm(c+1.0);_v4 o1=fract(k3*(1.0/41.0));_v4 o2=fract(k4*(1.0/41.0));_v4 o3=o2*d.z+o1*(1.0-d.z);_v2 o4=o3.yw*d.x+o3.xz*(1.0-d.x);return o4.y*d.y+o4.x*(1.0-d.y);}_f gtstns(_v2 o){_f st=1.-_v3(grain(vUv+_v2(0.,o.x),uRes*uGrainScale*.0025)).r;st=_smst(.8,.6,st);st=clamp(st,0.,1.);return st;}_v3 gtgrn(float gs){_f gp=ns(_v3(vUv*_v2(80.,4.),0.));_v3 cn=_v3(grain(vUv,uRes*gs+gp*uGrainPerturb+uSeed*.1));return cn;}_vm_v4 ptt=_t(tp,vUv);_v4 lines=_t(tl,vUv);_v4 noise=_t(tn,vUv);_v3 iNoise=_v3(1.-noise.rgb);_f noiseValue=(iNoise.r+iNoise.g+iNoise.b)/3.;_v3 noiseValueBoosted=_v4(bmx(-.43)*ctmx(1.45)*_v4(_v3(noiseValue),1.)).rgb;_v4 c=ptt;_v4 ptk1=khwr(tp,vUv,uP1,uRes);c.rgb=(1.-uP1a)*c.rgb+blmd(uP1b,c.rgb,ptk1.rgb,uP1a)*uP1a;c.rgb=(1.-uP2a)*c.rgb+blmd(uP2b,c.rgb,ptk1.rgb,uP2a)*uP2a;_v4 lk13=khwr(tl,vUv,uLs1,uRes);_v4 lk6=khwr(tl,vUv,uLs2,uRes);c.rgb=mix(c.rgb,_v3(uLinesColor),(lk13.r)*1.*uLinesAlpha);c.rgb=mix(c.rgb,_v3(uLinesColor),(lk6.r)*.575*uLinesAlpha);_f v=step(.1,lines.r);_f adjustment=max(.04,(1.-noiseValueBoosted.r));c=mix(c,_v4(uLinesColor,1.),v*0.109*uLinesAlpha*adjustment);_v4 kze=khwr(tze,vUv,3,uRes);c.rgb=mix(c.rgb,_v3(uZonesEdgesColor),kze.r*uZonesEdgesAlpha);_f edges=edge(tn,vUv,uRes);_f e=edges*1.;_v4 e4=1.-_v4(_v3(e),1.);c.rgb=blmd(12,c.rgb,e4.rgb,.087*(1.-e4.a));_v4 khe=khwr(tne,vUv,uEdgesKuwa+1,uRes);_v4 kheBlend=khwr(tne,vUv,uEk1,uRes);_v4 khe10=khwr(tne,vUv,uEdgesKuwa,uRes);_v4 khe3=khwr(tne2,vUv,3,uRes);_v4 khe4=khwr(tne2,vUv,uEk2+1,uRes);_v4 khe5=khwr(tne2,vUv,uEk2+2,uRes);_v4 khe1=khwr(tne,vUv,uEk3,uRes);c.rgb=mix(c.rgb,_v3(uEdgesColor),khe10.r*.34*uEdgesAlpha1);c.rgb=mix(c.rgb,_v3(uEdgesColor),khe.r*.42*uEdgesAlpha1);_f ae=kheBlend.r*.3*uEdgesAlpha2;_f ae3=(khe3.r+khe4.r*.5+khe5.r*.1)*uEdgesAlpha1b;_f ae2=khe1.r*uEdgesAlpha;c.rgb=blmd(uEdgesBlendMode,c.rgb,uEdgesColor3,ae2);c.rgb=blmd(uEdgesBlendMode2,c.rgb,uEdgesColor2,ae);c.rgb=blmd(uEdgesBlendMode3,c.rgb,uEdgesColorB,ae3);_v4 khse14=khwr(tbe,vUv,uSe1,uRes);_v4 khse=khwr(tbe,vUv,uSe2,uRes);c.rgb=mix(c.rgb,_v3(uSpecialEdgeColor),khse.r*uSpecialEdgeAlpha);_f ase14=khse14.r*uKuwaVoroAlpha;_f ase=khse.r*uKuwaVoroAlpha;c.rgb=blmd(uKuwaVoroBlend,c.rgb,uKuwaVoroColor,ase14);c.rgb=blmd(uKuwaVoroBlend,c.rgb,uKuwaVoroColor,ase);oc0=c;_v3 grn1=gtgrn(uGrainScale);_f stns=gtstns(grn1.rg);oc0.rgb=blmd(uNoiseBlendMode,oc0.rgb,grn1,uNoiseStr);oc0.rgb=blmd(uStainsBlendMode,oc0.rgb,_v3(stns),uStainsValue);}`,Aa=`#i_ edge #i_ contrast #i_ brightness _u _s2 tN;_u _f uEB;_u _f uEC;_u _v2 uRes;in _v2 vUv;_lay0)out _v4 outColor0;_v4 tbw(_s2 tex,_v2 co){_v4 c=texture(tex,co);c=bmx(uEB)*ctmx(uEC)*c;c.rgb=brn(c.rgb,uEB);_f bw=(c.r+c.g+c.b)/3.0;return _v4(_v3(bw),c.a);}_f edge2(in _s2 tex,in _v2 co,in _v2 rs){_f dx=1.0/rs.x;_f dy=1.0/rs.y;_v4 p[9];p[0]=_ttb_-1.0*dx,-1.0*dy));p[1]=_ttb_-1.0*dx,0.0*dy));p[2]=_ttb_-1.0*dx,1.0*dy));p[3]=_ttb_0.0*dx,-1.0*dy));p[4]=_ttb_0.0*dx,0.0*dy));p[5]=_ttb_0.0*dx,1.0*dy));p[6]=_ttb_1.0*dx,-1.0*dy));p[7]=_ttb_1.0*dx,0.0*dy));p[8]=_ttb_1.0*dx,1.0*dy));_f d=(edi(p[1],p[7])+edi(p[5],p[3])+edi(p[0],p[8])+edi(p[2],p[6]))/4.;return eth(0.25,.4,clamp(3.0*d,0.0,1.0));}void main(){_f es=edge2(tN,vUv,uRes);_f e=es*1.;_v4 e4=1.-_v4(_v3(e),1.);outColor0=_v4(1.-e4.rgb,(1.-e4.a));}`;const ka=z(Br),Sa=Aa.replace(/_ttb_/g,"tbw(tex, co + _v2(");let Ma=z(Sa);class jt extends ft{constructor(t){super(),this._u={tN:{value:t},uEB:{value:1},uEC:{value:1},uRes:{value:u.resolutionNoDPR}},this.mesh=new yt(u.gl,{geometry:new At(u.gl,{width:1,height:1}),_pr:new wt(u.gl,{vertex:ka,fragment:Ma,UNF:this._u,transparent:!0})}),this.addChild(this.mesh)}render(t,e){this._u.uEB.value=t,this._u.uEC.value=e,super.render()}}const Da=z(ya);class Ea extends ft{constructor(t={}){super(1),this._d=y.composerData,this._ne=new jt(t.tn),this._ne2=new jt(t.tn),this._se=new jt(t.tb),this._ze=new jt(t.tz);const{fs:e}=this._gufd(this._d,{fs:Da});this.init({textures:t,fs:e}),this._u.tne={value:this._ne.texture},this._u.tne2={value:this._ne2.texture},this._u.tbe={value:this._se.texture},this._u.tze={value:this._ze.texture},this.fxaaPass=new wa({textures:this._renderTarget.textures})}render(){const t=this._d;this._ne.render(1,t.edgesContrast),this._ne2.render(1,t.edgesContrast2),this._se.render(1,t.specialEdgeContrast),this._ze.render(1,t.zonesEdgeContrast),this._u.uSeed.value=u.seed,super.render(),this.fxaaPass.render()}get texture(){return this.fxaaPass.texture}get tne2(){return this._ne2.texture}}var Ba=`#i_ noiseUtils #i_ snoise3d #iu_ _u _f uSeed;_u _f uSR;in vec2 vUv;_lay0)out _v4 outColor0;_vm_v2 uvScaled=vUv*_v2(uSR,1.);_f borderWidth=uWidthImpact;_f xborder=_smst(0.,borderWidth,vUv.x)-(_smst(1.-borderWidth,1.,vUv.x));_f yborder=_smst(0.,borderWidth*uSR,vUv.y)-(_smst(1.-borderWidth*uSR,1.,vUv.y));_f border=xborder*yborder;border=1.-border;vec2 curlIQNoiseVal=(iqrep(_v3(uvScaled*uVoroUvMult,(uSeed+5.)*uVoroSeedMult))*2.-1.)*((uVoroStr+border*uVoroBorderImpact)*(1.-border));outColor0=_v4(curlIQNoiseVal,0.,1.);}`;z(Ba);u.rand;class za extends ft{constructor(){super(),this._grid=new aa(!0),this._vegeLayer=new ba(this._grid.texture),this._def=new oa({tGrid:this._grid.texture,tGridLines:this._grid.textureLines,tVeges:this._vegeLayer.textures},!1),this._cp=new Ea({tp:this._def.textures[0],tl:this._def.textures[1],tb:this._def.textures[2],tn:this._def.textures[3],tz:this._def.textures[4]}),this._orders=[{r:this._grid,data:y.gridData},{r:this._vegeLayer,data:y.vegeData},{r:this._def,data:y.deformerData},{r:this._cp,data:y.composerData}]}generate(){this._grid.generate(),this._grid.seasonize(),this._vegeLayer.generate()}render(t=!1){let e=!1;for(let s of this._orders){if(!s.data){e&&s.r?.render();continue}(t||s.data.isDirty||e)&&(s.r.render(),e=!0)}return super.render(),e}get t(){return this._cp.texture}get td(){return this._def.textures[3]}get tc(){return this._cp.tne2}}function Pa(r,t){return u.rand()*(t-r)+r}class Ta{generate(){u.rand(),y.composerData.grainPerturb=Pa(50,1e3);const t=[2,2,2,3,3,4];let e=t[u.rand()*t.length>>0];y.forceWrap&&(e=2);const s=y.deformerData,i=s.cnoise;s.noiseB.wrappingValues=e,e===4?i.cNoiseUVMult=4.046:i.cNoiseUVMult=3.046;const n=[0,2,4];e===5&&n.push(6);let l=6+n[u.rand()*n.length>>0];e===2?(l-=4,l=Math.max(l,4)):e===3&&(l-=2),s.noise.tierDivider=l}}console.log("@florianzumbrunn; Hash: ",tokenData.hash);d.shift();const W=navigator.userAgent;W.match(/Android/i)||W.match(/webOS/i)||W.match(/iPhone/i)||W.match(/iPod/i)||W.match(/BlackBerry/i)||W.match(/Windows Phone/i)?u.dpr=.4:W.match(/iPad/i)&&(u.dpr=.7);Jo.start(Ir,tokenData.hash);let La=d[d.length*u.rand()>>0];y.setPalette(La.data);new ea;const G=new Fi(u.size.width,u.size.height);G.initWebGL();u.sketch=G;const pe=new za,Va=new Ta;Va.generate();G.setBgColor(y.backgroundColor);G.renderWebGL({clear:!0});document.body.appendChild(u.gl.canvas);const Fa=()=>{G.artwork=pe.t,G.setBgColor(y.backgroundColor),G.renderWebGL({options:y.postprocessData,clear:!0})};u.seed=600+u.rand()*100;pe.generate();pe.render(y.hasBGChange);setTimeout(()=>{Fa(),u.gl.canvas.style.display="block"},10);
,eA:.75,eBM:15,spECon:1,spEClr:8031361,spEA:.424,kuwVC:8088670,kuwVB:9,znECon:50,znEClr:6528048,znEA:.772,eA1b:3,eBM3:18,eA1:.913,eA2:2.945,kuwVA:.359,eKuwa:8,eBM2:18,gScl:1.666,gPert:856.59,nStr:.384},qn=16513523,Kn={ppD:On,defD:Wn,vD:Gn,compD:jn,bgCol:qn},Xn={hue:-.1,sh:-.54,hg:-.05,k1:2,k1a:0,k1b:11,k2:3,k2a:0,k2b:2,shS:.7},Yn={div:{maxDiv:13,chFill:.08}},Zn={bord:{wImp:.02},nsB:{cPMix:14599335,aPMix:1.594},vro:{vroS:1.63,vroBI:7.97,vroC1:469010,vroC1A:3.478,vroC1M:.478,vroC2:5384459,vroC2B:18,vroC2M:.058,vroC3A:4.293,vroC3:14600392,vroC3B:14,vroC3M:.12},nC:{nCA:1.557,nCC:9018158},clrs:{cF:3975290,cR:1324391,cT:.0887,cF2:13944259,cR2:14947080,cT2:.1413,cF3:14170850,cR3:2578308,cT3:.0978},rCh:{rHue:.471,rSat:.377},gCh:{gHue:.449,gSat:.529},bCh:{bHue:.286},yCh:{yHue:.482,ySat:-.254,yBri:-.05},cCh:{cHue:.623,cSat:-.362},grCh:{grHue:.917,grSat:.29,grBri:.094}},Qn={clrs:{clr1:16184048,clr2:9473678,clr3:14634316,clr4:14471879},lns:{thkA:93.479}},Jn={kw:{ls1:4,ls2:6,ze:3,ek1:1,ek2:4,ek3:1,se1:4,se2:4},lnClr:16777215,lnA:.38,eClr:16119285,eClrB:13317195,eClr2:7623174,eCon:2.174,eCon2:3,eClr3:9197656,eA:.406,eBM:15,spECon:.457,spEClr:11382965,spEA:.851,kuwVC:15392732,kuwVB:18,znECon:38.22,znEA:.743,eA1b:.75,eBM3:18,eA1:.826,eBM2:2,gScl:1.8,gPert:938.287,nStr:.275},to=15723748,eo={ppD:Xn,gD:Yn,defD:Zn,vD:Qn,compD:Jn,bgCol:to},so={sat:1.2,sh:-.85,hg:.55,k1:14,k1a:0,k1b:2,k2:2,k2a:.098,k2b:3,shS:.6,shB:.789},ro={div:{maxDiv:13,chFill:.08}},io={bord:{wImp:.046},nsB:{cPMix:9294586,aPMix:1.746},vro:{vroS:2.391,vroBI:0,vroC1:7685406,vroC1A:1.957,vroC1M:.239,vroC2:10573108,vroC2B:18,vroC2A:4.094,vroC2M:.12,vroC3A:4.855,vroC3:6834458,vroC3B:22},nC:{nCA:1.92,nCC:3292210},clrs:{cF:13459252,cR:4607072,cT:.2228,cF2:14769954,cR2:12614985,cT2:.1848},yCh:{ySat:-.435}},no={clrs:{clr1:16775927,clr2:14079677,clr3:10722450,clr4:16775416},lns:{thkA:102.17}},oo={kw:{p1:3,p1a:.145,p1b:3,p2:2,p2a:0,p2b:0,ls1:10,ls2:6,ze:4,ek1:1,ek2:3,ek3:1,se1:14,se2:3},lnClr:16777215,eClr:14015714,eClrB:85905,eClr2:5415384,eCon:9.13,eCon2:4.202,eClr3:4614012,eA:.884,eBM:23,spECon:1,spEClr:19845,spEA:.993,kuwVC:13739405,kuwVB:18,znECon:22.283,znEClr:498171,znEA:.424,eA1b:1,eBM3:23,kuwVA:.946,gScl:1.666,gPert:98,nStr:.167},ao=15262159,lo={ppD:so,gD:ro,defD:io,vD:no,compD:oo,bgCol:ao},ho={sat:1.25,k1:2,k1a:.511,k1b:3,k2:2,k2a:.663,k2b:2,shS:.7,shB:1},uo={ns:{tDiv:8},nsB:{cPMix:4684601,aPMix:.5,wVal:4},vro:{vroS:.435,vroC1:4741189,vroC2:15571481,vroC2B:9,vroC2A:.489,vroC2M:.228,vroC3A:3.75,vSC:.85,vroC3:1732043,vroC3B:17},nC:{nCA:1.1,nCC:3741515,nCB:17},cns:{cNUVM:4.046},clrs:{cF:5867693,cR:5490616,cF2:7918733,cR2:16246813,cT2:.1811,cF3:606197,cR3:1316138,cT3:.2681}},co={clrs:{clr3:16166184,clr4:16374567},lns:{thkM:100,thkA:102.17}},_o={kw:{p1:2,p1a:0,p1b:0,p2:2,p2a:0,p2b:0,ls1:15,ls2:6,ze:12,ek1:17,ek2:2,ek3:1,se1:14,se2:3},lnClr:6537106,lnA:.859,eClr:11066588,eClrB:14937591,eClr2:13334199,eCon:9.13,eCon2:1.8,eClr3:12637885,eA:.554,spECon:1,spEClr:16503718,spEA:.663,kuwVC:11628086,kuwVB:9,znECon:33.152,znEClr:2705096,znEA:.837,eA1b:1.337,eBM3:18,eA1:.913,eA2:2.315,kuwVA:.935,eKuwa:12,eBM2:18,gPert:871.074,nStr:.362},vo=4478841,po={ppD:ho,defD:uo,vD:co,compD:_o,bgCol:vo},fo=1,go={hue:-.08,sh:-.01,k1:2,k1a:.087,k1b:3,k2:4,k2a:.087,k2b:18,shS:.7},bo={bord:{wImp:.02},nsB:{cPMix:4684601,aPMix:.638},vro:{vroC1:4741189,vroC2:12482821,vroC2B:9,vroC2A:.489,vroC2M:.228,vroC3A:4.094,vroC3:1792209,vroC3B:17,vroC3M:.18},nC:{nCA:1.5,nCC:4719363,nCB:17},clrs:{cF:11194345,cR:12049394,cF2:7061428,cR2:16729119,cF3:606197,cR3:342732,cF4:14339217,cR4:16316388,cT4:.0978,cF5:789773,cR5:4938557,cT5:.067}},mo={clrs:{clr3:16166184,clr4:16374567},lns:{thkM:100,thkA:102.17}},xo={kw:{p1:2,p1a:0,p1b:0,p2:2,p2a:0,p2b:0,ls1:13,ls2:10,ze:3,ek1:2,ek2:3,ek3:3,se1:12,se2:3},lnClr:16316138,eClr:8295884,eClrB:16249571,eClr2:16477198,eCon:12.245,eCon2:2.609,eClr3:13096703,eA:.739,spECon:1,spEClr:16503718,spEA:.971,kuwVC:12481817,kuwVB:9,znECon:24.457,znEClr:2640347,znEA:.761,eA1b:1.511,eBM3:18,eA1:.88,eA2:3,kuwVA:.891,eKuwa:3,eBM2:18,gScl:.8,gPert:375.461,nStr:.536,stVal:.134},Co=16118247,wo={f:fo,ppD:go,defD:bo,vD:mo,compD:xo,bgCol:Co},yo={sat:1.1,con:1,sh:-.5,k1:4,k1a:.12,k1b:3,k2:2,k2a:0,k2b:2,shS:.7,shB:1},Ao={nsB:{aPMix:1.224,wVal:4},vro:{vroBI:4.166,vroC1:12694319,vroC1A:4.365,vroC2:3214184,vroC2B:10,vroC2A:.1,vroC2M:.1},nC:{nCC:14554132},cns:{cNUVM:4.046},clrs:{cF:15788742,cR:15724013,cT:.0561},gCh:{gSat:.377},yCh:{yHue:.957,ySat:-.232,yBri:-.058},mCh:{mHue:.49,mSat:.29,mBri:-.1},cCh:{cHue:.047,cSat:-.123,cBri:-.123},grCh:{grHue:.069,grSat:.029}},ko={clrs:{clr3:15448845,clr4:12533254}},So={kw:{p1:5,p1a:.569,p1b:17,p2:2,p2a:.351,p2b:3,ls1:13,ls2:14,ze:8,ek1:11,ek2:3,ek3:1,se1:14,se2:4},lnClr:15265266,eClr:15460576,eClrB:4749783,eCon:1,eCon2:3,spEClr:2451672,spEA:.536,kuwVC:9922400,kuwVB:18,znEClr:15601166,eA1b:.728,eA1:2.032,kuwVA:.884,gScl:.6,gPert:734.356,nStr:.29,nBM:25,stVal:.156},Mo=16118500,Do={ppD:yo,defD:Ao,vD:ko,compD:So,bgCol:Mo},Eo={sh:-1,hg:.3,k1:14,k1a:.185,k1b:3,k2:2,k2a:.054,k2b:3,shS:.6,shB:.75},Bo={div:{maxDiv:13,chFill:.08}},zo={bord:{wImp:.046},nsB:{cPMix:15892841,aPMix:1.746},vro:{vroS:2.391,vroBI:0,vroC1:7685406,vroC1B:23,vroC1A:1.957,vroC1M:.239,vroC2:6890247,vroC2B:18,vroC2A:4.583,vroC2M:.12,vroC3A:4.855,vroC3:6834458,vroC3B:22},nC:{nCA:1.92,nCC:3292210},clrs:{cF:13459252,cR:4607072,cT:.2228,cF2:14769954,cR2:12614985,cT2:.1703},yCh:{yHue:.952,ySat:-1}},Po={clrs:{clr1:16775927,clr2:14079677,clr3:8815988,clr4:16775416},lns:{thkA:102.17}},To={kw:{p1:2,p1a:.21,p1b:3,p2:2,p2a:0,p2b:0,ls1:15,ls2:14,ze:3,ek1:1,ek2:2,ek3:6,se1:14,se2:4},lnClr:16777215,eClr:15787762,eClrB:3169841,eClr2:14198098,eCon:9.13,eCon2:4.202,eClr3:4605563,eA:.884,eBM:23,spECon:.917,spEClr:5392455,spEA:.58,kuwVC:13458968,kuwVB:18,znECon:27.351,znEClr:498171,znEA:.424,eA1b:1,eBM3:23,kuwVA:.946,gScl:1.8,gPert:218.239,nStr:.19},Lo=16186622,Vo={ppD:Eo,gD:Bo,defD:zo,vD:Po,compD:To,bgCol:Lo},Fo={k1:14,k1a:0,k1b:2,k2:10,k2a:.228,k2b:3,shS:.6,shB:.72},Ro={nsB:{cPMix:5408850,aPMix:1.1,wVal:4},vro:{vroS:3.918,vroBI:0,vroC1:349681,vroC1A:1.322,vroC2M:.036,vroC3A:4.094,vSC:.8,vroC3:12261536},cns:{cNUVM:4.046}},Uo={clrs:{clr3:14211804,clr4:4941384},lns:{rotT:2,thkM:76.8}},No={kw:{p1:2,p1a:0,p1b:0,p2:2,p2a:0,p2b:0,ls1:13,ls2:6,ze:3,ek1:1,ek2:3,ek3:1,se1:14,se2:3},eClr:13754313,eClrB:14081993,spEClr:6329406,kuwVC:2896172,eA1:.304,gScl:.905,gPert:345.03,nStr:.286},Io=15723239,$o={ppD:Fo,defD:Ro,vD:Uo,compD:No,bgCol:Io},Ho={postprocessData:"ppD",saturation:"sat",hue:"hue",contrast:"con",gridData:"gD",divisions:"div",friction:"fric",maxDivisions:"maxDiv",chanceFilling:"chFill",chanceDrawLine:"chDraw",lineWidth:"lw",deformerData:"defD",borders:"bord",widthImpact:"wImp",noise:"ns",tierDivider:"tDiv",noiseB:"nsB",colorPerturbMix:"cPMix",alphaPerturbMix:"aPMix",wrappingValues:"wVal",voro:"vro",voroStr:"vroS",voroBorderImpact:"vroBI",voroColor1:"vroC1",voroColor1Blend:"vroC1B",voroColor1Alpha:"vroC1A",voroColor1Mix:"vroC1M",voroColor2:"vroC2",voroColor2Blend:"vroC2B",voroColor2Alpha:"vroC2A",voroColor2Mix:"vroC2M",voroColor3:"vroC3",voroColor3Blend:"vroC3B",voroColor3Alpha:"vroC3A",voroColor3Mix:"vroC3M",voroUvMult:"vroUVM",voroSeedMult:"vroSM",voroMix2:"vroM2",noiseColor:"nC",noiseColorAlpha:"nCA",noiseColorColor:"nCC",noiseColorBlend:"nCB",cnoise:"cns",cNoiseUVMult:"cNUVM",cNoiseUVMultX:"cNUVMX",cNoiseMix:"cNMix",cNoiseAbs:"cNAbs",flow:"flw",noiseMaths:"nMths",noiseMaths2:"nMths2",noiseMax:"nMax",noiseMax2:"nMax2",colorImpact:"cImp",saturationImpact:"satImp",vegeData:"vD",colors:"clrs",color1:"clr1",color2:"clr2",color3:"clr3",color4:"clr4",lines:"lns",lengthM:"lenM",rotationType:"rotT",thicknessM:"thkM",thicknessA:"thkA",composerData:"compD",linesColor:"lnClr",linesAlpha:"lnA",edgesColor:"eClr",edgesColorB:"eClrB",edgesColor2:"eClr2",edgesContrast:"eCon",edgesContrast2:"eCon2",edgesColor3:"eClr3",edgesAlpha:"eA",edgesBlendMode:"eBM",specialEdgeContrast:"spECon",specialEdgeColor:"spEClr",specialEdgeAlpha:"spEA",kuwaVoroColor:"kuwVC",kuwaVoroBlend:"kuwVB",voroEdgesBlend:"vrEB",voroEdgesColor:"vrEC",voroEdgesAlpha:"vrEA",zonesEdgeContrast:"znECon",zonesEdgesColor:"znEClr",zonesEdgesAlpha:"znEA",edgesAlpha1b:"eA1b",edgesBlendMode3:"eBM3",edgesAlpha1:"eA1",edgesAlpha2:"eA2",kuwaVoroAlpha:"kuwVA",edgesKuwa:"eKuwa",edgesBlendMode2:"eBM2",backgroundColor:"bgCol",shadows:"sh",highlights:"hg",colorFrom:"cF",colorReplace:"cR",colorThreshold:"cT",colorFrom2:"cF2",colorReplace2:"cR2",colorThreshold2:"cT2",colorFrom3:"cF3",colorReplace3:"cR3",colorThreshold3:"cT3",colorFrom4:"cF4",colorReplace4:"cR4",colorThreshold4:"cT4",colorFrom5:"cF5",colorReplace5:"cR5",colorThreshold5:"cT5",redChannel:"rCh",redHue:"rHue",redSaturation:"rSat",redBrightness:"rBri",redThreshold:"rTh",greenChannel:"gCh",greenHue:"gHue",greenSaturation:"gSat",greenBrightness:"gBri",greenThreshold:"gTh",blueChannel:"bCh",blueHue:"bHue",blueSaturation:"bSat",blueBrightness:"bBri",blueThreshold:"bTh",yellowChannel:"yCh",yellowHue:"yHue",yellowSaturation:"ySat",yellowBrightness:"yBri",yellowThreshold:"yTh",magentaChannel:"mCh",magentaHue:"mHue",magentaSaturation:"mSat",magentaBrightness:"mBri",magentaThreshold:"mTh",cyanChannel:"cCh",cyanHue:"cHue",cyanSaturation:"cSat",cyanBrightness:"cBri",cyanThreshold:"cTh",grayChannel:"grCh",grayHue:"grHue",graySaturation:"grSat",grayBrightness:"grBri",grayThreshold:"grTh",grainScale:"gScl",grainPerturb:"gPert",noiseStr:"nStr",noiseBlendMode:"nBM",stainsValue:"stVal",stainsBlendMode:"stBM",sharpenSize:"shS",sharpenBlur:"shB",voroStrColor:"vSC"};function kr(r,t){const e={};for(const s in r){const i=Object.keys(t).find(n=>t[n]===s)||s;typeof r[s]=="object"&&r[s]!==null?e[i]=kr(r[s],t):e[i]=r[s]}return e}function D(r){return kr(r,Ho)}const d=[];d.push({value:d.length,data:{}});d.push({value:d.length,data:D(fn)});d.push({value:d.length,data:D(wo)});d.push({value:d.length,data:D(po)});d.push({value:d.length,data:D(Hn)});d.push({value:d.length,data:D(Kn)});d.push({value:d.length,data:D(Xi)});d.push({value:d.length,data:D(Vn)});d.push({value:d.length,data:D(yn)});d.push({value:d.length,data:D(en)});d.push({value:d.length,data:D(hn)});d.push({value:d.length,data:D(lo)});d.push({value:d.length,data:D(Bn)});d.push({value:d.length,data:D(eo)});d.push({value:d.length,data:D(Do)});d.push({value:d.length,data:D(Vo)});d.push({value:d.length,data:D($o)});class Oo extends x{constructor(){super(),this.ap("palette",0)}get current(){return d[this.params.palette.value].data}}class Wo{constructor(){this.och=new R,this.cbs={w:"hsl( 65, 50%, 50% )",sp:"hsl( 130, 50%, 50% )",su:"hsl( 195, 50%, 50% )",a:"hsl( 260, 50%, 50% )"},this.backgroundColor=15065039,this.postprocessData=new Ri,this._dataLayers=[],this.gridData=new Ni,this.gridData.och.add(this._dispatch),this._dataLayers.push(this.gridData),this.deformerData=new Ui,this.deformerData.och.add(this._dispatch),this._dataLayers.push(this.deformerData),this.vegeData=new Ii,this.vegeData.och.add(this._dispatch),this._dataLayers.push(this.vegeData),this.composerData=new Hi,this.composerData.och.add(this._dispatch),this._dataLayers.push(this.composerData),this.paletteData=new Oo}setPalette(t){this.gridData.applyPalette(t),this.vegeData.applyPalette(t),this.deformerData.applyPalette(t),this.composerData.applyPalette(t),this.postprocessData.applyPalette(t),t.backgroundColor!==void 0?this.backgroundColor=t.backgroundColor:this.backgroundColor=15065039,this.hasBGChange=!0}_dispatch=()=>{this.och.dispatch()}}const y=new Wo,Sr=new R;window.addEventListener("keydown",r=>{Sr.dispatch(r.key)});const Go={onDown:Sr};function _r(r){return`${global.id}-${r}`}function jo(r,t){const e=JSON.parse(localStorage.getItem(_r(r)))||[];e.includes(t)||(e.push(t),localStorage.setItem(_r(r),JSON.stringify(e)))}let ht=null;const Mr=new R,de=new R,Jt=new R;function Dr(){return tokenData.hash}function qo(r,t=null){ht=r,ht.init(t),ht.createPrerand()}function Ko(r=!0){ht.reset(),r&&(Mr.dispatch(),Jt.dispatch())}function Xo(r){ht.setHash(r),de.dispatch(),Jt.dispatch()}function Yo(){ht.generateNewHash(),de.dispatch(),Jt.dispatch()}function Zo(r){Go.onDown.add(t=>{switch(t){case"S":jo(r,Dr());break}})}const at={load:qo,reset:Ko,setHash:Xo,generateNewHash:Yo,getHash:Dr,activateKeyboard:Zo,onReset:Mr,ochHash:de,onResetOrChangeHash:Jt};class Qo{constructor(){this.ochHash=at.ochHash}start(t,e=null){console.log("Engine: start"),at.load(t,e)}resetHash(t=!0){at.reset(t)}generateNewHash(){at.generateNewHash()}setHash(t){at.setHash(t)}get hash(){return at.getHash()}}const Jo=new Qo;let I=null,Gt=null;function ta(r,{prefix:t="",postfix:e=""}={}){I||(I=document.createElement("canvas"),Gt=I.getContext("2d")),I.width=r.height,I.height=r.width,Gt.translate(I.width/2,I.height/2),Gt.rotate(Math.PI/2),Gt.drawImage(r,-r.width/2,-r.height/2);const s=document.createElement("a");s.setAttribute("download",(t?t+"_":"")+u.id+"-"+tokenData.hash+(e?"_"+e:"")+".jpg"),s.setAttribute("href",I.toDataURL("image/jpg",1)),s.click()}class ea{constructor(){this._isExporting=!1,this._hasToExportData=!1,this._countToExport=100,this.onCompleteExport=new R,this._init()}_init(){window.addEventListener("keydown",t=>{t.key==="s"&&ta(u.gl.canvas)})}}var Er="in vec2 vUv;_lay0)out vec4 outColor0;_vmoutColor0=vec4(vUv,0.,1.);}",Br="in vec2 uv;in vec3 position;out vec2 vUv;_vmvUv=uv;gl_Position=vec4(position*2.,1.0);}";const sa=z(Br);function ra({UNF:r={},vertex:t=sa,fragment:e=Er}={}){return new yt(u.gl,{geometry:new At(u.gl,{width:1,height:1}),_pr:new wt(u.gl,{vertex:t,fragment:e,UNF:r,transparent:!0})})}class ft extends Zt{constructor(t=1,e={}){super();const{width:s,height:i}=u.size;this._width=s,this._height=i,this._camera=new gr(this._gl,{fov:50,near:.1,far:1e3,aspect:s/i}),this._camera.position.set(0,0,5),this._camera.lookAt([0,0,0]),this._renderTarget=this._createRT(t,e),this._uinj=[],this._u={}}init({UNF:t=this._u,textures:e={},fs:s=Er}={}){Object.entries(e).forEach(([i,n])=>{n!==null&&(t[i]={value:n})}),this._u=Object.assign({uSeed:{value:0},uRes:{value:u.resolutionNoDPR},uSR:{value:u.size.width/u.size.height}},t),this.mesh=ra({UNF:this._u,fragment:s}),this.addChild(this.mesh)}_createRT(t,e){const s={width:this._width,height:this._height,minFilter:u.gl.LINEAR,magFilter:u.gl.NEAREST,wrapS:u.gl.CLAMP_TO_EDGE,wrapT:u.gl.CLAMP_TO_EDGE,color:t},i=Object.assign({},s,e);return new se(u.gl,i)}render(t=-1,e=1,s=!0){this._u&&this._uiu(this._u),this._render(this,this._renderTarget,s)}_setClear(t=-1,e=1){t>=0&&(t=t instanceof $?t:new $(t),u.gl.clearColor(t.r,t.g,t.b,e))}_render(t,e,s=!0){u.renderer.render({scene:t,camera:this._camera,target:e,clear:s})}_gufd(t,{vs:e=null,fs:s=null,UNFToFeed:i=this._u}={}){let n="";n=this._gufp(i,t.params,n);for(let a in t.dataLayers){let l=t.dataLayers[a];n=this._gufp(i,l.params,n)}return s=s.replace("#iu_",n),{vs:e,fs:s}}_gufp(t,e,s){for(let i in e){let n=e[i];if(n.isUniform){let a="u"+i.charAt(0).toUpperCase()+i.slice(1),l="float";typeof n.value=="boolean"&&(l="bool");let h=n.value;n.type==="color"?(h=new $(h),l="vec3"):typeof h=="object"&&("min"in h||"max"in h)?(h=new L(h.min,h.max),l="vec2"):n.type==="int"&&(l="int"),t[a]={value:h},s+=`uniform ${l} ${a}; `,this._uinj.push({name:a,type:l,from:e,nameParam:i})}}return s}_uiu(t){for(let e of this._uinj){const s=e.from[e.nameParam].value,i=e.type;i==="vec3"?t[e.name].value.set(new $(s)):i==="vec2"?t[e.name].value.set(s.min,s.max):t[e.name].value=s}}get texture(){return this._renderTarget.texture}get textures(){return this._renderTarget.textures}get camera(){return this._camera}}var ia=`#i_ noiseUtils #i_ snoise3d #i_ pnoise2d #i_ blendmodes #i_ hsl2rgb #i_ rgb2hsl #i_ hueShift #i_ brightness #i_ saturation #iu_ _f s3mod(_v3 v,_f nb){ #i_ snoise3dpart if(uNoiseMax2==true){p0=max(p0,_v3(0.));p1=max(p1,_v3(0.));p2=max(p2,_v3(0.));p3=max(p3,_v3(0.));}_v4 norm=tisq(_v4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;_f m0=floor(abs(dot(x0,x0))*uSubdiv)/uSubdiv;_f m1=floor(abs(dot(x1,x1))*uSubdiv)/uSubdiv;_f m2=floor(abs(dot(x2,x2))*uSubdiv)/uSubdiv;_f m3=floor(abs(dot(x3,x3))*uSubdiv)/uSubdiv;if(uSubdiv==0.){m0=dot(x0,x0);m1=dot(x1,x1);m2=dot(x2,x2);m3=dot(x3,x3);}_v4 m=_v4(0.);if(uNoiseMax==true){m=max(nb-_v4(m0,m1,m2,m3),0.);}else{m=nb-_v4(m0,m1,m2,m3);};m=cos(m);_f noise=42.*dot(m*m,_v4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));return noise;}_v3 s3v3m(_v3 x,_f nb){_f s=s3mod(_v3(x),nb);_f s1=s3mod(_v3(x.y-9.07,x.z+31.2,x.x+23.12),nb);_f s2=s3mod(_v3(x.z+74.2,x.x-130.2,x.y+99.4),nb);_v3 c=_v3(s,s1,s2);return c;}_v3 crlNMod(_v3 p,_f nb){const _f e=.1;_v3 dx=_v3(e,0.0,0.0);_v3 dy=_v3(0.0,e,0.0);_v3 dz=_v3(0.0,0.0,e);_v3 p_x0=s3v3m(p-dx,nb);_v3 p_x1=s3v3m(p+dx,nb);_v3 p_y0=s3v3m(p-dy,nb);_v3 p_y1=s3v3m(p+dy,nb);_v3 p_z0=s3v3m(p-dz,nb);_v3 p_z1=s3v3m(p+dz,nb);_f x=p_y1.z-p_y0.z-p_z1.y+p_z0.y;_f y=p_z1.x-p_z0.x-p_x1.z+p_x0.z;_f z=p_x1.y-p_x0.y-p_y1.x+p_y0.x;const _f divisor=1.0/(2.0*e);return normalize(_v3(x,y,z)*divisor);}_u _s2 tGridLines;_u _s2 tVeges[1];_u _f uSeed;_u _f uSR;_u _v2 uRes;in _v2 vUv;_v4 rgbfch(_v3 o,_v3 ch,_v3 hsl,_f th){_v4 color=_v4(o,0.);_v3 c1=o;_v3 c2=ch;if(distance(c1,c2)<=th){color.rgb=hueshift2(color.rgb,hsl.x);color.rgb=saturation2(color.rgb,hsl.y);color.rgb=brn(color.rgb,hsl.z);color.a=1.;}return color;}_lay0)out _v4 ocl0;_lay1)out _v4 ocl1;_lay2)out _v4 ocl2;_lay3)out _v4 ocl3;_lay4)out _v4 ocl4;_vm_v2 uvM=_v2(vUv.x,vUv.y);_v2 uvM2=uvM;_v2 uvScaled=uvM2*_v2(uSR,1.);_v2 vb=_v2(25./uRes.x)*_v2(uSR,1.);_f xb2=_smst(0.,vb.x,vUv.x)-(_smst(1.-vb.x,1.,vUv.x));_f yb2=_smst(0.,vb.y*uSR,vUv.y)-(_smst(1.-vb.y*uSR,1.,vUv.y));_f bdr2=1.-xb2*yb2;_f bdw=uWidthImpact;_f xb=_smst(0.,bdw,vUv.x)-(_smst(1.-bdw,1.,vUv.x));_f yb=_smst(0.,bdw*uSR,vUv.y)-(_smst(1.-bdw*uSR,1.,vUv.y));_f bdr=xb*yb;bdr*=1.-bdr2;bdr=1.-bdr;_f bordersImpact=bdr;_f ombdr=1.-bdr;_v2 viq=(iqrep(_v3(uvScaled*uVoroUvMult,(uSeed+5.)*uVoroSeedMult))*2.-1.);_f vbi=uVoroBorderImpact;_v2 crliqVal=viq*((uVoroStr+(bdr)*vbi)*ombdr);_v2 crliqvc=viq*((uVoroStrColor+(bdr)*vbi)*ombdr);_f voroValue2=(crliqvc.x+crliqvc.y)/2.;_f iqVal=(abs(snoise3d(vec3(uvScaled*uVoroUvMult,(uSeed+5.))))*2.-1.)*.1*uVoroStrColor*(1.-bdr);iqVal+=(iq(uvScaled*uVoroUvMult,1.1,.7,(uSeed+5.)*uVoroSeedMult)*2.-1.)*.05*uVoroStrColor*(1.-bdr);_f seed=uSeed;_v2 vcn=uvScaled*uCNoiseUVMult*_v2(uCNoiseUVMultX,1.)+(uSeed)*uCNoiseSeedMult;_f cnv1=cnoise(vcn);_f cnv2=cnoise(vcn+_v2(5.2,1.3));_f cnv=cnoise(_v2(cnv1,cnv2))*uCNoiseStr;if(uCNoiseAbs){cnv=abs(cnv);}_v2 ucr=uvScaled;ucr.x*=uCurlUVXMult;_v3 curlP=curlNoise(_v3(uvScaled*uCurlUVMult+uSeed*uCurlSeedMult,0.));_f nsb=uNoiseBase;_v2 uvcrl=ucr*uCurlUVMult;_v3 curl=_v3(0.);curl=crlNMod(_v3(uvcrl+seed*uCurlSeedMult,0.),nsb);_v3 curl2=crlNMod(_v3(uvcrl*_v2(1.,1.)+(seed+10.)*uCurlSeedMult,0.),nsb);ucr+=curlP.xy*uVoroMix2;_v3 curl3=crlNMod(_v3(ucr*uCurlUVMult*_v2(1.,1.)+(seed+20.)*uCurlSeedMult,0.),nsb);_v2 wuv=uvScaled;wuv=mix(wuv,crliqVal,uVoroMix);_v2 originWrapUV=wuv;_v3 vcl1=curl;_v3 vcl2=uWrappingValues>1 ? curl2 : curl;_v3 vcl3=uWrappingValues>2 ? curl3 : curl;_v3 vcl4=uWrappingValues>3 ? curlP : curl;_v3 vcl5=(curl2+curl3)/2.;_f tierDivider=uTierDivider;_f tier=1./tierDivider;_f wuvt=uWrapUVStr*tier;if(uUseWrapUV){wuv-=cnv*uCNoiseMix;wuv+=max(0.,vcl1.r)*max(vcl1.g,vcl1.b)*wuvt;wuv-=max(cnv,vcl1.g)*max(vcl1.r,vcl1.b)*wuvt;wuv-=max(cnv,vcl1.b)*max(vcl1.g,vcl1.r)*wuvt;wuv+=max(0.,vcl2.r)*max(vcl3.g,vcl1.b)*wuvt;wuv-=max(cnv,vcl3.g)*max(vcl3.r,vcl2.b)*wuvt;wuv+=max(0.,vcl2.b)*max(vcl2.g,vcl1.r)*wuvt;if(uWrappingValues>3){wuv+=max(0.,vcl4.r)*max(vcl4.g,vcl4.b)*wuvt;wuv-=max(0.,vcl4.g)*max(vcl3.b,vcl5.r)*wuvt;wuv-=max(0.,vcl4.b)*max(vcl4.b,vcl4.r)*wuvt;wuv-=max(0.,vcl2.g)*max(vcl4.g,vcl4.r)*wuvt;}if(uWrappingValues>4){wuv-=max(0.,vcl5.r)*max(vcl5.g,vcl5.b)*wuvt;wuv-=max(0.,vcl5.g)*max(vcl3.b,vcl5.r)*wuvt;wuv-=max(0.,vcl2.g)*max(vcl5.b,vcl4.r)*wuvt;wuv-=max(0.,vcl5.b)*max(vcl3.g,vcl5.r)*wuvt;wuv-=max(0.,vcl3.g)*max(vcl2.b,vcl5.g)*wuvt;}}_v2 wuvsave2=wuv;_v2 wuvsave=mod(wuv,1.);wuv=wuvsave2;wuv=mod(wuv,1.);wuvsave=wuv;_v2 stepped=step(_v2(.4),wuvsave);_f bw=(stepped.x+stepped.y)/2.;_f steppedBW=step(.5,bw);ocl2=_v4(_v3(steppedBW),1.);_f vuvuv=(wuvsave2.x+wuvsave2.y)/2.;ocl4=_v4(vuvuv);ocl4.a=1.;wuvsave=wuv;_f lpb=curlNoise(_v3(uvScaled*(uLinesPerturbUV)-.5*uLinesPerturbSeedMult,uLinesPerturbZ)).r;_f lpb2=curlNoise(_v3(uvScaled*(uLinesPerturbUV)-.5+10.*uLinesPerturbSeedMult,uLinesPerturbZ)).r;_v2 uvlpb=mix(originWrapUV,wuv,uWrapUVMix);uvlpb.x+=lpb*uLinesPerturbStr;uvlpb.y+=lpb2*uLinesPerturbStr;uvlpb=mix(uvM,uvlpb,(1.-bordersImpact));_v2 uv=uvM;uv=uvlpb;_v4 gridLines=_t(tGridLines,uvlpb);gridLines.r=step(.1,gridLines.r);_v4 vege0=_t(tVeges[0],uv);_v4 clr=vege0;clr.rgb=mix(clr.rgb,_v3(clr.rgb)*uColorPerturbMix,step(.25,((curl.x+curl.y+curl.z)/3.)*wuv.x)*uAlphaPerturbMix);_v4 noiseb=_v4(wuv,0.,1.);_f f=uThresholdSoft/2.0;_f a=uThreshold-f;_f b=uThreshold+f;_f l=(noiseb.x+noiseb.y+noiseb.z)/3.0;_f v=_smst(a,b,l);_f rci=(clr.r+clr.g+clr.b)/3.;_v3 hsl=rgb2hsl(clr.rgb);hsl.y+=.4;hsl.z-=.035;_v3 cb=hsl2rgb(hsl);const _v3 W=_v3(0.2125,0.7154,0.0721);_v3 _iensity=_v3(dot(clr.rgb,W));_v3 changed=mix(_iensity,clr.rgb,uSaturationImpact);cb.rgb=mix(_iensity,cb.rgb,1.05);clr.rgb=mix(clr.rgb,cb,steppedBW);changed=mix(_iensity,clr.rgb,uSaturationImpact);clr.rgb=mix(clr.rgb,changed,(1.-v)*rci);changed=mix(_iensity,clr.rgb,uSaturationImpact);clr.rgb=mix(clr.rgb,changed,1.-steppedBW);ocl0=clr;ocl1=_t(tGridLines,uvlpb);ocl3=noiseb;_v3 iNoise=_v3(1.-noiseb.rgb);_f nsv=(iNoise.r+iNoise.g)/2.;_v3 rgbbw=_v3((clr.r+clr.g+clr.b)/3.);_v3 cc=mix(clr.rgb,rgbbw*uNoiseColorColor,1.-nsv);ocl0.rgb=mix(clr.rgb,blmd(uNoiseColorBlend,clr.rgb,cc.rgb,uNoiseColorAlpha),(1.-nsv));ocl0.rgb=mix(ocl0.rgb,blmd(uVoroColor1Blend,ocl0.rgb,uVoroColor1,uVoroColor1Alpha*iqVal*(1.-nsv)),iqVal*uVoroColor1Mix*(1.-nsv));ocl0.rgb=mix(ocl0.rgb,blmd(uVoroColor2Blend,ocl0.rgb,uVoroColor2,uVoroColor2Alpha*voroValue2*nsv),voroValue2*uVoroColor2Mix*nsv);ocl0.rgb=mix(ocl0.rgb,blmd(uVoroColor3Blend,ocl0.rgb,uVoroColor3,uVoroColor3Alpha*(1.-iqVal)*(nsv)),(1.-iqVal)*uVoroColor3Mix*(nsv));_v3 crgb=rgbfch(ocl0.rgb,_v3(1.,0.,0.),_v3(uRedHue,uRedSaturation,uRedBrightness),uRedThreshold).rgb;crgb=rgbfch(crgb,_v3(0.,1.,0.),_v3(uGreenHue,uGreenSaturation,uGreenBrightness),uGreenThreshold).rgb;crgb=rgbfch(crgb,_v3(0.,0.,1.),_v3(uBlueHue,uBlueSaturation,uBlueBrightness),uBlueThreshold).rgb;crgb=rgbfch(crgb,_v3(1.,1.,0.),_v3(uYellowHue,uYellowSaturation,uYellowBrightness),uYellowThreshold).rgb;crgb=rgbfch(crgb,_v3(255.,128.,255.)/255.,_v3(uMagentaHue,uMagentaSaturation,uMagentaBrightness),uMagentaThreshold).rgb;crgb=rgbfch(crgb,_v3(0.,1.,1.),_v3(uCyanHue,uCyanSaturation,uCyanBrightness),uCyanThreshold).rgb;crgb=rgbfch(crgb,_v3(.5,.5,.5),_v3(uGrayHue,uGraySaturation,uGrayBrightness),uGrayThreshold).rgb;ocl0.rgb=crgb;_v3 px=ocl0.rgb;_v3 eps=_v3(uColorThreshold);_ia_px,uColorFrom-eps)_al_px,uColorFrom+eps))){ocl0.rgb=uColorReplace;}eps=_v3(uColorThreshold2);_ia_px,uColorFrom2-eps)_al_px,uColorFrom2+eps))){ocl0.rgb=uColorReplace2;}eps=_v3(uColorThreshold3);_ia_px,uColorFrom3-eps)_al_px,uColorFrom3+eps))){ocl0.rgb=uColorReplace3;}eps=_v3(uColorThreshold4);_ia_px,uColorFrom4-eps)_al_px,uColorFrom4+eps))){ocl0.rgb=uColorReplace4;}eps=_v3(uColorThreshold5);_ia_px,uColorFrom5-eps)_al_px,uColorFrom5+eps))){ocl0.rgb=uColorReplace5;}}`;let re=ia.replace(/_ia_/g,"if( all( _gte(");re=re.replace(/_al_/g," ) && all( _lte(");const na=z(re);class oa extends ft{constructor(t={}){super(5),this._data=y.deformerData;const{fs:e}=this._gufd(y.deformerData,{fs:na});this.init({textures:t,fs:e})}prepare(t){this._u.tGrid.value=t}render(){this._u.uSeed.value=u.seed>>0,super.render()}get texture(){return this.fxaaPass?this.fxaaPass.texture:super.texture}get textures(){return this.fxaaPass?this.fxaaPass.textures:super.textures}}class vr{constructor({width:t=u.size.width,height:e=u.size.height}={}){this._width=t,this._height=e,this._initEngine()}_initEngine(){this.canvas=document.createElement("canvas"),this.canvas.width=this
n+=.5;_f l=dot(n,normalize(uLp));at.rgb+=l*uLs*.5;fc=at;}`,zi="in vec2 position;in vec2 uv;out vec2 vUv;_vmgl_Position=vec4(position,0.,1.);vUv=uv;}";const qt=[];function oe(){u.screen.width=window.innerWidth,u.screen.height=window.innerHeight;for(const r of qt)r()}window.addEventListener("resize",oe,!1);window.addEventListener("orientationchange",oe,!1);oe();const Pi={add:r=>{qt.push(r)},remove:r=>{const t=qt.indexOf(r);t!==-1&&qt.splice(t,1)}};function Ti(r,t="center"){r.style.boxShadow="0 0 10px rgba(0,0,0,0.5)",r.style.position="absolute";function e(){let{width:s,height:i}=u.screen;if(s>i){r.style.transform="rotate(90deg) translateZ(0)";let n=u.size.height,a=u.size.width,l=n,h=a;if(u.screen.height<a){let c=l/h;h=i,l=i*c,l>s&&(c=h/l,l=s,h=s*c)}else{let c=h/l;l=s,h=s*c,h>i&&(c=l/h,h=i,l=i*c)}l=Math.min(l,n),h=Math.min(h,a),r.style.width=h+"px",r.style.height=l+"px"}else{r.style.transform="translateZ(0)";let n=r.width,a=r.height;if(u.screen.height<r.height){let l=n/a;a=i,n=i*l,n>s&&(l=a/n,n=s,a=s*l)}else{let l=a/n;n=s,a=s*l,a>i&&(l=n/a,a=i,n=i*l)}r.style.height=a+"px",r.style.width=n+"px"}}Pi.add(e),e()}const Li=z(Bi),Vi=z(zi);class Fi{constructor(t,e){this.width=t,this.height=e,this.op={brightness:0,contrast:1,saturation:1,saturationR:1,saturationG:1,saturationB:1,highlights:0,shadows:0,hue:0,sharpenBlur:0,sharpenSize:1,normalStr:10,lightPosX:-.3,lightPosY:.8,lightStr:.1,k1:14,k1a:.8,k1b:2,k2:2,k2a:.8,k2b:2},this.setBgColor(16777215),this.setClearAlpha(1),this.ha=!1,this._isFirstRender=!0}initWebGL(){this._initEngine(),this._scene=new Zt(this._gl),this._camera=new gr(this._gl,{fov:45,near:.1,far:1e3,aspect:this.width/this.height}),this._camera.position.set(0,0,5),this._camera.lookAt([0,0,0]),u.resolution=new L(u.size.width*u.dpr,u.size.height*u.dpr),u.resolutionNoDPR=new L(u.size.width,u.size.height),this._initArtwork(),this._pc=new hi(this._gl,{width:this.width,height:this.height,dpr:u.dpr||1}),this._renderPass=this._pc.addPass({fragment:Li,vertex:Vi,UNF:this._u})}_initArtwork(){this._u={uArtworkSize:{value:u.resolution},uBgColor:{value:new $},tArtwork:{value:new Qt(u.gl,{image:new Uint8Array([191,25,54,255,96,18,54,255,96,18,54,255,37,13,53,255]),width:2,height:2,magFilter:u.gl.NEAREST})},uBrt:{value:1},uCst:{value:1},uStr:{value:1},uHlgt:{value:1},uSh:{value:1},uHa:{value:0},uShb:{value:0},uShs:{value:1},uNs:{value:10},uLp:{value:new L(-.3,.8)},uLs:{value:.1},uRA:{value:0},uK1:{value:14},uK1a:{value:.8},uK1b:{value:2},uK2:{value:2},uK2a:{value:.8},uK2b:{value:2}}}_initEngine(){this._renderer=new Yr({width:this.width,height:this.height,dpr:u.dpr||1,antialias:!0,preserveDrawingBuffer:!0}),this._gl=this._renderer.gl,u.gl=this._gl,this._gl.canvas.style.zIndex=1e3,this._gl.canvas.style.display="none",this._gl.canvas.style.transform="translateZ(0)",this._gl.autoClear=!1,Ti(this._gl.canvas),u.renderer=this._renderer}clear(){this._gl.clearColor(this._bgColor.r,this._bgColor.g,this._bgColor.b,this._clearAlpha)}renderWebGL=({useCanvasArtwork:t=!0,options:e=this.op,skipComposer:s=!1,clear:i=!0,scene:n=null}={})=>{i&&this._gl.clearColor(this._bgColor.r,this._bgColor.g,this._bgColor.b,this._clearAlpha),this._u.uBgColor.value=this._bgColor,this._u.uBrt.value=e.brightness,this._u.uCst.value=e.contrast,this._u.uStr.value=e.saturation,this._u.uHlgt.value=e.highlights,this._u.uSh.value=e.shadows,this._u.uHa.value=e.hue,this._u.uShb.value=Math.max(.2,e.sharpenBlur),this._u.uShs.value=e.sharpenSize,this._u.uNs.value=e.normalStr-3.5,this._u.uLp.value.x=e.lightPosX,this._u.uLp.value.y=e.lightPosY,this._u.uLs.value=e.lightStr,this._u.uRA.value=this.ha?1:0,this._u.uK1.value=e.k1,this._u.uK1a.value=e.k1a,this._u.uK1b.value=e.k1b,this._u.uK2.value=e.k2,this._u.uK2a.value=e.k2a,this._u.uK2b.value=e.k2b,s?this._renderer.render({scene:n||this._scene,camera:this._camera}):(this._renderPass.enabled=!0,this._pc.targetOnly=!1,this._pc.render({scene:this._scene})),this._isFirstRender&&(this._isFirstRender=!1)};_serializePostprocess(){const t={};for(const e in this.op)t[e]=this.op[e];return t}saveDataToFile(t,e){const s=document.createElement("a"),i=new Blob([JSON.stringify(t)],{type:"text/plain"});s.href=URL.createObjectURL(i),s.download=`${e}-${Date.now()}.json`,s.click()}setBgColor(t){t instanceof $||(this._bgColor instanceof $?this._bgColor.set(t):this._bgColor=new $(t))}setClearAlpha(t){this._clearAlpha=t}get artwork(){return this._u.tArtwork.value}set artwork(t){this.ha=!0,this._u.tArtwork.value=t}get scene(){return this._scene}get renderer(){return this._renderer}get camera(){return this._camera}}class Ri{constructor(){this.reset(),this.och=new R}reset(){this.brightness=0,this.contrast=.98,this.saturation=1.3,this.highlights=.33,this.shadows=-.13,this.hue=0,this.sharpenBlur=1,this.sharpenSize=.8,this.normalStr=3,this.lightPosX=.75,this.lightPosY=-.57,this.lightStr=.3,this.mirrorVerticalActivated=!1,this.mirrorHorizontalActivated=!1,this.k1=14,this.k1a=.8,this.k1b=2,this.k2=2,this.k2a=.8,this.k2b=2}setParams(t){if(!t){this.reset();return}for(const e in t)this[e]=t[e]}applyPalette(t){const e=t.postprocessData,s=(i,n)=>i!==void 0?i:n;this.contrast=s(e.contrast,.98),this.saturation=s(e.saturation,1.3),this.highlights=s(e.highlights,.33),this.shadows=s(e.shadows,-.13),this.hue=s(e.hue,0),this.k1=s(e.k1,14),this.k1a=s(e.k1a,0),this.k1b=s(e.k1b,2),this.k2=s(e.k2,3),this.k2a=s(e.k2a,0),this.k2b=s(e.k2b,2),this.sharpenBlur=s(e.sharpenBlur,1),this.sharpenSize=s(e.sharpenSize,.8)}}class x{constructor(t=null,e=null){this._params={},this._dataLayers={},this.canDispatch=!0,this._isDirty=!1,this.och=e||new R}reset(){for(let t in this._params)this[t]=this._params[t].value}setParams(t){for(let e in t){const s=this._params[e];if(s)s.isLocked||(this[e]=s.setMethod?s.setMethod(t[e]):t[e]);else{const i=this._dataLayers[e];i&&i.setParams(t[e])}}}ap(t,e,{serializeMethod:s=null,setMethod:i=null,och:n=null,isUniform:a=!1,type:l=null,isLocked:h=!1}={}){this._params[t]={value:e,defaultValue:e,serializeMethod:s,setMethod:i,isUniform:a,type:l,isLocked:h},Object.defineProperty(this,t,{get:function(){return this._params[t].value},set:function(c){c!==this._params[t].value&&(this._params[t].value=c,this._isDirty=!0,this.och.dispatch(),n&&this.canDispatch&&n(c))}})}resetParam(t){this[t]=this._params[t].defaultValue}adl(t,e){this._dataLayers[t]=e,Object.defineProperty(this,t,{get:function(){return this._dataLayers[t]}})}_dispatch=()=>{this._isDirty=!0,this.och.dispatch()};get dataLayers(){return this._dataLayers}get params(){return this._params}get isDirty(){}}const o={ou:{isUniform:!0},oui:{isUniform:!0,type:"int"},ouc:{isUniform:!0,type:"color"}},F="noise",Tt=F+"B",T=F+"Color",Q="cNoise",kt="color",gt=kt+"Impact",M=kt+"s",ke="borders",Se="noise",Me="colorPerturbMix",De="alphaPerturbMix",w="voro",ae=w+"Color",le="Blend",he="Alpha",ue="Mix",mt=ae+"1",Ee=mt+le,Be=mt+he,ze=mt+ue,xt=ae+"2",Pe=xt+le,Te=xt+he,Le=xt+ue,Ct=ae+"3",Ve=Ct+le,Fe=Ct+he,Re=Ct+ue,ut=kt+"From",ct=kt+"Replace",_t=kt+"Threshold",Ue=ut+"2",Ne=ct+"2",Ie=_t+"2",$e=ut+"3",He=ct+"3",Oe=_t+"3",We=ut+"4",Ge=ct+"4",je=_t+"4",qe=ut+"5",Ke=ct+"5",Xe=_t+"5",St="red",Mt="green",Dt="blue",Et="yellow",Bt="magenta",zt="cyan",Pt="gray",j="Hue",q="Saturation",K="Brightness",X="Threshold",Y="Channel",J=St+Y,Ye=St+j,Ze=St+q,Qe=St+K,Je=St+X,tt=Mt+Y,ts=Mt+j,es=Mt+q,ss=Mt+K,rs=Mt+X,et=Dt+Y,is=Dt+j,ns=Dt+q,os=Dt+K,as=Dt+X,st=Et+Y,ls=Et+j,hs=Et+q,us=Et+K,cs=Et+X,rt=Bt+Y,_s=Bt+j,vs=Bt+q,ds=Bt+K,ps=Bt+X,it=zt+Y,fs=zt+j,gs=zt+q,bs=zt+K,ms=zt+X,nt=Pt+Y,xs=Pt+j,Cs=Pt+q,ws=Pt+K,ys=Pt+X,bt="linesPerturb";class Ui extends x{constructor(){super(),this.adl(ke,new x),this[ke].ap("widthImpact",.03,o.ou),this.adl(Se,new x);const t=this[Se];t.ap("curlUVMult",4.076,o.ou),t.ap("curlUVXMult",1,o.ou),t.ap("curlSeedMult",282.6,o.ou),t.ap("seedModification",0,o.ou),t.ap("useWrapUV",!0,o.ou),t.ap("wrapUVStr",6.087,o.ou),t.ap("wrapUVMix",1,o.ou),t.ap("tierDivider",6,o.ou),this.adl(Tt,new x);const e=this[Tt];e.ap(bt+"UV",5.8699,o.ou),e.ap(bt+"SeedMult",4.348,o.ou),e.ap(bt+"Str",.174,o.ou),e.ap(bt+"Z",1e3,o.ou),e.ap(bt+"Abs",!1,o.ou),e.ap(Me,3986943,o.ouc),e.ap(De,1,o.ou),e.ap("wrappingValues",3,o.oui),this.adl(w,new x);const s=this[w];s.ap(w+"UvMult",2.391,o.ou),s.ap(w+"Str",.1,o.ou),s.ap(w+"StrColor",1,o.ou),s.ap(w+"BorderImpact",4.13,o.ou),s.ap(w+"SeedMult",1,o.ou),s.ap(w+"Mix",1,o.ou),s.ap(w+"Mix2",.565,o.ou),s.ap(mt,5861461,o.ouc),s.ap(Ee,18,o.oui),s.ap(Be,5,o.ou),s.ap(ze,1,o.ou),s.ap(xt,12279832,o.ouc),s.ap(Pe,11,o.oui),s.ap(Te,5,o.ou),s.ap(Le,0,o.ou),s.ap(Ct,12279832,o.ouc),s.ap(Ve,11,o.oui),s.ap(Fe,.522,o.ou),s.ap(Re,.13,o.ou),this.adl("c"+F,new x);const i=this.cnoise;i.ap(Q+"UVMult",3.046,o.ou),i.ap(Q+"UVMultX",1,o.ou),i.ap(Q+"SeedMult",1.8479,o.ou),i.ap(Q+"Str",5.435,o.ou),i.ap(Q+"Mix",.533,o.ou),i.ap(Q+"Abs",!0,o.ou),this.adl(T,new x);const n=this.noiseColor;n.ap(T+"Blend",9,o.oui),n.ap(T+"Alpha",1.087,o.ou),n.ap(T+"Color",8781824,o.ouc),this.adl(gt,new x);const a=this[gt];a.ap("thresholdSoft",.174,o.ou),a.ap("threshold",-.5,o.ou),a.ap("saturationImpact",.12,o.ou),this.adl("flow",new x);const l=this.flow;l.ap(F+"Base",.598,o.ou),l.ap(F+"BaseModification",-.4,o.ou),l.ap(F+"Maths",8,o.oui),l.ap(F+"Maths2",8,o.oui),l.ap(F+"Max",!1,o.ou),l.ap(F+"Max2",!0,o.ou),l.ap("subdiv",0,o.ou),this.adl(M,new x);const h=this[M];h.ap(ut,5820638,o.ouc),h.ap(ct,16777215,o.ouc),h.ap(_t,0,o.ou),h.ap(Ue,5820638,o.ouc),h.ap(Ne,16711935,o.ouc),h.ap(Ie,0,o.ou),h.ap($e,5820638,o.ouc),h.ap(He,16711935,o.ouc),h.ap(Oe,0,o.ou),h.ap(We,5820638,o.ouc),h.ap(Ge,16711935,o.ouc),h.ap(je,0,o.ou),h.ap(qe,5820638,o.ouc),h.ap(Ke,16711935,o.ouc),h.ap(Xe,0,o.ou),this.adl(J,new x);const c=this[J];c.ap(Ye,0,o.ou),c.ap(Ze,0,o.ou),c.ap(Qe,0,o.ou),c.ap(Je,.5,o.ou),this.adl(tt,new x);const _=this[tt];_.ap(ts,0,o.ou),_.ap(es,0,o.ou),_.ap(ss,0,o.ou),_.ap(rs,.5,o.ou),this.adl(et,new x);const v=this[et];v.ap(is,0,o.ou),v.ap(ns,0,o.ou),v.ap(os,0,o.ou),v.ap(as,.5,o.ou),this.adl(st,new x);const f=this[st];f.ap(ls,0,o.ou),f.ap(hs,0,o.ou),f.ap(us,0,o.ou),f.ap(cs,.5,o.ou),this.adl(rt,new x(null,this.och));const A=this[rt];A.ap(_s,0,o.ou),A.ap(vs,0,o.ou),A.ap(ds,0,o.ou),A.ap(ps,.5,o.ou),this.adl(it,new x);const b=this[it];b.ap(fs,0,o.ou),b.ap(gs,0,o.ou),b.ap(bs,0,o.ou),b.ap(ms,.5,o.ou),this.adl(nt,new x);const C=this[nt];C.ap(xs,0,o.ou),C.ap(Cs,0,o.ou),C.ap(ws,0,o.ou),C.ap(ys,.5,o.ou)}applyPalette(t){this._ap(t,"borders","widthImpact"),this._ap(t,Tt,Me),this._ap(t,Tt,De),this._ap(t,T,T+"Blend"),this._ap(t,T,T+"Alpha"),this._ap(t,T,T+"Color"),this._ap(t,gt,"thresholdSoft"),this._ap(t,gt,"threshold"),this._ap(t,gt,"saturationImpact"),this._ap(t,w,mt),this._ap(t,w,Ee),this._ap(t,w,Be),this._ap(t,w,ze),this._ap(t,w,xt),this._ap(t,w,Pe),this._ap(t,w,Te),this._ap(t,w,Le),this._ap(t,w,Ct),this._ap(t,w,Ve),this._ap(t,w,Fe),this._ap(t,w,Re),this._ap(t,w,"voroStr"),this._ap(t,w,"voroStrColor"),this._ap(t,w,"voroBorderImpact"),this._ap(t,M,ut),this._ap(t,M,ct),this._ap(t,M,_t),this._ap(t,M,Ue),this._ap(t,M,Ne),this._ap(t,M,Ie),this._ap(t,M,$e),this._ap(t,M,He),this._ap(t,M,Oe),this._ap(t,M,We),this._ap(t,M,Ge),this._ap(t,M,je),this._ap(t,M,qe),this._ap(t,M,Ke),this._ap(t,M,Xe),this._ap(t,J,Ye),this._ap(t,J,Ze),this._ap(t,J,Qe),this._ap(t,J,Je),this._ap(t,tt,ts),this._ap(t,tt,es),this._ap(t,tt,ss),this._ap(t,tt,rs),this._ap(t,et,is),this._ap(t,et,ns),this._ap(t,et,os),this._ap(t,et,as),this._ap(t,st,ls),this._ap(t,st,hs),this._ap(t,st,us),this._ap(t,st,cs),this._ap(t,rt,_s),this._ap(t,rt,vs),this._ap(t,rt,ds),this._ap(t,rt,ps),this._ap(t,it,fs),this._ap(t,it,gs),this._ap(t,it,bs),this._ap(t,it,ms),this._ap(t,nt,xs),this._ap(t,nt,Cs),this._ap(t,nt,ws),this._ap(t,nt,ys)}_ap(t,e,s){const n=t.deformerData[e];n&&n.hasOwnProperty(s)?this[e][s]=n[s]||0:this[e].resetParam(s)}}const E="divisions",O=E+"Type",As="cols",ks="lines",Ss="margin",Ms="lineWidth",Ds="chance",Es="friction",Bs="maxDivisions",zs="activateChanceFilling",Ps="chanceFilling",Ts="chanceDrawLine",Ls="full",Vs="vertical",Fs="horizontal";class Ni extends x{constructor(){super(),this.ap(As,35),this.ap(ks,60),this.ap(Ss,100),this.ap(Ms,1.9),this.adl(E,new x(null,this.och)),this[E].ap(Ds,.83),this[E].ap(Es,.89),this[E].ap(Bs,14),this[E].ap(zs,!0),this[E].ap(Ps,.01),this[E].ap(Ts,.27),this.adl(O,new x(null,this.och)),this[O].ap(Ls,0),this[O].ap(Vs,.96),this[O].ap(Fs,.03)}applyPalette(t){this._ap(t,"",As),this._ap(t,"",ks),this._ap(t,"",Ss),this._ap(t,"",Ms),this._ap(t,E,Ds),this._ap(t,E,Es),this._ap(t,E,Bs),this._ap(t,E,zs),this._ap(t,E,Ps),this._ap(t,E,Ts),this._ap(t,O,Ls),this._ap(t,O,Vs),this._ap(t,O,Fs)}_apOrigin(t,e){t.gridData.hasOwnProperty(e)&&(this[e]=t.gridData[e])}_ap(t,e,s){if(!t)return;const i=t.gridData;if(!i)return;const n=e!==""?i[e]:i;if(!n)return;const a=e!==""?this[e]:this;n.hasOwnProperty(s)?a[s]=n[s]||0:a.resetParam(s)}}const Lt="lines",vt="color",ot=vt+"s",Vt=vt+"1",Ft=vt+"2",Rt=vt+"3",Ut=vt+"4",Nt="lengthM",It="thicknessM",$t="thicknessA",Ht="rotationType",U=vt+"Adjustement";function N(r,t){return r.hasOwnProperty(t)}class Ii extends x{constructor(t=null){super(t),this.adl(Lt,new x);const e=this[Lt];e.ap("count",1e6),e.ap(It,30),e.ap($t,102.169),e.ap("thicknessP",9),e.ap(Nt,16.3),e.ap("lengthA",0),e.ap("lengthP",35),e.ap(Ht,3),e.ap("rotationNoise",{x:6.765,y:3.442}),e.ap("visibleThreshold",.663),e.ap("dontUsePattern",!1),this.adl(ot,new x);const s=this[ot];s.ap(Vt,16777215),s.ap(Ft,14276548),s.ap(Rt,896749),s.ap(Ut,14727992),s.ap("alpha",{min:.86,max:.92}),s.ap("alphaPower",4),s.ap("applyAlpha",!0),s.ap("hueRand",{min:-.01,max:.02}),s.ap("saturationRand",{min:.415,max:.581}),s.ap("luminosityRand",{min:-.065,max:.129}),this.adl(U,new x);const i=this[U];i.ap(U+"Value",-.478),i.ap(U+"Sat",1),i.ap(U+"Lum",.946),i.ap(U+"Scale",750),i.ap(U+"Value2",.239),i.ap(U+"Scale2",369.565)}applyPalette(t){if(!t.vegeData)return;const e=t.vegeData.colors;e&&(N(e,Vt)&&(this[ot][Vt]=e[Vt]),N(e,Ft)&&(this[ot][Ft]=e[Ft]),N(e,Rt)&&(this[ot][Rt]=e[Rt]),N(e,Ut)&&(this[ot][Ut]=e[Ut]));const s=t.vegeData[Lt],i=this[Lt];s&&(N(s,Nt)&&(i[Nt]=s[Nt]),N(s,It)&&(i[It]=s[It]),N(s,$t)&&(i[$t]=s[$t]),N(s,Ht)&&(i[Ht]=s[Ht]))}}const xr="lines",dt="Color",Z="edges",pt="Alpha",Cr="Contrast",wr=Z+Cr,ce="Blend",$i=ce+"Mode",Kt=Z+pt,Xt=Z+$i,Rs=xr+dt,Us=xr+pt,Yt=Z+dt,Ns=Z+dt+"B",Is=Z+pt+"1",$s=Kt+"1b",Hs=Xt+"3",Os=Z+"Kuwa",Ws=Yt+"2",Gs=Kt+"2",js=Xt+"2",qs=Yt+"3",Ks=wr,Xs=wr+"2",Ys="specialEdgeContrast",Zs="specialEdgeColor",Qs="specialEdgeAlpha",_e="kuwaVoro",Js=_e+dt,tr=_e+pt,er=_e+ce,ve="voroEdges",sr=ve+ce,rr=ve+dt,ir=ve+pt,yr="zonesEdge",Ar=yr+"s",nr=yr+Cr,or=Ar+dt,ar=Ar+pt,lr="grainScale",hr="grainPerturb",Ot="noiseStr",ur="noiseBlendMode",Wt="stainsValue",cr="stainsBlendMode";class Hi extends x{constructor(){super(),this.ap(Rs,15261663,o.ouc),this.ap(Us,1,o.ou),this.adl("kw",new x),this.kw.ap("p1",2,o.oui),this.kw.ap("p1a",0,o.ou),this.kw.ap("p1b",0,o.oui),this.kw.ap("p2",2,o.oui),this.kw.ap("p2a",0,o.ou),this.kw.ap("p2b",0,o.oui),this.kw.ap("ls1",13,o.oui),this.kw.ap("ls2",6,o.oui),this.kw.ap("ze",3,o.oui),this.kw.ap("ek1",1,o.oui),this.kw.ap("ek2",3,o.oui),this.kw.ap("ek3",1,o.oui),this.kw.ap("se1",14,o.oui),this.kw.ap("se2",3,o.oui),this.ap(Yt,13230047,o.ouc),this.ap(Ns,13230047,o.ouc),this.ap(Is,1,o.ou),this.ap($s,.3,o.ou),this.ap(Hs,3,o.oui),this.ap(Os,10,o.oui),this.ap(Ws,16777215,o.ouc),this.ap(Gs,1,o.ou),this.ap(js,11,o.oui),this.ap(Ks,5.869,o.ou),this.ap(Xs,5.87,o.ou),this.ap(qs,16777215,o.ouc),this.ap(Kt,0,o.ou),this.ap(Xt,3,o.oui),this.ap(Ys,.511),this.ap(Zs,4088468,o.ouc),this.ap(Qs,1,o.ou),this.ap(Js,4088468,o.ouc),this.ap(tr,1,o.ou),this.ap(er,5,o.oui),this.ap(sr,2,o.oui),this.ap(rr,997703,o.ouc),this.ap(ir,0,o.ou),this.ap(nr,38.043),this.ap(or,16777215,o.ouc),this.ap(ar,.457,o.ou),this.ap(lr,10,o.ou),this.ap(hr,98,o.ou),this.ap(Ot,.12,o.ou),this.ap(ur,18,o.oui),this.ap(Wt,.1,o.ou),this.ap(cr,15,o.oui)}applyPalette(t){this.app(t,Rs),this.app(t,Us),this.app(t,Yt),this.app(t,Ns),this.app(t,Is),this.app(t,$s),this.app(t,Hs),this.app(t,Os),this.app(t,Ws),this.app(t,Gs),this.app(t,js),this.app(t,Ks),this.app(t,Xs),this.app(t,qs),this.app(t,Kt),this.app(t,Xt),this.app(t,Ys),this.app(t,Zs),this.app(t,Qs),this.app(t,Js),this.app(t,tr),this.app(t,er),this.app(t,sr),this.app(t,rr),this.app(t,ir),this.app(t,nr),this.app(t,or),this.app(t,ar),this.app(t,lr),this.app(t,hr),this.app(t,Ot),this.app(t,ur),this.app(t,Wt),this.app(t,cr),this[Ot]=Math.min(this[Ot],.2),this[Wt]=Math.min(this[Wt],.15),this._app(t,"kw","p1"),this._app(t,"kw","p1a"),this._app(t,"kw","p1b"),this._app(t,"kw","p2"),this._app(t,"kw","p2a"),this._app(t,"kw","p2b"),this._app(t,"kw","ls1"),this._app(t,"kw","ls2"),this._app(t,"kw","ze"),this._app(t,"kw","ek1"),this._app(t,"kw","ek2"),this._app(t,"kw","ek3"),this._app(t,"kw","se1"),this._app(t,"kw","se2")}app(t,e){t.composerData.hasOwnProperty(e)?this[e]=t.composerData[e]:this.resetParam(e)}_app(t,e,s){const n=t.composerData[e];n&&n.hasOwnProperty(s)?this[e][s]=n[s]||0:this[e].resetParam(s)}}const Oi={sat:1.1,sh:-.37,k1:6,k1a:1,k1b:11,k2:2,k2a:.239,k2b:2,shS:.6,shB:.8},Wi={div:{fric:.37,maxDiv:1,chFill:.45},lw:18.7},Gi={bord:{wImp:.046},nsB:{cPMix:3972567,aPMix:.734},vro:{vroS:2.391,vroBI:1.304,vroC1:2698554,vroC1B:25,vroC1A:.924,vroC1M:.239,vroC2:3227177,vroC2B:3,vroC2A:1.485,vroC2M:.031,vroC3A:2.826,vSC:2.609,vroC3:12017693},nC:{nCA:1.296,nCC:3292210},yCh:{ySat:.05}},ji={clrs:{clr1:16776183,clr2:2521814,clr3:5062693,clr4:15523285},lns:{lenM:100,rotT:1,thkA:102.17}},qi={kw:{p1:10,p1a:.373,p1b:3,p2:2,p2a:0,p2b:0,ls1:17,ls2:4,ze:6,ek1:3,ek2:15,ek3:2,se1:18,se2:3},lnClr:16777215,lnA:.815,eClr:16346678,eClrB:16777215,eClr2:11355686,eCon:2.174,eCon2:1,eClr3:551072,eA:.489,eBM:23,spECon:1,spEClr:2893605,spEA:.71,kuwVC:15195860,kuwVB:18,znECon:50,znEClr:16728607,znEA:.424,eA1b:.4,eBM3:18,eA1:.946,eA2:1.793,kuwVA:.696,gScl:8.079,gPert:761.528,nStr:.2,nBM:3,stVal:.25},Ki=15262418,Xi={ppD:Oi,gD:Wi,defD:Gi,vD:ji,compD:qi,bgCol:Ki},Yi={sat:1.1,k1:14,k1a:.261,k1b:3,k2:2,k2a:.261,k2b:18,shS:.6},Zi={div:{maxDiv:13,chFill:.08}},Qi={bord:{wImp:.046},ns:{tDiv:8},nsB:{cPMix:7772590,aPMix:.804,wVal:4},vro:{vroS:1.63,vroC1:9138272,vroC1A:2.772,vroC1M:.478,vroC2:2699611,vroC2B:5,vroC2A:2.065,vroC2M:.031},nC:{nCA:2.065,nCC:3296306},cns:{cNUVM:4.046}},Ji={clrs:{clr1:15780291,clr2:15328997,clr3:10521734,clr4:15787495},lns:{thkA:102.17}},tn={kw:{p1:9,p1a:0,p1b:17,p2:2,p2a:.286,p2b:3,ls1:17,ls2:6,ze:2,ek1:1,ek2:3,ek3:1,se1:14,se2:3},lnClr:16777215,lnA:.38,eClr:11522530,eClr2:2055918,eCon:3.261,eClr3:555936,eA:.522,eBM:23,spECon:5.326,spEClr:85807,kuwVC:12901285,kuwVB:18,gPert:609.687,nStr:.177},en={ppD:Yi,gD:Zi,defD:Qi,vD:Ji,compD:tn},sn={sat:1.1,sh:-.37,k1:11,k1a:.098,k1b:3,k2:2,k2a:.337,k2b:2,shS:.6,shB:.78},rn={div:{fric:.37,maxDiv:1,chFill:.87}},nn={bord:{wImp:.046},nsB:{cPMix:3972567,aPMix:.883},vro:{vroS:2.391,vroBI:0,vroC1:5318432,vroC1B:25,vroC1A:.543,vroC1M:.239,vroC2:9874305,vroC2B:5,vroC2A:3.387,vroC2M:.031,vroC3A:1.576},nC:{nCA:1.739,nCC:3292210},rCh:{rHue:.978},gCh:{gSat:.89},bCh:{bSat:.072,bBri:.138},yCh:{ySat:-.1},mCh:{mSat:1}},on={clrs:{clr1:16776183,clr2:14079445,clr3:10524806,clr4:16775416}},an={kw:{p1:2,p1a:.341,p1b:17,p2:2,p2a:.362,p2b:3,ls1:13,ls2:6,ze:2,ek1:1,ek2:3,ek3:1,se1:14,se2:3},lnClr:16777215,lnA:.467,eClr:13618884,eClrB:16777215,eClr2:4859509,eCon:4.13,eCon2:1,eClr3:551072,eA:.391,eBM:23,spECon:.435,spEClr:4277321,spEA:.967,kuwVC:12436648,kuwVB:18,znECon:10,znEClr:1737186,znEA:.685,kuwVA:0,gScl:1.2,gPert:671.306,nStr:.15,stVal:.14},ln=15460833,hn={ppD:sn,gD:rn,defD:nn,vD:on,compD:an,bgCol:ln},un={sh:-.22,k1:3,k1a:.587,k1b:3,k2:5,k2a:1,k2b:2,shS:.7,shB:1},cn={lw:10.4},_n={ns:{tDiv:10},nsB:{cPMix:4684601,aPMix:.85,wVal:4},vro:{vroC1:4426550,vroC2:84111,vroC2B:18,vroC2A:1.957,vroC2M:.337,vroC3A:3.442,vroC3:5804241,vroC3B:2,vroC3M:.239},nC:{nCA:1.1,nCC:3741515,nCB:17},cns:{cNUVM:4.046},clrs:{cR:9389895},yCh:{ySat:-.623}},vn={clrs:{clr2:1907724,clr3:16166184,clr4:16374567},lns:{thkM:154.35,thkA:102.17}},dn={kw:{p1:2,p1a:0,p1b:0,p2:2,p2a:0,p2b:0,ls1:10,ls2:3,ze:13,ek1:2,ek2:2,ek3:3,se1:5,se2:2},lnClr:14866849,lnA:.424,eClr:6653913,eClrB:15852732,eClr2:16217630,eCon:16.522,eCon2:1.376,eClr3:13096703,eA:.848,spECon:.514,spEClr:16503718,spEA:.732,kuwVC:14779662,kuwVB:9,znECon:50,znEClr:8160680,znEA:1,eA1b:1.543,eBM3:18,eA1:.554,eA2:2.511,eKuwa:3,eBM2:23,gScl:1.087,gPert:549.887,nStr:.264,stVal:.167},pn=16118247,fn={ppD:un,gD:cn,defD:_n,vD:vn,compD:dn,bgCol:pn},gn={hue:-6.28,k1:2,k1a:.685,k1b:2,k2:2,k2a:.12,k2b:3,shS:.6,shB:.88},bn={div:{fric:.37,maxDiv:1,chFill:.87}},mn={bord:{wImp:.046},nsB:{cPMix:16002092},vro:{vroS:2.174,vroBI:0,vroC1:5271883,vroC1M:.576,vroC2A:.6,vroC2M:.196,vroC3A:0,vSC:2.174,vroC3:0,vroC3B:0,vroC3M:0},nC:{nCA:2.935,nCC:4741192,nCB:2}},xn={clrs:{clr2:66560,clr3:15577919,clr4:13253178},lns:{thkA:102.17}},Cn={kw:{p1:8,p1a:.191,p1b:3,p2:2,p2a:.667,p2b:17,ls1:16,ls2:13,ze:4,ek1:3,ek2:5,ek3:2,se1:14,se2:4},lnClr:16769792,lnA:.207,eClr:14084061,eClrB:7679791,eClr2:5131854,eCon:3.261,eCon2:1.81,spECon:1,spEClr:16777215,spEA:0,kuwVC:14603892,kuwVB:2,znECon:10,znEClr:9765378,znEA:1,eA1b:1.674,eBM3:18,eA1:1.413,gScl:2,gPert:962.161,nStr:.221,stVal:.125},wn=15262417,yn={ppD:gn,gD:bn,defD:mn,vD:xn,compD:Cn,bgCol:wn},An={sat:1.1,k1:14,k1a:.087,k1b:18,k2:1,k2a:.239,k2b:3,shS:.7},kn={div:{maxDiv:13,chFill:.08}},Sn={bord:{wImp:.046},ns:{tDiv:4},nsB:{cPMix:4044244,aPMix:1.087},vro:{vroS:1.63,vroBI:0,vroC1:15370813,vroC1A:3.5,vroC1M:.478,vroC2:14341073,vroC2B:4,vroC2A:2.8,vroC2M:.076,vroC3A:.8,vSC:1.1,vroC3:11623703,vroC3B:1,vroC3M:.315},nC:{nCA:1.848,nCC:2642507},cImp:{satImp:.087},rCh:{rHue:.03}},Mn={clrs:{clr1:14504194,clr2:16777215,clr3:16777215,clr4:14444037},lns:{thkA:102.17}},Dn={kw:{p1:2,p1a:0,p1b:0,p2:2,p2a:.221,p2b:3,ls1:14,ls2:13,ze:3,ek1:1,ek2:3,ek3:1,se1:3,se2:3},lnClr:16777215,lnA:.38,eClr:14276049,eClrB:16777215,eClr2:15502110,eCon:3.261,eCon2:1,eClr3:9068609,eBM:23,spECon:1,spEClr:14670034,spEA:.391,kuwVC:12901285,kuwVB:18,znECon:10,znEClr:13586451,znEA:.859,eA1:1.402,gPert:807.522,nStr:.243,stVal:.275},En=14010813,Bn={ppD:An,gD:kn,defD:Sn,vD:Mn,compD:Dn,bgCol:En},zn={k1:7,k1a:.283,k1b:3,k2:2,k2a:0,k2b:2,shS:.6,shB:.8},Pn={ns:{tDiv:4},nsB:{wVal:3},vro:{vroS:3.918,vroBI:0,vSC:.8}},Tn={lns:{rotT:2}},Ln={kw:{p1:2,p1a:0,p1b:0,p2:2,p2a:0,p2b:0,ls1:17,ls2:2,ze:2,ek1:3,ek2:3,ek3:2,se1:7,se2:4},eClr:12901596,eClr2:14079956,eA:.775,spECon:.819,spEA:.634,eA1b:.206,eA2:.565,kuwVA:.971,gPert:980.74,nStr:.15,stVal:.18},Vn={ppD:zn,defD:Pn,vD:Tn,compD:Ln},Fn=1,Rn={k1:14,k1a:0,k1b:2,k2:3,k2a:0,k2b:2,shS:.6,shB:.761},Un={nsB:{cPMix:4684601,aPMix:.5},vro:{vroC1:2797077,vroC2:13606997,vroC2B:9,vroC2A:1.087,vroC2M:.228,vroC3A:1.196,vSC:.6,vroC3:7936986},nC:{nCA:1.1,nCC:5771646,nCB:17},clrs:{cF:9100888,cT:.0978,cF2:13552301,cR2:16777215,cT2:.125,cF3:5709679,cR3:16745984,cT3:.2772,cF4:13543046,cR4:16748288,cT4:.1413},gCh:{gSat:.543},yCh:{ySat:-.739}},Nn={clrs:{clr3:16166184,clr4:16374567},lns:{thkM:100,thkA:102.17}},In={kw:{p1:3,p1a:.188,p1b:3,p2:2,p2a:0,p2b:0,ls1:13,ls2:13,ze:3,ek1:1,ek2:3,ek3:4,se1:14,se2:3},lnClr:15917436,lnA:.761,eClr:6522588,eClrB:15851487,eClr2:6846363,eCon:6.522,eCon2:1.957,eClr3:13096703,eA:.75,spECon:1,spEClr:16291126,spEA:.761,kuwVC:11427334,kuwVB:9,znECon:50,znEClr:5202504,znEA:1,eA1b:3,eBM3:18,eA1:1.043,eA2:2.283,kuwVA:.848,eKuwa:12,eBM2:18,gScl:1.992,gPert:738.49,nStr:.177,stVal:.145},$n=16118247,Hn={f:Fn,ppD:Rn,defD:Un,vD:Nn,compD:In,bgCol:$n},On={hue:-.05,sh:-.52,k1:14,k1a:0,k1b:2,k2:2,k2a:.185,k2b:3,shS:.7,shB:1},Wn={nsB:{cPMix:3644188,aPMix:.964},vro:{vroC1:8289339,vroC2:12497828,vroC2B:18,vroC2A:2.065,vroC2M:.228,vroC3A:5,vroC3:11041498,vroC3M:.163},nC:{nCA:1,nCC:5771646,nCB:17},rCh:{rHue:.446,rSat:.891},gCh:{gSat:.391,gBri:-.217},yCh:{ySat:-.522,yBri:-.043},mCh:{mHue:.076,mSat:-.065}},Gn={clrs:{clr2:13403396,clr3:16166184,clr4:16374567},lns:{thkM:100,thkA:102.17}},jn={kw:{p1:3,p1a:.25,p1b:3,p2:13,p2a:.221,p2b:10,ls1:11,ls2:12,ze:3,ek1:1,ek2:3,ek3:1,se1:14,se2:3},lnClr:15917436,eClr:9282524,eClrB:11841948,eClr2:13258799,eCon:3.984,eCon2:1.593,eClr3:13096703
:this.gl.texImage2D(this.target,this.level,this.internalFormat,this.format,this.type,this.image),this.onUpdate&&this.onUpdate()):this.width?this.gl.texImage2D(this.target,this.level,this.internalFormat,this.width,this.height,0,this.format,this.type,null):this.gl.texImage2D(this.target,0,this.gl.RGBA,1,1,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,ri),this.store.image=this.image)}}class se{constructor(t,{width:e=t.canvas.width,height:s=t.canvas.height,target:i=t.FRAMEBUFFER,color:n=1,depth:a=!0,stencil:l=!1,depthTexture:h=!1,wrapS:c=t.CLAMP_TO_EDGE,wrapT:_=t.CLAMP_TO_EDGE,minFilter:v=t.LINEAR,magFilter:f=v,type:A=t.UNSIGNED_BYTE,format:b=t.RGBA,internalFormat:C=b,unpackAlignment:g,premultiplyAlpha:p}={}){this.gl=t,this.width=e,this.height=s,this.depth=a,this.buffer=this.gl.createFramebuffer(),this.target=i,this.gl.renderer.bindFramebuffer(this),this.textures=[];const m=[];for(let P=0;P<n;P++)this.textures.push(new Qt(t,{width:e,height:s,wrapS:c,wrapT:_,minFilter:v,magFilter:f,type:A,format:b,internalFormat:C,unpackAlignment:g,premultiplyAlpha:p,flipY:!1,generateMipmaps:!1})),this.textures[P].update(),this.gl.framebufferTexture2D(this.target,this.gl.COLOR_ATTACHMENT0+P,this.gl.TEXTURE_2D,this.textures[P].texture,0),m.push(this.gl.COLOR_ATTACHMENT0+P);m.length>1&&this.gl.renderer.drawBuffers(m),this.texture=this.textures[0],this.gl.renderer.bindFramebuffer({target:this.target})}setSize(t,e){if(!(this.width===t&&this.height===e)){this.width=t,this.height=e,this.gl.renderer.bindFramebuffer(this);for(let s=0;s<this.textures.length;s++)this.textures[s].width=t,this.textures[s].height=e,this.textures[s].needsUpdate=!0,this.textures[s].update(),this.gl.framebufferTexture2D(this.target,this.gl.COLOR_ATTACHMENT0+s,this.gl.TEXTURE_2D,this.textures[s].texture,0);this.gl.renderer.bindFramebuffer({target:this.target})}}}const Ce={black:"#000000",white:"#ffffff"};function we(r){r.length===4&&(r=r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]}function ni(r){return r=parseInt(r),[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255]}function ye(r){return r===void 0?[0,0,0]:arguments.length===3?arguments:isNaN(r)?r[0]==="#"?we(r):Ce[r.toLowerCase()]?we(Ce[r.toLowerCase()]):[0,0,0]:ni(r)}class $ extends Array{constructor(t){return Array.isArray(t)?super(...t):super(...ye(...arguments))}get r(){return this[0]}get g(){return this[1]}get b(){return this[2]}set r(t){this[0]=t}set g(t){this[1]=t}set b(t){this[2]=t}set(t){return Array.isArray(t)?this.copy(t):this.copy(ye(...arguments))}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this}}function oi(r,t){return r[0]=t[0],r[1]=t[1],r}function ai(r,t,e){return r[0]=t,r[1]=e,r}class L extends Array{constructor(t=0,e=t){return super(t,e),this}get x(){return this[0]}get y(){return this[1]}set x(t){this[0]=t}set y(t){this[1]=t}set(t,e=t){return t.length?this.copy(t):(ai(this,t,e),this)}copy(t){return oi(this,t),this}}class At extends ne{constructor(t,{width:e=1,height:s=1,widthSegments:i=1,heightSegments:n=1,attributes:a={}}={}){const l=i,h=n,c=(l+1)*(h+1),_=l*h*6,v=new Float32Array(c*3),f=new Float32Array(c*3),A=new Float32Array(c*2),b=_>65536?new Uint32Array(_):new Uint16Array(_);At.buildPlane(v,f,A,b,e,s,0,l,h),Object.assign(a,{position:{size:3,data:v},normal:{size:3,data:f},uv:{size:2,data:A},index:{data:b}}),super(t,a)}static buildPlane(t,e,s,i,n,a,l,h,c,_=0,v=1,f=2,A=1,b=-1,C=0,g=0){const p=C,m=n/h,P=a/c;for(let k=0;k<=c;k++){let te=k*P-a/2;for(let B=0;B<=h;B++,C++){let Pr=B*m-n/2;if(t[C*3+_]=Pr*A,t[C*3+v]=te*b,t[C*3+f]=l/2,e[C*3+_]=0,e[C*3+v]=0,e[C*3+f]=l>=0?1:-1,s[C*2]=B/h,s[C*2+1]=1-k/c,k===c||B===h)continue;let Tr=p+B+k*(h+1),fe=p+B+(k+1)*(h+1),Lr=p+B+(k+1)*(h+1)+1,ge=p+B+k*(h+1)+1;i[g*6]=Tr,i[g*6+1]=fe,i[g*6+2]=ge,i[g*6+3]=fe,i[g*6+4]=Lr,i[g*6+5]=ge,g++}}}}class li extends ne{constructor(t,{attributes:e={}}={}){Object.assign(e,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(t,e)}}class hi{constructor(t,{width:e,height:s,dpr:i,wrapS:n=t.CLAMP_TO_EDGE,wrapT:a=t.CLAMP_TO_EDGE,minFilter:l=t.LINEAR,magFilter:h=t.LINEAR,geometry:c=new li(t),targetOnly:_=null}={}){this.gl=t,this.options={wrapS:n,wrapT:a,minFilter:l,magFilter:h},this.passes=[],this.geometry=c,this.uniform={value:null},this.targetOnly=_;const v=this.fbo={read:null,write:null,swap:()=>{let f=v.read;v.read=v.write,v.write=f}};this.resize({width:e,height:s,dpr:i})}addPass({vertex:t="",fragment:e="",UNF:s={},textureUniform:i="tMap",enabled:n=!0}={}){s[i]={value:this.fbo.read.texture};const a=new wt(this.gl,{vertex:t,fragment:e,UNF:s}),h={mesh:new yt(this.gl,{geometry:this.geometry,_pr:a}),_pr:a,UNF:s,enabled:n,textureUniform:i};return this.passes.push(h),h}resize({width:t,height:e,dpr:s}={}){s&&(this.dpr=s),t&&(this.width=t,this.height=e||t),s=this.dpr||this.gl.renderer.dpr,t=Math.floor((this.width||this.gl.renderer.width)*s),e=Math.floor((this.height||this.gl.renderer.height)*s),this.options.width=t,this.options.height=e,this.fbo.read=new se(this.gl,this.options),this.fbo.write=new se(this.gl,this.options)}render({scene:t,camera:e,texture:s,target:i=null,update:n=!0,sort:a=!0,frustumCull:l=!0,beforePostCallbacks:h}){const c=this.passes.filter(_=>_.enabled);s||(this.gl.renderer.render({scene:t,camera:e,target:c.length||!i&&this.targetOnly?this.fbo.write:i,update:n,sort:a,frustumCull:l}),this.fbo.swap(),h&&h.forEach(_=>_&&_())),c.forEach((_,v)=>{_.mesh._pr.UNF[_.textureUniform].value=!v&&s?s:this.fbo.read.texture,this.gl.renderer.render({scene:_.mesh,target:v===c.length-1&&(i||!this.targetOnly)?i:this.fbo.write,clear:!0}),this.fbo.swap()}),this.uniform.value=this.fbo.read.texture}}var ui="_m4 bmx(_f b){return _m4(1,0,0,0,0,1,0,0,0,0,1,0,b,b,b,1);}_v3 brn(_v3 c,_f v){return c+v;}",ci="_m4 ctmx(_f contrast){_f t=(1.0-contrast)/2.0;return _m4(contrast,0,0,0,0,contrast,0,0,0,0,contrast,0,t,t,t,1);}_v3 contrast(_v3 color,_f value){return 0.5+value*(color-0.5);}",_i="_v3 hueshift(_v3 color,_f hue){const _v3 k=_v3(0.57735,0.57735,0.57735);_f cosAngle=cos(hue);return _v3(color*cosAngle+cross(k,color)*sin(hue)+k*dot(k,color)*(1.0-cosAngle));}_v3 hueshift2(_v3 color,_f shift){_v3 P=_v3(0.55735)*dot(_v3(0.55735),color);_v3 U=color-P;_v3 V=cross(_v3(0.55735),U);color=U*cos(shift*6.2832)+V*sin(shift*6.2832)+P;return color;}",vi="_v3 saturation(_v3 rgb,_f adjustment){const _v3 W=_v3(0.2125,0.7154,0.0721);_v3 intensity=_v3(dot(rgb,W));return mix(intensity,rgb,adjustment);}_v3 saturation2(_v3 rgb,_f adjustment){const _v3 W=_v3(0.2125,0.7154,0.0721);_v3 intensity=_v3(dot(rgb,W));return mix(rgb,intensity,adjustment);}",di="_f blOv(_f b,_f bl){return b<0.5 ?(2.0*b*bl):(1.0-2.0*(1.0-b)*(1.0-bl));}_v3 blOv(_v3 b,_v3 bl){return _v3(blOv(b.r,bl.r),blOv(b.g,bl.g),blOv(b.b,bl.b));}_v3 blOv(_v3 b,_v3 bl,_f o){return(blOv(b,bl)*o+b*(1.0-o));}_f blCB(_f b,_f bl){return(bl==0.0)? bl : max((1.0-((1.0-b)/bl)),0.0);}_v3 blCB(_v3 b,_v3 bl){return _v3(blCB(b.r,bl.r),blCB(b.g,bl.g),blCB(b.b,bl.b));}_v3 blCB(_v3 b,_v3 bl,_f o){return(blCB(b,bl)*o+b*(1.0-o));}_f blCD(_f b,_f bl){return(bl==1.0)? bl : min(b/(1.0-bl),1.0);}_v3 blCD(_v3 b,_v3 bl){return _v3(blCD(b.r,bl.r),blCD(b.g,bl.g),blCD(b.b,bl.b));}_v3 blCD(_v3 b,_v3 bl,_f o){return(blCD(b,bl)*o+b*(1.0-o));}_f blVL(_f b,_f bl){return(bl<0.5)? blCB(b,(2.0*bl)): blCD(b,(2.0*(bl-0.5)));}_v3 blVL(_v3 b,_v3 bl){return _v3(blVL(b.r,bl.r),blVL(b.g,bl.g),blVL(b.b,bl.b));}_v3 blVL(_v3 b,_v3 bl,_f o){return(blVL(b,bl)*o+b*(1.0-o));}_f blAdd(_f b,_f bl){return min(b+bl,1.0);}_v3 blAdd(_v3 b,_v3 bl){return min(b+bl,_v3(1.0));}_v3 blAdd(_v3 b,_v3 bl,_f o){return(blAdd(b,bl)*o+b*(1.0-o));}_v3 blav(_v3 b,_v3 bl){return(b+bl)/2.0;}_v3 blav(_v3 b,_v3 bl,_f o){return(blav(b,bl)*o+b*(1.0-o));}_f blD(_f b,_f bl){return min(bl,b);}_v3 blD(_v3 b,_v3 bl){return _v3(blD(b.r,bl.r),blD(b.g,bl.g),blD(b.b,bl.b));}_v3 blD(_v3 b,_v3 bl,_f o){return(blD(b,bl)*o+b*(1.0-o));}_v3 blHL(_v3 b,_v3 bl){return blOv(bl,b);}_v3 blHL(_v3 b,_v3 bl,_f o){return(blHL(b,bl)*o+b*(1.0-o));}_f blHM(_f b,_f bl){return(blVL(b,bl)<0.5)? 0.0 : 1.0;}_v3 blHM(_v3 b,_v3 bl){return _v3(blHM(b.r,bl.r),blHM(b.g,bl.g),blHM(b.b,bl.b));}_v3 blHM(_v3 b,_v3 bl,_f o){return(blHM(b,bl)*o+b*(1.0-o));}_f blLi(_f b,_f bl){return max(bl,b);}_v3 blLi(_v3 b,_v3 bl){return _v3(blLi(b.r,bl.r),blLi(b.g,bl.g),blLi(b.b,bl.b));}_v3 blLi(_v3 b,_v3 bl,_f o){return(blLi(b,bl)*o+b*(1.0-o));}_f blLB(_f b,_f bl){return max(b+bl-1.0,0.0);}_v3 blLB(_v3 b,_v3 bl){return max(b+bl-_v3(1.0),_v3(0.0));}_v3 blLB(_v3 b,_v3 bl,_f o){return(blLB(b,bl)*o+b*(1.0-o));}_f blLD(_f b,_f bl){return min(b+bl,1.0);}_v3 blLD(_v3 b,_v3 bl){return min(b+bl,_v3(1.0));}_v3 blLD(_v3 b,_v3 bl,_f o){return(blLD(b,bl)*o+b*(1.0-o));}_f blll(_f b,_f bl){return bl<0.5 ? blLB(b,(2.0*bl)): blLD(b,(2.0*(bl-0.5)));}_v3 blll(_v3 b,_v3 bl){return _v3(blll(b.r,bl.r),blll(b.g,bl.g),blll(b.b,bl.b));}_v3 blll(_v3 b,_v3 bl,_f o){return(blll(b,bl)*o+b*(1.0-o));}_v3 blM(_v3 b,_v3 bl){return b*bl;}_v3 blM(_v3 b,_v3 bl,_f o){return(blM(b,bl)*o+b*(1.0-o));}_v3 blN(_v3 b,_v3 bl){return bl;}_v3 blN(_v3 b,_v3 bl,_f o){return(blN(b,bl)*o+b*(1.0-o));}_f blPL(_f b,_f bl){return(bl<0.5)? blD(b,(2.0*bl)): blLi(b,(2.0*(bl-0.5)));}_v3 blPL(_v3 b,_v3 bl){return _v3(blPL(b.r,bl.r),blPL(b.g,bl.g),blPL(b.b,bl.b));}_v3 blPL(_v3 b,_v3 bl,_f o){return(blPL(b,bl)*o+b*(1.0-o));}_f blSc(_f b,_f bl){return 1.0-((1.0-b)*(1.0-bl));}_v3 blSc(_v3 b,_v3 bl){return _v3(blSc(b.r,bl.r),blSc(b.g,bl.g),blSc(b.b,bl.b));}_v3 blSc(_v3 b,_v3 bl,_f o){return(blSc(b,bl)*o+b*(1.0-o));}_f blSL(_f b,_f bl){return(bl<0.5)?(2.0*b*bl+b*b*(1.0-2.0*bl)):(sqrt(b)*(2.0*bl-1.0)+2.0*b*(1.0-bl));}_v3 blSL(_v3 b,_v3 bl){return _v3(blSL(b.r,bl.r),blSL(b.g,bl.g),blSL(b.b,bl.b));}_v3 blSL(_v3 b,_v3 bl,_f o){return(blSL(b,bl)*o+b*(1.0-o));}_v3 blmd(_i mode,_v3 b,_v3 bl,_f o){if(mode==1){return blAdd(b,bl,o);}else if(mode==2){return blav(b,bl,o);}else if(mode==3){return blCB(b,bl,o);}else if(mode==4){return blCD(b,bl,o);}else if(mode==5){return blD(b,bl,o);}else if(mode==9){return blHL(b,bl,o);}else if(mode==10){return blHM(b,bl,o);}else if(mode==11){return blLi(b,bl,o);}else if(mode==12){return blLB(b,bl,o);}else if(mode==13){return blLD(b,bl,o);}else if(mode==14){return blll(b,bl,o);}else if(mode==15){return blM(b,bl,o);}else if(mode==17){return blN(b,bl,o);}else if(mode==18){return blOv(b,bl,o);}else if(mode==20){return blPL(b,bl,o);}else if(mode==22){return blSc(b,bl,o);}else if(mode==23){return blSL(b,bl,o);}else if(mode==25){return blVL(b,bl,o);}}",pi="_v4 sharpen(in _s2 tex,in _v2 coords,in _v2 renderSize){_f dx=1.0/renderSize.x;_f dy=1.0/renderSize.y;_v4 sum=_v4(0.0);sum+=-1.*_t(tex,coords+_v2(-1.0*dx,0.0*dy));sum+=-1.*_t(tex,coords+_v2(0.0*dx,-1.0*dy));sum+=5.*_t(tex,coords+_v2(0.0*dx,0.0*dy));sum+=-1.*_t(tex,coords+_v2(0.0*dx,1.0*dy));sum+=-1.*_t(tex,coords+_v2(1.0*dx,0.0*dy));return sum;}",fi="_v4 changeHSVForChannel(_v3 origin,_v3 channel,_v3 hsv,_f threshold){_v4 color=_v4(origin,0.);_v3 c1=rgb2hsv(origin);_v3 c2=rgb2hsv(channel);if(distance(c1,c2)<=threshold){color.rgb=hueshift2(color.rgb,hsv.x);color.rgb=saturation(color.rgb,hsv.y);color.rgb=brn(color.rgb,hsv.z);color.a=1.;}return color;}",gi="_f eth(in _f thr1,in _f thr2,in _f val){if(val<thr1){return 0.0;}if(val>thr2){return 1.0;}return val;}_f edi(in _v4 p1,in _v4 p2){return(abs(p1.r-p2.r)+abs(p1.g-p2.g)+abs(p1.b-p2.b))/3.0;}_f edge(in _s2 tex,in _v2 co,in _v2 rs){_f dx=1.0/rs.x;_f dy=1.0/rs.y;_v4 p[9];p[0]=_ee_-1.0*dx,-1.0*dy));p[1]=_ee_-1.0*dx,0.0*dy));p[2]=_ee_-1.0*dx,1.0*dy));p[3]=_ee_0.0*dx,-1.0*dy));p[4]=_ee_0.0*dx,0.0*dy));p[5]=_ee_0.0*dx,1.0*dy));p[6]=_ee_1.0*dx,-1.0*dy));p[7]=_ee_1.0*dx,0.0*dy));p[8]=_ee_1.0*dx,1.0*dy));_f delta=(edi(p[1],p[7])+edi(p[5],p[3])+edi(p[0],p[8])+edi(p[2],p[6]))/4.;return eth(0.25,.4,clamp(3.0*delta,0.0,1.0));}",bi="_v4 khwr(_s2 src,_v2 uv,_i rad,_v2 res){_f n=_f((rad+1)*(rad+1));_v3 m[4];_v3 s[4];for(_i k=0;k<4;++k){m[k]=_v3(0.);s[k]=_v3(0.);}for(_i j=-rad;j<=0;++j){for(_i i=-rad;i<=0;++i){_v3 c=_t(src,uv+_v2(i,j)/res).rgb;m[0]+=c;s[0]+=c*c;}}for(_i j=-rad;j<=0;++j){for(_i i=0;i<=rad;++i){_v3 c=_t(src,uv+_v2(i,j)/res).rgb;m[1]+=c;s[1]+=c*c;}}for(_i j=0;j<=rad;++j){for(_i i=0;i<=rad;++i){_v3 c=_t(src,uv+_v2(i,j)/res).rgb;m[2]+=c;s[2]+=c*c;}}for(_i j=0;j<=rad;++j){for(_i i=-rad;i<=0;++i){_v3 c=_t(src,uv+_v2(i,j)/res).rgb;m[3]+=c;s[3]+=c*c;}}_v4 color=_v4(0.);_f min=100.;for(_i k=0;k<4;++k){m[k]/=n;s[k]=abs(s[k]/n-m[k]*m[k]);_f nv=s[k].r+s[k].g+s[k].b;if(nv<min){min=nv;color=_v4(m[k],1.0);}}return color;}",mi="_f hue2rgb(_f f1,_f f2,_f hue){if(hue<0.0)hue+=1.0;else if(hue>1.0)hue-=1.0;_f res;if((6.0*hue)<1.0)res=f1+(f2-f1)*6.0*hue;else if((2.0*hue)<1.0)res=f2;else if((3.0*hue)<2.0)res=f1+(f2-f1)*((2.0/3.0)-hue)*6.0;else res=f1;return res;}_v3 hsl2rgb(_v3 hsl){_v3 rgb;if(hsl.y==0.0){rgb=_v3(hsl.z);}else{_f f2;if(hsl.z<0.5)f2=hsl.z*(1.0+hsl.y);else f2=hsl.z+hsl.y-hsl.y*hsl.z;_f f1=2.0*hsl.z-f2;rgb.r=hue2rgb(f1,f2,hsl.x+(1.0/3.0));rgb.g=hue2rgb(f1,f2,hsl.x);rgb.b=hue2rgb(f1,f2,hsl.x-(1.0/3.0));}return rgb;}_v3 hsl2rgb(_f h,_f s,_f l){return hsl2rgb(_v3(h,s,l));}",xi="vec3 rgb2hsl(vec3 c){float cMin=min(min(c.r,c.g),c.b),cMax=max(max(c.r,c.g),c.b),delta=cMax-cMin;vec3 hsl=vec3(0.,0.,(cMax+cMin)/2.);if(delta!=0.0){if(hsl.z<.5){hsl.y=delta/(cMax+cMin);}else{hsl.y=delta/(2.-cMax-cMin);}float deltaR=(((cMax-c.r)/6.)+(delta/2.))/delta,deltaG=(((cMax-c.g)/6.)+(delta/2.))/delta,deltaB=(((cMax-c.b)/6.)+(delta/2.))/delta;if(c.r==cMax){hsl.x=deltaB-deltaG;}else if(c.g==cMax){hsl.x=(1./3.)+deltaR-deltaB;}else{hsl.x=(2./3.)+deltaG-deltaR;}hsl.x=fract(hsl.x);}return hsl;}",Ci="const _v4 C=_v4(0.21,0.36,-0.57,0.02);_f snoise2d(_v2 v){_v2 i=floor(v+dot(v,C.yy));_v2 x0=v-i+dot(i,C.xx);_v2 i1;i1=(x0.x>x0.y)? _v2(1.0,0.0): _v2(0.0,1.0);_v4 x12=x0.xyxy+C.xxzz;x12.xy-=i1;i=mod(i,289.0);_v3 p=permute(permute(i.y+_v3(0.0,i1.y,1.0))+i.x+_v3(0.0,i1.x,1.0));_v3 m=max(0.5-_v3(dot(x0,x0),dot(x12.xy,x12.xy),dot(x12.zw,x12.zw)),0.0);m=m*m;m=m*m;_v3 x=2.0*fract(p*C.www)-1.0;_v3 h=abs(x)-0.5;_v3 ox=floor(x+0.5);_v3 a0=x-ox;m*=1.792-0.853*(a0*a0+h*h);_v3 g;g.x=a0.x*x0.x+h.x*x0.y;g.yz=a0.yz*x12.xz+h.yz*x12.yw;return 130.0*dot(m,g);}",wi=`const float PI=3.14;const float PI2=PI*2.;_f snoise3d(_v3 v){ #i_ snoise3dpart _v4 norm=tisq(_v4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;_v4 m=max(0.6-_v4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);m=m*m*m;return 42.0*dot(m,_v4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));}_v3 snoise_v3(_v3 x){_f s=snoise3d(_v3(x));_f s1=snoise3d(_v3(x.y-9.07,x.z+31.2,x.x+23.12));_f s2=snoise3d(_v3(x.z+74.2,x.x-130.2,x.y+99.4));_v3 c=_v3(s,s1,s2);return c;}_v3 curlNoise(_v3 p){const _f e=.1;_v3 dx=_v3(e,0.0,0.0);_v3 dy=_v3(0.0,e,0.0);_v3 dz=_v3(0.0,0.0,e);_v3 p_x0=snoise_v3(p-dx);_v3 p_x1=snoise_v3(p+dx);_v3 p_y0=snoise_v3(p-dy);_v3 p_y1=snoise_v3(p+dy);_v3 p_z0=snoise_v3(p-dz);_v3 p_z1=snoise_v3(p+dz);_f x=p_y1.z-p_y0.z-p_z1.y+p_z0.y;_f y=p_z1.x-p_z0.x-p_x1.z+p_x0.z;_f z=p_x1.y-p_x0.y-p_y1.x+p_y0.x;const _f divisor=1.0/(2.0*e);return normalize(_v3(x,y,z)*divisor);}_v2 nsin(_v2 val){return sin(val)*.5+.5;}_v3 nsin(_v3 val){return sin(val)*.5+.5;}_v3 hh3(_v2 p,_f s){_v3 q=_v3(dot(p,_v2(127.1,311.7)),dot(p,_v2(269.5+pow(s,1.3),183.3+s)),dot(p,_v2(419.2,371.9+s)));return nsin(q+s);}_f iq(in _v2 x,_f u,_f v,_f s){_v2 p=floor(x);_v2 f=nsin(x*PI2*u);_f k=1.0+(63.0*.01)*pow(1.0-v,4.0);_f va=0.0;_f wt=0.0;for(_i j=-2;j<=2;j++)for(_i i=-2;i<=2;i++){_v2 g=_v2(_f(i),_f(j));_v3 o=hh3(p+g,s)*_v3(u,u,1.0);_v2 r=g-f+o.xy;_f d=dot(r,r);_f ww=pow(1.0-_smst(0.0,1.414,sqrt(d)),k);va+=o.z*ww;wt+=ww;}return va/wt;}_v2 crliq(_v2 p,_f u,_f v,_f s){const _f e=.1;_v2 dx=_v2(e,0.0);_v2 dy=_v2(0.0,e);_v2 dz=_v2(e,0.);_f p_x0=iq(p-dx,u,v,s);_f p_x1=iq(p+dx,u,v,s);_f p_y0=iq(p-dy,u,v,s);_f p_y1=iq(p+dy,u,v,s);_f p_z0=iq(p-dz,u,v,s);_f p_z1=iq(p+dz,u,v,s);_f x=p_y1-p_y0-p_z1+p_z0;_f y=p_z1-p_z0-p_x1+p_x0;_f z=p_x1-p_x0-p_y1+p_y0;const _f divisor=1.0/(2.0*e);return normalize(_v2(x,y)*divisor);}_v2 iqrep(_v3 p){return crliq(p.xy,1.1,.7,p.z);}`,yi="_v2 fade(_v2 t){return t*t*t*(t*(t*6.0-15.0)+10.0);}_f cnoise(_v2 P){_v4 Pi=floor(P.xyxy)+_v4(0.0,0.0,1.0,1.0);_v4 Pf=fract(P.xyxy)-_v4(0.0,0.0,1.0,1.0);Pi=mod(Pi,289.0);_v4 ix=Pi.xzxz;_v4 iy=Pi.yyww;_v4 fx=Pf.xzxz;_v4 fy=Pf.yyww;_v4 i=permute(permute(ix)+iy);_v4 gx=2.0*fract(i*0.024)-1.0;_v4 gy=abs(gx)-0.5;_v4 tx=floor(gx+0.5);gx=gx-tx;_v2 g00=_v2(gx.x,gy.x);_v2 g10=_v2(gx.y,gy.y);_v2 g01=_v2(gx.z,gy.z);_v2 g11=_v2(gx.w,gy.w);_v4 norm=1.793-0.853*_v4(dot(g00,g00),dot(g01,g01),dot(g10,g10),dot(g11,g11));g00*=norm.x;g01*=norm.y;g10*=norm.z;g11*=norm.w;_f n00=dot(g00,_v2(fx.x,fy.x));_f n10=dot(g10,_v2(fx.y,fy.y));_f n01=dot(g01,_v2(fx.z,fy.z));_f n11=dot(g11,_v2(fx.w,fy.w));_v2 fade_xy=fade(Pf.xy);_v2 n_x=mix(_v2(n00,n01),_v2(n10,n11),fade_xy.x);_f n_xy=mix(n_x.x,n_x.y,fade_xy.y);return 2.3*n_xy;}_v2 curlNoiseC(_v2 p){const _f e=.1;_v2 dx=_v2(e,0.0);_v2 dy=_v2(0.0,e);_v2 dz=_v2(0.0,0.0);_f p_x0=cnoise(p-dx);_f p_x1=cnoise(p+dx);_f p_y0=cnoise(p-dy);_f p_y1=cnoise(p+dy);_f p_z0=cnoise(p-dz);_f p_z1=cnoise(p+dz);_f x=p_y1-p_y0-p_z1+p_z0;_f y=p_z1-p_z0-p_x1+p_x0;const _f divisor=1.0/(2.0*e);return normalize(_v2(x,y)*divisor);}",Ai="_f pnoise3D(_v3 P,_v3 rep){_v3 Pi0=mod(floor(P),rep);_v3 Pi1=mod(Pi0+_v3(1.0),rep);Pi0=mod289(Pi0);Pi1=mod289(Pi1);_v3 Pf0=fract(P);_v3 Pf1=Pf0-_v3(1.0);_v4 ix=_v4(Pi0.x,Pi1.x,Pi0.x,Pi1.x);_v4 iy=_v4(Pi0.yy,Pi1.yy);_v4 iz0=Pi0.zzzz;_v4 iz1=Pi1.zzzz;_v4 ixy=permute(permute(ix)+iy);_v4 ixy0=permute(ixy+iz0);_v4 ixy1=permute(ixy+iz1);_v4 gx0=ixy0*(1.0/7.0);_v4 gy0=fract(floor(gx0)*(1.0/7.0))-0.5;gx0=fract(gx0);_v4 gz0=_v4(0.5)-abs(gx0)-abs(gy0);_v4 sz0=step(gz0,_v4(0.0));gx0-=sz0*(step(0.0,gx0)-0.5);gy0-=sz0*(step(0.0,gy0)-0.5);_v4 gx1=ixy1*(1.0/7.0);_v4 gy1=fract(floor(gx1)*(1.0/7.0))-0.5;gx1=fract(gx1);_v4 gz1=_v4(0.5)-abs(gx1)-abs(gy1);_v4 sz1=step(gz1,_v4(0.0));gx1-=sz1*(step(0.0,gx1)-0.5);gy1-=sz1*(step(0.0,gy1)-0.5);_v3 g000=_v3(gx0.x,gy0.x,gz0.x);_v3 g100=_v3(gx0.y,gy0.y,gz0.y);_v3 g010=_v3(gx0.z,gy0.z,gz0.z);_v3 g110=_v3(gx0.w,gy0.w,gz0.w);_v3 g001=_v3(gx1.x,gy1.x,gz1.x);_v3 g101=_v3(gx1.y,gy1.y,gz1.y);_v3 g011=_v3(gx1.z,gy1.z,gz1.z);_v3 g111=_v3(gx1.w,gy1.w,gz1.w);_v4 norm0=tisq(_v4(dot(g000,g000),dot(g010,g010),dot(g100,g100),dot(g110,g110)));g000*=norm0.x;g010*=norm0.y;g100*=norm0.z;g110*=norm0.w;_v4 norm1=tisq(_v4(dot(g001,g001),dot(g011,g011),dot(g101,g101),dot(g111,g111)));g001*=norm1.x;g011*=norm1.y;g101*=norm1.z;g111*=norm1.w;_f n000=dot(g000,Pf0);_f n100=dot(g100,_v3(Pf1.x,Pf0.yz));_f n010=dot(g010,_v3(Pf0.x,Pf1.y,Pf0.z));_f n110=dot(g110,_v3(Pf1.xy,Pf0.z));_f n001=dot(g001,_v3(Pf0.xy,Pf1.z));_f n101=dot(g101,_v3(Pf1.x,Pf0.y,Pf1.z));_f n011=dot(g011,_v3(Pf0.x,Pf1.yz));_f n111=dot(g111,Pf1);_v3 fade_xyz=fade(Pf0);_v4 n_z=mix(_v4(n000,n100,n010,n110),_v4(n001,n101,n011,n111),fade_xyz.z);vec2 n_yz=mix(n_z.xy,n_z.zw,fade_xyz.y);_f n_xyz=mix(n_yz.x,n_yz.y,fade_xyz.x);return 2.2*n_xyz;}",ki="const _v2 C=_v2(1.0/6.0,1.0/3.0);const _v4 D=_v4(0.0,0.5,1.0,2.0);_v3 i=floor(v+dot(v,C.yyy));_v3 x0=v-i+dot(i,C.xxx);_v3 g=step(x0.yzx,x0.xyz);_v3 l=1.0-g;_v3 i1=min(g.xyz,l.zxy);_v3 i2=max(g.xyz,l.zxy);_v3 x1=x0-i1+C.xxx;_v3 x2=x0-i2+C.yyy;_v3 x3=x0-D.yyy;i=mod289(i);_v4 p=permute(permute(permute(i.z+_v4(0.0,i1.z,i2.z,1.0))+i.y+_v4(0.0,i1.y,i2.y,1.0))+i.x+_v4(0.0,i1.x,i2.x,1.0));_v3 ns=0.1428*D.wyz-D.xzx;_v4 j=p-49.0*floor(p*ns.z*ns.z);_v4 x_=floor(j*ns.z);_v4 y_=floor(j-7.0*x_);_v4 x=x_*ns.x+ns.yyyy;_v4 y=y_*ns.x+ns.yyyy;_v4 h=1.0-abs(x)-abs(y);_v4 b0=_v4(x.xy,y.xy);_v4 b1=_v4(x.zw,y.zw);_v4 s0=floor(b0)*2.0+1.0;_v4 s1=floor(b1)*2.0+1.0;_v4 sh=-step(h,_v4(0.));_v4 a0=b0.xzyw+s0.xzyw*sh.xxyy;_v4 a1=b1.xzyw+s1.xzyw*sh.zzww;_v3 p0=_v3(a0.xy,h.x);_v3 p1=_v3(a0.zw,h.y);_v3 p2=_v3(a1.xy,h.z);_v3 p3=_v3(a1.zw,h.w);",Si="vec2 mod289(vec2 x){return x-floor(x*(1.0/289.0))*289.0;}vec3 mod289(vec3 x){return x-floor(x*(1.0/289.0))*289.0;}vec4 mod289(vec4 x){return x-floor(x*(1.0/289.0))*289.0;}vec3 mod7(vec3 x){return x-floor(x*(1.0/7.0))*7.0;}vec3 permute(vec3 x){return mod289(((x*34.0)+10.0)*x);}vec4 permute(vec4 x){return mod289(((x*34.0)+1.0)*x);}vec4 tisq(vec4 r){return 1.792-0.853*r;}vec3 fade(vec3 t){return t*t*t*(t*(t*6.0-15.0)+10.0);}",Mi="_f grain(_v2 tc,_v2 r,_f f,_f m){_v2 mt=tc*r;_f offset=snoise3d(vec3(mt/m,f));_f n1=pnoise3D(vec3(mt,offset),vec3(1.0/tc*r,1.0));return n1/2.0+0.5;}_f grain(_v2 tc,_v2 r,_f f){return grain(tc,r,f,2.5);}_f grain(_v2 tc,_v2 r){return grain(tc,r,0.0);}";const Ae=/(#i_ .*)/gi,br={snoise3dpart:S(ki),brightness:S(ui),contrast:S(ci),hueShift:S(_i),saturation:S(vi),blendmodes:S(di),sharpen:S(pi),changeHSVForChannel:S(fi),edge:S(gi.replace(/_ee_/g,"_t(tex, co + _v2(")),khwr:S(bi),hsl2rgb:S(mi),rgb2hsl:xi,pnoise2d:S(yi),snoise2d:S(Ci),pnoise3d:S(Ai),noiseUtils:S(Si),grain:S(Mi)};br.snoise3d=S(mr(wi));function z(r){return r=mr(r),r=S(r),r=`#version 300 es precision highp float; `+r,r}function S(r){return r=r.replace(/_i/g,"int"),r=r.replace(/_f/g,"float"),r=r.replace(/_v2/g,"vec2"),r=r.replace(/_v3/g,"vec3"),r=r.replace(/_v4/g,"vec4"),r=r.replace(/_m2/g,"mat2"),r=r.replace(/_m3/g,"mat3"),r=r.replace(/_m4/g,"mat4"),r=r.replace(/_4/g,"mat4"),r=r.replace(/_s2/g,"sampler2D"),r=r.replace(/_t/g,"texture"),r=r.replace(/_u/g,"uniform"),r=r.replace(/_gte/g,"greaterThanEqual"),r=r.replace(/_lte/g,"lessThanEqual"),r=r.replace(/_smst/g,"smoothstep"),r=r.replace(/_lay/g,"layout(location = "),r=r.replace(/_vm/g,"void main() {"),r}function mr(r){const t=Di(r);for(const e of t){const s=Ei(e);let i=br[s];i=i.replace("#define GLSLIFY 1",""),r=r.replace(e,i)}return r}function Di(r){Ae.lastIndex=0;let t=null,e=0;const s=[];for(;(t=Ae.exec(r))&&e<100;)s.push(t[0]);return s}function Ei(r){return r.replace("#i_","").replace(/ /g,"")}var Bi=`_u _v2 uArtworkSize;_u _s2 tArtwork;_u _v3 uBgColor;_u _f uBrt;_u _f uCst;_u _f uStr;_u _f uHlgt;_u _f uSh;_u _f uHa;_u _f uShb;_u _f uShs;_u _f uNs;_u _v2 uLp;_u _f uLs;_u _f uRA;_u _i uK1;_u _f uK1a;_u _i uK1b;_u _i uK2;_u _f uK2a;_u _i uK2b;in _v2 vUv;out _v4 fc; #i_ contrast #i_ brightness #i_ blendmodes #i_ sharpen #i_ khwr _v2 stdNormalMap(_f h){return-_v2(dFdx(h),dFdy(h));}_f Lum(_v3 c){return 0.299*c.r+0.587*c.g+0.114*c.b;}_v3 ClipColor(_v3 c){_f l=Lum(c);_f n=min(min(c.r,c.g),c.b);_f x=max(max(c.r,c.g),c.b);if(n<0.0)c=max((c-l)*l/(l-n)+l,0.0);if(x>1.0)c=min((c-l)*(1.0-l)/(x-l)+l,1.0);return c;}_v3 SetLum(_v3 c,_f l){c+=l-Lum(c);return ClipColor(c);}_f Sat(_v3 c){_f n=min(min(c.r,c.g),c.b);_f x=max(max(c.r,c.g),c.b);return x-n;}_v3 SetSat(_v3 c,_f s){_f ci=min(min(c.r,c.g),c.b);_f ca=max(max(c.r,c.g),c.b);_v3 r=_v3(0.0);if(ca>ci){if(c.r==ci&&c.b==ca){r.r=0.0;r.g=((c.g-ci)*s)/(ca-ci);r.b=s;}else if(c.r==ci&&c.g==ca){r.r=0.0;r.b=((c.b-ci)*s)/(ca-ci);r.g=s;}else if(c.g==ci&&c.b==ca){r.g=0.0;r.r=((c.r-ci)*s)/(ca-ci);r.b=s;}else if(c.g==ci&&c.r==ca){r.g=0.0;r.b=((c.b-ci)*s)/(ca-ci);r.r=s;}else if(c.b==ci&&c.r==ca){r.b=0.0;r.g=((c.g-ci)*s)/(ca-ci);r.r=s;}else{r.b=0.0;r.r=((c.r-ci)*s)/(ca-ci);r.g=s;}}return r;}_v3 applyHue(_v3 col,_f h){_v3 k=_v3(0.57735,0.57735,0.57735);_f ca=cos(h);return col*ca+cross(k,col)*sin(h)+k*dot(k,col)*(1.0-ca);}_vm_v2 uv=vUv;_v4 at=_t(tArtwork,uv).rgba;at.rgb=mix(uBgColor,at.rgb,at.a);at.rgba=at.rgba*uRA+(1.0-uRA)*_v4(uBgColor,1.0);_v4 kw1=khwr(tArtwork,uv,uK1,uArtworkSize);_v4 kw2=khwr(tArtwork,uv,uK2,uArtworkSize);at.rgb=blmd(uK1b,at.rgb,kw1.rgb,uK1a);at.rgb=blmd(uK2b,at.rgb,kw2.rgb,uK2a);_v3 s=sharpen(tArtwork,uv,uArtworkSize*uShs).rgb;at.rgb=blmd(2,at.rgb,s.rgb,uShb*uRA);at=bmx(uBrt)*ctmx(uCst)*at;_f amt=mix(uHlgt,uSh,1.0-Lum(at.rgb))*at.a;if(amt<0.0)amt*=2.0;_v3 res=mix(at.rgb,_v3(1.0),amt);_v3 blend=mix(_v3(1.0),pow(at.rgb,_v3(1.0/0.7)),amt);res=max(1.0-((1.0-res)/blend),0.0);res=SetLum(SetSat(at.rgb,Sat(res)),Lum(res));res=applyHue(res,uHa);const _v3 W=_v3(0.2125,0.7154,0.0721);_v3 intensity=_v3(dot(res,W));res=mix(intensity,res,uStr);at.rgb=res;_f h=(at.r+at.g+at.b)/3.;_v2 n=stdNormalMap(h);n*=uNs;
const Vr=[];function pr(){requestAnimationFrame(pr);for(const r of Vr)r()}pr();class R{constructor(){this._entities=[]}add(t){this._entities.push(t)}remove(t){const e=this._entities.indexOf(t);e!==-1&&this._entities.splice(e,1)}dispatch(...t){for(const e of this._entities)e(...t)}}const u={screen:{width:0,height:0},size:{width:2160,height:3840},dpr:1,sketch:null,renderer:null,gl:null,onRender:new R,rand:Math.random};class ie{constructor(){this.useA=!1;let t=function(e){let s=parseInt(e.substr(0,8),16),i=parseInt(e.substr(8,8),16),n=parseInt(e.substr(16,8),16),a=parseInt(e.substr(24,8),16);return function(){s|=0,i|=0,n|=0,a|=0;let l=(s+i|0)+a|0;return a=a+1|0,s=i^i>>>9,i=n+(n<<3)|0,n=n<<21|n>>>11,n=n+l|0,(l>>>0)/4294967296}};this.prngA=new t(tokenData.hash.substr(2,32)),this.prngB=new t(tokenData.hash.substr(34,32));for(let e=0;e<1e6;e+=2)this.prngA(),this.prngB()}random_dec=()=>(this.useA=!this.useA,this.useA?this.prngA():this.prngB());random_num=(t,e)=>t+(e-t)*this.random_dec();random_int=(t,e)=>Math.floor(this.random_num(t,e+1));random_bool=t=>this.random_dec()<t;random_choice=t=>t[this.random_int(0,t.length-1)]}function Fr(r=null){window.tokenData||(window.genTokenData=function(s){let i={},n="0x";for(var a=0;a<64;a++)n+=Math.floor(Math.random()*16).toString(16);return i.hash=n,i.tokenId=(s*1e6+Math.floor(Math.random()*1e3)).toString(),i},window.tokenData=genTokenData(123),r&&(tokenData.hash=r));const t=new ie(tokenData);u.rand=t.random_dec}function Rr(){const r=genTokenData(3122021);r.hash="0xs03122021m13021990z";const t=new ie(r);u.prerand=t.random_dec}function fr(){const r=new ie(tokenData);u.rand=r.random_dec}function Ur(r){tokenData.hash=r,fr()}function Nr(){tokenData=genTokenData(123)}const Ir={init:Fr,reset:fr,setHash:Ur,generateNewHash:Nr,createPrerand:Rr};function $r(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r}function Hr(r,t,e,s){return r[0]=t,r[1]=e,r[2]=s,r}class V extends Array{constructor(t=0,e=t,s=t){return super(t,e,s),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set(t,e=t,s=t){return t.length?this.copy(t):(Hr(this,t,e,s),this)}copy(t){return $r(this,t),this}}new V;let Or=1,Wr=1,be=!1;class ne{constructor(t,e={}){t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=e,this.id=Or++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let s in e)this.addAttribute(s,e[s])}addAttribute(t,e){this.attributes[t]=e,e.id=Wr++,e.size=e.size||1,e.type=e.type||(e.data.constructor===Float32Array?this.gl.FLOAT:e.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),e.target=t==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,e.normalized=e.normalized||!1,e.stride=e.stride||0,e.offset=e.offset||0,e.count=e.count||(e.stride?e.data.byteLength/e.stride:e.data.length/e.size),e.divisor=e.instanced||0,e.needsUpdate=!1,e.usage=e.usage||this.gl.STATIC_DRAW,e.buffer||this.updateAttribute(e),this.drawRange.count=Math.max(this.drawRange.count,e.count)}updateAttribute(t){const e=!t.buffer;e&&(t.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==t.buffer&&(this.gl.bindBuffer(t.target,t.buffer),this.glState.boundBuffer=t.buffer),e?this.gl.bufferData(t.target,t.data,t.usage):this.gl.bufferSubData(t.target,0,t.data),t.needsUpdate=!1}setIndex(t){this.addAttribute("index",t)}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}setInstancedCount(t){this.instancedCount=t}createVAO(t){this.VAOs[t.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.bindAttributes(t)}bindAttributes(t){t.attributeLocations.forEach((e,{name:s,type:i})=>{if(!this.attributes[s]){console.warn(`active attribute ${s} not being supplied`);return}const n=this.attributes[s];this.gl.bindBuffer(n.target,n.buffer),this.glState.boundBuffer=n.buffer;let a=1;i===35674&&(a=2),i===35675&&(a=3),i===35676&&(a=4);const l=n.size/a,h=a===1?0:a*a*4,c=a===1?0:a*4;for(let _=0;_<a;_++)this.gl.vertexAttribPointer(e+_,l,n.type,n.normalized,n.stride+h,n.offset+_*c),this.gl.enableVertexAttribArray(e+_),this.gl.renderer.vertexAttribDivisor(e+_,n.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({_pr:t,mode:e=this.gl.TRIANGLES}){this.gl.renderer.currentGeometry!==`${this.id}_${t.attributeOrder}`&&(this.VAOs[t.attributeOrder]||this.createVAO(t),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${t.attributeOrder}`),t.attributeLocations.forEach((i,{name:n})=>{const a=this.attributes[n];a.needsUpdate&&this.updateAttribute(a)});let s=2;this.attributes.index?.type===this.gl.UNSIGNED_INT&&(s=4),this.attributes.index?this.gl.drawElements(e,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*s):this.gl.drawArrays(e,this.drawRange.start,this.drawRange.count)}getPosition(){const t=this.attributes.position;if(t.data)return t;if(!be)return be=!0}remove(){for(let t in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[t]),delete this.VAOs[t];for(let t in this.attributes)this.gl.deleteBuffer(this.attributes[t].buffer),delete this.attributes[t]}}let Gr=1;const me={};class wt{constructor(t,{vertex:e,fragment:s,UNF:i={},transparent:n=!1,cullFace:a=t.BACK,frontFace:l=t.CCW,depthTest:h=!0,depthWrite:c=!0,depthFunc:_=t.LESS}={}){t.canvas||console.error("gl not passed as first argument to Program"),this.gl=t,this.UNF=i,this.id=Gr++,e||console.warn("vertex shader not supplied"),s||console.warn("fragment shader not supplied"),this.transparent=n,this.cullFace=a,this.frontFace=l,this.depthTest=h,this.depthWrite=c,this.depthFunc=_,this.blendFunc={},this.blendEquation={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA));const v=t.createShader(t.VERTEX_SHADER);t.shaderSource(v,e),t.compileShader(v),t.getShaderInfoLog(v)!==""&&console.warn(`${t.getShaderInfoLog(v)} Vertex Shader ${xe(e)}`);const f=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(f,s),t.compileShader(f),t.getShaderInfoLog(f)!==""&&console.warn(`${t.getShaderInfoLog(f)} Fragment Shader ${xe(s)}`),this._pr=t.createProgram(),t.attachShader(this._pr,v),t.attachShader(this._pr,f),t.linkProgram(this._pr),!t.getProgramParameter(this._pr,t.LINK_STATUS))return console.warn(t.getProgramInfoLog(this._pr));t.deleteShader(v),t.deleteShader(f),this.uniformLocations=new Map;let A=t.getProgramParameter(this._pr,t.ACTIVE_UNIFORMS);for(let g=0;g<A;g++){let p=t.getActiveUniform(this._pr,g);this.uniformLocations.set(p,t.getUniformLocation(this._pr,p.name));const m=p.name.match(/(\w+)/g);p.uniformName=m[0],m.length===3?(p.isStructArray=!0,p.structIndex=Number(m[1]),p.structProperty=m[2]):m.length===2&&isNaN(Number(m[1]))&&(p.isStruct=!0,p.structProperty=m[1])}this.attributeLocations=new Map;const b=[],C=t.getProgramParameter(this._pr,t.ACTIVE_ATTRIBUTES);for(let g=0;g<C;g++){const p=t.getActiveAttrib(this._pr,g),m=t.getAttribLocation(this._pr,p.name);m!==-1&&(b[m]=p.name,this.attributeLocations.set(p,m))}this.attributeOrder=b.join("")}setBlendFunc(t,e,s,i){this.blendFunc.src=t,this.blendFunc.dst=e,this.blendFunc.srcAlpha=s,this.blendFunc.dstAlpha=i,t&&(this.transparent=!0)}setBlendEquation(t,e){this.blendEquation.modeRGB=t,this.blendEquation.modeAlpha=e}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha)}use({flipFaces:t=!1}={}){let e=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this._pr),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((i,n)=>{let a=n.uniformName,l=this.UNF[a];if(l.value.texture)return e=e+1,l.value.update(e),ee(this.gl,n.type,i,e);if(l.value.length&&l.value[0].texture){const h=[];return l.value.forEach(c=>{e=e+1,c.update(e),h.push(e)}),ee(this.gl,n.type,i,h)}ee(this.gl,n.type,i,l.value)}),this.applyState(),t&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this._pr)}}function ee(r,t,e,s){s=s.length?jr(s):s;const i=r.renderer.state.uniformLocations.get(e);if(s.length)if(i===void 0||i.length!==s.length)r.renderer.state.uniformLocations.set(e,s.slice(0));else{if(qr(i,s))return;i.set?i.set(s):Kr(i,s),r.renderer.state.uniformLocations.set(e,i)}else{if(i===s)return;r.renderer.state.uniformLocations.set(e,s)}switch(t){case 5126:return s.length?r.uniform1fv(e,s):r.uniform1f(e,s);case 35664:return r.uniform2fv(e,s);case 35665:return r.uniform3fv(e,s);case 35666:return r.uniform4fv(e,s);case 35670:case 5124:case 35678:case 35680:return s.length?r.uniform1iv(e,s):r.uniform1i(e,s);case 35671:case 35667:return r.uniform2iv(e,s);case 35672:case 35668:return r.uniform3iv(e,s);case 35673:case 35669:return r.uniform4iv(e,s);case 35674:return r.uniformMatrix2fv(e,!1,s);case 35675:return r.uniformMatrix3fv(e,!1,s);case 35676:return r.uniformMatrix4fv(e,!1,s)}}function xe(r){let t=r.split(` `);for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join(` `)}function jr(r){const t=r.length,e=r[0].length;if(e===void 0)return r;const s=t*e;let i=me[s];i||(me[s]=i=new Float32Array(s));for(let n=0;n<t;n++)i.set(r[n],n*e);return i}function qr(r,t){if(r.length!==t.length)return!1;for(let e=0,s=r.length;e<s;e++)if(r[e]!==t[e])return!1;return!0}function Kr(r,t){for(let e=0,s=r.length;e<s;e++)r[e]=t[e]}new V;let Xr=1;class Yr{constructor({canvas:t=document.createElement("canvas"),width:e=300,height:s=150,dpr:i=1,alpha:n=!1,depth:a=!0,stencil:l=!1,antialias:h=!1,premultipliedAlpha:c=!1,preserveDrawingBuffer:_=!1,powerPreference:v="default",autoClear:f=!0,webgl:A=2}={}){const b={alpha:n,depth:a,stencil:l,antialias:h,premultipliedAlpha:c,preserveDrawingBuffer:_,powerPreference:v};this.dpr=i,this.alpha=n,this.color=!0,this.depth=a,this.stencil=l,this.premultipliedAlpha=c,this.autoClear=f,this.id=Xr++,A===2&&(this.gl=t.getContext("webgl2",b)),this.isWebgl2=!!this.gl,this.gl||(this.gl=t.getContext("webgl",b)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(e,s),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=null,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LESS,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2&&(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(t,e){this.width=t,this.height=e,this.gl.canvas.width=t*this.dpr,this.gl.canvas.height=e*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:t+"px",height:e+"px"})}setViewport(t,e,s=0,i=0){this.state.viewport.width===t&&this.state.viewport.height===e||(this.state.viewport.width=t,this.state.viewport.height=e,this.state.viewport.x=s,this.state.viewport.y=i,this.gl.viewport(s,i,t,e))}setScissor(t,e,s=0,i=0){this.gl.scissor(s,i,t,e)}enable(t){this.state[t]!==!0&&(this.gl.enable(t),this.state[t]=!0)}disable(t){this.state[t]!==!1&&(this.gl.disable(t),this.state[t]=!1)}setBlendFunc(t,e,s,i){this.state.blendFunc.src===t&&this.state.blendFunc.dst===e&&this.state.blendFunc.srcAlpha===s&&this.state.blendFunc.dstAlpha===i||(this.state.blendFunc.src=t,this.state.blendFunc.dst=e,this.state.blendFunc.srcAlpha=s,this.state.blendFunc.dstAlpha=i,s!==void 0?this.gl.blendFuncSeparate(t,e,s,i):this.gl.blendFunc(t,e))}setBlendEquation(t,e){t=t||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===t&&this.state.blendEquation.modeAlpha===e)&&(this.state.blendEquation.modeRGB=t,this.state.blendEquation.modeAlpha=e,e!==void 0?this.gl.blendEquationSeparate(t,e):this.gl.blendEquation(t))}setCullFace(t){this.state.cullFace!==t&&(this.state.cullFace=t,this.gl.cullFace(t))}setFrontFace(t){this.state.frontFace!==t&&(this.state.frontFace=t,this.gl.frontFace(t))}setDepthMask(t){this.state.depthMask!==t&&(this.state.depthMask=t,this.gl.depthMask(t))}setDepthFunc(t){this.state.depthFunc!==t&&(this.state.depthFunc=t,this.gl.depthFunc(t))}activeTexture(t){this.state.activeTextureUnit!==t&&(this.state.activeTextureUnit=t,this.gl.activeTexture(this.gl.TEXTURE0+t))}bindFramebuffer({target:t=this.gl.FRAMEBUFFER,buffer:e=null}={}){this.state.framebuffer!==e&&(this.state.framebuffer=e,this.gl.bindFramebuffer(t,e))}getExtension(t,e,s){return e&&this.gl[e]?this.gl[e].bind(this.gl):(this.extensions[t]||(this.extensions[t]=this.gl.getExtension(t)),e?this.extensions[t]?this.extensions[t][s].bind(this.extensions[t]):null:this.extensions[t])}getRenderList({scene:t,camera:e,frustumCull:s,sort:i}){let n=[];return t.traverse(a=>{if(!a.visible)return!0;a.draw&&n.push(a)}),n}render({scene:t,camera:e,target:s=null,update:i=!0,sort:n=!0,frustumCull:a=!0,clear:l}){s===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(s),this.setViewport(s.width,s.height)),(l||this.autoClear&&l!==!1)&&(this.depth&&(!s||s.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),i&&t.updateMatrixWorld(),e&&e.updateMatrixWorld(),this.getRenderList({scene:t,camera:e,frustumCull:a,sort:n}).forEach(c=>{c.draw({camera:e})})}}class Zr extends Array{constructor(t=0,e=0,s=0,i=1){return super(t,e,s,i),this.och=()=>{},this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this[0]=t,this.och()}set y(t){this[1]=t,this.och()}set z(t){this[2]=t,this.och()}set w(t){this[3]=t,this.och()}}function Qr(r,t,e,s,i){let n=1/Math.tan(t/2),a=1/(s-i);return r[0]=n/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=n,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+s)*a,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*s*a,r[15]=0,r}class H extends Array{constructor(t=1,e=0,s=0,i=0,n=0,a=1,l=0,h=0,c=0,_=0,v=1,f=0,A=0,b=0,C=0,g=1){return super(t,e,s,i,n,a,l,h,c,_,v,f,A,b,C,g),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(t){this[12]=t}set y(t){this[13]=t}set z(t){this[14]=t}set w(t){this[15]=t}multiply(t,e){return this}identity(){}copy(t){return this}fromPerspective({fov:t,aspect:e,near:s,far:i}={}){return Qr(this,t,e,s,i),this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}compose(t,e,s){return this}getRotation(t){return this}getTranslation(t){return this}getScaling(t){return this}}new H;class Jr extends Array{constructor(t=0,e=t,s=t,i="YXZ"){return super(t,e,s),this.order=i,this.och=()=>{},this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t,this.och()}set y(t){this[1]=t,this.och()}set z(t){this[2]=t,this.och()}set(t,e=t,s=t){return t.length?this.copy(t):(this[0]=t,this[1]=e,this[2]=s,this.och(),this)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.och(),this}reorder(t){}fromRotationMatrix(t,e=this.order){}fromQuaternion(t,e=this.order){}fromArray(t,e=0){}toArray(t=[],e=0){}}class Zt{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new H,this.WMX=new H,this.matrixAutoUpdate=!0,this.position=new V,this.quaternion=new Zr,this.scale=new V(1),this.rotation=new Jr,this.up=new V(0,1,0),this.rotation.och=()=>this.quaternion.fromEuler(this.rotation),this.quaternion.och=()=>this.rotation.fromQuaternion(this.quaternion)}setParent(t,e=!0){this.parent&&t!==this.parent&&this.parent.removeChild(this,!1),this.parent=t,e&&t&&t.addChild(this,!1)}addChild(t,e=!0){~this.children.indexOf(t)||this.children.push(t),e&&t.setParent(this,!1)}removeChild(t,e=!0){~this.children.indexOf(t)&&this.children.splice(this.children.indexOf(t),1),e&&t.setParent(null,!1)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.WMXNeedsUpdate||t)&&(this.parent===null?this.WMX.copy(this.matrix):this.WMX.multiply(this.parent.WMX,this.matrix),this.WMXNeedsUpdate=!1,t=!0);for(let e=0,s=this.children.length;e<s;e++)this.children[e].updateMatrixWorld(t)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.WMXNeedsUpdate=!0}traverse(t){if(!t(this))for(let e=0,s=this.children.length;e<s;e++)this.children[e].traverse(t)}lookAt(t,e=!1){this.matrix.getRotation(this.quaternion),this.rotation.fromQuaternion(this.quaternion)}}const ti=new H;class gr extends Zt{constructor(t,{near:e=.1,far:s=100,fov:i=45,aspect:n=1,left:a,right:l,bottom:h,top:c,zoom:_=1}={}){super(),Object.assign(this,{near:e,far:s,fov:i,aspect:n,left:a,right:l,bottom:h,top:c,zoom:_}),this.projectionMatrix=new H,this.viewMatrix=new H,this.projectionViewMatrix=new H,this.worldPosition=new V,this.type="perspective",this.perspective()}perspective({near:t=this.near,far:e=this.far,fov:s=this.fov,aspect:i=this.aspect}={}){return Object.assign(this,{near:t,far:e,fov:s,aspect:i}),this.projectionMatrix.fromPerspective({fov:s*(Math.PI/180),aspect:i,near:t,far:e}),this.type="perspective",this}updateMatrixWorld(){return super.updateMatrixWorld(),this.WMX.getTranslation(this.worldPosition),this.projectionViewMatrix.multiply(this.projectionMatrix,this.viewMatrix),this}lookAt(t){return super.lookAt(t,!0),this}project(t){return t.applyMatrix4(this.viewMatrix),t.applyMatrix4(this.projectionMatrix),this}unproject(t){return t.applyMatrix4(ti.inverse(this.projectionMatrix)),t.applyMatrix4(this.WMX),this}}class ei extends Array{constructor(t=1,e=0,s=0,i=0,n=1,a=0,l=0,h=0,c=1){return super(t,e,s,i,n,a,l,h,c),this}set(t,e,s,i,n,a,l,h,c){return t.length?this.copy(t):this}translate(t,e=this){return this}rotate(t,e=this){return this}scale(t,e=this){return this}multiply(t,e){return this}identity(){return this}copy(t){return this}fromMatrix4(t){return this}fromQuaternion(t){return this}fromBasis(t,e,s){return this}inverse(t=this){return this}getNormalMatrix(t){return this}}let si=0;class yt extends Zt{constructor(t,{geometry:e,_pr:s,mode:i=t.TRIANGLES,frustumCulled:n=!0,renderOrder:a=0}={}){super(),t.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=t,this.id=si++,this.geometry=e,this._pr=s,this.mode=i,this.frustumCulled=n,this.renderOrder=a,this.modelViewMatrix=new H,this.normalMatrix=new ei}draw({camera:t}={}){t&&(this._pr.UNF.modelMatrix||Object.assign(this._pr.UNF,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this._pr.UNF.projectionMatrix.value=t.projectionMatrix,this._pr.UNF.cameraPosition.value=t.worldPosition,this._pr.UNF.viewMatrix.value=t.viewMatrix,this.modelViewMatrix.multiply(t.viewMatrix,this.WMX),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this._pr.UNF.modelMatrix.value=this.WMX,this._pr.UNF.modelViewMatrix.value=this.modelViewMatrix,this._pr.UNF.normalMatrix.value=this.normalMatrix),this._pr.use(),this.geometry.draw({mode:this.mode,_pr:this._pr})}}const ri=new Uint8Array(4);let ii=1;class Qt{constructor(t,{image:e,target:s=t.TEXTURE_2D,type:i=t.UNSIGNED_BYTE,format:n=t.RGBA,internalFormat:a=n,wrapS:l=t.CLAMP_TO_EDGE,wrapT:h=t.CLAMP_TO_EDGE,generateMipmaps:c=!0,minFilter:_=c?t.NEAREST_MIPMAP_LINEAR:t.LINEAR,magFilter:v=t.LINEAR,premultiplyAlpha:f=!1,unpackAlignment:A=4,flipY:b=s==t.TEXTURE_2D,anisotropy:C=0,level:g=0,width:p,height:m=p}={}){this.gl=t,this.id=ii++,this.image=e,this.target=s,this.type=i,this.format=n,this.internalFormat=a,this.minFilter=_,this.magFilter=v,this.wrapS=l,this.wrapT=h,this.generateMipmaps=c,this.premultiplyAlpha=f,this.unpackAlignment=A,this.flipY=b,this.anisotropy=Math.min(C,this.gl.renderer.parameters.maxAnisotropy),this.level=g,this.width=p,this.height=m,this.texture=this.gl.createTexture(),this.store={image:null},this.glState=this.gl.renderer.state,this.state={},this.state.minFilter=this.gl.NEAREST_MIPMAP_LINEAR,this.state.magFilter=this.gl.LINEAR,this.state.wrapS=this.gl.REPEAT,this.state.wrapT=this.gl.REPEAT,this.state.anisotropy=0}bind(){this.glState.textureUnits[this.glState.activeTextureUnit]!==this.id&&(this.gl.bindTexture(this.target,this.texture),this.glState.textureUnits[this.glState.activeTextureUnit]=this.id)}update(t=0){const e=!(this.image===this.store.image&&!this.needsUpdate);(e||this.glState.textureUnits[t]!==this.id)&&(this.gl.renderer.activeTexture(t),this.bind()),e&&(this.needsUpdate=!1,this.flipY!==this.glState.flipY&&(this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,this.flipY),this.glState.flipY=this.flipY),this.premultiplyAlpha!==this.glState.premultiplyAlpha&&(this.gl.pixelStorei(this.gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),this.glState.premultiplyAlpha=this.premultiplyAlpha),this.unpackAlignment!==this.glState.unpackAlignment&&(this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,this.unpackAlignment),this.glState.unpackAlignment=this.unpackAlignment),this.minFilter!==this.state.minFilter&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.minFilter),this.state.minFilter=this.minFilter),this.magFilter!==this.state.magFilter&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.magFilter),this.state.magFilter=this.magFilter),this.wrapS!==this.state.wrapS&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.wrapS),this.state.wrapS=this.wrapS),this.wrapT!==this.state.wrapT&&(this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.wrapT),this.state.wrapT=this.wrapT),this.image?(this.image.width&&(this.width=this.image.width,this.height=this.image.height),ArrayBuffer.isView(this.image)?this.gl.texImage2D(this.target,this.level,this.internalFormat,this.width,this.height,0,this.format,this.type,this.image)
ectionMatrix(),this._renderTarget=new THREE.WebGLRenderTarget(this._width,this._height,{wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBFormat}),this._renderTarget.texture.generateMipmaps=!1}_createUniforms(){this._uniforms={uScale:{value:1},uStrength:{value:1},uTime:{value:0},uSaturation:{value:1},uContrast:{value:1},uIsAbs:{value:0},uIsBlackAndWhite:{value:0},uRatio:{value:new THREE.Vector2(1,1)},uAnimTime:{value:0}}}draw(){let s=o.displacementData;this._uniforms.uScale.value=s.scale,this._uniforms.uStrength.value=s.strength,this._uniforms.uTime.value=s.time,this._uniforms.uAnimTime.value=0,this._uniforms.uSaturation.value=s.saturation,this._uniforms.uContrast.value=s.contrast,this._uniforms.uIsAbs.value=s.isAbs,this._uniforms.uIsBlackAndWhite.value=s.isBlackAndWhite,this._uniforms.uRatio.value.y=this._height/this._width,this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0),this._renderer.render(this._mesh,this._camera),this._renderer.setRenderTarget(null)}get textureArtwork(){return this._renderTarget.texture}};var it=y(z());var d0=class{generate(s){let t=o.displacementData,e=n.rand();t.displacementType=M0.REASONABLE;let a=[1,.55,.3,1.18,.9],l=[1.1,1.4,1,1.25,1.35,1.2,1.5],i=n.rand(),m=n.rand();i<.12?t.scale=a[a.length*m>>0]:i<.24?t.scale=l[l.length*m>>0]:t.scale=.2+e*.4+f(0,.2,3)*0+f(0,.9,3);let c=n.rand()*2,h=f(2,0,3),d=f(0,4,4),g=f(0,2,5);t.strength=1+c+h+d+g,t.strength=Math.min(5.5,t.strength),L()&&(t.strength*=-1),t.time=n.rand()*10,t.isBlackAndWhite=!0,t.contrast=s?.2:.15,t.strength>5&&(t.scale=Math.min(t.scale,1)),(t.strength>8||t.scale>=1)&&(t.contrast=.12)}};var u0=class{generate(){let s=o.layersData;s.clearBetweenLayers=!1,s.invertColorsLayers=!1,s.patternMode=P.GLOBAL,s.patternType=z0.GRID,this.canBoostDispTexScale=!1,this.canDeboostDispDefScale=!1,this.type=0;let t=s.globalPatternData;t.shape=P0.SQUARE,this._generate()}_generate(){let s=o.layersData,t=s.globalPatternData,e=o.displacementData;t.chancesToStroke=0,t.strokesWidth=15,t.isCircleHalf=!1,t.chancesToSkip=.6,t.chancesToFill=.575;let a=n.rand(),l=n.rand(),i=n.rand();if(t.strokesWidth=10,a<.125)t.cols=2+n.rand()*3>>0,t.lines=Math.max(3,2+n.rand()*3>>0),n.composition="Very minimalistic";else if(a<.2)t.cols=5+f(0,10,6)>>0,t.lines=6+f(0,12,6)>>0,n.composition="Minimalistic";else if(a<.65)t.cols=9+n.rand()*12+f(0,10,4)+f(0,64,9),t.lines=t.cols*1.4,n.composition="Balanced";else if(a<.85)t.cols=4+n.rand()*27+f(0,7,4)+f(0,35,9),t.lines=4+n.rand()*32+f(0,7,4)+f(0,35,9),n.composition="Free";else{let d=3+i*2;l<.5?(t.cols=40+n.rand()*60>>0,t.lines=t.cols/d>>0):(t.lines=20+n.rand()*80>>0,t.cols=t.lines/(d*2)>>0),n.composition="Unbalanced"}t.cols>45&&t.lines>45&&(t.strokesWidth=7);let m=.2;(t.lines>=16&&t.cols>=16||t.lines>24||t.cols>24)&&(m=.4);let c=m-.2;t.turbulence=0,t.lines<10&&t.cols>10&&t.lines*2>t.cols&&(t.cols=t.lines*2),s.clearBetweenLayers=!0,s.invertColorsLayers=!0;let h=n.rand();t.chancesToStroke=m+h*(.55-c)+f(.25,0,3),t.chancesToFill=.68+n.rand()*.12,(t.cols>40&&t.lines>30||t.lines>40&&t.cols>30)&&(t.chancesToFill+=.1),t.cols<=10&&t.lines<=10&&(e.scale*=.87,e.scale=Math.max(.2,e.scale),e.scale=Math.min(e.scale,.98))}};function _e(){let r=o.displacementData,s=Math.abs(r.strength),t=r.scale<=.8?r.scale:1,e=s*t;return s>=5.5&&r.scale>.55?"Extreme":e<=.9?"Very small":e<2?"Small":e<3.1?"Medium":e<4.3?"Big":"Extreme"}function ye(){let r=o.layersData.globalDeformerData.glitchVerticalBand+o.layersData.globalDeformerData.glitchHorizontalBand;return r<=0?"None":r<.25?"Small":r<.5?"Medium":r<.65?"Strong":"Extreme"}function R0(){let s=o.layersData.globalPatternData;return{Palette:`Palette ${o.idxStyle}`||"Merveilleuse","Layer Count":o.layersData.count,"Columns count":s.cols>>0,"Lines count":s.lines>>0,Evolution:_e(),Perturbations:ye(),Composition:n.composition}}var g0=class{constructor(s){this._onChangeSeed=s,this._displacementGenerator=new d0,this._gridGenerator=new u0,this.onGeneration=new it.Signal}generateDisplacement=()=>{this._onChangeSeed(),this._displacementGenerator.generate(this.type),this.onGeneration.dispatch()};generateWithoutDisplacement=()=>{this.generate(!1)};generate=(s=!0)=>{this._onChangeSeed();let e=n.rand()<.045;this._currentGenerator=this._gridGenerator,this.type="grid",s&&this._displacementGenerator.generate(e),this._currentGenerator.generate(),this._generateDeformersForGrid(),this._generateGlitch(),this.adjustGenerationBasedOnStyle(),this.onGeneration.dispatch()};adjustGenerationBasedOnStyle=()=>{let s=o.layersData,t=s.globalPatternData,e=o.layersData.globalDeformerData,a=n.rand()*Math.PI*2,l=1.7;for(let i of s.layersData){if(i.rotationValue=a,a+=l,this._currentGenerator===this._gridGenerator&&(t.cols>25||t.lines>25)){let m=250;(t.cols>32||t.lines>32)&&(m=180),i.segmentLengthMax>=m&&(i.segmentLengthMax=$s(i.segmentLengthMax,5,300,40,m,!0))}e.displacementDistance>1.9&&(i.rotationType=0)}};_generateDeformersForGrid(){let t=o.layersData.globalPatternData,e=o.layersData.globalDeformerData;e.deformersOrder=U.DISP_GLITCH,e.glitchMirrorChanceVertical=0,e.glitchMirrorChanceHorizontal=0,e.displacementDistance=1,e.displacementScale=1,e.displacementUseRandomAngle=!1,e.displacementAngle=n.rand(),e.displacementAngle=e.displacementAngle*360-180,e.displacementIncrementAngle=10}_generateGlitch(){let t=o.layersData.globalDeformerData;t.glitchHorizontalBand=0,t.glitchVerticalBand=0,t.glitchAmount=0;let e=n.rand(),a=n.rand(),l=n.rand(),i=f(0,1,4),m=L(.23);m&&(t.glitchHorizontalBand=.15+e*.3+i*.4,t.glitchHorizontalBandPos=l<.5?a*.25:1-a*.25,t.glitchHorizontalBandMirror=l<.1),e=n.rand(),a=n.rand(),l=n.rand(),i=f(0,1,4),L(m?.05:.175)&&(t.glitchVerticalBand=.15+e*.2+i*.4,t.glitchVerticalBandPos=Math.max(0,Math.min(a,1-t.glitchVerticalBand)),t.glitchVerticalBandMirror=!1)}};function j0(r){let s=document.createElement("a");s.setAttribute("download","tout_trace-"+tokenData.hash+".png"),s.setAttribute("href",r.toDataURL("image/png").replace("image/png","image/octet-stream")),s.click()}var f0=class extends W{constructor(s,t){if(super(s,t,!1),window.addEventListener("keydown",e=>{e.key==="s"?j0(this._renderer.domElement):e.key==="h"&&window.open(window.location.href+"?hd=1","_blank").focus()}),this._counterToDraw=0,this._tick=0,o.onRedrawRequired.add(this._onRedrawRequired),o.onDisplacementRegenerationRequired.add(this._onDisplacementRegenerationRequired),o.onPatternRegenerationRequired.add(this._onPatternRegenerationRequired),this.initWebGL(),this._forceSeed)this._onChangeSeed();else{let e=new M;n.rand=e.random_dec,U0()}if(this._displacementTexture=new p0(this._renderer,this.width,this.height),this._artwork=new m0(this._renderer,this._displacementTexture,this.width,this.height),this._forceStyle){let e=T0(this._forceStyle);o.setStyle(e.data,e.id,e.__idx)}else{let e=Os();o.setStyle(e.data,e.id,e.__idx)}this._generator=new g0(this._onChangeSeed),this._generator.generate(),this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0,B.onUpdate.add(this._onUpdate)}_onDisplacementRegenerationRequired=()=>{this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onPatternRegenerationRequired=()=>{this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onRedrawRequired=()=>{this._isDrawRequired=!0};_onUpdate=s=>{this._counterToDraw+=s,(this._isPatternGenerationRequired||this._isDisplacementGenerationRequired||this._isDrawRequired)&&(Ys(),this._artwork.reset(),this._tick=0),this._isDisplacementGenerationRequired&&this._displacementTexture?.draw(),!this._artwork?.isFullyDrawn&&this._counterToDraw>30&&(this._artwork?.drawAnimated()&&(this._renderer.setRenderTarget(null),this._renderArtwork()),this._counterToDraw=0,this._tick+=1),this._isDisplacementGenerationRequired=!1,this._isPatternGenerationRequired=!1,this._isDrawRequired=!1};_renderArtwork(){this._applyPostprocessData(),this.artwork=this._artwork.textureArtwork,this.setBgColor(o.globalData.backgroundColorGL),this._renderWebGL()}_applyPostprocessData(){let s=Math.min(this._artwork.percent,1),t=st(Math.min(s*2,1)),e=tt(s),a=o.postprocessData;this.optionsPost.brightness=a.brightness,this.optionsPost.contrast=a.contrast,this.optionsPost.saturation=a.saturation*t,this.optionsPost.highlights=a.highlights,this.optionsPost.shadows=a.shadows,this.optionsPost.hue=a.hue,this.optionsPost.noise=a.noise,this.optionsPost.noiseRepeat=a.noiseRepeat,this.optionsPost.sharpenBlur=a.sharpenBlur*e,this.optionsPost.sharpenSize=a.sharpenSize,this.optionsPost.normalStr=a.normalStr*e,this.optionsPost.lightPosX=a.lightPosX,this.optionsPost.lightPosY=a.lightPosY,this.optionsPost.lightStr=a.lightStr*e,this.optionsPost.enableNormal=a.enableNormal}_onChangeSeed=()=>{this.changeSeed(),this._forceSeed&&(tokenData.hash=this._forceSeed),this._resetHashes(),U0(),this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};get generator(){return this._generator}};console.log("-------------------");console.log("Author: Florian Zumbrunn");console.log("@florianzumbrunn // https://florianzumbrunn.com");console.log("~");console.log("Series: Tout trac\xE9");console.log("~");console.log("-------------------");console.log("PROD");(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))&&(n.dpr=.2,n.linesWidthHeight=125,n.isMobile=!0);function lt(){Pe(window.innerWidth,window.innerHeight)}var ze=new f0(n.size.width*n.resolution,n.size.height*n.resolution);window.addEventListener("resize",lt,!1);lt();function Pe(r=512,s=512){s=Math.min(s,n.size.height);let t=Math.min(s/n.size.height,1);r=n.size.width*t,ze.resize(r,s)}var Bl=R0();window.calculateFeatures=R0;})(); /** @license * JS Signals <http://millermedeiros.github.com/js-signals/> * Released under the MIT license * Author: Miller Medeiros * Version: 1.0.0 - Build: 268 (2012/11/29 05:48 PM) */
Vector2(this._width,this._height)},ugenhash:{type:"f",value:x()*15e6+10},uCountLines:{type:"f",value:1e5},uLineWidth:{type:"f",value:10},uLineWidthRandomAdd:{type:"f",value:5},uLineWidthRandomPower:{type:"f",value:8},uSegmentLengthMin:{type:"f",value:0},uSegmentLengthMax:{type:"f",value:0},uSegmentLengthPower:{type:"f",value:4},uRotationType:{type:"f",value:1},uRotationNoise:{type:"v2",value:new THREE.Vector2(0,0)},uRotationDir:{type:"f",value:0},uColor:{type:"v3",value:new THREE.Vector3(.5,.5,.5)},uAlpha:{type:"f",value:1},uHueRand:{type:"v2",value:new THREE.Vector2(0,0)},uSaturationRand:{type:"v2",value:new THREE.Vector2(0,0)},uLuminosityRand:{type:"v2",value:new THREE.Vector2(0,0)},uColorAdjustementValue:{type:"f",value:1},uColorAdjustementScale:{type:"f",value:1},uDontUsePattern:{type:"f",value:0},uVisibleThreshold:{type:"f",value:.01},uModSatPercentBased:{type:"f",value:.2},uModLumPercentBased:{type:"f",value:.125},uAnimTime:{type:"f",value:0},uNormalStr:{type:"f",value:10},uLightPos:{type:"v2",value:new THREE.Vector2(-.3,.8)},uLightStr:{type:"f",value:.1},uIsShadow:{type:"f",value:0},uCountLinesStep:{type:"f",value:0},uCountToAdd:{type:"f",value:0}}})}_generateRands(){let s=this._linesHolder.lines;for(let t of s)t.x=x(),t.y=x()}prepare(s,t,e=1,a=!1,l=0,i=1e6,m=0){let c=this._material.uniforms,h=o.layersData.layersData[s],d=Ks(a?h.colorShadow:h.color);c.tPattern.value=t,c.uColor.value.x=d.h/360,c.uColor.value.y=d.s/100,c.uColor.value.z=d.l/100,c.uCountLines.value=h.countLines*e,c.uLineWidth.value=h.lineWidth,c.uLineWidthRandomAdd.value=h.lineWidthRandomAdd,c.uLineWidthRandomPower.value=h.lineWidthRandomPower,c.uSegmentLengthMin.value=h.segmentLengthMin,c.uSegmentLengthMax.value=h.segmentLengthMax,c.uSegmentLengthPower.value=h.segmentLengthPower,c.uRotationType.value=a?h.shadowRotation:h.rotationType,c.uAlpha.value=a?h.alphaShadow:h.alpha,c.uHueRand.value.x=h.hueMin,c.uHueRand.value.y=h.hueMax,c.uSaturationRand.value.x=h.saturationMin,c.uSaturationRand.value.y=h.saturationMax,c.uLuminosityRand.value.x=h.luminosityMin,c.uLuminosityRand.value.y=h.luminosityMax,c.uColorAdjustementValue.value=h.colorAdjustmentValue,c.uColorAdjustementScale.value=h.colorAdjustmentScale,c.uModSatPercentBased.value=h.modSatPercentBased,c.uModLumPercentBased.value=h.modLumPercentBased,c.uAnimTime.value=0,c.uIsShadow.value=a?1:0,c.uCountLinesStep.value=l,c.uCountToAdd.value=i,c.uRotationDir.value=h.rotationValue,c.uDontUsePattern.value=h.dontUsePattern,c.uVisibleThreshold.value=h.visibleThreshold}get mesh(){return this._linesHolder}};var Di=Math.PI/2,Ti=Math.PI*2;function st(r){return-.5*(Math.cos(Math.PI*r)-1)}function tt(r){return r*r}function et(r){let s=r-1;return s*s*s+1}var rt="precision highp float;uniform sampler2D uArtworkTexture;uniform sampler2D uPatternTexture;uniform vec2 uArtworkSize;uniform float uNormalStr;uniform vec2 uLightPos;uniform float uLightStr;varying vec2 vUv;vec2 stdNormalMap(float height){return-vec2(dFdx(height),dFdy(height));}vec3 blendMultiply(vec3 base,vec3 blend){return base*blend;}void main(){vec4 artwork=texture2D(uArtworkTexture,vUv);vec4 pattern=texture2D(uPatternTexture,vUv);float sharpenSize=0.2;vec2 areaSize=sharpenSize/uArtworkSize;vec4 c1=texture2D(uArtworkTexture,mod(vUv-areaSize,1.));vec4 c2=texture2D(uArtworkTexture,mod(vec2(vUv.x,vUv.y-areaSize.y),1.));vec4 c3=texture2D(uArtworkTexture,mod(vec2(vUv.x+areaSize.x,vUv.y-areaSize.y),1.));vec4 c4=texture2D(uArtworkTexture,mod(vec2(vUv.x-areaSize.x,vUv.y),1.));vec4 c5=texture2D(uArtworkTexture,mod(vec2(vUv.x+areaSize.x,vUv.y),1.));vec4 c6=texture2D(uArtworkTexture,mod(vec2(vUv.x-areaSize.x,vUv.y+areaSize.y),1.));vec4 c7=texture2D(uArtworkTexture,mod(vec2(vUv.x,vUv.y+areaSize.y),1.));vec4 c8=texture2D(uArtworkTexture,mod(vUv+areaSize,1.));vec4 blur=(c1+c3+c6+c8+2.*(c2+c4+c5+c7)+4.*artwork)/16.;vec4 artwork2=(1.+sharpenSize)*artwork-sharpenSize*blur;float height=(artwork2.r+artwork2.g+artwork2.b)/3.;vec2 normal=stdNormalMap(height);normal*=uNormalStr;normal+=.5;float lighting=dot(normal,normalize(uLightPos));artwork.rgb+=lighting*uLightStr*.82*.5;height=(pattern.r+pattern.g+pattern.b)/3.;normal=stdNormalMap(height);normal*=uNormalStr;normal+=.5;lighting=dot(normal,normalize(-uLightPos));artwork.rgb+=lighting*uLightStr*.25;gl_FragColor=artwork;}";var m0=class{constructor(s,t,e,a){this._renderer=s,this._displacementTexture=t,this._width=e,this._height=a,this._patternsCreator=new i0(this._width,this._height,this._renderer,this._displacementTexture),this._artworkLayer=new h0(this._width,this._height,this._displacementTexture),this._idxLayer=0,this._createEngine()}_createEngine(){this._scene=new THREE.Scene,this._camera=new THREE.PerspectiveCamera(45,this._width/this._height,1e-4,1e4),this._camera.updateProjectionMatrix();let s={wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBFormat};this._renderTarget=new THREE.WebGLRenderTarget(this._width,this._height,s),this._renderTarget.texture.generateMipmaps=!1,this._renderTarget2=new THREE.WebGLRenderTarget(this._width,this._height,s),this._renderTarget2.texture.generateMipmaps=!1,this._materialEdges=new THREE.ShaderMaterial({vertexShader:D,fragmentShader:rt,uniforms:{uArtworkSize:{type:"v2",value:new THREE.Vector2(this._width,this._height)},uArtworkTexture:{type:"t",value:null},uPatternTexture:{type:"t",value:null},uNormalStr:{type:"f",value:10},uLightPos:{type:"v2",value:new THREE.Vector2(-.3,.8)},uLightStr:{type:"f",value:.1}},side:THREE.DoubleSide,transparent:!0}),this._geometry=new THREE.PlaneBufferGeometry(2,2),this._meshEdges=new THREE.Mesh(this._geometry,this._materialEdges)}reset(){this._currentIdxLayer=0,this._currentCountLines=0,this._patternsCreator.reset(),this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0)}draw(){this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0);let s=o.postprocessData;this._materialEdges.uniforms.uLightPos.value.x=s.lightPosX,this._materialEdges.uniforms.uLightPos.value.y=s.lightPosY,this._materialEdges.uniforms.uLightStr.value=s.lightStr;for(let t=0;t<o.layersData.count;t++){let e=o.layersData.layersData[t];!e.isActivated||(this._patternsCreator.generate(t,1),this._renderer.setRenderTarget(this._renderTarget),t!==0&&e.alphaShadow>0&&(this._artworkLayer.prepare(t,this._patternsCreator.textureShadow,1,!0),this._renderer.render(this._artworkLayer.mesh,this._camera)),this._artworkLayer.prepare(t,this._patternsCreator.texture,1),this._renderer.render(this._artworkLayer.mesh,this._camera),this._renderer.setRenderTarget(this._renderTarget2),this._materialEdges.uniforms.uArtworkTexture.value=this._renderTarget.texture,this._materialEdges.uniforms.uPatternTexture.value=this._patternsCreator.texture,this._renderer.render(this._meshEdges,this._camera))}this._outTexture=this._renderTarget2.texture,this._renderer.setRenderTarget(null)}drawAnimated(){let s=o.postprocessData;this._materialEdges.uniforms.uLightPos.value.x=s.lightPosX,this._materialEdges.uniforms.uLightPos.value.y=s.lightPosY,this._materialEdges.uniforms.uLightStr.value=s.lightStr;let t=o.layersData.layersData[this._currentIdxLayer];if(!t.isActivated||this._currentCountLines>=t.countLines)return this._currentIdxLayer+=1,!0;let e=et(this._currentCountLines/t.countLines),a=this._artworkLayer.countLines*.4+this._artworkLayer.countLines*e*.6>>0;return this._patternsCreator.generate(this._currentIdxLayer,1),this._renderer.setRenderTarget(this._renderTarget),this._currentIdxLayer!==0&&this._hasShadow&&(this._artworkLayer.prepare(this._currentIdxLayer,this._patternsCreator.textureShadow,1,!0,this._currentCountLines,a),this._renderer.render(this._artworkLayer.mesh,this._camera)),this._artworkLayer.prepare(this._currentIdxLayer,this._patternsCreator.texture,1,!1,this._currentCountLines,a),this._renderer.render(this._artworkLayer.mesh,this._camera),this._outTexture=this._renderTarget.texture,this._currentCountLines+=a,this._currentCountLines>=t.countLines&&(this._currentIdxLayer+=1,this._currentCountLines=0,n.isMobile?this._outTexture=this._renderTarget.texture:(this._renderer.setRenderTarget(this._renderTarget2),this._materialEdges.uniforms.uArtworkTexture.value=this._renderTarget.texture,this._materialEdges.uniforms.uPatternTexture.value=this._patternsCreator.texture,this._renderer.render(this._meshEdges,this._camera),this._outTexture=this._renderTarget2.texture),t=o.layersData.layersData[this._currentIdxLayer],t&&(this._hasShadow=t.alphaShadow>0)),!0}get isFullyDrawn(){return this._currentIdxLayer>=o.layersData.count}get textureArtwork(){return this._outTexture}get patternTexture(){return this._patternsCreator.texture}get percent(){let s=o.layersData.layersData[this._currentIdxLayer];if(!s)return 1;let t=this._currentIdxLayer/(o.layersData.count-1),e=1/(o.layersData.count-1),a=this._currentCountLines/s.countLines*e;return isNaN(a)&&(a=0),t+a}};var at=`precision highp float;uniform float uAnimTime; #import color/contrast #import noise/perlin vec3 getPerlinTurbulence(vec2 position,float scale,float strength,float time){vec3 perlin=pnoiseVec3(vec3(position.xy+vec2(uAnimTime*1.56,uAnimTime*0.35),time)*scale);perlin*=strength;return perlin;}uniform float uScale;uniform float uStrength;uniform float uTime;uniform float uSaturation;uniform float uContrast;uniform float uIsAbs;uniform float uIsBlackAndWhite;uniform vec2 uRatio;varying vec2 vUv;void main(){vec2 uvScaled=(vUv-.5)*uRatio;vec3 color1=getPerlinTurbulence(uvScaled,uScale,uStrength,uTime);vec3 colorReasonable=color1;vec3 color=colorReasonable;color=color*(1.-uIsAbs)+abs(color)*uIsAbs;color=color*(1.-uIsBlackAndWhite)+vec3((color.r+color.g+color.b)/3.)*uIsBlackAndWhite;vec4 result=vec4(color,1.);result=contrastMatrix(uContrast)*result;const vec3 W=vec3(0.2125,0.7154,0.0721);vec3 intensity=vec3(dot(result.rgb,W));result.rgb=mix(intensity,result.rgb,uSaturation);gl_FragColor=result;}`;var be=T(at),p0=class{constructor(s,t,e){this._renderer=s,this._width=t,this._height=e,this._createEngine()}_createEngine(){this._createUniforms(),this._material=new THREE.ShaderMaterial({fragmentShader:be,vertexShader:D,uniforms:this._uniforms,side:THREE.DoubleSide}),this._geometry=new THREE.PlaneBufferGeometry(2,2),this._mesh=new THREE.Mesh(this._geometry,this._material),this._camera=new THREE.PerspectiveCamera(45,this._width/this._height,1e-4,1e4),this._camera.updateProj
In 2022, as I was experiencing my first year as a father, I was often asking myself what impact I would have on my son, and how much my actions will be part of what will make him “him”. I started a slow introspection on the subject, and at the end of the year, I released “Foundations”, a series that focuses on the origins of our identity. “Tout tracé” is the second act, and its direct continuity. In French, it means *“All mapped out”*, referring to the idea of an all planned future or *“a ready made path”.* This series is the counterpoint of this vision. Life is full of surprises, good or bad, and each moment will have an impact on us, creating our set of experiences, many of them involuntary and embedded in our existence. As humans, we are in constant evolution and therefore, on a quest of identity; of who we really are. We are surrounded by expectations : from society, culture, religion, parents, friends, family… A list of rules that need to be followed and lived by; but, at the end of the day, I believe that only our choices matter. Like “Foundations”, the composition of “Tout tracé” is grid based: full of boxes expected to be filled. But this series is about growth, evolution, expression and re-definition. It’s about fighting against the structure in place, finding our own voice and re-shaping our reality. It is finding its uniqueness and identity that will be revealed through the millions of lines drawing each artwork, technically signing the idea of “Tout tracé”, that comes with a double meaning: *“All drawn”*. -- - **Press ‘S’** to export a still image. - **Press ‘H’** to open a new tab of the artwork in HD (A3 format). -- Opening one output in fullscreen or in live view will run an animation revealing the artwork.
ectionMatrix(),this._renderTarget=new THREE.WebGLRenderTarget(this._width,this._height,{wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBFormat}),this._renderTarget.texture.generateMipmaps=!1}_createUniforms(){this._uniforms={uScale:{value:1},uStrength:{value:1},uTime:{value:0},uSaturation:{value:1},uContrast:{value:1},uIsAbs:{value:0},uIsBlackAndWhite:{value:0},uRatio:{value:new THREE.Vector2(1,1)},uAnimTime:{value:0}}}draw(){let s=o.displacementData;this._uniforms.uScale.value=s.scale,this._uniforms.uStrength.value=s.strength,this._uniforms.uTime.value=s.time,this._uniforms.uAnimTime.value=0,this._uniforms.uSaturation.value=s.saturation,this._uniforms.uContrast.value=s.contrast,this._uniforms.uIsAbs.value=s.isAbs,this._uniforms.uIsBlackAndWhite.value=s.isBlackAndWhite,this._uniforms.uRatio.value.y=this._height/this._width,this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0),this._renderer.render(this._mesh,this._camera),this._renderer.setRenderTarget(null)}get textureArtwork(){return this._renderTarget.texture}};var it=y(z());var d0=class{generate(s){let t=o.displacementData,e=n.rand();t.displacementType=M0.REASONABLE;let a=[1,.55,.3,1.18,.9],l=[1.1,1.4,1,1.25,1.35,1.2,1.5],i=n.rand(),m=n.rand();i<.12?t.scale=a[a.length*m>>0]:i<.24?t.scale=l[l.length*m>>0]:t.scale=.2+e*.4+f(0,.2,3)*0+f(0,.9,3);let c=n.rand()*2,h=f(2,0,3),d=f(0,4,4),g=f(0,2,5);t.strength=1+c+h+d+g,t.strength=Math.min(5.5,t.strength),L()&&(t.strength*=-1),t.time=n.rand()*10,t.isBlackAndWhite=!0,t.contrast=s?.2:.15,t.strength>5&&(t.scale=Math.min(t.scale,1)),(t.strength>8||t.scale>=1)&&(t.contrast=.12)}};var u0=class{generate(){let s=o.layersData;s.clearBetweenLayers=!1,s.invertColorsLayers=!1,s.patternMode=P.GLOBAL,s.patternType=z0.GRID,this.canBoostDispTexScale=!1,this.canDeboostDispDefScale=!1,this.type=0;let t=s.globalPatternData;t.shape=P0.SQUARE,this._generate()}_generate(){let s=o.layersData,t=s.globalPatternData,e=o.displacementData;t.chancesToStroke=0,t.strokesWidth=15,t.isCircleHalf=!1,t.chancesToSkip=.6,t.chancesToFill=.575;let a=n.rand(),l=n.rand(),i=n.rand();if(t.strokesWidth=10,a<.125)t.cols=2+n.rand()*3>>0,t.lines=Math.max(3,2+n.rand()*3>>0),n.composition="Very minimalistic";else if(a<.2)t.cols=5+f(0,10,6)>>0,t.lines=6+f(0,12,6)>>0,n.composition="Minimalistic";else if(a<.65)t.cols=9+n.rand()*12+f(0,10,4)+f(0,64,9),t.lines=t.cols*1.4,n.composition="Balanced";else if(a<.85)t.cols=4+n.rand()*27+f(0,7,4)+f(0,35,9),t.lines=4+n.rand()*32+f(0,7,4)+f(0,35,9),n.composition="Free";else{let d=3+i*2;l<.5?(t.cols=40+n.rand()*60>>0,t.lines=t.cols/d>>0):(t.lines=20+n.rand()*80>>0,t.cols=t.lines/(d*2)>>0),n.composition="Unbalanced"}t.cols>45&&t.lines>45&&(t.strokesWidth=7);let m=.2;(t.lines>=16&&t.cols>=16||t.lines>24||t.cols>24)&&(m=.4);let c=m-.2;t.turbulence=0,t.lines<10&&t.cols>10&&t.lines*2>t.cols&&(t.cols=t.lines*2),s.clearBetweenLayers=!0,s.invertColorsLayers=!0;let h=n.rand();t.chancesToStroke=m+h*(.55-c)+f(.25,0,3),t.chancesToFill=.68+n.rand()*.12,(t.cols>40&&t.lines>30||t.lines>40&&t.cols>30)&&(t.chancesToFill+=.1),t.cols<=10&&t.lines<=10&&(e.scale*=.87,e.scale=Math.max(.2,e.scale),e.scale=Math.min(e.scale,.98))}};function _e(){let r=o.displacementData,s=Math.abs(r.strength),t=r.scale<=.8?r.scale:1,e=s*t;return s>=5.5&&r.scale>.55?"Extreme":e<=.9?"Very small":e<2?"Small":e<3.1?"Medium":e<4.3?"Big":"Extreme"}function ye(){let r=o.layersData.globalDeformerData.glitchVerticalBand+o.layersData.globalDeformerData.glitchHorizontalBand;return r<=0?"None":r<.25?"Small":r<.5?"Medium":r<.65?"Strong":"Extreme"}function R0(){let s=o.layersData.globalPatternData;return{Palette:`Palette ${o.idxStyle}`||"Merveilleuse","Layer Count":o.layersData.count,"Columns count":s.cols>>0,"Lines count":s.lines>>0,Evolution:_e(),Perturbations:ye(),Composition:n.composition}}var g0=class{constructor(s){this._onChangeSeed=s,this._displacementGenerator=new d0,this._gridGenerator=new u0,this.onGeneration=new it.Signal}generateDisplacement=()=>{this._onChangeSeed(),this._displacementGenerator.generate(this.type),this.onGeneration.dispatch()};generateWithoutDisplacement=()=>{this.generate(!1)};generate=(s=!0)=>{this._onChangeSeed();let e=n.rand()<.045;this._currentGenerator=this._gridGenerator,this.type="grid",s&&this._displacementGenerator.generate(e),this._currentGenerator.generate(),this._generateDeformersForGrid(),this._generateGlitch(),this.adjustGenerationBasedOnStyle(),this.onGeneration.dispatch()};adjustGenerationBasedOnStyle=()=>{let s=o.layersData,t=s.globalPatternData,e=o.layersData.globalDeformerData,a=n.rand()*Math.PI*2,l=1.7;for(let i of s.layersData){if(i.rotationValue=a,a+=l,this._currentGenerator===this._gridGenerator&&(t.cols>25||t.lines>25)){let m=250;(t.cols>32||t.lines>32)&&(m=180),i.segmentLengthMax>=m&&(i.segmentLengthMax=$s(i.segmentLengthMax,5,300,40,m,!0))}e.displacementDistance>1.9&&(i.rotationType=0)}};_generateDeformersForGrid(){let t=o.layersData.globalPatternData,e=o.layersData.globalDeformerData;e.deformersOrder=U.DISP_GLITCH,e.glitchMirrorChanceVertical=0,e.glitchMirrorChanceHorizontal=0,e.displacementDistance=1,e.displacementScale=1,e.displacementUseRandomAngle=!1,e.displacementAngle=n.rand(),e.displacementAngle=e.displacementAngle*360-180,e.displacementIncrementAngle=10}_generateGlitch(){let t=o.layersData.globalDeformerData;t.glitchHorizontalBand=0,t.glitchVerticalBand=0,t.glitchAmount=0;let e=n.rand(),a=n.rand(),l=n.rand(),i=f(0,1,4),m=L(.23);m&&(t.glitchHorizontalBand=.15+e*.3+i*.4,t.glitchHorizontalBandPos=l<.5?a*.25:1-a*.25,t.glitchHorizontalBandMirror=l<.1),e=n.rand(),a=n.rand(),l=n.rand(),i=f(0,1,4),L(m?.05:.175)&&(t.glitchVerticalBand=.15+e*.2+i*.4,t.glitchVerticalBandPos=Math.max(0,Math.min(a,1-t.glitchVerticalBand)),t.glitchVerticalBandMirror=!1)}};function j0(r){let s=document.createElement("a");s.setAttribute("download","tout_trace-"+tokenData.hash+".png"),s.setAttribute("href",r.toDataURL("image/png").replace("image/png","image/octet-stream")),s.click()}var f0=class extends W{constructor(s,t){if(super(s,t,!1),window.addEventListener("keydown",e=>{e.key==="s"?j0(this._renderer.domElement):e.key==="h"&&window.open(window.location.href+"?hd=1","_blank").focus()}),this._counterToDraw=0,this._tick=0,o.onRedrawRequired.add(this._onRedrawRequired),o.onDisplacementRegenerationRequired.add(this._onDisplacementRegenerationRequired),o.onPatternRegenerationRequired.add(this._onPatternRegenerationRequired),this.initWebGL(),this._forceSeed)this._onChangeSeed();else{let e=new M;n.rand=e.random_dec,U0()}if(this._displacementTexture=new p0(this._renderer,this.width,this.height),this._artwork=new m0(this._renderer,this._displacementTexture,this.width,this.height),this._forceStyle){let e=T0(this._forceStyle);o.setStyle(e.data,e.id,e.__idx)}else{let e=Os();o.setStyle(e.data,e.id,e.__idx)}this._generator=new g0(this._onChangeSeed),this._generator.generate(),this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0,B.onUpdate.add(this._onUpdate)}_onDisplacementRegenerationRequired=()=>{this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onPatternRegenerationRequired=()=>{this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onRedrawRequired=()=>{this._isDrawRequired=!0};_onUpdate=s=>{this._counterToDraw+=s,(this._isPatternGenerationRequired||this._isDisplacementGenerationRequired||this._isDrawRequired)&&(Ys(),this._artwork.reset(),this._tick=0),this._isDisplacementGenerationRequired&&this._displacementTexture?.draw(),!this._artwork?.isFullyDrawn&&this._counterToDraw>30&&(this._artwork?.drawAnimated()&&(this._renderer.setRenderTarget(null),this._renderArtwork()),this._counterToDraw=0,this._tick+=1),this._isDisplacementGenerationRequired=!1,this._isPatternGenerationRequired=!1,this._isDrawRequired=!1};_renderArtwork(){this._applyPostprocessData(),this.artwork=this._artwork.textureArtwork,this.setBgColor(o.globalData.backgroundColorGL),this._renderWebGL()}_applyPostprocessData(){let s=Math.min(this._artwork.percent,1),t=st(Math.min(s*2,1)),e=tt(s),a=o.postprocessData;this.optionsPost.brightness=a.brightness,this.optionsPost.contrast=a.contrast,this.optionsPost.saturation=a.saturation*t,this.optionsPost.highlights=a.highlights,this.optionsPost.shadows=a.shadows,this.optionsPost.hue=a.hue,this.optionsPost.noise=a.noise,this.optionsPost.noiseRepeat=a.noiseRepeat,this.optionsPost.sharpenBlur=a.sharpenBlur*e,this.optionsPost.sharpenSize=a.sharpenSize,this.optionsPost.normalStr=a.normalStr*e,this.optionsPost.lightPosX=a.lightPosX,this.optionsPost.lightPosY=a.lightPosY,this.optionsPost.lightStr=a.lightStr*e,this.optionsPost.enableNormal=a.enableNormal}_onChangeSeed=()=>{this.changeSeed(),this._forceSeed&&(tokenData.hash=this._forceSeed),this._resetHashes(),U0(),this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};get generator(){return this._generator}};console.log("-------------------");console.log("Author: Florian Zumbrunn");console.log("@florianzumbrunn // https://florianzumbrunn.com");console.log("~");console.log("Series: Tout trac\xE9");console.log("~");console.log("-------------------");console.log("PROD");(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))&&(n.dpr=.2);function lt(){Pe(window.innerWidth,window.innerHeight)}var ze=new f0(n.size.width*n.resolution,n.size.height*n.resolution);window.addEventListener("resize",lt,!1);lt();function Pe(r=512,s=512){s=Math.min(s,n.size.height);let t=Math.min(s/n.size.height,1);r=n.size.width*t,ze.resize(r,s)}var Bl=R0();window.calculateFeatures=R0;})(); /** @license * JS Signals <http://millermedeiros.github.com/js-signals/> * Released under the MIT license * Author: Miller Medeiros * Version: 1.0.0 - Build: 268 (2012/11/29 05:48 PM) */
ectionMatrix(),this._renderTarget=new THREE.WebGLRenderTarget(this._width,this._height,{wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBFormat}),this._renderTarget.texture.generateMipmaps=!1}_createUniforms(){this._uniforms={uScale:{value:1},uStrength:{value:1},uTime:{value:0},uSaturation:{value:1},uContrast:{value:1},uIsAbs:{value:0},uIsBlackAndWhite:{value:0},uRatio:{value:new THREE.Vector2(1,1)},uAnimTime:{value:0}}}draw(){let s=o.displacementData;this._uniforms.uScale.value=s.scale,this._uniforms.uStrength.value=s.strength,this._uniforms.uTime.value=s.time,this._uniforms.uAnimTime.value=0,this._uniforms.uSaturation.value=s.saturation,this._uniforms.uContrast.value=s.contrast,this._uniforms.uIsAbs.value=s.isAbs,this._uniforms.uIsBlackAndWhite.value=s.isBlackAndWhite,this._uniforms.uRatio.value.y=this._height/this._width,this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0),this._renderer.render(this._mesh,this._camera),this._renderer.setRenderTarget(null)}get textureArtwork(){return this._renderTarget.texture}};var it=y(z());var d0=class{generate(s){let t=o.displacementData,e=n.rand();t.displacementType=M0.REASONABLE;let a=[1,.55,.3,1.18,.9],l=[1.1,1.4,1,1.25,1.35,1.2,1.5],i=n.rand(),m=n.rand();i<.12?t.scale=a[a.length*m>>0]:i<.24?t.scale=l[l.length*m>>0]:t.scale=.2+e*.4+f(0,.2,3)*0+f(0,.9,3);let c=n.rand()*2,h=f(2,0,3),d=f(0,4,4),g=f(0,2,5);t.strength=1+c+h+d+g,t.strength=Math.min(5.5,t.strength),L()&&(t.strength*=-1),t.time=n.rand()*10,t.isBlackAndWhite=!0,t.contrast=s?.2:.15,t.strength>5&&(t.scale=Math.min(t.scale,1)),(t.strength>8||t.scale>=1)&&(t.contrast=.12)}};var u0=class{generate(){let s=o.layersData;s.clearBetweenLayers=!1,s.invertColorsLayers=!1,s.patternMode=P.GLOBAL,s.patternType=z0.GRID,this.canBoostDispTexScale=!1,this.canDeboostDispDefScale=!1,this.type=0;let t=s.globalPatternData;t.shape=P0.SQUARE,this._generate()}_generate(){let s=o.layersData,t=s.globalPatternData,e=o.displacementData;t.chancesToStroke=0,t.strokesWidth=15,t.isCircleHalf=!1,t.chancesToSkip=.6,t.chancesToFill=.575;let a=n.rand(),l=n.rand(),i=n.rand();if(t.strokesWidth=10,a<.125)t.cols=2+n.rand()*3>>0,t.lines=Math.max(3,2+n.rand()*3>>0),n.composition="Very minimalistic";else if(a<.2)t.cols=5+f(0,10,6)>>0,t.lines=6+f(0,12,6)>>0,n.composition="Minimalistic";else if(a<.65)t.cols=9+n.rand()*12+f(0,10,4)+f(0,64,9),t.lines=t.cols*1.4,n.composition="Balanced";else if(a<.85)t.cols=4+n.rand()*27+f(0,7,4)+f(0,35,9),t.lines=4+n.rand()*32+f(0,7,4)+f(0,35,9),n.composition="Free";else{let d=3+i*2;l<.5?(t.cols=40+n.rand()*60>>0,t.lines=t.cols/d>>0):(t.lines=20+n.rand()*80>>0,t.cols=t.lines/(d*2)>>0),n.composition="Unbalanced"}t.cols>45&&t.lines>45&&(t.strokesWidth=7);let m=.2;(t.lines>=16&&t.cols>=16||t.lines>24||t.cols>24)&&(m=.4);let c=m-.2;t.turbulence=0,t.lines<10&&t.cols>10&&t.lines*2>t.cols&&(t.cols=t.lines*2),s.clearBetweenLayers=!0,s.invertColorsLayers=!0;let h=n.rand();t.chancesToStroke=m+h*(.55-c)+f(.25,0,3),t.chancesToFill=.68+n.rand()*.12,(t.cols>40&&t.lines>30||t.lines>40&&t.cols>30)&&(t.chancesToFill+=.1),t.cols<=10&&t.lines<=10&&(e.scale*=.87,e.scale=Math.max(.2,e.scale),e.scale=Math.min(e.scale,.98))}};function _e(){let r=o.displacementData,s=Math.abs(r.strength),t=r.scale<=.8?r.scale:1,e=s*t;return s>=5.5&&r.scale>.55?"Extreme":e<=.9?"Very small":e<2?"Small":e<3.1?"Medium":e<4.3?"Big":"Extreme"}function ye(){let r=o.layersData.globalDeformerData.glitchVerticalBand+o.layersData.globalDeformerData.glitchHorizontalBand;return r<=0?"None":r<.25?"Small":r<.5?"Medium":r<.65?"Strong":"Extreme"}function R0(){let s=o.layersData.globalPatternData;return{Palette:`Palette ${o.idxStyle}`||"Merveilleuse","Layer Count":o.layersData.count,"Columns count":s.cols>>0,"Lines count":s.lines>>0,Evolution:_e(),Perturbations:ye(),Composition:n.composition}}var g0=class{constructor(s){this._onChangeSeed=s,this._displacementGenerator=new d0,this._gridGenerator=new u0,this.onGeneration=new it.Signal}generateDisplacement=()=>{this._onChangeSeed(),this._displacementGenerator.generate(this.type),this.onGeneration.dispatch()};generateWithoutDisplacement=()=>{this.generate(!1)};generate=(s=!0)=>{this._onChangeSeed();let e=n.rand()<.045;this._currentGenerator=this._gridGenerator,this.type="grid",s&&this._displacementGenerator.generate(e),this._currentGenerator.generate(),this._generateDeformersForGrid(),this._generateGlitch(),this.adjustGenerationBasedOnStyle(),this.onGeneration.dispatch()};adjustGenerationBasedOnStyle=()=>{let s=o.layersData,t=s.globalPatternData,e=o.layersData.globalDeformerData,a=n.rand()*Math.PI*2,l=1.7;for(let i of s.layersData){if(i.rotationValue=a,a+=l,this._currentGenerator===this._gridGenerator&&(t.cols>25||t.lines>25)){let m=250;(t.cols>32||t.lines>32)&&(m=180),i.segmentLengthMax>=m&&(i.segmentLengthMax=$s(i.segmentLengthMax,5,300,40,m,!0))}e.displacementDistance>1.9&&(i.rotationType=0)}};_generateDeformersForGrid(){let t=o.layersData.globalPatternData,e=o.layersData.globalDeformerData;e.deformersOrder=U.DISP_GLITCH,e.glitchMirrorChanceVertical=0,e.glitchMirrorChanceHorizontal=0,e.displacementDistance=1,e.displacementScale=1,e.displacementUseRandomAngle=!1,e.displacementAngle=n.rand(),e.displacementAngle=e.displacementAngle*360-180,e.displacementIncrementAngle=10}_generateGlitch(){let t=o.layersData.globalDeformerData;t.glitchHorizontalBand=0,t.glitchVerticalBand=0,t.glitchAmount=0;let e=n.rand(),a=n.rand(),l=n.rand(),i=f(0,1,4),m=L(.23);m&&(t.glitchHorizontalBand=.15+e*.3+i*.4,t.glitchHorizontalBandPos=l<.5?a*.25:1-a*.25,t.glitchHorizontalBandMirror=l<.1),e=n.rand(),a=n.rand(),l=n.rand(),i=f(0,1,4),L(m?.05:.175)&&(t.glitchVerticalBand=.15+e*.2+i*.4,t.glitchVerticalBandPos=Math.max(0,Math.min(a,1-t.glitchVerticalBand)),t.glitchVerticalBandMirror=!1)}};function j0(r){let s=document.createElement("a");s.setAttribute("download","tout_trace-"+tokenData.hash+".png"),s.setAttribute("href",r.toDataURL("image/png").replace("image/png","image/octet-stream")),s.click()}var f0=class extends W{constructor(s,t){if(super(s,t,!1),window.addEventListener("keydown",e=>{e.key==="s"?j0(this._renderer.domElement):e.key==="h"&&window.open(window.location.href+"?hd=1","_blank").focus()}),this._counterToDraw=0,this._tick=0,o.onRedrawRequired.add(this._onRedrawRequired),o.onDisplacementRegenerationRequired.add(this._onDisplacementRegenerationRequired),o.onPatternRegenerationRequired.add(this._onPatternRegenerationRequired),this.initWebGL(),this._forceSeed)this._onChangeSeed();else{let e=new M;n.rand=e.random_dec,U0()}if(this._displacementTexture=new p0(this._renderer,this.width,this.height),this._artwork=new m0(this._renderer,this._displacementTexture,this.width,this.height),this._forceStyle){let e=T0(this._forceStyle);o.setStyle(e.data,e.id,e.__idx)}else{let e=Os();o.setStyle(e.data,e.id,e.__idx)}this._generator=new g0(this._onChangeSeed),this._generator.generate(),this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0,B.onUpdate.add(this._onUpdate)}_onDisplacementRegenerationRequired=()=>{this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onPatternRegenerationRequired=()=>{this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onRedrawRequired=()=>{this._isDrawRequired=!0};_onUpdate=s=>{this._counterToDraw+=s,(this._isPatternGenerationRequired||this._isDisplacementGenerationRequired||this._isDrawRequired)&&(Ys(),this._artwork.reset(),this._tick=0),this._isDisplacementGenerationRequired&&this._displacementTexture?.draw(),!this._artwork?.isFullyDrawn&&this._counterToDraw>30&&(this._artwork?.drawAnimated()&&(this._renderer.setRenderTarget(null),this._renderArtwork()),this._counterToDraw=0,this._tick+=1),this._isDisplacementGenerationRequired=!1,this._isPatternGenerationRequired=!1,this._isDrawRequired=!1};_renderArtwork(){this._applyPostprocessData(),this.artwork=this._artwork.textureArtwork,this.setBgColor(o.globalData.backgroundColorGL),this._renderWebGL()}_applyPostprocessData(){let s=Math.min(this._artwork.percent,1),t=st(Math.min(s*2,1)),e=tt(s),a=o.postprocessData;this.optionsPost.brightness=a.brightness,this.optionsPost.contrast=a.contrast,this.optionsPost.saturation=a.saturation*t,this.optionsPost.highlights=a.highlights,this.optionsPost.shadows=a.shadows,this.optionsPost.hue=a.hue,this.optionsPost.noise=a.noise,this.optionsPost.noiseRepeat=a.noiseRepeat,this.optionsPost.sharpenBlur=a.sharpenBlur*e,this.optionsPost.sharpenSize=a.sharpenSize,this.optionsPost.normalStr=a.normalStr*e,this.optionsPost.lightPosX=a.lightPosX,this.optionsPost.lightPosY=a.lightPosY,this.optionsPost.lightStr=a.lightStr*e,this.optionsPost.enableNormal=a.enableNormal}_onChangeSeed=()=>{this.changeSeed(),this._forceSeed&&(tokenData.hash=this._forceSeed),this._resetHashes(),U0(),this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};get generator(){return this._generator}};console.log("-------------------");console.log("Author: Florian Zumbrunn");console.log("@florianzumbrunn // https://florianzumbrunn.com");console.log("~");console.log("Series: Tout trac\xE9");console.log("~");console.log("-------------------");console.log("PROD");;var B=navigator.userAgent;(B.match(/Android/i)||B.match(/webOS/i)||B.match(/iPhone/i)||B.match(/iPad/i)||B.match(/iPod/i)||B.match(/BlackBerry/i)||B.match(/Windows Phone/i))&&(n.dpr=.2);function lt(){Pe(window.innerWidth,window.innerHeight)}var ze=new f0(n.size.width*n.resolution,n.size.height*n.resolution);window.addEventListener("resize",lt,!1);lt();function Pe(r=512,s=512){s=Math.min(s,n.size.height);let t=Math.min(s/n.size.height,1);r=n.size.width*t,ze.resize(r,s)}var Bl=R0();window.calculateFeatures=R0;})(); /** @license * JS Signals <http://millermedeiros.github.com/js-signals/> * Released under the MIT license * Author: Miller Medeiros * Version: 1.0.0 - Build: 268 (2012/11/29 05:48 PM) */
ectionMatrix(),this._renderTarget=new THREE.WebGLRenderTarget(this._width,this._height,{wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBFormat}),this._renderTarget.texture.generateMipmaps=!1}_createUniforms(){this._uniforms={uScale:{value:1},uStrength:{value:1},uTime:{value:0},uSaturation:{value:1},uContrast:{value:1},uIsAbs:{value:0},uIsBlackAndWhite:{value:0},uRatio:{value:new THREE.Vector2(1,1)},uAnimTime:{value:0}}}draw(){let s=o.displacementData;this._uniforms.uScale.value=s.scale,this._uniforms.uStrength.value=s.strength,this._uniforms.uTime.value=s.time,this._uniforms.uAnimTime.value=0,this._uniforms.uSaturation.value=s.saturation,this._uniforms.uContrast.value=s.contrast,this._uniforms.uIsAbs.value=s.isAbs,this._uniforms.uIsBlackAndWhite.value=s.isBlackAndWhite,this._uniforms.uRatio.value.y=this._height/this._width,this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0),this._renderer.render(this._mesh,this._camera),this._renderer.setRenderTarget(null)}get textureArtwork(){return this._renderTarget.texture}};var it=y(z());var d0=class{generate(s){let t=o.displacementData,e=n.rand();t.displacementType=M0.REASONABLE;let a=[1,.55,.3,1.18,.9],l=[1.1,1.4,1,1.25,1.35,1.2,1.5],i=n.rand(),m=n.rand();i<.12?t.scale=a[a.length*m>>0]:i<.24?t.scale=l[l.length*m>>0]:t.scale=.2+e*.4+f(0,.2,3)*0+f(0,.9,3);let c=n.rand()*2,h=f(2,0,3),d=f(0,4,4),g=f(0,2,5);t.strength=1+c+h+d+g,t.strength=Math.min(5.5,t.strength),L()&&(t.strength*=-1),t.time=n.rand()*10,t.isBlackAndWhite=!0,t.contrast=s?.2:.15,t.strength>5&&(t.scale=Math.min(t.scale,1)),(t.strength>8||t.scale>=1)&&(t.contrast=.12)}};var u0=class{generate(){let s=o.layersData;s.clearBetweenLayers=!1,s.invertColorsLayers=!1,s.patternMode=P.GLOBAL,s.patternType=z0.GRID,this.canBoostDispTexScale=!1,this.canDeboostDispDefScale=!1,this.type=0;let t=s.globalPatternData;t.shape=P0.SQUARE,this._generate()}_generate(){let s=o.layersData,t=s.globalPatternData,e=o.displacementData;t.chancesToStroke=0,t.strokesWidth=15,t.isCircleHalf=!1,t.chancesToSkip=.6,t.chancesToFill=.575;let a=n.rand(),l=n.rand(),i=n.rand();if(t.strokesWidth=10,a<.125)t.cols=2+n.rand()*3>>0,t.lines=Math.max(3,2+n.rand()*3>>0),n.composition="Very minimalistic";else if(a<.2)t.cols=5+f(0,10,6)>>0,t.lines=6+f(0,12,6)>>0,n.composition="Minimalistic";else if(a<.65)t.cols=9+n.rand()*12+f(0,10,4)+f(0,64,9),t.lines=t.cols*1.4,n.composition="Balanced";else if(a<.85)t.cols=4+n.rand()*27+f(0,7,4)+f(0,35,9),t.lines=4+n.rand()*32+f(0,7,4)+f(0,35,9),n.composition="Free";else{let d=3+i*2;l<.5?(t.cols=40+n.rand()*60>>0,t.lines=t.cols/d>>0):(t.lines=20+n.rand()*80>>0,t.cols=t.lines/(d*2)>>0),n.composition="Unbalanced"}t.cols>45&&t.lines>45&&(t.strokesWidth=7);let m=.2;(t.lines>=16&&t.cols>=16||t.lines>24||t.cols>24)&&(m=.4);let c=m-.2;t.turbulence=0,t.lines<10&&t.cols>10&&t.lines*2>t.cols&&(t.cols=t.lines*2),s.clearBetweenLayers=!0,s.invertColorsLayers=!0;let h=n.rand();t.chancesToStroke=m+h*(.55-c)+f(.25,0,3),t.chancesToFill=.68+n.rand()*.12,(t.cols>40&&t.lines>30||t.lines>40&&t.cols>30)&&(t.chancesToFill+=.1),t.cols<=10&&t.lines<=10&&(e.scale*=.87,e.scale=Math.max(.2,e.scale),e.scale=Math.min(e.scale,.98))}};function _e(){let r=o.displacementData,s=Math.abs(r.strength),t=r.scale<=.8?r.scale:1,e=s*t;return s>=5.5&&r.scale>.55?"Extreme":e<=.9?"Very small":e<2?"Small":e<3.1?"Medium":e<4.3?"Big":"Extreme"}function ye(){let r=o.layersData.globalDeformerData.glitchVerticalBand+o.layersData.globalDeformerData.glitchHorizontalBand;return r<=0?"None":r<.25?"Small":r<.5?"Medium":r<.65?"Strong":"Extreme"}function R0(){let s=o.layersData.globalPatternData;return{Palette:`Palette ${o.idxStyle}`||"Merveilleuse","Layer Count":o.layersData.count,"Columns count":s.cols>>0,"Lines count":s.lines>>0,Evolution:_e(),Perturbations:ye(),Composition:n.composition}}var g0=class{constructor(s){this._onChangeSeed=s,this._displacementGenerator=new d0,this._gridGenerator=new u0,this.onGeneration=new it.Signal}generateDisplacement=()=>{this._onChangeSeed(),this._displacementGenerator.generate(this.type),this.onGeneration.dispatch()};generateWithoutDisplacement=()=>{this.generate(!1)};generate=(s=!0)=>{this._onChangeSeed();let e=n.rand()<.045;this._currentGenerator=this._gridGenerator,this.type="grid",s&&this._displacementGenerator.generate(e),this._currentGenerator.generate(),this._generateDeformersForGrid(),this._generateGlitch(),this.adjustGenerationBasedOnStyle(),this.onGeneration.dispatch()};adjustGenerationBasedOnStyle=()=>{let s=o.layersData,t=s.globalPatternData,e=o.layersData.globalDeformerData,a=n.rand()*Math.PI*2,l=1.7;for(let i of s.layersData){if(i.rotationValue=a,a+=l,this._currentGenerator===this._gridGenerator&&(t.cols>25||t.lines>25)){let m=250;(t.cols>32||t.lines>32)&&(m=180),i.segmentLengthMax>=m&&(i.segmentLengthMax=$s(i.segmentLengthMax,5,300,40,m,!0))}e.displacementDistance>1.9&&(i.rotationType=0)}};_generateDeformersForGrid(){let t=o.layersData.globalPatternData,e=o.layersData.globalDeformerData;e.deformersOrder=U.DISP_GLITCH,e.glitchMirrorChanceVertical=0,e.glitchMirrorChanceHorizontal=0,e.displacementDistance=1,e.displacementScale=1,e.displacementUseRandomAngle=!1,e.displacementAngle=n.rand(),e.displacementAngle=e.displacementAngle*360-180,e.displacementIncrementAngle=10}_generateGlitch(){let t=o.layersData.globalDeformerData;t.glitchHorizontalBand=0,t.glitchVerticalBand=0,t.glitchAmount=0;let e=n.rand(),a=n.rand(),l=n.rand(),i=f(0,1,4),m=L(.23);m&&(t.glitchHorizontalBand=.15+e*.3+i*.4,t.glitchHorizontalBandPos=l<.5?a*.25:1-a*.25,t.glitchHorizontalBandMirror=l<.1),e=n.rand(),a=n.rand(),l=n.rand(),i=f(0,1,4),L(m?.05:.175)&&(t.glitchVerticalBand=.15+e*.2+i*.4,t.glitchVerticalBandPos=Math.max(0,Math.min(a,1-t.glitchVerticalBand)),t.glitchVerticalBandMirror=!1)}};function j0(r){let s=document.createElement("a");s.setAttribute("download","tout_trace-"+tokenData.hash+".png"),s.setAttribute("href",r.toDataURL("image/png").replace("image/png","image/octet-stream")),s.click()}var f0=class extends W{constructor(s,t){if(super(s,t,!1),window.addEventListener("keydown",e=>{e.key==="s"?j0(this._renderer.domElement):e.key==="h"&&window.open(window.location.href+"?hd=1","_blank").focus()}),this._counterToDraw=0,this._tick=0,o.onRedrawRequired.add(this._onRedrawRequired),o.onDisplacementRegenerationRequired.add(this._onDisplacementRegenerationRequired),o.onPatternRegenerationRequired.add(this._onPatternRegenerationRequired),this.initWebGL(),this._forceSeed)this._onChangeSeed();else{let e=new M;n.rand=e.random_dec,U0()}if(this._displacementTexture=new p0(this._renderer,this.width,this.height),this._artwork=new m0(this._renderer,this._displacementTexture,this.width,this.height),this._forceStyle){let e=T0(this._forceStyle);o.setStyle(e.data,e.id,e.__idx)}else{let e=Os();o.setStyle(e.data,e.id,e.__idx)}this._generator=new g0(this._onChangeSeed),this._generator.generate(),this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0,B.onUpdate.add(this._onUpdate)}_onDisplacementRegenerationRequired=()=>{this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onPatternRegenerationRequired=()=>{this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onRedrawRequired=()=>{this._isDrawRequired=!0};_onUpdate=s=>{this._counterToDraw+=s,(this._isPatternGenerationRequired||this._isDisplacementGenerationRequired||this._isDrawRequired)&&(Ys(),this._artwork.reset(),this._tick=0),this._isDisplacementGenerationRequired&&this._displacementTexture?.draw(),!this._artwork?.isFullyDrawn&&this._counterToDraw>30&&(this._artwork?.drawAnimated()&&(this._renderer.setRenderTarget(null),this._renderArtwork()),this._counterToDraw=0,this._tick+=1),this._isDisplacementGenerationRequired=!1,this._isPatternGenerationRequired=!1,this._isDrawRequired=!1};_renderArtwork(){this._applyPostprocessData(),this.artwork=this._artwork.textureArtwork,this.setBgColor(o.globalData.backgroundColorGL),this._renderWebGL()}_applyPostprocessData(){let s=Math.min(this._artwork.percent,1),t=st(Math.min(s*2,1)),e=tt(s),a=o.postprocessData;this.optionsPost.brightness=a.brightness,this.optionsPost.contrast=a.contrast,this.optionsPost.saturation=a.saturation*t,this.optionsPost.highlights=a.highlights,this.optionsPost.shadows=a.shadows,this.optionsPost.hue=a.hue,this.optionsPost.noise=a.noise,this.optionsPost.noiseRepeat=a.noiseRepeat,this.optionsPost.sharpenBlur=a.sharpenBlur*e,this.optionsPost.sharpenSize=a.sharpenSize,this.optionsPost.normalStr=a.normalStr*e,this.optionsPost.lightPosX=a.lightPosX,this.optionsPost.lightPosY=a.lightPosY,this.optionsPost.lightStr=a.lightStr*e,this.optionsPost.enableNormal=a.enableNormal}_onChangeSeed=()=>{this.changeSeed(),this._forceSeed&&(tokenData.hash=this._forceSeed),this._resetHashes(),U0(),this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};get generator(){return this._generator}};console.log("-------------------");console.log("Author: Florian Zumbrunn");console.log("@florianzumbrunn // https://florianzumbrunn.com");console.log("~");console.log("Series: Tout trac\xE9");console.log("~");console.log("-------------------");console.log("PROD");navigator.userAgentData.mobile&&(n.dpr=.2);function lt(){Pe(window.innerWidth,window.innerHeight)}var ze=new f0(n.size.width*n.resolution,n.size.height*n.resolution);window.addEventListener("resize",lt,!1);lt();function Pe(r=512,s=512){s=Math.min(s,n.size.height);let t=Math.min(s/n.size.height,1);r=n.size.width*t,ze.resize(r,s)}var Bl=R0();window.calculateFeatures=R0;})(); /** @license * JS Signals <http://millermedeiros.github.com/js-signals/> * Released under the MIT license * Author: Miller Medeiros * Version: 1.0.0 - Build: 268 (2012/11/29 05:48 PM) */
Vector2(this._width,this._height)},ugenhash:{type:"f",value:x()*15e6+10},uCountLines:{type:"f",value:1e5},uLineWidth:{type:"f",value:10},uLineWidthRandomAdd:{type:"f",value:5},uLineWidthRandomPower:{type:"f",value:8},uSegmentLengthMin:{type:"f",value:0},uSegmentLengthMax:{type:"f",value:0},uSegmentLengthPower:{type:"f",value:4},uRotationType:{type:"f",value:1},uRotationNoise:{type:"v2",value:new THREE.Vector2(0,0)},uRotationDir:{type:"f",value:0},uColor:{type:"v3",value:new THREE.Vector3(.5,.5,.5)},uAlpha:{type:"f",value:1},uHueRand:{type:"v2",value:new THREE.Vector2(0,0)},uSaturationRand:{type:"v2",value:new THREE.Vector2(0,0)},uLuminosityRand:{type:"v2",value:new THREE.Vector2(0,0)},uColorAdjustementValue:{type:"f",value:1},uColorAdjustementScale:{type:"f",value:1},uDontUsePattern:{type:"f",value:0},uVisibleThreshold:{type:"f",value:.01},uModSatPercentBased:{type:"f",value:.2},uModLumPercentBased:{type:"f",value:.125},uAnimTime:{type:"f",value:0},uNormalStr:{type:"f",value:10},uLightPos:{type:"v2",value:new THREE.Vector2(-.3,.8)},uLightStr:{type:"f",value:.1},uIsShadow:{type:"f",value:0},uCountLinesStep:{type:"f",value:0},uCountToAdd:{type:"f",value:0}}})}_generateRands(){let s=this._linesHolder.lines;for(let t of s)t.x=x(),t.y=x()}prepare(s,t,e=1,a=!1,l=0,i=1e6,m=0){let c=this._material.uniforms,h=o.layersData.layersData[s],d=Ks(a?h.colorShadow:h.color);c.tPattern.value=t,c.uColor.value.x=d.h/360,c.uColor.value.y=d.s/100,c.uColor.value.z=d.l/100,c.uCountLines.value=h.countLines*e,c.uLineWidth.value=h.lineWidth,c.uLineWidthRandomAdd.value=h.lineWidthRandomAdd,c.uLineWidthRandomPower.value=h.lineWidthRandomPower,c.uSegmentLengthMin.value=h.segmentLengthMin,c.uSegmentLengthMax.value=h.segmentLengthMax,c.uSegmentLengthPower.value=h.segmentLengthPower,c.uRotationType.value=a?h.shadowRotation:h.rotationType,c.uAlpha.value=a?h.alphaShadow:h.alpha,c.uHueRand.value.x=h.hueMin,c.uHueRand.value.y=h.hueMax,c.uSaturationRand.value.x=h.saturationMin,c.uSaturationRand.value.y=h.saturationMax,c.uLuminosityRand.value.x=h.luminosityMin,c.uLuminosityRand.value.y=h.luminosityMax,c.uColorAdjustementValue.value=h.colorAdjustmentValue,c.uColorAdjustementScale.value=h.colorAdjustmentScale,c.uModSatPercentBased.value=h.modSatPercentBased,c.uModLumPercentBased.value=h.modLumPercentBased,c.uAnimTime.value=0,c.uIsShadow.value=a?1:0,c.uCountLinesStep.value=l,c.uCountToAdd.value=i,c.uRotationDir.value=h.rotationValue,c.uDontUsePattern.value=h.dontUsePattern,c.uVisibleThreshold.value=h.visibleThreshold}get mesh(){return this._linesHolder}};var Di=Math.PI/2,Ti=Math.PI*2;function st(r){return-.5*(Math.cos(Math.PI*r)-1)}function tt(r){return r*r}function et(r){let s=r-1;return s*s*s+1}var rt="precision highp float;uniform sampler2D uArtworkTexture;uniform sampler2D uPatternTexture;uniform vec2 uArtworkSize;uniform float uNormalStr;uniform vec2 uLightPos;uniform float uLightStr;varying vec2 vUv;vec2 stdNormalMap(float height){return-vec2(dFdx(height),dFdy(height));}vec3 blendMultiply(vec3 base,vec3 blend){return base*blend;}void main(){vec4 artwork=texture2D(uArtworkTexture,vUv);vec4 pattern=texture2D(uPatternTexture,vUv);float sharpenSize=0.2;vec2 areaSize=sharpenSize/uArtworkSize;vec4 c1=texture2D(uArtworkTexture,mod(vUv-areaSize,1.));vec4 c2=texture2D(uArtworkTexture,mod(vec2(vUv.x,vUv.y-areaSize.y),1.));vec4 c3=texture2D(uArtworkTexture,mod(vec2(vUv.x+areaSize.x,vUv.y-areaSize.y),1.));vec4 c4=texture2D(uArtworkTexture,mod(vec2(vUv.x-areaSize.x,vUv.y),1.));vec4 c5=texture2D(uArtworkTexture,mod(vec2(vUv.x+areaSize.x,vUv.y),1.));vec4 c6=texture2D(uArtworkTexture,mod(vec2(vUv.x-areaSize.x,vUv.y+areaSize.y),1.));vec4 c7=texture2D(uArtworkTexture,mod(vec2(vUv.x,vUv.y+areaSize.y),1.));vec4 c8=texture2D(uArtworkTexture,mod(vUv+areaSize,1.));vec4 blur=(c1+c3+c6+c8+2.*(c2+c4+c5+c7)+4.*artwork)/16.;vec4 artwork2=(1.+sharpenSize)*artwork-sharpenSize*blur;float height=(artwork2.r+artwork2.g+artwork2.b)/3.;vec2 normal=stdNormalMap(height);normal*=uNormalStr;normal+=.5;float lighting=dot(normal,normalize(uLightPos));artwork.rgb+=lighting*uLightStr*.82*.5;height=(pattern.r+pattern.g+pattern.b)/3.;normal=stdNormalMap(height);normal*=uNormalStr;normal+=.5;lighting=dot(normal,normalize(-uLightPos));artwork.rgb+=lighting*uLightStr*.25;gl_FragColor=artwork;}";var m0=class{constructor(s,t,e,a){this._renderer=s,this._displacementTexture=t,this._width=e,this._height=a,this._patternsCreator=new i0(this._width,this._height,this._renderer,this._displacementTexture),this._artworkLayer=new h0(this._width,this._height,this._displacementTexture),this._idxLayer=0,this._createEngine()}_createEngine(){this._scene=new THREE.Scene,this._camera=new THREE.PerspectiveCamera(45,this._width/this._height,1e-4,1e4),this._camera.updateProjectionMatrix();let s={wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBFormat};this._renderTarget=new THREE.WebGLRenderTarget(this._width,this._height,s),this._renderTarget.texture.generateMipmaps=!1,this._renderTarget2=new THREE.WebGLRenderTarget(this._width,this._height,s),this._renderTarget2.texture.generateMipmaps=!1,this._materialEdges=new THREE.ShaderMaterial({vertexShader:D,fragmentShader:rt,uniforms:{uArtworkSize:{type:"v2",value:new THREE.Vector2(this._width,this._height)},uArtworkTexture:{type:"t",value:null},uPatternTexture:{type:"t",value:null},uNormalStr:{type:"f",value:10},uLightPos:{type:"v2",value:new THREE.Vector2(-.3,.8)},uLightStr:{type:"f",value:.1}},side:THREE.DoubleSide,transparent:!0}),this._geometry=new THREE.PlaneBufferGeometry(2,2),this._meshEdges=new THREE.Mesh(this._geometry,this._materialEdges)}reset(){this._currentIdxLayer=0,this._currentCountLines=0,this._patternsCreator.reset(),this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0)}draw(){this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0);let s=o.postprocessData;this._materialEdges.uniforms.uLightPos.value.x=s.lightPosX,this._materialEdges.uniforms.uLightPos.value.y=s.lightPosY,this._materialEdges.uniforms.uLightStr.value=s.lightStr;for(let t=0;t<o.layersData.count;t++){let e=o.layersData.layersData[t];!e.isActivated||(this._patternsCreator.generate(t,1),this._renderer.setRenderTarget(this._renderTarget),t!==0&&e.alphaShadow>0&&(this._artworkLayer.prepare(t,this._patternsCreator.textureShadow,1,!0),this._renderer.render(this._artworkLayer.mesh,this._camera)),this._artworkLayer.prepare(t,this._patternsCreator.texture,1),this._renderer.render(this._artworkLayer.mesh,this._camera),this._renderer.setRenderTarget(this._renderTarget2),this._materialEdges.uniforms.uArtworkTexture.value=this._renderTarget.texture,this._materialEdges.uniforms.uPatternTexture.value=this._patternsCreator.texture,this._renderer.render(this._meshEdges,this._camera))}this._outTexture=this._renderTarget2.texture,this._renderer.setRenderTarget(null)}drawAnimated(){let s=o.postprocessData;this._materialEdges.uniforms.uLightPos.value.x=s.lightPosX,this._materialEdges.uniforms.uLightPos.value.y=s.lightPosY,this._materialEdges.uniforms.uLightStr.value=s.lightStr;let t=o.layersData.layersData[this._currentIdxLayer];if(!t.isActivated||this._currentCountLines>=t.countLines)return this._currentIdxLayer+=1,!0;let e=et(this._currentCountLines/t.countLines),a=this._artworkLayer.countLines*.4+this._artworkLayer.countLines*e*.6>>0;return this._patternsCreator.generate(this._currentIdxLayer,1),this._renderer.setRenderTarget(this._renderTarget),this._currentIdxLayer!==0&&this._hasShadow&&(this._artworkLayer.prepare(this._currentIdxLayer,this._patternsCreator.textureShadow,1,!0,this._currentCountLines,a),this._renderer.render(this._artworkLayer.mesh,this._camera)),this._artworkLayer.prepare(this._currentIdxLayer,this._patternsCreator.texture,1,!1,this._currentCountLines,a),this._renderer.render(this._artworkLayer.mesh,this._camera),this._outTexture=this._renderTarget.texture,this._currentCountLines+=a,this._currentCountLines>=t.countLines&&(this._currentIdxLayer+=1,this._currentCountLines=0,this._renderer.setRenderTarget(this._renderTarget2),this._materialEdges.uniforms.uArtworkTexture.value=this._renderTarget.texture,this._materialEdges.uniforms.uPatternTexture.value=this._patternsCreator.texture,this._renderer.render(this._meshEdges,this._camera),this._outTexture=this._renderTarget2.texture,t=o.layersData.layersData[this._currentIdxLayer],t&&(this._hasShadow=t.alphaShadow>0)),!0}get isFullyDrawn(){return this._currentIdxLayer>=o.layersData.count}get textureArtwork(){return this._outTexture}get patternTexture(){return this._patternsCreator.texture}get percent(){let s=o.layersData.layersData[this._currentIdxLayer];if(!s)return 1;let t=this._currentIdxLayer/(o.layersData.count-1),e=1/(o.layersData.count-1),a=this._currentCountLines/s.countLines*e;return isNaN(a)&&(a=0),t+a}};var at=`precision highp float;uniform float uAnimTime; #import color/contrast #import noise/perlin vec3 getPerlinTurbulence(vec2 position,float scale,float strength,float time){vec3 perlin=pnoiseVec3(vec3(position.xy+vec2(uAnimTime*1.56,uAnimTime*0.35),time)*scale);perlin*=strength;return perlin;}uniform float uScale;uniform float uStrength;uniform float uTime;uniform float uSaturation;uniform float uContrast;uniform float uIsAbs;uniform float uIsBlackAndWhite;uniform vec2 uRatio;varying vec2 vUv;void main(){vec2 uvScaled=(vUv-.5)*uRatio;vec3 color1=getPerlinTurbulence(uvScaled,uScale,uStrength,uTime);vec3 colorReasonable=color1;vec3 color=colorReasonable;color=color*(1.-uIsAbs)+abs(color)*uIsAbs;color=color*(1.-uIsBlackAndWhite)+vec3((color.r+color.g+color.b)/3.)*uIsBlackAndWhite;vec4 result=vec4(color,1.);result=contrastMatrix(uContrast)*result;const vec3 W=vec3(0.2125,0.7154,0.0721);vec3 intensity=vec3(dot(result.rgb,W));result.rgb=mix(intensity,result.rgb,uSaturation);gl_FragColor=result;}`;var be=T(at),p0=class{constructor(s,t,e){this._renderer=s,this._width=t,this._height=e,this._createEngine()}_createEngine(){this._createUniforms(),this._material=new THREE.ShaderMaterial({fragmentShader:be,vertexShader:D,uniforms:this._uniforms,side:THREE.DoubleSide}),this._geometry=new THREE.PlaneBufferGeometry(2,2),this._mesh=new THREE.Mesh(this._geometry,this._material),this._camera=new THREE.PerspectiveCamera(45,this._width/this._height,1e-4,1e4),this._camera.updateProj
ght,THREE.RGBAFormat,THREE.FloatType);for(let l=0;l<this.count4;l+=4)this.textureMain.image.data[l+0]=0,this.textureMain.image.data[l+1]=0,this.textureMain.image.data[l+2]=0,this.textureMain.image.data[l+3]=0;this.textureMain.needsUpdate=!0}setX(s,t){this.textureMain.image.data[t*4+0]=s,this.textureMain.needsUpdate=!0}setY(s,t){this.textureMain.image.data[t*4+1]=s,this.textureMain.needsUpdate=!0}setZ(s,t){this.textureMain.image.data[t*4+2]=s,this.textureMain.needsUpdate=!0}};var Zs=`precision highp float; #define M_PI 3.1415 #define HALF_PI 1.5707 uniform float sizePlanes;uniform sampler2D tDataMain;uniform sampler2D tPattern;uniform float ugenhash;uniform float uLineWidth;uniform float uLineWidthRandomAdd;uniform float uLineWidthRandomPower;uniform float uSegmentLengthMin;uniform float uSegmentLengthMax;uniform float uSegmentLengthPower;uniform float uRotationType;uniform float uRotationDir;uniform vec2 uHueRand;uniform vec2 uSaturationRand;uniform vec2 uLuminosityRand;uniform float uColorAdjustementValue;uniform float uColorAdjustementScale;uniform float uDontUsePattern;uniform float uVisibleThreshold;uniform float uCountLinesStep;uniform float uAnimTime;attribute float uid;attribute vec2 uvDataTexture;attribute vec2 side;attribute vec2 uv;varying vec2 vUv;varying vec3 vColor;varying float isVisible;varying float vUid;varying float vUidBase;varying float vModColor1;varying float vModColor2;vec3 mod289(vec3 x){return x-floor(x*(1.0/289.0))*289.0;}vec3 permute(vec3 x){return mod289(((x*34.0)+1.0)*x);}float snoise(vec2 v){const vec4 C=vec4(0.211324,0.36602,-0.57735,0.024390);vec2 i=floor(v+dot(v,C.yy));vec2 x0=v-i+dot(i,C.xx);vec2 i1;i1=(x0.x>x0.y)?vec2(1.0,0.0):vec2(0.0,1.0);vec4 x12=x0.xyxy+C.xxzz;x12.xy-=i1;i=mod(i,289.0);vec3 p=permute(permute(i.y+vec3(0.0,i1.y,1.0))+i.x+vec3(0.0,i1.x,1.0));vec3 m=max(0.5-vec3(dot(x0,x0),dot(x12.xy,x12.xy),dot(x12.zw,x12.zw)),0.0);m=m*m;m=m*m;vec3 x=2.0*fract(p*C.www)-1.0;vec3 h=abs(x)-0.5;vec3 ox=floor(x+0.5);vec3 a0=x-ox;m*=1.79284-0.85373*(a0*a0+h*h);vec3 g;g.x=a0.x*x0.x+h.x*x0.y;g.yz=a0.yz*x12.xz+h.yz*x12.yw;return 130.0*dot(m,g);}float vhash(vec3 p){p=fract(p*0.3183099+.1);p*=17.0;return fract(p.x*p.y*p.z*(p.x+p.y+p.z));}float vnoise(in vec3 x){vec3 i=floor(x);vec3 f=fract(x);f=f*f*(3.0-2.0*f);return mix(mix(mix(vhash(i+vec3(0,0,0)),vhash(i+vec3(1,0,0)),f.x),mix(vhash(i+vec3(0,1,0)),vhash(i+vec3(1,1,0)),f.x),f.y),mix(mix(vhash(i+vec3(0,0,1)),vhash(i+vec3(1,0,1)),f.x),mix(vhash(i+vec3(0,1,1)),vhash(i+vec3(1,1,1)),f.x),f.y),f.z);}float hash12(vec2 p){vec3 p3=fract(vec3(p.xyx)*.1031);p3+=dot(p3,p3.yzx+33.33);return fract((p3.x+p3.y)*p3.z);}mat3 matrixFromEuler(vec3 euler){mat3 m;float a=cos(euler.x);float b=sin(euler.x);float c=cos(euler.y);float d=sin(euler.y);float e=cos(euler.z);float f=sin(euler.z);float ae=a*e;float af=a*f;float be=b*e;float bf=b*f;m[0][0]=c*e;m[0][1]=-c*f;m[0][2]=d;m[1][0]=af+be*d;m[1][1]=ae-bf*d;m[1][2]=-b*c;m[2][0]=bf-ae*d;m[2][1]=be+af*d;m[2][2]=a*c;return m;}float canBeVisible2(vec3 p1,vec3 p2){float dx=p2.x-p1.x;float dy=p2.y-p1.y;float a=atan(dy,dx);float dist=sqrt(dx*dx+dy*dy);float acc=dist/4.;float x=p1.x;float y=p1.y;for(int i=0;i<4;i++){vec3 p=texture2D(tPattern,vec2(x,y)).rgb;if(((p.r+p.g+p.b)/3.)<uVisibleThreshold){return 0.;}x+=cos(a)*acc;y+=sin(a)*acc;}return 1.;}float mapToPower(float value,float minValue,float maxValue,float power){float valueSign=sign(value);value=(value-minValue)/(maxValue-minValue);value=valueSign>0.?value:value-1.;value=pow(value*valueSign,abs(power));value=valueSign>0.?value:1.-value;return value*(maxValue-minValue)+minValue;}float randByPower(float minValue,float maxValue,float power,float id){if(minValue==maxValue){return minValue;}float value=hash12(vec2(id,ugenhash+uCountLinesStep*.1))*(maxValue-minValue)+minValue;return mapToPower(value,minValue,maxValue,power);} #import utils/hsl2rgb float fxrand(float id){return hash12(vec2(id,ugenhash+uCountLinesStep*.1));}float _fxrandInc=0.;float fxrandInc(float id){_fxrandInc+=.1;return hash12(vec2(id+_fxrandInc,ugenhash+uCountLinesStep*.1+_fxrandInc));} #import easing/cubic void main(){vUv=uv;float id=uid+uCountLinesStep;vec4 dataMain=texture2D(tDataMain,uvDataTexture);vec4 dataMain2=dataMain.xyzw;dataMain2.x+=fxrand(id);dataMain2.x=mod(dataMain2.x,1.);dataMain2.y+=fxrand(id+.1);dataMain2.y=mod(dataMain2.y,1.);dataMain2.x=(dataMain2.x*1.-.5)*2.;dataMain2.y=(dataMain2.y*1.-.5)*2.;float rotation=0.;float randAnim=sin(uAnimTime*10.);float canAdd=0.;float rotationType=uRotationType;if(rotationType==0.){if(fxrandInc(id)<.88){rotation=fxrandInc(id)*M_PI*2.;canAdd=1.;}else{rotation=uRotationDir;}}else if(rotationType==1.){if(fxrandInc(id)<.75){rotation=fxrandInc(id)*M_PI*2.;canAdd=1.;}else{if(fxrandInc(id)<.5){rotation=0.;}else{rotation=M_PI*.5;}}}else if(rotationType==2.){if(fxrandInc(id)<.3){rotation=fxrandInc(id)*M_PI*2.;canAdd=1.;}else{if(fxrandInc(id)<.5){rotation=0.;}else{rotation=M_PI*.5;}}}else if(rotationType==3.){if(fxrandInc(id)<.7){rotation=fxrandInc(id)*M_PI*2.;canAdd=1.;}else{rotation=uRotationDir;}}rotation+=randAnim*canAdd;float sizePlanesY=randByPower(uSegmentLengthMin,uSegmentLengthMax,uSegmentLengthPower,id);float sizePlanesY2=sizePlanesY;float scaleLine=(1./2048.)*2.;vec3 posBase=vec3(0.);posBase.x+=side.x*sizePlanes*.5*scaleLine*(uLineWidth+randByPower(0.,uLineWidth*uLineWidthRandomAdd,uLineWidthRandomPower,id));posBase.y+=side.y*sizePlanesY2*.5*scaleLine;mat3 rotationMatrix=matrixFromEuler(vec3(0.,0.,rotation));vec3 p1=vec3(0.);p1.y=1.*sizePlanesY*.5*scaleLine;p1*=rotationMatrix;p1+=(dataMain2.xyz*.5+.5);vec3 p2=vec3(0.);p2.y=-1.*sizePlanesY*.5*scaleLine;p2*=rotationMatrix;p2+=(dataMain2.xyz*.5+.5);if(uDontUsePattern==1.){isVisible=1.;}else{isVisible=canBeVisible2(p1,p2);}posBase.xyz*=rotationMatrix;float hue=randByPower(uHueRand.x,uHueRand.y,1.,id);float saturation=randByPower(uSaturationRand.x,uSaturationRand.y,1.,id);float luminosity=randByPower(uLuminosityRand.x,uLuminosityRand.y,1.,id);vColor=vec3(hue,saturation,luminosity);posBase+=vec3(dataMain2.x,dataMain2.y,0.);vec4 pos=vec4(posBase,1.);vModColor1=vnoise(vec3((dataMain2.x)*uColorAdjustementScale,(dataMain2.y)*uColorAdjustementScale,0.))*uColorAdjustementValue;vModColor2=vnoise(vec3((dataMain2.x)*uColorAdjustementScale,(dataMain2.y)*uColorAdjustementScale,0.))*uColorAdjustementValue;float percentModColor=snoise(vec2((dataMain2.x)*.6,(dataMain2.y)*.6));vModColor1*=(.5+percentModColor*.5);vModColor2*=(.5+percentModColor*.5);gl_Position=pos;vUid=id;vUidBase=uid;}`;var Js=`precision highp float; #ifndef PI #define PI 3.141592653589793 #endif uniform float uAlpha;uniform float uCountLines;uniform vec3 uColor;uniform float uModSatPercentBased;uniform float uModLumPercentBased;uniform float uCountToAdd;varying vec2 vUv;varying vec3 vColor;varying float isVisible;varying float vUid;varying float vModColor1;varying float vModColor2;varying float vUidBase; #import utils/hsl2rgb #import easing/cubic #import easing/exponential void main(){if(isVisible==0.){discard;}if(vUidBase>uCountToAdd){discard;}if(vUid>uCountLines){discard;}float hue=uColor.r+vColor.r;float colorB=vColor.b;float lum=uColor.b+colorB-vModColor2*.4-uModLumPercentBased*cubicIn(vUv.y);vec3 color=hsl2rgb(hue,(uColor.g+vColor.g)-vModColor1*.2+uModSatPercentBased*exponentialOut(vUv.y),lum);vec4 dest=vec4(color,uAlpha);gl_FragColor=dest;}`;var fe=T(Zs),xe=T(Js),A=class extends THREE.RawShaderMaterial{constructor({size:s=10,vs:t=fe,fs:e=xe,uniforms:a={}}={}){a={...a,...{sizePlanes:{type:"f",value:s},tDataMain:{type:"t",value:null}}};let i=`precision highp float; `,m=`precision highp float; `;super({uniforms:a,vertexShader:i+t,fragmentShader:m+e,side:THREE.DoubleSide,type:"LinesMaterial",transparent:!0})}setBlending(s=!0){this.blending=s?THREE.AdditiveBlending:THREE.NormalBlending}init(s){this.uniforms.tDataMain.value=s.textureMain}onUpdate=()=>{this.uniforms.tDataMain.value=this.simulations.main.getTexture()};update(){this.onUpdate()}};var n0=class extends THREE.BufferGeometry{constructor(s){super(),this.data=s,this.count=this.data.count,this.init()}init(){let s=this.count<<1,t=this.count<<2,e=0,a=0,l=0,i=0,m=0,c=0,h=new Float32Array(t),d=new Float32Array(t*2);for(let b=0;b<t;b++){let H=b;for(let I=0;I<4;I++)h[e]=H,d[a+0]=m/(this.data.width-1),d[a+1]=c/(this.data.height-1),e+=1,a+=2;m+=1,m>this.data.width-1&&(m=0,c+=1)}e=0,a=0;let g=1,_=1,u=new Float32Array(t*2),v=new Float32Array(t*2);for(let b=0;b<s;b++)u[i+0]=-1*g,u[i+1]=-1*_,v[i+0]=0,v[i+1]=0,u[i+2]=-1*g,u[i+3]=1*_,v[i+2]=0,v[i+3]=1,u[i+4]=1*g,u[i+5]=-1*_,v[i+4]=1,v[i+5]=0,u[i+6]=1*g,u[i+7]=1*_,v[i+6]=1,v[i+7]=1,i+=8;a=0;let w=new Uint32Array(t*3);for(let b=0;b<this.count;b++)w[l+0]=a,w[l+1]=w[l+4]=a+1,w[l+2]=w[l+3]=a+2,w[l+5]=a+3,a+=4,l+=12;this.setAttribute("uid",new THREE.BufferAttribute(h,1)),this.setAttribute("uvDataTexture",new THREE.BufferAttribute(d,2)),this.setAttribute("side",new THREE.BufferAttribute(u,2)),this.setAttribute("uv",new THREE.BufferAttribute(v,2)),this.setIndex(new THREE.BufferAttribute(w,1))}};var o0=class{constructor(s,t){this.idx=s,this.data=t,this._x=0,this._y=0}reset(){this.x=0,this.y=0,this.alpha=0}setScale(s){this.scaleX=s,this.scaleY=s}set x(s){this._x=s,this.data.setX(this._x,this.idx)}get x(){return this._x}set y(s){this._y=s,this.data.setY(this._y,this.idx)}get y(){return this._y}};var c0=class extends THREE.Mesh{constructor(s,{material:t=new A,helpers:e=!0}={}){let a=new n0(s);if(super(a,t),t.init(s),this.helpers=e,this.helpers){this.lines=[],this.linesBuffer=[];for(let l=0;l<s.count;l++)this.lines.push(new o0(l,s));this.idxLine=0}this.frustumCulled=!1}get(){if(!this.helpers)throw new Error("Property 'helpers' set to false. Switch to true to be able to target lines through objects.");if(this.lines.length==0){let s=this.lines;this.lines=this.linesBuffer,this.linesBuffer=s}if(this.lines.length<=0)throw new Error("No more line available.");return this.lines.pop()}release(s){s.reset(),this.linesBuffer.push(s)}};var Ks=function(r){let s=os(r,!1);return{h:s[0]*360,s:s[1]*100,l:s[2]*100}};var h0=class{constructor(s,t){this._width=s,this._height=t,this._createEngine()}_createEngine(){let s=n.linesWidthHeight,t=n.linesWidthHeight;this.countLines=s*t,this._linesData=new l0(s,t,{autoFill:!1}),this._createMaterial(),this._linesHolder=new c0(this._linesData,{material:this._material,helpers:!0}),this._generateRands()}_createMaterial(){this._material=new A({size:1,uniforms:{tPattern:{type:"t",value:this._texturePattern},uResolution:{type:"v2",value:new THREE.
),t.ld.c=e,t}_minifyColor(s){return{r:s.r.toFixed(3),g:s.g.toFixed(3),b:s.b.toFixed(3)}}setParams(s){this.postprocessData.reset(),this.layersData.reset(),this.postprocessData.setParams(s.postprocessData),this.globalData.setParams(s.globalData),this.layersData.setParams(s.layersData)}setStyle(s,t,e=-1){console.log("debug hash: "+t+"_"+tokenData.hash),this.idStyle=t,this.idxStyle=e,this.postprocessData.reset(),this.postprocessData.setParams(s.postprocessData),this.globalData.setParams(s.globalData),this.layersData.setStyle(s.layersData)}getStyle(){return T0(this.idStyle)}},o=new V0;var Xs=y(Ns());var F0=[],O0=[],s0=0,t0=0;function U0(r=9e6){for(let s=0;s<r;s++)F0[s]=n.rand(),O0[s]=n.rand();s0=0,t0=0}function x(){let r=F0[s0++];return s0>=F0.length-1&&(s0=0),r}function q0(){let r=O0[t0++];return t0>=O0.length-1&&(t0=0),r}function Ys(){s0=0,t0=0}var Aa=Math.PI*2;function $s(r,s,t,e,a,l){let i=t-s,m=a-e,c=(r-s)*m/i+e;return l?he(c,e,a):c}function he(r,s=0,t=1){return Math.max(s,Math.min(r,t))}function me(r){return r!=0?r<0?-1:1:0}function f(r,s,t){if(r==s)return r;let e=x()*(s-r)+r;return pe(e,r,s,t)}function pe(r,s,t,e){let a=me(r);return e=Math.abs(e),r=(r-s)/(t-s),r=a>0?r:r-1,r=Math.pow(r*a,Math.abs(e)),r=a>0?r:1-r,r*(t-s)+s}function L(r){if(r=(0,Xs.default)(r,.5),typeof r!="number")throw new TypeError("expected n to be a number");return x()<r}var Qs="precision highp float;uniform sampler2D tCanvas;uniform sampler2D uDispTextureDisplacement;uniform float uDispDistance;uniform float uDispAngle;uniform float uDispScale;uniform vec2 uDispOffsetDisplacement;uniform float uGlitchHorizontalBand;uniform float uGlitchHorizontalPos;uniform float uGlitchHorizontalMirror;uniform float uGlitchVerticalBand;uniform float uGlitchVerticalPos;uniform float uGlitchVerticalMirror;varying vec2 vUv;void main(){vec2 uv=vUv;vec2 uvSaved=uv;vec2 uvDisplacement=(uv-.5)*uDispScale+.5;vec4 displacement=texture2D(uDispTextureDisplacement,uvDisplacement);displacement.r=max(0.,displacement.r);displacement.g=max(0.,displacement.g);displacement.b=max(0.,displacement.b);float str=(displacement.r+displacement.g+displacement.b)/3.;str=max(.05,str);vec2 uvDisp=vec2(cos(uDispAngle)*uDispDistance*str,sin(uDispAngle)*uDispDistance*str);uv=(uv+uDispOffsetDisplacement)+uvDisp;uvSaved=uv;float horizontalBand=uGlitchHorizontalBand*.5;if(uv.y<uGlitchHorizontalPos+horizontalBand&&uv.y>uGlitchHorizontalPos-horizontalBand){uv.y=uGlitchHorizontalPos*(1.-uGlitchHorizontalMirror)+uGlitchHorizontalMirror*(1.-(uv.y));}float verticalBand=uGlitchVerticalBand*.5;if(uv.x<uGlitchVerticalPos+verticalBand&&uv.x>uGlitchVerticalPos-verticalBand){uv.x=uGlitchVerticalPos*(1.-uGlitchVerticalMirror)+uGlitchVerticalMirror*(1.-(uv.x));}uv=(uv+.5)*.5;vec4 dest=texture2D(tCanvas,uv);gl_FragColor=dest;}";var e0=class{constructor(s,t,e,a){this._width=s,this._height=t,this._renderer=e,this._displacementTexture=a,this._createEngine()}_createEngine(){this._camera=new THREE.PerspectiveCamera(45,this._width/this._height,.1,1e3),this._camera.updateProjectionMatrix(),this._createUniforms(),this._materialDispGlitch=new THREE.ShaderMaterial({fragmentShader:Qs,vertexShader:D,uniforms:this._uniforms,transparent:!0,side:THREE.DoubleSide}),this._geometry=new THREE.PlaneBufferGeometry(2,2),this._mesh=new THREE.Mesh(this._geometry,this._materialDispGlitch),this._renderTarget=new THREE.WebGLRenderTarget(this._width,this._height,{wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter,format:THREE.RGBAFormat}),this._renderTarget.texture.generateMipmaps=!1,this._renderTargetShadow=new THREE.WebGLRenderTarget(this._width,this._height,{wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.NearestFilter,magFilter:THREE.NearestFilter,format:THREE.RGBAFormat}),this._renderTargetShadow.texture.generateMipmaps=!1}_createUniforms(){this._uniforms={tCanvas:{type:"t",value:null},uWidth:{type:"f",value:0},uHeight:{type:"f",value:0},uDispTextureDisplacement:{type:"t",value:null},uDispDistance:{type:"f",value:0},uDispAngle:{type:"f",value:0},uDispScale:{type:"f",value:1},uDispOffsetDisplacement:{type:"v2",value:new THREE.Vector2(0,0)},uGlitchHorizontalBand:{type:"f",value:0},uGlitchHorizontalPos:{type:"f",value:0},uGlitchHorizontalMirror:{type:"f",value:0},uGlitchVerticalBand:{type:"f",value:0},uGlitchVerticalPos:{type:"f",value:0},uGlitchVerticalMirror:{type:"f",value:0}}}deform(s,t,e,a=1){let l=o.layersData,i=l.globalDeformerData;l.deformerMode!==P.GLOBAL&&(i=l.layersData[s].deformerData),this._uniforms.uDispTextureDisplacement.value=this._displacementTexture.textureArtwork,this._uniforms.uDispDistance.value=i.displacementDistance,this._uniforms.uDispDistance.value*=.6+a*.4;let m=x(),c=i.displacementAngle*Math.PI/180,h=i.displacementIncrementAngle*Math.PI/180;for(let _=0;_<o.layersData.count&&(c+=h,h*=i.displacementIncrementMult,!(_>=s));_++);let d=L()?-1:1,g=Math.PI*2/o.layersData.count;this._uniforms.uDispAngle.value=i.displacementUseRandomAngle?g*s*d+g*m:c,this._uniforms.uDispScale.value=i.displacementScale,this._uniforms.uDispScale.value*=2-a,this._uniforms.uDispOffsetDisplacement.value.x=i.displacementOffsetX,this._uniforms.uDispOffsetDisplacement.value.y=i.displacementOffsetY,this._uniforms.uGlitchHorizontalBand.value=i.glitchHorizontalBand,this._uniforms.uGlitchHorizontalPos.value=i.glitchHorizontalBandPos,this._uniforms.uGlitchHorizontalMirror.value=i.glitchHorizontalBandMirror?1:0,this._uniforms.uGlitchVerticalBand.value=i.glitchVerticalBand,this._uniforms.uGlitchVerticalPos.value=i.glitchVerticalBandPos,this._uniforms.uGlitchVerticalMirror.value=i.glitchVerticalBandMirror?1:0,this._renderer.setRenderTarget(this._renderTargetShadow),this._renderer.setClearColor(o.globalData.backgroundColorGL,0),this._renderer.clear(!0,!0,!0),this._uniforms.tCanvas.value=e,this._renderer.render(this._mesh,this._camera),this._renderer.setRenderTarget(null),this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,0),this._renderer.clear(!0,!0,!0),this._uniforms.tCanvas.value=t,this._renderer.render(this._mesh,this._camera),this._renderer.setRenderTarget(null)}get texture(){return this._renderTarget.texture}get textureShadow(){return this._renderTargetShadow.texture}};var r0=class{constructor(s,t){this._width=s,this._height=t}draw(s,t,e,a,l){let i=this._width/e.cols,m=this._height/e.lines,c=[],h=e.cols+e.lines<4?.4:.05,d=e.cols+e.lines<=3;x()<.025&&(d=!0),d&&(h=Math.max(e.chancesToFill,.4));let g=h,_=0;for(let u=0;u<e.lines;u++){let v=u*m,w=[];c.push(w);for(let b=0;b<e.cols;b++){let H=b*i;if(s.beginPath(),s.fillStyle=a?"#fff":"#000",s.strokeStyle=a?"#fff":"#000",s.lineWidth=e.strokesWidth,x()>e.chancesToSkip-g){s.rect(H,v,i,m),q0()<e.chancesToStroke&&s.stroke();let I=x(),N0=(d?0:e.chancesToFill)+g;I<N0?(s.fill(),w.push(1)):w.push(0),d?(g=_%2===1?0:h,_+=1):g=0}else q0()<e.chancesToStroke*.69&&e.lines<70&&e.cols<70&&(s.rect(H,v,i,m),s.stroke()),g+=h,w.push(0);s.closePath()}}this._drawShadow(t,c,e,a,l)}_drawShadow(s,t,e,a,l){let i=l.shadowSize,m=this._width/e.cols,c=this._height/e.lines;for(let h=1,d=t.length-1;h<d;h++){let g=h*c,_=t[h];for(let u=1,v=_.length-1;u<v;u++){let w=u*m;if(t[h][u]===0)continue;t[h][u+1]===0&&x()<.9&&(s.beginPath(),s.fillStyle=a?"#fff":"#000",s.rect(w+m-i*.5,g,i,c),s.fill(),s.closePath()),t[h+1][u]===0&&x()<.9&&(s.beginPath(),s.fillStyle=a?"#fff":"#000",s.rect(w,g+c-i*.5,m,i),s.fill(),s.closePath()),t[h][u-1]===0&&x()<.9&&(s.beginPath(),s.fillStyle=a?"#fff":"#000",s.rect(w-i*.5,g,i,c),s.fill(),s.closePath()),t[h-1][u]===0&&x()<.9&&(s.beginPath(),s.fillStyle=a?"#fff":"#000",s.rect(w,g-i*.5,m,i),s.fill(),s.closePath())}}}};var a0=class{constructor(s,t){this._width=s*.9,this._height=t*.9,this._createEngine(),this._gridPattern=new r0(this._width,this._height)}_createEngine(){this.canvas=document.createElement("canvas"),this.canvas.width=this._width,this.canvas.height=this._height,this.canvas.classList.add("patterns"),this.ctx=this.canvas.getContext("2d"),this.ctx.fillStyle="#fff",this.ctx.fillRect(0,0,this._width,this._height),this.canvasTexture=new THREE.CanvasTexture(this.canvas),this.canvasShadow=document.createElement("canvas"),this.canvasShadow.width=this._width,this.canvasShadow.height=this._height,this.canvasShadow.classList.add("patterns"),this.canvas.style.position="absolute",this.ctxShadow=this.canvasShadow.getContext("2d"),this.ctxShadow.fillStyle="#fff",this.ctxShadow.fillRect(0,0,this._width,this._height),this.canvasTextureShadow=new THREE.CanvasTexture(this.canvasShadow)}clear(s,t=!1){let e=o.layersData.layersData[s];if(!e)return;let a=e.invertPatternColors;o.layersData.patternMode===P.GLOBAL&&(a=a||o.layersData.invertColorsLayers);let l=t?this.ctxShadow:this.ctx;l.fillStyle=a?"#000":"#fff",l.fillRect(0,0,this._width,this._height),t?this.canvasTextureShadow.needsUpdate=!0:this.canvasTexture.needsUpdate=!0}draw(s){let t=o.layersData.layersData[s];if(!t)return;let e=t.invertPatternColors;s!==0&&o.layersData.patternMode===P.GLOBAL&&(e=e||o.layersData.invertColorsLayers);let a=o.layersData.globalPatternData;this._gridPattern.draw(this.ctx,this.ctxShadow,a,e,t),this.canvasTexture.needsUpdate=!0,this.canvasTextureShadow.needsUpdate=!0}};var i0=class{constructor(s,t,e,a){this._width=s,this._height=t,this._renderer=e,this._displacementTexture=a,this._ratio=o.globalData.patternSizeRatio,this._createEngines()}_createEngines(){this._drawer=new a0(this.widthScaled,this.heightScaled),this._deformer=new e0(this.widthScaled,this.heightScaled,this._renderer,this._displacementTexture)}reset(){this._idxGenerated=-1}generate(s,t=1){if(this._idxGenerated===s)return;let a=o.layersData.getLayerData(s);if(!a||!a.isActivated){console.warn("Should not be called -- generate2",s);return}let l=!1;a.dontUsePattern&&(l=!0),this._drawer.clear(s),this._drawer.clear(s,!0),l||(this._drawer.draw(s),this._deformer.deform(s,this._drawer.canvasTexture,this._drawer.canvasTextureShadow,t)),this._idxGenerated=s}get texture(){return this._deformer.texture}get textureShadow(){return this._deformer.textureShadow}get widthScaled(){return this._width*this._ratio}get heightScaled(){return this._height*this._ratio}};var l0=class{constructor(s,t,{autoFill:e=!1}={}){this.reset(s,t,e)}reset(s,t,e=!1){this.width=s,this.height=t,this.count=this.width*this.height>>0,this.count4=this.count<<2;let a=new Float32Array(this.count4);this.textureMain=new THREE.DataTexture(a,this.width,this.hei
(){this._globalDeformerData=new R,this._globalDeformerData.onChange.add(this._onPatternChange)}_onPatternChange=()=>{!this.onPatternChange||this.onPatternChange.dispatch()};_onPatternSubParamChange=()=>{this.onPatternSubParamChange.dispatch()};getLayerData(s){return this._layersData[s]}copyPatternGlobalToLocal(){for(let t of this.layersData)t.onChange.remove(this._onLayerDataParamsChange),t.onPatternTypeChange.remove(this._onLayerDataPatternTypeChange),t.onPatternChange.remove(this._onPatternChange);let s=this.serialize();for(let t of this.layersData)t.setPatternParams(s,s.globalPatternData),t.onChange.add(this._onLayerDataParamsChange),t.onPatternTypeChange.add(this._onLayerDataPatternTypeChange),t.onPatternChange.add(this._onPatternChange)}copyDeformerGlobalToLocal(){let s=this.serialize();for(let t of this.layersData)t.setDeformerParams(s,s.globalDeformerData)}serialize(){let s={count:this.count,patternType:this.patternType,patternMode:this.patternMode,deformerMode:this.deformerMode,clearBetweenLayers:this.clearBetweenLayers,invertColorsLayers:this.invertColorsLayers,layersData:[],globalPatternData:this.globalPatternData.serialize(),globalDeformerData:this.globalDeformerData.serialize()};for(let t=0;t<this.count;t++){let e=this._layersData[t];s.layersData.push(e.serialize())}return s}serializeStyle(){let s={count:this.count,layersData:[]};for(let t=0;t<this.count;t++){let e=this._layersData[t];s.layersData.push(e.serializeStyle())}return s}setParams(s){this.count=s.count,this.patternType=s.patternType,this.patternMode=s.patternMode,this.deformerMode=s.deformerMode,this.clearBetweenLayers=s.clearBetweenLayers,this.invertColorsLayers=s.invertColorsLayers;for(let t=0;t<this.count;t++)this.layersData[t].setParams(s.layersData[t]);this.globalPatternData.setParams(s.globalPatternData),this.globalDeformerData.setParams(s.globalDeformerData)}setStyle(s){this.count=s.count;for(let t=0;t<this.count;t++)this.layersData[t].setParams(s.layersData[t],t)}get count(){return this._count}set count(s){if(this._count!=s){this._count=s;for(let t=0;t<this.count;t++){let e=this._layersData[t];e.isActivated=!0}this.onCountChange.dispatch(),this.onChange.dispatch()}}get countMax(){return this._countMax}get patternMode(){return this._patternMode}set patternMode(s){s!==this._patternMode&&(this._patternMode=s,this._patternMode===P.LOCAL&&(this._deformerMode=P.GLOBAL),this.onPatternModeChange.dispatch(),this.onChange.dispatch())}get deformerMode(){return this._deformerMode}set deformerMode(s){s!==this._deformerMode&&(this._deformerMode=s,this.onDeformerModeChange.dispatch(),this.onChange.dispatch())}get patternType(){return this._patternType}set patternType(s){this._patternType!==s&&(this._patternType=s,this._createGlobalPatternData(),this.onPatternTypeChange.dispatch(),this.onChange.dispatch())}get clearBetweenLayers(){return this._clearBetweenLayers}set clearBetweenLayers(s){s!==this._clearBetweenLayers&&(this._clearBetweenLayers=s,this.onPatternChange.dispatch(),this.onChange.dispatch())}get invertColorsLayers(){return this._invertColorsLayers}set invertColorsLayers(s){s!==this._invertColorsLayers&&(this._invertColorsLayers=s,this.onPatternChange.dispatch(),this.onChange.dispatch())}get canAlternateClear(){return this._canAlternateClear}set canAlternateClear(s){s!==this._canAlternateClear&&(this._canAlternateClear=s,this.onPatternChange.dispatch(),this.onChange.dispatch())}get globalPatternData(){return this._globalPatternData}get globalDeformerData(){return this._globalDeformerData}get layersData(){return this._layersData}};var Us=y(z());var ps=(r,s)=>{for(var t=r.length,e,a;t;)a=Math.floor(s()*t--),e=r[t],r[t]=r[a],r[a]=e;return r};var k=[{id:"10layers-green-blue-orange-3",data:ds()},{id:"10layers-pinkghreen",data:us()},{id:"7layers-socool2",data:gs()},{id:"7layers-socool4",data:fs()},{id:"8layers-flashy-pop-3",data:xs()},{id:"8layers-gold",data:ws()},{id:"8layers-yellow-blue-red-3",data:vs()},{id:"8layers-br3",data:bs()},{id:"9layers-notsure",data:_s()},{id:"9layers-pink-green-purple",data:ys()},{id:"green-yellow-purple-2",data:zs()},{id:"light-blue-red-yellow",data:Ps()},{id:"blue-orange-yellow-2",data:Ss()},{id:"blue-orange-yellow-hue-2",data:Cs()},{id:"darkblue-orange",data:Ds()},{id:"greenfluo-orange-black-3",data:Ts()},{id:"pink-emerald-dark",data:Ms()},{id:"pink-orange-blue-2",data:Rs()},{id:"pink-purple-green-4",data:Ls()},{id:"purple-pink-black",data:As()},{id:"red-green-blue-white",data:Bs()},{id:"red-yellow-blue-lightblue-2",data:Es()},{id:"violet-orange",data:ks()},{id:"new-multi",data:Hs()},{id:"green-orange",data:Is(),rot3:!0},{id:"dark1",data:Gs(),rot3:!0}],Ws=0,Q=[];for(let r of k){let s=r.count||1;for(let t=0;t<s;t++)r.__idx=Ws,Q.push(r);Ws++}var Vs=!1;var oe=[];for(let r of k)oe.push(r.id);function T0(r){let s=k.find(t=>t.id===r);return s||(r==="bw"?addBW():r==="dark2"&&addDark2()),s=k.find(t=>t.id===r),Fs(s)}function Fs(r){let s=r.data;if(s.postprocessData||s.globalData)return r;let t={};return t.postprocessData=s.ppd&&s.ppd.hasOwnProperty("b")?{brightness:s.ppd.b,contrast:s.ppd.c,saturation:s.ppd.s,highlights:s.ppd.hl,shadows:s.ppd.sd,hue:s.ppd.h,sharpenBlur:s.ppd.sb,sharpenSize:s.ppd.ss,lightStr:s.ppd.ls||.07}:null,t.globalData={backgroundColor:s.gd.bg},t.layersData={count:s.ld.c,layersData:[]},s.ld.ld.forEach(e=>{t.layersData.layersData.push({isActivated:!0,color:e.c,colorShadow:e.csa||e.c,countLines:e.cl,lineWidth:e.lw,lineWidthRandomAdd:e.lwa,lineWidthRandomPower:e.lwp,segmentLengthMin:e.smi,segmentLengthMax:e.smx,segmentLengthPower:e.smp,rotationType:e.r,hueMin:e.hm,hueMax:e.hx,saturationMin:e.sm,saturationMax:e.sx,luminosityMin:e.lm,luminosityMax:e.lx,alpha:e.a,colorAdjustmentValue:e.cv,colorAdjustmentScale:e.cs,modSatPercentBased:e.sp,modLumPercentBased:e.lp,invertPatternColors:e.i,visibleThreshold:e.vt||.01,alphaShadow:e.as||0,shadowSize:e.sz||20,shadowRotation:e.sr||0})}),r.data=t,r}function Os(){Vs||(Q=ps(Q,n.rand),Vs=!0);let r=n.rand()*Q.length>>0;return Fs(Q[r])}var Z=class{constructor(){this._idFile=k[0].id,this.onChange=new Us.Signal}get idFile(){return this._idFile}set idFile(s){s!==this._idFile&&(this._idFile=s,this.onChange.dispatch())}};var qs=y(z());var W0={REASONABLE:"reasonable",TROUBLE:"trouble"},ce=[];for(let r in W0)ce.push(W0[r]);var M0=W0;var J=class{constructor(){this._scale=1,this._strength=1,this._time=0,this._saturation=1,this._contrast=1,this._isAbs=!1,this._isBlackAndWhite=!1,this._displacementType=M0.REASONABLE,this.onChange=new qs.Signal}dispose(){this.onChange.dispose()}serialize(){return{scale:this.scale,strength:this.strength,time:this.time,saturation:this.saturation,contrast:this.contrast,isAbs:this.isAbs,isBlackAndWhite:this.isBlackAndWhite}}setParams(s){for(let t in s)this[t]=s[t]}get scale(){return this._scale}set scale(s){s!==this._scale&&(this._scale=s,this.onChange.dispatch())}get strength(){return this._strength}set strength(s){s!==this._strength&&(this._strength=s,this.onChange.dispatch())}get time(){return this._time}set time(s){s!==this._time&&(this._time=s,this.onChange.dispatch())}get saturation(){return this._saturation}set saturation(s){s!==this._saturation&&(this._saturation=s,this.onChange.dispatch())}get contrast(){return this._contrast}set contrast(s){s!==this._contrast&&(this._contrast=s,this.onChange.dispatch())}get isAbs(){return this._isAbs}set isAbs(s){s!==this._isAbs&&(this._isAbs=s,this.onChange.dispatch())}get isBlackAndWhite(){return this._isBlackAndWhite}set isBlackAndWhite(s){s!==this._isBlackAndWhite&&(this._isBlackAndWhite=s,this.onChange.dispatch())}get displacementType(){return this._displacementType}set displacementType(s){s!==this._displacementType&&(this._displacementType=s,this.onChange.dispatch())}};var V0=class{constructor(){this.externalData=new Z,this.postprocessData=new V,this.globalData=new O,this.displacementData=new J,this.layersData=new $,this.onExternalDataChanged=new K.Signal,this.onRedrawRequired=new K.Signal,this.onPatternRegenerationRequired=new K.Signal,this.onDisplacementRegenerationRequired=new K.Signal,this.externalData.onChange.add(this._onExternalDataChanged),this.postprocessData.onChange.add(this._onRedrawRequired),this.globalData.onChange.add(this._onRedrawRequired),this.displacementData.onChange.add(this._onDisplacementRequired),this.layersData.onCountChange.add(this._onPatternRegenerationRequired),this.layersData.onPatternTypeChange.add(this._onPatternRegenerationRequired),this.layersData.onPatternModeChange.add(this._onPatternRegenerationRequired),this.layersData.onPatternChange.add(this._onPatternRegenerationRequired),this.layersData.onDeformerModeChange.add(this._onPatternRegenerationRequired),this.layersData.onLayersDataChange.add(this._onRedrawRequired)}_onExternalDataChanged=()=>{this.onExternalDataChanged.dispatch()};_onRedrawRequired=()=>{this.onRedrawRequired.dispatch()};_onDisplacementRequired=()=>{this.onDisplacementRegenerationRequired.dispatch()};_onPatternRegenerationRequired=()=>{this.onPatternRegenerationRequired.dispatch()};copyPatternGlobalToLocal(){this.layersData.copyPatternGlobalToLocal()}copyDeformerGlobalToLocal(){this.layersData.copyDeformerGlobalToLocal()}serialize(){return{postprocessData:this.postprocessData.serialize(),globalData:this.globalData.serialize(),layersData:this.layersData.serialize()}}serializeStyle(){return{postprocessData:this.postprocessData.serialize(),globalData:this.globalData.serializeStyle(),layersData:this.layersData.serializeStyle()}}serializeStyleMin(){let s=this.serializeStyle(),t={};t.ppd={b:s.postprocessData.brightness,c:s.postprocessData.contrast,s:s.postprocessData.saturation,hl:s.postprocessData.highlights,sd:s.postprocessData.shadows,h:s.postprocessData.hue,sb:s.postprocessData.sharpenBlur,ss:s.postprocessData.sharpenSize,ls:s.postprocessData.lightStr},t.gd={bg:this._minifyColor(s.globalData.backgroundColor)},t.ld={ld:[]};let e=0;return s.layersData.layersData.forEach(a=>{!a.isActivated||(t.ld.ld.push({c:this._minifyColor(a.color),csa:this._minifyColor(a.colorShadow),cl:a.countLines,lw:a.lineWidth,lwa:a.lineWidthRandomAdd,lwp:a.lineWidthRandomPower,smi:a.segmentLengthMin,smx:a.segmentLengthMax,smp:a.segmentLengthPower,r:a.rotationType,hm:a.hueMin,hx:a.hueMax,sm:a.saturationMin,sx:a.saturationMax,lm:a.luminosityMin,lx:a.luminosityMax,a:a.alpha,cv:a.colorAdjustmentValue,cs:a.colorAdjustmentScale,sp:a.modSatPercentBased,lp:a.modLumPercentBased,i:a.invertPatternColors,vt:a.visibleThreshold,as:a.alphaShadow,sz:a.shadowSize,sr:a.shadowRotation}),e+=1)}
neWidthRandomAdd:this.lineWidthRandomAdd,lineWidthRandomPower:this.lineWidthRandomPower,segmentLengthMin:this.segmentLengthMin,segmentLengthMax:this.segmentLengthMax,segmentLengthPower:this.segmentLengthPower,rotationType:this.rotationType,rotationAligment:this.rotationAligment,rotationAligmentFactor:this.rotationAligmentFactor,hueMin:this.hueMin,hueMax:this.hueMax,saturationMin:this.saturationMin,saturationMax:this.saturationMax,luminosityMin:this.luminosityMin,luminosityMax:this.luminosityMax,alpha:this.alpha,alphaShadow:this.alphaShadow,colorAdjustmentValue:this.colorAdjustmentValue,colorAdjustmentScale:this.colorAdjustmentScale,modSatPercentBased:this.modSatPercentBased,modLumPercentBased:this.modLumPercentBased,surface:this.surface,visibleThreshold:this.visibleThreshold,invertPatternColors:this.invertPatternColors,dontUsePattern:this.dontUsePattern,deformerData:this._deformerData.serialize(),shadowSize:this.shadowSize,shadowRotation:this.shadowRotation}}serializeStyle(){return{isActivated:this.isActivated,color:S(this.color),colorShadow:S(this.colorShadow),countLines:this.countLines,lineWidth:this.lineWidth,lineWidthRandomAdd:this.lineWidthRandomAdd,lineWidthRandomPower:this.lineWidthRandomPower,segmentLengthMin:this.segmentLengthMin,segmentLengthMax:this.segmentLengthMax,segmentLengthPower:this.segmentLengthPower,rotationType:this.rotationType,rotationAligment:this.rotationAligment,rotationAligmentFactor:this.rotationAligmentFactor,hueMin:this.hueMin,hueMax:this.hueMax,saturationMin:this.saturationMin,saturationMax:this.saturationMax,luminosityMin:this.luminosityMin,luminosityMax:this.luminosityMax,alpha:this.alpha,alphaShadow:this.alphaShadow,colorAdjustmentValue:this.colorAdjustmentValue,colorAdjustmentScale:this.colorAdjustmentScale,modSatPercentBased:this.modSatPercentBased,modLumPercentBased:this.modLumPercentBased,surface:this.surface,visibleThreshold:this.visibleThreshold,invertPatternColors:this.invertPatternColors,dontUsePattern:this.dontUsePattern,shadowSize:this.shadowSize,shadowRotation:this.shadowRotation}}setParams(s,t=-1){this.reset(),s.color.r=parseFloat(s.color.r),s.color.g=parseFloat(s.color.g),s.color.b=parseFloat(s.color.b),s.colorShadow&&(s.colorShadow.r=parseFloat(s.colorShadow.r),s.colorShadow.g=parseFloat(s.colorShadow.g),s.colorShadow.b=parseFloat(s.colorShadow.b)),this.isActivated=s.hasOwnProperty("isActivated")?s.isActivated:!0,this.color=F(s.color.r,s.color.g,s.color.b)>>0,this.colorShadow=s.colorShadow?F(s.colorShadow.r,s.colorShadow.g,s.colorShadow.b)>>0:0,this.patternType=s.patternType||q,s.patternData&&this.patternData.setParams(s.patternData),this.clearPreviousLayer=s.clearPreviousLayer||!1,this.countLines=s.countLines,this.lineWidth=s.lineWidth,this.lineWidthRandomAdd=s.lineWidthRandomAdd,this.lineWidthRandomPower=s.lineWidthRandomPower||8,this.segmentLengthMin=s.segmentLengthMin,this.segmentLengthMax=s.segmentLengthMax,this.segmentLengthPower=s.segmentLengthPower,this.rotationType=s.rotationType,this.rotationAligment=s.rotationAligment||!1,this.rotationAligmentFactor=s.rotationAligmentFactor||500,this.hueMin=s.hueMin,this.hueMax=s.hueMax,this.saturationMin=s.saturationMin,this.saturationMax=s.saturationMax,this.luminosityMin=s.luminosityMin,this.luminosityMax=s.luminosityMax,this.alpha=s.alpha,this.alphaShadow=s.alphaShadow||0,this.colorAdjustmentValue=s.colorAdjustmentValue,this.colorAdjustmentScale=s.colorAdjustmentScale,this.modSatPercentBased=s.modSatPercentBased,this.modLumPercentBased=s.modLumPercentBased,this.surface=s.surface||2,this.visibleThreshold=s.visibleThreshold||.01,this.invertPatternColors=s.invertPatternColors||!1,this.dontUsePattern=s.dontUsePattern||!1,this.shadowSize=s.shadowSize||20,this.shadowRotation=s.shadowRotation||0,t===0&&!s.hasOwnProperty("dontUsePattern")&&(this.dontUsePattern=!0),s.deformerData&&this.deformerData.setParams(s.deformerData)}setPatternParams(s,t){this.patternType=s.patternType,this.patternData.setParams(t)}setDeformerParams(s,t){this.deformerData.setParams(t)}get isActivated(){return this._isActivated}set isActivated(s){s!==this._isActivated&&(this._isActivated=s,this.onPatternChange.dispatch(),this.onChange.dispatch())}get color(){return this._color}set color(s){this._color!==s&&(this._color=s,this.onChange.dispatch())}get colorShadow(){return this._colorShadow}set colorShadow(s){this._colorShadow!==s&&(this._colorShadow=s,this.onChange.dispatch())}get countLines(){return this._countLines}set countLines(s){s!==this._countLines&&(this._countLines=s,this.onChange.dispatch())}get patternType(){return this._patternType}set patternType(s){s!==this._patternType&&(this._patternType=s,this._getPatternData(),this.onPatternTypeChange.dispatch(),this.onChange.dispatch())}get clearPreviousLayer(){return this._clearPreviousLayer}set clearPreviousLayer(s){s!==this._clearPreviousLayer&&(this._clearPreviousLayer=s,this.onPatternChange.dispatch(),this.onChange.dispatch())}get patternData(){return this._patternData}get lineWidth(){return this._lineWidth}set lineWidth(s){s!==this._lineWidth&&(this._lineWidth=s,this.onChange.dispatch())}get lineWidthRandomAdd(){return this._lineWidthRandomAdd}set lineWidthRandomAdd(s){s!==this._lineWidthRandomAdd&&(this._lineWidthRandomAdd=s,this.onChange.dispatch())}get lineWidthRandomPower(){return this._lineWidthRandomPower}set lineWidthRandomPower(s){s!==this._lineWidthRandomPower&&(this._lineWidthRandomPower=s,this.onChange.dispatch())}get segmentLengthMin(){return this._segmentLengthMin}set segmentLengthMin(s){s!==this._segmentLengthMin&&(this._segmentLengthMin=s,this.onChange.dispatch())}get segmentLengthMax(){return this._segmentLengthMax}set segmentLengthMax(s){s!==this._segmentLengthMax&&(this._segmentLengthMax=s,this.onChange.dispatch())}get segmentLengthPower(){return this._segmentLengthPower}set segmentLengthPower(s){s!==this._segmentLengthPower&&(this._segmentLengthPower=s,this.onChange.dispatch())}get rotationType(){return this._rotationType}set rotationType(s){s!==this._rotationType&&(this._rotationType=s,this.onChange.dispatch())}get rotationValue(){return this._rotationValue}set rotationValue(s){s!==this._rotationValue&&(this._rotationValue=s,this.onChange.dispatch())}get hueMin(){return this._hueMin}set hueMin(s){s!==this._hueMin&&(this._hueMin=s,this.onChange.dispatch())}get hueMax(){return this._hueMax}set hueMax(s){s!==this._hueMax&&(this._hueMax=s,this.onChange.dispatch())}get saturationMin(){return this._saturationMin}set saturationMin(s){s!==this._saturationMin&&(this._saturationMin=s,this.onChange.dispatch())}get saturationMax(){return this._saturationMax}set saturationMax(s){s!==this._saturationMax&&(this._saturationMax=s,this.onChange.dispatch())}get luminosityMin(){return this._luminosityMin}set luminosityMin(s){s!==this._luminosityMin&&(this._luminosityMin=s,this.onChange.dispatch())}get luminosityMax(){return this._luminosityMax}set luminosityMax(s){s!==this._luminosityMax&&(this._luminosityMax=s,this.onChange.dispatch())}get alpha(){return this._alpha}set alpha(s){s!==this._alpha&&(this._alpha=s,this.onChange.dispatch())}get alphaShadow(){return this._alphaShadow}set alphaShadow(s){s!==this._alphaShadow&&(this._alphaShadow=s,this.onChange.dispatch())}get colorAdjustmentValue(){return this._colorAdjustmentValue}set colorAdjustmentValue(s){s!==this._colorAdjustmentValue&&(this._colorAdjustmentValue=s,this.onChange.dispatch())}get colorAdjustmentScale(){return this._colorAdjustmentScale}set colorAdjustmentScale(s){s!==this._colorAdjustmentScale&&(this._colorAdjustmentScale=s,this.onChange.dispatch())}get modSatPercentBased(){return this._modSatPercentBased}set modSatPercentBased(s){s!==this._modSatPercentBased&&(this._modSatPercentBased=s,this.onChange.dispatch())}get modLumPercentBased(){return this._modLumPercentBased}set modLumPercentBased(s){s!==this._modLumPercentBased&&(this._modLumPercentBased=s,this.onChange.dispatch())}get dontUsePattern(){return this._dontUsePattern}set dontUsePattern(s){s!==this._dontUsePattern&&(this._dontUsePattern=s,this.onPatternChange.dispatch(),this.onChange.dispatch())}get surface(){return this._surface}set surface(s){s!==this._surface&&(this._surface=s,this.onChange.dispatch())}get visibleThreshold(){return this._visibleThreshold}set visibleThreshold(s){s!==this._visibleThreshold&&(this._visibleThreshold=s,this.onChange.dispatch())}get invertPatternColors(){return this._invertPatternColors}set invertPatternColors(s){s!==this._invertPatternColors&&(this._invertPatternColors=s,this.onPatternChange.dispatch(),this.onChange.dispatch())}get shadowSize(){return this._shadowSize}set shadowSize(s){s!==this._shadowSize&&(this._shadowSize=s,this.onChange.dispatch())}get shadowRotation(){return this._shadowRotation}set shadowRotation(s){s!==this._shadowRotation&&(this._shadowRotation=s,this.onChange.dispatch())}get deformerData(){return this._deformerData}};var kt=[2236962,15921906,10197915,5263440,13487565,2236962,15921906,10197915,5263440,11184810,2236962,15921906,10197915],$=class{constructor(){this.reset(),this._createLayersData(),this._createGlobalPatternData(),this._createGlobalDeformerData(),this.onCountChange=new C.Signal,this.onPatternTypeChange=new C.Signal,this.onPatternModeChange=new C.Signal,this.onPatternSubParamChange=new C.Signal,this.onDeformerModeChange=new C.Signal,this.onPatternChange=new C.Signal,this.onLayersDataChange=new C.Signal,this.onChange=new C.Signal}reset(){if(this._count=5,this._countMax=13,this._patternMode=P.GLOBAL,this._patternType=q,this._deformerMode=P.GLOBAL,this._clearBetweenLayers=!1,this._invertColorsLayers=!1,this._canAlternateClear=!1,this.layersData)for(let s of this.layersData)s.reset()}_createLayersData(){if(!this._layersData){this._layersData=[];for(let s=0;s<this.countMax;s++){let t=new X(kt[s]);t.onChange.add(this._onLayerDataParamsChange),t.onPatternTypeChange.add(this._onLayerDataPatternTypeChange),t.onPatternChange.add(this._onPatternChange),this._layersData.push(t)}this._layersData[0].dontUsePattern=!0}}_onLayerDataParamsChange=()=>{!this.onLayersDataChange||!this.onChange||(this.onLayersDataChange.dispatch(),this.onChange.dispatch())};_onLayerDataPatternTypeChange=()=>{this.onPatternTypeChange.dispatch()};_createGlobalPatternData(){this._globalPatternData&&this._globalPatternData.dispose(),this._globalPatternData=S0(this._patternType),this._globalPatternData.onChange.add(this._onPatternChange),this._globalPatternData.onSubParamChange.add(this._onPatternSubParamChange)}_createGlobalDeformerData
){return this._patternSizeRatio}set patternSizeRatio(s){s!==this._patternSizeRatio&&(this._patternSizeRatio=s,this.onChange.dispatch())}};var C=y(z());var H0={GLOBAL:"global",LOCAL:"local"},Mt=[];for(let r in H0)Mt.push(H0[r]);var P=H0;var hs=y(z()),U={DISP_GLITCH:"dispGlitch",GLITCH_DISP:"glitchDisp",EDGE_DETECTION:"edgeDetection"},Rt=[];for(let r in U)Rt.push(U[r]);var R=class{constructor(){this._deformersOrder=U.GLITCH_DISP,this._displacementTextureIdx=8,this._displacementDistance=0,this._displacementAngle=-60,this._displacementUseRandomAngle=!1,this._displacementIncrementAngle=10,this._displacementIncrementMult=1.1,this._displacementOffsetX=0,this._displacementOffsetY=0,this._displacementScale=1,this._glitchHorizontalBand=0,this._glitchHorizontalBandPos=.48,this._glitchHorizontalBandMirror=!0,this._glitchVerticalBand=0,this._glitchVerticalBandPos=.48,this._glitchVerticalBandMirror=!1,this.onChange=new hs.Signal}dispose(){this.onChange.dispose()}serialize(){return{deformersOrder:this.deformersOrder,displacementTextureIdx:this.displacementTextureIdx,displacementDistance:this.displacementDistance,displacementAngle:this.displacementAngle,displacementUseRandomAngle:this.displacementUseRandomAngle,dispalcementIncrementAngle:this.displacementIncrementAngle,dispalcementIncrementMult:this.dispalcementIncrementMult,displacementOffsetX:this.displacementOffsetX,displacementOffsetY:this.displacementOffsetY,displacementScale:this.displacementScale,glitchHorizontalBand:this.glitchHorizontalBand,glitchHorizontalBandPos:this.glitchHorizontalBandPos,glitchHorizontalBandMirror:this.glitchHorizontalBandMirror,glitchVerticalBand:this.glitchVerticalBand,glitchVerticalBandPos:this.glitchVerticalBandPos,glitchVerticalBandMirror:this.glitchVerticalBandMirror}}setParams(s){console.log("> set params",s);for(let t in s)this[t]=s[t]}get deformersOrder(){return this._deformersOrder}set deformersOrder(s){s!==this._deformersOrder&&(this._deformersOrder=s,this.onChange.dispatch())}get displacementTextureIdx(){return this._displacementTextureIdx}set displacementTextureIdx(s){s!==this._displacementTextureIdx&&(this._displacementTextureIdx=s,this.onChange.dispatch())}get displacementDistance(){return this._displacementDistance}set displacementDistance(s){s!==this._displacementDistance&&(this._displacementDistance=s,this.onChange.dispatch())}get displacementAngle(){return this._displacementAngle}set displacementAngle(s){s!==this._displacementAngle&&(this._displacementAngle=s,this.onChange.dispatch())}get displacementUseRandomAngle(){return this._displacementUseRandomAngle}set displacementUseRandomAngle(s){s!==this._displacementUseRandomAngle&&(this._displacementUseRandomAngle=s,this.onChange.dispatch())}get displacementIncrementAngle(){return this._displacementIncrementAngle}set displacementIncrementAngle(s){s!==this._displacementIncrementAngle&&(this._displacementIncrementAngle=s,this.onChange.dispatch())}get displacementIncrementMult(){return this._displacementIncrementMult}set displacementIncrementMult(s){s!==this._displacementIncrementMult&&(this._displacementIncrementMult=s,this.onChange.dispatch())}get displacementScale(){return this._displacementScale}set displacementScale(s){s!==this._displacementScale&&(this._displacementScale=s,this.onChange.dispatch())}get displacementOffsetX(){return this._displacementOffsetX}set displacementOffsetX(s){s!==this._displacementOffsetX&&(this._displacementOffsetX=s,this.onChange.dispatch())}get displacementOffsetY(){return this._displacementOffsetY}set displacementOffsetY(s){s!==this._displacementOffsetY&&(this._displacementOffsetY=s,this.onChange.dispatch())}get glitchHorizontalBand(){return this._glitchHorizontalBand}set glitchHorizontalBand(s){s!==this._glitchHorizontalBand&&(this._glitchHorizontalBand=s,this.onChange.dispatch())}get glitchHorizontalBandPos(){return this._glitchHorizontalBandPos}set glitchHorizontalBandPos(s){s!==this._glitchHorizontalBandPos&&(this._glitchHorizontalBandPos=s,this.onChange.dispatch())}get glitchHorizontalBandMirror(){return this._glitchHorizontalBandMirror}set glitchHorizontalBandMirror(s){s!==this._glitchHorizontalBandMirror&&(this._glitchHorizontalBandMirror=s,this.onChange.dispatch())}get glitchVerticalBand(){return this._glitchVerticalBand}set glitchVerticalBand(s){s!==this._glitchVerticalBand&&(this._glitchVerticalBand=s,this.onChange.dispatch())}get glitchVerticalBandPos(){return this._glitchVerticalBandPos}set glitchVerticalBandPos(s){s!==this._glitchVerticalBandPos&&(this._glitchVerticalBandPos=s,this.onChange.dispatch())}get glitchVerticalBandMirror(){return this._glitchVerticalBandMirror}set glitchVerticalBandMirror(s){s!==this._glitchVerticalBandMirror&&(this._glitchVerticalBandMirror=s,this.onChange.dispatch())}};var C0=y(z());var y0={GRID:"grid"},Lt=[];for(let r in y0)Lt.push(y0[r]);var q=y0.GRID,z0=y0;var I0=y(z()),j=class{constructor(){this.onSubParamChange=new I0.Signal,this.onChange=new I0.Signal}dispose(){this.onSubParamChange.removeAll(),this.onChange.removeAll()}serialize(s){return s}setParams(s){for(let t in s)this[t]=s[t]}};var ms=y(z()),N=class{constructor(){this._sizeMin=10,this._sizeAdd=800,this._sizePower=10,this._rectWMin=100,this._rectWAdd=500,this._rectHMin=100,this._rectHAdd=500,this.onChange=new ms.Signal}serialize(){return{sizeMin:this.sizeMin,sizeAdd:this.sizeAdd,sizePower:this.sizePower,rectWMin:this.rectWMin,rectWAdd:this.rectWAdd,rectHMin:this.rectHMin,rectHAdd:this.rectHAdd}}setParams(s){for(let t in s)this[t]=s[t]}dispose(){this.onChange.removeAll()}get sizeMin(){return this._sizeMin}set sizeMin(s){s!==this._sizeMin&&(this._sizeMin=s,this.onChange.dispatch())}get sizeAdd(){return this._sizeAdd}set sizeAdd(s){s!==this._sizeAdd&&(this._sizeAdd=s,this.onChange.dispatch())}get sizePower(){return this._sizePower}set sizePower(s){s!==this._sizePower&&(this._sizePower=s,this.onChange.dispatch())}get rectWMin(){return this._rectWMin}set rectWMin(s){s!==this._rectWMin&&(this._rectWMin=s,this.onChange.dispatch())}get rectWAdd(){return this._rectWAdd}set rectWAdd(s){s!==this._rectWAdd&&(this._rectWAdd=s,this.onChange.dispatch())}get rectHMin(){return this._rectHMin}set rectHMin(s){s!==this._rectHMin&&(this._rectHMin=s,this.onChange.dispatch())}get rectHAdd(){return this._rectHAdd}set rectHAdd(s){s!==this._rectHAdd&&(this._rectHAdd=s,this.onChange.dispatch())}};var G0={SQUARE:"square"},At=[];for(let r in G0)At.push(G0[r]);var P0=G0;var Y=class extends j{constructor(){super(),this._shape=P0.SQUARE,this._shapeData=new N,this._shapeData.onChange.add(this._onShapeDataChange),this._cols=4,this._lines=4,this._chancesToSkip=.5,this._chancesToFill=.5,this._chancesToStroke=0,this._turbulence=0,this._turbulenceMode="structurel",this._strokesWidth=50,this._isCircleHalf=!0}_onShapeDataChange=()=>{this.onChange.dispatch()};serialize(){return super.serialize({shape:this.shape,shapeData:this._shapeData.serialize(),cols:this.cols,lines:this.lines,chancesToFill:this.chancesToFill,chancesToStroke:this.chancesToStroke,strokesWidth:this.strokesWidth,isCircleHalf:this.isCircleHalf})}setParams(s){for(let t in s)t==="shapeData"?this.shapeData.setParams(s.shapeData):this[t]=s[t]}get shape(){return this._shape}set shape(s){s!==this._shape&&(this._shape=s,this.onSubParamChange.dispatch(),this.onChange.dispatch())}get shapeData(){return this._shapeData}get cols(){return this._cols}set cols(s){s!==this._cols&&(this._cols=s,this.onChange.dispatch())}get lines(){return this._lines}set lines(s){s!==this._lines&&(this._lines=s,this.onChange.dispatch())}get chancesToSkip(){return this._chancesToSkip}set chancesToSkip(s){s!==this._chancesToSkip&&(this._chancesToSkip=s,this.onChange.dispatch())}get chancesToFill(){return this._chancesToFill}set chancesToFill(s){s!==this._chancesToFill&&(this._chancesToFill=s,this.onChange.dispatch())}get chancesToStroke(){return this._chancesToStroke}set chancesToStroke(s){s!==this._chancesToStroke&&(this._chancesToStroke=s,this.onChange.dispatch())}get strokesChance(){return this.chancesToStroke}get strokesWidth(){return this._strokesWidth}set strokesWidth(s){s!==this._strokesWidth&&(this._strokesWidth=s,this.onChange.dispatch())}get isCircleHalf(){return this._isCircleHalf}set isCircleHalf(s){s!==this._isCircleHalf&&(this._isCircleHalf=s,this.onChange.dispatch())}get turbulence(){return this._turbulence}set turbulence(s){s!==this._turbulence&&(this._turbulence=s,this.onChange.dispatch())}get turbulenceMode(){return this._turbulenceMode}set turbulenceMode(s){s!==this._turbulenceMode&&(this._turbulenceMode=s,this.onChange.dispatch())}};function Bt(r){switch(r){case z0.GRID:return new Y}}var S0=Bt;var D0={MESSY:0,MESSY_STRAIGHT:1,STRAIGHT:2,DIRECTIONAL:3},Et=[];for(let r in D0)Et.push(D0[r]);var X=class{constructor(s){this._color=s,this._colorShadow=s,this.reset(),this._createDeformerData(),this.onPatternChange=new C0.Signal,this.onPatternTypeChange=new C0.Signal,this.onChange=new C0.Signal}reset(){this._isActivated=!0,this._patternType=q,this._patternDataByType={},this._getPatternData(),this._clearPreviousLayer=!1,this._countLines=5e5,this._lineWidth=1,this._lineWidthRandomAdd=0,this._lineWidthRandomPower=8,this._segmentLengthMin=10,this._segmentLengthMax=100,this._segmentLengthPower=4,this._rotationType=D0.MESSY_STRAIGHT,this._rotationAligment=!1,this._rotationAligmentFactor=500,this._rotationValue=0,this._alpha=.6,this._hueMin=0,this._hueMax=0,this._saturationMin=-.05,this._saturationMax=.05,this._luminosityMin=-.1,this._luminosityMax=.1,this._colorAdjustmentValue=.45,this._colorAdjustmentScale=677,this._modSatPercentBased=0,this._modLumPercentBased=0,this._alphaShadow=.6,this._shadowSize=20,this._shadowRotation=D0.MESSY,this._surface=2,this._dontUsePattern=!1,this._invertPatternColors=!1,this._visibleThreshold=.01}_getPatternData(){this._patternData&&this._patternData.dispose(),this._patternData=this._patternDataByType[this._patternType],this._patternData||(this._patternData=S0(this._patternType),this._patternDataByType[this._patternType]=this._patternData),this._patternData.onChange.add(this._onPatternChange)}_createDeformerData(){this._deformerData=new R,this._deformerData.onChange.add(this._onPatternChange)}_onPatternChange=()=>{this.onPatternChange.dispatch()};serialize(){return{isActivated:this.isActivated,color:S(this.color),colorShadow:S(this.colorShadow),patternType:this.patternType,patternData:this.patternData.serialize(),clearPreviousLayer:this.clearPreviousLayer,countLines:this.countLines,lineWidth:this.lineWidth,li
es=f1;return res;}vec3 hsl2rgb(vec3 hsl){vec3 rgb;if(hsl.y==0.0){rgb=vec3(hsl.z);}else{float f2;if(hsl.z<0.5)f2=hsl.z*(1.0+hsl.y);else f2=hsl.z+hsl.y-hsl.y*hsl.z;float f1=2.0*hsl.z-f2;rgb.r=hue2rgb(f1,f2,hsl.x+(1.0/3.0));rgb.g=hue2rgb(f1,f2,hsl.x);rgb.b=hue2rgb(f1,f2,hsl.x-(1.0/3.0));}return rgb;}vec3 hsl2rgb(float h,float s,float l){return hsl2rgb(vec3(h,s,l));}";var is="vec4 ppermute(vec4 x){return mod(((x*34.0)+1.0)*x,289.0);}vec4 ptaylorInvSqrt(vec4 r){return 1.79-0.85*r;}vec3 pfade(vec3 t){return t*t*t*(t*(t*6.0-15.0)+10.0);}float pnoise(vec3 P){vec3 Pi0=floor(P);vec3 Pi1=Pi0+vec3(1.0);Pi0=mod(Pi0,289.0);Pi1=mod(Pi1,289.0);vec3 Pf0=fract(P);vec3 Pf1=Pf0-vec3(1.0);vec4 ix=vec4(Pi0.x,Pi1.x,Pi0.x,Pi1.x);vec4 iy=vec4(Pi0.yy,Pi1.yy);vec4 iz0=Pi0.zzzz;vec4 iz1=Pi1.zzzz;vec4 ixy=ppermute(ppermute(ix)+iy);vec4 ixy0=ppermute(ixy+iz0);vec4 ixy1=ppermute(ixy+iz1);vec4 gx0=ixy0/7.0;vec4 gy0=fract(floor(gx0)/7.0)-0.5;gx0=fract(gx0);vec4 gz0=vec4(0.5)-abs(gx0)-abs(gy0);vec4 sz0=step(gz0,vec4(0.0));gx0-=sz0*(step(0.0,gx0)-0.5);gy0-=sz0*(step(0.0,gy0)-0.5);vec4 gx1=ixy1/7.0;vec4 gy1=fract(floor(gx1)/7.0)-0.5;gx1=fract(gx1);vec4 gz1=vec4(0.5)-abs(gx1)-abs(gy1);vec4 sz1=step(gz1,vec4(0.0));gx1-=sz1*(step(0.0,gx1)-0.5);gy1-=sz1*(step(0.0,gy1)-0.5);vec3 g000=vec3(gx0.x,gy0.x,gz0.x);vec3 g100=vec3(gx0.y,gy0.y,gz0.y);vec3 g010=vec3(gx0.z,gy0.z,gz0.z);vec3 g110=vec3(gx0.w,gy0.w,gz0.w);vec3 g001=vec3(gx1.x,gy1.x,gz1.x);vec3 g101=vec3(gx1.y,gy1.y,gz1.y);vec3 g011=vec3(gx1.z,gy1.z,gz1.z);vec3 g111=vec3(gx1.w,gy1.w,gz1.w);vec4 norm0=ptaylorInvSqrt(vec4(dot(g000,g000),dot(g010,g010),dot(g100,g100),dot(g110,g110)));g000*=norm0.x;g010*=norm0.y;g100*=norm0.z;g110*=norm0.w;vec4 norm1=ptaylorInvSqrt(vec4(dot(g001,g001),dot(g011,g011),dot(g101,g101),dot(g111,g111)));g001*=norm1.x;g011*=norm1.y;g101*=norm1.z;g111*=norm1.w;float n000=dot(g000,Pf0);float n100=dot(g100,vec3(Pf1.x,Pf0.yz));float n010=dot(g010,vec3(Pf0.x,Pf1.y,Pf0.z));float n110=dot(g110,vec3(Pf1.xy,Pf0.z));float n001=dot(g001,vec3(Pf0.xy,Pf1.z));float n101=dot(g101,vec3(Pf1.x,Pf0.y,Pf1.z));float n011=dot(g011,vec3(Pf0.x,Pf1.yz));float n111=dot(g111,Pf1);vec3 fade_xyz=pfade(Pf0);vec4 n_z=mix(vec4(n000,n100,n010,n110),vec4(n001,n101,n011,n111),fade_xyz.z);vec2 n_yz=mix(n_z.xy,n_z.zw,fade_xyz.y);float n_xyz=mix(n_yz.x,n_yz.y,fade_xyz.x);return 2.2*n_xyz;}vec3 pnoiseVec3(vec3 x){float xx=x.x;float yy=x.y;float zz=x.z;return vec3(pnoise(vec3(xx,x.y,x.z)*2.-1.),pnoise(vec3(yy-19.1,zz+33.4,x.x+47.2)*2.-1.),pnoise(vec3(zz+74.2,xx-124.5,yy+99.4)*2.-1.));}";var ls=/(#import .*)/gi,Pt={"color/brightness":ss,"color/contrast":ts,"easing/cubic":es,"easing/exponential":rs,"utils/hsl2rgb":as,"noise/perlin":is};function T(r){let s=St(r);for(let t of s){let e=Ct(t),a=Pt[e];a=a.replace("#define GLSLIFY 1",""),r=r.replace(t,a)}return r}function St(r){ls.lastIndex=0;let s=null,t=0,e=[];for(;(s=ls.exec(r))&&t<100;)e.push(s[0]);return t==100&&console.warn("avoid infinity loop in resolveShaderImports"),e}function Ct(r){return r.replace("#import","").replace(/ /g,"")}var Dt=T(K0),W=class{constructor(s,t){this.width=s,this.height=t,this._isFirstRender=!0}initWebGL(){this.optionsPost={brightness:0,contrast:1,saturation:1,saturationR:1,saturationG:1,saturationB:1,highlights:0,shadows:0,hue:0,sharpenBlur:0,sharpenSize:1,normalStr:10,lightPosX:-.3,lightPosY:.8,lightStr:.1},this._renderer=new THREE.WebGLRenderer({antialias:!0,preserveDrawingBuffer:!0}),this._renderer.setPixelRatio(n.dpr||1),this._renderer.setSize(this.width,this.height),this._renderer.outputEncoding=THREE.sRGBEncoding,this._renderer.domElement.style.zIndex=1e3,this._renderer.domElement.style.display="none",this._renderer.autoClear=!1,document.body.appendChild(this._renderer.domElement),n.renderer=this._renderer,this._scene=new THREE.Scene,this._camera=new THREE.PerspectiveCamera(45,this.width/this.height,.1,1e3),this._camera.updateProjectionMatrix(),this._renderPass=new _0(this._scene,this._camera,null,new THREE.Color(16777215),1),this._composer=new b0(this._renderer),this._composer.setPixelRatio(n.dpr||1),this._composer.setSize(this.width,this.height),this._composer.addPass(this._renderPass),this._artwork=new THREE.Texture(this.canvas),this._artwork.needsUpdate=!0,this._uniforms={uArtworkSize:{type:"v2",value:new THREE.Vector2(n.size.width*n.dpr,n.size.height*n.dpr)},uBgColor:{type:"c",value:null},tArtwork:{type:"t",value:this._artwork},uBrightness:{type:"f",value:1},uContrast:{type:"f",value:1},uSaturation:{type:"f",value:1},uSaturationRGB:{type:"v3",value:new THREE.Vector3},uHighlights:{type:"f",value:1},uShadows:{type:"f",value:1},uHueAdjust:{type:"f",value:0},uSharpenBlur:{type:"f",value:0},uSharpenSize:{type:"f",value:1},uNormalStr:{type:"f",value:10},uLightPos:{type:"v2",value:new THREE.Vector2(-.3,.8)},uLightStr:{type:"f",value:.1},uPatternTexture:{type:"t",value:null}};let s=new THREE.ShaderMaterial({fragmentShader:Dt,vertexShader:D,uniforms:this._uniforms}),t=new THREE.PlaneBufferGeometry(2,2),e=new THREE.Mesh(t,s);this._scene.add(e)}_renderWebGL=(s=!0,t=null)=>{s&&(this._artwork.needsUpdate=!0);let e=this.optionsPost;this._uniforms.uBgColor.value=this._bgColor,this._uniforms.uBrightness.value=e.brightness,this._uniforms.uContrast.value=e.contrast,this._uniforms.uSaturation.value=e.saturation,this._uniforms.uSaturationRGB.value.x=e.saturationR,this._uniforms.uSaturationRGB.value.y=e.saturationG,this._uniforms.uSaturationRGB.value.z=e.saturationB,this._uniforms.uHighlights.value=e.highlights,this._uniforms.uShadows.value=e.shadows,this._uniforms.uHueAdjust.value=e.hue,this._uniforms.uSharpenBlur.value=Math.max(.2,e.sharpenBlur),this._uniforms.uSharpenSize.value=e.sharpenSize,this._uniforms.uNormalStr.value=e.normalStr-3.5,this._uniforms.uLightPos.value.x=e.lightPosX,this._uniforms.uLightPos.value.y=e.lightPosY,this._uniforms.uLightStr.value=e.lightStr,this._uniforms.uPatternTexture.value=t,this._composer.render(),this._isFirstRender&&(this._renderer.domElement.style.display="block",this._isFirstRender=!1)};_serializePostprocess(){let s={};for(let t in this.optionsPost)s[t]=this.optionsPost[t];return s}_resetHashes(s=null){(this._forceSeed||s)&&(tokenData.hash=this._forceSeed||s);let t=new M(tokenData);n.rand=t.random_dec}changeSeed(){}saveDataToFile(s,t){let e=document.createElement("a"),a=new Blob([JSON.stringify(s)],{type:"text/plain"});e.href=URL.createObjectURL(a),e.download=`${t}-${Date.now()}.json`,e.click()}setBgColor(s){this._bgColor=s,this._renderer.clearColor=this._bgColor}resize(s,t){this._renderer.domElement.style.width=s+"px",this._renderer.domElement.style.height=t+"px"}get artwork(){return this._uniforms.tArtwork.value}set artwork(s){this._uniforms.tArtwork.value=s}};var K=y(z());var ns=y(z()),V=class{constructor(){this.reset(),this.onChange=new ns.Signal}reset(){this._brightness=0,this._contrast=1,this._saturation=1,this._highlights=0,this._shadows=0,this._hue=0,this._noise=0,this._noiseRepeat=5,this._sharpenBlur=0,this._sharpenSize=1,this._normalStr=10,this._lightPosX=.75,this._lightPosY=-.57,this._lightStr=.065,this._enableNormal=!0}serialize(){return{brightness:this.brightness,contrast:this.contrast,saturation:this.saturation,highlights:this.highlights,shadows:this.shadows,hue:this.hue,noise:this.noise,noiseRepeat:this.noiseRepeat,sharpenBlur:this.sharpenBlur,sharpenSize:this.sharpenSize,normalStr:this.normalStr,lightPosX:this.lightPosX,lightPosY:this.lightPosY,lightStr:this.lightStr,enableNormal:this.enableNormal}}setParams(s){if(!s){this.reset();return}for(let t in s)this[t]=s[t]}get brightness(){return this._brightness}set brightness(s){s!==this._brightness&&(this._brightness=s,this.onChange.dispatch())}get contrast(){return this._contrast}set contrast(s){s!==this._contrast&&(this._contrast=s,this.onChange.dispatch())}get saturation(){return this._saturation}set saturation(s){s!==this._saturation&&(this._saturation=s,this.onChange.dispatch())}get highlights(){return this._highlights}set highlights(s){s!==this._highlights&&(this._highlights=s,this.onChange.dispatch())}get shadows(){return this._shadows}set shadows(s){s!==this._shadows&&(this._shadows=s,this.onChange.dispatch())}get hue(){return this._hue}set hue(s){s!==this._hue&&(this._hue=s,this.onChange.dispatch())}get sharpenBlur(){return this._sharpenBlur}set sharpenBlur(s){s!==this._sharpenBlur&&(this._sharpenBlur=s,this.onChange.dispatch())}get sharpenSize(){return this._sharpenSize}set sharpenSize(s){s!==this._sharpenSize&&(this._sharpenSize=s,this.onChange.dispatch())}get normalStr(){return this._normalStr}set normalStr(s){s!==this._normalStr&&(this._normalStr=s,this.onChange.dispatch())}get lightPosX(){return this._lightPosX}set lightPosX(s){s!==this._lightPosX&&(this._lightPosX=s,this.onChange.dispatch())}get lightPosY(){return this._lightPosY}set lightPosY(s){s!==this._lightPosY&&(this._lightPosY=s,this.onChange.dispatch())}get lightStr(){return this._lightStr}set lightStr(s){s!==this._lightStr&&(this._lightStr=s,this.onChange.dispatch())}get enableNormal(){return this._enableNormal}set enableNormal(s){s!==this._enableNormal&&(this._enableNormal=s,this.onChange.dispatch())}};var cs=y(z());function F(r,s,t){return(r*255<<16)+(s*255<<8)+t*255}function S(r){let s=r>>16&255,t=r>>8&255,e=r&255;return{r:s/255,g:t/255,b:e/255}}function Tt(r,s,t){var e=Math.max(r,s,t),a=Math.min(r,s,t),l,i,m=(e+a)/2;if(e==a)l=i=0;else{var c=e-a;switch(i=m>.5?c/(2-e-a):c/(e+a),e){case r:l=(s-t)/c+(s<t?6:0);break;case s:l=(t-r)/c+2;break;case t:l=(r-s)/c+4;break}l/=6}return[l,i,m]}function os(r,s=!0){let t=S(r),e=Tt(t.r,t.g,t.b);return s?(e[0]*=360,e[1]*=100,e[2]*=100,`hsl( ${e[0]}, ${e[1]}%, ${e[2]}% )`):e}var O=class{constructor(){this._backgroundColor=13421772,this._patternSizeRatio=1,this._backgroundColorGL=new THREE.Color(this._backgroundColor),this.onChange=new cs.Signal}serialize(){return{backgroundColor:S(this._backgroundColor),patternSizeRatio:this.patternSizeRatio}}serializeStyle(){return{backgroundColor:S(this._backgroundColor)}}setParams(s){s.backgroundColor.r=parseFloat(s.backgroundColor.r),s.backgroundColor.g=parseFloat(s.backgroundColor.g),s.backgroundColor.b=parseFloat(s.backgroundColor.b),this.backgroundColor=F(s.backgroundColor.r,s.backgroundColor.g,s.backgroundColor.b)>>0}get backgroundColor(){return this._backgroundColor}set backgroundColor(s){this._backgroundColor!==s&&(this._backgroundColor=s,this._backgroundColorGL.set(this._backgroundColor),this.onChange.dispatch())}get backgroundColorGL(){return this._backgroundColorGL}get patternSizeRatio(
urn}this.onResizeWithoutDelay()}update=()=>{let s=Date.now(),t=s-this.lastTime;this.lastTime=s,requestAnimationFrame(this.update),!(this.skipActivated&&t>this.skipLimit||this.pause)&&this.onUpdate.dispatch(t)}},B=new B0;var E0={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:` varying vec2 vUv; void main() { vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); }`,fragmentShader:` uniform float opacity; uniform sampler2D tDiffuse; varying vec2 vUv; void main() { vec4 texel = texture2D( tDiffuse, vUv ); gl_FragColor = opacity * texel; }`};var E=class{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}},gt=new THREE.OrthographicCamera(-1,1,1,-1,0,1),k0=new THREE.BufferGeometry;k0.setAttribute("position",new THREE.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3));k0.setAttribute("uv",new THREE.Float32BufferAttribute([0,2,0,0,2,0],2));var v0=class{constructor(s){this._mesh=new THREE.Mesh(k0,s)}dispose(){this._mesh.geometry.dispose()}render(s){s.render(this._mesh,gt)}get material(){return this._mesh.material}set material(s){this._mesh.material=s}};var G=class extends E{constructor(s,t){super(),this.textureID=t!==void 0?t:"tDiffuse",s instanceof THREE.ShaderMaterial?(this.uniforms=s.uniforms,this.material=s):s&&(this.uniforms=THREE.UniformsUtils.clone(s.uniforms),this.material=new THREE.ShaderMaterial({defines:Object.assign({},s.defines),uniforms:this.uniforms,vertexShader:s.vertexShader,fragmentShader:s.fragmentShader})),this.fsQuad=new v0(this.material)}render(s,t,e){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=e.texture),this.fsQuad.material=this.material,this.renderToScreen?(s.setRenderTarget(null),this.fsQuad.render(s)):(s.setRenderTarget(t),this.clear&&s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil),this.fsQuad.render(s))}};var b0=class{constructor(s,t){this.renderer=s;let e={minFilter:THREE.LinearFilter,magFilter:THREE.LinearFilter,format:THREE.RGBAFormat},a=s.getSize(new THREE.Vector2);this._pixelRatio=s.getPixelRatio(),this._width=a.width,this._height=a.height,t=new THREE.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio,e),t.texture.name="EffectComposer.rt1",this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],E0===void 0&&console.error("THREE.EffectComposer relies on CopyShader"),G===void 0&&console.error("THREE.EffectComposer relies on ShaderPass"),this.copyPass=new G(E0),this.clock=new THREE.Clock}swapBuffers(){let s=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=s}addPass(s){this.passes.push(s),s.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(s,t){this.passes.splice(t,0,s),s.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(s){let t=this.passes.indexOf(s);t!==-1&&this.passes.splice(t,1)}isLastEnabledPass(s){for(let t=s+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(s){s===void 0&&(s=this.clock.getDelta());let t=this.renderer.getRenderTarget(),e=!1;for(let a=0,l=this.passes.length;a<l;a++){let i=this.passes[a];i.enabled!==!1&&(i.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(a),i.render(this.renderer,this.writeBuffer,this.readBuffer,s,e),i.needsSwap&&this.swapBuffers())}this.renderer.setRenderTarget(t)}setSize(s,t){this._width=s,this._height=t;let e=this._width*this._pixelRatio,a=this._height*this._pixelRatio;this.renderTarget1.setSize(e,a),this.renderTarget2.setSize(e,a);for(let l=0;l<this.passes.length;l++)this.passes[l].setSize(e,a)}setPixelRatio(s){this._pixelRatio=s,this.setSize(this._width,this._height)}};var _0=class extends E{constructor(s,t,e,a,l){super(),this.scene=s,this.camera=t,this.overrideMaterial=e,this.clearColor=a,this.clearAlpha=l!==void 0?l:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new THREE.Color}render(s,t,e){let a=s.autoClear;s.autoClear=!1;let l,i;this.overrideMaterial!==void 0&&(i=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(s.getClearColor(this._oldClearColor),l=s.getClearAlpha(),s.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&s.clearDepth(),s.setRenderTarget(this.renderToScreen?null:e),this.clear&&s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil),s.render(this.scene,this.camera),this.clearColor&&s.setClearColor(this._oldClearColor,l),this.overrideMaterial!==void 0&&(this.scene.overrideMaterial=i),s.autoClear=a}};var K0=`precision highp float;uniform vec2 uArtworkSize;uniform sampler2D tArtwork;uniform float uBrightness;uniform float uContrast;uniform float uSaturation;uniform float uHighlights;uniform float uShadows;uniform float uHueAdjust;uniform float uSharpenBlur;uniform float uSharpenSize;uniform float uNormalStr;uniform vec2 uLightPos;uniform float uLightStr;varying vec2 vUv; #import color/contrast #import color/brightness float blendOverlay(float base,float blend){return base<0.5?(2.0*base*blend):(1.0-2.0*(1.0-base)*(1.0-blend));}vec3 blendOverlay(vec3 base,vec3 blend){return vec3(blendOverlay(base.r,blend.r),blendOverlay(base.g,blend.g),blendOverlay(base.b,blend.b));}vec3 blendOverlay(vec3 base,vec3 blend,float opacity){return(blendOverlay(base,blend)*opacity+base*(1.0-opacity));}void make_kernel(inout vec4 n[9],sampler2D tex,vec2 coord){float w=1.0/uArtworkSize.x;float h=1.0/uArtworkSize.y;n[0]=texture2D(tex,coord+vec2(-w,-h));n[1]=texture2D(tex,coord+vec2(0.0,-h));n[2]=texture2D(tex,coord+vec2(w,-h));n[3]=texture2D(tex,coord+vec2(-w,0.0));n[4]=texture2D(tex,coord);n[5]=texture2D(tex,coord+vec2(w,0.0));n[6]=texture2D(tex,coord+vec2(-w,h));n[7]=texture2D(tex,coord+vec2(0.0,h));n[8]=texture2D(tex,coord+vec2(w,h));}vec2 stdNormalMap(float height){return-vec2(dFdx(height),dFdy(height));}float Lum(vec3 c){return 0.299*c.r+0.587*c.g+0.114*c.b;}vec3 ClipColor(vec3 c){float l=Lum(c);float n=min(min(c.r,c.g),c.b);float x=max(max(c.r,c.g),c.b);if(n<0.0)c=max((c-l)*l/(l-n)+l,0.0);if(x>1.0)c=min((c-l)*(1.0-l)/(x-l)+l,1.0);return c;}vec3 SetLum(vec3 c,float l){c+=l-Lum(c);return ClipColor(c);}float Sat(vec3 c){float n=min(min(c.r,c.g),c.b);float x=max(max(c.r,c.g),c.b);return x-n;}vec3 SetSat(vec3 c,float s){float cmin=min(min(c.r,c.g),c.b);float cmax=max(max(c.r,c.g),c.b);vec3 res=vec3(0.0);if(cmax>cmin){if(c.r==cmin&&c.b==cmax){res.r=0.0;res.g=((c.g-cmin)*s)/(cmax-cmin);res.b=s;}else if(c.r==cmin&&c.g==cmax){res.r=0.0;res.b=((c.b-cmin)*s)/(cmax-cmin);res.g=s;}else if(c.g==cmin&&c.b==cmax){res.g=0.0;res.r=((c.r-cmin)*s)/(cmax-cmin);res.b=s;}else if(c.g==cmin&&c.r==cmax){res.g=0.0;res.b=((c.b-cmin)*s)/(cmax-cmin);res.r=s;}else if(c.b==cmin&&c.r==cmax){res.b=0.0;res.g=((c.g-cmin)*s)/(cmax-cmin);res.r=s;}else{res.b=0.0;res.r=((c.r-cmin)*s)/(cmax-cmin);res.g=s;}}return res;}vec3 applyHue(vec3 col,float hueAdjust){vec3 k=vec3(0.57735,0.57735,0.57735);float cosAngle=cos(hueAdjust);return col*cosAngle+cross(k,col)*sin(hueAdjust)+k*dot(k,col)*(1.0-cosAngle);}vec3 blendMultiply(vec3 base,vec3 blend){return base*blend;}vec3 blendMultiply(vec3 base,vec3 blend,float opacity){return(blendMultiply(base,blend)*opacity+base*(1.0-opacity));}void main(){vec2 uv=vUv;vec4 artwork=texture2D(tArtwork,uv).rgba;vec2 areaSize=uSharpenSize/uArtworkSize;vec4 c1=texture2D(tArtwork,mod(uv-areaSize,1.));vec4 c2=texture2D(tArtwork,mod(vec2(uv.x,uv.y-areaSize.y),1.));vec4 c3=texture2D(tArtwork,mod(vec2(uv.x+areaSize.x,uv.y-areaSize.y),1.));vec4 c4=texture2D(tArtwork,mod(vec2(uv.x-areaSize.x,uv.y),1.));vec4 c5=texture2D(tArtwork,mod(vec2(uv.x+areaSize.x,uv.y),1.));vec4 c6=texture2D(tArtwork,mod(vec2(uv.x-areaSize.x,uv.y+areaSize.y),1.));vec4 c7=texture2D(tArtwork,mod(vec2(uv.x,uv.y+areaSize.y),1.));vec4 c8=texture2D(tArtwork,mod(uv+areaSize,1.));vec4 blur=(c1+c3+c6+c8+2.*(c2+c4+c5+c7)+4.*artwork)/16.;artwork=(1.+uSharpenBlur)*artwork-uSharpenBlur*blur;float brightness=uBrightness;artwork=brightnessMatrix(brightness)*contrastMatrix(uContrast)*artwork;float amt=mix(uHighlights,uShadows,1.0-Lum(artwork.rgb))*artwork.a;if(amt<0.0)amt*=2.0;vec3 res=mix(artwork.rgb,vec3(1.0),amt);vec3 blend=mix(vec3(1.0),pow(artwork.rgb,vec3(1.0/0.7)),amt);res=max(1.0-((1.0-res)/blend),0.0);res=SetLum(SetSat(artwork.rgb,Sat(res)),Lum(res));res=applyHue(res,uHueAdjust);const vec3 W=vec3(0.2125,0.7154,0.0721);vec3 intensity=vec3(dot(res,W));res=mix(intensity,res,uSaturation);artwork.rgb=res;float height=(artwork.r+artwork.g+artwork.b)/3.;vec2 normal=stdNormalMap(height);normal*=uNormalStr;normal+=.5;float lighting=dot(normal,normalize(uLightPos));artwork.rgb+=lighting*uLightStr*.5;gl_FragColor=artwork;}`;var D="precision highp float;varying vec2 vUv;void main(){vUv=uv;gl_Position=vec4(position,1.0);}";var M=class{constructor(){this.useA=!1;let s=function(t){let e=parseInt(t.substr(0,8),16),a=parseInt(t.substr(8,8),16),l=parseInt(t.substr(16,8),16),i=parseInt(t.substr(24,8),16);return function(){e|=0,a|=0,l|=0,i|=0;let m=(e+a|0)+i|0;return i=i+1|0,e=a^a>>>9,a=l+(l<<3)|0,l=l<<21|l>>>11,l=l+m|0,(m>>>0)/4294967296}};this.prngA=new s(tokenData.hash.substr(2,32)),this.prngB=new s(tokenData.hash.substr(34,32));for(let t=0;t<1e6;t+=2)this.prngA(),this.prngB()}random_dec=()=>(this.useA=!this.useA,this.useA?this.prngA():this.prngB());random_num(s,t){return s+(t-s)*this.random_dec()}random_int(s,t){return Math.floor(this.random_num(s,t+1))}random_bool(s){return this.random_dec()<s}random_choice(s){return s[this.random_int(0,s.length-1)]}};var ss="mat4 brightnessMatrix(float brightness){return mat4(1,0,0,0,0,1,0,0,0,0,1,0,brightness,brightness,brightness,1);}";var ts="mat4 contrastMatrix(float contrast){float t=(1.0-contrast)/2.0;return mat4(contrast,0,0,0,0,contrast,0,0,0,0,contrast,0,t,t,t,1);}";var es="float cubicIn(float t){return t*t*t;}float cubicOut(float t){float f=t-1.0;return f*f*f+1.0;}";var rs="float exponentialOut(float t){return t==1.0?t:1.0-pow(2.0,-10.0*t);}float exponentialIn(float t){return t==0.0?t:pow(2.0,10.0*(t-1.0));}";var as="float hue2rgb(float f1,float f2,float hue){if(hue<0.0)hue+=1.0;else if(hue>1.0)hue-=1.0;float res;if((6.0*hue)<1.0)res=f1+(f2-f1)*6.0*hue;else if((2.0*hue)<1.0)res=f2;else if((3.0*hue)<2.0)res=f1+(f2-f1)*((2.0/3.0)-hue)*6.0;else r
-.1,lx:.1,a:.13,cv:.69,cs:732.01,sp:0,lp:0,i:!1,vt:.01,as:.36,sz:20,sr:0},{c:{r:"0.224",g:"0.224",b:"0.373"},csa:{r:"0.224",g:"0.224",b:"0.373"},cl:808137,lw:1,lwa:1,lwp:8,smi:20,smx:125.95762711864407,smp:8,r:"1",hm:0,hx:0,sm:-.46,sx:.23,lm:0,lx:.1,a:.14,cv:.45,cs:677,sp:0,lp:.07,i:!1,vt:.01,as:.25,sz:20,sr:0},{c:{r:"0.973",g:"0.957",b:"0.624"},csa:{r:"0.973",g:"0.957",b:"0.624"},cl:808137,lw:1,lwa:1,lwp:8,smi:12,smx:143,smp:8,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.24,cv:.29,cs:755.39,sp:0,lp:0,i:!1,vt:.01,as:.48,sz:10,sr:0},{c:{r:"0.573",g:"0.420",b:"0.773"},csa:{r:"0.620",g:"0.373",b:"0.925"},cl:965275,lw:1,lwa:1,lwp:12,smi:10,smx:119,smp:8,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.22,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.28,sz:20,sr:0},{c:{r:"0.722",g:"0.471",b:"0.216"},csa:{r:"0.875",g:"0.482",b:"0.110"},cl:258155,lw:1,lwa:1,lwp:8,smi:29,smx:169,smp:4,r:"0",hm:0,hx:0,sm:-.05,sx:.95,lm:-.1,lx:.1,a:.13,cv:.91,cs:1,sp:.93,lp:0,i:!1,vt:.01,as:.21,sz:20,sr:0},{c:{r:"0.200",g:"0.075",b:"0.608"},csa:{r:"0.200",g:"0.075",b:"0.608"},cl:718344,lw:1,lwa:1,lwp:8,smi:20,smx:152,smp:8,r:"0",hm:0,hx:0,sm:-.78,sx:.37,lm:-.1,lx:.1,a:.14,cv:.74,cs:677,sp:-.33,lp:.44,i:!1,vt:.01,as:.2,sz:20,sr:0},{c:{r:"0.224",g:"0.224",b:"0.153"},csa:{r:"0.224",g:"0.224",b:"0.153"},cl:954051,lw:1,lwa:2,lwp:8,smi:12,smx:40,smp:4,r:"0",hm:0,hx:0,sm:-.5700000000000001,sx:.42,lm:-.1,lx:.1,a:.1,cv:.78,cs:677,sp:.37,lp:.18,i:!1,vt:.01,as:.11,sz:20,sr:0}],c:11}}});var Hs=p((ha,ie)=>{ie.exports={ppd:{b:0,c:.96,s:1.05,hl:.1,sd:.48,h:0,sb:0,ss:1,ls:.1},gd:{bg:{r:"1.000",g:"0.973",b:"0.973"}},ld:{ld:[{c:{r:"0.910",g:"0.910",b:"0.902"},csa:{r:"0.902",g:"0.824",b:"0.824"},cl:651e3,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.973",g:"0.922",b:"0.675"},csa:{r:"0.412",g:"0.373",b:"0.224"},cl:965275,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.23,sz:20,sr:0},{c:{r:"0.922",g:"0.451",b:"0.102"},csa:{r:"0.922",g:"0.451",b:"0.102"},cl:941261,lw:1,lwa:0,lwp:8,smi:47,smx:97.651,smp:13,r:0,hm:-.05,hx:.02,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.29,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.22,sz:20,sr:0},{c:{r:"0.024",g:"0.275",b:"0.667"},csa:{r:"0.012",g:"0.275",b:"0.675"},cl:941261,lw:1,lwa:1,lwp:8,smi:20,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.38,sx:.6,lm:-.18,lx:.09,a:.15,cv:.8,cs:677,sp:.3,lp:-.49,i:!1,vt:.01,as:.24,sz:20,sr:0},{c:{r:"0.122",g:"0.106",b:"0.106"},csa:{r:"0.122",g:"0.106",b:"0.106"},cl:929782,lw:1,lwa:1,lwp:8,smi:12,smx:120,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.441,as:.23,sz:20,sr:0},{c:{r:"0.165",g:"0.141",b:"0.129"},csa:{r:"0.122",g:"0.075",b:"0.059"},cl:976499,lw:1,lwa:1,lwp:8,smi:10,smx:99.792,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.4,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.17,sz:20,sr:0},{c:{r:"0.922",g:"0.922",b:"0.922"},csa:{r:"0.322",g:"0.322",b:"0.322"},cl:909155,lw:1,lwa:0,lwp:8,smi:10,smx:87.395,smp:9,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.22,sz:20,sr:0},{c:{r:"0.973",g:"0.024",b:"0.024"},csa:{r:"0.361",g:"0.024",b:"0.024"},cl:942827,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:"3",hm:0,hx:0,sm:-.59,sx:.9500000000000001,lm:-.1,lx:.2,a:.27,cv:.8,cs:872.22,sp:-.1,lp:.21,i:!1,vt:.01,as:.58,sz:20,sr:0},{c:{r:"1.000",g:"0.804",b:"0.173"},csa:{r:"1.000",g:"0.804",b:"0.173"},cl:952740,lw:1,lwa:1,lwp:8,smi:16,smx:147.707,smp:12,r:0,hm:0,hx:0,sm:-.64,sx:.65,lm:-.1,lx:.1,a:.12,cv:.91,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.18,sz:20,sr:0},{c:{r:"0.067",g:"0.000",b:"0.000"},csa:{r:"0.067",g:"0.000",b:"0.000"},cl:952740,lw:1,lwa:1,lwp:8,smi:20,smx:110,smp:4,r:0,hm:-.03,hx:.11,sm:0,sx:.04,lm:-.45,lx:.1,a:.12,cv:.47000000000000003,cs:677,sp:-.28,lp:-.1,i:!1,vt:.042,as:.22,sz:12,sr:1},{c:{r:"0.020",g:"0.573",b:"0.753"},csa:{r:"0.012",g:"0.039",b:"0.067"},cl:987724,lw:1,lwa:0,lwp:8,smi:20,smx:88.417,smp:20,r:"3",hm:-.1,hx:.08,sm:-.71,sx:.37,lm:-.1,lx:.1,a:.11,cv:.74,cs:790.37,sp:.51,lp:0,i:!1,vt:.01,as:.38,sz:14,sr:0},{c:{r:"0.071",g:"0.075",b:"0.122"},csa:{r:"0.063",g:"0.067",b:"0.118"},cl:942827,lw:1,lwa:1,lwp:11,smi:10,smx:169,smp:10,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.13,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.18,sz:10,sr:0}],c:12}}});var Is=p((ma,le)=>{le.exports={ppd:{b:0,c:.97,s:.7000000000000001,hl:0,sd:-.08,h:-.8,sb:0,ss:1,ls:.07},gd:{bg:{r:"0.522",g:"0.573",b:"0.322"}},ld:{ld:[{c:{r:"0.522",g:"0.922",b:"0.706"},csa:{r:"0.522",g:"0.922",b:"0.706"},cl:392845,lw:1,lwa:1,lwp:8,smi:5,smx:92.5,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.824",g:"0.475",b:"0.063"},csa:{r:"0.275",g:"0.161",b:"0.008"},cl:886706,lw:1,lwa:0,lwp:8,smi:10,smx:159.175,smp:10,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.24,cv:.9,cs:2,sp:0,lp:0,i:!1,vt:.01,as:.3,sz:20,sr:0},{c:{r:"0.063",g:"0.157",b:"0.024"},csa:{r:"0.024",g:"0.122",b:"0.004"},cl:976499,lw:1,lwa:2,lwp:8,smi:10,smx:173.83050847457628,smp:11,r:"1",hm:0,hx:.02,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.32,cv:.57,cs:205.89,sp:0,lp:0,i:!1,vt:.01,as:.37,sz:20,sr:1},{c:{r:"0.212",g:"0.973",b:"0.055"},csa:{r:"0.373",g:"0.969",b:"0.275"},cl:830586,lw:1,lwa:1,lwp:8,smi:10,smx:107.083,smp:8,r:"3",hm:0,hx:0,sm:-.76,sx:.93,lm:0,lx:.1,a:.36,cv:.83,cs:677,sp:.6,lp:0,i:!1,vt:.01,as:.52,sz:20,sr:0},{c:{r:"1.000",g:"1.000",b:"1.000"},csa:{r:"1.000",g:"1.000",b:"1.000"},cl:920379,lw:1,lwa:0,lwp:8,smi:10,smx:157.6949152542373,smp:12,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.46,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.761,as:0,sz:20,sr:0},{c:{r:"0.902",g:"0.855",b:"0.522"},csa:{r:"0.902",g:"0.855",b:"0.522"},cl:471414,lw:1,lwa:0,lwp:8,smi:10,smx:168.574,smp:11,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.58,cs:276.04,sp:0,lp:0,i:!1,vt:.01,as:.2,sz:20,sr:0},{c:{r:"0.973",g:"0.957",b:"0.624"},csa:{r:"0.973",g:"0.961",b:"0.573"},cl:895346,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.29,cs:755.39,sp:0,lp:0,i:!1,vt:.01,as:.34,sz:20,sr:0},{c:{r:"0.024",g:"0.075",b:"0.165"},csa:{r:"0.008",g:"0.067",b:"0.122"},cl:976499,lw:1,lwa:1,lwp:7,smi:20,smx:133.96610169491527,smp:7,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.11,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.03,as:.1,sz:20,sr:1},{c:{r:"0.973",g:"1.000",b:"0.871"},csa:{r:"0.973",g:"0.973",b:"0.961"},cl:987724,lw:1,lwa:1,lwp:8,smi:14,smx:85,smp:9,r:"3",hm:0,hx:0,sm:-.87,sx:.32,lm:-.1,lx:.1,a:.19,cv:.45,cs:677,sp:.2,lp:-.07,i:!1,vt:.01,as:.3,sz:12,sr:0},{c:{r:"0.475",g:"0.373",b:"0.063"},csa:{r:"0.267",g:"0.114",b:"0.773"},cl:942827,lw:1,lwa:1,lwp:8,smi:10,smx:110,smp:8,r:"3",hm:0,hx:0,sm:-.05,sx:.53,lm:-.54,lx:.46,a:.07,cv:.45,cs:677,sp:.53,lp:.14,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.024",g:"0.424",b:"0.153"},csa:{r:"0.024",g:"0.424",b:"0.153"},cl:976499,lw:1,lwa:0,lwp:8,smi:1,smx:86.667,smp:12,r:0,hm:0,hx:0,sm:-1,sx:.65,lm:-.1,lx:.1,a:.04,cv:1,cs:2,sp:0,lp:0,i:!1,vt:.01,as:.1,sz:20,sr:0},{c:{r:"0.212",g:"0.227",b:"0.173"},csa:{r:"0.153",g:"0.173",b:"0.133"},cl:746121,lw:1,lwa:1,lwp:14,smi:10,smx:120,smp:5,r:"0",hm:-.52,hx:.11,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.14,cv:.84,cs:2,sp:-.49,lp:.18,i:!1,vt:.01,as:.1,sz:12,sr:"0"}],c:12}}});var Gs=p((pa,ne)=>{ne.exports={ppd:{b:0,c:-.8,s:-1.52,hl:-.65,sd:-.1,h:3.31,sb:0,ss:1,ls:.07},gd:{bg:{r:"0.522",g:"0.522",b:"0.522"}},ld:{ld:[{c:{r:"0.024",g:"0.522",b:"0.871"},csa:{r:"0.024",g:"0.522",b:"0.871"},cl:628551,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:-.12,hx:.02,sm:.65,sx:.84,lm:-.28,lx:-.19,a:.64,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.973",g:"0.961",b:"0.961"},csa:{r:"0.020",g:"0.310",b:"0.722"},cl:673448,lw:1,lwa:0,lwp:8,smi:10,smx:85,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.42,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.6,sz:13.2,sr:0},{c:{r:"1.000",g:"1.000",b:"1.000"},csa:{r:"1.000",g:"1.000",b:"1.000"},cl:707120,lw:1,lwa:1,lwp:14,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.18,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.545",g:"0.365",b:"0.106"},csa:{r:"0.863",g:"0.514",b:"0.035"},cl:830586,lw:1,lwa:1,lwp:8,smi:10,smx:115.476,smp:20,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.24,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.24,sz:10,sr:0},{c:{r:"0.925",g:"0.925",b:"0.925"},csa:{r:"0.925",g:"0.925",b:"0.925"},cl:729569,lw:1,lwa:1,lwp:8,smi:10,smx:136,smp:11,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.25,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"1.000",g:"1.000",b:"1.000"},csa:{r:"1.000",g:"1.000",b:"1.000"},cl:707120,lw:1,lwa:1,lwp:14,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.15,sz:20,sr:0},{c:{r:"0.722",g:"0.373",b:"0.173"},csa:{r:"0.961",g:"0.380",b:"0.075"},cl:830586,lw:1,lwa:1,lwp:8,smi:10,smx:115.476,smp:20,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.17,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.925",g:"0.925",b:"0.925"},csa:{r:"0.925",g:"0.925",b:"0.925"},cl:729569,lw:1,lwa:1,lwp:8,smi:10,smx:136,smp:11,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.33,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.29,sz:20,sr:0}],c:8}}});var Ns=p((Ta,js)=>{js.exports=function(){for(var r=0;r<arguments.length;r++)if(arguments[r]!==void 0)return arguments[r]}});var dt=new URLSearchParams(window.location.search),x0={size:{width:3508,height:4961},resolution:1,dpr:dt.get("hd")==="1"?1:.5,useDebug:!1,gui:null,linesWidthHeight:150,countLayers:4,composition:"Voidness",renderer:null,rand:null};x0.aspect=x0.size.height/x0.size.width;var n=x0;var A0=y(z());function ut(r,s){let t=e=>{s-=e,s<=0&&(r.call(),B.onUpdate.remove(t))};return B.onUpdate.add(t),t}function Z0(r){B.onUpdate.remove(r)}var J0=ut;var B0=class{constructor(s=!0){this.skipLimit=32,this.skipActivated=!0,this.lastTime=Date.now(),this.pause=!1,this.tiId=-1,this.width=0,this.height=0,this.resolution=window.devicePixelRatio,this.onResize=new A0.default,this.onUpdate=new A0.default,s&&this.init()}init(s=!0){window.addEventListener("resize",this.onResizeWithDelay,!1),window.addEventListener("orientationchange",this.onResizeWithDelay,!1),s&&this.onResizeWithoutDelay(),requestAnimationFrame(this.update)}onResizeWithDelay=()=>{this.tiId!==-1&&Z0(this.tiId),this.tiId=J0(this.onResizeWithoutDelay,10)};onResizeWithoutDelay=()=>{this.width=window.innerWidth,this.height=window.innerHeight,this.onResize.dispatch()};forceResize(s=!1){if(s){this.onResizeWithDelay();ret
1,cv:.86,cs:677,sp:.29,lp:-.53,i:!1,vt:.01,as:.4,sz:14,sr:0,sd:null},{c:{r:"0.816",g:"0.933",b:"0.475"},csa:{r:"0.867",g:"0.961",b:"0.624"},cl:665770,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.54,sx:.46,lm:-.1,lx:.1,a:.09,cv:.86,cs:677,sp:.29,lp:-.53,i:!1,vt:.01,as:.1,sz:20,sr:1,sd:null},{c:{r:"0.122",g:"0.063",b:"0.075"},csa:{r:"0.122",g:"0.063",b:"0.075"},cl:964218,lw:1,lwa:1,lwp:8,smi:10,smx:135.704,smp:7,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.18,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.37,sz:16,sr:0,sd:null},{c:{r:"0.976",g:"0.310",b:"0.553"},csa:{r:"0.969",g:"0.863",b:"0.718"},cl:1e6,lw:1,lwa:1,lwp:8,smi:8,smx:143.635,smp:9,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.08,cv:.86,cs:677,sp:.32,lp:-.21,i:!1,vt:.01,as:.09,sz:16,sr:0,sd:null},{c:{r:"0.153",g:"0.224",b:"0.337"},csa:{r:"0.153",g:"0.224",b:"0.337"},cl:785689,lw:1,lwa:1,lwp:8,smi:10,smx:203,smp:4,r:1,hm:0,hx:0,sm:-.89,sx:.42,lm:-.1,lx:.1,a:.1,cv:.86,cs:677,sp:.29,lp:-.53,i:!1,vt:.01,as:.14,sz:16,sr:0,sd:null},{c:{r:"0.863",g:"1.000",b:"0.675"},csa:{r:"0.863",g:"1.000",b:"0.675"},cl:684672,lw:1,lwa:1,lwp:8,smi:18,smx:169.914,smp:14,r:"0",hm:0,hx:0,sm:-.64,sx:.49,lm:-.05,lx:.1,a:.06,cv:.84,cs:2,sp:.18,lp:-.1,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null}],c:12}}});var As=p((la,te)=>{te.exports={ppd:{b:0,c:-.78,s:-1.3,hl:-1.21,sd:-.46,h:-.08,sb:0,ss:1,ls:.07},gd:{bg:{r:"0.800",g:"0.800",b:"0.800"}},ld:{ld:[{c:{r:"0.839",g:"0.024",b:"0.024"},csa:{r:"0.824",g:"0.024",b:"0.024"},cl:628551,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.976",g:"0.961",b:"0.961"},csa:{r:"0.976",g:"0.961",b:"0.961"},cl:673448,lw:1,lwa:0,lwp:8,smi:10,smx:85,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.42,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.16,sz:14,sr:0,sd:null},{c:{r:"1.000",g:"1.000",b:"1.000"},csa:{r:"1.000",g:"1.000",b:"1.000"},cl:707120,lw:1,lwa:1,lwp:14,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.18,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.38,sz:14,sr:0,sd:null},{c:{r:"0.000",g:"0.000",b:"0.804"},csa:{r:"0.000",g:"0.000",b:"0.804"},cl:830586,lw:1,lwa:1,lwp:8,smi:10,smx:115.476,smp:20,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.24,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.3,sz:20,sr:0,sd:null},{c:{r:"0.937",g:"0.937",b:"0.937"},csa:{r:"0.937",g:"0.937",b:"0.937"},cl:729569,lw:1,lwa:1,lwp:8,smi:10,smx:136,smp:11,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.25,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.52,sz:12,sr:0,sd:null},{c:{r:"1.000",g:"1.000",b:"1.000"},csa:{r:"1.000",g:"1.000",b:"1.000"},cl:707120,lw:1,lwa:1,lwp:14,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.35,sz:14,sr:1,sd:null},{c:{r:"0.000",g:"0.000",b:"0.804"},csa:{r:"0.357",g:"0.357",b:"0.773"},cl:830586,lw:1,lwa:1,lwp:8,smi:10,smx:115.476,smp:20,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.17,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.58,sz:12,sr:0,sd:null},{c:{r:"0.937",g:"0.937",b:"0.937"},csa:{r:"0.937",g:"0.937",b:"0.937"},cl:729569,lw:1,lwa:1,lwp:8,smi:10,smx:136,smp:11,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.33,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.44,sz:18,sr:1,sd:null}],c:8}}});var Bs=p((na,ee)=>{ee.exports={ppd:{b:0,c:1.05,s:1.3,hl:.7,sd:-.93,h:0,sb:0,ss:1,ls:.07},gd:{bg:{r:"0.871",g:"0.310",b:"0.180"}},ld:{ld:[{c:{r:"0.863",g:"0.863",b:"0.863"},csa:{r:"0.863",g:"0.863",b:"0.863"},cl:763241,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.54,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.224",g:"0.451",b:"0.851"},csa:{r:"0.224",g:"0.451",b:"0.851"},cl:819362,lw:1,lwa:1,lwp:8,smi:15,smx:142.034,smp:13,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.87,cv:.1,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.3,sz:20,sr:0},{c:{r:"0.929",g:"0.910",b:"0.910"},csa:{r:"0.773",g:"0.773",b:"0.773"},cl:886706,lw:1,lwa:1,lwp:20,smi:18,smx:150.102,smp:7,r:"1",hm:0,hx:0,sm:.05,sx:-.05,lm:-.1,lx:.2,a:.81,cv:.4,cs:3,sp:.04,lp:.07,i:!1,vt:.01,as:.59,sz:13.77,sr:0},{c:{r:"0.129",g:"0.322",b:"0.286"},csa:{r:"0.118",g:"0.278",b:"0.251"},cl:729569,lw:1,lwa:1,lwp:16,smi:12,smx:154.878,smp:8,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.1,cv:.76,cs:898.39,sp:.09,lp:.02,i:!1,vt:.01,as:.26,sz:13.77,sr:0},{c:{r:"0.902",g:"0.059",b:"0.059"},csa:{r:"0.765",g:"0.486",b:"0.486"},cl:909155,lw:1,lwa:1,lwp:8,smi:15,smx:142.034,smp:8,r:"3",hm:0,hx:0,sm:-.05,sx:.5,lm:0,lx:.1,a:.08,cv:.9500000000000001,cs:2,sp:.25,lp:0,i:!1,vt:.01,as:.16,sz:12,sr:0},{c:{r:"0.161",g:"0.412",b:"0.580"},csa:{r:"0.208",g:"0.302",b:"0.373"},cl:998948,lw:1,lwa:0,lwp:8,smi:20,smx:150,smp:4,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.38,cs:1.5,sp:0,lp:0,i:!1,vt:.01,as:.12,sz:20,sr:0},{c:{r:"0.973",g:"0.667",b:"0.604"},csa:{r:"0.973",g:"0.667",b:"0.604"},cl:987724,lw:1,lwa:1,lwp:8,smi:20,smx:150,smp:18,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.11,sz:20,sr:0},{c:{r:"0.224",g:"0.451",b:"0.851"},csa:{r:"0.341",g:"0.573",b:"0.969"},cl:819362,lw:1,lwa:1,lwp:8,smi:15,smx:142.034,smp:13,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.29,cv:.1,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.34,sz:20,sr:0},{c:{r:"0.792",g:"0.792",b:"0.792"},csa:{r:"0.941",g:"0.922",b:"0.922"},cl:886706,lw:1,lwa:1,lwp:20,smi:18,smx:156,smp:7,r:1,hm:0,hx:0,sm:.05,sx:-.05,lm:-.1,lx:.2,a:.23,cv:.4,cs:3,sp:.04,lp:.07,i:!1,vt:.01,as:.33,sz:16,sr:0},{c:{r:"0.173",g:"0.420",b:"0.369"},csa:{r:"0.173",g:"0.420",b:"0.369"},cl:814994,lw:1,lwa:1,lwp:16,smi:12,smx:154.878,smp:8,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.1,cv:.76,cs:898.39,sp:.09,lp:.02,i:!1,vt:.01,as:.2,sz:14,sr:0},{c:{r:"0.765",g:"0.486",b:"0.486"},csa:{r:"0.765",g:"0.486",b:"0.486"},cl:909155,lw:1,lwa:1,lwp:8,smi:15,smx:142.034,smp:8,r:"1",hm:0,hx:0,sm:-.05,sx:.5,lm:0,lx:.1,a:.06,cv:.85,cs:767.08,sp:.09,lp:0,i:!1,vt:.01,as:.13,sz:12,sr:0},{c:{r:"0.125",g:"0.322",b:"0.471"},csa:{r:"0.161",g:"0.412",b:"0.580"},cl:998948,lw:1,lwa:0,lwp:8,smi:20,smx:150,smp:4,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.38,cs:1.5,sp:0,lp:0,i:!1,vt:.01,as:.3,sz:14,sr:0},{c:{r:"0.973",g:"0.667",b:"0.604"},csa:{r:"0.925",g:"0.180",b:"0.031"},cl:987724,lw:1,lwa:1,lwp:8,smi:20,smx:150,smp:18,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.07,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.05,sz:10,sr:0}],c:13}}});var Es=p((oa,re)=>{re.exports={ppd:{b:0,c:1,s:1,hl:.2,sd:-.44,h:0,sb:0,ss:1,ls:.07},gd:{bg:{r:"1.000",g:"0.976",b:"0.000"}},ld:{ld:[{c:{r:"0.518",g:"0.459",b:"0.420"},csa:{r:"0.667",g:"0.451",b:"0.306"},cl:1e6,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.29,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"1.000",g:"0.914",b:"0.275"},csa:{r:"0.863",g:"0.773",b:"0.078"},cl:808137,lw:1,lwa:0,lwp:8,smi:10,smx:142.034,smp:13,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.35,cv:.1,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.33,sz:20,sr:0},{c:{r:"0.812",g:"0.922",b:"1.000"},csa:{r:"0.812",g:"0.922",b:"1.000"},cl:359172,lw:1,lwa:1,lwp:20,smi:18,smx:150.102,smp:7,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.42,cv:.72,cs:235.54,sp:-.14,lp:-.21,i:!1,vt:.01,as:.4,sz:20,sr:0},{c:{r:"1.000",g:"0.208",b:"0.106"},csa:{r:"1.000",g:"0.459",b:"0.373"},cl:920379,lw:1,lwa:1,lwp:16,smi:18,smx:123.051,smp:8,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.76,cs:898.39,sp:.09,lp:.02,i:!1,vt:.01,as:.29,sz:20,sr:0},{c:{r:"0.153",g:"0.424",b:"0.675"},csa:{r:"0.016",g:"0.329",b:"0.655"},cl:830586,lw:1,lwa:1,lwp:8,smi:29,smx:169,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.5,lm:-.1,lx:.1,a:.08,cv:.57,cs:715.54,sp:.09,lp:0,i:!1,vt:.01,as:.1,sz:20,sr:0},{c:{r:"1.000",g:"0.914",b:"0.275"},csa:{r:"0.459",g:"0.424",b:"0.180"},cl:808137,lw:1,lwa:0,lwp:8,smi:10,smx:142.034,smp:13,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.35,cv:.1,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.21,sz:20,sr:0},{c:{r:"0.812",g:"0.922",b:"1.000"},csa:{r:"0.424",g:"0.706",b:"0.910"},cl:617327,lw:1,lwa:1,lwp:20,smi:18,smx:140,smp:5,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.34,cv:.72,cs:235.54,sp:-.14,lp:-.21,i:!1,vt:.01,as:.31,sz:25.82,sr:0},{c:{r:"0.976",g:"0.212",b:"0.114"},csa:{r:"0.851",g:"0.122",b:"0.027"},cl:920379,lw:1,lwa:1,lwp:7,smi:18,smx:123.051,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.76,cs:898.39,sp:.09,lp:.02,i:!1,vt:.01,as:.16,sz:20,sr:0},{c:{r:"0.020",g:"0.416",b:"0.780"},csa:{r:"0.220",g:"0.573",b:"0.902"},cl:830586,lw:1,lwa:1,lwp:8,smi:29,smx:169,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.95,lm:-.1,lx:.1,a:.08,cv:.57,cs:715.54,sp:.93,lp:0,i:!1,vt:.01,as:.1,sz:30,sr:0},{c:{r:"1.000",g:"0.914",b:"0.275"},csa:{r:"0.459",g:"0.424",b:"0.180"},cl:808137,lw:1,lwa:0,lwp:8,smi:10,smx:142.034,smp:13,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.35,cv:.1,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.21,sz:20,sr:0},{c:{r:"1.000",g:"0.208",b:"0.106"},csa:{r:"0.851",g:"0.122",b:"0.027"},cl:920379,lw:1,lwa:1,lwp:16,smi:18,smx:123.051,smp:8,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.76,cs:898.39,sp:.09,lp:.02,i:!1,vt:.01,as:.2,sz:18,sr:0},{c:{r:"0.000",g:"0.518",b:"1.000"},csa:{r:"0.220",g:"0.573",b:"0.902"},cl:987724,lw:1,lwa:1.5,lwp:8,smi:12,smx:110,smp:6,r:"0",hm:0,hx:0,sm:-.05,sx:.95,lm:-.1,lx:.1,a:.09,cv:.57,cs:715.54,sp:.93,lp:0,i:!1,vt:.01,as:.1,sz:16,sr:0}],c:12}}});var ks=p((ca,ae)=>{ae.exports={ppd:{b:0,c:1.1,s:1.1,hl:0,sd:.17,h:0,sb:0,ss:1,ls:.1},gd:{bg:{r:"0.173",g:"0.259",b:"0.420"}},ld:{ld:[{c:{r:"1.000",g:"0.408",b:"0.000"},csa:{r:"1.000",g:"0.408",b:"0.000"},cl:906825,lw:1,lwa:1,lwp:15,smi:30,smx:104,smp:4,r:1,hm:0,hx:0,sm:-.25,sx:.43,lm:-.2,lx:.18,a:.36,cv:.6,cs:2,sp:.16,lp:-.05,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.024",g:"0.075",b:"0.075"},csa:{r:"0.024",g:"0.075",b:"0.075"},cl:931603,lw:1,lwa:.5,lwp:20,smi:16,smx:176,smp:4,r:"1",hm:-.19,hx:0,sm:-.5700000000000001,sx:.05,lm:-.35000000000000003,lx:.1,a:.22,cv:.92,cs:4,sp:0,lp:.11,i:!1,vt:.01,as:.34,sz:20,sr:0},{c:{r:"0.471",g:"0.471",b:"0.608"},csa:{r:"0.471",g:"0.471",b:"0.608"},cl:460189,lw:1,lwa:1.1,lwp:13,smi:20,smx:144.8813559322034,smp:4,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.11,cv:.26,cs:26.54,sp:0,lp:0,i:!1,vt:.01,as:.27,sz:20,sr:0},{c:{r:"0.224",g:"0.204",b:"0.176"},csa:{r:"0.224",g:"0.204",b:"0.176"},cl:954051,lw:1,lwa:1,lwp:8,smi:14,smx:132.54237288135593,smp:10,r:"1",hm:0,hx:0,sm:-.87,sx:.23,lm:-.1,lx:.1,a:.16,cv:.27,cs:4.48,sp:.34,lp:0,i:!1,vt:.01,as:.27,sz:20,sr:0},{c:{r:"0.627",g:"0.659",b:"0.961"},csa:{r:"0.769",g:"0.773",b:"0.969"},cl:987724,lw:1,lwa:.5,lwp:9,smi:30,smx:121,smp:6,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:
14994,lw:1,lwa:1,lwp:8,smi:24,smx:123.051,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.88,cs:677,sp:.27,lp:-.28,i:!1,vt:.01,as:.27,sz:20,sr:0},{c:{r:"0.122",g:"0.122",b:"0.122"},csa:{r:"0.875",g:"0.859",b:"0.824"},cl:841810,lw:1,lwa:1,lwp:5,smi:14,smx:105,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.12,cv:.26,cs:677,sp:.18,lp:.25,i:!1,vt:.01,as:.13,sz:20,sr:"0"},{c:{r:"0.910",g:"0.867",b:"0.867"},csa:{r:"0.973",g:"0.922",b:"0.922"},cl:931603,lw:1,lwa:1,lwp:8,smi:17,smx:119,smp:6,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.16,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.2,sz:14,sr:0}],c:11}}});var Ts=p((ea,Zt)=>{Zt.exports={ppd:{b:0,c:-.8,s:-1.97,hl:.36,sd:-.21,h:2.88,sb:0,ss:1,ls:.08},gd:{bg:{r:"0.800",g:"0.800",b:"0.800"}},ld:{ld:[{c:{r:"0.290",g:"0.008",b:"0.008"},csa:{r:"0.510",g:"0.008",b:"0.008"},cl:841810,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.35,cv:.6,cs:677,sp:-.1,lp:-.35000000000000003,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"1.000",g:"1.000",b:"1.000"},csa:{r:"1.000",g:"1.000",b:"1.000"},cl:909155,lw:1,lwa:1,lwp:8,smi:10,smx:85,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.42,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.482",g:"0.490",b:"0.839"},csa:{r:"0.482",g:"0.490",b:"0.839"},cl:707120,lw:1,lwa:1,lwp:14,smi:10,smx:100,smp:4,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.18,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.004",g:"0.082",b:"0.631"},csa:{r:"0.004",g:"0.082",b:"0.631"},cl:964218,lw:1,lwa:1,lwp:8,smi:10,smx:115.476,smp:20,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.45,cs:677,sp:.39,lp:-.1,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.878",g:"0.824",b:"0.824"},csa:{r:"0.878",g:"0.824",b:"0.824"},cl:651e3,lw:1,lwa:1,lwp:12,smi:10,smx:133.966,smp:11,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.44,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.37,sz:20,sr:0,sd:0},{c:{r:"0.984",g:"0.945",b:"0.945"},csa:{r:"0.984",g:"0.945",b:"0.945"},cl:796913,lw:1,lwa:0,lwp:8,smi:20,smx:124.534,smp:9,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.12,sz:20,sr:1,sd:0},{c:{r:"0.000",g:"0.063",b:"0.518"},csa:{r:"0.008",g:"0.071",b:"0.518"},cl:826473,lw:1,lwa:1,lwp:8,smi:10,smx:115.476,smp:20,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.22,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.42,sz:20,sr:0,sd:0},{c:{r:"0.839",g:"0.576",b:"0.490"},csa:{r:"0.475",g:"0.145",b:"0.035"},cl:826473,lw:1,lwa:1,lwp:8,smi:10,smx:115.476,smp:20,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.12,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.18,sz:10,sr:0,sd:0},{c:{r:"0.922",g:"0.843",b:"0.843"},csa:{r:"0.922",g:"0.843",b:"0.843"},cl:651e3,lw:1,lwa:1,lwp:12,smi:10,smx:133.966,smp:11,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.44,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.22,sz:14,sr:1,sd:0},{c:{r:"0.000",g:"0.063",b:"0.518"},csa:{r:"0.039",g:"0.153",b:"0.925"},cl:826473,lw:1,lwa:1,lwp:8,smi:10,smx:115.476,smp:20,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.12,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.15,sz:10,sr:0,sd:0},{c:{r:"0.937",g:"0.463",b:"0.302"},csa:{r:"0.925",g:"0.651",b:"0.557"},cl:826473,lw:1,lwa:1,lwp:8,smi:10,smx:115.476,smp:20,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.12,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.36,sz:10,sr:0,sd:0},{c:{r:"0.925",g:"0.875",b:"0.875"},csa:{r:"0.925",g:"0.875",b:"0.875"},cl:651e3,lw:1,lwa:1,lwp:12,smi:10,smx:133.966,smp:11,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.44,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.24,sz:20,sr:1,sd:0}],c:12}}});var Ms=p((ra,Jt)=>{Jt.exports={ppd:{b:0,c:.9500000000000001,s:1.1,hl:0,sd:-.44,h:0,sb:0,ss:1,ls:.07},gd:{bg:{r:"0.102",g:"0.714",b:"0.714"}},ld:{ld:[{c:{r:"1.000",g:"1.000",b:"0.851"},csa:{r:"1.000",g:"1.000",b:"0.851"},cl:224483,lw:1,lwa:0,lwp:8,smi:96,smx:123.051,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.4,cv:.67,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.984",g:"0.576",b:"0.839"},csa:{r:"0.984",g:"0.576",b:"0.839"},cl:920379,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.341",g:"0.573",b:"0.475"},csa:{r:"0.341",g:"0.573",b:"0.475"},cl:942827,lw:1,lwa:0,lwp:8,smi:10,smx:132.542,smp:4,r:1,hm:-.14,hx:.13,sm:-.05,sx:.05,lm:0,lx:.1,a:.2,cv:.49,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.827",g:"0.467",b:"0.922"},csa:{r:"0.878",g:"0.655",b:"0.937"},cl:505086,lw:1,lwa:1,lwp:8,smi:10,smx:123.051,smp:9,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.22,sz:20,sr:0},{c:{r:"0.180",g:"0.910",b:"0.490"},csa:{r:"0.945",g:"0.643",b:"0.984"},cl:528072,lw:1,lwa:0,lwp:4,smi:10,smx:100,smp:4,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.21,cv:.15,cs:1,sp:0,lp:-.03,i:!1,vt:.01,as:.25,sz:20,sr:0},{c:{r:"0.973",g:"0.839",b:"0.984"},csa:{r:"0.973",g:"0.839",b:"0.984"},cl:952740,lw:1,lwa:1,lwp:7,smi:10,smx:100,smp:4,r:1,hm:-.24,hx:0,sm:-.64,sx:.91,lm:-.1,lx:.37,a:.23,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.3,sz:14,sr:0},{c:{r:"0.004",g:"0.165",b:"0.031"},csa:{r:"0.004",g:"0.165",b:"0.031"},cl:931603,lw:1,lwa:.5,lwp:8,smi:12,smx:123.051,smp:6,r:"0",hm:-.14,hx:.13,sm:-.76,sx:.43,lm:-.1,lx:.1,a:.16,cv:.94,cs:1.5,sp:.18,lp:.29,i:!1,vt:.01,as:.16,sz:10,sr:1},{c:{r:"0.827",g:"0.467",b:"0.922"},csa:{r:"0.773",g:"0.271",b:"0.886"},cl:931603,lw:1,lwa:1,lwp:8,smi:10,smx:123.051,smp:9,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.14,sz:4,sr:0},{c:{r:"0.180",g:"0.910",b:"0.490"},csa:{r:"0.322",g:"0.690",b:"0.169"},cl:849507,lw:1,lwa:0,lwp:4,smi:10,smx:100,smp:4,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.15,cs:1,sp:0,lp:-.03,i:!1,vt:.01,as:.2,sz:10,sr:0}],c:9}}});var Rs=p((aa,Kt)=>{Kt.exports={ppd:{b:0,c:1.02,s:1.3,hl:.42,sd:-.91,h:-.47000000000000003,sb:0,ss:1,ls:.07},gd:{bg:{r:"0.557",g:"0.388",b:"0.388"}},ld:{ld:[{c:{r:"0.263",g:"0.184",b:"0.412"},csa:{r:"0.263",g:"0.184",b:"0.412"},cl:5e5,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.12,sx:.05,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"1.000",g:"0.973",b:"0.973"},csa:{r:"1.000",g:"0.973",b:"0.973"},cl:920379,lw:1,lwa:1,lwp:16,smi:35,smx:169,smp:18,r:0,hm:0,hx:0,sm:-.76,sx:.29,lm:0,lx:.1,a:.18,cv:.77,cs:685.24,sp:0,lp:0,i:!1,vt:.01,as:.36,sz:20,sr:0},{c:{r:"1.000",g:"0.471",b:"0.000"},csa:{r:"1.000",g:"0.471",b:"0.000"},cl:886706,lw:1,lwa:0,lwp:8,smi:18,smx:186,smp:8,r:0,hm:0,hx:0,sm:-.05,sx:.34,lm:-.1,lx:.1,a:.16,cv:.9,cs:4,sp:.43,lp:.13,i:!1,vt:.01,as:.21,sz:20,sr:0},{c:{r:"0.361",g:"0.361",b:"1.000"},csa:{r:"0.373",g:"0.373",b:"0.922"},cl:920379,lw:1,lwa:0,lwp:8,smi:40,smx:200,smp:7,r:0,hm:0,hx:0,sm:-.55,sx:.41,lm:-.1,lx:.1,a:.15,cv:.45,cs:677,sp:.09,lp:-.14,i:!1,vt:.01,as:.44,sz:20,sr:0},{c:{r:"0.824",g:"0.569",b:"0.490"},csa:{r:"0.824",g:"0.569",b:"0.490"},cl:729569,lw:1,lwa:0,lwp:5,smi:10,smx:120,smp:7,r:0,hm:0,hx:0,sm:-.76,sx:.2,lm:-.1,lx:.1,a:.21,cv:.57,cs:677,sp:.07,lp:0,i:!1,vt:.01,as:.4,sz:20,sr:0},{c:{r:"0.871",g:"0.325",b:"0.110"},csa:{r:"0.941",g:"0.333",b:"0.102"},cl:639776,lw:1,lwa:0,lwp:8,smi:23,smx:200,smp:13,r:0,hm:0,hx:0,sm:-.67,sx:.43,lm:0,lx:.1,a:.18,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.49,sz:20,sr:0},{c:{r:"1.000",g:"0.471",b:"0.000"},csa:{r:"1.000",g:"0.471",b:"0.000"},cl:886706,lw:1,lwa:0,lwp:8,smi:18,smx:186,smp:8,r:0,hm:0,hx:0,sm:-.05,sx:.34,lm:-.1,lx:.1,a:.08,cv:.9,cs:4,sp:.43,lp:.13,i:!1,vt:.01,as:.13,sz:16,sr:0},{c:{r:"0.361",g:"0.361",b:"1.000"},csa:{r:"0.082",g:"0.082",b:"0.459"},cl:897931,lw:1,lwa:0,lwp:8,smi:40,smx:200,smp:7,r:0,hm:0,hx:0,sm:-.55,sx:.41,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:.09,lp:-.14,i:!1,vt:.01,as:.17,sz:20,sr:0},{c:{r:"1.000",g:"0.827",b:"0.784"},csa:{r:"1.000",g:"0.827",b:"0.784"},cl:909155,lw:1,lwa:0,lwp:5,smi:10,smx:120,smp:7,r:0,hm:0,hx:0,sm:-.99,sx:-.1,lm:-.1,lx:.1,a:.32,cv:.57,cs:677,sp:.07,lp:0,i:!1,vt:.01,as:.21,sz:18,sr:0},{c:{r:"0.722",g:"0.282",b:"0.141"},csa:{r:"0.722",g:"0.282",b:"0.141"},cl:662224,lw:1,lwa:0,lwp:8,smi:23,smx:200,smp:13,r:0,hm:0,hx:0,sm:-.67,sx:.43,lm:0,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.2,sz:16,sr:0},{c:{r:"0.361",g:"0.361",b:"1.000"},csa:{r:"0.224",g:"0.224",b:"0.937"},cl:897931,lw:1,lwa:0,lwp:8,smi:40,smx:200,smp:7,r:0,hm:0,hx:0,sm:-.55,sx:.41,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:.09,lp:-.14,i:!1,vt:.01,as:.31,sz:20,sr:0},{c:{r:"1.000",g:"0.827",b:"0.784"},csa:{r:"1.000",g:"0.827",b:"0.784"},cl:909155,lw:1,lwa:0,lwp:5,smi:10,smx:120,smp:7,r:0,hm:0,hx:0,sm:-.99,sx:-.1,lm:-.1,lx:.1,a:.17,cv:.57,cs:677,sp:.07,lp:0,i:!1,vt:.01,as:.2,sz:16,sr:0},{c:{r:"0.722",g:"0.282",b:"0.141"},csa:{r:"0.910",g:"0.286",b:"0.090"},cl:662224,lw:1,lwa:0,lwp:8,smi:23,smx:200,smp:13,r:0,hm:0,hx:0,sm:-.67,sx:.43,lm:0,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.12,sz:20,sr:0}],c:13}}});var Ls=p((ia,se)=>{se.exports={ppd:{b:0,c:1,s:1.1,hl:0,sd:-.75,h:0,sb:.3,ss:1,ls:.11},gd:{bg:{r:"0.365",g:"0.753",b:"0.753"}},ld:{ld:[{c:{r:"0.804",g:"0.157",b:"0.431"},csa:{r:"0.804",g:"0.157",b:"0.431"},cl:729569,lw:1,lwa:1,lwp:10,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.44,cv:.74,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.188",g:"0.086",b:"0.137"},csa:{r:"0.302",g:"0.129",b:"0.216"},cl:516310,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.34,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.27,sz:20,sr:0,sd:null},{c:{r:"0.816",g:"0.933",b:"0.475"},csa:{r:"0.867",g:"0.929",b:"0.690"},cl:665770,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.54,sx:.46,lm:-.1,lx:.1,a:.79,cv:.86,cs:677,sp:.29,lp:-.53,i:!1,vt:.01,as:.93,sz:30,sr:1,sd:null},{c:{r:"0.122",g:"0.102",b:"0.067"},csa:{r:"0.122",g:"0.102",b:"0.067"},cl:964218,lw:1,lwa:1,lwp:8,smi:10,smx:135.704,smp:7,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.09,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.33,sz:20,sr:0,sd:null},{c:{r:"0.961",g:"0.075",b:"0.482"},csa:{r:"0.988",g:"0.553",b:"0.749"},cl:628551,lw:1,lwa:1,lwp:8,smi:18,smx:200,smp:9,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.33,cv:.86,cs:677,sp:.32,lp:-.21,i:!1,vt:.01,as:.24,sz:20,sr:0,sd:null},{c:{r:"0.251",g:"0.800",b:"0.961"},csa:{r:"0.478",g:"0.839",b:"0.961"},cl:583655,lw:1,lwa:0,lwp:8,smi:10,smx:230,smp:4,r:1,hm:0,hx:0,sm:-.78,sx:.2,lm:-.1,lx:.1,a:.49,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.94,sz:20,sr:2,sd:null},{c:{r:"0.220",g:"0.275",b:"0.373"},csa:{r:"0.216",g:"0.275",b:"0.373"},cl:718344,lw:1,lwa:0,lwp:8,smi:10,smx:203,smp:4,r:1,hm:0,hx:0,sm:-.89,sx:.42,lm:-.1,lx:.1,a:.
3"},csa:{r:"0.322",g:"0.573",b:"0.353"},cl:964218,lw:1,lwa:1.1,lwp:13,smi:10,smx:167.192,smp:16,r:0,hm:0,hx:0,sm:.07,sx:.37,lm:0,lx:.1,a:.16,cv:.07,cs:677,sp:0,lp:-.14,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.459",g:"0.459",b:"0.922"},csa:{r:"0.278",g:"0.278",b:"0.875"},cl:886706,lw:1,lwa:1,lwp:8,smi:10,smx:102,smp:7,r:"3",hm:0,hx:0,sm:-.6900000000000001,sx:.32,lm:-.1,lx:.1,a:.18,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.24,sz:20,sr:0},{c:{r:"0.961",g:"0.953",b:"0.922"},csa:{r:"0.522",g:"0.827",b:"0.220"},cl:976499,lw:1,lwa:1,lwp:8,smi:16,smx:88.417,smp:7,r:0,hm:0,hx:0,sm:-.8300000000000001,sx:.39,lm:-.26,lx:.42,a:.18,cv:.45,cs:677,sp:-.19,lp:-.09,i:!1,vt:.01,as:.21,sz:20,sr:0},{c:{r:"0.200",g:"0.200",b:"0.639"},csa:{r:"0.173",g:"0.173",b:"0.667"},cl:740793,lw:1,lwa:1,lwp:5,smi:30,smx:80,smp:7,r:"0",hm:0,hx:0,sm:-.54,sx:.32,lm:-.1,lx:.1,a:.1,cv:.71,cs:3,sp:0,lp:0,i:!1,vt:.01,as:.19,sz:8.98,sr:1},{c:{r:"0.973",g:"0.929",b:"0.816"},csa:{r:"0.627",g:"0.561",b:"0.427"},cl:886706,lw:1,lwa:1,lwp:8,smi:20,smx:160,smp:8,r:0,hm:0,hx:0,sm:-.6900000000000001,sx:.32,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.27,sz:15.15,sr:0},{c:{r:"0.922",g:"0.824",b:"0.071"},csa:{r:"0.753",g:"0.667",b:"0.004"},cl:707120,lw:1,lwa:0,lwp:8,smi:10,smx:94.961,smp:6,r:"3",hm:0,hx:0,sm:0,sx:0,lm:0,lx:0,a:.25,cv:.14,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.24,sz:18.52,sr:"3"}],c:10}}});var Ps=p((Jr,Yt)=>{Yt.exports={ppd:{b:0,c:-1.11,s:1.1,hl:.87,sd:-.33,h:-3.3200000000000003,sb:0,ss:1,ls:.09},gd:{bg:{r:"0.169",g:"0.235",b:"0.302"}},ld:{ld:[{c:{r:"0.675",g:"0.235",b:"0.020"},csa:{r:"0.675",g:"0.235",b:"0.020"},cl:987265,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:0,sx:0,lm:-.1,lx:.1,a:.34,cv:.38,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.612",g:"0.851",b:"0.184"},csa:{r:"0.612",g:"0.851",b:"0.184"},cl:976499,lw:1,lwa:0,lwp:8,smi:53,smx:121,smp:10,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.14,cv:.13,cs:677,sp:0,lp:.04,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.000",g:"0.600",b:"1.000"},csa:{r:"0.000",g:"0.600",b:"1.000"},cl:920379,lw:1,lwa:1,lwp:8,smi:23,smx:169,smp:4,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.09,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.024",g:"0.035",b:"0.224"},csa:{r:"0.024",g:"0.035",b:"0.224"},cl:796913,lw:1,lwa:1,lwp:12,smi:20,smx:85,smp:2,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.2,sz:20,sr:0,sd:null},{c:{r:"0.976",g:"0.467",b:"0.251"},csa:{r:"0.976",g:"0.467",b:"0.251"},cl:774465,lw:1,lwa:1,lwp:7,smi:18,smx:160,smp:5,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.12,cv:.33,cs:932.68,sp:.42,lp:.16,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.000",g:"0.600",b:"1.000"},csa:{r:"0.373",g:"0.729",b:"0.976"},cl:976499,lw:1,lwa:1,lwp:8,smi:23,smx:169,smp:4,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.09,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.16,sz:20,sr:0,sd:null},{c:{r:"0.973",g:"0.624",b:"0.475"},csa:{r:"0.973",g:"0.624",b:"0.475"},cl:987724,lw:1,lwa:1,lwp:7,smi:14,smx:170,smp:5,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:0,a:.12,cv:.67,cs:568.24,sp:.07,lp:0,i:!1,vt:.01,as:.14,sz:20,sr:0,sd:null},{c:{r:"0.275",g:"0.231",b:"0.027"},csa:{r:"0.275",g:"0.231",b:"0.027"},cl:965275,lw:1,lwa:0,lwp:8,smi:20,smx:142.034,smp:4,r:"0",hm:0,hx:0,sm:-.66,sx:.49,lm:0,lx:0,a:.1,cv:.67,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.14,sz:20,sr:0,sd:null},{c:{r:"0.961",g:"0.522",b:"0.522"},csa:{r:"0.961",g:"0.522",b:"0.522"},cl:875482,lw:1,lwa:0,lwp:8,smi:14,smx:151.705,smp:6,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.07,cv:.45,cs:677,sp:0,lp:0,i:!0,vt:.01,as:.12,sz:16,sr:0,sd:null},{c:{r:"0.373",g:"0.718",b:"0.961"},csa:{r:"0.373",g:"0.718",b:"0.961"},cl:628551,lw:1,lwa:0,lwp:8,smi:180,smx:140.924,smp:5,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.04,cv:.45,cs:677,sp:.3,lp:-.24,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null}],c:10}}});var Ss=p((Kr,Xt)=>{Xt.exports={ppd:{b:0,c:1.1,s:1.05,hl:.7,sd:-.33,h:0,sb:0,ss:1,ls:.06},gd:{bg:{r:"0.169",g:"0.239",b:"0.302"}},ld:{ld:[{c:{r:"0.882",g:"0.365",b:"0.173"},csa:{r:"0.882",g:"0.365",b:"0.173"},cl:987265,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:0,sx:0,lm:-.1,lx:.1,a:.34,cv:.38,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.980",g:"0.875",b:"0.000"},csa:{r:"0.980",g:"0.875",b:"0.000"},cl:752017,lw:1,lwa:0,lwp:8,smi:53,smx:121,smp:10,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.11,cv:.13,cs:677,sp:0,lp:.04,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.118",g:"0.675",b:"1.000"},csa:{r:"0.118",g:"0.675",b:"1.000"},cl:774465,lw:1,lwa:1,lwp:8,smi:23,smx:169,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.11,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.012",g:"0.063",b:"0.333"},csa:{r:"0.012",g:"0.063",b:"0.333"},cl:976499,lw:1,lwa:1,lwp:11,smi:20,smx:122.833,smp:8,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.11,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.557",g:"0.275",b:"0.102"},csa:{r:"0.275",g:"0.161",b:"0.090"},cl:752017,lw:1,lwa:0,lwp:7,smi:23,smx:92.5,smp:9,r:0,hm:0,hx:0,sm:-.23,sx:.34,lm:-.1,lx:.1,a:.07,cv:.33,cs:932.68,sp:.07,lp:0,i:!1,vt:.01,as:.17,sz:20,sr:0,sd:0},{c:{r:"0.984",g:"0.953",b:"0.733"},csa:{r:"0.984",g:"0.953",b:"0.733"},cl:987724,lw:1,lwa:0,lwp:8,smi:18,smx:121,smp:9,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.11,cv:.13,cs:677,sp:0,lp:.04,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.424",g:"0.302",b:"0.239"},csa:{r:"0.255",g:"0.180",b:"0.141"},cl:909155,lw:1,lwa:0,lwp:8,smi:18,smx:121,smp:9,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.18,cv:.13,cs:677,sp:0,lp:.04,i:!1,vt:.01,as:.19,sz:20,sr:0,sd:0},{c:{r:"0.020",g:"0.635",b:"1.000"},csa:{r:"0.184",g:"0.694",b:"1.000"},cl:849507,lw:1,lwa:1,lwp:8,smi:23,smx:68,smp:7,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.09,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.14,sz:20,sr:0,sd:0},{c:{r:"0.004",g:"0.078",b:"0.333"},csa:{r:"0.004",g:"0.078",b:"0.333"},cl:1e6,lw:1,lwa:1,lwp:11,smi:20,smx:98.333,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.09,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.14,sz:20,sr:0,sd:0},{c:{r:"0.812",g:"0.565",b:"0.404"},csa:{r:"0.812",g:"0.565",b:"0.404"},cl:752017,lw:1,lwa:0,lwp:7,smi:23,smx:92.5,smp:9,r:0,hm:0,hx:0,sm:-.23,sx:.34,lm:-.1,lx:.1,a:.1,cv:.33,cs:932.68,sp:.07,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0}],c:10}}});var Cs=p((sa,$t)=>{$t.exports={ppd:{b:0,c:-1.02,s:-.78,hl:.75,sd:-.33,h:.49,sb:0,ss:1,ls:.04},gd:{bg:{r:"0.169",g:"0.235",b:"0.302"}},ld:{ld:[{c:{r:"0.824",g:"0.322",b:"0.161"},csa:{r:"0.824",g:"0.322",b:"0.161"},cl:987265,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:0,sx:0,lm:-.1,lx:.1,a:.34,cv:.38,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.875",g:"0.969",b:"0.137"},csa:{r:"0.871",g:"0.976",b:"0.000"},cl:752017,lw:1,lwa:0,lwp:8,smi:53,smx:121,smp:10,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.13,cv:.13,cs:677,sp:0,lp:.04,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.212",g:"0.624",b:"0.984"},csa:{r:"0.090",g:"0.278",b:"0.459"},cl:849507,lw:1,lwa:1,lwp:8,smi:23,smx:169,smp:4,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.4,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.25,sz:20,sr:0},{c:{r:"0.004",g:"0.055",b:"0.314"},csa:{r:"0.000",g:"0.055",b:"0.322"},cl:987724,lw:1,lwa:1,lwp:12,smi:20,smx:85,smp:2,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.07,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.08,sz:10,sr:0},{c:{r:"0.824",g:"0.584",b:"0.451"},csa:{r:"0.976",g:"0.706",b:"0.541"},cl:1e6,lw:1,lwa:0,lwp:7,smi:23,smx:132.542,smp:9,r:"0",hm:0,hx:0,sm:-.4,sx:.58,lm:-.1,lx:.1,a:.14,cv:.22,cs:932.68,sp:.07,lp:0,i:!1,vt:.01,as:.18,sz:16,sr:0},{c:{r:"0.961",g:"0.875",b:"0.231"},csa:{r:"0.961",g:"0.875",b:"0.231"},cl:965275,lw:1,lwa:1,lwp:8,smi:20,smx:60,smp:10,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.05,cv:.13,cs:677,sp:0,lp:.04,i:!1,vt:.01,as:.16,sz:12,sr:0},{c:{r:"0.024",g:"0.522",b:"0.812"},csa:{r:"0.024",g:"0.561",b:"0.871"},cl:572431,lw:1,lwa:1,lwp:8,smi:23,smx:169,smp:4,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.25,sz:10,sr:0},{c:{r:"0.000",g:"0.055",b:"0.322"},csa:{r:"0.000",g:"0.055",b:"0.322"},cl:864258,lw:1,lwa:1,lwp:12,smi:20,smx:50,smp:4,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.13,sz:16,sr:1},{c:{r:"0.976",g:"0.322",b:"0.055"},csa:{r:"0.941",g:"0.627",b:"0.510"},cl:1e6,lw:1,lwa:0,lwp:7,smi:23,smx:132.542,smp:9,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.08,cv:.33,cs:932.68,sp:.07,lp:0,i:!1,vt:.01,as:.14,sz:16,sr:"1"}],c:9}}});var Ds=p((ta,Qt)=>{Qt.exports={ppd:{b:0,c:-1.04,s:-1,hl:.2,sd:-.25,h:0,sb:0,ss:1,ls:.09},gd:{bg:{r:"0.722",g:"0.824",b:"0.573"}},ld:{ld:[{c:{r:"0.573",g:"0.573",b:"0.973"},csa:{r:"0.675",g:"0.675",b:"0.875"},cl:906825,lw:1,lwa:1,lwp:8,smi:29,smx:173.994,smp:20,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.36,cv:.88,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.937",g:"0.384",b:"0.251"},csa:{r:"0.773",g:"0.573",b:"0.522"},cl:606103,lw:1,lwa:0,lwp:8,smi:20,smx:132.542,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.68,cs:677,sp:.09,lp:-.05,i:!1,vt:.01,as:.26,sz:20,sr:0},{c:{r:"1.000",g:"0.973",b:"0.922"},csa:{r:"1.000",g:"0.922",b:"0.773"},cl:976499,lw:1,lwa:1,lwp:8,smi:10,smx:136,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.26,cv:.84,cs:784.11,sp:-.32,lp:-.25,i:!1,vt:.01,as:.25,sz:20,sr:0},{c:{r:"0.973",g:"0.827",b:"0.557"},csa:{r:"0.969",g:"0.675",b:"0.075"},cl:516310,lw:1,lwa:1,lwp:8,smi:10,smx:123.051,smp:16,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.88,cs:677,sp:.27,lp:-.28,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.322",g:"0.322",b:"0.322"},csa:{r:"0.937",g:"0.922",b:"0.922"},cl:819362,lw:1,lwa:1,lwp:5,smi:20,smx:102,smp:3,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.26,cs:677,sp:.18,lp:.25,i:!1,vt:.01,as:.17,sz:20,sr:0},{c:{r:"0.478",g:"0.365",b:"0.004"},csa:{r:"0.976",g:"0.902",b:"0.902"},cl:853034,lw:1,lwa:1,lwp:8,smi:14,smx:110,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.29,sz:20,sr:0},{c:{r:"0.875",g:"0.412",b:"0.082"},csa:{r:"0.773",g:"0.780",b:"1.000"},cl:596897,lw:1,lwa:0,lwp:8,smi:20,smx:132.542,smp:4,r:0,hm:0,hx:0,sm:-.49,sx:.35,lm:-.1,lx:.1,a:.23,cv:.68,cs:677,sp:.09,lp:-.05,i:!1,vt:.01,as:.22,sz:20,sr:0},{c:{r:"1.000",g:"0.922",b:"0.773"},csa:{r:"1.000",g:"0.922",b:"0.773"},cl:976499,lw:1,lwa:1,lwp:8,smi:10,smx:136,smp:4,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.22,cv:.84,cs:784.11,sp:-.32,lp:-.25,i:!1,vt:.01,as:.27,sz:20,sr:0},{c:{r:"0.424",g:"0.282",b:"0.012"},csa:{r:"0.973",g:"0.722",b:"0.259"},cl:8
1,i:!1,vt:.01,as:.18,sz:14,sr:0,sd:null},{c:{r:"0.922",g:"0.729",b:"0.557"},csa:{r:"0.922",g:"0.729",b:"0.557"},cl:920379,lw:1,lwa:1,lwp:8,smi:12,smx:89.583,smp:7,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.12,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.24,sz:10,sr:1,sd:null},{c:{r:"0.090",g:"0.090",b:"0.118"},csa:{r:"0.090",g:"0.090",b:"0.118"},cl:998948,lw:1,lwa:1,lwp:8,smi:12,smx:140,smp:6,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.78,cs:677,sp:-.17,lp:0,i:!1,vt:.01,as:.24,sz:10,sr:1,sd:null},{c:{r:"0.675",g:"0.808",b:"0.973"},csa:{r:"0.675",g:"0.808",b:"0.973"},cl:976499,lw:1,lwa:2,lwp:8,smi:14,smx:51,smp:7,r:"0",hm:0,hx:0,sm:-.8200000000000001,sx:.49,lm:-.1,lx:.1,a:.13,cv:.18,cs:677,sp:.23,lp:-.1,i:!1,vt:.921,as:.22,sz:24,sr:0,sd:null}],c:12}}});var bs=p((Xr,Ut)=>{Ut.exports={ppd:{b:0,c:1,s:1.1,hl:0,sd:-.17,h:0,sb:0,ss:1,ls:.1},gd:{bg:{r:"0.557",g:"0.722",b:"0.851"}},ld:{ld:[{c:{r:"0.161",g:"0.173",b:"0.224"},csa:{r:"0.161",g:"0.173",b:"0.224"},cl:785689,lw:1,lwa:1,lwp:8,smi:20,smx:161.279,smp:14,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.01,a:.4,cv:.45,cs:2,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.922",g:"0.263",b:"0.055"},csa:{r:"0.922",g:"0.263",b:"0.055"},cl:875482,lw:1,lwa:1,lwp:8,smi:10,smx:125.735,smp:10,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.08,cs:802.07,sp:.07,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.518",g:"0.271",b:"0.173"},csa:{r:"0.518",g:"0.271",b:"0.173"},cl:987724,lw:1,lwa:1,lwp:11,smi:10,smx:144.407,smp:11,r:"0",hm:0,hx:.02,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.2,cv:.57,cs:205.89,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.922",g:"0.875",b:"0.522"},csa:{r:"0.922",g:"0.875",b:"0.522"},cl:965275,lw:1,lwa:1,lwp:8,smi:20,smx:100,smp:11,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.68,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"1.000",g:"0.824",b:"0.059"},csa:{r:"1.000",g:"0.824",b:"0.059"},cl:740793,lw:1,lwa:1,lwp:6,smi:20,smx:168.656,smp:9,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.08,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.016",g:"0.361",b:"0.973"},csa:{r:"0.016",g:"0.361",b:"0.973"},cl:954051,lw:1,lwa:1,lwp:8,smi:20,smx:123.051,smp:8,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.11,cv:.58,cs:276.04,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.773",g:"0.922",b:"0.969"},csa:{r:"0.773",g:"0.922",b:"0.969"},cl:976499,lw:1,lwa:1.6,lwp:19,smi:10,smx:119,smp:8,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.15,cv:.77,cs:166.97,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.922",g:"0.212",b:"0.055"},csa:{r:"0.937",g:"0.678",b:"0.388"},cl:853034,lw:1,lwa:1,lwp:8,smi:10,smx:125.735,smp:10,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.2,cv:.08,cs:802.07,sp:.07,lp:0,i:!1,vt:.01,as:.25,sz:20,sr:0,sd:0},{c:{r:"0.169",g:"0.173",b:"0.122"},csa:{r:"0.169",g:"0.173",b:"0.122"},cl:942827,lw:1,lwa:2,lwp:11,smi:10,smx:125.898,smp:10,r:"0",hm:0,hx:.02,sm:-.85,sx:.25,lm:-.1,lx:.1,a:.21,cv:.03,cs:205.89,sp:-.24,lp:-.28,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.973",g:"0.922",b:"0.675"},csa:{r:"0.973",g:"0.922",b:"0.675"},cl:976499,lw:1,lwa:1,lwp:8,smi:10,smx:125.898,smp:11,r:1,hm:0,hx:0,sm:-.8200000000000001,sx:-.28,lm:0,lx:0,a:.16,cv:.83,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.075",g:"0.075",b:"0.129"},csa:{r:"0.878",g:"0.875",b:"0.827"},cl:976499,lw:1,lwa:1,lwp:8,smi:20,smx:130.644,smp:10,r:"0",hm:0,hx:0,sm:-.66,sx:.25,lm:0,lx:0,a:.18,cv:.01,cs:677,sp:.09,lp:.21,i:!1,vt:.01,as:0,sz:15,sr:0,sd:0},{c:{r:"0.263",g:"0.353",b:"0.475"},csa:{r:"0.106",g:"0.114",b:"0.122"},cl:952740,lw:1,lwa:1,lwp:8,smi:10,smx:137.288,smp:10,r:"0",hm:0,hx:0,sm:0,sx:0,lm:0,lx:0,a:.12,cv:.77,cs:965.75,sp:-.38,lp:.46,i:!1,vt:.01,as:.1,sz:15,sr:1,sd:0}],c:12}}});var _s=p(($r,qt)=>{qt.exports={ppd:{b:0,c:1,s:1.27,hl:.08,sd:-.01,h:-3.6,sb:0,ss:1,ls:.08},gd:{bg:{r:"0.800",g:"0.800",b:"0.800"}},ld:{ld:[{c:{r:"0.557",g:"0.824",b:"0.667"},csa:{r:"0.557",g:"0.824",b:"0.667"},cl:470630,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.973",g:"0.522",b:"0.220"},csa:{r:"0.973",g:"0.522",b:"0.220"},cl:505067,lw:1,lwa:1,lwp:8,smi:10,smx:157.33,smp:10,r:"0",hm:0,hx:0,sm:-.73,sx:.91,lm:-.1,lx:.1,a:.4,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.157",g:"0.204",b:"0.122"},csa:{r:"0.157",g:"0.204",b:"0.122"},cl:906825,lw:1,lwa:1,lwp:8,smi:21,smx:123.051,smp:11,r:1,hm:0,hx:.02,sm:-.68,sx:.09,lm:-.1,lx:.1,a:.25,cv:.57,cs:603.31,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.875",g:"0.922",b:"0.024"},csa:{r:"0.875",g:"0.922",b:"0.024"},cl:662224,lw:1,lwa:0,lwp:8,smi:13,smx:127.797,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"1.000",g:"1.000",b:"1.000"},csa:{r:"1.000",g:"1.000",b:"1.000"},cl:906825,lw:1,lwa:0,lwp:8,smi:10,smx:130.033,smp:12,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.45,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.522",g:"0.902",b:"0.902"},csa:{r:"0.522",g:"0.902",b:"0.902"},cl:792037,lw:1,lwa:0,lwp:8,smi:10,smx:166.583,smp:11,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.58,cs:276.04,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:2},{c:{r:"0.973",g:"0.957",b:"0.624"},csa:{r:"0.875",g:"0.824",b:"0.122"},cl:929782,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.29,cs:755.39,sp:0,lp:0,i:!1,vt:.01,as:.32,sz:14,sr:0},{c:{r:"0.055",g:"0.173",b:"0.075"},csa:{r:"0.212",g:"0.263",b:"0.173"},cl:987176,lw:1,lwa:1,lwp:12,smi:14,smx:135,smp:6,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.22,sz:12,sr:"0"},{c:{r:"0.122",g:"0.475",b:"0.773"},csa:{r:"0.122",g:"0.522",b:"0.871"},cl:976499,lw:1,lwa:1,lwp:11,smi:20,smx:87,smp:17,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.26,sz:12,sr:1},{c:{r:"0.216",g:"0.173",b:"0.122"},csa:{r:"0.216",g:"0.173",b:"0.122"},cl:897931,lw:1,lwa:1,lwp:8,smi:10,smx:120,smp:5,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.18,cv:.08,cs:677,sp:-.07,lp:.04,i:!1,vt:.01,as:.22,sz:16,sr:1},{c:{r:"0.973",g:"0.973",b:"1.000"},csa:{r:"0.322",g:"0.322",b:"0.322"},cl:785689,lw:1,lwa:0,lwp:8,smi:14,smx:150.102,smp:7,r:"0",hm:0,hx:0,sm:-.8,sx:.51,lm:-.1,lx:.1,a:.26,cv:.71,cs:677,sp:.32,lp:0,i:!1,vt:.01,as:.24,sz:12,sr:0},{c:{r:"0.024",g:"0.773",b:"0.969"},csa:{r:"0.027",g:"0.733",b:"0.690"},cl:594879,lw:1,lwa:0,lwp:8,smi:10,smx:150,smp:4,r:"0",hm:0,hx:0,sm:-.87,sx:.2,lm:-.1,lx:.1,a:.18,cv:.84,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.3,sz:12,sr:"0"}],c:12}}});var ys=p((Qr,jt)=>{jt.exports={ppd:{b:0,c:.97,s:1.02,hl:0,sd:-.08,h:4.58,sb:0,ss:1,ls:.07},gd:{bg:{r:"0.529",g:"0.576",b:"0.322"}},ld:{ld:[{c:{r:"0.529",g:"0.922",b:"0.706"},csa:{r:"0.529",g:"0.922",b:"0.706"},cl:401794,lw:1,lwa:1,lwp:8,smi:5,smx:132.542,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.910",g:"0.455",b:"0.161"},csa:{r:"0.910",g:"0.455",b:"0.161"},cl:897931,lw:1,lwa:0,lwp:8,smi:10,smx:159.175,smp:10,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.9,cs:2,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.075",g:"0.224",b:"0.024"},csa:{r:"0.075",g:"0.224",b:"0.024"},cl:965275,lw:1,lwa:1,lwp:8,smi:10,smx:110,smp:6,r:"3",hm:0,hx:.02,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.25,cv:.81,cs:205.89,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.212",g:"0.973",b:"0.055"},csa:{r:"0.118",g:"0.573",b:"0.020"},cl:954051,lw:1,lwa:1,lwp:8,smi:10,smx:156.271,smp:8,r:"3",hm:0,hx:0,sm:-.76,sx:.93,lm:0,lx:.1,a:.21,cv:.35,cs:677,sp:.6,lp:0,i:!1,vt:.01,as:.59,sz:20,sr:"3"},{c:{r:"1.000",g:"1.000",b:"1.000"},csa:{r:"1.000",g:"1.000",b:"1.000"},cl:920379,lw:1,lwa:0,lwp:8,smi:10,smx:131.188,smp:12,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.46,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.27,sz:20,sr:0},{c:{r:"0.902",g:"0.855",b:"0.522"},csa:{r:"0.902",g:"0.855",b:"0.522"},cl:815067,lw:1,lwa:0,lwp:8,smi:10,smx:168.574,smp:11,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.58,cs:276.04,sp:0,lp:0,i:!1,vt:.01,as:.21,sz:14,sr:2},{c:{r:"0.773",g:"0.761",b:"0.506"},csa:{r:"0.973",g:"0.957",b:"0.624"},cl:796913,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:1,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.16,cv:.29,cs:755.39,sp:0,lp:0,i:!1,vt:.01,as:.13,sz:20,sr:0},{c:{r:"0.075",g:"0.200",b:"0.322"},csa:{r:"0.075",g:"0.220",b:"0.361"},cl:920379,lw:1,lwa:1,lwp:11,smi:20,smx:132.542,smp:7,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.13,sz:16,sr:"3"},{c:{r:"0.973",g:"1.000",b:"0.871"},csa:{r:"0.973",g:"1.000",b:"0.871"},cl:965275,lw:1,lwa:1,lwp:8,smi:14,smx:85,smp:9,r:"0",hm:0,hx:0,sm:-.87,sx:.32,lm:-.1,lx:.1,a:.14,cv:.45,cs:677,sp:.2,lp:-.07,i:!1,vt:.01,as:.3,sz:14,sr:"3"},{c:{r:"0.267",g:"0.114",b:"0.773"},csa:{r:"0.267",g:"0.114",b:"0.773"},cl:213259,lw:1,lwa:1,lwp:8,smi:29,smx:140.924,smp:18,r:"0",hm:0,hx:0,sm:-.05,sx:.53,lm:-.54,lx:.46,a:.1,cv:.45,cs:677,sp:.53,lp:.14,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.027",g:"0.078",b:"0.024"},csa:{r:"0.941",g:"0.941",b:"0.941"},cl:954051,lw:1,lwa:0,lwp:8,smi:10,smx:110,smp:4,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.05,sz:20,sr:"3"},{c:{r:"0.024",g:"0.424",b:"0.153"},csa:{r:"0.153",g:"0.349",b:"0.075"},cl:987724,lw:1,lwa:1,lwp:8,smi:1,smx:140,smp:12,r:"3",hm:0,hx:0,sm:-1,sx:.65,lm:-.1,lx:.1,a:.08,cv:1,cs:2,sp:0,lp:0,i:!1,vt:.01,as:.14,sz:12,sr:"1"}],c:12}}});var zs=p((Zr,Nt)=>{Nt.exports={ppd:{b:0,c:1.1,s:1.1,hl:.26,sd:-.53,h:0,sb:0,ss:1,ls:.09},gd:{bg:{r:"1.000",g:"0.953",b:"0.722"}},ld:{ld:[{c:{r:"0.922",g:"0.859",b:"0.757"},csa:{r:"0.922",g:"0.859",b:"0.757"},cl:837952,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.6,cv:.84,cs:626.69,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.302",g:"0.373",b:"0.263"},csa:{r:"0.302",g:"0.373",b:"0.263"},cl:1e6,lw:1,lwa:2,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.16,lm:-.1,lx:.1,a:.08,cv:.9,cs:1,sp:0,lp:-.3,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.290",g:"0.243",b:"0.682"},csa:{r:"0.310",g:"0.263",b:"0.702"},cl:931603,lw:1,lwa:2,lwp:13,smi:10,smx:100,smp:6,r:"3",hm:0,hx:0,sm:-.33,sx:.3,lm:-.1,lx:.1,a:.18,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"1.000",g:"0.824",b:"0.322"},csa:{r:"1.000",g:"0.824",b:"0.322"},cl:965275,lw:1,lwa:1,lwp:8,smi:12,smx:160,smp:4,r:0,hm:-.03,hx:.04,sm:-.05,sx:.05,lm:-.15,lx:.1,a:.22,cv:.9,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.322",g:"0.573",b:"0.35
a:.09,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.21,sz:16,sr:0,sd:null},{c:{r:"0.902",g:"0.255",b:"0.255"},csa:{r:"0.980",g:"0.729",b:"0.729"},cl:617327,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.21,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.38,sz:15,sr:1,sd:null},{c:{r:"0.008",g:"0.071",b:"0.122"},csa:{r:"0.008",g:"0.071",b:"0.122"},cl:998948,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.18,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.967,as:.39,sz:14,sr:1,sd:null},{c:{r:"0.922",g:"0.965",b:"0.973"},csa:{r:"0.882",g:"0.937",b:"0.973"},cl:875482,lw:1,lwa:1,lwp:8,smi:12,smx:98,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.944,as:.24,sz:16,sr:1,sd:null}],c:10}}});var fs=p((qr,Wt)=>{Wt.exports={ppd:{b:0,c:1.05,s:1.1,hl:0,sd:0,h:0,sb:0,ss:1,ls:.12},gd:{bg:{r:"0.475",g:"0.475",b:"0.773"}},ld:{ld:[{c:{r:"0.529",g:"0.490",b:"0.635"},csa:{r:"0.275",g:"0.173",b:"0.459"},cl:5e5,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:"3",hm:-.15,hx:.02,sm:-.9400000000000001,sx:.98,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:-.59,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.961",g:"0.718",b:"0.122"},csa:{r:"0.961",g:"0.718",b:"0.122"},cl:516592,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.966,as:0,sz:20,sr:0},{c:{r:"0.922",g:"0.055",b:"0.055"},csa:{r:"0.922",g:"0.055",b:"0.055"},cl:964305,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.978,as:0,sz:20,sr:0},{c:{r:"0.106",g:"0.118",b:"0.075"},csa:{r:"0.106",g:"0.118",b:"0.075"},cl:707120,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.44,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.902",g:"0.824",b:"0.824"},csa:{r:"0.902",g:"0.824",b:"0.824"},cl:769148,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.4,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.978,as:0,sz:20,sr:0},{c:{r:"0.557",g:"0.675",b:"0.851"},csa:{r:"0.557",g:"0.675",b:"0.851"},cl:965275,lw:1,lwa:1,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.2,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.99,as:0,sz:20,sr:0},{c:{r:"1.000",g:"0.973",b:"0.773"},csa:{r:"0.380",g:"0.376",b:"0.337"},cl:895426,lw:1,lwa:0,lwp:8,smi:12,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.22,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.34,sz:14,sr:"1"},{c:{r:"0.922",g:"0.055",b:"0.055"},csa:{r:"0.980",g:"0.047",b:"0.047"},cl:785689,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.21,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.36,sz:12,sr:"1"},{c:{r:"0.106",g:"0.118",b:"0.075"},csa:{r:"0.106",g:"0.118",b:"0.075"},cl:976499,lw:1,lwa:0,lwp:8,smi:18,smx:173.245,smp:8,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.13,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.17,sz:16,sr:2},{c:{r:"0.008",g:"0.071",b:"0.122"},csa:{r:"0.008",g:"0.071",b:"0.122"},cl:998948,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.21,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.967,as:0,sz:20,sr:1},{c:{r:"0.922",g:"0.965",b:"0.973"},csa:{r:"0.000",g:"0.000",b:"0.020"},cl:965275,lw:1,lwa:1,lwp:8,smi:12,smx:90,smp:6,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.18,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.944,as:.34,sz:14,sr:"2"}],c:11}}});var xs=p((jr,Vt)=>{Vt.exports={ppd:{b:0,c:1.02,s:-2,hl:0,sd:0,h:2.6,sb:0,ss:1,ls:.08},gd:{bg:{r:"0.922",g:"0.914",b:"0.624"}},ld:{ld:[{c:{r:"0.624",g:"0.682",b:"0.165"},csa:{r:"0.922",g:"1.000",b:"0.773"},cl:218117,lw:1,lwa:1,lwp:8,smi:47,smx:123.051,smp:16,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.03,lx:.1,a:.76,cv:.6900000000000001,cs:2,sp:-.17,lp:-.03,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.318",g:"0.624",b:"0.851"},csa:{r:"0.118",g:"0.424",b:"0.624"},cl:987724,lw:1,lwa:1,lwp:8,smi:10,smx:100,smp:7,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.32,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.55,sz:20,sr:0},{c:{r:"0.522",g:"0.267",b:"0.118"},csa:{r:"0.522",g:"0.267",b:"0.118"},cl:718344,lw:1,lwa:1,lwp:13,smi:16,smx:160,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.34,cv:.66,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.37,sz:20,sr:0},{c:{r:"0.424",g:"0.475",b:"0.922"},csa:{r:"0.424",g:"0.475",b:"0.922"},cl:954051,lw:1,lwa:1,lwp:8,smi:14,smx:150,smp:7,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.12,cv:.77,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.973",g:"0.965",b:"0.765"},csa:{r:"0.973",g:"0.965",b:"0.765"},cl:952740,lw:1,lwa:1,lwp:8,smi:13,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.33,sx:.35,lm:0,lx:0,a:.12,cv:.74,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.067",g:"0.075",b:"0.118"},csa:{r:"0.067",g:"0.075",b:"0.118"},cl:931603,lw:1,lwa:1,lwp:8,smi:13,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.22,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.28,sz:29.74,sr:0},{c:{r:"0.863",g:"0.863",b:"0.773"},csa:{r:"0.412",g:"0.412",b:"0.373"},cl:941261,lw:1,lwa:1,lwp:8,smi:18,smx:110,smp:6,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.26,sz:12,sr:0},{c:{r:"0.922",g:"0.824",b:"0.055"},csa:{r:"0.373",g:"0.322",b:"0.024"},cl:965275,lw:1,lwa:1,lwp:14,smi:29,smx:123.051,smp:11,r:0,hm:0,hx:0,sm:-.73,sx:.46,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.2,sz:15,sr:0},{c:{r:"0.173",g:"0.259",b:"0.925"},csa:{r:"0.514",g:"0.522",b:"0.773"},cl:763241,lw:1,lwa:1,lwp:8,smi:14,smx:150,smp:7,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.09,cv:.77,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.44,sz:15,sr:0},{c:{r:"0.973",g:"0.973",b:"0.824"},csa:{r:"0.176",g:"0.176",b:"0.137"},cl:965275,lw:1,lwa:1,lwp:8,smi:10,smx:90,smp:6,r:"3",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.16,cv:.45,cs:677,sp:.23,lp:-.17,i:!1,vt:.27,as:.2,sz:14,sr:"2"}],c:10}}});var ws=p((Nr,Ft)=>{Ft.exports={ppd:{b:0,c:-1.21,s:.8,hl:0,sd:-1,h:3,sb:0,ss:1,ls:.06},gd:{bg:{r:"0.871",g:"0.616",b:"0.173"}},ld:{ld:[{c:{r:"0.075",g:"0.157",b:"0.071"},csa:{r:"0.075",g:"0.157",b:"0.071"},cl:303052,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.4,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.969",g:"0.906",b:"0.824"},csa:{r:"0.969",g:"0.906",b:"0.824"},cl:976499,lw:1,lwa:.5,lwp:8,smi:10,smx:98.333,smp:13,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.65,cv:.1,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.84,sz:14,sr:0,sd:null},{c:{r:"0.859",g:"0.871",b:"0.733"},csa:{r:"0.859",g:"0.871",b:"0.733"},cl:819362,lw:1,lwa:1,lwp:20,smi:18,smx:103.292,smp:7,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.16,cv:.69,cs:3,sp:.04,lp:.07,i:!1,vt:.01,as:.12,sz:20,sr:0,sd:null},{c:{r:"0.024",g:"0.075",b:"0.059"},csa:{r:"0.024",g:"0.075",b:"0.059"},cl:920379,lw:1,lwa:1,lwp:16,smi:18,smx:164.25,smp:8,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.76,cs:898.39,sp:.09,lp:.02,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.941",g:"0.671",b:"0.290"},csa:{r:"0.941",g:"0.671",b:"0.290"},cl:886706,lw:1,lwa:1,lwp:8,smi:29,smx:169,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.5,lm:-.1,lx:.1,a:.06,cv:.49,cs:4,sp:.09,lp:0,i:!0,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.420",g:"0.314",b:"0.059"},csa:{r:"0.420",g:"0.314",b:"0.059"},cl:976499,lw:1,lwa:0,lwp:8,smi:10,smx:89.474,smp:11,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.58,cs:276.04,sp:0,lp:0,i:!1,vt:.01,as:.08,sz:16,sr:0,sd:null},{c:{r:"1.000",g:"0.973",b:"0.635"},csa:{r:"0.239",g:"0.216",b:"0.216"},cl:976499,lw:1,lwa:0,lwp:8,smi:10,smx:164.25,smp:7,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.13,cv:.29,cs:755.39,sp:0,lp:0,i:!1,vt:.01,as:.21,sz:14,sr:0,sd:null},{c:{r:"0.000",g:"0.000",b:"0.000"},csa:{r:"0.000",g:"0.000",b:"0.000"},cl:987724,lw:1,lwa:1,lwp:12,smi:10,smx:107.083,smp:14,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.12,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.15,sz:20,sr:0,sd:null},{c:{r:"0.973",g:"0.824",b:"0.478"},csa:{r:"0.973",g:"0.824",b:"0.478"},cl:639776,lw:1,lwa:0,lwp:8,smi:10,smx:178.688,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.15,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.33,sz:14,sr:0,sd:null},{c:{r:"0.980",g:"0.929",b:"0.863"},csa:{r:"0.980",g:"0.929",b:"0.863"},cl:976499,lw:1,lwa:1,lwp:8,smi:10,smx:93.375,smp:8,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.13,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.15,sz:12,sr:1,sd:null}],c:10}}});var vs=p((Yr,Ot)=>{Ot.exports={ppd:{b:0,c:-1,s:-1.3,hl:.1,sd:-.62,h:.67,sb:0,ss:1,ls:.08},gd:{bg:{r:"0.910",g:"0.922",b:"0.961"}},ld:{ld:[{c:{r:"0.153",g:"0.522",b:"0.973"},csa:{r:"0.153",g:"0.522",b:"0.973"},cl:1e6,lw:1,lwa:1,lwp:15,smi:10,smx:50,smp:4,r:1,hm:0,hx:0,sm:-.8,sx:.27,lm:-.1,lx:.1,a:.39,cv:.63,cs:895.6,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.059",g:"0.059",b:"0.118"},csa:{r:"0.059",g:"0.059",b:"0.118"},cl:987724,lw:1,lwa:.5,lwp:20,smi:16,smx:161.917,smp:9,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.1,cv:.61,cs:.5,sp:-.38,lp:.25,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.871",g:"0.365",b:"0.365"},csa:{r:"0.871",g:"0.365",b:"0.365"},cl:954051,lw:1,lwa:1,lwp:8,smi:20,smx:93.375,smp:8,r:"1",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.16,cv:.21,cs:837.14,sp:.51,lp:0,i:!1,vt:.01,as:.44,sz:20,sr:0,sd:null},{c:{r:"0.902",g:"0.824",b:"0.863"},csa:{r:"0.902",g:"0.824",b:"0.863"},cl:965275,lw:1,lwa:1,lwp:8,smi:20,smx:140,smp:3,r:"1",hm:0,hx:0,sm:-.09,sx:.05,lm:-.1,lx:.1,a:.09,cv:.54,cs:2,sp:.09,lp:0,i:!1,vt:.01,as:.25,sz:14,sr:0,sd:null},{c:{r:"0.573",g:"0.529",b:"0.459"},csa:{r:"0.929",g:"0.914",b:"0.894"},cl:897931,lw:1,lwa:.5,lwp:9,smi:14,smx:152.292,smp:6,r:1,hm:0,hx:0,sm:-.92,sx:.56,lm:-.1,lx:.1,a:.14,cv:.83,cs:4.48,sp:.13,lp:-.03,i:!1,vt:.01,as:.64,sz:12,sr:0,sd:null},{c:{r:"0.204",g:"0.004",b:"0.110"},csa:{r:"0.204",g:"0.004",b:"0.110"},cl:987724,lw:1,lwa:0,lwp:8,smi:20,smx:85,smp:3,r:"0",hm:0,hx:0,sm:-.5700000000000001,sx:.84,lm:-.16,lx:.55,a:.12,cv:.54,cs:2,sp:.09,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.075",g:"0.075",b:"0.067"},csa:{r:"0.075",g:"0.075",b:"0.067"},cl:987724,lw:1,lwa:1,lwp:9,smi:17,smx:120,smp:8,r:"1",hm:0,hx:0,sm:-1,sx:.18,lm:-.1,lx:.1,a:0,cv:.83,cs:4.48,sp:.2,lp:-.35000000000000003,i:!1,vt:.01,as:.05,sz:20,sr:0,sd:null},{c:{r:"0.875",g:"0.851",b:"0.973"},csa:{r:"0.875",g:"0.851",b:"0.973"},cl:987724,lw:1,lwa:1,lwp:12,smi:20,smx:120,smp:6,r:"0",hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.26,cv:.85,cs:4,sp:0,lp:0,i:!1,vt:.01,as:.17,sz:10,sr:0,sd:null},{c:{r:"0.059",g:"0.055",b:"0.039"},csa:{r:"0.059",g:"0.055",b:"0.039"},cl:976499,lw:1,lwa:1,lwp:7,smi:23,smx:92.5,smp:9,r:"1",hm:0,hx:0,sm:-.87,sx:.05,lm:-.1,lx:.1,a:.16,cv:.16,cs:932.68,sp:.07,lp:-.2
(()=>{var nt=Object.create;var Y0=Object.defineProperty;var ot=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var ht=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty;var p=(r,s)=>()=>(s||r((s={exports:{}}).exports,s),s.exports);var pt=(r,s,t,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of ct(s))!mt.call(r,a)&&a!==t&&Y0(r,a,{get:()=>s[a],enumerable:!(e=ot(s,a))||e.enumerable});return r};var y=(r,s,t)=>(t=r!=null?nt(ht(r)):{},pt(s||!r||!r.__esModule?Y0(t,"default",{value:r,enumerable:!0}):t,r));var z=p((De,Q0)=>{function X0(r,s,t,e,a){this._listener=s,this._isOnce=t,this.context=e,this._signal=r,this._priority=a||0}X0.prototype={active:!0,params:null,execute:function(r){var s,t;return this.active&&!!this._listener&&(t=this.params?this.params.concat(r):r,s=this._listener.apply(this.context,t),this._isOnce&&this.detach()),s},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}};function L0(r,s){if(typeof r!="function")throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",s))}function w0(){this._bindings=[],this._prevParams=null;var r=this;this.dispatch=function(){w0.prototype.dispatch.apply(r,arguments)}}w0.prototype={VERSION:"1.0.0",memorize:!1,_shouldPropagate:!0,active:!0,_registerListener:function(r,s,t,e){var a=this._indexOfListener(r,t),l;if(a!==-1){if(l=this._bindings[a],l.isOnce()!==s)throw new Error("You cannot add"+(s?"":"Once")+"() then add"+(s?"Once":"")+"() the same listener without removing the relationship first.")}else l=new X0(this,r,s,t,e),this._addBinding(l);return this.memorize&&this._prevParams&&l.execute(this._prevParams),l},_addBinding:function(r){var s=this._bindings.length;do--s;while(this._bindings[s]&&r._priority<=this._bindings[s]._priority);this._bindings.splice(s+1,0,r)},_indexOfListener:function(r,s){for(var t=this._bindings.length,e;t--;)if(e=this._bindings[t],e._listener===r&&e.context===s)return t;return-1},has:function(r,s){return this._indexOfListener(r,s)!==-1},add:function(r,s,t){return L0(r,"add"),this._registerListener(r,!1,s,t)},addOnce:function(r,s,t){return L0(r,"addOnce"),this._registerListener(r,!0,s,t)},remove:function(r,s){L0(r,"remove");var t=this._indexOfListener(r,s);return t!==-1&&(this._bindings[t]._destroy(),this._bindings.splice(t,1)),r},removeAll:function(){for(var r=this._bindings.length;r--;)this._bindings[r]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(r){if(!!this.active){var s=Array.prototype.slice.call(arguments),t=this._bindings.length,e;if(this.memorize&&(this._prevParams=s),!!t){e=this._bindings.slice(),this._shouldPropagate=!0;do t--;while(e[t]&&this._shouldPropagate&&e[t].execute(s)!==!1)}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};var $0=w0;$0.Signal=w0;Q0.exports=$0});var ds=p((Fr,Ht)=>{Ht.exports={ppd:{b:0,c:1.02,s:1,hl:.31,sd:-.89,h:0,sb:0,ss:1,ls:.07},gd:{bg:{r:"0.702",g:"0.702",b:"0.773"}},ld:{ld:[{c:{r:"0.824",g:"0.776",b:"0.725"},csa:{r:"0.961",g:"0.875",b:"0.800"},cl:528024,lw:1,lwa:1,lwp:8,smi:10,smx:50,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.45,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.910",g:"0.427",b:"0.090"},csa:{r:"0.969",g:"0.180",b:"0.024"},cl:987724,lw:1,lwa:1,lwp:8,smi:14,smx:140,smp:5,r:0,hm:-.2,hx:0,sm:-.89,sx:.37,lm:0,lx:0,a:.3,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.37,sz:20,sr:0},{c:{r:"0.969",g:"0.565",b:"0.008"},csa:{r:"0.969",g:"0.275",b:"0.004"},cl:562461,lw:1,lwa:1,lwp:13,smi:13,smx:160,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:0,lx:.1,a:.57,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.34,sz:20,sr:0},{c:{r:"0.275",g:"0.404",b:"0.608"},csa:{r:"0.322",g:"0.376",b:"0.475"},cl:718344,lw:1,lwa:1,lwp:8,smi:10,smx:92.5,smp:5,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.19,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.32,sz:36.73,sr:0},{c:{r:"0.875",g:"0.910",b:"0.714"},csa:{r:"0.875",g:"0.910",b:"0.714"},cl:897931,lw:1,lwa:1,lwp:8,smi:10,smx:102.155,smp:6,r:0,hm:0,hx:0,sm:0,sx:0,lm:-.1,lx:.1,a:.33,cv:.45,cs:677,sp:.25,lp:.18,i:!1,vt:.01,as:.4,sz:20,sr:0},{c:{r:"0.922",g:"0.706",b:"0.024"},csa:{r:"0.973",g:"0.851",b:"0.624"},cl:976499,lw:1,lwa:1,lwp:8,smi:20,smx:103.292,smp:6,r:0,hm:0,hx:0,sm:-.1,sx:.46,lm:0,lx:.14,a:.08,cv:.85,cs:677,sp:.32,lp:.02,i:!1,vt:.01,as:.15,sz:20,sr:0},{c:{r:"0.204",g:"0.204",b:"0.275"},csa:{r:"0.024",g:"0.020",b:"0.173"},cl:763241,lw:1,lwa:2,lwp:10,smi:23,smx:136,smp:6,r:0,hm:0,hx:0,sm:-.64,sx:.39,lm:0,lx:.1,a:.07,cv:.87,cs:677,sp:.21,lp:-.14,i:!1,vt:.01,as:.17,sz:12,sr:0},{c:{r:"0.004",g:"0.275",b:"0.961"},csa:{r:"0.082",g:"0.161",b:"0.682"},cl:841810,lw:1,lwa:1,lwp:8,smi:16,smx:147.413,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.1,lm:-.1,lx:.1,a:.15,cv:.7,cs:2,sp:.2,lp:-.14,i:!1,vt:.01,as:.16,sz:17.4,sr:1},{c:{r:"0.059",g:"0.761",b:"0.973"},csa:{r:"0.059",g:"0.761",b:"0.973"},cl:437741,lw:1,lwa:1,lwp:8,smi:14,smx:169,smp:6,r:0,hm:0,hx:0,sm:-.66,sx:.32,lm:0,lx:0,a:.08,cv:.84,cs:677,sp:.6,lp:-.19,i:!1,vt:.01,as:0,sz:20,sr:0},{c:{r:"0.173",g:"0.176",b:"0.275"},csa:{r:"0.129",g:"0.165",b:"0.529"},cl:987724,lw:1,lwa:1,lwp:8,smi:12,smx:93.375,smp:5,r:0,hm:0,hx:0,sm:-.59,sx:.42,lm:0,lx:0,a:.06,cv:.29,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.13,sz:14,sr:0}],c:10}}});var us=p((Or,It)=>{It.exports={ppd:{b:0,c:1,s:1.05,hl:.04,sd:-.12,h:5.42,sb:.2,ss:1,ls:.11},gd:{bg:{r:"0.463",g:"0.851",b:"0.616"}},ld:{ld:[{c:{r:"0.804",g:"1.000",b:"0.624"},csa:{r:"0.804",g:"1.000",b:"0.624"},cl:849431,lw:1,lwa:1,lwp:8,smi:10,smx:50,smp:4,r:0,hm:0,hx:0,sm:-.54,sx:.46,lm:-.1,lx:.12,a:.45,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.980",g:"0.682",b:"0.133"},csa:{r:"0.976",g:"0.722",b:"0.227"},cl:975697,lw:1,lwa:0,lwp:8,smi:12,smx:132.542,smp:15,r:0,hm:0,hx:0,sm:-.4,sx:.65,lm:-.1,lx:.1,a:.4,cv:.85,cs:677,sp:.23,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.357",g:"0.600",b:"0.765"},csa:{r:"0.357",g:"0.600",b:"0.765"},cl:538758,lw:1,lwa:1,lwp:13,smi:10,smx:151.525,smp:10,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.36,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.271",g:"0.314",b:"0.400"},csa:{r:"0.271",g:"0.314",b:"0.400"},cl:746121,lw:1,lwa:0,lwp:8,smi:10,smx:132.542,smp:7,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.19,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.22,sz:20,sr:2,sd:0},{c:{r:"0.875",g:"0.922",b:"0.655"},csa:{r:"0.961",g:"0.969",b:"0.910"},cl:528024,lw:1,lwa:1,lwp:8,smi:10,smx:123.051,smp:14,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.22,cv:.45,cs:677,sp:.25,lp:.18,i:!1,vt:.01,as:.22,sz:30,sr:0,sd:0},{c:{r:"0.929",g:"0.682",b:"0.110"},csa:{r:"0.686",g:"0.522",b:"0.153"},cl:344364,lw:1,lwa:1,lwp:8,smi:20,smx:123.051,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.13,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.3,sz:20,sr:1,sd:0},{c:{r:"0.067",g:"0.075",b:"0.180"},csa:{r:"0.067",g:"0.075",b:"0.180"},cl:965275,lw:1,lwa:1,lwp:8,smi:40,smx:177.153,smp:12,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.11,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.19,sz:14,sr:1,sd:0},{c:{r:"0.039",g:"0.294",b:"0.886"},csa:{r:"0.286",g:"0.510",b:"1.000"},cl:606103,lw:1,lwa:1,lwp:8,smi:18,smx:140,smp:8,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.2,cv:.7,cs:509.87,sp:.3,lp:-.14,i:!1,vt:.853,as:.44,sz:20.2,sr:1,sd:0},{c:{r:"0.475",g:"0.875",b:"0.929"},csa:{r:"0.718",g:"0.894",b:"0.937"},cl:785689,lw:1,lwa:1,lwp:8,smi:35,smx:169,smp:10,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.11,cv:.84,cs:677,sp:.21,lp:-.19,i:!1,vt:.01,as:0,sz:20,sr:0,sd:0},{c:{r:"0.067",g:"0.067",b:"0.122"},csa:{r:"0.059",g:"0.118",b:"0.122"},cl:965275,lw:1,lwa:0,lwp:8,smi:18,smx:152,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.13,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.407,as:.19,sz:14,sr:2,sd:0},{c:{r:"0.922",g:"0.729",b:"0.122"},csa:{r:"0.922",g:"0.729",b:"0.122"},cl:796913,lw:1,lwa:0,lwp:8,smi:20,smx:123.051,smp:9,r:0,hm:0,hx:0,sm:-.59,sx:.65,lm:-.1,lx:.1,a:.1,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.19,sz:16,sr:0,sd:0},{c:{r:"0.082",g:"0.075",b:"0.075"},csa:{r:"0.082",g:"0.075",b:"0.075"},cl:976499,lw:1,lwa:0,lwp:8,smi:30,smx:123.051,smp:8,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.09,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.27,as:.16,sz:14,sr:0,sd:0}],c:12}}});var gs=p((Ur,Gt)=>{Gt.exports={ppd:{b:0,c:-.9,s:-1.4000000000000001,hl:0,sd:-.28,h:.06,sb:0,ss:1,ls:.1},gd:{bg:{r:"0.475",g:"0.475",b:"0.773"}},ld:{ld:[{c:{r:"0.361",g:"0.404",b:"0.725"},csa:{r:"0.275",g:"0.173",b:"0.459"},cl:5e5,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:-.15,hx:.02,sm:-.9400000000000001,sx:.98,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:-.59,lp:0,i:!1,vt:.01,as:0,sz:20,sr:0,sd:null},{c:{r:"0.773",g:"0.604",b:"0.188"},csa:{r:"0.961",g:"0.718",b:"0.122"},cl:931603,lw:1,lwa:1,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.6,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.966,as:.42,sz:30,sr:0,sd:null},{c:{r:"0.922",g:"0.055",b:"0.055"},csa:{r:"0.314",g:"0.031",b:"0.031"},cl:964305,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.3,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.978,as:.39,sz:14,sr:0,sd:null},{c:{r:"0.106",g:"0.118",b:"0.075"},csa:{r:"0.075",g:"0.075",b:"0.067"},cl:707120,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.4,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.01,as:.58,sz:12,sr:0,sd:null},{c:{r:"0.922",g:"0.835",b:"0.835"},csa:{r:"0.714",g:"0.161",b:"0.161"},cl:769148,lw:1,lwa:0,lwp:8,smi:10,smx:100,smp:6,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.4,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.978,as:.37,sz:12,sr:0,sd:null},{c:{r:"0.561",g:"0.667",b:"0.824"},csa:{r:"0.557",g:"0.675",b:"0.851"},cl:965275,lw:1,lwa:1,lwp:8,smi:10,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,a:.2,cv:.45,cs:677,sp:0,lp:0,i:!1,vt:.99,as:.36,sz:14,sr:0,sd:null},{c:{r:"0.173",g:"0.173",b:"0.122"},csa:{r:"1.000",g:"0.973",b:"0.773"},cl:895426,lw:1,lwa:0,lwp:8,smi:12,smx:100,smp:4,r:0,hm:0,hx:0,sm:-.05,sx:.05,lm:-.1,lx:.1,
RenderTarget(this._width,this._height,{wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBFormat}),this._renderTarget.texture.generateMipmaps=!1}_createUniforms(){this._uniforms={uScale:{value:1},uStrength:{value:1},uTime:{value:0},uSaturation:{value:1},uContrast:{value:1},uIsAbs:{value:0},uIsBlackAndWhite:{value:0},uRatio:{value:new THREE.Vector2(1,1)},uAnimTime:{value:0}}}draw(){let s=o.displacementData;this._uniforms.uScale.value=s.scale,this._uniforms.uStrength.value=s.strength,this._uniforms.uTime.value=s.time,this._uniforms.uAnimTime.value=0,this._uniforms.uSaturation.value=s.saturation,this._uniforms.uContrast.value=s.contrast,this._uniforms.uIsAbs.value=s.isAbs,this._uniforms.uIsBlackAndWhite.value=s.isBlackAndWhite,this._uniforms.uRatio.value.y=this._height/this._width,this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0),this._renderer.render(this._mesh,this._camera),this._renderer.setRenderTarget(null)}get textureArtwork(){return this._renderTarget.texture}};var it=y(z());var u0=class{generate(){let s=o.displacementData,t=n.rand();s.displacementType=R0.REASONABLE;let e=[.25,.4,.55,.6,.75],a=[.25,.55,.75,.8],i=[1,.55,.3,.8,.75],l=[1.1,.8,1,1.25,.8,.9,1.5],m=e,zo=n.rand(),h=n.rand();zo<.12?s.scale=i[i.length*h>>0]:o<.2?s.scale=l[l.length*h>>0]:s.scale=.2+t*.4+w(0,.9,3);let g=n.rand()*2,u=w(2,0,3),v=w(0,4,4),d=w(0,2,5);s.strength=1+g+u+v+d,s.strength=Math.min(s.strength,10),s.strength=Math.min(5.5,s.strength),A()&&(s.strength*=-1),s.time=n.rand()*10,s.isBlackAndWhite=!0,s.contrast=.2,s.strength>5&&(s.scale=Math.min(s.scale,1)),(s.strength>8||s.scale>=1)&&(s.contrast=.1)}};var g0=class{generate(){let s=o.layersData;s.clearBetweenLayers=!1,s.invertColorsLayers=!1,s.patternMode=P.GLOBAL,s.patternType=S0.GRID,this.canBoostDispTexScale=!1,this.canDeboostDispDefScale=!1,this.type=0;let t=s.globalPatternData;t.shape=C0.SQUARE,this._generate()}_generate(){let s=o.layersData,t=s.globalPatternData,ze=o.displacementData;t.chancesToStroke=0,t.strokesWidth=15,t.isCircleHalf=!1,t.chancesToSkip=.6,t.chancesToFill=.575;let a=n.rand(),i=n.rand(),l=n.rand();if(a<.125){let o=4;i<.15&&(o=3),t.cols=o+n.rand()*3>>0,t.lines=o+n.rand()*3>>0,n.composition="Very minimalistic"}else if(a<.32)t.cols=5+w(0,10,6)>>0,t.lines=6+w(0,12,6)>>0,n.composition="Minimalistic";else if(a<.73)t.cols=9+n.rand()*12+w(0,10,4)+w(0,64,9),t.lines=t.cols*1.4,n.composition="Balanced";else if(a<.92)t.cols=4+n.rand()*27+w(0,7,4)+w(0,35,9),t.lines=4+n.rand()*32+w(0,7,4)+w(0,35,9),n.composition="Free";else{let o=3+l*.1;i<.5?(t.cols=40+n.rand()*40>>0,t.lines=t.cols/o>>0):(t.lines=40+n.rand()*40>>0,t.cols=t.lines/o>>0),n.composition="Unbalanced"}t.turbulence=0,t.lines<10&&t.cols>10&&t.lines*2>t.cols&&(t.cols=t.lines*2),s.clearBetweenLayers=!0,s.invertColorsLayers=!0;let m=n.rand();t.chancesToStroke=m*.8+w(.2,0,3),t.chancesToFill=.68+n.rand()*.12,(t.cols>40&&t.lines>30||t.lines>40&&t.cols>30)&&(t.chancesToFill+=.1),t.cols<=10&&t.lines<=10&&(ze.scale*=.87,ze.scale=Math.max(.2,ze.scale),ze.scale=Math.min(ze.scale,.98))}};function _e(){let r=o.displacementData,s=Math.abs(r.strength),t=r.scale<=.8?r.scale:1,e=s*t;return s>=5.5&&r.scale>.55?"Extreme":e<=.9?"Very small":e<2?"Small":e<3.1?"Medium":e<4.3?"Big":"Extreme"}function ye(){let r=o.layersData.globalDeformerData.glitchVerticalBand+o.layersData.globalDeformerData.glitchHorizontalBand;return r<=0?"None":r<.25?"Small":r<.5?"Medium":r<.65?"Strong":"Extreme"}function I(){let s=o.layersData.globalPatternData;return{Palette:`Palette ${o.idxStyle}`||"Merveilleuse","Layer Count":o.layersData.count,"Columns count":s.cols>>0,"Lines count":s.lines>>0,Evolution:_e(),Perturbations:ye(),Composition:n.composition}}var f0=class{constructor(s){this._onChangeSeed=s,this._displacementGenerator=new u0,this._gridGenerator=new g0,this.onGeneration=new it.Signal}generateDisplacement=()=>{this._onChangeSeed(),this._displacementGenerator.generate(this.type),this.onGeneration.dispatch()};generateWithoutDisplacement=()=>{this.generate(!1)};generate=(s=!0)=>{this._onChangeSeed(),n.rand(),this._currentGenerator=this._gridGenerator,this.type="grid",s&&this._displacementGenerator.generate(this.type),this._currentGenerator.generate(),this._generateDeformersForGrid(),this._generateGlitch(),this.adjustGenerationBasedOnStyle(),this.onGeneration.dispatch()};adjustGenerationBasedOnStyle=()=>{let s=o.layersData,t=s.globalPatternData,e=o.layersData.globalDeformerData,a=n.rand()*Math.PI*2,l=1.7;for(let i of s.layersData){if(i.rotationValue=a,a+=l,this._currentGenerator===this._gridGenerator&&(t.cols>25||t.lines>25)){let m=250;(t.cols>32||t.lines>32)&&(m=180),i.segmentLengthMax>=m&&(i.segmentLengthMax=$s(i.segmentLengthMax,5,300,40,m,!0))}e.displacementDistance>1.9&&(i.rotationType=0)}};_generateDeformersForGrid(){let t=o.layersData.globalPatternData,e=o.layersData.globalDeformerData;e.deformersOrder=q.DISP_GLITCH,e.glitchMirrorChanceVertical=0,e.glitchMirrorChanceHorizontal=0,e.displacementDistance=1,e.displacementScale=1,e.displacementUseRandomAngle=!1,t.cols<10&&t.lines<10?(e.displacementAngle=0,e.displacementUseRandomAngle=!0):e.displacementAngle=n.rand()*360-180,e.displacementIncrementAngle=10}_generateGlitch(){let t=o.layersData.globalDeformerData;t.glitchHorizontalBand=0,t.glitchVerticalBand=0,t.glitchAmount=0;let e=n.rand(),a=n.rand(),i=n.rand(),l=w(0,1,4),m=A(.23);m&&(t.glitchHorizontalBand=.15+e*.3+l*.4,t.glitchHorizontalBandPos=i<.5?a*.25:1-a*.25,t.glitchHorizontalBandMirror=i<.1),e=n.rand(),a=n.rand(),i=n.rand(),l=w(0,1,4),A(m?.05:.175)&&(t.glitchVerticalBand=.15+e*.2+l*.4,t.glitchVerticalBandPos=Math.max(0,Math.min(a,1-t.glitchVerticalBand)),t.glitchVerticalBandMirror=!1)}};function q0(r){let s=document.createElement("a");s.setAttribute("download","tout_trace-"+tokenData.hash+".png"),s.setAttribute("href",r.toDataURL("image/png").replace("image/png","image/octet-stream")),s.click()}var x0=class extends V{constructor(s,t){if(super(s,t,!1),window.addEventListener("keydown",e=>{e.key==="s"?q0(this._renderer.domElement):e.key==="h"&&window.open(window.location.href+"?hd=1","_blank").focus()}),this._counterToDraw=0,this._tick=0,o.onRedrawRequired.add(this._onRedrawRequired),o.onDisplacementRegenerationRequired.add(this._onDisplacementRegenerationRequired),o.onPatternRegenerationRequired.add(this._onPatternRegenerationRequired),this.initWebGL(),this._forceSeed)this._onChangeSeed();else{let e=new M;n.rand=e.random_dec,U0()}if(this._displacementTexture=new d0(this._renderer,this.width,this.height),this._artwork=new p0(this._renderer,this._displacementTexture,this.width,this.height),this._forceStyle){let e=R0(this._forceStyle);o.setStyle(e.data,e.id,e.__idx)}else{let e=Fs();o.setStyle(e.data,e.id,e.__idx)}this._generator=new f0(this._onChangeSeed),this._generator.generate(),this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0,B.onUpdate.add(this._onUpdate)}_onDisplacementRegenerationRequired=()=>{this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onPatternRegenerationRequired=()=>{this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onRedrawRequired=()=>{this._isDrawRequired=!0};_onUpdate=s=>{this._counterToDraw+=s,(this._isPatternGenerationRequired||this._isDisplacementGenerationRequired||this._isDrawRequired)&&(Ys(),this._artwork.reset(),this._tick=0),this._isDisplacementGenerationRequired&&this._displacementTexture?.draw(),!this._artwork?.isFullyDrawn&&this._counterToDraw>30&&(this._artwork?.drawAnimated()&&(this._renderer.setRenderTarget(null),this._renderArtwork()),this._counterToDraw=0,this._tick+=1),this._isDisplacementGenerationRequired=!1,this._isPatternGenerationRequired=!1,this._isDrawRequired=!1};_renderArtwork(){this._applyPostprocessData(),this.artwork=this._artwork.textureArtwork,this.setBgColor(o.globalData.backgroundColorGL),this._renderWebGL()}_applyPostprocessData(){let s=Math.min(this._artwork.percent,1),t=st(Math.min(s*2,1)),e=tt(s),a=o.postprocessData;this.optionsPost.brightness=a.brightness,this.optionsPost.contrast=a.contrast,this.optionsPost.saturation=a.saturation*t,this.optionsPost.highlights=a.highlights,this.optionsPost.shadows=a.shadows,this.optionsPost.hue=a.hue,this.optionsPost.noise=a.noise,this.optionsPost.noiseRepeat=a.noiseRepeat,this.optionsPost.sharpenBlur=a.sharpenBlur*e,this.optionsPost.sharpenSize=a.sharpenSize,this.optionsPost.normalStr=a.normalStr*e,this.optionsPost.lightPosX=a.lightPosX,this.optionsPost.lightPosY=a.lightPosY,this.optionsPost.lightStr=a.lightStr*e,this.optionsPost.enableNormal=a.enableNormal}_onChangeSeed=()=>{this.changeSeed(),this._forceSeed&&(tokenData.hash=this._forceSeed),this._resetHashes(),U0(),this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};get generator(){return this._generator}};console.log("-------------------");console.log("Author: Florian Zumbrunn");console.log("@florianzumbrunn // https://florianzumbrunn.com");console.log("~");console.log("Series: Tout trac\xE9");console.log("~");console.log("Hash:",tokenData.hash);console.log("-------------------");console.log("PROD");window.innerHeight<800&&(n.dpr=.2);function lt(){Pe(window.innerWidth,window.innerHeight)}var ze=new x0(n.size.width*n.resolution,n.size.height*n.resolution);window.addEventListener("resize",lt,!1);lt();function Pe(r=512,s=512){s=Math.min(s,n.size.height);let t=Math.min(s/n.size.height,1);r=n.size.width*t,ze.resize(r,s)}})(); /** @license * JS Signals <http://millermedeiros.github.com/js-signals/> * Released under the MIT license * Author: Miller Medeiros * Version: 1.0.0 - Build: 268 (2012/11/29 05:48 PM) */
RenderTarget(this._width,this._height,{wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBFormat}),this._renderTarget.texture.generateMipmaps=!1}_createUniforms(){this._uniforms={uScale:{value:1},uStrength:{value:1},uTime:{value:0},uSaturation:{value:1},uContrast:{value:1},uIsAbs:{value:0},uIsBlackAndWhite:{value:0},uRatio:{value:new THREE.Vector2(1,1)},uAnimTime:{value:0}}}draw(){let s=o.displacementData;this._uniforms.uScale.value=s.scale,this._uniforms.uStrength.value=s.strength,this._uniforms.uTime.value=s.time,this._uniforms.uAnimTime.value=0,this._uniforms.uSaturation.value=s.saturation,this._uniforms.uContrast.value=s.contrast,this._uniforms.uIsAbs.value=s.isAbs,this._uniforms.uIsBlackAndWhite.value=s.isBlackAndWhite,this._uniforms.uRatio.value.y=this._height/this._width,this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0),this._renderer.render(this._mesh,this._camera),this._renderer.setRenderTarget(null)}get textureArtwork(){return this._renderTarget.texture}};var it=y(z());var u0=class{generate(){let s=o.displacementData,t=n.rand();s.displacementType=R0.REASONABLE;let e=[.25,.4,.55,.6,.75],a=[.25,.55,.75,.8],i=[1,.55,.2,.8,.75],l=[1.1,.8,1,1.25,.8,.9,1.5],m=e,zo=n.rand(),h=n.rand();zo<.12?s.scale=i[i.length*h>>0]:o<.2?s.scale=l[l.length*h>>0]:s.scale=.2+t*.4+w(0,.9,3);let g=n.rand()*2,u=w(2,0,3),v=w(0,4,4),d=w(0,2,5);s.strength=1+g+u+v+d,s.strength=Math.min(s.strength,10),s.strength=Math.min(5.5,s.strength),A()&&(s.strength*=-1),s.time=n.rand()*10,s.isBlackAndWhite=!0,s.contrast=.2,s.strength>5&&(s.scale=Math.min(s.scale,1)),(s.strength>8||s.scale>=1)&&(s.contrast=.1)}};var g0=class{generate(){let s=o.layersData;s.clearBetweenLayers=!1,s.invertColorsLayers=!1,s.patternMode=P.GLOBAL,s.patternType=S0.GRID,this.canBoostDispTexScale=!1,this.canDeboostDispDefScale=!1,this.type=0;let t=s.globalPatternData;t.shape=C0.SQUARE,this._generate()}_generate(){let s=o.layersData,t=s.globalPatternData,ze=o.displacementData;t.chancesToStroke=0,t.strokesWidth=15,t.isCircleHalf=!1,t.chancesToSkip=.6,t.chancesToFill=.575;let a=n.rand(),i=n.rand(),l=n.rand();if(a<.125){let o=4;i<.15&&(o=3),t.cols=o+n.rand()*3>>0,t.lines=o+n.rand()*3>>0,n.composition="Very minimalistic"}else if(a<.32)t.cols=5+w(0,10,6)>>0,t.lines=6+w(0,12,6)>>0,n.composition="Minimalistic";else if(a<.73)t.cols=9+n.rand()*12+w(0,10,4)+w(0,64,9),t.lines=t.cols*1.4,n.composition="Balanced";else if(a<.92)t.cols=4+n.rand()*27+w(0,7,4)+w(0,35,9),t.lines=4+n.rand()*32+w(0,7,4)+w(0,35,9),n.composition="Free";else{let o=3+l*.1;i<.5?(t.cols=40+n.rand()*40>>0,t.lines=t.cols/o>>0):(t.lines=40+n.rand()*40>>0,t.cols=t.lines/o>>0),n.composition="Unbalanced"}t.turbulence=0,t.lines<10&&t.cols>10&&t.lines*2>t.cols&&(t.cols=t.lines*2),s.clearBetweenLayers=!0,s.invertColorsLayers=!0;let m=n.rand();t.chancesToStroke=m*.8+w(.2,0,3),t.chancesToFill=.68+n.rand()*.12,(t.cols>40&&t.lines>30||t.lines>40&&t.cols>30)&&(t.chancesToFill+=.1),t.cols<=10&&t.lines<=10&&(ze.scale=Math.min(ze.scale,.98))}};function _e(){let r=o.displacementData,s=Math.abs(r.strength),t=r.scale<=.8?r.scale:1,e=s*t;return s>=5.5&&r.scale>.55?"Extreme":e<=.9?"Very small":e<2?"Small":e<3.1?"Medium":e<4.3?"Big":"Extreme"}function ye(){let r=o.layersData.globalDeformerData.glitchVerticalBand+o.layersData.globalDeformerData.glitchHorizontalBand;return r<=0?"None":r<.25?"Small":r<.5?"Medium":r<.65?"Strong":"Extreme"}function I(){let s=o.layersData.globalPatternData;return{Palette:`Palette ${o.idxStyle}`||"Merveilleuse","Layer Count":o.layersData.count,"Columns count":s.cols>>0,"Lines count":s.lines>>0,Evolution:_e(),Perturbations:ye(),Composition:n.composition}}var f0=class{constructor(s){this._onChangeSeed=s,this._displacementGenerator=new u0,this._gridGenerator=new g0,this.onGeneration=new it.Signal}generateDisplacement=()=>{this._onChangeSeed(),this._displacementGenerator.generate(this.type),this.onGeneration.dispatch()};generateWithoutDisplacement=()=>{this.generate(!1)};generate=(s=!0)=>{this._onChangeSeed(),n.rand(),this._currentGenerator=this._gridGenerator,this.type="grid",s&&this._displacementGenerator.generate(this.type),this._currentGenerator.generate(),this._generateDeformersForGrid(),this._generateGlitch(),this.adjustGenerationBasedOnStyle(),this.onGeneration.dispatch()};adjustGenerationBasedOnStyle=()=>{let s=o.layersData,t=s.globalPatternData,e=o.layersData.globalDeformerData,a=n.rand()*Math.PI*2,l=1.7;for(let i of s.layersData){if(i.rotationValue=a,a+=l,this._currentGenerator===this._gridGenerator&&(t.cols>25||t.lines>25)){let m=250;(t.cols>32||t.lines>32)&&(m=180),i.segmentLengthMax>=m&&(i.segmentLengthMax=$s(i.segmentLengthMax,5,300,40,m,!0))}e.displacementDistance>1.9&&(i.rotationType=0)}};_generateDeformersForGrid(){let t=o.layersData.globalPatternData,e=o.layersData.globalDeformerData;e.deformersOrder=q.DISP_GLITCH,e.glitchMirrorChanceVertical=0,e.glitchMirrorChanceHorizontal=0,e.displacementDistance=1,e.displacementScale=1,e.displacementUseRandomAngle=!1,t.cols<10&&t.lines<10?(e.displacementAngle=0,e.displacementUseRandomAngle=!0):e.displacementAngle=n.rand()*360-180,e.displacementIncrementAngle=10}_generateGlitch(){let t=o.layersData.globalDeformerData;t.glitchHorizontalBand=0,t.glitchVerticalBand=0,t.glitchAmount=0;let e=n.rand(),a=n.rand(),i=n.rand(),l=w(0,1,4),m=A(.23);m&&(t.glitchHorizontalBand=.15+e*.3+l*.4,t.glitchHorizontalBandPos=i<.5?a*.25:1-a*.25,t.glitchHorizontalBandMirror=i<.1),e=n.rand(),a=n.rand(),i=n.rand(),l=w(0,1,4),A(m?.05:.175)&&(t.glitchVerticalBand=.15+e*.2+l*.4,t.glitchVerticalBandPos=Math.max(0,Math.min(a,1-t.glitchVerticalBand)),t.glitchVerticalBandMirror=!1)}};function q0(r){let s=document.createElement("a");s.setAttribute("download","tout_trace-"+tokenData.hash+".png"),s.setAttribute("href",r.toDataURL("image/png").replace("image/png","image/octet-stream")),s.click()}var x0=class extends V{constructor(s,t){if(super(s,t,!1),window.addEventListener("keydown",e=>{e.key==="s"?q0(this._renderer.domElement):e.key==="h"&&window.open(window.location.href+"?hd=1","_blank").focus()}),this._counterToDraw=0,this._tick=0,o.onRedrawRequired.add(this._onRedrawRequired),o.onDisplacementRegenerationRequired.add(this._onDisplacementRegenerationRequired),o.onPatternRegenerationRequired.add(this._onPatternRegenerationRequired),this.initWebGL(),this._forceSeed)this._onChangeSeed();else{let e=new M;n.rand=e.random_dec,U0()}if(this._displacementTexture=new d0(this._renderer,this.width,this.height),this._artwork=new p0(this._renderer,this._displacementTexture,this.width,this.height),this._forceStyle){let e=R0(this._forceStyle);o.setStyle(e.data,e.id,e.__idx)}else{let e=Fs();o.setStyle(e.data,e.id,e.__idx)}this._generator=new f0(this._onChangeSeed),this._generator.generate(),this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0,B.onUpdate.add(this._onUpdate)}_onDisplacementRegenerationRequired=()=>{this._isDisplacementGenerationRequired=!0,this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onPatternRegenerationRequired=()=>{this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};_onRedrawRequired=()=>{this._isDrawRequired=!0};_onUpdate=s=>{this._counterToDraw+=s,(this._isPatternGenerationRequired||this._isDisplacementGenerationRequired||this._isDrawRequired)&&(Ys(),this._artwork.reset(),this._tick=0),this._isDisplacementGenerationRequired&&this._displacementTexture?.draw(),!this._artwork?.isFullyDrawn&&this._counterToDraw>30&&(this._artwork?.drawAnimated()&&(this._renderer.setRenderTarget(null),this._renderArtwork()),this._counterToDraw=0,this._tick+=1),this._isDisplacementGenerationRequired=!1,this._isPatternGenerationRequired=!1,this._isDrawRequired=!1};_renderArtwork(){this._applyPostprocessData(),this.artwork=this._artwork.textureArtwork,this.setBgColor(o.globalData.backgroundColorGL),this._renderWebGL()}_applyPostprocessData(){let s=Math.min(this._artwork.percent,1),t=st(Math.min(s*2,1)),e=tt(s),a=o.postprocessData;this.optionsPost.brightness=a.brightness,this.optionsPost.contrast=a.contrast,this.optionsPost.saturation=a.saturation*t,this.optionsPost.highlights=a.highlights,this.optionsPost.shadows=a.shadows,this.optionsPost.hue=a.hue,this.optionsPost.noise=a.noise,this.optionsPost.noiseRepeat=a.noiseRepeat,this.optionsPost.sharpenBlur=a.sharpenBlur*e,this.optionsPost.sharpenSize=a.sharpenSize,this.optionsPost.normalStr=a.normalStr*e,this.optionsPost.lightPosX=a.lightPosX,this.optionsPost.lightPosY=a.lightPosY,this.optionsPost.lightStr=a.lightStr*e,this.optionsPost.enableNormal=a.enableNormal}_onChangeSeed=()=>{this.changeSeed(),this._forceSeed&&(tokenData.hash=this._forceSeed),this._resetHashes(),U0(),this._isPatternGenerationRequired=!0,this._isDrawRequired=!0};get generator(){return this._generator}};console.log("-------------------");console.log("Author: Florian Zumbrunn");console.log("@florianzumbrunn // https://florianzumbrunn.com");console.log("~");console.log("Series: Tout trac\xE9");console.log("~");console.log("Hash:",tokenData.hash);console.log("-------------------");console.log("PROD");window.innerHeight<800&&(n.dpr=.2);function lt(){Pe(window.innerWidth,window.innerHeight)}var ze=new x0(n.size.width*n.resolution,n.size.height*n.resolution);window.addEventListener("resize",lt,!1);lt();function Pe(r=512,s=512){s=Math.min(s,n.size.height);let t=Math.min(s/n.size.height,1);r=n.size.width*t,ze.resize(r,s)}})(); /** @license * JS Signals <http://millermedeiros.github.com/js-signals/> * Released under the MIT license * Author: Miller Medeiros * Version: 1.0.0 - Build: 268 (2012/11/29 05:48 PM) */
ht)},ugenhash:{type:"f",value:f()*15e6+10},uCountLines:{type:"f",value:1e5},uLineWidth:{type:"f",value:10},uLineWidthRandomAdd:{type:"f",value:5},uLineWidthRandomPower:{type:"f",value:8},uSegmentLengthMin:{type:"f",value:0},uSegmentLengthMax:{type:"f",value:0},uSegmentLengthPower:{type:"f",value:4},uRotationType:{type:"f",value:1},uRotationNoise:{type:"v2",value:new THREE.Vector2(0,0)},uRotationDir:{type:"f",value:0},uColor:{type:"v3",value:new THREE.Vector3(.5,.5,.5)},uAlpha:{type:"f",value:1},uHueRand:{type:"v2",value:new THREE.Vector2(0,0)},uSaturationRand:{type:"v2",value:new THREE.Vector2(0,0)},uLuminosityRand:{type:"v2",value:new THREE.Vector2(0,0)},uColorAdjustementValue:{type:"f",value:1},uColorAdjustementScale:{type:"f",value:1},uDontUsePattern:{type:"f",value:0},uVisibleThreshold:{type:"f",value:.01},uModSatPercentBased:{type:"f",value:.2},uModLumPercentBased:{type:"f",value:.125},uAnimTime:{type:"f",value:0},uNormalStr:{type:"f",value:10},uLightPos:{type:"v2",value:new THREE.Vector2(-.3,.8)},uLightStr:{type:"f",value:.1},uIsShadow:{type:"f",value:0},uCountLinesStep:{type:"f",value:0},uCountToAdd:{type:"f",value:0}}})}_generateRands(){let s=this._linesHolder.lines;for(let t of s)t.x=f(),t.y=f()}prepare(s,t,e=1,a=!1,l=0,i=1e6,m=0){let c=this._material.uniforms,h=o.layersData.layersData[s],g=Ks(a?h.colorShadow:h.color);c.tPattern.value=t,c.uColor.value.x=g.h/360,c.uColor.value.y=g.s/100,c.uColor.value.z=g.l/100,c.uCountLines.value=h.countLines*e,c.uLineWidth.value=h.lineWidth,c.uLineWidthRandomAdd.value=h.lineWidthRandomAdd,c.uLineWidthRandomPower.value=h.lineWidthRandomPower,c.uSegmentLengthMin.value=h.segmentLengthMin,c.uSegmentLengthMax.value=h.segmentLengthMax,c.uSegmentLengthPower.value=h.segmentLengthPower,c.uRotationType.value=a?h.shadowRotation:h.rotationType,c.uAlpha.value=a?h.alphaShadow:h.alpha,c.uHueRand.value.x=h.hueMin,c.uHueRand.value.y=h.hueMax,c.uSaturationRand.value.x=h.saturationMin,c.uSaturationRand.value.y=h.saturationMax,c.uLuminosityRand.value.x=h.luminosityMin,c.uLuminosityRand.value.y=h.luminosityMax,c.uColorAdjustementValue.value=h.colorAdjustmentValue,c.uColorAdjustementScale.value=h.colorAdjustmentScale,c.uModSatPercentBased.value=h.modSatPercentBased,c.uModLumPercentBased.value=h.modLumPercentBased,c.uAnimTime.value=0,c.uIsShadow.value=a?1:0,c.uCountLinesStep.value=l,c.uCountToAdd.value=i,c.uRotationDir.value=h.rotationValue,c.uDontUsePattern.value=h.dontUsePattern,c.uVisibleThreshold.value=h.visibleThreshold}get mesh(){return this._linesHolder}};var Ti=Math.PI/2,Mi=Math.PI*2;function st(r){return-.5*(Math.cos(Math.PI*r)-1)}function tt(r){return r*r}function et(r){let s=r-1;return s*s*s+1}var rt="precision highp float;uniform sampler2D uArtworkTexture;uniform sampler2D uPatternTexture;uniform vec2 uArtworkSize;uniform float uNormalStr;uniform vec2 uLightPos;uniform float uLightStr;varying vec2 vUv;vec2 stdNormalMap(float height){return-vec2(dFdx(height),dFdy(height));}vec3 blendMultiply(vec3 base,vec3 blend){return base*blend;}void main(){vec4 artwork=texture2D(uArtworkTexture,vUv);vec4 pattern=texture2D(uPatternTexture,vUv);float sharpenSize=0.2;vec2 areaSize=sharpenSize/uArtworkSize;vec4 c1=texture2D(uArtworkTexture,mod(vUv-areaSize,1.));vec4 c2=texture2D(uArtworkTexture,mod(vec2(vUv.x,vUv.y-areaSize.y),1.));vec4 c3=texture2D(uArtworkTexture,mod(vec2(vUv.x+areaSize.x,vUv.y-areaSize.y),1.));vec4 c4=texture2D(uArtworkTexture,mod(vec2(vUv.x-areaSize.x,vUv.y),1.));vec4 c5=texture2D(uArtworkTexture,mod(vec2(vUv.x+areaSize.x,vUv.y),1.));vec4 c6=texture2D(uArtworkTexture,mod(vec2(vUv.x-areaSize.x,vUv.y+areaSize.y),1.));vec4 c7=texture2D(uArtworkTexture,mod(vec2(vUv.x,vUv.y+areaSize.y),1.));vec4 c8=texture2D(uArtworkTexture,mod(vUv+areaSize,1.));vec4 blur=(c1+c3+c6+c8+2.*(c2+c4+c5+c7)+4.*artwork)/16.;vec4 artwork2=(1.+sharpenSize)*artwork-sharpenSize*blur;float height=(artwork2.r+artwork2.g+artwork2.b)/3.;vec2 normal=stdNormalMap(height);normal*=uNormalStr;normal+=.5;float lighting=dot(normal,normalize(uLightPos));artwork.rgb+=lighting*uLightStr*.82*.5;height=(pattern.r+pattern.g+pattern.b)/3.;normal=stdNormalMap(height);normal*=uNormalStr;normal+=.5;lighting=dot(normal,normalize(-uLightPos));artwork.rgb+=lighting*uLightStr*.25;gl_FragColor=artwork;}";var p0=class{constructor(s,t,e,a){this._renderer=s,this._displacementTexture=t,this._width=e,this._height=a,this._patternsCreator=new l0(this._width,this._height,this._renderer,this._displacementTexture),this._artworkLayer=new m0(this._width,this._height,this._displacementTexture),this._idxLayer=0,this._createEngine()}_createEngine(){this._scene=new THREE.Scene,this._camera=new THREE.PerspectiveCamera(45,this._width/this._height,1e-4,1e4),this._camera.updateProjectionMatrix();let s={wrapS:THREE.ClampToEdgeWrapping,wrapT:THREE.ClampToEdgeWrapping,minFilter:THREE.LinearFilter,magFilter:THREE.NearestFilter,format:THREE.RGBFormat};this._renderTarget=new THREE.WebGLRenderTarget(this._width,this._height,s),this._renderTarget.texture.generateMipmaps=!1,this._renderTarget2=new THREE.WebGLRenderTarget(this._width,this._height,s),this._renderTarget2.texture.generateMipmaps=!1,this._materialEdges=new THREE.ShaderMaterial({vertexShader:D,fragmentShader:rt,uniforms:{uArtworkSize:{type:"v2",value:new THREE.Vector2(this._width,this._height)},uArtworkTexture:{type:"t",value:null},uPatternTexture:{type:"t",value:null},uNormalStr:{type:"f",value:10},uLightPos:{type:"v2",value:new THREE.Vector2(-.3,.8)},uLightStr:{type:"f",value:.1}},side:THREE.DoubleSide,transparent:!0}),this._geometry=new THREE.PlaneBufferGeometry(2,2),this._meshEdges=new THREE.Mesh(this._geometry,this._materialEdges)}reset(){this._currentIdxLayer=0,this._currentCountLines=0,this._patternsCreator.reset(),this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0)}draw(){this._renderer.setRenderTarget(this._renderTarget),this._renderer.setClearColor(o.globalData.backgroundColorGL,1),this._renderer.clear(!0,!0,!0);let s=o.postprocessData;this._materialEdges.uniforms.uLightPos.value.x=s.lightPosX,this._materialEdges.uniforms.uLightPos.value.y=s.lightPosY,this._materialEdges.uniforms.uLightStr.value=s.lightStr;for(let t=0;t<o.layersData.count;t++){let e=o.layersData.layersData[t];!e.isActivated||(this._patternsCreator.generate(t,1),this._renderer.setRenderTarget(this._renderTarget),t!==0&&e.alphaShadow>0&&(this._artworkLayer.prepare(t,this._patternsCreator.textureShadow,1,!0),this._renderer.render(this._artworkLayer.mesh,this._camera)),this._artworkLayer.prepare(t,this._patternsCreator.texture,1),this._renderer.render(this._artworkLayer.mesh,this._camera),this._renderer.setRenderTarget(this._renderTarget2),this._materialEdges.uniforms.uArtworkTexture.value=this._renderTarget.texture,this._materialEdges.uniforms.uPatternTexture.value=this._patternsCreator.texture,this._renderer.render(this._meshEdges,this._camera))}this._outTexture=this._renderTarget2.texture,this._renderer.setRenderTarget(null)}drawAnimated(){let s=o.postprocessData;this._materialEdges.uniforms.uLightPos.value.x=s.lightPosX,this._materialEdges.uniforms.uLightPos.value.y=s.lightPosY,this._materialEdges.uniforms.uLightStr.value=s.lightStr;let t=o.layersData.layersData[this._currentIdxLayer];if(!t.isActivated||this._currentCountLines>=t.countLines)return this._currentIdxLayer+=1,!0;let e=et(this._currentCountLines/t.countLines),a=this._artworkLayer.countLines*.4+this._artworkLayer.countLines*e*.6>>0;return this._patternsCreator.generate(this._currentIdxLayer,1),this._renderer.setRenderTarget(this._renderTarget),this._currentIdxLayer!==0&&this._hasShadow&&(this._artworkLayer.prepare(this._currentIdxLayer,this._patternsCreator.textureShadow,1,!0,this._currentCountLines,a),this._renderer.render(this._artworkLayer.mesh,this._camera)),this._artworkLayer.prepare(this._currentIdxLayer,this._patternsCreator.texture,1,!1,this._currentCountLines,a),this._renderer.render(this._artworkLayer.mesh,this._camera),this._outTexture=this._renderTarget.texture,this._currentCountLines+=a,this._currentCountLines>=t.countLines&&(this._currentIdxLayer+=1,this._currentCountLines=0,this._renderer.setRenderTarget(this._renderTarget2),this._materialEdges.uniforms.uArtworkTexture.value=this._renderTarget.texture,this._materialEdges.uniforms.uPatternTexture.value=this._patternsCreator.texture,this._renderer.render(this._meshEdges,this._camera),this._outTexture=this._renderTarget2.texture,t=o.layersData.layersData[this._currentIdxLayer],t&&(this._hasShadow=t.alphaShadow>0)),!0}get isFullyDrawn(){return this._currentIdxLayer>=o.layersData.count}get textureArtwork(){return this._outTexture}get patternTexture(){return this._patternsCreator.texture}get percent(){let s=o.layersData.layersData[this._currentIdxLayer];if(!s){return 1;};let t=this._currentIdxLayer/(o.layersData.count-1);let e=1/(o.layersData.count-1);let a=this._currentCountLines/s.countLines*e;if(isNaN(a)){a=0};return t+a;}};var at=`precision highp float;uniform float uAnimTime; #import color/contrast #import noise/perlin vec3 getPerlinTurbulence(vec2 position,float scale,float strength,float time){vec3 perlin=pnoiseVec3(vec3(position.xy+vec2(uAnimTime*1.56,uAnimTime*0.35),time)*scale);perlin*=strength;return perlin;}uniform float uScale;uniform float uStrength;uniform float uTime;uniform float uSaturation;uniform float uContrast;uniform float uIsAbs;uniform float uIsBlackAndWhite;uniform vec2 uRatio;varying vec2 vUv;void main(){vec2 uvScaled=(vUv-.5)*uRatio;vec3 color1=getPerlinTurbulence(uvScaled,uScale,uStrength,uTime);vec3 colorReasonable=color1;vec3 color=colorReasonable;color=color*(1.-uIsAbs)+abs(color)*uIsAbs;color=color*(1.-uIsBlackAndWhite)+vec3((color.r+color.g+color.b)/3.)*uIsBlackAndWhite;vec4 result=vec4(color,1.);result=contrastMatrix(uContrast)*result;const vec3 W=vec3(0.2125,0.7154,0.0721);vec3 intensity=vec3(dot(result.rgb,W));result.rgb=mix(intensity,result.rgb,uSaturation);gl_FragColor=result;}`;var be=T(at),d0=class{constructor(s,t,e){this._renderer=s,this._width=t,this._height=e,this._createEngine()}_createEngine(){this._createUniforms(),this._material=new THREE.ShaderMaterial({fragmentShader:be,vertexShader:D,uniforms:this._uniforms,side:THREE.DoubleSide}),this._geometry=new THREE.PlaneBufferGeometry(2,2),this._mesh=new THREE.Mesh(this._geometry,this._material),this._camera=new THREE.PerspectiveCamera(45,this._width/this._height,1e-4,1e4),this._camera.updateProjectionMatrix(),this._renderTarget=new THREE.WebGL
1-50 of 71