From 29f8b23a3f874afae1dda1d2c4037327c0c5e46f Mon Sep 17 00:00:00 2001 From: Karson Kalt Date: Tue, 9 Jul 2024 19:13:44 -0400 Subject: [PATCH] fix colors --- assets/js/index.js | 2 +- assets/js/terminal.js | 2 +- assets/ts/terminal/updateAccentColor.ts | 37 ++++++++++++++----------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/assets/js/index.js b/assets/js/index.js index f8c1851..896a369 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -(()=>{var r={768:function(r){r.exports=function(){"use strict";for(var r=function(r,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),rn?n:r},e=r,n={},t=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];t255)&&(r._clipped=!0),r[n]=e(r[n],0,255)):3===n&&(r[n]=e(r[n],0,1));return r},limit:r,type:f,unpack:function(r,e){return void 0===e&&(e=null),r.length>=3?Array.prototype.slice.call(r):"object"==u(r[0])&&e?e.split("").filter((function(e){return void 0!==r[0][e]})).map((function(e){return r[0][e]})):r[0]},last:function(r){if(r.length<2)return null;var e=r.length-1;return"string"==c(r[e])?r[e].toLowerCase():null},PI:i,TWOPI:2*i,PITHIRD:i/3,DEG2RAD:i/180,RAD2DEG:180/i},s={format:{},autodetect:[]},h=l.last,d=l.clip_rgb,b=l.type,p=s,v=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=this;if("object"===b(r[0])&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];var t=h(r),a=!1;if(!t){a=!0,p.sorted||(p.autodetect=p.autodetect.sort((function(r,e){return e.p-r.p})),p.sorted=!0);for(var o=0,f=p.autodetect;o4?r[4]:1;return 1===o?[0,0,0,f]:[n>=1?0:255*(1-n)*(1-o),t>=1?0:255*(1-t)*(1-o),a>=1?0:255*(1-a)*(1-o),f]},x=y,E=g,A=s,C=l.unpack,L=l.type,O=M;E.prototype.cmyk=function(){return O(this._rgb)},x.cmyk=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(E,[null].concat(r,["cmyk"])))},A.format.cmyk=N,A.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=C(r,"cmyk"),"array"===L(r)&&4===r.length)return"cmyk"}});var P=l.unpack,F=l.last,j=function(r){return Math.round(100*r)/100},q=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=P(r,"hsla"),t=F(r)||"lsa";return n[0]=j(n[0]||0),n[1]=j(100*n[1])+"%",n[2]=j(100*n[2])+"%","hsla"===t||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,t="hsla"):n.length=3,t+"("+n.join(",")+")"},I=l.unpack,R=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=I(r,"rgba"))[0],t=r[1],a=r[2];n/=255,t/=255,a/=255;var o,f,u=Math.min(n,t,a),c=Math.max(n,t,a),i=(c+u)/2;return c===u?(o=0,f=Number.NaN):o=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),n==c?f=(t-a)/(c-u):t==c?f=2+(a-n)/(c-u):a==c&&(f=4+(n-t)/(c-u)),(f*=60)<0&&(f+=360),r.length>3&&void 0!==r[3]?[f,o,i,r[3]]:[f,o,i]},G=l.unpack,B=l.last,S=q,D=R,T=Math.round,Y=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=G(r,"rgba"),t=B(r)||"rgb";return"hsl"==t.substr(0,3)?S(D(n),t):(n[0]=T(n[0]),n[1]=T(n[1]),n[2]=T(n[2]),("rgba"===t||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,t="rgba"),t+"("+n.slice(0,"rgb"===t?3:4).join(",")+")")},$=l.unpack,z=Math.round,H=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];var t,a,o,f=(e=$(e,"hsl"))[0],u=e[1],c=e[2];if(0===u)t=a=o=255*c;else{var i=[0,0,0],l=[0,0,0],s=c<.5?c*(1+u):c+u-c*u,h=2*c-s,d=f/360;i[0]=d+1/3,i[1]=d,i[2]=d-1/3;for(var b=0;b<3;b++)i[b]<0&&(i[b]+=1),i[b]>1&&(i[b]-=1),6*i[b]<1?l[b]=h+6*(s-h)*i[b]:2*i[b]<1?l[b]=s:3*i[b]<2?l[b]=h+(s-h)*(2/3-i[b])*6:l[b]=h;t=(r=[z(255*l[0]),z(255*l[1]),z(255*l[2])])[0],a=r[1],o=r[2]}return e.length>3?[t,a,o,e[3]]:[t,a,o,1]},X=H,K=s,U=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,V=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,W=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Z=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,J=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Q=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,rr=Math.round,er=function(r){var e;if(r=r.toLowerCase().trim(),K.format.named)try{return K.format.named(r)}catch(r){}if(e=r.match(U)){for(var n=e.slice(1,4),t=0;t<3;t++)n[t]=+n[t];return n[3]=1,n}if(e=r.match(V)){for(var a=e.slice(1,5),o=0;o<4;o++)a[o]=+a[o];return a}if(e=r.match(W)){for(var f=e.slice(1,4),u=0;u<3;u++)f[u]=rr(2.55*f[u]);return f[3]=1,f}if(e=r.match(Z)){for(var c=e.slice(1,5),i=0;i<3;i++)c[i]=rr(2.55*c[i]);return c[3]=+c[3],c}if(e=r.match(J)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var s=X(l);return s[3]=1,s}if(e=r.match(Q)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=X(h);return d[3]=+e[4],d}};er.test=function(r){return U.test(r)||V.test(r)||W.test(r)||Z.test(r)||J.test(r)||Q.test(r)};var nr=y,tr=g,ar=s,or=l.type,fr=Y,ur=er;tr.prototype.css=function(r){return fr(this._rgb,r)},nr.css=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(tr,[null].concat(r,["css"])))},ar.format.css=ur,ar.autodetect.push({p:5,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===or(r)&&ur.test(r))return"css"}});var cr=g,ir=y,lr=l.unpack;s.format.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=lr(r,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},ir.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(cr,[null].concat(r,["gl"])))},cr.prototype.gl=function(){var r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};var sr=l.unpack,hr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=sr(r,"rgb"),a=t[0],o=t[1],f=t[2],u=Math.min(a,o,f),c=Math.max(a,o,f),i=c-u,l=100*i/255,s=u/(255-i)*100;return 0===i?n=Number.NaN:(a===c&&(n=(o-f)/i),o===c&&(n=2+(f-a)/i),f===c&&(n=4+(a-o)/i),(n*=60)<0&&(n+=360)),[n,l,s]},dr=l.unpack,br=Math.floor,pr=function(){for(var r,e,n,t,a,o,f=[],u=arguments.length;u--;)f[u]=arguments[u];var c,i,l,s=(f=dr(f,"hcg"))[0],h=f[1],d=f[2];d*=255;var b=255*h;if(0===h)c=i=l=d;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var p=br(s/=60),v=s-p,g=d*(1-h),m=g+b*(1-v),y=g+b*v,w=g+b;switch(p){case 0:c=(r=[w,y,g])[0],i=r[1],l=r[2];break;case 1:c=(e=[m,w,g])[0],i=e[1],l=e[2];break;case 2:c=(n=[g,w,y])[0],i=n[1],l=n[2];break;case 3:c=(t=[g,m,w])[0],i=t[1],l=t[2];break;case 4:c=(a=[y,g,w])[0],i=a[1],l=a[2];break;case 5:c=(o=[w,g,m])[0],i=o[1],l=o[2]}}return[c,i,l,f.length>3?f[3]:1]},vr=l.unpack,gr=l.type,mr=y,yr=g,wr=s,kr=hr;yr.prototype.hcg=function(){return kr(this._rgb)},mr.hcg=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(yr,[null].concat(r,["hcg"])))},wr.format.hcg=pr,wr.autodetect.push({p:1,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=vr(r,"hcg"),"array"===gr(r)&&3===r.length)return"hcg"}});var Mr=l.unpack,_r=l.last,Nr=Math.round,xr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Mr(r,"rgba"),t=n[0],a=n[1],o=n[2],f=n[3],u=_r(r)||"auto";void 0===f&&(f=1),"auto"===u&&(u=f<1?"rgba":"rgb");var c="000000"+((t=Nr(t))<<16|(a=Nr(a))<<8|(o=Nr(o))).toString(16);c=c.substr(c.length-6);var i="0"+Nr(255*f).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},Er=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ar=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Cr=function(r){if(r.match(Er)){4!==r.length&&7!==r.length||(r=r.substr(1)),3===r.length&&(r=(r=r.split(""))[0]+r[0]+r[1]+r[1]+r[2]+r[2]);var e=parseInt(r,16);return[e>>16,e>>8&255,255&e,1]}if(r.match(Ar)){5!==r.length&&9!==r.length||(r=r.substr(1)),4===r.length&&(r=(r=r.split(""))[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);var n=parseInt(r,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+r)},Lr=y,Or=g,Pr=l.type,Fr=s,jr=xr;Or.prototype.hex=function(r){return jr(this._rgb,r)},Lr.hex=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Or,[null].concat(r,["hex"])))},Fr.format.hex=Cr,Fr.autodetect.push({p:4,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===Pr(r)&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var qr=l.unpack,Ir=l.TWOPI,Rr=Math.min,Gr=Math.sqrt,Br=Math.acos,Sr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=qr(r,"rgb"),a=t[0],o=t[1],f=t[2],u=Rr(a/=255,o/=255,f/=255),c=(a+o+f)/3,i=c>0?1-u/c:0;return 0===i?n=NaN:(n=(a-o+(a-f))/2,n/=Gr((a-o)*(a-o)+(a-f)*(o-f)),n=Br(n),f>o&&(n=Ir-n),n/=Ir),[360*n,i,c]},Dr=l.unpack,Tr=l.limit,Yr=l.TWOPI,$r=l.PITHIRD,zr=Math.cos,Hr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,o=(r=Dr(r,"hsi"))[0],f=r[1],u=r[2];return isNaN(o)&&(o=0),isNaN(f)&&(f=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?t=1-((a=(1-f)/3)+(n=(1+f*zr(Yr*o)/zr($r-Yr*o))/3)):o<2/3?a=1-((n=(1-f)/3)+(t=(1+f*zr(Yr*(o-=1/3))/zr($r-Yr*o))/3)):n=1-((t=(1-f)/3)+(a=(1+f*zr(Yr*(o-=2/3))/zr($r-Yr*o))/3)),[255*(n=Tr(u*n*3)),255*(t=Tr(u*t*3)),255*(a=Tr(u*a*3)),r.length>3?r[3]:1]},Xr=l.unpack,Kr=l.type,Ur=y,Vr=g,Wr=s,Zr=Sr;Vr.prototype.hsi=function(){return Zr(this._rgb)},Ur.hsi=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Vr,[null].concat(r,["hsi"])))},Wr.format.hsi=Hr,Wr.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Xr(r,"hsi"),"array"===Kr(r)&&3===r.length)return"hsi"}});var Jr=l.unpack,Qr=l.type,re=y,ee=g,ne=s,te=R;ee.prototype.hsl=function(){return te(this._rgb)},re.hsl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(ee,[null].concat(r,["hsl"])))},ne.format.hsl=H,ne.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Jr(r,"hsl"),"array"===Qr(r)&&3===r.length)return"hsl"}});var ae=l.unpack,oe=Math.min,fe=Math.max,ue=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,o=(r=ae(r,"rgb"))[0],f=r[1],u=r[2],c=oe(o,f,u),i=fe(o,f,u),l=i-c;return a=i/255,0===i?(n=Number.NaN,t=0):(t=l/i,o===i&&(n=(f-u)/l),f===i&&(n=2+(u-o)/l),u===i&&(n=4+(o-f)/l),(n*=60)<0&&(n+=360)),[n,t,a]},ce=l.unpack,ie=Math.floor,le=function(){for(var r,e,n,t,a,o,f=[],u=arguments.length;u--;)f[u]=arguments[u];var c,i,l,s=(f=ce(f,"hsv"))[0],h=f[1],d=f[2];if(d*=255,0===h)c=i=l=d;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var b=ie(s/=60),p=s-b,v=d*(1-h),g=d*(1-h*p),m=d*(1-h*(1-p));switch(b){case 0:c=(r=[d,m,v])[0],i=r[1],l=r[2];break;case 1:c=(e=[g,d,v])[0],i=e[1],l=e[2];break;case 2:c=(n=[v,d,m])[0],i=n[1],l=n[2];break;case 3:c=(t=[v,g,d])[0],i=t[1],l=t[2];break;case 4:c=(a=[m,v,d])[0],i=a[1],l=a[2];break;case 5:c=(o=[d,v,g])[0],i=o[1],l=o[2]}}return[c,i,l,f.length>3?f[3]:1]},se=l.unpack,he=l.type,de=y,be=g,pe=s,ve=ue;be.prototype.hsv=function(){return ve(this._rgb)},de.hsv=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(be,[null].concat(r,["hsv"])))},pe.format.hsv=le,pe.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=se(r,"hsv"),"array"===he(r)&&3===r.length)return"hsv"}});var ge={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},me=ge,ye=l.unpack,we=Math.pow,ke=function(r){return(r/=255)<=.04045?r/12.92:we((r+.055)/1.055,2.4)},Me=function(r){return r>me.t3?we(r,1/3):r/me.t2+me.t0},_e=function(r,e,n){return r=ke(r),e=ke(e),n=ke(n),[Me((.4124564*r+.3575761*e+.1804375*n)/me.Xn),Me((.2126729*r+.7151522*e+.072175*n)/me.Yn),Me((.0193339*r+.119192*e+.9503041*n)/me.Zn)]},Ne=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=ye(r,"rgb"),t=n[0],a=n[1],o=n[2],f=_e(t,a,o),u=f[0],c=f[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-f[2])]},xe=ge,Ee=l.unpack,Ae=Math.pow,Ce=function(r){return 255*(r<=.00304?12.92*r:1.055*Ae(r,1/2.4)-.055)},Le=function(r){return r>xe.t1?r*r*r:xe.t2*(r-xe.t0)},Oe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,o=(r=Ee(r,"lab"))[0],f=r[1],u=r[2];return t=(o+16)/116,n=isNaN(f)?t:t+f/500,a=isNaN(u)?t:t-u/200,t=xe.Yn*Le(t),n=xe.Xn*Le(n),a=xe.Zn*Le(a),[Ce(3.2404542*n-1.5371385*t-.4985314*a),Ce(-.969266*n+1.8760108*t+.041556*a),Ce(.0556434*n-.2040259*t+1.0572252*a),r.length>3?r[3]:1]},Pe=l.unpack,Fe=l.type,je=y,qe=g,Ie=s,Re=Ne;qe.prototype.lab=function(){return Re(this._rgb)},je.lab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(qe,[null].concat(r,["lab"])))},Ie.format.lab=Oe,Ie.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pe(r,"lab"),"array"===Fe(r)&&3===r.length)return"lab"}});var Ge=l.unpack,Be=l.RAD2DEG,Se=Math.sqrt,De=Math.atan2,Te=Math.round,Ye=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Ge(r,"lab"),t=n[0],a=n[1],o=n[2],f=Se(a*a+o*o),u=(De(o,a)*Be+360)%360;return 0===Te(1e4*f)&&(u=Number.NaN),[t,f,u]},$e=l.unpack,ze=Ne,He=Ye,Xe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=$e(r,"rgb"),t=n[0],a=n[1],o=n[2],f=ze(t,a,o),u=f[0],c=f[1],i=f[2];return He(u,c,i)},Ke=l.unpack,Ue=l.DEG2RAD,Ve=Math.sin,We=Math.cos,Ze=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Ke(r,"lch"),t=n[0],a=n[1],o=n[2];return isNaN(o)&&(o=0),[t,We(o*=Ue)*a,Ve(o)*a]},Je=l.unpack,Qe=Ze,rn=Oe,en=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Je(r,"lch"))[0],t=r[1],a=r[2],o=Qe(n,t,a),f=o[0],u=o[1],c=o[2],i=rn(f,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},nn=l.unpack,tn=en,an=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=nn(r,"hcl").reverse();return tn.apply(void 0,n)},on=l.unpack,fn=l.type,un=y,cn=g,ln=s,sn=Xe;cn.prototype.lch=function(){return sn(this._rgb)},cn.prototype.hcl=function(){return sn(this._rgb).reverse()},un.lch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(cn,[null].concat(r,["lch"])))},un.hcl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(cn,[null].concat(r,["hcl"])))},ln.format.lch=en,ln.format.hcl=an,["lch","hcl"].forEach((function(r){return ln.autodetect.push({p:2,test:function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];if(e=on(e,r),"array"===fn(e)&&3===e.length)return r}})}));var hn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},dn=s,bn=l.type,pn=hn,vn=Cr,gn=xr;g.prototype.name=function(){for(var r=gn(this._rgb,"rgb"),e=0,n=Object.keys(pn);e0;)e[n]=arguments[n+1];if(!e.length&&"string"===bn(r)&&pn[r.toLowerCase()])return"named"}});var mn=l.unpack,yn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=mn(r,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},wn=l.type,kn=y,Mn=g,_n=s,Nn=l.type,xn=yn;Mn.prototype.num=function(){return xn(this._rgb)},kn.num=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Mn,[null].concat(r,["num"])))},_n.format.num=function(r){if("number"==wn(r)&&r>=0&&r<=16777215)return[r>>16,r>>8&255,255&r,1];throw new Error("unknown num color: "+r)},_n.autodetect.push({p:5,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(1===r.length&&"number"===Nn(r[0])&&r[0]>=0&&r[0]<=16777215)return"num"}});var En=y,An=g,Cn=s,Ln=l.unpack,On=l.type,Pn=Math.round;An.prototype.rgb=function(r){return void 0===r&&(r=!0),!1===r?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Pn)},An.prototype.rgba=function(r){return void 0===r&&(r=!0),this._rgb.slice(0,4).map((function(e,n){return n<3?!1===r?e:Pn(e):e}))},En.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(An,[null].concat(r,["rgb"])))},Cn.format.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Ln(r,"rgba");return void 0===n[3]&&(n[3]=1),n},Cn.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Ln(r,"rgba"),"array"===On(r)&&(3===r.length||4===r.length&&"number"==On(r[3])&&r[3]>=0&&r[3]<=1))return"rgb"}});var Fn=Math.log,jn=function(r){var e,n,t,a=r/100;return a<66?(e=255,n=a<6?0:-155.25485562709179-.44596950469579133*(n=a-2)+104.49216199393888*Fn(n),t=a<20?0:.8274096064007395*(t=a-10)-254.76935184120902+115.67994401066147*Fn(t)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*Fn(e),n=325.4494125711974+.07943456536662342*(n=a-50)-28.0852963507957*Fn(n),t=255),[e,n,t,1]},qn=jn,In=l.unpack,Rn=Math.round,Gn=y,Bn=g,Sn=s,Dn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];for(var n,t=In(r,"rgb"),a=t[0],o=t[2],f=1e3,u=4e4;u-f>.4;){var c=qn(n=.5*(u+f));c[2]/c[0]>=o/a?u=n:f=n}return Rn(n)};Bn.prototype.temp=Bn.prototype.kelvin=Bn.prototype.temperature=function(){return Dn(this._rgb)},Gn.temp=Gn.kelvin=Gn.temperature=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Bn,[null].concat(r,["temp"])))},Sn.format.temp=Sn.format.kelvin=Sn.format.temperature=jn;var Tn=l.unpack,Yn=Math.cbrt,$n=Math.pow,zn=Math.sign,Hn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Tn(r,"rgb"),t=n[0],a=n[1],o=n[2],f=[Xn(t/255),Xn(a/255),Xn(o/255)],u=f[0],c=f[1],i=f[2],l=Yn(.4122214708*u+.5363325363*c+.0514459929*i),s=Yn(.2119034982*u+.6806995451*c+.1073969566*i),h=Yn(.0883024619*u+.2817188376*c+.6299787005*i);return[.2104542553*l+.793617785*s-.0040720468*h,1.9779984951*l-2.428592205*s+.4505937099*h,.0259040371*l+.7827717662*s-.808675766*h]};function Xn(r){var e=Math.abs(r);return e<.04045?r/12.92:(zn(r)||1)*$n((e+.055)/1.055,2.4)}var Kn=l.unpack,Un=Math.pow,Vn=Math.sign,Wn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Kn(r,"lab"))[0],t=r[1],a=r[2],o=Un(n+.3963377774*t+.2158037573*a,3),f=Un(n-.1055613458*t-.0638541728*a,3),u=Un(n-.0894841775*t-1.291485548*a,3);return[255*Zn(4.0767416621*o-3.3077115913*f+.2309699292*u),255*Zn(-1.2684380046*o+2.6097574011*f-.3413193965*u),255*Zn(-.0041960863*o-.7034186147*f+1.707614701*u),r.length>3?r[3]:1]};function Zn(r){var e=Math.abs(r);return e>.0031308?(Vn(r)||1)*(1.055*Un(e,1/2.4)-.055):12.92*r}var Jn=l.unpack,Qn=l.type,rt=y,et=g,nt=s,tt=Hn;et.prototype.oklab=function(){return tt(this._rgb)},rt.oklab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(et,[null].concat(r,["oklab"])))},nt.format.oklab=Wn,nt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Jn(r,"oklab"),"array"===Qn(r)&&3===r.length)return"oklab"}});var at=l.unpack,ot=Hn,ft=Ye,ut=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=at(r,"rgb"),t=n[0],a=n[1],o=n[2],f=ot(t,a,o),u=f[0],c=f[1],i=f[2];return ft(u,c,i)},ct=l.unpack,it=Ze,lt=Wn,st=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=ct(r,"lch"))[0],t=r[1],a=r[2],o=it(n,t,a),f=o[0],u=o[1],c=o[2],i=lt(f,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},ht=l.unpack,dt=l.type,bt=y,pt=g,vt=s,gt=ut;pt.prototype.oklch=function(){return gt(this._rgb)},bt.oklch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(pt,[null].concat(r,["oklch"])))},vt.format.oklch=st,vt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ht(r,"oklch"),"array"===dt(r)&&3===r.length)return"oklch"}});var mt=g,yt=l.type;mt.prototype.alpha=function(r,e){return void 0===e&&(e=!1),void 0!==r&&"number"===yt(r)?e?(this._rgb[3]=r,this):new mt([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]},g.prototype.clipped=function(){return this._rgb._clipped||!1};var wt=g,kt=ge;wt.prototype.darken=function(r){void 0===r&&(r=1);var e=this.lab();return e[0]-=kt.Kn*r,new wt(e,"lab").alpha(this.alpha(),!0)},wt.prototype.brighten=function(r){return void 0===r&&(r=1),this.darken(-r)},wt.prototype.darker=wt.prototype.darken,wt.prototype.brighter=wt.prototype.brighten,g.prototype.get=function(r){var e=r.split("."),n=e[0],t=e[1],a=this[n]();if(t){var o=n.indexOf(t)-("ok"===n.substr(0,2)?2:0);if(o>-1)return a[o];throw new Error("unknown channel "+t+" in mode "+n)}return a};var Mt=g,_t=l.type,Nt=Math.pow;Mt.prototype.luminance=function(r){if(void 0!==r&&"number"===_t(r)){if(0===r)return new Mt([0,0,0,this._rgb[3]],"rgb");if(1===r)return new Mt([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),n=20,t=function(e,a){var o=e.interpolate(a,.5,"rgb"),f=o.luminance();return Math.abs(r-f)<1e-7||!n--?o:f>r?t(e,o):t(o,a)},a=(e>r?t(new Mt([0,0,0]),this):t(this,new Mt([255,255,255]))).rgb();return new Mt(a.concat([this._rgb[3]]))}return xt.apply(void 0,this._rgb.slice(0,3))};var xt=function(r,e,n){return.2126*(r=Et(r))+.7152*(e=Et(e))+.0722*Et(n)},Et=function(r){return(r/=255)<=.03928?r/12.92:Nt((r+.055)/1.055,2.4)},At={},Ct=g,Lt=l.type,Ot=At,Pt=function(r,e,n){void 0===n&&(n=.5);for(var t=[],a=arguments.length-3;a-- >0;)t[a]=arguments[a+3];var o=t[0]||"lrgb";if(Ot[o]||t.length||(o=Object.keys(Ot)[0]),!Ot[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==Lt(r)&&(r=new Ct(r)),"object"!==Lt(e)&&(e=new Ct(e)),Ot[o](r,e,n).alpha(r.alpha()+n*(e.alpha()-r.alpha()))},Ft=g,jt=Pt;Ft.prototype.mix=Ft.prototype.interpolate=function(r,e){void 0===e&&(e=.5);for(var n=[],t=arguments.length-2;t-- >0;)n[t]=arguments[t+2];return jt.apply(void 0,[this,r,e].concat(n))};var qt=g;qt.prototype.premultiply=function(r){void 0===r&&(r=!1);var e=this._rgb,n=e[3];return r?(this._rgb=[e[0]*n,e[1]*n,e[2]*n,n],this):new qt([e[0]*n,e[1]*n,e[2]*n,n],"rgb")};var It=g,Rt=ge;It.prototype.saturate=function(r){void 0===r&&(r=1);var e=this.lch();return e[1]+=Rt.Kn*r,e[1]<0&&(e[1]=0),new It(e,"lch").alpha(this.alpha(),!0)},It.prototype.desaturate=function(r){return void 0===r&&(r=1),this.saturate(-r)};var Gt=g,Bt=l.type;Gt.prototype.set=function(r,e,n){void 0===n&&(n=!1);var t=r.split("."),a=t[0],o=t[1],f=this[a]();if(o){var u=a.indexOf(o)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==Bt(e))switch(e.charAt(0)){case"+":case"-":f[u]+=+e;break;case"*":f[u]*=+e.substr(1);break;case"/":f[u]/=+e.substr(1);break;default:f[u]=+e}else{if("number"!==Bt(e))throw new Error("unsupported value for Color.set");f[u]=e}var c=new Gt(f,a);return n?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+o+" in mode "+a)}return f};var St=g;At.rgb=function(r,e,n){var t=r._rgb,a=e._rgb;return new St(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"rgb")};var Dt=g,Tt=Math.sqrt,Yt=Math.pow;At.lrgb=function(r,e,n){var t=r._rgb,a=t[0],o=t[1],f=t[2],u=e._rgb,c=u[0],i=u[1],l=u[2];return new Dt(Tt(Yt(a,2)*(1-n)+Yt(c,2)*n),Tt(Yt(o,2)*(1-n)+Yt(i,2)*n),Tt(Yt(f,2)*(1-n)+Yt(l,2)*n),"rgb")};var $t=g;At.lab=function(r,e,n){var t=r.lab(),a=e.lab();return new $t(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"lab")};var zt=g,Ht=function(r,e,n,t){var a,o,f,u,c,i,l,s,h,d,b,p,v;return"hsl"===t?(f=r.hsl(),u=e.hsl()):"hsv"===t?(f=r.hsv(),u=e.hsv()):"hcg"===t?(f=r.hcg(),u=e.hcg()):"hsi"===t?(f=r.hsi(),u=e.hsi()):"lch"===t||"hcl"===t?(t="hcl",f=r.hcl(),u=e.hcl()):"oklch"===t&&(f=r.oklch().reverse(),u=e.oklch().reverse()),"h"!==t.substr(0,1)&&"oklch"!==t||(c=(a=f)[0],l=a[1],h=a[2],i=(o=u)[0],s=o[1],d=o[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?p=Number.NaN:(p=i,1!=h&&0!=h||"hsv"==t||(b=s)):(p=c,1!=d&&0!=d||"hsv"==t||(b=l)):p=c+n*(i>c&&i-c>180?i-(c+360):i180?i+360-c:i-c),void 0===b&&(b=l+n*(s-l)),v=h+n*(d-h),new zt("oklch"===t?[v,b,p]:[p,b,v],t)},Xt=Ht,Kt=function(r,e,n){return Xt(r,e,n,"lch")};At.lch=Kt,At.hcl=Kt;var Ut=g;At.num=function(r,e,n){var t=r.num(),a=e.num();return new Ut(t+n*(a-t),"num")};var Vt=Ht;At.hcg=function(r,e,n){return Vt(r,e,n,"hcg")};var Wt=Ht;At.hsi=function(r,e,n){return Wt(r,e,n,"hsi")};var Zt=Ht;At.hsl=function(r,e,n){return Zt(r,e,n,"hsl")};var Jt=Ht;At.hsv=function(r,e,n){return Jt(r,e,n,"hsv")};var Qt=g;At.oklab=function(r,e,n){var t=r.oklab(),a=e.oklab();return new Qt(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"oklab")};var ra=Ht;At.oklch=function(r,e,n){return ra(r,e,n,"oklch")};var ea=g,na=l.clip_rgb,ta=Math.pow,aa=Math.sqrt,oa=Math.PI,fa=Math.cos,ua=Math.sin,ca=Math.atan2,ia=function(r,e){for(var n=r.length,t=[0,0,0,0],a=0;a.9999999&&(t[3]=1),new ea(na(t))},la=y,sa=l.type,ha=Math.pow,da=function(r){var e="rgb",n=la("#ccc"),t=0,a=[0,1],o=[],f=[0,0],u=!1,c=[],i=!1,l=0,s=1,h=!1,d={},b=!0,p=1,v=function(r){if((r=r||["#fff","#000"])&&"string"===sa(r)&&la.brewer&&la.brewer[r.toLowerCase()]&&(r=la.brewer[r.toLowerCase()]),"array"===sa(r)){1===r.length&&(r=[r[0],r[0]]),r=r.slice(0);for(var e=0;e2?function(r){if(null!=u){for(var e=u.length-1,n=0;n=u[n];)n++;return n-1}return 0}(r)/(u.length-2):s!==l?(r-l)/(s-l):1,i=m(i),t||(i=g(i)),1!==p&&(i=ha(i,p)),i=f[0]+i*(1-f[0]-f[1]),i=Math.min(1,Math.max(0,i));var h=Math.floor(1e4*i);if(b&&d[h])a=d[h];else{if("array"===sa(c))for(var v=0;v=y&&v===o.length-1){a=c[v];break}if(i>y&&i2){var i=r.map((function(e,n){return n/(r.length-1)})),h=r.map((function(r){return(r-l)/(s-l)}));h.every((function(r,e){return i[e]===r}))||(m=function(r){if(r<=0||r>=1)return r;for(var e=0;r>=h[e+1];)e++;var n=(r-h[e])/(h[e+1]-h[e]);return i[e]+n*(i[e+1]-i[e])})}}return a=[l,s],k},k.mode=function(r){return arguments.length?(e=r,w(),k):e},k.range=function(r,e){return v(r),k},k.out=function(r){return i=r,k},k.spread=function(r){return arguments.length?(t=r,k):t},k.correctLightness=function(r){return null==r&&(r=!0),h=r,w(),g=h?function(r){for(var e=y(0,!0).lab()[0],n=y(1,!0).lab()[0],t=e>n,a=y(r,!0).lab()[0],o=e+(n-e)*r,f=a-o,u=0,c=1,i=20;Math.abs(f)>.01&&i-- >0;)t&&(f*=-1),f<0?(u=r,r+=.5*(c-r)):(c=r,r+=.5*(u-r)),f=(a=y(r,!0).lab()[0])-o;return r}:function(r){return r},k},k.padding=function(r){return null!=r?("number"===sa(r)&&(r=[r,r]),f=r,k):f},k.colors=function(e,n){arguments.length<2&&(n="hex");var t=[];if(0===arguments.length)t=c.slice(0);else if(1===e)t=[k(.5)];else if(e>1){var o=a[0],f=a[1]-o;t=function(r,e,n){for(var t=[],a=ro;a?f++:f--)t.push(f);return t}(0,e,!1).map((function(r){return k(o+r/(e-1)*f)}))}else{r=[];var i=[];if(u&&u.length>2)for(var l=1,s=u.length,h=1<=s;h?ls;h?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;t=i.map((function(r){return k(r)}))}return la[n]&&(t=t.map((function(r){return r[n]()}))),t},k.cache=function(r){return null!=r?(b=r,k):b},k.gamma=function(r){return null!=r?(p=r,k):p},k.nodata=function(r){return null!=r?(n=la(r),k):n},k};var ba=g,pa=da,va=y,ga=function(r,e,n){if(!ga[n])throw new Error("unknown blend mode "+n);return ga[n](r,e)},ma=function(r){return function(e,n){var t=va(n).rgb(),a=va(e).rgb();return va.rgb(r(t,a))}},ya=function(r){return function(e,n){var t=[];return t[0]=r(e[0],n[0]),t[1]=r(e[1],n[1]),t[2]=r(e[2],n[2]),t}};ga.normal=ma(ya((function(r){return r}))),ga.multiply=ma(ya((function(r,e){return r*e/255}))),ga.screen=ma(ya((function(r,e){return 255*(1-(1-r/255)*(1-e/255))}))),ga.overlay=ma(ya((function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))}))),ga.darken=ma(ya((function(r,e){return r>e?e:r}))),ga.lighten=ma(ya((function(r,e){return r>e?r:e}))),ga.dodge=ma(ya((function(r,e){return 255===r||(r=e/255*255/(1-r/255))>255?255:r}))),ga.burn=ma(ya((function(r,e){return 255*(1-(1-e/255)/(r/255))})));for(var wa=ga,ka=l.type,Ma=l.clip_rgb,_a=l.TWOPI,Na=Math.pow,xa=Math.sin,Ea=Math.cos,Aa=y,Ca=g,La=Math.floor,Oa=Math.random,Pa=f,Fa=Math.log,ja=Math.pow,qa=Math.floor,Ia=Math.abs,Ra=function(r,e){void 0===e&&(e=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Pa(r)&&(r=Object.values(r)),r.forEach((function(r){e&&"object"===Pa(r)&&(r=r[e]),null==r||isNaN(r)||(n.values.push(r),n.sum+=r,rn.max&&(n.max=r),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(r,e){return Ga(n,r,e)},n},Ga=function(r,e,n){void 0===e&&(e="equal"),void 0===n&&(n=7),"array"==Pa(r)&&(r=Ra(r));var t=r.min,a=r.max,o=r.values.sort((function(r,e){return r-e}));if(1===n)return[t,a];var f=[];if("c"===e.substr(0,1)&&(f.push(t),f.push(a)),"e"===e.substr(0,1)){f.push(t);for(var u=1;u 0");var c=Math.LOG10E*Fa(t),i=Math.LOG10E*Fa(a);f.push(t);for(var l=1;l200&&(y=!1)}for(var I={},R=0;R=360;)b-=360;f[d]=b}else f[d]=f[d]/u[d];return h/=t,new ea(f,e).alpha(h>.99999?1:h,!0)},uo.bezier=function(r){var e=function(r){var e,n,t,a,o,f,u;if(2===(r=r.map((function(r){return new ba(r)}))).length)e=r.map((function(r){return r.lab()})),o=e[0],f=e[1],a=function(r){var e=[0,1,2].map((function(e){return o[e]+r*(f[e]-o[e])}));return new ba(e,"lab")};else if(3===r.length)n=r.map((function(r){return r.lab()})),o=n[0],f=n[1],u=n[2],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*o[e]+2*(1-r)*r*f[e]+r*r*u[e]}));return new ba(e,"lab")};else if(4===r.length){var c;t=r.map((function(r){return r.lab()})),o=t[0],f=t[1],u=t[2],c=t[3],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*(1-r)*o[e]+3*(1-r)*(1-r)*r*f[e]+3*(1-r)*r*r*u[e]+r*r*r*c[e]}));return new ba(e,"lab")}}else{if(!(r.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,s;i=r.map((function(r){return r.lab()})),s=r.length-1,l=function(r){for(var e=[1,1],n=1;nt?(n+.05)/(t+.05):(t+.05)/(n+.05)},uo.deltaE=function(r,e,n,t,a){void 0===n&&(n=1),void 0===t&&(t=1),void 0===a&&(a=1);var o=function(r){return 360*r/(2*Wa)},f=function(r){return 2*Wa*r/360};r=new Da(r),e=new Da(e);var u=Array.from(r.lab()),c=u[0],i=u[1],l=u[2],s=Array.from(e.lab()),h=s[0],d=s[1],b=s[2],p=(c+h)/2,v=(Ta(Ya(i,2)+Ya(l,2))+Ta(Ya(d,2)+Ya(b,2)))/2,g=.5*(1-Ta(Ya(v,7)/(Ya(v,7)+Ya(25,7)))),m=i*(1+g),y=d*(1+g),w=Ta(Ya(m,2)+Ya(l,2)),k=Ta(Ya(y,2)+Ya(b,2)),M=(w+k)/2,_=o(Ha(l,m)),N=o(Ha(b,y)),x=_>=0?_:_+360,E=N>=0?N:N+360,A=Xa(x-E)>180?(x+E+360)/2:(x+E)/2,C=1-.17*Ka(f(A-30))+.24*Ka(f(2*A))+.32*Ka(f(3*A+6))-.2*Ka(f(4*A-63)),L=E-x;L=Xa(L)<=180?L:E<=x?L+360:L-360,L=2*Ta(w*k)*Ua(f(L)/2);var O=h-c,P=k-w,F=1+.015*Ya(p-50,2)/Ta(20+Ya(p-50,2)),j=1+.045*M,q=1+.015*M*C,I=30*Va(-Ya((A-275)/25,2)),R=-2*Ta(Ya(M,7)/(Ya(M,7)+Ya(25,7)))*Ua(2*f(I)),G=Ta(Ya(O/(n*F),2)+Ya(P/(t*j),2)+Ya(L/(a*q),2)+R*(P/(t*j))*(L/(a*q)));return za(0,$a(100,G))},uo.distance=function(r,e,n){void 0===n&&(n="lab"),r=new Za(r),e=new Za(e);var t=r.get(n),a=e.get(n),o=0;for(var f in t){var u=(t[f]||0)-(a[f]||0);o+=u*u}return Math.sqrt(o)},uo.limits=Ba.limits,uo.valid=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];try{return new(Function.prototype.bind.apply(Ja,[null].concat(r))),!0}catch(r){return!1}},uo.scales=eo,uo.colors=hn,uo.brewer=fo,uo}()}},e={};function n(t){var a=e[t];if(void 0!==a)return a.exports;var o=e[t]={exports:{}};return r[t].call(o.exports,o,o.exports,n),o.exports}n.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return n.d(e,{a:e}),e},n.d=(r,e)=>{for(var t in e)n.o(e,t)&&!n.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},n.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{"use strict";var r=n(768),e=n.n(r);console.log("\n▄▄▄ ▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄ \n█ █ █ █ █ ▄ █ █ █ █ █ █ █\n█ █▄█ █ ▄ █ █ █ █ █ ▄▄▄▄▄█ ▄ █ █▄█ █\n█ ▄█ █▄█ █ █▄▄█▄█ █▄▄▄▄▄█ █ █ █ █\n█ █▄█ █ ▄▄ █▄▄▄▄▄ █ █▄█ █ ▄ █\n█ ▄ █ ▄ █ █ █ █▄▄▄▄▄█ █ █ █ █ █\n█▄▄▄█ █▄█▄▄█ █▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄█ █▄▄█\n \n▄▄▄ ▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ \n█ █ █ █ █ █ █ █\n█ █▄█ █ ▄ █ █ █▄ ▄█\n█ ▄█ █▄█ █ █ █ █ \n█ █▄█ █ █▄▄▄ █ █ \n█ ▄ █ ▄ █ █ █ █ \n█▄▄▄█ █▄█▄▄█ █▄▄█▄▄▄▄▄▄▄█ █▄▄▄█ \n \nHi there! 👋 I see you opened up the dev tools.\n\nThis site is powered by Jekyll and GitHub pages and is a simple interface for me to jot down my thoughts in markdown.\n\nIf you're interested in connecting, please reach out to me via LinkedIn at:\nhttp://linkedin.com/in/kaltkarson\n"),document.querySelectorAll("pre.highlight").forEach((function(r){!function(r){var e=document.createElement("button");e.innerHTML='\n \n \n \n \n ',e.classList.add("copy-button"),e.addEventListener("click",(function(){var n,t,a=r.querySelector("code");a&&(n=a.innerText,(t=document.createElement("textarea")).value=n,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),e.innerHTML='\n \n \n \n \n ')})),r.style.position="relative",r.appendChild(e)}(r)})),function(){var r,n=document.createElement("input");n.id="theme-button",n.type="color";var t=document.createElement("div");t.id="theme-button-wrapper",null===(r=document.querySelector("main"))||void 0===r||r.appendChild(t),t.appendChild(n),t.style.backgroundColor="var(--accent-color)",n.onchange=function(){t.style.backgroundColor="var(--accent-color)",function(r){try{if(o=r,!e().valid(o))return!1;var n=function(r){var e=r.luminance();e<.25?r=r.luminance(.25):e>.75&&(r=r.luminance(.75));var n=r.get("hsl.s");return r.set("hsl.s",Math.min(n,.85))}(e()(r)),t=function(r){var n=r.set("hsl.s",1);if(e().contrast(n,r)>=1.75)return n;for(var t=1;t<=10;t++){var a=n.set("hsl.l",n.get("hsl.l")+.1*t);if(e().contrast(a,r)>=1.75)return a}return n}(n),a=function(r){return r.luminance()>.75}(t)?"underline":"none";return function(r,e){var n=r.hex(),t=e.hex();localStorage.setItem("ACCENT_COLOR",n),localStorage.setItem("LINK_COLOR",t)}(n,t),function(r,e,n){var t=r.hex(),a=e.hex();document.documentElement.style.setProperty("--accent-color",t),document.documentElement.style.setProperty("--accent-color-contrast",a),document.documentElement.style.setProperty("--accent-decoration",n)}(n,t,a),!0}catch(r){return console.error(r),!1}var o}(n.value)}}()})()})(); \ No newline at end of file +(()=>{var r={768:function(r){r.exports=function(){"use strict";for(var r=function(r,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),rn?n:r},e=r,n={},t=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];t255)&&(r._clipped=!0),r[n]=e(r[n],0,255)):3===n&&(r[n]=e(r[n],0,1));return r},limit:r,type:f,unpack:function(r,e){return void 0===e&&(e=null),r.length>=3?Array.prototype.slice.call(r):"object"==u(r[0])&&e?e.split("").filter((function(e){return void 0!==r[0][e]})).map((function(e){return r[0][e]})):r[0]},last:function(r){if(r.length<2)return null;var e=r.length-1;return"string"==c(r[e])?r[e].toLowerCase():null},PI:i,TWOPI:2*i,PITHIRD:i/3,DEG2RAD:i/180,RAD2DEG:180/i},s={format:{},autodetect:[]},h=l.last,d=l.clip_rgb,b=l.type,p=s,g=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=this;if("object"===b(r[0])&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];var t=h(r),a=!1;if(!t){a=!0,p.sorted||(p.autodetect=p.autodetect.sort((function(r,e){return e.p-r.p})),p.sorted=!0);for(var o=0,f=p.autodetect;o4?r[4]:1;return 1===o?[0,0,0,f]:[n>=1?0:255*(1-n)*(1-o),t>=1?0:255*(1-t)*(1-o),a>=1?0:255*(1-a)*(1-o),f]},x=y,E=v,A=s,C=l.unpack,L=l.type,O=M;E.prototype.cmyk=function(){return O(this._rgb)},x.cmyk=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(E,[null].concat(r,["cmyk"])))},A.format.cmyk=N,A.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=C(r,"cmyk"),"array"===L(r)&&4===r.length)return"cmyk"}});var P=l.unpack,F=l.last,j=function(r){return Math.round(100*r)/100},q=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=P(r,"hsla"),t=F(r)||"lsa";return n[0]=j(n[0]||0),n[1]=j(100*n[1])+"%",n[2]=j(100*n[2])+"%","hsla"===t||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,t="hsla"):n.length=3,t+"("+n.join(",")+")"},I=l.unpack,R=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=I(r,"rgba"))[0],t=r[1],a=r[2];n/=255,t/=255,a/=255;var o,f,u=Math.min(n,t,a),c=Math.max(n,t,a),i=(c+u)/2;return c===u?(o=0,f=Number.NaN):o=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),n==c?f=(t-a)/(c-u):t==c?f=2+(a-n)/(c-u):a==c&&(f=4+(n-t)/(c-u)),(f*=60)<0&&(f+=360),r.length>3&&void 0!==r[3]?[f,o,i,r[3]]:[f,o,i]},G=l.unpack,B=l.last,S=q,D=R,T=Math.round,Y=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=G(r,"rgba"),t=B(r)||"rgb";return"hsl"==t.substr(0,3)?S(D(n),t):(n[0]=T(n[0]),n[1]=T(n[1]),n[2]=T(n[2]),("rgba"===t||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,t="rgba"),t+"("+n.slice(0,"rgb"===t?3:4).join(",")+")")},$=l.unpack,z=Math.round,H=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];var t,a,o,f=(e=$(e,"hsl"))[0],u=e[1],c=e[2];if(0===u)t=a=o=255*c;else{var i=[0,0,0],l=[0,0,0],s=c<.5?c*(1+u):c+u-c*u,h=2*c-s,d=f/360;i[0]=d+1/3,i[1]=d,i[2]=d-1/3;for(var b=0;b<3;b++)i[b]<0&&(i[b]+=1),i[b]>1&&(i[b]-=1),6*i[b]<1?l[b]=h+6*(s-h)*i[b]:2*i[b]<1?l[b]=s:3*i[b]<2?l[b]=h+(s-h)*(2/3-i[b])*6:l[b]=h;t=(r=[z(255*l[0]),z(255*l[1]),z(255*l[2])])[0],a=r[1],o=r[2]}return e.length>3?[t,a,o,e[3]]:[t,a,o,1]},X=H,K=s,U=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,V=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,W=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Z=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,J=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Q=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,rr=Math.round,er=function(r){var e;if(r=r.toLowerCase().trim(),K.format.named)try{return K.format.named(r)}catch(r){}if(e=r.match(U)){for(var n=e.slice(1,4),t=0;t<3;t++)n[t]=+n[t];return n[3]=1,n}if(e=r.match(V)){for(var a=e.slice(1,5),o=0;o<4;o++)a[o]=+a[o];return a}if(e=r.match(W)){for(var f=e.slice(1,4),u=0;u<3;u++)f[u]=rr(2.55*f[u]);return f[3]=1,f}if(e=r.match(Z)){for(var c=e.slice(1,5),i=0;i<3;i++)c[i]=rr(2.55*c[i]);return c[3]=+c[3],c}if(e=r.match(J)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var s=X(l);return s[3]=1,s}if(e=r.match(Q)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=X(h);return d[3]=+e[4],d}};er.test=function(r){return U.test(r)||V.test(r)||W.test(r)||Z.test(r)||J.test(r)||Q.test(r)};var nr=y,tr=v,ar=s,or=l.type,fr=Y,ur=er;tr.prototype.css=function(r){return fr(this._rgb,r)},nr.css=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(tr,[null].concat(r,["css"])))},ar.format.css=ur,ar.autodetect.push({p:5,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===or(r)&&ur.test(r))return"css"}});var cr=v,ir=y,lr=l.unpack;s.format.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=lr(r,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},ir.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(cr,[null].concat(r,["gl"])))},cr.prototype.gl=function(){var r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};var sr=l.unpack,hr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=sr(r,"rgb"),a=t[0],o=t[1],f=t[2],u=Math.min(a,o,f),c=Math.max(a,o,f),i=c-u,l=100*i/255,s=u/(255-i)*100;return 0===i?n=Number.NaN:(a===c&&(n=(o-f)/i),o===c&&(n=2+(f-a)/i),f===c&&(n=4+(a-o)/i),(n*=60)<0&&(n+=360)),[n,l,s]},dr=l.unpack,br=Math.floor,pr=function(){for(var r,e,n,t,a,o,f=[],u=arguments.length;u--;)f[u]=arguments[u];var c,i,l,s=(f=dr(f,"hcg"))[0],h=f[1],d=f[2];d*=255;var b=255*h;if(0===h)c=i=l=d;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var p=br(s/=60),g=s-p,v=d*(1-h),m=v+b*(1-g),y=v+b*g,w=v+b;switch(p){case 0:c=(r=[w,y,v])[0],i=r[1],l=r[2];break;case 1:c=(e=[m,w,v])[0],i=e[1],l=e[2];break;case 2:c=(n=[v,w,y])[0],i=n[1],l=n[2];break;case 3:c=(t=[v,m,w])[0],i=t[1],l=t[2];break;case 4:c=(a=[y,v,w])[0],i=a[1],l=a[2];break;case 5:c=(o=[w,v,m])[0],i=o[1],l=o[2]}}return[c,i,l,f.length>3?f[3]:1]},gr=l.unpack,vr=l.type,mr=y,yr=v,wr=s,kr=hr;yr.prototype.hcg=function(){return kr(this._rgb)},mr.hcg=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(yr,[null].concat(r,["hcg"])))},wr.format.hcg=pr,wr.autodetect.push({p:1,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=gr(r,"hcg"),"array"===vr(r)&&3===r.length)return"hcg"}});var Mr=l.unpack,_r=l.last,Nr=Math.round,xr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Mr(r,"rgba"),t=n[0],a=n[1],o=n[2],f=n[3],u=_r(r)||"auto";void 0===f&&(f=1),"auto"===u&&(u=f<1?"rgba":"rgb");var c="000000"+((t=Nr(t))<<16|(a=Nr(a))<<8|(o=Nr(o))).toString(16);c=c.substr(c.length-6);var i="0"+Nr(255*f).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},Er=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ar=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Cr=function(r){if(r.match(Er)){4!==r.length&&7!==r.length||(r=r.substr(1)),3===r.length&&(r=(r=r.split(""))[0]+r[0]+r[1]+r[1]+r[2]+r[2]);var e=parseInt(r,16);return[e>>16,e>>8&255,255&e,1]}if(r.match(Ar)){5!==r.length&&9!==r.length||(r=r.substr(1)),4===r.length&&(r=(r=r.split(""))[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);var n=parseInt(r,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+r)},Lr=y,Or=v,Pr=l.type,Fr=s,jr=xr;Or.prototype.hex=function(r){return jr(this._rgb,r)},Lr.hex=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Or,[null].concat(r,["hex"])))},Fr.format.hex=Cr,Fr.autodetect.push({p:4,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===Pr(r)&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var qr=l.unpack,Ir=l.TWOPI,Rr=Math.min,Gr=Math.sqrt,Br=Math.acos,Sr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=qr(r,"rgb"),a=t[0],o=t[1],f=t[2],u=Rr(a/=255,o/=255,f/=255),c=(a+o+f)/3,i=c>0?1-u/c:0;return 0===i?n=NaN:(n=(a-o+(a-f))/2,n/=Gr((a-o)*(a-o)+(a-f)*(o-f)),n=Br(n),f>o&&(n=Ir-n),n/=Ir),[360*n,i,c]},Dr=l.unpack,Tr=l.limit,Yr=l.TWOPI,$r=l.PITHIRD,zr=Math.cos,Hr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,o=(r=Dr(r,"hsi"))[0],f=r[1],u=r[2];return isNaN(o)&&(o=0),isNaN(f)&&(f=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?t=1-((a=(1-f)/3)+(n=(1+f*zr(Yr*o)/zr($r-Yr*o))/3)):o<2/3?a=1-((n=(1-f)/3)+(t=(1+f*zr(Yr*(o-=1/3))/zr($r-Yr*o))/3)):n=1-((t=(1-f)/3)+(a=(1+f*zr(Yr*(o-=2/3))/zr($r-Yr*o))/3)),[255*(n=Tr(u*n*3)),255*(t=Tr(u*t*3)),255*(a=Tr(u*a*3)),r.length>3?r[3]:1]},Xr=l.unpack,Kr=l.type,Ur=y,Vr=v,Wr=s,Zr=Sr;Vr.prototype.hsi=function(){return Zr(this._rgb)},Ur.hsi=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Vr,[null].concat(r,["hsi"])))},Wr.format.hsi=Hr,Wr.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Xr(r,"hsi"),"array"===Kr(r)&&3===r.length)return"hsi"}});var Jr=l.unpack,Qr=l.type,re=y,ee=v,ne=s,te=R;ee.prototype.hsl=function(){return te(this._rgb)},re.hsl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(ee,[null].concat(r,["hsl"])))},ne.format.hsl=H,ne.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Jr(r,"hsl"),"array"===Qr(r)&&3===r.length)return"hsl"}});var ae=l.unpack,oe=Math.min,fe=Math.max,ue=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,o=(r=ae(r,"rgb"))[0],f=r[1],u=r[2],c=oe(o,f,u),i=fe(o,f,u),l=i-c;return a=i/255,0===i?(n=Number.NaN,t=0):(t=l/i,o===i&&(n=(f-u)/l),f===i&&(n=2+(u-o)/l),u===i&&(n=4+(o-f)/l),(n*=60)<0&&(n+=360)),[n,t,a]},ce=l.unpack,ie=Math.floor,le=function(){for(var r,e,n,t,a,o,f=[],u=arguments.length;u--;)f[u]=arguments[u];var c,i,l,s=(f=ce(f,"hsv"))[0],h=f[1],d=f[2];if(d*=255,0===h)c=i=l=d;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var b=ie(s/=60),p=s-b,g=d*(1-h),v=d*(1-h*p),m=d*(1-h*(1-p));switch(b){case 0:c=(r=[d,m,g])[0],i=r[1],l=r[2];break;case 1:c=(e=[v,d,g])[0],i=e[1],l=e[2];break;case 2:c=(n=[g,d,m])[0],i=n[1],l=n[2];break;case 3:c=(t=[g,v,d])[0],i=t[1],l=t[2];break;case 4:c=(a=[m,g,d])[0],i=a[1],l=a[2];break;case 5:c=(o=[d,g,v])[0],i=o[1],l=o[2]}}return[c,i,l,f.length>3?f[3]:1]},se=l.unpack,he=l.type,de=y,be=v,pe=s,ge=ue;be.prototype.hsv=function(){return ge(this._rgb)},de.hsv=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(be,[null].concat(r,["hsv"])))},pe.format.hsv=le,pe.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=se(r,"hsv"),"array"===he(r)&&3===r.length)return"hsv"}});var ve={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},me=ve,ye=l.unpack,we=Math.pow,ke=function(r){return(r/=255)<=.04045?r/12.92:we((r+.055)/1.055,2.4)},Me=function(r){return r>me.t3?we(r,1/3):r/me.t2+me.t0},_e=function(r,e,n){return r=ke(r),e=ke(e),n=ke(n),[Me((.4124564*r+.3575761*e+.1804375*n)/me.Xn),Me((.2126729*r+.7151522*e+.072175*n)/me.Yn),Me((.0193339*r+.119192*e+.9503041*n)/me.Zn)]},Ne=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=ye(r,"rgb"),t=n[0],a=n[1],o=n[2],f=_e(t,a,o),u=f[0],c=f[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-f[2])]},xe=ve,Ee=l.unpack,Ae=Math.pow,Ce=function(r){return 255*(r<=.00304?12.92*r:1.055*Ae(r,1/2.4)-.055)},Le=function(r){return r>xe.t1?r*r*r:xe.t2*(r-xe.t0)},Oe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,o=(r=Ee(r,"lab"))[0],f=r[1],u=r[2];return t=(o+16)/116,n=isNaN(f)?t:t+f/500,a=isNaN(u)?t:t-u/200,t=xe.Yn*Le(t),n=xe.Xn*Le(n),a=xe.Zn*Le(a),[Ce(3.2404542*n-1.5371385*t-.4985314*a),Ce(-.969266*n+1.8760108*t+.041556*a),Ce(.0556434*n-.2040259*t+1.0572252*a),r.length>3?r[3]:1]},Pe=l.unpack,Fe=l.type,je=y,qe=v,Ie=s,Re=Ne;qe.prototype.lab=function(){return Re(this._rgb)},je.lab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(qe,[null].concat(r,["lab"])))},Ie.format.lab=Oe,Ie.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pe(r,"lab"),"array"===Fe(r)&&3===r.length)return"lab"}});var Ge=l.unpack,Be=l.RAD2DEG,Se=Math.sqrt,De=Math.atan2,Te=Math.round,Ye=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Ge(r,"lab"),t=n[0],a=n[1],o=n[2],f=Se(a*a+o*o),u=(De(o,a)*Be+360)%360;return 0===Te(1e4*f)&&(u=Number.NaN),[t,f,u]},$e=l.unpack,ze=Ne,He=Ye,Xe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=$e(r,"rgb"),t=n[0],a=n[1],o=n[2],f=ze(t,a,o),u=f[0],c=f[1],i=f[2];return He(u,c,i)},Ke=l.unpack,Ue=l.DEG2RAD,Ve=Math.sin,We=Math.cos,Ze=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Ke(r,"lch"),t=n[0],a=n[1],o=n[2];return isNaN(o)&&(o=0),[t,We(o*=Ue)*a,Ve(o)*a]},Je=l.unpack,Qe=Ze,rn=Oe,en=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Je(r,"lch"))[0],t=r[1],a=r[2],o=Qe(n,t,a),f=o[0],u=o[1],c=o[2],i=rn(f,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},nn=l.unpack,tn=en,an=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=nn(r,"hcl").reverse();return tn.apply(void 0,n)},on=l.unpack,fn=l.type,un=y,cn=v,ln=s,sn=Xe;cn.prototype.lch=function(){return sn(this._rgb)},cn.prototype.hcl=function(){return sn(this._rgb).reverse()},un.lch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(cn,[null].concat(r,["lch"])))},un.hcl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(cn,[null].concat(r,["hcl"])))},ln.format.lch=en,ln.format.hcl=an,["lch","hcl"].forEach((function(r){return ln.autodetect.push({p:2,test:function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];if(e=on(e,r),"array"===fn(e)&&3===e.length)return r}})}));var hn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},dn=s,bn=l.type,pn=hn,gn=Cr,vn=xr;v.prototype.name=function(){for(var r=vn(this._rgb,"rgb"),e=0,n=Object.keys(pn);e0;)e[n]=arguments[n+1];if(!e.length&&"string"===bn(r)&&pn[r.toLowerCase()])return"named"}});var mn=l.unpack,yn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=mn(r,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},wn=l.type,kn=y,Mn=v,_n=s,Nn=l.type,xn=yn;Mn.prototype.num=function(){return xn(this._rgb)},kn.num=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Mn,[null].concat(r,["num"])))},_n.format.num=function(r){if("number"==wn(r)&&r>=0&&r<=16777215)return[r>>16,r>>8&255,255&r,1];throw new Error("unknown num color: "+r)},_n.autodetect.push({p:5,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(1===r.length&&"number"===Nn(r[0])&&r[0]>=0&&r[0]<=16777215)return"num"}});var En=y,An=v,Cn=s,Ln=l.unpack,On=l.type,Pn=Math.round;An.prototype.rgb=function(r){return void 0===r&&(r=!0),!1===r?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Pn)},An.prototype.rgba=function(r){return void 0===r&&(r=!0),this._rgb.slice(0,4).map((function(e,n){return n<3?!1===r?e:Pn(e):e}))},En.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(An,[null].concat(r,["rgb"])))},Cn.format.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Ln(r,"rgba");return void 0===n[3]&&(n[3]=1),n},Cn.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Ln(r,"rgba"),"array"===On(r)&&(3===r.length||4===r.length&&"number"==On(r[3])&&r[3]>=0&&r[3]<=1))return"rgb"}});var Fn=Math.log,jn=function(r){var e,n,t,a=r/100;return a<66?(e=255,n=a<6?0:-155.25485562709179-.44596950469579133*(n=a-2)+104.49216199393888*Fn(n),t=a<20?0:.8274096064007395*(t=a-10)-254.76935184120902+115.67994401066147*Fn(t)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*Fn(e),n=325.4494125711974+.07943456536662342*(n=a-50)-28.0852963507957*Fn(n),t=255),[e,n,t,1]},qn=jn,In=l.unpack,Rn=Math.round,Gn=y,Bn=v,Sn=s,Dn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];for(var n,t=In(r,"rgb"),a=t[0],o=t[2],f=1e3,u=4e4;u-f>.4;){var c=qn(n=.5*(u+f));c[2]/c[0]>=o/a?u=n:f=n}return Rn(n)};Bn.prototype.temp=Bn.prototype.kelvin=Bn.prototype.temperature=function(){return Dn(this._rgb)},Gn.temp=Gn.kelvin=Gn.temperature=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Bn,[null].concat(r,["temp"])))},Sn.format.temp=Sn.format.kelvin=Sn.format.temperature=jn;var Tn=l.unpack,Yn=Math.cbrt,$n=Math.pow,zn=Math.sign,Hn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Tn(r,"rgb"),t=n[0],a=n[1],o=n[2],f=[Xn(t/255),Xn(a/255),Xn(o/255)],u=f[0],c=f[1],i=f[2],l=Yn(.4122214708*u+.5363325363*c+.0514459929*i),s=Yn(.2119034982*u+.6806995451*c+.1073969566*i),h=Yn(.0883024619*u+.2817188376*c+.6299787005*i);return[.2104542553*l+.793617785*s-.0040720468*h,1.9779984951*l-2.428592205*s+.4505937099*h,.0259040371*l+.7827717662*s-.808675766*h]};function Xn(r){var e=Math.abs(r);return e<.04045?r/12.92:(zn(r)||1)*$n((e+.055)/1.055,2.4)}var Kn=l.unpack,Un=Math.pow,Vn=Math.sign,Wn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Kn(r,"lab"))[0],t=r[1],a=r[2],o=Un(n+.3963377774*t+.2158037573*a,3),f=Un(n-.1055613458*t-.0638541728*a,3),u=Un(n-.0894841775*t-1.291485548*a,3);return[255*Zn(4.0767416621*o-3.3077115913*f+.2309699292*u),255*Zn(-1.2684380046*o+2.6097574011*f-.3413193965*u),255*Zn(-.0041960863*o-.7034186147*f+1.707614701*u),r.length>3?r[3]:1]};function Zn(r){var e=Math.abs(r);return e>.0031308?(Vn(r)||1)*(1.055*Un(e,1/2.4)-.055):12.92*r}var Jn=l.unpack,Qn=l.type,rt=y,et=v,nt=s,tt=Hn;et.prototype.oklab=function(){return tt(this._rgb)},rt.oklab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(et,[null].concat(r,["oklab"])))},nt.format.oklab=Wn,nt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Jn(r,"oklab"),"array"===Qn(r)&&3===r.length)return"oklab"}});var at=l.unpack,ot=Hn,ft=Ye,ut=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=at(r,"rgb"),t=n[0],a=n[1],o=n[2],f=ot(t,a,o),u=f[0],c=f[1],i=f[2];return ft(u,c,i)},ct=l.unpack,it=Ze,lt=Wn,st=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=ct(r,"lch"))[0],t=r[1],a=r[2],o=it(n,t,a),f=o[0],u=o[1],c=o[2],i=lt(f,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},ht=l.unpack,dt=l.type,bt=y,pt=v,gt=s,vt=ut;pt.prototype.oklch=function(){return vt(this._rgb)},bt.oklch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(pt,[null].concat(r,["oklch"])))},gt.format.oklch=st,gt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ht(r,"oklch"),"array"===dt(r)&&3===r.length)return"oklch"}});var mt=v,yt=l.type;mt.prototype.alpha=function(r,e){return void 0===e&&(e=!1),void 0!==r&&"number"===yt(r)?e?(this._rgb[3]=r,this):new mt([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]},v.prototype.clipped=function(){return this._rgb._clipped||!1};var wt=v,kt=ve;wt.prototype.darken=function(r){void 0===r&&(r=1);var e=this.lab();return e[0]-=kt.Kn*r,new wt(e,"lab").alpha(this.alpha(),!0)},wt.prototype.brighten=function(r){return void 0===r&&(r=1),this.darken(-r)},wt.prototype.darker=wt.prototype.darken,wt.prototype.brighter=wt.prototype.brighten,v.prototype.get=function(r){var e=r.split("."),n=e[0],t=e[1],a=this[n]();if(t){var o=n.indexOf(t)-("ok"===n.substr(0,2)?2:0);if(o>-1)return a[o];throw new Error("unknown channel "+t+" in mode "+n)}return a};var Mt=v,_t=l.type,Nt=Math.pow;Mt.prototype.luminance=function(r){if(void 0!==r&&"number"===_t(r)){if(0===r)return new Mt([0,0,0,this._rgb[3]],"rgb");if(1===r)return new Mt([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),n=20,t=function(e,a){var o=e.interpolate(a,.5,"rgb"),f=o.luminance();return Math.abs(r-f)<1e-7||!n--?o:f>r?t(e,o):t(o,a)},a=(e>r?t(new Mt([0,0,0]),this):t(this,new Mt([255,255,255]))).rgb();return new Mt(a.concat([this._rgb[3]]))}return xt.apply(void 0,this._rgb.slice(0,3))};var xt=function(r,e,n){return.2126*(r=Et(r))+.7152*(e=Et(e))+.0722*Et(n)},Et=function(r){return(r/=255)<=.03928?r/12.92:Nt((r+.055)/1.055,2.4)},At={},Ct=v,Lt=l.type,Ot=At,Pt=function(r,e,n){void 0===n&&(n=.5);for(var t=[],a=arguments.length-3;a-- >0;)t[a]=arguments[a+3];var o=t[0]||"lrgb";if(Ot[o]||t.length||(o=Object.keys(Ot)[0]),!Ot[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==Lt(r)&&(r=new Ct(r)),"object"!==Lt(e)&&(e=new Ct(e)),Ot[o](r,e,n).alpha(r.alpha()+n*(e.alpha()-r.alpha()))},Ft=v,jt=Pt;Ft.prototype.mix=Ft.prototype.interpolate=function(r,e){void 0===e&&(e=.5);for(var n=[],t=arguments.length-2;t-- >0;)n[t]=arguments[t+2];return jt.apply(void 0,[this,r,e].concat(n))};var qt=v;qt.prototype.premultiply=function(r){void 0===r&&(r=!1);var e=this._rgb,n=e[3];return r?(this._rgb=[e[0]*n,e[1]*n,e[2]*n,n],this):new qt([e[0]*n,e[1]*n,e[2]*n,n],"rgb")};var It=v,Rt=ve;It.prototype.saturate=function(r){void 0===r&&(r=1);var e=this.lch();return e[1]+=Rt.Kn*r,e[1]<0&&(e[1]=0),new It(e,"lch").alpha(this.alpha(),!0)},It.prototype.desaturate=function(r){return void 0===r&&(r=1),this.saturate(-r)};var Gt=v,Bt=l.type;Gt.prototype.set=function(r,e,n){void 0===n&&(n=!1);var t=r.split("."),a=t[0],o=t[1],f=this[a]();if(o){var u=a.indexOf(o)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==Bt(e))switch(e.charAt(0)){case"+":case"-":f[u]+=+e;break;case"*":f[u]*=+e.substr(1);break;case"/":f[u]/=+e.substr(1);break;default:f[u]=+e}else{if("number"!==Bt(e))throw new Error("unsupported value for Color.set");f[u]=e}var c=new Gt(f,a);return n?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+o+" in mode "+a)}return f};var St=v;At.rgb=function(r,e,n){var t=r._rgb,a=e._rgb;return new St(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"rgb")};var Dt=v,Tt=Math.sqrt,Yt=Math.pow;At.lrgb=function(r,e,n){var t=r._rgb,a=t[0],o=t[1],f=t[2],u=e._rgb,c=u[0],i=u[1],l=u[2];return new Dt(Tt(Yt(a,2)*(1-n)+Yt(c,2)*n),Tt(Yt(o,2)*(1-n)+Yt(i,2)*n),Tt(Yt(f,2)*(1-n)+Yt(l,2)*n),"rgb")};var $t=v;At.lab=function(r,e,n){var t=r.lab(),a=e.lab();return new $t(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"lab")};var zt=v,Ht=function(r,e,n,t){var a,o,f,u,c,i,l,s,h,d,b,p,g;return"hsl"===t?(f=r.hsl(),u=e.hsl()):"hsv"===t?(f=r.hsv(),u=e.hsv()):"hcg"===t?(f=r.hcg(),u=e.hcg()):"hsi"===t?(f=r.hsi(),u=e.hsi()):"lch"===t||"hcl"===t?(t="hcl",f=r.hcl(),u=e.hcl()):"oklch"===t&&(f=r.oklch().reverse(),u=e.oklch().reverse()),"h"!==t.substr(0,1)&&"oklch"!==t||(c=(a=f)[0],l=a[1],h=a[2],i=(o=u)[0],s=o[1],d=o[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?p=Number.NaN:(p=i,1!=h&&0!=h||"hsv"==t||(b=s)):(p=c,1!=d&&0!=d||"hsv"==t||(b=l)):p=c+n*(i>c&&i-c>180?i-(c+360):i180?i+360-c:i-c),void 0===b&&(b=l+n*(s-l)),g=h+n*(d-h),new zt("oklch"===t?[g,b,p]:[p,b,g],t)},Xt=Ht,Kt=function(r,e,n){return Xt(r,e,n,"lch")};At.lch=Kt,At.hcl=Kt;var Ut=v;At.num=function(r,e,n){var t=r.num(),a=e.num();return new Ut(t+n*(a-t),"num")};var Vt=Ht;At.hcg=function(r,e,n){return Vt(r,e,n,"hcg")};var Wt=Ht;At.hsi=function(r,e,n){return Wt(r,e,n,"hsi")};var Zt=Ht;At.hsl=function(r,e,n){return Zt(r,e,n,"hsl")};var Jt=Ht;At.hsv=function(r,e,n){return Jt(r,e,n,"hsv")};var Qt=v;At.oklab=function(r,e,n){var t=r.oklab(),a=e.oklab();return new Qt(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"oklab")};var ra=Ht;At.oklch=function(r,e,n){return ra(r,e,n,"oklch")};var ea=v,na=l.clip_rgb,ta=Math.pow,aa=Math.sqrt,oa=Math.PI,fa=Math.cos,ua=Math.sin,ca=Math.atan2,ia=function(r,e){for(var n=r.length,t=[0,0,0,0],a=0;a.9999999&&(t[3]=1),new ea(na(t))},la=y,sa=l.type,ha=Math.pow,da=function(r){var e="rgb",n=la("#ccc"),t=0,a=[0,1],o=[],f=[0,0],u=!1,c=[],i=!1,l=0,s=1,h=!1,d={},b=!0,p=1,g=function(r){if((r=r||["#fff","#000"])&&"string"===sa(r)&&la.brewer&&la.brewer[r.toLowerCase()]&&(r=la.brewer[r.toLowerCase()]),"array"===sa(r)){1===r.length&&(r=[r[0],r[0]]),r=r.slice(0);for(var e=0;e2?function(r){if(null!=u){for(var e=u.length-1,n=0;n=u[n];)n++;return n-1}return 0}(r)/(u.length-2):s!==l?(r-l)/(s-l):1,i=m(i),t||(i=v(i)),1!==p&&(i=ha(i,p)),i=f[0]+i*(1-f[0]-f[1]),i=Math.min(1,Math.max(0,i));var h=Math.floor(1e4*i);if(b&&d[h])a=d[h];else{if("array"===sa(c))for(var g=0;g=y&&g===o.length-1){a=c[g];break}if(i>y&&i2){var i=r.map((function(e,n){return n/(r.length-1)})),h=r.map((function(r){return(r-l)/(s-l)}));h.every((function(r,e){return i[e]===r}))||(m=function(r){if(r<=0||r>=1)return r;for(var e=0;r>=h[e+1];)e++;var n=(r-h[e])/(h[e+1]-h[e]);return i[e]+n*(i[e+1]-i[e])})}}return a=[l,s],k},k.mode=function(r){return arguments.length?(e=r,w(),k):e},k.range=function(r,e){return g(r),k},k.out=function(r){return i=r,k},k.spread=function(r){return arguments.length?(t=r,k):t},k.correctLightness=function(r){return null==r&&(r=!0),h=r,w(),v=h?function(r){for(var e=y(0,!0).lab()[0],n=y(1,!0).lab()[0],t=e>n,a=y(r,!0).lab()[0],o=e+(n-e)*r,f=a-o,u=0,c=1,i=20;Math.abs(f)>.01&&i-- >0;)t&&(f*=-1),f<0?(u=r,r+=.5*(c-r)):(c=r,r+=.5*(u-r)),f=(a=y(r,!0).lab()[0])-o;return r}:function(r){return r},k},k.padding=function(r){return null!=r?("number"===sa(r)&&(r=[r,r]),f=r,k):f},k.colors=function(e,n){arguments.length<2&&(n="hex");var t=[];if(0===arguments.length)t=c.slice(0);else if(1===e)t=[k(.5)];else if(e>1){var o=a[0],f=a[1]-o;t=function(r,e,n){for(var t=[],a=ro;a?f++:f--)t.push(f);return t}(0,e,!1).map((function(r){return k(o+r/(e-1)*f)}))}else{r=[];var i=[];if(u&&u.length>2)for(var l=1,s=u.length,h=1<=s;h?ls;h?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;t=i.map((function(r){return k(r)}))}return la[n]&&(t=t.map((function(r){return r[n]()}))),t},k.cache=function(r){return null!=r?(b=r,k):b},k.gamma=function(r){return null!=r?(p=r,k):p},k.nodata=function(r){return null!=r?(n=la(r),k):n},k};var ba=v,pa=da,ga=y,va=function(r,e,n){if(!va[n])throw new Error("unknown blend mode "+n);return va[n](r,e)},ma=function(r){return function(e,n){var t=ga(n).rgb(),a=ga(e).rgb();return ga.rgb(r(t,a))}},ya=function(r){return function(e,n){var t=[];return t[0]=r(e[0],n[0]),t[1]=r(e[1],n[1]),t[2]=r(e[2],n[2]),t}};va.normal=ma(ya((function(r){return r}))),va.multiply=ma(ya((function(r,e){return r*e/255}))),va.screen=ma(ya((function(r,e){return 255*(1-(1-r/255)*(1-e/255))}))),va.overlay=ma(ya((function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))}))),va.darken=ma(ya((function(r,e){return r>e?e:r}))),va.lighten=ma(ya((function(r,e){return r>e?r:e}))),va.dodge=ma(ya((function(r,e){return 255===r||(r=e/255*255/(1-r/255))>255?255:r}))),va.burn=ma(ya((function(r,e){return 255*(1-(1-e/255)/(r/255))})));for(var wa=va,ka=l.type,Ma=l.clip_rgb,_a=l.TWOPI,Na=Math.pow,xa=Math.sin,Ea=Math.cos,Aa=y,Ca=v,La=Math.floor,Oa=Math.random,Pa=f,Fa=Math.log,ja=Math.pow,qa=Math.floor,Ia=Math.abs,Ra=function(r,e){void 0===e&&(e=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Pa(r)&&(r=Object.values(r)),r.forEach((function(r){e&&"object"===Pa(r)&&(r=r[e]),null==r||isNaN(r)||(n.values.push(r),n.sum+=r,rn.max&&(n.max=r),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(r,e){return Ga(n,r,e)},n},Ga=function(r,e,n){void 0===e&&(e="equal"),void 0===n&&(n=7),"array"==Pa(r)&&(r=Ra(r));var t=r.min,a=r.max,o=r.values.sort((function(r,e){return r-e}));if(1===n)return[t,a];var f=[];if("c"===e.substr(0,1)&&(f.push(t),f.push(a)),"e"===e.substr(0,1)){f.push(t);for(var u=1;u 0");var c=Math.LOG10E*Fa(t),i=Math.LOG10E*Fa(a);f.push(t);for(var l=1;l200&&(y=!1)}for(var I={},R=0;R=360;)b-=360;f[d]=b}else f[d]=f[d]/u[d];return h/=t,new ea(f,e).alpha(h>.99999?1:h,!0)},uo.bezier=function(r){var e=function(r){var e,n,t,a,o,f,u;if(2===(r=r.map((function(r){return new ba(r)}))).length)e=r.map((function(r){return r.lab()})),o=e[0],f=e[1],a=function(r){var e=[0,1,2].map((function(e){return o[e]+r*(f[e]-o[e])}));return new ba(e,"lab")};else if(3===r.length)n=r.map((function(r){return r.lab()})),o=n[0],f=n[1],u=n[2],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*o[e]+2*(1-r)*r*f[e]+r*r*u[e]}));return new ba(e,"lab")};else if(4===r.length){var c;t=r.map((function(r){return r.lab()})),o=t[0],f=t[1],u=t[2],c=t[3],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*(1-r)*o[e]+3*(1-r)*(1-r)*r*f[e]+3*(1-r)*r*r*u[e]+r*r*r*c[e]}));return new ba(e,"lab")}}else{if(!(r.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,s;i=r.map((function(r){return r.lab()})),s=r.length-1,l=function(r){for(var e=[1,1],n=1;nt?(n+.05)/(t+.05):(t+.05)/(n+.05)},uo.deltaE=function(r,e,n,t,a){void 0===n&&(n=1),void 0===t&&(t=1),void 0===a&&(a=1);var o=function(r){return 360*r/(2*Wa)},f=function(r){return 2*Wa*r/360};r=new Da(r),e=new Da(e);var u=Array.from(r.lab()),c=u[0],i=u[1],l=u[2],s=Array.from(e.lab()),h=s[0],d=s[1],b=s[2],p=(c+h)/2,g=(Ta(Ya(i,2)+Ya(l,2))+Ta(Ya(d,2)+Ya(b,2)))/2,v=.5*(1-Ta(Ya(g,7)/(Ya(g,7)+Ya(25,7)))),m=i*(1+v),y=d*(1+v),w=Ta(Ya(m,2)+Ya(l,2)),k=Ta(Ya(y,2)+Ya(b,2)),M=(w+k)/2,_=o(Ha(l,m)),N=o(Ha(b,y)),x=_>=0?_:_+360,E=N>=0?N:N+360,A=Xa(x-E)>180?(x+E+360)/2:(x+E)/2,C=1-.17*Ka(f(A-30))+.24*Ka(f(2*A))+.32*Ka(f(3*A+6))-.2*Ka(f(4*A-63)),L=E-x;L=Xa(L)<=180?L:E<=x?L+360:L-360,L=2*Ta(w*k)*Ua(f(L)/2);var O=h-c,P=k-w,F=1+.015*Ya(p-50,2)/Ta(20+Ya(p-50,2)),j=1+.045*M,q=1+.015*M*C,I=30*Va(-Ya((A-275)/25,2)),R=-2*Ta(Ya(M,7)/(Ya(M,7)+Ya(25,7)))*Ua(2*f(I)),G=Ta(Ya(O/(n*F),2)+Ya(P/(t*j),2)+Ya(L/(a*q),2)+R*(P/(t*j))*(L/(a*q)));return za(0,$a(100,G))},uo.distance=function(r,e,n){void 0===n&&(n="lab"),r=new Za(r),e=new Za(e);var t=r.get(n),a=e.get(n),o=0;for(var f in t){var u=(t[f]||0)-(a[f]||0);o+=u*u}return Math.sqrt(o)},uo.limits=Ba.limits,uo.valid=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];try{return new(Function.prototype.bind.apply(Ja,[null].concat(r))),!0}catch(r){return!1}},uo.scales=eo,uo.colors=hn,uo.brewer=fo,uo}()}},e={};function n(t){var a=e[t];if(void 0!==a)return a.exports;var o=e[t]={exports:{}};return r[t].call(o.exports,o,o.exports,n),o.exports}n.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return n.d(e,{a:e}),e},n.d=(r,e)=>{for(var t in e)n.o(e,t)&&!n.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},n.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),(()=>{"use strict";var r=n(768),e=n.n(r);console.log("\n▄▄▄ ▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄ ▄ \n█ █ █ █ █ ▄ █ █ █ █ █ █ █\n█ █▄█ █ ▄ █ █ █ █ █ ▄▄▄▄▄█ ▄ █ █▄█ █\n█ ▄█ █▄█ █ █▄▄█▄█ █▄▄▄▄▄█ █ █ █ █\n█ █▄█ █ ▄▄ █▄▄▄▄▄ █ █▄█ █ ▄ █\n█ ▄ █ ▄ █ █ █ █▄▄▄▄▄█ █ █ █ █ █\n█▄▄▄█ █▄█▄▄█ █▄▄█▄▄▄█ █▄█▄▄▄▄▄▄▄█▄▄▄▄▄▄▄█▄█ █▄▄█\n \n▄▄▄ ▄ ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄▄▄▄▄ \n█ █ █ █ █ █ █ █\n█ █▄█ █ ▄ █ █ █▄ ▄█\n█ ▄█ █▄█ █ █ █ █ \n█ █▄█ █ █▄▄▄ █ █ \n█ ▄ █ ▄ █ █ █ █ \n█▄▄▄█ █▄█▄▄█ █▄▄█▄▄▄▄▄▄▄█ █▄▄▄█ \n \nHi there! 👋 I see you opened up the dev tools.\n\nThis site is powered by Jekyll and GitHub pages and is a simple interface for me to jot down my thoughts in markdown.\n\nIf you're interested in connecting, please reach out to me via LinkedIn at:\nhttp://linkedin.com/in/kaltkarson\n"),document.querySelectorAll("pre.highlight").forEach((function(r){!function(r){var e=document.createElement("button");e.innerHTML='\n \n \n \n \n ',e.classList.add("copy-button"),e.addEventListener("click",(function(){var n,t,a=r.querySelector("code");a&&(n=a.innerText,(t=document.createElement("textarea")).value=n,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),e.innerHTML='\n \n \n \n \n ')})),r.style.position="relative",r.appendChild(e)}(r)})),function(){var r,n=document.createElement("input");n.id="theme-button",n.type="color";var t=document.createElement("div");t.id="theme-button-wrapper",null===(r=document.querySelector("main"))||void 0===r||r.appendChild(t),t.appendChild(n),t.style.backgroundColor="var(--accent-color)",n.onchange=function(){t.style.backgroundColor="var(--accent-color)",function(r){try{if(o=r,!e().valid(o))return!1;var n=function(r){var e=r.luminance();e<.25?r=r.luminance(.25):e>.5&&(r=r.luminance(.5));var n=r.get("hsl.s");return r.set("hsl.s",Math.min(n,.85))}(e()(r)),t=function(r){if(0===r.get("hsl.s")){var n=["#00796b","#00acc1","#1976d2","#2196f3"];r=e()(n[Math.floor(Math.random()*n.length)])}var t=r.set("hsl.s",1);if(t.set("hsl.l",.75),e().contrast(t,r)>=1.75)return t;for(var a=1;a<=20;a++){var o=t.set("hsl.l",t.get("hsl.l")+.05*a);if(e().contrast(o,r)>=1.75)return o}return t}(n),a=function(r){return r.get("hsl.s")<.2}(t)?"underline":"none";return function(r,e){var n=r.hex(),t=e.hex();localStorage.setItem("ACCENT_COLOR",n),localStorage.setItem("LINK_COLOR",t)}(n,t),function(r,e,n){var t=r.hex(),a=e.hex();document.documentElement.style.setProperty("--accent-color",t),document.documentElement.style.setProperty("--accent-color-contrast",a),document.documentElement.style.setProperty("--accent-decoration",n)}(n,t,a),!0}catch(r){return console.error(r),!1}var o}(n.value)}}()})()})(); \ No newline at end of file diff --git a/assets/js/terminal.js b/assets/js/terminal.js index c0974bb..cf0e317 100644 --- a/assets/js/terminal.js +++ b/assets/js/terminal.js @@ -1,2 +1,2 @@ /*! For license information please see terminal.js.LICENSE.txt */ -(()=>{var e={768:function(e){e.exports=function(){"use strict";for(var e=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),er?r:e},t=e,r={},n=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n255)&&(e._clipped=!0),e[r]=t(e[r],0,255)):3===r&&(e[r]=t(e[r],0,1));return e},limit:e,type:f,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==u(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==c(e[t])?e[t].toLowerCase():null},PI:i,TWOPI:2*i,PITHIRD:i/3,DEG2RAD:i/180,RAD2DEG:180/i},s={format:{},autodetect:[]},d=l.last,h=l.clip_rgb,p=l.type,b=s,g=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if("object"===p(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var n=d(e),a=!1;if(!n){a=!0,b.sorted||(b.autodetect=b.autodetect.sort((function(e,t){return t.p-e.p})),b.sorted=!0);for(var o=0,f=b.autodetect;o4?e[4]:1;return 1===o?[0,0,0,f]:[r>=1?0:255*(1-r)*(1-o),n>=1?0:255*(1-n)*(1-o),a>=1?0:255*(1-a)*(1-o),f]},_=y,E=v,C=s,S=l.unpack,L=l.type,A=x;E.prototype.cmyk=function(){return A(this._rgb)},_.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(E,[null].concat(e,["cmyk"])))},C.format.cmyk=N,C.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=S(e,"cmyk"),"array"===L(e)&&4===e.length)return"cmyk"}});var P=l.unpack,O=l.last,I=function(e){return Math.round(100*e)/100},q=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=P(e,"hsla"),n=O(e)||"lsa";return r[0]=I(r[0]||0),r[1]=I(100*r[1])+"%",r[2]=I(100*r[2])+"%","hsla"===n||r.length>3&&r[3]<1?(r[3]=r.length>3?r[3]:1,n="hsla"):r.length=3,n+"("+r.join(",")+")"},D=l.unpack,R=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=D(e,"rgba"))[0],n=e[1],a=e[2];r/=255,n/=255,a/=255;var o,f,u=Math.min(r,n,a),c=Math.max(r,n,a),i=(c+u)/2;return c===u?(o=0,f=Number.NaN):o=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),r==c?f=(n-a)/(c-u):n==c?f=2+(a-r)/(c-u):a==c&&(f=4+(r-n)/(c-u)),(f*=60)<0&&(f+=360),e.length>3&&void 0!==e[3]?[f,o,i,e[3]]:[f,o,i]},j=l.unpack,F=l.last,B=q,T=R,G=Math.round,z=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=j(e,"rgba"),n=F(e)||"rgb";return"hsl"==n.substr(0,3)?B(T(r),n):(r[0]=G(r[0]),r[1]=G(r[1]),r[2]=G(r[2]),("rgba"===n||r.length>3&&r[3]<1)&&(r[3]=r.length>3?r[3]:1,n="rgba"),n+"("+r.slice(0,"rgb"===n?3:4).join(",")+")")},Y=l.unpack,U=Math.round,V=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var n,a,o,f=(t=Y(t,"hsl"))[0],u=t[1],c=t[2];if(0===u)n=a=o=255*c;else{var i=[0,0,0],l=[0,0,0],s=c<.5?c*(1+u):c+u-c*u,d=2*c-s,h=f/360;i[0]=h+1/3,i[1]=h,i[2]=h-1/3;for(var p=0;p<3;p++)i[p]<0&&(i[p]+=1),i[p]>1&&(i[p]-=1),6*i[p]<1?l[p]=d+6*(s-d)*i[p]:2*i[p]<1?l[p]=s:3*i[p]<2?l[p]=d+(s-d)*(2/3-i[p])*6:l[p]=d;n=(e=[U(255*l[0]),U(255*l[1]),U(255*l[2])])[0],a=e[1],o=e[2]}return t.length>3?[n,a,o,t[3]]:[n,a,o,1]},$=V,X=s,J=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,W=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,H=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,K=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Z=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Q=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ee=Math.round,te=function(e){var t;if(e=e.toLowerCase().trim(),X.format.named)try{return X.format.named(e)}catch(e){}if(t=e.match(J)){for(var r=t.slice(1,4),n=0;n<3;n++)r[n]=+r[n];return r[3]=1,r}if(t=e.match(W)){for(var a=t.slice(1,5),o=0;o<4;o++)a[o]=+a[o];return a}if(t=e.match(H)){for(var f=t.slice(1,4),u=0;u<3;u++)f[u]=ee(2.55*f[u]);return f[3]=1,f}if(t=e.match(K)){for(var c=t.slice(1,5),i=0;i<3;i++)c[i]=ee(2.55*c[i]);return c[3]=+c[3],c}if(t=e.match(Z)){var l=t.slice(1,4);l[1]*=.01,l[2]*=.01;var s=$(l);return s[3]=1,s}if(t=e.match(Q)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var h=$(d);return h[3]=+t[4],h}};te.test=function(e){return J.test(e)||W.test(e)||H.test(e)||K.test(e)||Z.test(e)||Q.test(e)};var re=y,ne=v,ae=s,oe=l.type,fe=z,ue=te;ne.prototype.css=function(e){return fe(this._rgb,e)},re.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ne,[null].concat(e,["css"])))},ae.format.css=ue,ae.autodetect.push({p:5,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===oe(e)&&ue.test(e))return"css"}});var ce=v,ie=y,le=l.unpack;s.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=le(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r},ie.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ce,[null].concat(e,["gl"])))},ce.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var se=l.unpack,de=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=se(e,"rgb"),a=n[0],o=n[1],f=n[2],u=Math.min(a,o,f),c=Math.max(a,o,f),i=c-u,l=100*i/255,s=u/(255-i)*100;return 0===i?r=Number.NaN:(a===c&&(r=(o-f)/i),o===c&&(r=2+(f-a)/i),f===c&&(r=4+(a-o)/i),(r*=60)<0&&(r+=360)),[r,l,s]},he=l.unpack,pe=Math.floor,be=function(){for(var e,t,r,n,a,o,f=[],u=arguments.length;u--;)f[u]=arguments[u];var c,i,l,s=(f=he(f,"hcg"))[0],d=f[1],h=f[2];h*=255;var p=255*d;if(0===d)c=i=l=h;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var b=pe(s/=60),g=s-b,v=h*(1-d),m=v+p*(1-g),y=v+p*g,w=v+p;switch(b){case 0:c=(e=[w,y,v])[0],i=e[1],l=e[2];break;case 1:c=(t=[m,w,v])[0],i=t[1],l=t[2];break;case 2:c=(r=[v,w,y])[0],i=r[1],l=r[2];break;case 3:c=(n=[v,m,w])[0],i=n[1],l=n[2];break;case 4:c=(a=[y,v,w])[0],i=a[1],l=a[2];break;case 5:c=(o=[w,v,m])[0],i=o[1],l=o[2]}}return[c,i,l,f.length>3?f[3]:1]},ge=l.unpack,ve=l.type,me=y,ye=v,we=s,ke=de;ye.prototype.hcg=function(){return ke(this._rgb)},me.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ye,[null].concat(e,["hcg"])))},we.format.hcg=be,we.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ge(e,"hcg"),"array"===ve(e)&&3===e.length)return"hcg"}});var xe=l.unpack,Me=l.last,Ne=Math.round,_e=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=xe(e,"rgba"),n=r[0],a=r[1],o=r[2],f=r[3],u=Me(e)||"auto";void 0===f&&(f=1),"auto"===u&&(u=f<1?"rgba":"rgb");var c="000000"+((n=Ne(n))<<16|(a=Ne(a))<<8|(o=Ne(o))).toString(16);c=c.substr(c.length-6);var i="0"+Ne(255*f).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},Ee=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ce=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Se=function(e){if(e.match(Ee)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(Ce)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var r=parseInt(e,16);return[r>>24&255,r>>16&255,r>>8&255,Math.round((255&r)/255*100)/100]}throw new Error("unknown hex color: "+e)},Le=y,Ae=v,Pe=l.type,Oe=s,Ie=_e;Ae.prototype.hex=function(e){return Ie(this._rgb,e)},Le.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Ae,[null].concat(e,["hex"])))},Oe.format.hex=Se,Oe.autodetect.push({p:4,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===Pe(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var qe=l.unpack,De=l.TWOPI,Re=Math.min,je=Math.sqrt,Fe=Math.acos,Be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=qe(e,"rgb"),a=n[0],o=n[1],f=n[2],u=Re(a/=255,o/=255,f/=255),c=(a+o+f)/3,i=c>0?1-u/c:0;return 0===i?r=NaN:(r=(a-o+(a-f))/2,r/=je((a-o)*(a-o)+(a-f)*(o-f)),r=Fe(r),f>o&&(r=De-r),r/=De),[360*r,i,c]},Te=l.unpack,Ge=l.limit,ze=l.TWOPI,Ye=l.PITHIRD,Ue=Math.cos,Ve=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=Te(e,"hsi"))[0],f=e[1],u=e[2];return isNaN(o)&&(o=0),isNaN(f)&&(f=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?n=1-((a=(1-f)/3)+(r=(1+f*Ue(ze*o)/Ue(Ye-ze*o))/3)):o<2/3?a=1-((r=(1-f)/3)+(n=(1+f*Ue(ze*(o-=1/3))/Ue(Ye-ze*o))/3)):r=1-((n=(1-f)/3)+(a=(1+f*Ue(ze*(o-=2/3))/Ue(Ye-ze*o))/3)),[255*(r=Ge(u*r*3)),255*(n=Ge(u*n*3)),255*(a=Ge(u*a*3)),e.length>3?e[3]:1]},$e=l.unpack,Xe=l.type,Je=y,We=v,He=s,Ke=Be;We.prototype.hsi=function(){return Ke(this._rgb)},Je.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(We,[null].concat(e,["hsi"])))},He.format.hsi=Ve,He.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=$e(e,"hsi"),"array"===Xe(e)&&3===e.length)return"hsi"}});var Ze=l.unpack,Qe=l.type,et=y,tt=v,rt=s,nt=R;tt.prototype.hsl=function(){return nt(this._rgb)},et.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(tt,[null].concat(e,["hsl"])))},rt.format.hsl=V,rt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ze(e,"hsl"),"array"===Qe(e)&&3===e.length)return"hsl"}});var at=l.unpack,ot=Math.min,ft=Math.max,ut=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=at(e,"rgb"))[0],f=e[1],u=e[2],c=ot(o,f,u),i=ft(o,f,u),l=i-c;return a=i/255,0===i?(r=Number.NaN,n=0):(n=l/i,o===i&&(r=(f-u)/l),f===i&&(r=2+(u-o)/l),u===i&&(r=4+(o-f)/l),(r*=60)<0&&(r+=360)),[r,n,a]},ct=l.unpack,it=Math.floor,lt=function(){for(var e,t,r,n,a,o,f=[],u=arguments.length;u--;)f[u]=arguments[u];var c,i,l,s=(f=ct(f,"hsv"))[0],d=f[1],h=f[2];if(h*=255,0===d)c=i=l=h;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var p=it(s/=60),b=s-p,g=h*(1-d),v=h*(1-d*b),m=h*(1-d*(1-b));switch(p){case 0:c=(e=[h,m,g])[0],i=e[1],l=e[2];break;case 1:c=(t=[v,h,g])[0],i=t[1],l=t[2];break;case 2:c=(r=[g,h,m])[0],i=r[1],l=r[2];break;case 3:c=(n=[g,v,h])[0],i=n[1],l=n[2];break;case 4:c=(a=[m,g,h])[0],i=a[1],l=a[2];break;case 5:c=(o=[h,g,v])[0],i=o[1],l=o[2]}}return[c,i,l,f.length>3?f[3]:1]},st=l.unpack,dt=l.type,ht=y,pt=v,bt=s,gt=ut;pt.prototype.hsv=function(){return gt(this._rgb)},ht.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pt,[null].concat(e,["hsv"])))},bt.format.hsv=lt,bt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=st(e,"hsv"),"array"===dt(e)&&3===e.length)return"hsv"}});var vt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},mt=vt,yt=l.unpack,wt=Math.pow,kt=function(e){return(e/=255)<=.04045?e/12.92:wt((e+.055)/1.055,2.4)},xt=function(e){return e>mt.t3?wt(e,1/3):e/mt.t2+mt.t0},Mt=function(e,t,r){return e=kt(e),t=kt(t),r=kt(r),[xt((.4124564*e+.3575761*t+.1804375*r)/mt.Xn),xt((.2126729*e+.7151522*t+.072175*r)/mt.Yn),xt((.0193339*e+.119192*t+.9503041*r)/mt.Zn)]},Nt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=yt(e,"rgb"),n=r[0],a=r[1],o=r[2],f=Mt(n,a,o),u=f[0],c=f[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-f[2])]},_t=vt,Et=l.unpack,Ct=Math.pow,St=function(e){return 255*(e<=.00304?12.92*e:1.055*Ct(e,1/2.4)-.055)},Lt=function(e){return e>_t.t1?e*e*e:_t.t2*(e-_t.t0)},At=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=Et(e,"lab"))[0],f=e[1],u=e[2];return n=(o+16)/116,r=isNaN(f)?n:n+f/500,a=isNaN(u)?n:n-u/200,n=_t.Yn*Lt(n),r=_t.Xn*Lt(r),a=_t.Zn*Lt(a),[St(3.2404542*r-1.5371385*n-.4985314*a),St(-.969266*r+1.8760108*n+.041556*a),St(.0556434*r-.2040259*n+1.0572252*a),e.length>3?e[3]:1]},Pt=l.unpack,Ot=l.type,It=y,qt=v,Dt=s,Rt=Nt;qt.prototype.lab=function(){return Rt(this._rgb)},It.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(qt,[null].concat(e,["lab"])))},Dt.format.lab=At,Dt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Pt(e,"lab"),"array"===Ot(e)&&3===e.length)return"lab"}});var jt=l.unpack,Ft=l.RAD2DEG,Bt=Math.sqrt,Tt=Math.atan2,Gt=Math.round,zt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=jt(e,"lab"),n=r[0],a=r[1],o=r[2],f=Bt(a*a+o*o),u=(Tt(o,a)*Ft+360)%360;return 0===Gt(1e4*f)&&(u=Number.NaN),[n,f,u]},Yt=l.unpack,Ut=Nt,Vt=zt,$t=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Yt(e,"rgb"),n=r[0],a=r[1],o=r[2],f=Ut(n,a,o),u=f[0],c=f[1],i=f[2];return Vt(u,c,i)},Xt=l.unpack,Jt=l.DEG2RAD,Wt=Math.sin,Ht=Math.cos,Kt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Xt(e,"lch"),n=r[0],a=r[1],o=r[2];return isNaN(o)&&(o=0),[n,Ht(o*=Jt)*a,Wt(o)*a]},Zt=l.unpack,Qt=Kt,er=At,tr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=Zt(e,"lch"))[0],n=e[1],a=e[2],o=Qt(r,n,a),f=o[0],u=o[1],c=o[2],i=er(f,u,c);return[i[0],i[1],i[2],e.length>3?e[3]:1]},rr=l.unpack,nr=tr,ar=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=rr(e,"hcl").reverse();return nr.apply(void 0,r)},or=l.unpack,fr=l.type,ur=y,cr=v,ir=s,lr=$t;cr.prototype.lch=function(){return lr(this._rgb)},cr.prototype.hcl=function(){return lr(this._rgb).reverse()},ur.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(cr,[null].concat(e,["lch"])))},ur.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(cr,[null].concat(e,["hcl"])))},ir.format.lch=tr,ir.format.hcl=ar,["lch","hcl"].forEach((function(e){return ir.autodetect.push({p:2,test:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(t=or(t,e),"array"===fr(t)&&3===t.length)return e}})}));var sr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},dr=s,hr=l.type,pr=sr,br=Se,gr=_e;v.prototype.name=function(){for(var e=gr(this._rgb,"rgb"),t=0,r=Object.keys(pr);t0;)t[r]=arguments[r+1];if(!t.length&&"string"===hr(e)&&pr[e.toLowerCase()])return"named"}});var vr=l.unpack,mr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=vr(e,"rgb");return(r[0]<<16)+(r[1]<<8)+r[2]},yr=l.type,wr=y,kr=v,xr=s,Mr=l.type,Nr=mr;kr.prototype.num=function(){return Nr(this._rgb)},wr.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(kr,[null].concat(e,["num"])))},xr.format.num=function(e){if("number"==yr(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},xr.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Mr(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var _r=y,Er=v,Cr=s,Sr=l.unpack,Lr=l.type,Ar=Math.round;Er.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Ar)},Er.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,r){return r<3?!1===e?t:Ar(t):t}))},_r.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Er,[null].concat(e,["rgb"])))},Cr.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Sr(e,"rgba");return void 0===r[3]&&(r[3]=1),r},Cr.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Sr(e,"rgba"),"array"===Lr(e)&&(3===e.length||4===e.length&&"number"==Lr(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var Pr=Math.log,Or=function(e){var t,r,n,a=e/100;return a<66?(t=255,r=a<6?0:-155.25485562709179-.44596950469579133*(r=a-2)+104.49216199393888*Pr(r),n=a<20?0:.8274096064007395*(n=a-10)-254.76935184120902+115.67994401066147*Pr(n)):(t=351.97690566805693+.114206453784165*(t=a-55)-40.25366309332127*Pr(t),r=325.4494125711974+.07943456536662342*(r=a-50)-28.0852963507957*Pr(r),n=255),[t,r,n,1]},Ir=Or,qr=l.unpack,Dr=Math.round,Rr=y,jr=v,Fr=s,Br=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r,n=qr(e,"rgb"),a=n[0],o=n[2],f=1e3,u=4e4;u-f>.4;){var c=Ir(r=.5*(u+f));c[2]/c[0]>=o/a?u=r:f=r}return Dr(r)};jr.prototype.temp=jr.prototype.kelvin=jr.prototype.temperature=function(){return Br(this._rgb)},Rr.temp=Rr.kelvin=Rr.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(jr,[null].concat(e,["temp"])))},Fr.format.temp=Fr.format.kelvin=Fr.format.temperature=Or;var Tr=l.unpack,Gr=Math.cbrt,zr=Math.pow,Yr=Math.sign,Ur=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Tr(e,"rgb"),n=r[0],a=r[1],o=r[2],f=[Vr(n/255),Vr(a/255),Vr(o/255)],u=f[0],c=f[1],i=f[2],l=Gr(.4122214708*u+.5363325363*c+.0514459929*i),s=Gr(.2119034982*u+.6806995451*c+.1073969566*i),d=Gr(.0883024619*u+.2817188376*c+.6299787005*i);return[.2104542553*l+.793617785*s-.0040720468*d,1.9779984951*l-2.428592205*s+.4505937099*d,.0259040371*l+.7827717662*s-.808675766*d]};function Vr(e){var t=Math.abs(e);return t<.04045?e/12.92:(Yr(e)||1)*zr((t+.055)/1.055,2.4)}var $r=l.unpack,Xr=Math.pow,Jr=Math.sign,Wr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=$r(e,"lab"))[0],n=e[1],a=e[2],o=Xr(r+.3963377774*n+.2158037573*a,3),f=Xr(r-.1055613458*n-.0638541728*a,3),u=Xr(r-.0894841775*n-1.291485548*a,3);return[255*Hr(4.0767416621*o-3.3077115913*f+.2309699292*u),255*Hr(-1.2684380046*o+2.6097574011*f-.3413193965*u),255*Hr(-.0041960863*o-.7034186147*f+1.707614701*u),e.length>3?e[3]:1]};function Hr(e){var t=Math.abs(e);return t>.0031308?(Jr(e)||1)*(1.055*Xr(t,1/2.4)-.055):12.92*e}var Kr=l.unpack,Zr=l.type,Qr=y,en=v,tn=s,rn=Ur;en.prototype.oklab=function(){return rn(this._rgb)},Qr.oklab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(en,[null].concat(e,["oklab"])))},tn.format.oklab=Wr,tn.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Kr(e,"oklab"),"array"===Zr(e)&&3===e.length)return"oklab"}});var nn=l.unpack,an=Ur,on=zt,fn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=nn(e,"rgb"),n=r[0],a=r[1],o=r[2],f=an(n,a,o),u=f[0],c=f[1],i=f[2];return on(u,c,i)},un=l.unpack,cn=Kt,ln=Wr,sn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=un(e,"lch"))[0],n=e[1],a=e[2],o=cn(r,n,a),f=o[0],u=o[1],c=o[2],i=ln(f,u,c);return[i[0],i[1],i[2],e.length>3?e[3]:1]},dn=l.unpack,hn=l.type,pn=y,bn=v,gn=s,vn=fn;bn.prototype.oklch=function(){return vn(this._rgb)},pn.oklch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(bn,[null].concat(e,["oklch"])))},gn.format.oklch=sn,gn.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=dn(e,"oklch"),"array"===hn(e)&&3===e.length)return"oklch"}});var mn=v,yn=l.type;mn.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===yn(e)?t?(this._rgb[3]=e,this):new mn([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},v.prototype.clipped=function(){return this._rgb._clipped||!1};var wn=v,kn=vt;wn.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=kn.Kn*e,new wn(t,"lab").alpha(this.alpha(),!0)},wn.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},wn.prototype.darker=wn.prototype.darken,wn.prototype.brighter=wn.prototype.brighten,v.prototype.get=function(e){var t=e.split("."),r=t[0],n=t[1],a=this[r]();if(n){var o=r.indexOf(n)-("ok"===r.substr(0,2)?2:0);if(o>-1)return a[o];throw new Error("unknown channel "+n+" in mode "+r)}return a};var xn=v,Mn=l.type,Nn=Math.pow;xn.prototype.luminance=function(e){if(void 0!==e&&"number"===Mn(e)){if(0===e)return new xn([0,0,0,this._rgb[3]],"rgb");if(1===e)return new xn([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),r=20,n=function(t,a){var o=t.interpolate(a,.5,"rgb"),f=o.luminance();return Math.abs(e-f)<1e-7||!r--?o:f>e?n(t,o):n(o,a)},a=(t>e?n(new xn([0,0,0]),this):n(this,new xn([255,255,255]))).rgb();return new xn(a.concat([this._rgb[3]]))}return _n.apply(void 0,this._rgb.slice(0,3))};var _n=function(e,t,r){return.2126*(e=En(e))+.7152*(t=En(t))+.0722*En(r)},En=function(e){return(e/=255)<=.03928?e/12.92:Nn((e+.055)/1.055,2.4)},Cn={},Sn=v,Ln=l.type,An=Cn,Pn=function(e,t,r){void 0===r&&(r=.5);for(var n=[],a=arguments.length-3;a-- >0;)n[a]=arguments[a+3];var o=n[0]||"lrgb";if(An[o]||n.length||(o=Object.keys(An)[0]),!An[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==Ln(e)&&(e=new Sn(e)),"object"!==Ln(t)&&(t=new Sn(t)),An[o](e,t,r).alpha(e.alpha()+r*(t.alpha()-e.alpha()))},On=v,In=Pn;On.prototype.mix=On.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return In.apply(void 0,[this,e,t].concat(r))};var qn=v;qn.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,r=t[3];return e?(this._rgb=[t[0]*r,t[1]*r,t[2]*r,r],this):new qn([t[0]*r,t[1]*r,t[2]*r,r],"rgb")};var Dn=v,Rn=vt;Dn.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Rn.Kn*e,t[1]<0&&(t[1]=0),new Dn(t,"lch").alpha(this.alpha(),!0)},Dn.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var jn=v,Fn=l.type;jn.prototype.set=function(e,t,r){void 0===r&&(r=!1);var n=e.split("."),a=n[0],o=n[1],f=this[a]();if(o){var u=a.indexOf(o)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==Fn(t))switch(t.charAt(0)){case"+":case"-":f[u]+=+t;break;case"*":f[u]*=+t.substr(1);break;case"/":f[u]/=+t.substr(1);break;default:f[u]=+t}else{if("number"!==Fn(t))throw new Error("unsupported value for Color.set");f[u]=t}var c=new jn(f,a);return r?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+o+" in mode "+a)}return f};var Bn=v;Cn.rgb=function(e,t,r){var n=e._rgb,a=t._rgb;return new Bn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"rgb")};var Tn=v,Gn=Math.sqrt,zn=Math.pow;Cn.lrgb=function(e,t,r){var n=e._rgb,a=n[0],o=n[1],f=n[2],u=t._rgb,c=u[0],i=u[1],l=u[2];return new Tn(Gn(zn(a,2)*(1-r)+zn(c,2)*r),Gn(zn(o,2)*(1-r)+zn(i,2)*r),Gn(zn(f,2)*(1-r)+zn(l,2)*r),"rgb")};var Yn=v;Cn.lab=function(e,t,r){var n=e.lab(),a=t.lab();return new Yn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"lab")};var Un=v,Vn=function(e,t,r,n){var a,o,f,u,c,i,l,s,d,h,p,b,g;return"hsl"===n?(f=e.hsl(),u=t.hsl()):"hsv"===n?(f=e.hsv(),u=t.hsv()):"hcg"===n?(f=e.hcg(),u=t.hcg()):"hsi"===n?(f=e.hsi(),u=t.hsi()):"lch"===n||"hcl"===n?(n="hcl",f=e.hcl(),u=t.hcl()):"oklch"===n&&(f=e.oklch().reverse(),u=t.oklch().reverse()),"h"!==n.substr(0,1)&&"oklch"!==n||(c=(a=f)[0],l=a[1],d=a[2],i=(o=u)[0],s=o[1],h=o[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?b=Number.NaN:(b=i,1!=d&&0!=d||"hsv"==n||(p=s)):(b=c,1!=h&&0!=h||"hsv"==n||(p=l)):b=c+r*(i>c&&i-c>180?i-(c+360):i180?i+360-c:i-c),void 0===p&&(p=l+r*(s-l)),g=d+r*(h-d),new Un("oklch"===n?[g,p,b]:[b,p,g],n)},$n=Vn,Xn=function(e,t,r){return $n(e,t,r,"lch")};Cn.lch=Xn,Cn.hcl=Xn;var Jn=v;Cn.num=function(e,t,r){var n=e.num(),a=t.num();return new Jn(n+r*(a-n),"num")};var Wn=Vn;Cn.hcg=function(e,t,r){return Wn(e,t,r,"hcg")};var Hn=Vn;Cn.hsi=function(e,t,r){return Hn(e,t,r,"hsi")};var Kn=Vn;Cn.hsl=function(e,t,r){return Kn(e,t,r,"hsl")};var Zn=Vn;Cn.hsv=function(e,t,r){return Zn(e,t,r,"hsv")};var Qn=v;Cn.oklab=function(e,t,r){var n=e.oklab(),a=t.oklab();return new Qn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"oklab")};var ea=Vn;Cn.oklch=function(e,t,r){return ea(e,t,r,"oklch")};var ta=v,ra=l.clip_rgb,na=Math.pow,aa=Math.sqrt,oa=Math.PI,fa=Math.cos,ua=Math.sin,ca=Math.atan2,ia=function(e,t){for(var r=e.length,n=[0,0,0,0],a=0;a.9999999&&(n[3]=1),new ta(ra(n))},la=y,sa=l.type,da=Math.pow,ha=function(e){var t="rgb",r=la("#ccc"),n=0,a=[0,1],o=[],f=[0,0],u=!1,c=[],i=!1,l=0,s=1,d=!1,h={},p=!0,b=1,g=function(e){if((e=e||["#fff","#000"])&&"string"===sa(e)&&la.brewer&&la.brewer[e.toLowerCase()]&&(e=la.brewer[e.toLowerCase()]),"array"===sa(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t2?function(e){if(null!=u){for(var t=u.length-1,r=0;r=u[r];)r++;return r-1}return 0}(e)/(u.length-2):s!==l?(e-l)/(s-l):1,i=m(i),n||(i=v(i)),1!==b&&(i=da(i,b)),i=f[0]+i*(1-f[0]-f[1]),i=Math.min(1,Math.max(0,i));var d=Math.floor(1e4*i);if(p&&h[d])a=h[d];else{if("array"===sa(c))for(var g=0;g=y&&g===o.length-1){a=c[g];break}if(i>y&&i2){var i=e.map((function(t,r){return r/(e.length-1)})),d=e.map((function(e){return(e-l)/(s-l)}));d.every((function(e,t){return i[t]===e}))||(m=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=d[t+1];)t++;var r=(e-d[t])/(d[t+1]-d[t]);return i[t]+r*(i[t+1]-i[t])})}}return a=[l,s],k},k.mode=function(e){return arguments.length?(t=e,w(),k):t},k.range=function(e,t){return g(e),k},k.out=function(e){return i=e,k},k.spread=function(e){return arguments.length?(n=e,k):n},k.correctLightness=function(e){return null==e&&(e=!0),d=e,w(),v=d?function(e){for(var t=y(0,!0).lab()[0],r=y(1,!0).lab()[0],n=t>r,a=y(e,!0).lab()[0],o=t+(r-t)*e,f=a-o,u=0,c=1,i=20;Math.abs(f)>.01&&i-- >0;)n&&(f*=-1),f<0?(u=e,e+=.5*(c-e)):(c=e,e+=.5*(u-e)),f=(a=y(e,!0).lab()[0])-o;return e}:function(e){return e},k},k.padding=function(e){return null!=e?("number"===sa(e)&&(e=[e,e]),f=e,k):f},k.colors=function(t,r){arguments.length<2&&(r="hex");var n=[];if(0===arguments.length)n=c.slice(0);else if(1===t)n=[k(.5)];else if(t>1){var o=a[0],f=a[1]-o;n=function(e,t,r){for(var n=[],a=eo;a?f++:f--)n.push(f);return n}(0,t,!1).map((function(e){return k(o+e/(t-1)*f)}))}else{e=[];var i=[];if(u&&u.length>2)for(var l=1,s=u.length,d=1<=s;d?ls;d?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;n=i.map((function(e){return k(e)}))}return la[r]&&(n=n.map((function(e){return e[r]()}))),n},k.cache=function(e){return null!=e?(p=e,k):p},k.gamma=function(e){return null!=e?(b=e,k):b},k.nodata=function(e){return null!=e?(r=la(e),k):r},k};var pa=v,ba=ha,ga=y,va=function(e,t,r){if(!va[r])throw new Error("unknown blend mode "+r);return va[r](e,t)},ma=function(e){return function(t,r){var n=ga(r).rgb(),a=ga(t).rgb();return ga.rgb(e(n,a))}},ya=function(e){return function(t,r){var n=[];return n[0]=e(t[0],r[0]),n[1]=e(t[1],r[1]),n[2]=e(t[2],r[2]),n}};va.normal=ma(ya((function(e){return e}))),va.multiply=ma(ya((function(e,t){return e*t/255}))),va.screen=ma(ya((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),va.overlay=ma(ya((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),va.darken=ma(ya((function(e,t){return e>t?t:e}))),va.lighten=ma(ya((function(e,t){return e>t?e:t}))),va.dodge=ma(ya((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),va.burn=ma(ya((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var wa=va,ka=l.type,xa=l.clip_rgb,Ma=l.TWOPI,Na=Math.pow,_a=Math.sin,Ea=Math.cos,Ca=y,Sa=v,La=Math.floor,Aa=Math.random,Pa=f,Oa=Math.log,Ia=Math.pow,qa=Math.floor,Da=Math.abs,Ra=function(e,t){void 0===t&&(t=null);var r={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Pa(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===Pa(e)&&(e=e[t]),null==e||isNaN(e)||(r.values.push(e),r.sum+=e,er.max&&(r.max=e),r.count+=1)})),r.domain=[r.min,r.max],r.limits=function(e,t){return ja(r,e,t)},r},ja=function(e,t,r){void 0===t&&(t="equal"),void 0===r&&(r=7),"array"==Pa(e)&&(e=Ra(e));var n=e.min,a=e.max,o=e.values.sort((function(e,t){return e-t}));if(1===r)return[n,a];var f=[];if("c"===t.substr(0,1)&&(f.push(n),f.push(a)),"e"===t.substr(0,1)){f.push(n);for(var u=1;u 0");var c=Math.LOG10E*Oa(n),i=Math.LOG10E*Oa(a);f.push(n);for(var l=1;l200&&(y=!1)}for(var D={},R=0;R=360;)p-=360;f[h]=p}else f[h]=f[h]/u[h];return d/=n,new ta(f,t).alpha(d>.99999?1:d,!0)},uo.bezier=function(e){var t=function(e){var t,r,n,a,o,f,u;if(2===(e=e.map((function(e){return new pa(e)}))).length)t=e.map((function(e){return e.lab()})),o=t[0],f=t[1],a=function(e){var t=[0,1,2].map((function(t){return o[t]+e*(f[t]-o[t])}));return new pa(t,"lab")};else if(3===e.length)r=e.map((function(e){return e.lab()})),o=r[0],f=r[1],u=r[2],a=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*o[t]+2*(1-e)*e*f[t]+e*e*u[t]}));return new pa(t,"lab")};else if(4===e.length){var c;n=e.map((function(e){return e.lab()})),o=n[0],f=n[1],u=n[2],c=n[3],a=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*o[t]+3*(1-e)*(1-e)*e*f[t]+3*(1-e)*e*e*u[t]+e*e*e*c[t]}));return new pa(t,"lab")}}else{if(!(e.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,s;i=e.map((function(e){return e.lab()})),s=e.length-1,l=function(e){for(var t=[1,1],r=1;rn?(r+.05)/(n+.05):(n+.05)/(r+.05)},uo.deltaE=function(e,t,r,n,a){void 0===r&&(r=1),void 0===n&&(n=1),void 0===a&&(a=1);var o=function(e){return 360*e/(2*Ha)},f=function(e){return 2*Ha*e/360};e=new Ta(e),t=new Ta(t);var u=Array.from(e.lab()),c=u[0],i=u[1],l=u[2],s=Array.from(t.lab()),d=s[0],h=s[1],p=s[2],b=(c+d)/2,g=(Ga(za(i,2)+za(l,2))+Ga(za(h,2)+za(p,2)))/2,v=.5*(1-Ga(za(g,7)/(za(g,7)+za(25,7)))),m=i*(1+v),y=h*(1+v),w=Ga(za(m,2)+za(l,2)),k=Ga(za(y,2)+za(p,2)),x=(w+k)/2,M=o(Va(l,m)),N=o(Va(p,y)),_=M>=0?M:M+360,E=N>=0?N:N+360,C=$a(_-E)>180?(_+E+360)/2:(_+E)/2,S=1-.17*Xa(f(C-30))+.24*Xa(f(2*C))+.32*Xa(f(3*C+6))-.2*Xa(f(4*C-63)),L=E-_;L=$a(L)<=180?L:E<=_?L+360:L-360,L=2*Ga(w*k)*Ja(f(L)/2);var A=d-c,P=k-w,O=1+.015*za(b-50,2)/Ga(20+za(b-50,2)),I=1+.045*x,q=1+.015*x*S,D=30*Wa(-za((C-275)/25,2)),R=-2*Ga(za(x,7)/(za(x,7)+za(25,7)))*Ja(2*f(D)),j=Ga(za(A/(r*O),2)+za(P/(n*I),2)+za(L/(a*q),2)+R*(P/(n*I))*(L/(a*q)));return Ua(0,Ya(100,j))},uo.distance=function(e,t,r){void 0===r&&(r="lab"),e=new Ka(e),t=new Ka(t);var n=e.get(r),a=t.get(r),o=0;for(var f in n){var u=(n[f]||0)-(a[f]||0);o+=u*u}return Math.sqrt(o)},uo.limits=Fa.limits,uo.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(Za,[null].concat(e))),!0}catch(e){return!1}},uo.scales=to,uo.colors=sr,uo.brewer=fo,uo}()}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(768),t=r.n(e),n=function(e){var r,n=e[0];if(n.startsWith("PS1=")){var a=n.slice(4).trim();return document.querySelectorAll(".system-prompt").forEach((function(e){e.textContent=a})),r=a,localStorage.setItem("PS1",r),"Prompt character changed to ".concat(a)}if(n.startsWith("ACCENT_COLOR=")){var o=e.join(" ").slice(13).trim();return function(e){try{if(o=e,!t().valid(o))return!1;var r=function(e){var t=e.luminance();t<.25?e=e.luminance(.25):t>.75&&(e=e.luminance(.75));var r=e.get("hsl.s");return e.set("hsl.s",Math.min(r,.85))}(t()(e)),n=function(e){var r=e.set("hsl.s",1);if(t().contrast(r,e)>=1.75)return r;for(var n=1;n<=10;n++){var a=r.set("hsl.l",r.get("hsl.l")+.1*n);if(t().contrast(a,e)>=1.75)return a}return r}(r),a=function(e){return e.luminance()>.75}(n)?"underline":"none";return function(e,t){var r=e.hex(),n=t.hex();localStorage.setItem("ACCENT_COLOR",r),localStorage.setItem("LINK_COLOR",n)}(r,n),function(e,t,r){var n=e.hex(),a=t.hex();document.documentElement.style.setProperty("--accent-color",n),document.documentElement.style.setProperty("--accent-color-contrast",a),document.documentElement.style.setProperty("--accent-decoration",r)}(r,n,a),!0}catch(e){return console.error(e),!1}var o}(o)?"Accent changed to ".concat(o):"Invalid color. Please provide: #000000, rgb(0, 0, 0) or any valid css color."}return"Invalid export command. Usage: export PS1=$, export ACCENT_COLOR=#"},a=function(){var e=Math.floor(Math.random()*u.length);return u[e]},o={clear:{execute:function(e){for(var t=document.querySelector(".stdout-log");null==t?void 0:t.firstChild;)t.removeChild(t.firstChild);return"Console cleared"},description:"Clears the terminal screen",flags:{}},echo:{execute:function(e){return t=e.join(" "),(r=document.createElement("div")).classList.add("oval"),r.innerText=t,r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.zIndex="500",r.style.left="50px",r.style.top="50px",document.body.appendChild(r),r.classList.add("oval-animate"),r.addEventListener("animationend",(function(){document.body.removeChild(r)})),"Echo effect triggered for ".concat(e.join(" "));var t,r},description:"Prints back the input received",flags:{}},ls:{execute:function(e){return"file1.txt\nfile2.txt\nfile3.txt"},description:"Lists all available files",flags:{}},about:{execute:function(e){return'I’m a passionate software engineer dedicated to crafting interfaces that delight users and make a difference. Currently, I’m a Software Engineer at JupiterOne , where I advocate for user experience and get to build impactful features every day.'},description:"Displays about information",flags:{}},help:{execute:function(e){for(var t="Available commands:\n",r=0,n=Object.entries(o);r")},description:"Shows help information about all commands",flags:{}},date:{execute:function(e){return(new Date).toString()},description:"Displays the current date and time",flags:{}},whoami:{execute:function(e){return"Karson, Frontend Developer"},description:"Displays user information",flags:{}},skills:{execute:function(e){return e.includes("--languages")?"TypeScript, JavaScript, CSS":e.includes("-l")?"Frontend Development, React, UX Design, TypeScript, JavaScript, Node A11y, Agile, User-Centered Design":"Frontend Development, React, UX Design, TypeScript, JavaScript"},description:"Lists all my skills",flags:{"--languages":"Lists programming languages I know","-l":"Lists all my skills"}},projects:{execute:function(e){return"Projects: "},description:"Lists all my projects",flags:{}},education:{execute:function(e){return'B.S. Digital Marketing, Utah Valley University (2010 - 2014)\n Software Engineering Immersive Flatiron School (2017)\n '},description:"Displays my educational background",flags:{}},experience:{execute:function(e){return'Software Engineer, Applications, JupiterOne (October 2021 - Present)\n Natural Language Querying\n − Designed and developed the integration of generative AI into our search experience, converting natural language to our query language. Resulted in one of our highest adoption rates and helped accelerate platform time-to-value.\n − Implemented a vector database embedding cache, improving query response times and reducing operational costs.\n − Implemented Natural Language Processing (NLP) techniques including fuzzy matching and stop word filtering to enhance search precision.\n\n Design System Development\n − Spearheaded the development of JupiterOne’s design system, including creation of a comprehensive component library, design tokens, and theming system. Helping to streamline the development process and enabling engineers to focus on core feature development.\n − Crafted standardized-yet-customizable component APIs through a mix of composability, customization, and "component slots". Balanced flexibility with ease-of-use, allowing for customization without excessive rigidity. Leveraged standard naming conventions and JSDoc for streamlined development.\n '},description:"Displays my work experience",flags:{}},export:{execute:n,description:"Exports a variable",flags:{}},restore:{execute:function(e){var t=localStorage.getItem("PS1");t&&n(["PS1="+t]);var r=localStorage.getItem("ACCENT_COLOR");return r&&n(["ACCENT_COLOR="+r]),"Restored terminal settings"},description:"Restores terminal settings",flags:{}}},f={cd:{execute:a},rm:{execute:a},sudo:{execute:a},mv:{execute:a},chmod:{execute:a},chown:{execute:a},mkdir:{execute:a},ls:{execute:a},cat:{execute:a},ps:{execute:a},top:{execute:a},vi:{execute:a},nano:{execute:a},exit:{execute:a},man:{execute:a},grep:{execute:a},find:{execute:a},pwd:{execute:a},df:{execute:a},du:{execute:a},curl:{execute:a},wget:{execute:a},ping:{execute:a},ifconfig:{execute:a}},u=["Nice try, but this isn't a real terminal!","You're not fooling anyone.","Did you really think that would work?","You must think you're pretty clever, huh?","You must be new here.","I'm sorry, Dave. I'm afraid I can't do that.","You must be mistaken, this isn't a real terminal.","That command is about as useful here as a chocolate teapot."],c=function(){function e(e,t,r){this.prompt=e,this.terminal=t,this.mirrorElement=r,this.initialize()}return e.prototype.createRipple=function(){var e=document.querySelector(".ripple-container"),t=1.1*Math.max(e.offsetWidth,e.offsetHeight),r=document.createElement("span");r.className="ripple",r.style.setProperty("--ripple-size","".concat(t,"px")),e.appendChild(r),r.addEventListener("animationend",(function(){r.remove()}))},e.prototype.setPromptValue=function(e){this.prompt.value=e,this.mirrorElement.textContent=e},e.prototype.handleBashCommand=function(e,t){void 0===t&&(t=!0),t&&this.createRipple();var r,n,a=e.split(" "),u=(r=a[0],n=a.slice(1),r in f?f[r].execute(n):r in o?o[r].execute(n):"Command not found: ".concat(r)).replace(/\n/g,"
");this.setPromptValue(""),t&&this.addToStdoutLog(e,u)},e.prototype.addToStdoutLog=function(e,t){var r,n=document.querySelector(".tab-panels").querySelector(".stdout-log"),a=document.createElement("li");a.innerHTML='\n
\n
\n '.concat(e,'\n
').concat(t,"
\n
\n
\n "),n.insertBefore(a,n.firstChild);var o=null===(r=document.querySelector('button[role="tab"][aria-selected="true"]'))||void 0===r?void 0:r.id;o&&this.updateBadge("console"!==o)},e.prototype.updateBadge=function(e){var t=document.querySelector("#stdout").querySelector(".unread-badge");e&&t.classList.add("show")},e.prototype.switchTab=function(e){var t;if("stdout"===e){var r=null===(t=document.querySelector('button[role="tab"][aria-selected="true"]'))||void 0===t?void 0:t.id;r&&this.updateBadge("stdout"!==r)}},e.prototype.initialize=function(){var e=this;this.prompt.addEventListener("keydown",(function(t){"Enter"===t.key&&e.prompt.value.trim()&&(t.preventDefault(),e.handleBashCommand(e.prompt.value.trim()),e.setPromptValue(""))})),document.querySelectorAll(".tab").forEach((function(t){t.addEventListener("click",(function(t){var r,n=null===(r=t.target)||void 0===r?void 0:r.getAttribute("data-tab");n&&e.switchTab(n)}))})),this.terminal.addEventListener("click",(function(){e.prompt.focus()})),this.prompt.addEventListener("input",(function(t){var r=t.target;e.setPromptValue(r.value)})),window.addEventListener("executeCommand",(function(t){var r=t.detail.command;e.handleBashCommand(r)}))},e}(),i=document.querySelector(".prompt"),l=document.querySelector(".input-mirror"),s=new c(i,document.querySelector(".terminal"),l);document.addEventListener("DOMContentLoaded",(function(){s.handleBashCommand("restore",!1),s.handleBashCommand("help",!0)}))})()})(); \ No newline at end of file +(()=>{var e={768:function(e){e.exports=function(){"use strict";for(var e=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),er?r:e},t=e,r={},n=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n255)&&(e._clipped=!0),e[r]=t(e[r],0,255)):3===r&&(e[r]=t(e[r],0,1));return e},limit:e,type:f,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==c(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==u(e[t])?e[t].toLowerCase():null},PI:i,TWOPI:2*i,PITHIRD:i/3,DEG2RAD:i/180,RAD2DEG:180/i},s={format:{},autodetect:[]},d=l.last,h=l.clip_rgb,p=l.type,b=s,g=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if("object"===p(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var n=d(e),a=!1;if(!n){a=!0,b.sorted||(b.autodetect=b.autodetect.sort((function(e,t){return t.p-e.p})),b.sorted=!0);for(var o=0,f=b.autodetect;o4?e[4]:1;return 1===o?[0,0,0,f]:[r>=1?0:255*(1-r)*(1-o),n>=1?0:255*(1-n)*(1-o),a>=1?0:255*(1-a)*(1-o),f]},_=y,E=v,C=s,S=l.unpack,L=l.type,A=x;E.prototype.cmyk=function(){return A(this._rgb)},_.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(E,[null].concat(e,["cmyk"])))},C.format.cmyk=N,C.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=S(e,"cmyk"),"array"===L(e)&&4===e.length)return"cmyk"}});var P=l.unpack,O=l.last,I=function(e){return Math.round(100*e)/100},q=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=P(e,"hsla"),n=O(e)||"lsa";return r[0]=I(r[0]||0),r[1]=I(100*r[1])+"%",r[2]=I(100*r[2])+"%","hsla"===n||r.length>3&&r[3]<1?(r[3]=r.length>3?r[3]:1,n="hsla"):r.length=3,n+"("+r.join(",")+")"},D=l.unpack,R=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=D(e,"rgba"))[0],n=e[1],a=e[2];r/=255,n/=255,a/=255;var o,f,c=Math.min(r,n,a),u=Math.max(r,n,a),i=(u+c)/2;return u===c?(o=0,f=Number.NaN):o=i<.5?(u-c)/(u+c):(u-c)/(2-u-c),r==u?f=(n-a)/(u-c):n==u?f=2+(a-r)/(u-c):a==u&&(f=4+(r-n)/(u-c)),(f*=60)<0&&(f+=360),e.length>3&&void 0!==e[3]?[f,o,i,e[3]]:[f,o,i]},j=l.unpack,F=l.last,B=q,T=R,G=Math.round,z=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=j(e,"rgba"),n=F(e)||"rgb";return"hsl"==n.substr(0,3)?B(T(r),n):(r[0]=G(r[0]),r[1]=G(r[1]),r[2]=G(r[2]),("rgba"===n||r.length>3&&r[3]<1)&&(r[3]=r.length>3?r[3]:1,n="rgba"),n+"("+r.slice(0,"rgb"===n?3:4).join(",")+")")},Y=l.unpack,U=Math.round,V=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var n,a,o,f=(t=Y(t,"hsl"))[0],c=t[1],u=t[2];if(0===c)n=a=o=255*u;else{var i=[0,0,0],l=[0,0,0],s=u<.5?u*(1+c):u+c-u*c,d=2*u-s,h=f/360;i[0]=h+1/3,i[1]=h,i[2]=h-1/3;for(var p=0;p<3;p++)i[p]<0&&(i[p]+=1),i[p]>1&&(i[p]-=1),6*i[p]<1?l[p]=d+6*(s-d)*i[p]:2*i[p]<1?l[p]=s:3*i[p]<2?l[p]=d+(s-d)*(2/3-i[p])*6:l[p]=d;n=(e=[U(255*l[0]),U(255*l[1]),U(255*l[2])])[0],a=e[1],o=e[2]}return t.length>3?[n,a,o,t[3]]:[n,a,o,1]},$=V,X=s,J=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,W=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,H=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,K=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Z=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Q=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ee=Math.round,te=function(e){var t;if(e=e.toLowerCase().trim(),X.format.named)try{return X.format.named(e)}catch(e){}if(t=e.match(J)){for(var r=t.slice(1,4),n=0;n<3;n++)r[n]=+r[n];return r[3]=1,r}if(t=e.match(W)){for(var a=t.slice(1,5),o=0;o<4;o++)a[o]=+a[o];return a}if(t=e.match(H)){for(var f=t.slice(1,4),c=0;c<3;c++)f[c]=ee(2.55*f[c]);return f[3]=1,f}if(t=e.match(K)){for(var u=t.slice(1,5),i=0;i<3;i++)u[i]=ee(2.55*u[i]);return u[3]=+u[3],u}if(t=e.match(Z)){var l=t.slice(1,4);l[1]*=.01,l[2]*=.01;var s=$(l);return s[3]=1,s}if(t=e.match(Q)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var h=$(d);return h[3]=+t[4],h}};te.test=function(e){return J.test(e)||W.test(e)||H.test(e)||K.test(e)||Z.test(e)||Q.test(e)};var re=y,ne=v,ae=s,oe=l.type,fe=z,ce=te;ne.prototype.css=function(e){return fe(this._rgb,e)},re.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ne,[null].concat(e,["css"])))},ae.format.css=ce,ae.autodetect.push({p:5,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===oe(e)&&ce.test(e))return"css"}});var ue=v,ie=y,le=l.unpack;s.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=le(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r},ie.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ue,[null].concat(e,["gl"])))},ue.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var se=l.unpack,de=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=se(e,"rgb"),a=n[0],o=n[1],f=n[2],c=Math.min(a,o,f),u=Math.max(a,o,f),i=u-c,l=100*i/255,s=c/(255-i)*100;return 0===i?r=Number.NaN:(a===u&&(r=(o-f)/i),o===u&&(r=2+(f-a)/i),f===u&&(r=4+(a-o)/i),(r*=60)<0&&(r+=360)),[r,l,s]},he=l.unpack,pe=Math.floor,be=function(){for(var e,t,r,n,a,o,f=[],c=arguments.length;c--;)f[c]=arguments[c];var u,i,l,s=(f=he(f,"hcg"))[0],d=f[1],h=f[2];h*=255;var p=255*d;if(0===d)u=i=l=h;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var b=pe(s/=60),g=s-b,v=h*(1-d),m=v+p*(1-g),y=v+p*g,w=v+p;switch(b){case 0:u=(e=[w,y,v])[0],i=e[1],l=e[2];break;case 1:u=(t=[m,w,v])[0],i=t[1],l=t[2];break;case 2:u=(r=[v,w,y])[0],i=r[1],l=r[2];break;case 3:u=(n=[v,m,w])[0],i=n[1],l=n[2];break;case 4:u=(a=[y,v,w])[0],i=a[1],l=a[2];break;case 5:u=(o=[w,v,m])[0],i=o[1],l=o[2]}}return[u,i,l,f.length>3?f[3]:1]},ge=l.unpack,ve=l.type,me=y,ye=v,we=s,ke=de;ye.prototype.hcg=function(){return ke(this._rgb)},me.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ye,[null].concat(e,["hcg"])))},we.format.hcg=be,we.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ge(e,"hcg"),"array"===ve(e)&&3===e.length)return"hcg"}});var xe=l.unpack,Me=l.last,Ne=Math.round,_e=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=xe(e,"rgba"),n=r[0],a=r[1],o=r[2],f=r[3],c=Me(e)||"auto";void 0===f&&(f=1),"auto"===c&&(c=f<1?"rgba":"rgb");var u="000000"+((n=Ne(n))<<16|(a=Ne(a))<<8|(o=Ne(o))).toString(16);u=u.substr(u.length-6);var i="0"+Ne(255*f).toString(16);switch(i=i.substr(i.length-2),c.toLowerCase()){case"rgba":return"#"+u+i;case"argb":return"#"+i+u;default:return"#"+u}},Ee=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ce=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Se=function(e){if(e.match(Ee)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(Ce)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var r=parseInt(e,16);return[r>>24&255,r>>16&255,r>>8&255,Math.round((255&r)/255*100)/100]}throw new Error("unknown hex color: "+e)},Le=y,Ae=v,Pe=l.type,Oe=s,Ie=_e;Ae.prototype.hex=function(e){return Ie(this._rgb,e)},Le.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Ae,[null].concat(e,["hex"])))},Oe.format.hex=Se,Oe.autodetect.push({p:4,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===Pe(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var qe=l.unpack,De=l.TWOPI,Re=Math.min,je=Math.sqrt,Fe=Math.acos,Be=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=qe(e,"rgb"),a=n[0],o=n[1],f=n[2],c=Re(a/=255,o/=255,f/=255),u=(a+o+f)/3,i=u>0?1-c/u:0;return 0===i?r=NaN:(r=(a-o+(a-f))/2,r/=je((a-o)*(a-o)+(a-f)*(o-f)),r=Fe(r),f>o&&(r=De-r),r/=De),[360*r,i,u]},Te=l.unpack,Ge=l.limit,ze=l.TWOPI,Ye=l.PITHIRD,Ue=Math.cos,Ve=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=Te(e,"hsi"))[0],f=e[1],c=e[2];return isNaN(o)&&(o=0),isNaN(f)&&(f=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?n=1-((a=(1-f)/3)+(r=(1+f*Ue(ze*o)/Ue(Ye-ze*o))/3)):o<2/3?a=1-((r=(1-f)/3)+(n=(1+f*Ue(ze*(o-=1/3))/Ue(Ye-ze*o))/3)):r=1-((n=(1-f)/3)+(a=(1+f*Ue(ze*(o-=2/3))/Ue(Ye-ze*o))/3)),[255*(r=Ge(c*r*3)),255*(n=Ge(c*n*3)),255*(a=Ge(c*a*3)),e.length>3?e[3]:1]},$e=l.unpack,Xe=l.type,Je=y,We=v,He=s,Ke=Be;We.prototype.hsi=function(){return Ke(this._rgb)},Je.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(We,[null].concat(e,["hsi"])))},He.format.hsi=Ve,He.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=$e(e,"hsi"),"array"===Xe(e)&&3===e.length)return"hsi"}});var Ze=l.unpack,Qe=l.type,et=y,tt=v,rt=s,nt=R;tt.prototype.hsl=function(){return nt(this._rgb)},et.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(tt,[null].concat(e,["hsl"])))},rt.format.hsl=V,rt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ze(e,"hsl"),"array"===Qe(e)&&3===e.length)return"hsl"}});var at=l.unpack,ot=Math.min,ft=Math.max,ct=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=at(e,"rgb"))[0],f=e[1],c=e[2],u=ot(o,f,c),i=ft(o,f,c),l=i-u;return a=i/255,0===i?(r=Number.NaN,n=0):(n=l/i,o===i&&(r=(f-c)/l),f===i&&(r=2+(c-o)/l),c===i&&(r=4+(o-f)/l),(r*=60)<0&&(r+=360)),[r,n,a]},ut=l.unpack,it=Math.floor,lt=function(){for(var e,t,r,n,a,o,f=[],c=arguments.length;c--;)f[c]=arguments[c];var u,i,l,s=(f=ut(f,"hsv"))[0],d=f[1],h=f[2];if(h*=255,0===d)u=i=l=h;else{360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360);var p=it(s/=60),b=s-p,g=h*(1-d),v=h*(1-d*b),m=h*(1-d*(1-b));switch(p){case 0:u=(e=[h,m,g])[0],i=e[1],l=e[2];break;case 1:u=(t=[v,h,g])[0],i=t[1],l=t[2];break;case 2:u=(r=[g,h,m])[0],i=r[1],l=r[2];break;case 3:u=(n=[g,v,h])[0],i=n[1],l=n[2];break;case 4:u=(a=[m,g,h])[0],i=a[1],l=a[2];break;case 5:u=(o=[h,g,v])[0],i=o[1],l=o[2]}}return[u,i,l,f.length>3?f[3]:1]},st=l.unpack,dt=l.type,ht=y,pt=v,bt=s,gt=ct;pt.prototype.hsv=function(){return gt(this._rgb)},ht.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pt,[null].concat(e,["hsv"])))},bt.format.hsv=lt,bt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=st(e,"hsv"),"array"===dt(e)&&3===e.length)return"hsv"}});var vt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},mt=vt,yt=l.unpack,wt=Math.pow,kt=function(e){return(e/=255)<=.04045?e/12.92:wt((e+.055)/1.055,2.4)},xt=function(e){return e>mt.t3?wt(e,1/3):e/mt.t2+mt.t0},Mt=function(e,t,r){return e=kt(e),t=kt(t),r=kt(r),[xt((.4124564*e+.3575761*t+.1804375*r)/mt.Xn),xt((.2126729*e+.7151522*t+.072175*r)/mt.Yn),xt((.0193339*e+.119192*t+.9503041*r)/mt.Zn)]},Nt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=yt(e,"rgb"),n=r[0],a=r[1],o=r[2],f=Mt(n,a,o),c=f[0],u=f[1],i=116*u-16;return[i<0?0:i,500*(c-u),200*(u-f[2])]},_t=vt,Et=l.unpack,Ct=Math.pow,St=function(e){return 255*(e<=.00304?12.92*e:1.055*Ct(e,1/2.4)-.055)},Lt=function(e){return e>_t.t1?e*e*e:_t.t2*(e-_t.t0)},At=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,a,o=(e=Et(e,"lab"))[0],f=e[1],c=e[2];return n=(o+16)/116,r=isNaN(f)?n:n+f/500,a=isNaN(c)?n:n-c/200,n=_t.Yn*Lt(n),r=_t.Xn*Lt(r),a=_t.Zn*Lt(a),[St(3.2404542*r-1.5371385*n-.4985314*a),St(-.969266*r+1.8760108*n+.041556*a),St(.0556434*r-.2040259*n+1.0572252*a),e.length>3?e[3]:1]},Pt=l.unpack,Ot=l.type,It=y,qt=v,Dt=s,Rt=Nt;qt.prototype.lab=function(){return Rt(this._rgb)},It.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(qt,[null].concat(e,["lab"])))},Dt.format.lab=At,Dt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Pt(e,"lab"),"array"===Ot(e)&&3===e.length)return"lab"}});var jt=l.unpack,Ft=l.RAD2DEG,Bt=Math.sqrt,Tt=Math.atan2,Gt=Math.round,zt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=jt(e,"lab"),n=r[0],a=r[1],o=r[2],f=Bt(a*a+o*o),c=(Tt(o,a)*Ft+360)%360;return 0===Gt(1e4*f)&&(c=Number.NaN),[n,f,c]},Yt=l.unpack,Ut=Nt,Vt=zt,$t=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Yt(e,"rgb"),n=r[0],a=r[1],o=r[2],f=Ut(n,a,o),c=f[0],u=f[1],i=f[2];return Vt(c,u,i)},Xt=l.unpack,Jt=l.DEG2RAD,Wt=Math.sin,Ht=Math.cos,Kt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Xt(e,"lch"),n=r[0],a=r[1],o=r[2];return isNaN(o)&&(o=0),[n,Ht(o*=Jt)*a,Wt(o)*a]},Zt=l.unpack,Qt=Kt,er=At,tr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=Zt(e,"lch"))[0],n=e[1],a=e[2],o=Qt(r,n,a),f=o[0],c=o[1],u=o[2],i=er(f,c,u);return[i[0],i[1],i[2],e.length>3?e[3]:1]},rr=l.unpack,nr=tr,ar=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=rr(e,"hcl").reverse();return nr.apply(void 0,r)},or=l.unpack,fr=l.type,cr=y,ur=v,ir=s,lr=$t;ur.prototype.lch=function(){return lr(this._rgb)},ur.prototype.hcl=function(){return lr(this._rgb).reverse()},cr.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ur,[null].concat(e,["lch"])))},cr.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ur,[null].concat(e,["hcl"])))},ir.format.lch=tr,ir.format.hcl=ar,["lch","hcl"].forEach((function(e){return ir.autodetect.push({p:2,test:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(t=or(t,e),"array"===fr(t)&&3===t.length)return e}})}));var sr={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},dr=s,hr=l.type,pr=sr,br=Se,gr=_e;v.prototype.name=function(){for(var e=gr(this._rgb,"rgb"),t=0,r=Object.keys(pr);t0;)t[r]=arguments[r+1];if(!t.length&&"string"===hr(e)&&pr[e.toLowerCase()])return"named"}});var vr=l.unpack,mr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=vr(e,"rgb");return(r[0]<<16)+(r[1]<<8)+r[2]},yr=l.type,wr=y,kr=v,xr=s,Mr=l.type,Nr=mr;kr.prototype.num=function(){return Nr(this._rgb)},wr.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(kr,[null].concat(e,["num"])))},xr.format.num=function(e){if("number"==yr(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},xr.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Mr(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var _r=y,Er=v,Cr=s,Sr=l.unpack,Lr=l.type,Ar=Math.round;Er.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Ar)},Er.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,r){return r<3?!1===e?t:Ar(t):t}))},_r.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Er,[null].concat(e,["rgb"])))},Cr.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Sr(e,"rgba");return void 0===r[3]&&(r[3]=1),r},Cr.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Sr(e,"rgba"),"array"===Lr(e)&&(3===e.length||4===e.length&&"number"==Lr(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var Pr=Math.log,Or=function(e){var t,r,n,a=e/100;return a<66?(t=255,r=a<6?0:-155.25485562709179-.44596950469579133*(r=a-2)+104.49216199393888*Pr(r),n=a<20?0:.8274096064007395*(n=a-10)-254.76935184120902+115.67994401066147*Pr(n)):(t=351.97690566805693+.114206453784165*(t=a-55)-40.25366309332127*Pr(t),r=325.4494125711974+.07943456536662342*(r=a-50)-28.0852963507957*Pr(r),n=255),[t,r,n,1]},Ir=Or,qr=l.unpack,Dr=Math.round,Rr=y,jr=v,Fr=s,Br=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r,n=qr(e,"rgb"),a=n[0],o=n[2],f=1e3,c=4e4;c-f>.4;){var u=Ir(r=.5*(c+f));u[2]/u[0]>=o/a?c=r:f=r}return Dr(r)};jr.prototype.temp=jr.prototype.kelvin=jr.prototype.temperature=function(){return Br(this._rgb)},Rr.temp=Rr.kelvin=Rr.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(jr,[null].concat(e,["temp"])))},Fr.format.temp=Fr.format.kelvin=Fr.format.temperature=Or;var Tr=l.unpack,Gr=Math.cbrt,zr=Math.pow,Yr=Math.sign,Ur=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Tr(e,"rgb"),n=r[0],a=r[1],o=r[2],f=[Vr(n/255),Vr(a/255),Vr(o/255)],c=f[0],u=f[1],i=f[2],l=Gr(.4122214708*c+.5363325363*u+.0514459929*i),s=Gr(.2119034982*c+.6806995451*u+.1073969566*i),d=Gr(.0883024619*c+.2817188376*u+.6299787005*i);return[.2104542553*l+.793617785*s-.0040720468*d,1.9779984951*l-2.428592205*s+.4505937099*d,.0259040371*l+.7827717662*s-.808675766*d]};function Vr(e){var t=Math.abs(e);return t<.04045?e/12.92:(Yr(e)||1)*zr((t+.055)/1.055,2.4)}var $r=l.unpack,Xr=Math.pow,Jr=Math.sign,Wr=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=$r(e,"lab"))[0],n=e[1],a=e[2],o=Xr(r+.3963377774*n+.2158037573*a,3),f=Xr(r-.1055613458*n-.0638541728*a,3),c=Xr(r-.0894841775*n-1.291485548*a,3);return[255*Hr(4.0767416621*o-3.3077115913*f+.2309699292*c),255*Hr(-1.2684380046*o+2.6097574011*f-.3413193965*c),255*Hr(-.0041960863*o-.7034186147*f+1.707614701*c),e.length>3?e[3]:1]};function Hr(e){var t=Math.abs(e);return t>.0031308?(Jr(e)||1)*(1.055*Xr(t,1/2.4)-.055):12.92*e}var Kr=l.unpack,Zr=l.type,Qr=y,en=v,tn=s,rn=Ur;en.prototype.oklab=function(){return rn(this._rgb)},Qr.oklab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(en,[null].concat(e,["oklab"])))},tn.format.oklab=Wr,tn.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Kr(e,"oklab"),"array"===Zr(e)&&3===e.length)return"oklab"}});var nn=l.unpack,an=Ur,on=zt,fn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=nn(e,"rgb"),n=r[0],a=r[1],o=r[2],f=an(n,a,o),c=f[0],u=f[1],i=f[2];return on(c,u,i)},cn=l.unpack,un=Kt,ln=Wr,sn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=cn(e,"lch"))[0],n=e[1],a=e[2],o=un(r,n,a),f=o[0],c=o[1],u=o[2],i=ln(f,c,u);return[i[0],i[1],i[2],e.length>3?e[3]:1]},dn=l.unpack,hn=l.type,pn=y,bn=v,gn=s,vn=fn;bn.prototype.oklch=function(){return vn(this._rgb)},pn.oklch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(bn,[null].concat(e,["oklch"])))},gn.format.oklch=sn,gn.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=dn(e,"oklch"),"array"===hn(e)&&3===e.length)return"oklch"}});var mn=v,yn=l.type;mn.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===yn(e)?t?(this._rgb[3]=e,this):new mn([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},v.prototype.clipped=function(){return this._rgb._clipped||!1};var wn=v,kn=vt;wn.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=kn.Kn*e,new wn(t,"lab").alpha(this.alpha(),!0)},wn.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},wn.prototype.darker=wn.prototype.darken,wn.prototype.brighter=wn.prototype.brighten,v.prototype.get=function(e){var t=e.split("."),r=t[0],n=t[1],a=this[r]();if(n){var o=r.indexOf(n)-("ok"===r.substr(0,2)?2:0);if(o>-1)return a[o];throw new Error("unknown channel "+n+" in mode "+r)}return a};var xn=v,Mn=l.type,Nn=Math.pow;xn.prototype.luminance=function(e){if(void 0!==e&&"number"===Mn(e)){if(0===e)return new xn([0,0,0,this._rgb[3]],"rgb");if(1===e)return new xn([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),r=20,n=function(t,a){var o=t.interpolate(a,.5,"rgb"),f=o.luminance();return Math.abs(e-f)<1e-7||!r--?o:f>e?n(t,o):n(o,a)},a=(t>e?n(new xn([0,0,0]),this):n(this,new xn([255,255,255]))).rgb();return new xn(a.concat([this._rgb[3]]))}return _n.apply(void 0,this._rgb.slice(0,3))};var _n=function(e,t,r){return.2126*(e=En(e))+.7152*(t=En(t))+.0722*En(r)},En=function(e){return(e/=255)<=.03928?e/12.92:Nn((e+.055)/1.055,2.4)},Cn={},Sn=v,Ln=l.type,An=Cn,Pn=function(e,t,r){void 0===r&&(r=.5);for(var n=[],a=arguments.length-3;a-- >0;)n[a]=arguments[a+3];var o=n[0]||"lrgb";if(An[o]||n.length||(o=Object.keys(An)[0]),!An[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==Ln(e)&&(e=new Sn(e)),"object"!==Ln(t)&&(t=new Sn(t)),An[o](e,t,r).alpha(e.alpha()+r*(t.alpha()-e.alpha()))},On=v,In=Pn;On.prototype.mix=On.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return In.apply(void 0,[this,e,t].concat(r))};var qn=v;qn.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,r=t[3];return e?(this._rgb=[t[0]*r,t[1]*r,t[2]*r,r],this):new qn([t[0]*r,t[1]*r,t[2]*r,r],"rgb")};var Dn=v,Rn=vt;Dn.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Rn.Kn*e,t[1]<0&&(t[1]=0),new Dn(t,"lch").alpha(this.alpha(),!0)},Dn.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var jn=v,Fn=l.type;jn.prototype.set=function(e,t,r){void 0===r&&(r=!1);var n=e.split("."),a=n[0],o=n[1],f=this[a]();if(o){var c=a.indexOf(o)-("ok"===a.substr(0,2)?2:0);if(c>-1){if("string"==Fn(t))switch(t.charAt(0)){case"+":case"-":f[c]+=+t;break;case"*":f[c]*=+t.substr(1);break;case"/":f[c]/=+t.substr(1);break;default:f[c]=+t}else{if("number"!==Fn(t))throw new Error("unsupported value for Color.set");f[c]=t}var u=new jn(f,a);return r?(this._rgb=u._rgb,this):u}throw new Error("unknown channel "+o+" in mode "+a)}return f};var Bn=v;Cn.rgb=function(e,t,r){var n=e._rgb,a=t._rgb;return new Bn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"rgb")};var Tn=v,Gn=Math.sqrt,zn=Math.pow;Cn.lrgb=function(e,t,r){var n=e._rgb,a=n[0],o=n[1],f=n[2],c=t._rgb,u=c[0],i=c[1],l=c[2];return new Tn(Gn(zn(a,2)*(1-r)+zn(u,2)*r),Gn(zn(o,2)*(1-r)+zn(i,2)*r),Gn(zn(f,2)*(1-r)+zn(l,2)*r),"rgb")};var Yn=v;Cn.lab=function(e,t,r){var n=e.lab(),a=t.lab();return new Yn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"lab")};var Un=v,Vn=function(e,t,r,n){var a,o,f,c,u,i,l,s,d,h,p,b,g;return"hsl"===n?(f=e.hsl(),c=t.hsl()):"hsv"===n?(f=e.hsv(),c=t.hsv()):"hcg"===n?(f=e.hcg(),c=t.hcg()):"hsi"===n?(f=e.hsi(),c=t.hsi()):"lch"===n||"hcl"===n?(n="hcl",f=e.hcl(),c=t.hcl()):"oklch"===n&&(f=e.oklch().reverse(),c=t.oklch().reverse()),"h"!==n.substr(0,1)&&"oklch"!==n||(u=(a=f)[0],l=a[1],d=a[2],i=(o=c)[0],s=o[1],h=o[2]),isNaN(u)||isNaN(i)?isNaN(u)?isNaN(i)?b=Number.NaN:(b=i,1!=d&&0!=d||"hsv"==n||(p=s)):(b=u,1!=h&&0!=h||"hsv"==n||(p=l)):b=u+r*(i>u&&i-u>180?i-(u+360):i180?i+360-u:i-u),void 0===p&&(p=l+r*(s-l)),g=d+r*(h-d),new Un("oklch"===n?[g,p,b]:[b,p,g],n)},$n=Vn,Xn=function(e,t,r){return $n(e,t,r,"lch")};Cn.lch=Xn,Cn.hcl=Xn;var Jn=v;Cn.num=function(e,t,r){var n=e.num(),a=t.num();return new Jn(n+r*(a-n),"num")};var Wn=Vn;Cn.hcg=function(e,t,r){return Wn(e,t,r,"hcg")};var Hn=Vn;Cn.hsi=function(e,t,r){return Hn(e,t,r,"hsi")};var Kn=Vn;Cn.hsl=function(e,t,r){return Kn(e,t,r,"hsl")};var Zn=Vn;Cn.hsv=function(e,t,r){return Zn(e,t,r,"hsv")};var Qn=v;Cn.oklab=function(e,t,r){var n=e.oklab(),a=t.oklab();return new Qn(n[0]+r*(a[0]-n[0]),n[1]+r*(a[1]-n[1]),n[2]+r*(a[2]-n[2]),"oklab")};var ea=Vn;Cn.oklch=function(e,t,r){return ea(e,t,r,"oklch")};var ta=v,ra=l.clip_rgb,na=Math.pow,aa=Math.sqrt,oa=Math.PI,fa=Math.cos,ca=Math.sin,ua=Math.atan2,ia=function(e,t){for(var r=e.length,n=[0,0,0,0],a=0;a.9999999&&(n[3]=1),new ta(ra(n))},la=y,sa=l.type,da=Math.pow,ha=function(e){var t="rgb",r=la("#ccc"),n=0,a=[0,1],o=[],f=[0,0],c=!1,u=[],i=!1,l=0,s=1,d=!1,h={},p=!0,b=1,g=function(e){if((e=e||["#fff","#000"])&&"string"===sa(e)&&la.brewer&&la.brewer[e.toLowerCase()]&&(e=la.brewer[e.toLowerCase()]),"array"===sa(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t2?function(e){if(null!=c){for(var t=c.length-1,r=0;r=c[r];)r++;return r-1}return 0}(e)/(c.length-2):s!==l?(e-l)/(s-l):1,i=m(i),n||(i=v(i)),1!==b&&(i=da(i,b)),i=f[0]+i*(1-f[0]-f[1]),i=Math.min(1,Math.max(0,i));var d=Math.floor(1e4*i);if(p&&h[d])a=h[d];else{if("array"===sa(u))for(var g=0;g=y&&g===o.length-1){a=u[g];break}if(i>y&&i2){var i=e.map((function(t,r){return r/(e.length-1)})),d=e.map((function(e){return(e-l)/(s-l)}));d.every((function(e,t){return i[t]===e}))||(m=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=d[t+1];)t++;var r=(e-d[t])/(d[t+1]-d[t]);return i[t]+r*(i[t+1]-i[t])})}}return a=[l,s],k},k.mode=function(e){return arguments.length?(t=e,w(),k):t},k.range=function(e,t){return g(e),k},k.out=function(e){return i=e,k},k.spread=function(e){return arguments.length?(n=e,k):n},k.correctLightness=function(e){return null==e&&(e=!0),d=e,w(),v=d?function(e){for(var t=y(0,!0).lab()[0],r=y(1,!0).lab()[0],n=t>r,a=y(e,!0).lab()[0],o=t+(r-t)*e,f=a-o,c=0,u=1,i=20;Math.abs(f)>.01&&i-- >0;)n&&(f*=-1),f<0?(c=e,e+=.5*(u-e)):(u=e,e+=.5*(c-e)),f=(a=y(e,!0).lab()[0])-o;return e}:function(e){return e},k},k.padding=function(e){return null!=e?("number"===sa(e)&&(e=[e,e]),f=e,k):f},k.colors=function(t,r){arguments.length<2&&(r="hex");var n=[];if(0===arguments.length)n=u.slice(0);else if(1===t)n=[k(.5)];else if(t>1){var o=a[0],f=a[1]-o;n=function(e,t,r){for(var n=[],a=eo;a?f++:f--)n.push(f);return n}(0,t,!1).map((function(e){return k(o+e/(t-1)*f)}))}else{e=[];var i=[];if(c&&c.length>2)for(var l=1,s=c.length,d=1<=s;d?ls;d?l++:l--)i.push(.5*(c[l-1]+c[l]));else i=a;n=i.map((function(e){return k(e)}))}return la[r]&&(n=n.map((function(e){return e[r]()}))),n},k.cache=function(e){return null!=e?(p=e,k):p},k.gamma=function(e){return null!=e?(b=e,k):b},k.nodata=function(e){return null!=e?(r=la(e),k):r},k};var pa=v,ba=ha,ga=y,va=function(e,t,r){if(!va[r])throw new Error("unknown blend mode "+r);return va[r](e,t)},ma=function(e){return function(t,r){var n=ga(r).rgb(),a=ga(t).rgb();return ga.rgb(e(n,a))}},ya=function(e){return function(t,r){var n=[];return n[0]=e(t[0],r[0]),n[1]=e(t[1],r[1]),n[2]=e(t[2],r[2]),n}};va.normal=ma(ya((function(e){return e}))),va.multiply=ma(ya((function(e,t){return e*t/255}))),va.screen=ma(ya((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),va.overlay=ma(ya((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),va.darken=ma(ya((function(e,t){return e>t?t:e}))),va.lighten=ma(ya((function(e,t){return e>t?e:t}))),va.dodge=ma(ya((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),va.burn=ma(ya((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var wa=va,ka=l.type,xa=l.clip_rgb,Ma=l.TWOPI,Na=Math.pow,_a=Math.sin,Ea=Math.cos,Ca=y,Sa=v,La=Math.floor,Aa=Math.random,Pa=f,Oa=Math.log,Ia=Math.pow,qa=Math.floor,Da=Math.abs,Ra=function(e,t){void 0===t&&(t=null);var r={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Pa(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===Pa(e)&&(e=e[t]),null==e||isNaN(e)||(r.values.push(e),r.sum+=e,er.max&&(r.max=e),r.count+=1)})),r.domain=[r.min,r.max],r.limits=function(e,t){return ja(r,e,t)},r},ja=function(e,t,r){void 0===t&&(t="equal"),void 0===r&&(r=7),"array"==Pa(e)&&(e=Ra(e));var n=e.min,a=e.max,o=e.values.sort((function(e,t){return e-t}));if(1===r)return[n,a];var f=[];if("c"===t.substr(0,1)&&(f.push(n),f.push(a)),"e"===t.substr(0,1)){f.push(n);for(var c=1;c 0");var u=Math.LOG10E*Oa(n),i=Math.LOG10E*Oa(a);f.push(n);for(var l=1;l200&&(y=!1)}for(var D={},R=0;R=360;)p-=360;f[h]=p}else f[h]=f[h]/c[h];return d/=n,new ta(f,t).alpha(d>.99999?1:d,!0)},co.bezier=function(e){var t=function(e){var t,r,n,a,o,f,c;if(2===(e=e.map((function(e){return new pa(e)}))).length)t=e.map((function(e){return e.lab()})),o=t[0],f=t[1],a=function(e){var t=[0,1,2].map((function(t){return o[t]+e*(f[t]-o[t])}));return new pa(t,"lab")};else if(3===e.length)r=e.map((function(e){return e.lab()})),o=r[0],f=r[1],c=r[2],a=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*o[t]+2*(1-e)*e*f[t]+e*e*c[t]}));return new pa(t,"lab")};else if(4===e.length){var u;n=e.map((function(e){return e.lab()})),o=n[0],f=n[1],c=n[2],u=n[3],a=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*o[t]+3*(1-e)*(1-e)*e*f[t]+3*(1-e)*e*e*c[t]+e*e*e*u[t]}));return new pa(t,"lab")}}else{if(!(e.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,s;i=e.map((function(e){return e.lab()})),s=e.length-1,l=function(e){for(var t=[1,1],r=1;rn?(r+.05)/(n+.05):(n+.05)/(r+.05)},co.deltaE=function(e,t,r,n,a){void 0===r&&(r=1),void 0===n&&(n=1),void 0===a&&(a=1);var o=function(e){return 360*e/(2*Ha)},f=function(e){return 2*Ha*e/360};e=new Ta(e),t=new Ta(t);var c=Array.from(e.lab()),u=c[0],i=c[1],l=c[2],s=Array.from(t.lab()),d=s[0],h=s[1],p=s[2],b=(u+d)/2,g=(Ga(za(i,2)+za(l,2))+Ga(za(h,2)+za(p,2)))/2,v=.5*(1-Ga(za(g,7)/(za(g,7)+za(25,7)))),m=i*(1+v),y=h*(1+v),w=Ga(za(m,2)+za(l,2)),k=Ga(za(y,2)+za(p,2)),x=(w+k)/2,M=o(Va(l,m)),N=o(Va(p,y)),_=M>=0?M:M+360,E=N>=0?N:N+360,C=$a(_-E)>180?(_+E+360)/2:(_+E)/2,S=1-.17*Xa(f(C-30))+.24*Xa(f(2*C))+.32*Xa(f(3*C+6))-.2*Xa(f(4*C-63)),L=E-_;L=$a(L)<=180?L:E<=_?L+360:L-360,L=2*Ga(w*k)*Ja(f(L)/2);var A=d-u,P=k-w,O=1+.015*za(b-50,2)/Ga(20+za(b-50,2)),I=1+.045*x,q=1+.015*x*S,D=30*Wa(-za((C-275)/25,2)),R=-2*Ga(za(x,7)/(za(x,7)+za(25,7)))*Ja(2*f(D)),j=Ga(za(A/(r*O),2)+za(P/(n*I),2)+za(L/(a*q),2)+R*(P/(n*I))*(L/(a*q)));return Ua(0,Ya(100,j))},co.distance=function(e,t,r){void 0===r&&(r="lab"),e=new Ka(e),t=new Ka(t);var n=e.get(r),a=t.get(r),o=0;for(var f in n){var c=(n[f]||0)-(a[f]||0);o+=c*c}return Math.sqrt(o)},co.limits=Fa.limits,co.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(Za,[null].concat(e))),!0}catch(e){return!1}},co.scales=to,co.colors=sr,co.brewer=fo,co}()}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(768),t=r.n(e),n=function(e){var r,n=e[0];if(n.startsWith("PS1=")){var a=n.slice(4).trim();return document.querySelectorAll(".system-prompt").forEach((function(e){e.textContent=a})),r=a,localStorage.setItem("PS1",r),"Prompt character changed to ".concat(a)}if(n.startsWith("ACCENT_COLOR=")){var o=e.join(" ").slice(13).trim();return function(e){try{if(o=e,!t().valid(o))return!1;var r=function(e){var t=e.luminance();t<.25?e=e.luminance(.25):t>.5&&(e=e.luminance(.5));var r=e.get("hsl.s");return e.set("hsl.s",Math.min(r,.85))}(t()(e)),n=function(e){if(0===e.get("hsl.s")){var r=["#00796b","#00acc1","#1976d2","#2196f3"];e=t()(r[Math.floor(Math.random()*r.length)])}var n=e.set("hsl.s",1);if(n.set("hsl.l",.75),t().contrast(n,e)>=1.75)return n;for(var a=1;a<=20;a++){var o=n.set("hsl.l",n.get("hsl.l")+.05*a);if(t().contrast(o,e)>=1.75)return o}return n}(r),a=function(e){return e.get("hsl.s")<.2}(n)?"underline":"none";return function(e,t){var r=e.hex(),n=t.hex();localStorage.setItem("ACCENT_COLOR",r),localStorage.setItem("LINK_COLOR",n)}(r,n),function(e,t,r){var n=e.hex(),a=t.hex();document.documentElement.style.setProperty("--accent-color",n),document.documentElement.style.setProperty("--accent-color-contrast",a),document.documentElement.style.setProperty("--accent-decoration",r)}(r,n,a),!0}catch(e){return console.error(e),!1}var o}(o)?"Accent changed to ".concat(o):"Invalid color. Please provide: #000000, rgb(0, 0, 0) or any valid css color."}return"Invalid export command. Usage: export PS1=$, export ACCENT_COLOR=#"},a=function(){var e=Math.floor(Math.random()*c.length);return c[e]},o={clear:{execute:function(e){for(var t=document.querySelector(".stdout-log");null==t?void 0:t.firstChild;)t.removeChild(t.firstChild);return"Console cleared"},description:"Clears the terminal screen",flags:{}},echo:{execute:function(e){return t=e.join(" "),(r=document.createElement("div")).classList.add("oval"),r.innerText=t,r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.zIndex="500",r.style.left="50px",r.style.top="50px",document.body.appendChild(r),r.classList.add("oval-animate"),r.addEventListener("animationend",(function(){document.body.removeChild(r)})),"Echo effect triggered for ".concat(e.join(" "));var t,r},description:"Prints back the input received",flags:{}},ls:{execute:function(e){return"file1.txt\nfile2.txt\nfile3.txt"},description:"Lists all available files",flags:{}},about:{execute:function(e){return'I’m a passionate software engineer dedicated to crafting interfaces that delight users and make a difference. Currently, I’m a Software Engineer at JupiterOne , where I advocate for user experience and get to build impactful features every day.'},description:"Displays about information",flags:{}},help:{execute:function(e){for(var t="Available commands:\n",r=0,n=Object.entries(o);r")},description:"Shows help information about all commands",flags:{}},date:{execute:function(e){return(new Date).toString()},description:"Displays the current date and time",flags:{}},whoami:{execute:function(e){return"Karson, Frontend Developer"},description:"Displays user information",flags:{}},skills:{execute:function(e){return e.includes("--languages")?"TypeScript, JavaScript, CSS":e.includes("-l")?"Frontend Development, React, UX Design, TypeScript, JavaScript, Node A11y, Agile, User-Centered Design":"Frontend Development, React, UX Design, TypeScript, JavaScript"},description:"Lists all my skills",flags:{"--languages":"Lists programming languages I know","-l":"Lists all my skills"}},projects:{execute:function(e){return"Projects: "},description:"Lists all my projects",flags:{}},education:{execute:function(e){return'B.S. Digital Marketing, Utah Valley University (2010 - 2014)\n Software Engineering Immersive Flatiron School (2017)\n '},description:"Displays my educational background",flags:{}},experience:{execute:function(e){return'Software Engineer, Applications, JupiterOne (October 2021 - Present)\n Natural Language Querying\n − Designed and developed the integration of generative AI into our search experience, converting natural language to our query language. Resulted in one of our highest adoption rates and helped accelerate platform time-to-value.\n − Implemented a vector database embedding cache, improving query response times and reducing operational costs.\n − Implemented Natural Language Processing (NLP) techniques including fuzzy matching and stop word filtering to enhance search precision.\n\n Design System Development\n − Spearheaded the development of JupiterOne’s design system, including creation of a comprehensive component library, design tokens, and theming system. Helping to streamline the development process and enabling engineers to focus on core feature development.\n − Crafted standardized-yet-customizable component APIs through a mix of composability, customization, and "component slots". Balanced flexibility with ease-of-use, allowing for customization without excessive rigidity. Leveraged standard naming conventions and JSDoc for streamlined development.\n '},description:"Displays my work experience",flags:{}},export:{execute:n,description:"Exports a variable",flags:{}},restore:{execute:function(e){var t=localStorage.getItem("PS1");t&&n(["PS1="+t]);var r=localStorage.getItem("ACCENT_COLOR");return r&&n(["ACCENT_COLOR="+r]),"Restored terminal settings"},description:"Restores terminal settings",flags:{}}},f={cd:{execute:a},rm:{execute:a},sudo:{execute:a},mv:{execute:a},chmod:{execute:a},chown:{execute:a},mkdir:{execute:a},ls:{execute:a},cat:{execute:a},ps:{execute:a},top:{execute:a},vi:{execute:a},nano:{execute:a},exit:{execute:a},man:{execute:a},grep:{execute:a},find:{execute:a},pwd:{execute:a},df:{execute:a},du:{execute:a},curl:{execute:a},wget:{execute:a},ping:{execute:a},ifconfig:{execute:a}},c=["Nice try, but this isn't a real terminal!","You're not fooling anyone.","Did you really think that would work?","You must think you're pretty clever, huh?","You must be new here.","I'm sorry, Dave. I'm afraid I can't do that.","You must be mistaken, this isn't a real terminal.","That command is about as useful here as a chocolate teapot."],u=function(){function e(e,t,r){this.prompt=e,this.terminal=t,this.mirrorElement=r,this.initialize()}return e.prototype.createRipple=function(){var e=document.querySelector(".ripple-container"),t=1.1*Math.max(e.offsetWidth,e.offsetHeight),r=document.createElement("span");r.className="ripple",r.style.setProperty("--ripple-size","".concat(t,"px")),e.appendChild(r),r.addEventListener("animationend",(function(){r.remove()}))},e.prototype.setPromptValue=function(e){this.prompt.value=e,this.mirrorElement.textContent=e},e.prototype.handleBashCommand=function(e,t){void 0===t&&(t=!0),t&&this.createRipple();var r,n,a=e.split(" "),c=(r=a[0],n=a.slice(1),r in f?f[r].execute(n):r in o?o[r].execute(n):"Command not found: ".concat(r)).replace(/\n/g,"
");this.setPromptValue(""),t&&this.addToStdoutLog(e,c)},e.prototype.addToStdoutLog=function(e,t){var r,n=document.querySelector(".tab-panels").querySelector(".stdout-log"),a=document.createElement("li");a.innerHTML='\n
\n
\n '.concat(e,'\n
').concat(t,"
\n
\n
\n "),n.insertBefore(a,n.firstChild);var o=null===(r=document.querySelector('button[role="tab"][aria-selected="true"]'))||void 0===r?void 0:r.id;o&&this.updateBadge("console"!==o)},e.prototype.updateBadge=function(e){var t=document.querySelector("#stdout").querySelector(".unread-badge");e&&t.classList.add("show")},e.prototype.switchTab=function(e){var t;if("stdout"===e){var r=null===(t=document.querySelector('button[role="tab"][aria-selected="true"]'))||void 0===t?void 0:t.id;r&&this.updateBadge("stdout"!==r)}},e.prototype.initialize=function(){var e=this;this.prompt.addEventListener("keydown",(function(t){"Enter"===t.key&&e.prompt.value.trim()&&(t.preventDefault(),e.handleBashCommand(e.prompt.value.trim()),e.setPromptValue(""))})),document.querySelectorAll(".tab").forEach((function(t){t.addEventListener("click",(function(t){var r,n=null===(r=t.target)||void 0===r?void 0:r.getAttribute("data-tab");n&&e.switchTab(n)}))})),this.terminal.addEventListener("click",(function(){e.prompt.focus()})),this.prompt.addEventListener("input",(function(t){var r=t.target;e.setPromptValue(r.value)})),window.addEventListener("executeCommand",(function(t){var r=t.detail.command;e.handleBashCommand(r)}))},e}(),i=document.querySelector(".prompt"),l=document.querySelector(".input-mirror"),s=new u(i,document.querySelector(".terminal"),l);document.addEventListener("DOMContentLoaded",(function(){s.handleBashCommand("restore",!1),s.handleBashCommand("help",!0)}))})()})(); \ No newline at end of file diff --git a/assets/ts/terminal/updateAccentColor.ts b/assets/ts/terminal/updateAccentColor.ts index e18dafb..7603c77 100644 --- a/assets/ts/terminal/updateAccentColor.ts +++ b/assets/ts/terminal/updateAccentColor.ts @@ -8,7 +8,7 @@ export const updateAccentColor = (inputColor: string): boolean => { const accentColor = getAdjustedAccentColor(chroma(inputColor)); const accentColorContrast = getContrastColor(accentColor); - const accentDecoration = isLightColor(accentColorContrast) + const accentDecoration = hasLowSaturation(accentColorContrast) ? "underline" : "none"; @@ -31,8 +31,8 @@ const getAdjustedAccentColor = (color: chroma.Color): chroma.Color => { const luminance = color.luminance(); if (luminance < 0.25) { color = color.luminance(0.25); - } else if (luminance > 0.75) { - color = color.luminance(0.75); + } else if (luminance > 0.5) { + color = color.luminance(0.5); } // Ensure color is vibrant but not fully saturated @@ -41,21 +41,27 @@ const getAdjustedAccentColor = (color: chroma.Color): chroma.Color => { }; const getContrastColor = (accentColor: chroma.Color): chroma.Color => { - // Generate a fully vibrant version of the accent color - let vibrantColor = accentColor.set("hsl.s", 1); + // Check if the color is totally grey + if (accentColor.get("hsl.s") === 0) { + // Return a vibrant link-friendly color like teal blue + const colorOptions = ["#00796b", "#00acc1", "#1976d2", "#2196f3"]; + accentColor = chroma( + colorOptions[Math.floor(Math.random() * colorOptions.length)] + ); + } + + const vibrantColor = accentColor.set("hsl.s", 1); + vibrantColor.set("hsl.l", 0.75); const MIN_CONTRAST = 1.75; // Ensure the vibrant color meets the 3 contrast ratio against the accent color - if ( - chroma.contrast(vibrantColor, accentColor) >= MIN_CONTRAST - // && chroma.contrast(vibrantColor, "black") >= 4.5 - ) { + if (chroma.contrast(vibrantColor, accentColor) >= MIN_CONTRAST) { return vibrantColor; } // Adjust the lightness to find a suitable contrast color - const lightnessSteps = 10; + const lightnessSteps = 20; const lightnessIncrement = 1 / lightnessSteps; for (let i = 1; i <= lightnessSteps; i++) { @@ -63,10 +69,7 @@ const getContrastColor = (accentColor: chroma.Color): chroma.Color => { "hsl.l", vibrantColor.get("hsl.l") + lightnessIncrement * i ); - if ( - chroma.contrast(lightenedColor, accentColor) >= MIN_CONTRAST - // && chroma.contrast(lightenedColor, "black") >= 4.5 - ) { + if (chroma.contrast(lightenedColor, accentColor) >= MIN_CONTRAST) { return lightenedColor; } } @@ -75,8 +78,10 @@ const getContrastColor = (accentColor: chroma.Color): chroma.Color => { return vibrantColor; }; -const isLightColor = (color: chroma.Color): boolean => { - return color.luminance() > 0.75; +const hasLowSaturation = (color: chroma.Color): boolean => { + const saturation = color.get("hsl.s"); + // Adjusting the condition to focus on low saturation to include all shades of grey and white. + return saturation < 0.2; }; const setColorsInLocalStorage = (