Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nordhealth/color

Package Overview
Dependencies
Maintainers
4
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nordhealth/color - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

2

lib/index.common.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var r={exports:{}};r.exports=function(){for(var r=function(r,e,t){return void 0===e&&(e=0),void 0===t&&(t=1),r<e?e:r>t?t:r},e=r,t=function(r){r._clipped=!1,r._unclipped=r.slice(0);for(var t=0;t<=3;t++)t<3?((r[t]<0||r[t]>255)&&(r._clipped=!0),r[t]=e(r[t],0,255)):3===t&&(r[t]=e(r[t],0,1));return r},n={},a=0,f=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a<f.length;a+=1){var o=f[a];n["[object "+o+"]"]=o.toLowerCase()}var u=function(r){return n[Object.prototype.toString.call(r)]||"object"},c=u,i=function(r,e){return void 0===e&&(e=null),r.length>=3?Array.prototype.slice.call(r):"object"==c(r[0])&&e?e.split("").filter((function(e){return void 0!==r[0][e]})).map((function(e){return r[0][e]})):r[0]},l=u,h=function(r){if(r.length<2)return null;var e=r.length-1;return"string"==l(r[e])?r[e].toLowerCase():null},s=Math.PI,d={clip_rgb:t,limit:r,type:u,unpack:i,last:h,PI:s,TWOPI:2*s,PITHIRD:s/3,DEG2RAD:s/180,RAD2DEG:180/s},b={format:{},autodetect:[]},p=d.last,g=d.clip_rgb,v=d.type,m=b,y=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=this;if("object"===v(r[0])&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];var n=p(r),a=!1;if(!n){a=!0,m.sorted||(m.autodetect=m.autodetect.sort((function(r,e){return e.p-r.p})),m.sorted=!0);for(var f=0,o=m.autodetect;f<o.length;f+=1){var u=o[f];if(n=u.test.apply(u,r))break}}if(!m.format[n])throw new Error("unknown format: "+r);var c=m.format[n].apply(null,a?r:r.slice(0,-1));t._rgb=g(c),3===t._rgb.length&&t._rgb.push(1)};y.prototype.toString=function(){return"function"==v(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var k=y,w=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(w.Color,[null].concat(r)))};w.Color=k,w.version="2.4.2";var M=w,N=d.unpack,_=Math.max,x=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=N(r,"rgb"),n=t[0],a=t[1],f=t[2],o=1-_(n/=255,_(a/=255,f/=255)),u=o<1?1/(1-o):0;return[(1-n-o)*u,(1-a-o)*u,(1-f-o)*u,o]},A=x,E=d.unpack,F=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=E(r,"cmyk"))[0],n=r[1],a=r[2],f=r[3],o=r.length>4?r[4]:1;return 1===f?[0,0,0,o]:[t>=1?0:255*(1-t)*(1-f),n>=1?0:255*(1-n)*(1-f),a>=1?0:255*(1-a)*(1-f),o]},P=F,I=M,O=k,R=b,j=d.unpack,G=d.type,q=A;O.prototype.cmyk=function(){return q(this._rgb)},I.cmyk=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(O,[null].concat(r,["cmyk"])))},R.format.cmyk=P,R.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=j(r,"cmyk"),"array"===G(r)&&4===r.length)return"cmyk"}});var L=d.unpack,C=d.last,B=function(r){return Math.round(100*r)/100},$=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=L(r,"hsla"),n=C(r)||"lsa";return t[0]=B(t[0]||0),t[1]=B(100*t[1])+"%",t[2]=B(100*t[2])+"%","hsla"===n||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,n="hsla"):t.length=3,n+"("+t.join(",")+")"},D=$,T=d.unpack,S=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=T(r,"rgba"))[0],n=r[1],a=r[2];t/=255,n/=255,a/=255;var f,o,u=Math.min(t,n,a),c=Math.max(t,n,a),i=(c+u)/2;return c===u?(f=0,o=Number.NaN):f=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),t==c?o=(n-a)/(c-u):n==c?o=2+(a-t)/(c-u):a==c&&(o=4+(t-n)/(c-u)),(o*=60)<0&&(o+=360),r.length>3&&void 0!==r[3]?[o,f,i,r[3]]:[o,f,i]},Y=S,z=d.unpack,X=d.last,U=D,V=Y,W=Math.round,H=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=z(r,"rgba"),n=X(r)||"rgb";return"hsl"==n.substr(0,3)?U(V(t),n):(t[0]=W(t[0]),t[1]=W(t[1]),t[2]=W(t[2]),("rgba"===n||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,n="rgba"),n+"("+t.slice(0,"rgb"===n?3:4).join(",")+")")},K=H,Z=d.unpack,J=Math.round,Q=function(){for(var r,e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,f,o=(e=Z(e,"hsl"))[0],u=e[1],c=e[2];if(0===u)n=a=f=255*c;else{var i=[0,0,0],l=[0,0,0],h=c<.5?c*(1+u):c+u-c*u,s=2*c-h,d=o/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]=s+6*(h-s)*i[b]:2*i[b]<1?l[b]=h:3*i[b]<2?l[b]=s+(h-s)*(2/3-i[b])*6:l[b]=s;n=(r=[J(255*l[0]),J(255*l[1]),J(255*l[2])])[0],a=r[1],f=r[2]}return e.length>3?[n,a,f,e[3]]:[n,a,f,1]},rr=Q,er=rr,tr=b,nr=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ar=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,fr=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,or=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ur=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,cr=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ir=Math.round,lr=function(r){var e;if(r=r.toLowerCase().trim(),tr.format.named)try{return tr.format.named(r)}catch(r){}if(e=r.match(nr)){for(var t=e.slice(1,4),n=0;n<3;n++)t[n]=+t[n];return t[3]=1,t}if(e=r.match(ar)){for(var a=e.slice(1,5),f=0;f<4;f++)a[f]=+a[f];return a}if(e=r.match(fr)){for(var o=e.slice(1,4),u=0;u<3;u++)o[u]=ir(2.55*o[u]);return o[3]=1,o}if(e=r.match(or)){for(var c=e.slice(1,5),i=0;i<3;i++)c[i]=ir(2.55*c[i]);return c[3]=+c[3],c}if(e=r.match(ur)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var h=er(l);return h[3]=1,h}if(e=r.match(cr)){var s=e.slice(1,4);s[1]*=.01,s[2]*=.01;var d=er(s);return d[3]=+e[4],d}};lr.test=function(r){return nr.test(r)||ar.test(r)||fr.test(r)||or.test(r)||ur.test(r)||cr.test(r)};var hr=lr,sr=M,dr=k,br=b,pr=d.type,gr=K,vr=hr;dr.prototype.css=function(r){return gr(this._rgb,r)},sr.css=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(dr,[null].concat(r,["css"])))},br.format.css=vr,br.autodetect.push({p:5,test:function(r){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===pr(r)&&vr.test(r))return"css"}});var mr=k,yr=M,kr=b,wr=d.unpack;kr.format.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=wr(r,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t},yr.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(mr,[null].concat(r,["gl"])))},mr.prototype.gl=function(){var r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};var Mr=d.unpack,Nr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n=Mr(r,"rgb"),a=n[0],f=n[1],o=n[2],u=Math.min(a,f,o),c=Math.max(a,f,o),i=c-u,l=100*i/255,h=u/(255-i)*100;return 0===i?t=Number.NaN:(a===c&&(t=(f-o)/i),f===c&&(t=2+(o-a)/i),o===c&&(t=4+(a-f)/i),(t*=60)<0&&(t+=360)),[t,l,h]},_r=Nr,xr=d.unpack,Ar=Math.floor,Er=function(){for(var r,e,t,n,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xr(o,"hcg"))[0],s=o[1],d=o[2];d*=255;var b=255*s;if(0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var p=Ar(h/=60),g=h-p,v=d*(1-s),m=v+b*(1-g),y=v+b*g,k=v+b;switch(p){case 0:c=(r=[k,y,v])[0],i=r[1],l=r[2];break;case 1:c=(e=[m,k,v])[0],i=e[1],l=e[2];break;case 2:c=(t=[v,k,y])[0],i=t[1],l=t[2];break;case 3:c=(n=[v,m,k])[0],i=n[1],l=n[2];break;case 4:c=(a=[y,v,k])[0],i=a[1],l=a[2];break;case 5:c=(f=[k,v,m])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Fr=Er,Pr=d.unpack,Ir=d.type,Or=M,Rr=k,jr=b,Gr=_r;Rr.prototype.hcg=function(){return Gr(this._rgb)},Or.hcg=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Rr,[null].concat(r,["hcg"])))},jr.format.hcg=Fr,jr.autodetect.push({p:1,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pr(r,"hcg"),"array"===Ir(r)&&3===r.length)return"hcg"}});var qr=d.unpack,Lr=d.last,Cr=Math.round,Br=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=qr(r,"rgba"),n=t[0],a=t[1],f=t[2],o=t[3],u=Lr(r)||"auto";void 0===o&&(o=1),"auto"===u&&(u=o<1?"rgba":"rgb");var c="000000"+((n=Cr(n))<<16|(a=Cr(a))<<8|(f=Cr(f))).toString(16);c=c.substr(c.length-6);var i="0"+Cr(255*o).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},$r=Br,Dr=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Tr=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Sr=function(r){if(r.match(Dr)){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(Tr)){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 t=parseInt(r,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((255&t)/255*100)/100]}throw new Error("unknown hex color: "+r)},Yr=M,zr=k,Xr=d.type,Ur=b,Vr=$r;zr.prototype.hex=function(r){return Vr(this._rgb,r)},Yr.hex=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(zr,[null].concat(r,["hex"])))},Ur.format.hex=Sr,Ur.autodetect.push({p:4,test:function(r){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===Xr(r)&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var Wr=d.unpack,Hr=d.TWOPI,Kr=Math.min,Zr=Math.sqrt,Jr=Math.acos,Qr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n=Wr(r,"rgb"),a=n[0],f=n[1],o=n[2],u=Kr(a/=255,f/=255,o/=255),c=(a+f+o)/3,i=c>0?1-u/c:0;return 0===i?t=NaN:(t=(a-f+(a-o))/2,t/=Zr((a-f)*(a-f)+(a-o)*(f-o)),t=Jr(t),o>f&&(t=Hr-t),t/=Hr),[360*t,i,c]},re=Qr,ee=d.unpack,te=d.limit,ne=d.TWOPI,ae=d.PITHIRD,fe=Math.cos,oe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n,a,f=(r=ee(r,"hsi"))[0],o=r[1],u=r[2];return isNaN(f)&&(f=0),isNaN(o)&&(o=0),f>360&&(f-=360),f<0&&(f+=360),(f/=360)<1/3?n=1-((a=(1-o)/3)+(t=(1+o*fe(ne*f)/fe(ae-ne*f))/3)):f<2/3?a=1-((t=(1-o)/3)+(n=(1+o*fe(ne*(f-=1/3))/fe(ae-ne*f))/3)):t=1-((n=(1-o)/3)+(a=(1+o*fe(ne*(f-=2/3))/fe(ae-ne*f))/3)),[255*(t=te(u*t*3)),255*(n=te(u*n*3)),255*(a=te(u*a*3)),r.length>3?r[3]:1]},ue=oe,ce=d.unpack,ie=d.type,le=M,he=k,se=b,de=re;he.prototype.hsi=function(){return de(this._rgb)},le.hsi=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(he,[null].concat(r,["hsi"])))},se.format.hsi=ue,se.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ce(r,"hsi"),"array"===ie(r)&&3===r.length)return"hsi"}});var be=d.unpack,pe=d.type,ge=M,ve=k,me=b,ye=Y;ve.prototype.hsl=function(){return ye(this._rgb)},ge.hsl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(ve,[null].concat(r,["hsl"])))},me.format.hsl=rr,me.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=be(r,"hsl"),"array"===pe(r)&&3===r.length)return"hsl"}});var ke=d.unpack,we=Math.min,Me=Math.max,Ne=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n,a,f=(r=ke(r,"rgb"))[0],o=r[1],u=r[2],c=we(f,o,u),i=Me(f,o,u),l=i-c;return a=i/255,0===i?(t=Number.NaN,n=0):(n=l/i,f===i&&(t=(o-u)/l),o===i&&(t=2+(u-f)/l),u===i&&(t=4+(f-o)/l),(t*=60)<0&&(t+=360)),[t,n,a]},_e=Ne,xe=d.unpack,Ae=Math.floor,Ee=function(){for(var r,e,t,n,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xe(o,"hsv"))[0],s=o[1],d=o[2];if(d*=255,0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var b=Ae(h/=60),p=h-b,g=d*(1-s),v=d*(1-s*p),m=d*(1-s*(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=(t=[g,d,m])[0],i=t[1],l=t[2];break;case 3:c=(n=[g,v,d])[0],i=n[1],l=n[2];break;case 4:c=(a=[m,g,d])[0],i=a[1],l=a[2];break;case 5:c=(f=[d,g,v])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Fe=Ee,Pe=d.unpack,Ie=d.type,Oe=M,Re=k,je=b,Ge=_e;Re.prototype.hsv=function(){return Ge(this._rgb)},Oe.hsv=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Re,[null].concat(r,["hsv"])))},je.format.hsv=Fe,je.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pe(r,"hsv"),"array"===Ie(r)&&3===r.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Le=qe,Ce=d.unpack,Be=Math.pow,$e=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=Ce(r,"rgb"),n=t[0],a=t[1],f=t[2],o=Se(n,a,f),u=o[0],c=o[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-o[2])]},De=function(r){return(r/=255)<=.04045?r/12.92:Be((r+.055)/1.055,2.4)},Te=function(r){return r>Le.t3?Be(r,1/3):r/Le.t2+Le.t0},Se=function(r,e,t){return r=De(r),e=De(e),t=De(t),[Te((.4124564*r+.3575761*e+.1804375*t)/Le.Xn),Te((.2126729*r+.7151522*e+.072175*t)/Le.Yn),Te((.0193339*r+.119192*e+.9503041*t)/Le.Zn)]},Ye=$e,ze=qe,Xe=d.unpack,Ue=Math.pow,Ve=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n,a,f=(r=Xe(r,"lab"))[0],o=r[1],u=r[2];return n=(f+16)/116,t=isNaN(o)?n:n+o/500,a=isNaN(u)?n:n-u/200,n=ze.Yn*He(n),t=ze.Xn*He(t),a=ze.Zn*He(a),[We(3.2404542*t-1.5371385*n-.4985314*a),We(-.969266*t+1.8760108*n+.041556*a),We(.0556434*t-.2040259*n+1.0572252*a),r.length>3?r[3]:1]},We=function(r){return 255*(r<=.00304?12.92*r:1.055*Ue(r,1/2.4)-.055)},He=function(r){return r>ze.t1?r*r*r:ze.t2*(r-ze.t0)},Ke=Ve,Ze=d.unpack,Je=d.type,Qe=M,rt=k,et=b,tt=Ye;rt.prototype.lab=function(){return tt(this._rgb)},Qe.lab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(rt,[null].concat(r,["lab"])))},et.format.lab=Ke,et.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Ze(r,"lab"),"array"===Je(r)&&3===r.length)return"lab"}});var nt=d.unpack,at=d.RAD2DEG,ft=Math.sqrt,ot=Math.atan2,ut=Math.round,ct=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=nt(r,"lab"),n=t[0],a=t[1],f=t[2],o=ft(a*a+f*f),u=(ot(f,a)*at+360)%360;return 0===ut(1e4*o)&&(u=Number.NaN),[n,o,u]},it=ct,lt=d.unpack,ht=Ye,st=it,dt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=lt(r,"rgb"),n=t[0],a=t[1],f=t[2],o=ht(n,a,f),u=o[0],c=o[1],i=o[2];return st(u,c,i)},bt=dt,pt=d.unpack,gt=d.DEG2RAD,vt=Math.sin,mt=Math.cos,yt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=pt(r,"lch"),n=t[0],a=t[1],f=t[2];return isNaN(f)&&(f=0),[n,mt(f*=gt)*a,vt(f)*a]},kt=yt,wt=d.unpack,Mt=kt,Nt=Ke,_t=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=wt(r,"lch"))[0],n=r[1],a=r[2],f=Mt(t,n,a),o=f[0],u=f[1],c=f[2],i=Nt(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},xt=_t,At=d.unpack,Et=xt,Ft=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=At(r,"hcl").reverse();return Et.apply(void 0,t)},Pt=Ft,It=d.unpack,Ot=d.type,Rt=M,jt=k,Gt=b,qt=bt;jt.prototype.lch=function(){return qt(this._rgb)},jt.prototype.hcl=function(){return qt(this._rgb).reverse()},Rt.lch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(jt,[null].concat(r,["lch"])))},Rt.hcl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(jt,[null].concat(r,["hcl"])))},Gt.format.lch=xt,Gt.format.hcl=Pt,["lch","hcl"].forEach((function(r){return Gt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=It(e,r),"array"===Ot(e)&&3===e.length)return r}})}));var Lt={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"},Ct=k,Bt=b,$t=d.type,Dt=Lt,Tt=Sr,St=$r;Ct.prototype.name=function(){for(var r=St(this._rgb,"rgb"),e=0,t=Object.keys(Dt);e<t.length;e+=1){var n=t[e];if(Dt[n]===r)return n.toLowerCase()}return r},Bt.format.named=function(r){if(r=r.toLowerCase(),Dt[r])return Tt(Dt[r]);throw new Error("unknown color name: "+r)},Bt.autodetect.push({p:5,test:function(r){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===$t(r)&&Dt[r.toLowerCase()])return"named"}});var Yt=d.unpack,zt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=Yt(r,"rgb");return(t[0]<<16)+(t[1]<<8)+t[2]},Xt=zt,Ut=d.type,Vt=function(r){if("number"==Ut(r)&&r>=0&&r<=16777215)return[r>>16,r>>8&255,255&r,1];throw new Error("unknown num color: "+r)},Wt=M,Ht=k,Kt=b,Zt=d.type,Jt=Xt;Ht.prototype.num=function(){return Jt(this._rgb)},Wt.num=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Ht,[null].concat(r,["num"])))},Kt.format.num=Vt,Kt.autodetect.push({p:5,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(1===r.length&&"number"===Zt(r[0])&&r[0]>=0&&r[0]<=16777215)return"num"}});var Qt=M,rn=k,en=b,tn=d.unpack,nn=d.type,an=Math.round;rn.prototype.rgb=function(r){return void 0===r&&(r=!0),!1===r?this._rgb.slice(0,3):this._rgb.slice(0,3).map(an)},rn.prototype.rgba=function(r){return void 0===r&&(r=!0),this._rgb.slice(0,4).map((function(e,t){return t<3?!1===r?e:an(e):e}))},Qt.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(rn,[null].concat(r,["rgb"])))},en.format.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=tn(r,"rgba");return void 0===t[3]&&(t[3]=1),t},en.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=tn(r,"rgba"),"array"===nn(r)&&(3===r.length||4===r.length&&"number"==nn(r[3])&&r[3]>=0&&r[3]<=1))return"rgb"}});var fn=Math.log,on=function(r){var e,t,n,a=r/100;return a<66?(e=255,t=a<6?0:-155.25485562709179-.44596950469579133*(t=a-2)+104.49216199393888*fn(t),n=a<20?0:.8274096064007395*(n=a-10)-254.76935184120902+115.67994401066147*fn(n)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*fn(e),t=325.4494125711974+.07943456536662342*(t=a-50)-28.0852963507957*fn(t),n=255),[e,t,n,1]},un=on,cn=d.unpack,ln=Math.round,hn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];for(var t,n=cn(r,"rgb"),a=n[0],f=n[2],o=1e3,u=4e4,c=.4;u-o>c;){var i=un(t=.5*(u+o));i[2]/i[0]>=f/a?u=t:o=t}return ln(t)},sn=M,dn=k,bn=b,pn=hn;dn.prototype.temp=dn.prototype.kelvin=dn.prototype.temperature=function(){return pn(this._rgb)},sn.temp=sn.kelvin=sn.temperature=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(dn,[null].concat(r,["temp"])))},bn.format.temp=bn.format.kelvin=bn.format.temperature=on;var gn=d.unpack,vn=Math.cbrt,mn=Math.pow,yn=Math.sign,kn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=gn(r,"rgb"),n=t[0],a=t[1],f=t[2],o=[Mn(n/255),Mn(a/255),Mn(f/255)],u=o[0],c=o[1],i=o[2],l=vn(.4122214708*u+.5363325363*c+.0514459929*i),h=vn(.2119034982*u+.6806995451*c+.1073969566*i),s=vn(.0883024619*u+.2817188376*c+.6299787005*i);return[.2104542553*l+.793617785*h-.0040720468*s,1.9779984951*l-2.428592205*h+.4505937099*s,.0259040371*l+.7827717662*h-.808675766*s]},wn=kn;function Mn(r){var e=Math.abs(r);return e<.04045?r/12.92:(yn(r)||1)*mn((e+.055)/1.055,2.4)}var Nn=d.unpack,_n=Math.pow,xn=Math.sign,An=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=Nn(r,"lab"))[0],n=r[1],a=r[2],f=_n(t+.3963377774*n+.2158037573*a,3),o=_n(t-.1055613458*n-.0638541728*a,3),u=_n(t-.0894841775*n-1.291485548*a,3);return[255*Fn(4.0767416621*f-3.3077115913*o+.2309699292*u),255*Fn(-1.2684380046*f+2.6097574011*o-.3413193965*u),255*Fn(-.0041960863*f-.7034186147*o+1.707614701*u),r.length>3?r[3]:1]},En=An;function Fn(r){var e=Math.abs(r);return e>.0031308?(xn(r)||1)*(1.055*_n(e,1/2.4)-.055):12.92*r}var Pn=d.unpack,In=d.type,On=M,Rn=k,jn=b,Gn=wn;Rn.prototype.oklab=function(){return Gn(this._rgb)},On.oklab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Rn,[null].concat(r,["oklab"])))},jn.format.oklab=En,jn.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pn(r,"oklab"),"array"===In(r)&&3===r.length)return"oklab"}});var qn=d.unpack,Ln=wn,Cn=it,Bn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=qn(r,"rgb"),n=t[0],a=t[1],f=t[2],o=Ln(n,a,f),u=o[0],c=o[1],i=o[2];return Cn(u,c,i)},$n=Bn,Dn=d.unpack,Tn=kt,Sn=En,Yn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=Dn(r,"lch"))[0],n=r[1],a=r[2],f=Tn(t,n,a),o=f[0],u=f[1],c=f[2],i=Sn(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},zn=Yn,Xn=d.unpack,Un=d.type,Vn=M,Wn=k,Hn=b,Kn=$n;Wn.prototype.oklch=function(){return Kn(this._rgb)},Vn.oklch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Wn,[null].concat(r,["oklch"])))},Hn.format.oklch=zn,Hn.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Xn(r,"oklch"),"array"===Un(r)&&3===r.length)return"oklch"}});var Zn=k,Jn=d.type;Zn.prototype.alpha=function(r,e){return void 0===e&&(e=!1),void 0!==r&&"number"===Jn(r)?e?(this._rgb[3]=r,this):new Zn([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]},k.prototype.clipped=function(){return this._rgb._clipped||!1};var Qn=k,ra=qe;Qn.prototype.darken=function(r){void 0===r&&(r=1);var e=this,t=e.lab();return t[0]-=ra.Kn*r,new Qn(t,"lab").alpha(e.alpha(),!0)},Qn.prototype.brighten=function(r){return void 0===r&&(r=1),this.darken(-r)},Qn.prototype.darker=Qn.prototype.darken,Qn.prototype.brighter=Qn.prototype.brighten,k.prototype.get=function(r){var e=r.split("."),t=e[0],n=e[1],a=this[t]();if(n){var f=t.indexOf(n)-("ok"===t.substr(0,2)?2:0);if(f>-1)return a[f];throw new Error("unknown channel "+n+" in mode "+t)}return a};var ea=k,ta=d.type,na=Math.pow,aa=1e-7,fa=20;ea.prototype.luminance=function(r){if(void 0!==r&&"number"===ta(r)){if(0===r)return new ea([0,0,0,this._rgb[3]],"rgb");if(1===r)return new ea([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),t="rgb",n=fa,a=function(e,f){var o=e.interpolate(f,.5,t),u=o.luminance();return Math.abs(r-u)<aa||!n--?o:u>r?a(e,o):a(o,f)},f=(e>r?a(new ea([0,0,0]),this):a(this,new ea([255,255,255]))).rgb();return new ea(f.concat([this._rgb[3]]))}return oa.apply(void 0,this._rgb.slice(0,3))};var oa=function(r,e,t){return.2126*(r=ua(r))+.7152*(e=ua(e))+.0722*(t=ua(t))},ua=function(r){return(r/=255)<=.03928?r/12.92:na((r+.055)/1.055,2.4)},ca={},ia=k,la=d.type,ha=ca,sa=function(r,e,t){void 0===t&&(t=.5);for(var n=[],a=arguments.length-3;a-- >0;)n[a]=arguments[a+3];var f=n[0]||"lrgb";if(ha[f]||n.length||(f=Object.keys(ha)[0]),!ha[f])throw new Error("interpolation mode "+f+" is not defined");return"object"!==la(r)&&(r=new ia(r)),"object"!==la(e)&&(e=new ia(e)),ha[f](r,e,t).alpha(r.alpha()+t*(e.alpha()-r.alpha()))},da=k,ba=sa;da.prototype.mix=da.prototype.interpolate=function(r,e){void 0===e&&(e=.5);for(var t=[],n=arguments.length-2;n-- >0;)t[n]=arguments[n+2];return ba.apply(void 0,[this,r,e].concat(t))};var pa=k;pa.prototype.premultiply=function(r){void 0===r&&(r=!1);var e=this._rgb,t=e[3];return r?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new pa([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};var ga=k,va=qe;ga.prototype.saturate=function(r){void 0===r&&(r=1);var e=this,t=e.lch();return t[1]+=va.Kn*r,t[1]<0&&(t[1]=0),new ga(t,"lch").alpha(e.alpha(),!0)},ga.prototype.desaturate=function(r){return void 0===r&&(r=1),this.saturate(-r)};var ma=k,ya=d.type;ma.prototype.set=function(r,e,t){void 0===t&&(t=!1);var n=r.split("."),a=n[0],f=n[1],o=this[a]();if(f){var u=a.indexOf(f)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==ya(e))switch(e.charAt(0)){case"+":case"-":o[u]+=+e;break;case"*":o[u]*=+e.substr(1);break;case"/":o[u]/=+e.substr(1);break;default:o[u]=+e}else{if("number"!==ya(e))throw new Error("unsupported value for Color.set");o[u]=e}var c=new ma(o,a);return t?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+f+" in mode "+a)}return o};var ka=k,wa=function(r,e,t){var n=r._rgb,a=e._rgb;return new ka(n[0]+t*(a[0]-n[0]),n[1]+t*(a[1]-n[1]),n[2]+t*(a[2]-n[2]),"rgb")};ca.rgb=wa;var Ma=k,Na=Math.sqrt,_a=Math.pow,xa=function(r,e,t){var n=r._rgb,a=n[0],f=n[1],o=n[2],u=e._rgb,c=u[0],i=u[1],l=u[2];return new Ma(Na(_a(a,2)*(1-t)+_a(c,2)*t),Na(_a(f,2)*(1-t)+_a(i,2)*t),Na(_a(o,2)*(1-t)+_a(l,2)*t),"rgb")};ca.lrgb=xa;var Aa=k,Ea=function(r,e,t){var n=r.lab(),a=e.lab();return new Aa(n[0]+t*(a[0]-n[0]),n[1]+t*(a[1]-n[1]),n[2]+t*(a[2]-n[2]),"lab")};ca.lab=Ea;var Fa=k,Pa=function(r,e,t,n){var a,f,o,u,c,i,l,h,s,d,b,p,g;return"hsl"===n?(o=r.hsl(),u=e.hsl()):"hsv"===n?(o=r.hsv(),u=e.hsv()):"hcg"===n?(o=r.hcg(),u=e.hcg()):"hsi"===n?(o=r.hsi(),u=e.hsi()):"lch"===n||"hcl"===n?(n="hcl",o=r.hcl(),u=e.hcl()):"oklch"===n&&(o=r.oklch().reverse(),u=e.oklch().reverse()),"h"!==n.substr(0,1)&&"oklch"!==n||(c=(a=o)[0],l=a[1],s=a[2],i=(f=u)[0],h=f[1],d=f[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?p=Number.NaN:(p=i,1!=s&&0!=s||"hsv"==n||(b=h)):(p=c,1!=d&&0!=d||"hsv"==n||(b=l)):p=c+t*(i>c&&i-c>180?i-(c+360):i<c&&c-i>180?i+360-c:i-c),void 0===b&&(b=l+t*(h-l)),g=s+t*(d-s),new Fa("oklch"===n?[g,b,p]:[p,b,g],n)},Ia=Pa,Oa=function(r,e,t){return Ia(r,e,t,"lch")};ca.lch=Oa,ca.hcl=Oa;var Ra=k,ja=function(r,e,t){var n=r.num(),a=e.num();return new Ra(n+t*(a-n),"num")};ca.num=ja;var Ga=Pa,qa=function(r,e,t){return Ga(r,e,t,"hcg")};ca.hcg=qa;var La=Pa,Ca=function(r,e,t){return La(r,e,t,"hsi")};ca.hsi=Ca;var Ba=Pa,$a=function(r,e,t){return Ba(r,e,t,"hsl")};ca.hsl=$a;var Da=Pa,Ta=function(r,e,t){return Da(r,e,t,"hsv")};ca.hsv=Ta;var Sa=k,Ya=function(r,e,t){var n=r.oklab(),a=e.oklab();return new Sa(n[0]+t*(a[0]-n[0]),n[1]+t*(a[1]-n[1]),n[2]+t*(a[2]-n[2]),"oklab")};ca.oklab=Ya;var za=Pa,Xa=function(r,e,t){return za(r,e,t,"oklch")};ca.oklch=Xa;var Ua=k,Va=d.clip_rgb,Wa=Math.pow,Ha=Math.sqrt,Ka=Math.PI,Za=Math.cos,Ja=Math.sin,Qa=Math.atan2,rf=function(r,e,t){void 0===e&&(e="lrgb"),void 0===t&&(t=null);var n=r.length;t||(t=Array.from(new Array(n)).map((function(){return 1})));var a=n/t.reduce((function(r,e){return r+e}));if(t.forEach((function(r,e){t[e]*=a})),r=r.map((function(r){return new Ua(r)})),"lrgb"===e)return ef(r,t);for(var f=r.shift(),o=f.get(e),u=[],c=0,i=0,l=0;l<o.length;l++)if(o[l]=(o[l]||0)*t[0],u.push(isNaN(o[l])?0:t[0]),"h"===e.charAt(l)&&!isNaN(o[l])){var h=o[l]/180*Ka;c+=Za(h)*t[0],i+=Ja(h)*t[0]}var s=f.alpha()*t[0];r.forEach((function(r,n){var a=r.get(e);s+=r.alpha()*t[n+1];for(var f=0;f<o.length;f++)if(!isNaN(a[f]))if(u[f]+=t[n+1],"h"===e.charAt(f)){var l=a[f]/180*Ka;c+=Za(l)*t[n+1],i+=Ja(l)*t[n+1]}else o[f]+=a[f]*t[n+1]}));for(var d=0;d<o.length;d++)if("h"===e.charAt(d)){for(var b=Qa(i/u[d],c/u[d])/Ka*180;b<0;)b+=360;for(;b>=360;)b-=360;o[d]=b}else o[d]=o[d]/u[d];return s/=n,new Ua(o,e).alpha(s>.99999?1:s,!0)},ef=function(r,e){for(var t=r.length,n=[0,0,0,0],a=0;a<r.length;a++){var f=r[a],o=e[a]/t,u=f._rgb;n[0]+=Wa(u[0],2)*o,n[1]+=Wa(u[1],2)*o,n[2]+=Wa(u[2],2)*o,n[3]+=u[3]*o}return n[0]=Ha(n[0]),n[1]=Ha(n[1]),n[2]=Ha(n[2]),n[3]>.9999999&&(n[3]=1),new Ua(Va(n))},tf=M,nf=d.type,af=Math.pow,ff=function(r){var e="rgb",t=tf("#ccc"),n=0,a=[0,1],f=[],o=[0,0],u=!1,c=[],i=!1,l=0,h=1,s=!1,d={},b=!0,p=1,g=function(r){if((r=r||["#fff","#000"])&&"string"===nf(r)&&tf.brewer&&tf.brewer[r.toLowerCase()]&&(r=tf.brewer[r.toLowerCase()]),"array"===nf(r)){1===r.length&&(r=[r[0],r[0]]),r=r.slice(0);for(var e=0;e<r.length;e++)r[e]=tf(r[e]);f.length=0;for(var t=0;t<r.length;t++)f.push(t/(r.length-1))}return w(),c=r},v=function(r){if(null!=u){for(var e=u.length-1,t=0;t<e&&r>=u[t];)t++;return t-1}return 0},m=function(r){return r},y=function(r){return r},k=function(r,n){var a,i;if(null==n&&(n=!1),isNaN(r)||null===r)return t;i=n?r:u&&u.length>2?v(r)/(u.length-2):h!==l?(r-l)/(h-l):1,i=y(i),n||(i=m(i)),1!==p&&(i=af(i,p)),i=o[0]+i*(1-o[0]-o[1]),i=Math.min(1,Math.max(0,i));var s=Math.floor(1e4*i);if(b&&d[s])a=d[s];else{if("array"===nf(c))for(var g=0;g<f.length;g++){var k=f[g];if(i<=k){a=c[g];break}if(i>=k&&g===f.length-1){a=c[g];break}if(i>k&&i<f[g+1]){i=(i-k)/(f[g+1]-k),a=tf.interpolate(c[g],c[g+1],i,e);break}}else"function"===nf(c)&&(a=c(i));b&&(d[s]=a)}return a},w=function(){return d={}};g(r);var M=function(r){var e=tf(k(r));return i&&e[i]?e[i]():e};return M.classes=function(r){if(null!=r){if("array"===nf(r))u=r,a=[r[0],r[r.length-1]];else{var e=tf.analyze(a);u=0===r?[e.min,e.max]:tf.limits(e,"e",r)}return M}return u},M.domain=function(r){if(!arguments.length)return a;l=r[0],h=r[r.length-1],f=[];var e=c.length;if(r.length===e&&l!==h)for(var t=0,n=Array.from(r);t<n.length;t+=1){var o=n[t];f.push((o-l)/(h-l))}else{for(var u=0;u<e;u++)f.push(u/(e-1));if(r.length>2){var i=r.map((function(e,t){return t/(r.length-1)})),s=r.map((function(r){return(r-l)/(h-l)}));s.every((function(r,e){return i[e]===r}))||(y=function(r){if(r<=0||r>=1)return r;for(var e=0;r>=s[e+1];)e++;var t=(r-s[e])/(s[e+1]-s[e]);return i[e]+t*(i[e+1]-i[e])})}}return a=[l,h],M},M.mode=function(r){return arguments.length?(e=r,w(),M):e},M.range=function(r,e){return g(r),M},M.out=function(r){return i=r,M},M.spread=function(r){return arguments.length?(n=r,M):n},M.correctLightness=function(r){return null==r&&(r=!0),s=r,w(),m=s?function(r){for(var e=k(0,!0).lab()[0],t=k(1,!0).lab()[0],n=e>t,a=k(r,!0).lab()[0],f=e+(t-e)*r,o=a-f,u=0,c=1,i=20;Math.abs(o)>.01&&i-- >0;)n&&(o*=-1),o<0?(u=r,r+=.5*(c-r)):(c=r,r+=.5*(u-r)),a=k(r,!0).lab()[0],o=a-f;return r}:function(r){return r},M},M.padding=function(r){return null!=r?("number"===nf(r)&&(r=[r,r]),o=r,M):o},M.colors=function(e,t){arguments.length<2&&(t="hex");var n=[];if(0===arguments.length)n=c.slice(0);else if(1===e)n=[M(.5)];else if(e>1){var f=a[0],o=a[1]-f;n=of(0,e,!1).map((function(r){return M(f+r/(e-1)*o)}))}else{r=[];var i=[];if(u&&u.length>2)for(var l=1,h=u.length,s=1<=h;s?l<h:l>h;s?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;n=i.map((function(r){return M(r)}))}return tf[t]&&(n=n.map((function(r){return r[t]()}))),n},M.cache=function(r){return null!=r?(b=r,M):b},M.gamma=function(r){return null!=r?(p=r,M):p},M.nodata=function(r){return null!=r?(t=tf(r),M):t},M};function of(r,e,t){for(var n=[],a=r<e,f=t?a?e+1:e-1:e,o=r;a?o<f:o>f;a?o++:o--)n.push(o);return n}var uf=k,cf=ff,lf=function(r){for(var e=[1,1],t=1;t<r;t++){for(var n=[1],a=1;a<=e.length;a++)n[a]=(e[a]||0)+e[a-1];e=n}return e},hf=function(r){var e,t,n,a,f,o,u;if(2===(r=r.map((function(r){return new uf(r)}))).length)e=r.map((function(r){return r.lab()})),f=e[0],o=e[1],a=function(r){var e=[0,1,2].map((function(e){return f[e]+r*(o[e]-f[e])}));return new uf(e,"lab")};else if(3===r.length)t=r.map((function(r){return r.lab()})),f=t[0],o=t[1],u=t[2],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*f[e]+2*(1-r)*r*o[e]+r*r*u[e]}));return new uf(e,"lab")};else if(4===r.length){var c;n=r.map((function(r){return r.lab()})),f=n[0],o=n[1],u=n[2],c=n[3],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*(1-r)*f[e]+3*(1-r)*(1-r)*r*o[e]+3*(1-r)*r*r*u[e]+r*r*r*c[e]}));return new uf(e,"lab")}}else{if(!(r.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,h;i=r.map((function(r){return r.lab()})),h=r.length-1,l=lf(h),a=function(r){var e=1-r,t=[0,1,2].map((function(t){return i.reduce((function(n,a,f){return n+l[f]*Math.pow(e,h-f)*Math.pow(r,f)*a[t]}),0)}));return new uf(t,"lab")}}return a},sf=function(r){var e=hf(r);return e.scale=function(){return cf(e)},e},df=M,bf=function(r,e,t){if(!bf[t])throw new Error("unknown blend mode "+t);return bf[t](r,e)},pf=function(r){return function(e,t){var n=df(t).rgb(),a=df(e).rgb();return df.rgb(r(n,a))}},gf=function(r){return function(e,t){var n=[];return n[0]=r(e[0],t[0]),n[1]=r(e[1],t[1]),n[2]=r(e[2],t[2]),n}},vf=function(r){return r},mf=function(r,e){return r*e/255},yf=function(r,e){return r>e?e:r},kf=function(r,e){return r>e?r:e},wf=function(r,e){return 255*(1-(1-r/255)*(1-e/255))},Mf=function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))},Nf=function(r,e){return 255*(1-(1-e/255)/(r/255))},_f=function(r,e){return 255===r||(r=e/255*255/(1-r/255))>255?255:r};bf.normal=pf(gf(vf)),bf.multiply=pf(gf(mf)),bf.screen=pf(gf(wf)),bf.overlay=pf(gf(Mf)),bf.darken=pf(gf(yf)),bf.lighten=pf(gf(kf)),bf.dodge=pf(gf(_f)),bf.burn=pf(gf(Nf));for(var xf=bf,Af=d.type,Ef=d.clip_rgb,Ff=d.TWOPI,Pf=Math.pow,If=Math.sin,Of=Math.cos,Rf=M,jf=function(r,e,t,n,a){void 0===r&&(r=300),void 0===e&&(e=-1.5),void 0===t&&(t=1),void 0===n&&(n=1),void 0===a&&(a=[0,1]);var f,o=0;"array"===Af(a)?f=a[1]-a[0]:(f=0,a=[a,a]);var u=function(u){var c=Ff*((r+120)/360+e*u),i=Pf(a[0]+f*u,n),l=(0!==o?t[0]+u*o:t)*i*(1-i)/2,h=Of(c),s=If(c);return Rf(Ef([255*(i+l*(-.14861*h+1.78277*s)),255*(i+l*(-.29227*h-.90649*s)),255*(i+l*(1.97294*h)),1]))};return u.start=function(e){return null==e?r:(r=e,u)},u.rotations=function(r){return null==r?e:(e=r,u)},u.gamma=function(r){return null==r?n:(n=r,u)},u.hue=function(r){return null==r?t:("array"===Af(t=r)?0==(o=t[1]-t[0])&&(t=t[1]):o=0,u)},u.lightness=function(r){return null==r?a:("array"===Af(r)?(a=r,f=r[1]-r[0]):(a=[r,r],f=0),u)},u.scale=function(){return Rf.scale(u)},u.hue(t),u},Gf=k,qf="0123456789abcdef",Lf=Math.floor,Cf=Math.random,Bf=function(){for(var r="#",e=0;e<6;e++)r+=qf.charAt(Lf(16*Cf()));return new Gf(r,"hex")},$f=u,Df=Math.log,Tf=Math.pow,Sf=Math.floor,Yf=Math.abs,zf=function(r,e){void 0===e&&(e=null);var t={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===$f(r)&&(r=Object.values(r)),r.forEach((function(r){e&&"object"===$f(r)&&(r=r[e]),null==r||isNaN(r)||(t.values.push(r),t.sum+=r,r<t.min&&(t.min=r),r>t.max&&(t.max=r),t.count+=1)})),t.domain=[t.min,t.max],t.limits=function(r,e){return Xf(t,r,e)},t},Xf=function(r,e,t){void 0===e&&(e="equal"),void 0===t&&(t=7),"array"==$f(r)&&(r=zf(r));var n=r.min,a=r.max,f=r.values.sort((function(r,e){return r-e}));if(1===t)return[n,a];var o=[];if("c"===e.substr(0,1)&&(o.push(n),o.push(a)),"e"===e.substr(0,1)){o.push(n);for(var u=1;u<t;u++)o.push(n+u/t*(a-n));o.push(a)}else if("l"===e.substr(0,1)){if(n<=0)throw new Error("Logarithmic scales are only possible for values > 0");var c=Math.LOG10E*Df(n),i=Math.LOG10E*Df(a);o.push(n);for(var l=1;l<t;l++)o.push(Tf(10,c+l/t*(i-c)));o.push(a)}else if("q"===e.substr(0,1)){o.push(n);for(var h=1;h<t;h++){var s=(f.length-1)*h/t,d=Sf(s);if(d===s)o.push(f[d]);else{var b=s-d;o.push(f[d]*(1-b)+f[d+1]*b)}}o.push(a)}else if("k"===e.substr(0,1)){var p,g=f.length,v=new Array(g),m=new Array(t),y=!0,k=0,w=null;(w=[]).push(n);for(var M=1;M<t;M++)w.push(n+M/t*(a-n));for(w.push(a);y;){for(var N=0;N<t;N++)m[N]=0;for(var _=0;_<g;_++)for(var x=f[_],A=Number.MAX_VALUE,E=void 0,F=0;F<t;F++){var P=Yf(w[F]-x);P<A&&(A=P,E=F),m[E]++,v[_]=E}for(var I=new Array(t),O=0;O<t;O++)I[O]=null;for(var R=0;R<g;R++)null===I[p=v[R]]?I[p]=f[R]:I[p]+=f[R];for(var j=0;j<t;j++)I[j]*=1/m[j];y=!1;for(var G=0;G<t;G++)if(I[G]!==w[G]){y=!0;break}w=I,++k>200&&(y=!1)}for(var q={},L=0;L<t;L++)q[L]=[];for(var C=0;C<g;C++)q[p=v[C]].push(f[C]);for(var B=[],$=0;$<t;$++)B.push(q[$][0]),B.push(q[$][q[$].length-1]);B=B.sort((function(r,e){return r-e})),o.push(B[0]);for(var D=1;D<B.length;D+=2){var T=B[D];isNaN(T)||-1!==o.indexOf(T)||o.push(T)}}return o},Uf={analyze:zf,limits:Xf},Vf=k,Wf=function(r,e){r=new Vf(r),e=new Vf(e);var t=r.luminance(),n=e.luminance();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},Hf=k,Kf=Math.sqrt,Zf=Math.pow,Jf=Math.min,Qf=Math.max,ro=Math.atan2,eo=Math.abs,to=Math.cos,no=Math.sin,ao=Math.exp,fo=Math.PI,oo=function(r,e,t,n,a){void 0===t&&(t=1),void 0===n&&(n=1),void 0===a&&(a=1);var f=function(r){return 360*r/(2*fo)},o=function(r){return 2*fo*r/360};r=new Hf(r),e=new Hf(e);var u=Array.from(r.lab()),c=u[0],i=u[1],l=u[2],h=Array.from(e.lab()),s=h[0],d=h[1],b=h[2],p=(c+s)/2,g=(Kf(Zf(i,2)+Zf(l,2))+Kf(Zf(d,2)+Zf(b,2)))/2,v=.5*(1-Kf(Zf(g,7)/(Zf(g,7)+Zf(25,7)))),m=i*(1+v),y=d*(1+v),k=Kf(Zf(m,2)+Zf(l,2)),w=Kf(Zf(y,2)+Zf(b,2)),M=(k+w)/2,N=f(ro(l,m)),_=f(ro(b,y)),x=N>=0?N:N+360,A=_>=0?_:_+360,E=eo(x-A)>180?(x+A+360)/2:(x+A)/2,F=1-.17*to(o(E-30))+.24*to(o(2*E))+.32*to(o(3*E+6))-.2*to(o(4*E-63)),P=A-x;P=eo(P)<=180?P:A<=x?P+360:P-360,P=2*Kf(k*w)*no(o(P)/2);var I=s-c,O=w-k,R=1+.015*Zf(p-50,2)/Kf(20+Zf(p-50,2)),j=1+.045*M,G=1+.015*M*F,q=30*ao(-Zf((E-275)/25,2)),L=-2*Kf(Zf(M,7)/(Zf(M,7)+Zf(25,7)))*no(2*o(q)),C=Kf(Zf(I/(t*R),2)+Zf(O/(n*j),2)+Zf(P/(a*G),2)+L*(O/(n*j))*(P/(a*G)));return Qf(0,Jf(100,C))},uo=k,co=function(r,e,t){void 0===t&&(t="lab"),r=new uo(r),e=new uo(e);var n=r.get(t),a=e.get(t),f=0;for(var o in n){var u=(n[o]||0)-(a[o]||0);f+=u*u}return Math.sqrt(f)},io=k,lo=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];try{return new(Function.prototype.bind.apply(io,[null].concat(r))),!0}catch(r){return!1}},ho=M,so=ff,bo={cool:function(){return so([ho.hsl(180,1,.9),ho.hsl(250,.7,.4)])},hot:function(){return so(["#000","#f00","#ff0","#fff"]).mode("rgb")}},po={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},go=0,vo=Object.keys(po);go<vo.length;go+=1){var mo=vo[go];po[mo.toLowerCase()]=po[mo]}var yo=po,ko=M;ko.average=rf,ko.bezier=sf,ko.blend=xf,ko.cubehelix=jf,ko.mix=ko.interpolate=sa,ko.random=Bf,ko.scale=ff,ko.analyze=Uf.analyze,ko.contrast=Wf,ko.deltaE=oo,ko.distance=co,ko.limits=Uf.limits,ko.valid=lo,ko.scales=bo,ko.colors=Lt,ko.brewer=yo;var wo=ko;return wo}();var e=r.exports;const t=r=>{const e=[];for(let t=0;t<r;t++)e.push(t);return e},n=(r,e)=>{const n=360/r;return t(r).map((r=>Math.floor((e+r*n)%360)))},a=(r,t)=>{const[n,a,f]=e(t).hsl();return e.hsl(n,r,f).hex()},f=(r,n,a)=>{const f=t(n).reverse().map((r=>(r+.5)/n)),o=e(r);return f.map((r=>o.luminance(r*(2*a)).hex()))},o=r=>{const[t,n]=e(r).hsl();return n<.5?"gray":t},u=(r,e)=>(r[e.key]=e.value,r),c=r=>{r=r.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(r,e,t,n){return e+e+t+t+n+n}));const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return`rgb(${parseInt(e[1],16)}, ${parseInt(e[2],16)}, ${parseInt(e[3],16)})`},i=(r,e,t)=>Math.min(Math.max(r,e),t),l=r=>h(r).map(s),h=r=>r.match(/-?\d+(\.\d+)?%?/g),s=(r,e)=>e<3?-1!=r.indexOf("%")?Math.round(255*i(parseInt(r,10),0,100)/100):i(parseInt(r,10),0,255):i(parseFloat(r),0,1),d=r=>"#"===r.slice(0,1),b=(r,e,t)=>{const n=[r,e,t].map((function(r){return(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}));return.2126*n[0]+.7152*n[1]+.0722*n[2]},p=(r,e)=>{const t=b(r[0],r[1],r[2]),n=b(e[0],e[1],e[2]);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)},g=r=>{const e=l(r),t=4===e.length?v(255*r[3]):"";return"#"+v(e[0])+v(e[1])+v(e[2])+t},v=r=>{const e=Math.round(i(r,0,255)).toString(16);return 1==e.length?"0"+e:e};exports.getColorPalette=({accent:r="rgb(53, 89, 199)",hues:t=12,shades:c=1,gray:i=!1,lightness:l=.5}={})=>{const h=e(r),s=[],[d,b,p]=h.hsl(),g=Number(l),v=Number(c),m=n(Number(t),d);i&&s.push({key:"gray",value:f(a(.1,h.hex()),v,g)}),m.forEach((r=>{const t=e.hsl(r,b,p),n=o(t);s.push({key:n,value:f(t.hex(),v,g)})}));return s.reduce(u,{})},exports.getContrastRatio=(r,e)=>{d(e)&&(e=c(e)),d(r)&&(r=c(r));const[t,n,a]=l(e),[f,o,u]=l(r);return p([t,n,a],[f,o,u])},exports.getTextColor=r=>{let e=r;"#"!==e.slice(0,1)&&(e=g(e)),d(e)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map((r=>r+r)).join(""));return(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=120?"rgb(12, 26, 61)":"rgb(255, 255, 255)"},exports.hexToRgb=c,exports.rgbToHex=g;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var r={exports:{}},e=r.exports=function(){for(var r=function(r,e,t){return void 0===e&&(e=0),void 0===t&&(t=1),r<e?e:r>t?t:r},e=r,t=function(r){r._clipped=!1,r._unclipped=r.slice(0);for(var t=0;t<=3;t++)t<3?((r[t]<0||r[t]>255)&&(r._clipped=!0),r[t]=e(r[t],0,255)):3===t&&(r[t]=e(r[t],0,1));return r},n={},a=0,f=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a<f.length;a+=1){var o=f[a];n["[object "+o+"]"]=o.toLowerCase()}var u=function(r){return n[Object.prototype.toString.call(r)]||"object"},c=u,i=function(r,e){return void 0===e&&(e=null),r.length>=3?Array.prototype.slice.call(r):"object"==c(r[0])&&e?e.split("").filter((function(e){return void 0!==r[0][e]})).map((function(e){return r[0][e]})):r[0]},l=u,h=function(r){if(r.length<2)return null;var e=r.length-1;return"string"==l(r[e])?r[e].toLowerCase():null},s=Math.PI,d={clip_rgb:t,limit:r,type:u,unpack:i,last:h,PI:s,TWOPI:2*s,PITHIRD:s/3,DEG2RAD:s/180,RAD2DEG:180/s},b={format:{},autodetect:[]},p=d.last,g=d.clip_rgb,v=d.type,m=b,y=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=this;if("object"===v(r[0])&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];var n=p(r),a=!1;if(!n){a=!0,m.sorted||(m.autodetect=m.autodetect.sort((function(r,e){return e.p-r.p})),m.sorted=!0);for(var f=0,o=m.autodetect;f<o.length;f+=1){var u=o[f];if(n=u.test.apply(u,r))break}}if(!m.format[n])throw new Error("unknown format: "+r);var c=m.format[n].apply(null,a?r:r.slice(0,-1));t._rgb=g(c),3===t._rgb.length&&t._rgb.push(1)};y.prototype.toString=function(){return"function"==v(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var k=y,w=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(w.Color,[null].concat(r)))};w.Color=k,w.version="2.4.2";var M=w,N=d.unpack,_=Math.max,x=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=N(r,"rgb"),n=t[0],a=t[1],f=t[2],o=1-_(n/=255,_(a/=255,f/=255)),u=o<1?1/(1-o):0;return[(1-n-o)*u,(1-a-o)*u,(1-f-o)*u,o]},A=x,E=d.unpack,F=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=E(r,"cmyk"))[0],n=r[1],a=r[2],f=r[3],o=r.length>4?r[4]:1;return 1===f?[0,0,0,o]:[t>=1?0:255*(1-t)*(1-f),n>=1?0:255*(1-n)*(1-f),a>=1?0:255*(1-a)*(1-f),o]},P=F,I=M,O=k,R=b,j=d.unpack,G=d.type,q=A;O.prototype.cmyk=function(){return q(this._rgb)},I.cmyk=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(O,[null].concat(r,["cmyk"])))},R.format.cmyk=P,R.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=j(r,"cmyk"),"array"===G(r)&&4===r.length)return"cmyk"}});var L=d.unpack,C=d.last,B=function(r){return Math.round(100*r)/100},$=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=L(r,"hsla"),n=C(r)||"lsa";return t[0]=B(t[0]||0),t[1]=B(100*t[1])+"%",t[2]=B(100*t[2])+"%","hsla"===n||t.length>3&&t[3]<1?(t[3]=t.length>3?t[3]:1,n="hsla"):t.length=3,n+"("+t.join(",")+")"},D=$,T=d.unpack,S=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=T(r,"rgba"))[0],n=r[1],a=r[2];t/=255,n/=255,a/=255;var f,o,u=Math.min(t,n,a),c=Math.max(t,n,a),i=(c+u)/2;return c===u?(f=0,o=Number.NaN):f=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),t==c?o=(n-a)/(c-u):n==c?o=2+(a-t)/(c-u):a==c&&(o=4+(t-n)/(c-u)),(o*=60)<0&&(o+=360),r.length>3&&void 0!==r[3]?[o,f,i,r[3]]:[o,f,i]},Y=S,z=d.unpack,X=d.last,U=D,V=Y,W=Math.round,H=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=z(r,"rgba"),n=X(r)||"rgb";return"hsl"==n.substr(0,3)?U(V(t),n):(t[0]=W(t[0]),t[1]=W(t[1]),t[2]=W(t[2]),("rgba"===n||t.length>3&&t[3]<1)&&(t[3]=t.length>3?t[3]:1,n="rgba"),n+"("+t.slice(0,"rgb"===n?3:4).join(",")+")")},K=H,Z=d.unpack,J=Math.round,Q=function(){for(var r,e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,a,f,o=(e=Z(e,"hsl"))[0],u=e[1],c=e[2];if(0===u)n=a=f=255*c;else{var i=[0,0,0],l=[0,0,0],h=c<.5?c*(1+u):c+u-c*u,s=2*c-h,d=o/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]=s+6*(h-s)*i[b]:2*i[b]<1?l[b]=h:3*i[b]<2?l[b]=s+(h-s)*(2/3-i[b])*6:l[b]=s;n=(r=[J(255*l[0]),J(255*l[1]),J(255*l[2])])[0],a=r[1],f=r[2]}return e.length>3?[n,a,f,e[3]]:[n,a,f,1]},rr=Q,er=rr,tr=b,nr=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ar=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,fr=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,or=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ur=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,cr=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ir=Math.round,lr=function(r){var e;if(r=r.toLowerCase().trim(),tr.format.named)try{return tr.format.named(r)}catch(r){}if(e=r.match(nr)){for(var t=e.slice(1,4),n=0;n<3;n++)t[n]=+t[n];return t[3]=1,t}if(e=r.match(ar)){for(var a=e.slice(1,5),f=0;f<4;f++)a[f]=+a[f];return a}if(e=r.match(fr)){for(var o=e.slice(1,4),u=0;u<3;u++)o[u]=ir(2.55*o[u]);return o[3]=1,o}if(e=r.match(or)){for(var c=e.slice(1,5),i=0;i<3;i++)c[i]=ir(2.55*c[i]);return c[3]=+c[3],c}if(e=r.match(ur)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var h=er(l);return h[3]=1,h}if(e=r.match(cr)){var s=e.slice(1,4);s[1]*=.01,s[2]*=.01;var d=er(s);return d[3]=+e[4],d}};lr.test=function(r){return nr.test(r)||ar.test(r)||fr.test(r)||or.test(r)||ur.test(r)||cr.test(r)};var hr=lr,sr=M,dr=k,br=b,pr=d.type,gr=K,vr=hr;dr.prototype.css=function(r){return gr(this._rgb,r)},sr.css=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(dr,[null].concat(r,["css"])))},br.format.css=vr,br.autodetect.push({p:5,test:function(r){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===pr(r)&&vr.test(r))return"css"}});var mr=k,yr=M,kr=b,wr=d.unpack;kr.format.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=wr(r,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t},yr.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(mr,[null].concat(r,["gl"])))},mr.prototype.gl=function(){var r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};var Mr=d.unpack,Nr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n=Mr(r,"rgb"),a=n[0],f=n[1],o=n[2],u=Math.min(a,f,o),c=Math.max(a,f,o),i=c-u,l=100*i/255,h=u/(255-i)*100;return 0===i?t=Number.NaN:(a===c&&(t=(f-o)/i),f===c&&(t=2+(o-a)/i),o===c&&(t=4+(a-f)/i),(t*=60)<0&&(t+=360)),[t,l,h]},_r=Nr,xr=d.unpack,Ar=Math.floor,Er=function(){for(var r,e,t,n,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xr(o,"hcg"))[0],s=o[1],d=o[2];d*=255;var b=255*s;if(0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var p=Ar(h/=60),g=h-p,v=d*(1-s),m=v+b*(1-g),y=v+b*g,k=v+b;switch(p){case 0:c=(r=[k,y,v])[0],i=r[1],l=r[2];break;case 1:c=(e=[m,k,v])[0],i=e[1],l=e[2];break;case 2:c=(t=[v,k,y])[0],i=t[1],l=t[2];break;case 3:c=(n=[v,m,k])[0],i=n[1],l=n[2];break;case 4:c=(a=[y,v,k])[0],i=a[1],l=a[2];break;case 5:c=(f=[k,v,m])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Fr=Er,Pr=d.unpack,Ir=d.type,Or=M,Rr=k,jr=b,Gr=_r;Rr.prototype.hcg=function(){return Gr(this._rgb)},Or.hcg=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Rr,[null].concat(r,["hcg"])))},jr.format.hcg=Fr,jr.autodetect.push({p:1,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pr(r,"hcg"),"array"===Ir(r)&&3===r.length)return"hcg"}});var qr=d.unpack,Lr=d.last,Cr=Math.round,Br=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=qr(r,"rgba"),n=t[0],a=t[1],f=t[2],o=t[3],u=Lr(r)||"auto";void 0===o&&(o=1),"auto"===u&&(u=o<1?"rgba":"rgb");var c="000000"+((n=Cr(n))<<16|(a=Cr(a))<<8|(f=Cr(f))).toString(16);c=c.substr(c.length-6);var i="0"+Cr(255*o).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},$r=Br,Dr=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Tr=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Sr=function(r){if(r.match(Dr)){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(Tr)){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 t=parseInt(r,16);return[t>>24&255,t>>16&255,t>>8&255,Math.round((255&t)/255*100)/100]}throw new Error("unknown hex color: "+r)},Yr=M,zr=k,Xr=d.type,Ur=b,Vr=$r;zr.prototype.hex=function(r){return Vr(this._rgb,r)},Yr.hex=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(zr,[null].concat(r,["hex"])))},Ur.format.hex=Sr,Ur.autodetect.push({p:4,test:function(r){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===Xr(r)&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var Wr=d.unpack,Hr=d.TWOPI,Kr=Math.min,Zr=Math.sqrt,Jr=Math.acos,Qr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n=Wr(r,"rgb"),a=n[0],f=n[1],o=n[2],u=Kr(a/=255,f/=255,o/=255),c=(a+f+o)/3,i=c>0?1-u/c:0;return 0===i?t=NaN:(t=(a-f+(a-o))/2,t/=Zr((a-f)*(a-f)+(a-o)*(f-o)),t=Jr(t),o>f&&(t=Hr-t),t/=Hr),[360*t,i,c]},re=Qr,ee=d.unpack,te=d.limit,ne=d.TWOPI,ae=d.PITHIRD,fe=Math.cos,oe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n,a,f=(r=ee(r,"hsi"))[0],o=r[1],u=r[2];return isNaN(f)&&(f=0),isNaN(o)&&(o=0),f>360&&(f-=360),f<0&&(f+=360),(f/=360)<1/3?n=1-((a=(1-o)/3)+(t=(1+o*fe(ne*f)/fe(ae-ne*f))/3)):f<2/3?a=1-((t=(1-o)/3)+(n=(1+o*fe(ne*(f-=1/3))/fe(ae-ne*f))/3)):t=1-((n=(1-o)/3)+(a=(1+o*fe(ne*(f-=2/3))/fe(ae-ne*f))/3)),[255*(t=te(u*t*3)),255*(n=te(u*n*3)),255*(a=te(u*a*3)),r.length>3?r[3]:1]},ue=oe,ce=d.unpack,ie=d.type,le=M,he=k,se=b,de=re;he.prototype.hsi=function(){return de(this._rgb)},le.hsi=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(he,[null].concat(r,["hsi"])))},se.format.hsi=ue,se.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ce(r,"hsi"),"array"===ie(r)&&3===r.length)return"hsi"}});var be=d.unpack,pe=d.type,ge=M,ve=k,me=b,ye=Y;ve.prototype.hsl=function(){return ye(this._rgb)},ge.hsl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(ve,[null].concat(r,["hsl"])))},me.format.hsl=rr,me.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=be(r,"hsl"),"array"===pe(r)&&3===r.length)return"hsl"}});var ke=d.unpack,we=Math.min,Me=Math.max,Ne=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n,a,f=(r=ke(r,"rgb"))[0],o=r[1],u=r[2],c=we(f,o,u),i=Me(f,o,u),l=i-c;return a=i/255,0===i?(t=Number.NaN,n=0):(n=l/i,f===i&&(t=(o-u)/l),o===i&&(t=2+(u-f)/l),u===i&&(t=4+(f-o)/l),(t*=60)<0&&(t+=360)),[t,n,a]},_e=Ne,xe=d.unpack,Ae=Math.floor,Ee=function(){for(var r,e,t,n,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xe(o,"hsv"))[0],s=o[1],d=o[2];if(d*=255,0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var b=Ae(h/=60),p=h-b,g=d*(1-s),v=d*(1-s*p),m=d*(1-s*(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=(t=[g,d,m])[0],i=t[1],l=t[2];break;case 3:c=(n=[g,v,d])[0],i=n[1],l=n[2];break;case 4:c=(a=[m,g,d])[0],i=a[1],l=a[2];break;case 5:c=(f=[d,g,v])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Fe=Ee,Pe=d.unpack,Ie=d.type,Oe=M,Re=k,je=b,Ge=_e;Re.prototype.hsv=function(){return Ge(this._rgb)},Oe.hsv=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Re,[null].concat(r,["hsv"])))},je.format.hsv=Fe,je.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pe(r,"hsv"),"array"===Ie(r)&&3===r.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Le=qe,Ce=d.unpack,Be=Math.pow,$e=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=Ce(r,"rgb"),n=t[0],a=t[1],f=t[2],o=Se(n,a,f),u=o[0],c=o[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-o[2])]},De=function(r){return(r/=255)<=.04045?r/12.92:Be((r+.055)/1.055,2.4)},Te=function(r){return r>Le.t3?Be(r,1/3):r/Le.t2+Le.t0},Se=function(r,e,t){return r=De(r),e=De(e),t=De(t),[Te((.4124564*r+.3575761*e+.1804375*t)/Le.Xn),Te((.2126729*r+.7151522*e+.072175*t)/Le.Yn),Te((.0193339*r+.119192*e+.9503041*t)/Le.Zn)]},Ye=$e,ze=qe,Xe=d.unpack,Ue=Math.pow,Ve=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t,n,a,f=(r=Xe(r,"lab"))[0],o=r[1],u=r[2];return n=(f+16)/116,t=isNaN(o)?n:n+o/500,a=isNaN(u)?n:n-u/200,n=ze.Yn*He(n),t=ze.Xn*He(t),a=ze.Zn*He(a),[We(3.2404542*t-1.5371385*n-.4985314*a),We(-.969266*t+1.8760108*n+.041556*a),We(.0556434*t-.2040259*n+1.0572252*a),r.length>3?r[3]:1]},We=function(r){return 255*(r<=.00304?12.92*r:1.055*Ue(r,1/2.4)-.055)},He=function(r){return r>ze.t1?r*r*r:ze.t2*(r-ze.t0)},Ke=Ve,Ze=d.unpack,Je=d.type,Qe=M,rt=k,et=b,tt=Ye;rt.prototype.lab=function(){return tt(this._rgb)},Qe.lab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(rt,[null].concat(r,["lab"])))},et.format.lab=Ke,et.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Ze(r,"lab"),"array"===Je(r)&&3===r.length)return"lab"}});var nt=d.unpack,at=d.RAD2DEG,ft=Math.sqrt,ot=Math.atan2,ut=Math.round,ct=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=nt(r,"lab"),n=t[0],a=t[1],f=t[2],o=ft(a*a+f*f),u=(ot(f,a)*at+360)%360;return 0===ut(1e4*o)&&(u=Number.NaN),[n,o,u]},it=ct,lt=d.unpack,ht=Ye,st=it,dt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=lt(r,"rgb"),n=t[0],a=t[1],f=t[2],o=ht(n,a,f),u=o[0],c=o[1],i=o[2];return st(u,c,i)},bt=dt,pt=d.unpack,gt=d.DEG2RAD,vt=Math.sin,mt=Math.cos,yt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=pt(r,"lch"),n=t[0],a=t[1],f=t[2];return isNaN(f)&&(f=0),[n,mt(f*=gt)*a,vt(f)*a]},kt=yt,wt=d.unpack,Mt=kt,Nt=Ke,_t=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=wt(r,"lch"))[0],n=r[1],a=r[2],f=Mt(t,n,a),o=f[0],u=f[1],c=f[2],i=Nt(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},xt=_t,At=d.unpack,Et=xt,Ft=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=At(r,"hcl").reverse();return Et.apply(void 0,t)},Pt=Ft,It=d.unpack,Ot=d.type,Rt=M,jt=k,Gt=b,qt=bt;jt.prototype.lch=function(){return qt(this._rgb)},jt.prototype.hcl=function(){return qt(this._rgb).reverse()},Rt.lch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(jt,[null].concat(r,["lch"])))},Rt.hcl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(jt,[null].concat(r,["hcl"])))},Gt.format.lch=xt,Gt.format.hcl=Pt,["lch","hcl"].forEach((function(r){return Gt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=It(e,r),"array"===Ot(e)&&3===e.length)return r}})}));var Lt={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"},Ct=k,Bt=b,$t=d.type,Dt=Lt,Tt=Sr,St=$r;Ct.prototype.name=function(){for(var r=St(this._rgb,"rgb"),e=0,t=Object.keys(Dt);e<t.length;e+=1){var n=t[e];if(Dt[n]===r)return n.toLowerCase()}return r},Bt.format.named=function(r){if(r=r.toLowerCase(),Dt[r])return Tt(Dt[r]);throw new Error("unknown color name: "+r)},Bt.autodetect.push({p:5,test:function(r){for(var e=[],t=arguments.length-1;t-- >0;)e[t]=arguments[t+1];if(!e.length&&"string"===$t(r)&&Dt[r.toLowerCase()])return"named"}});var Yt=d.unpack,zt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=Yt(r,"rgb");return(t[0]<<16)+(t[1]<<8)+t[2]},Xt=zt,Ut=d.type,Vt=function(r){if("number"==Ut(r)&&r>=0&&r<=16777215)return[r>>16,r>>8&255,255&r,1];throw new Error("unknown num color: "+r)},Wt=Vt,Ht=M,Kt=k,Zt=b,Jt=d.type,Qt=Xt;Kt.prototype.num=function(){return Qt(this._rgb)},Ht.num=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Kt,[null].concat(r,["num"])))},Zt.format.num=Wt,Zt.autodetect.push({p:5,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(1===r.length&&"number"===Jt(r[0])&&r[0]>=0&&r[0]<=16777215)return"num"}});var rn=M,en=k,tn=b,nn=d.unpack,an=d.type,fn=Math.round;en.prototype.rgb=function(r){return void 0===r&&(r=!0),!1===r?this._rgb.slice(0,3):this._rgb.slice(0,3).map(fn)},en.prototype.rgba=function(r){return void 0===r&&(r=!0),this._rgb.slice(0,4).map((function(e,t){return t<3?!1===r?e:fn(e):e}))},rn.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(en,[null].concat(r,["rgb"])))},tn.format.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=nn(r,"rgba");return void 0===t[3]&&(t[3]=1),t},tn.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=nn(r,"rgba"),"array"===an(r)&&(3===r.length||4===r.length&&"number"==an(r[3])&&r[3]>=0&&r[3]<=1))return"rgb"}});var on=Math.log,un=function(r){var e,t,n,a=r/100;return a<66?(e=255,t=a<6?0:-155.25485562709179-.44596950469579133*(t=a-2)+104.49216199393888*on(t),n=a<20?0:.8274096064007395*(n=a-10)-254.76935184120902+115.67994401066147*on(n)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*on(e),t=325.4494125711974+.07943456536662342*(t=a-50)-28.0852963507957*on(t),n=255),[e,t,n,1]},cn=un,ln=d.unpack,hn=Math.round,sn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];for(var t,n=ln(r,"rgb"),a=n[0],f=n[2],o=1e3,u=4e4,c=.4;u-o>c;){var i=cn(t=.5*(u+o));i[2]/i[0]>=f/a?u=t:o=t}return hn(t)},dn=M,bn=k,pn=b,gn=sn;bn.prototype.temp=bn.prototype.kelvin=bn.prototype.temperature=function(){return gn(this._rgb)},dn.temp=dn.kelvin=dn.temperature=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(bn,[null].concat(r,["temp"])))},pn.format.temp=pn.format.kelvin=pn.format.temperature=un;var vn=d.unpack,mn=Math.cbrt,yn=Math.pow,kn=Math.sign,wn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=vn(r,"rgb"),n=t[0],a=t[1],f=t[2],o=[Nn(n/255),Nn(a/255),Nn(f/255)],u=o[0],c=o[1],i=o[2],l=mn(.4122214708*u+.5363325363*c+.0514459929*i),h=mn(.2119034982*u+.6806995451*c+.1073969566*i),s=mn(.0883024619*u+.2817188376*c+.6299787005*i);return[.2104542553*l+.793617785*h-.0040720468*s,1.9779984951*l-2.428592205*h+.4505937099*s,.0259040371*l+.7827717662*h-.808675766*s]},Mn=wn;function Nn(r){var e=Math.abs(r);return e<.04045?r/12.92:(kn(r)||1)*yn((e+.055)/1.055,2.4)}var _n=d.unpack,xn=Math.pow,An=Math.sign,En=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=_n(r,"lab"))[0],n=r[1],a=r[2],f=xn(t+.3963377774*n+.2158037573*a,3),o=xn(t-.1055613458*n-.0638541728*a,3),u=xn(t-.0894841775*n-1.291485548*a,3);return[255*Pn(4.0767416621*f-3.3077115913*o+.2309699292*u),255*Pn(-1.2684380046*f+2.6097574011*o-.3413193965*u),255*Pn(-.0041960863*f-.7034186147*o+1.707614701*u),r.length>3?r[3]:1]},Fn=En;function Pn(r){var e=Math.abs(r);return e>.0031308?(An(r)||1)*(1.055*xn(e,1/2.4)-.055):12.92*r}var In=d.unpack,On=d.type,Rn=M,jn=k,Gn=b,qn=Mn;jn.prototype.oklab=function(){return qn(this._rgb)},Rn.oklab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(jn,[null].concat(r,["oklab"])))},Gn.format.oklab=Fn,Gn.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=In(r,"oklab"),"array"===On(r)&&3===r.length)return"oklab"}});var Ln=d.unpack,Cn=Mn,Bn=it,$n=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=Ln(r,"rgb"),n=t[0],a=t[1],f=t[2],o=Cn(n,a,f),u=o[0],c=o[1],i=o[2];return Bn(u,c,i)},Dn=$n,Tn=d.unpack,Sn=kt,Yn=Fn,zn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var t=(r=Tn(r,"lch"))[0],n=r[1],a=r[2],f=Sn(t,n,a),o=f[0],u=f[1],c=f[2],i=Yn(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},Xn=zn,Un=d.unpack,Vn=d.type,Wn=M,Hn=k,Kn=b,Zn=Dn;Hn.prototype.oklch=function(){return Zn(this._rgb)},Wn.oklch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Hn,[null].concat(r,["oklch"])))},Kn.format.oklch=Xn,Kn.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Un(r,"oklch"),"array"===Vn(r)&&3===r.length)return"oklch"}});var Jn=k,Qn=d.type;Jn.prototype.alpha=function(r,e){return void 0===e&&(e=!1),void 0!==r&&"number"===Qn(r)?e?(this._rgb[3]=r,this):new Jn([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]},k.prototype.clipped=function(){return this._rgb._clipped||!1};var ra=k,ea=qe;ra.prototype.darken=function(r){void 0===r&&(r=1);var e=this,t=e.lab();return t[0]-=ea.Kn*r,new ra(t,"lab").alpha(e.alpha(),!0)},ra.prototype.brighten=function(r){return void 0===r&&(r=1),this.darken(-r)},ra.prototype.darker=ra.prototype.darken,ra.prototype.brighter=ra.prototype.brighten,k.prototype.get=function(r){var e=r.split("."),t=e[0],n=e[1],a=this[t]();if(n){var f=t.indexOf(n)-("ok"===t.substr(0,2)?2:0);if(f>-1)return a[f];throw new Error("unknown channel "+n+" in mode "+t)}return a};var ta=k,na=d.type,aa=Math.pow,fa=1e-7,oa=20;ta.prototype.luminance=function(r){if(void 0!==r&&"number"===na(r)){if(0===r)return new ta([0,0,0,this._rgb[3]],"rgb");if(1===r)return new ta([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),t="rgb",n=oa,a=function(e,f){var o=e.interpolate(f,.5,t),u=o.luminance();return Math.abs(r-u)<fa||!n--?o:u>r?a(e,o):a(o,f)},f=(e>r?a(new ta([0,0,0]),this):a(this,new ta([255,255,255]))).rgb();return new ta(f.concat([this._rgb[3]]))}return ua.apply(void 0,this._rgb.slice(0,3))};var ua=function(r,e,t){return.2126*(r=ca(r))+.7152*(e=ca(e))+.0722*(t=ca(t))},ca=function(r){return(r/=255)<=.03928?r/12.92:aa((r+.055)/1.055,2.4)},ia={},la=k,ha=d.type,sa=ia,da=function(r,e,t){void 0===t&&(t=.5);for(var n=[],a=arguments.length-3;a-- >0;)n[a]=arguments[a+3];var f=n[0]||"lrgb";if(sa[f]||n.length||(f=Object.keys(sa)[0]),!sa[f])throw new Error("interpolation mode "+f+" is not defined");return"object"!==ha(r)&&(r=new la(r)),"object"!==ha(e)&&(e=new la(e)),sa[f](r,e,t).alpha(r.alpha()+t*(e.alpha()-r.alpha()))},ba=k,pa=da;ba.prototype.mix=ba.prototype.interpolate=function(r,e){void 0===e&&(e=.5);for(var t=[],n=arguments.length-2;n-- >0;)t[n]=arguments[n+2];return pa.apply(void 0,[this,r,e].concat(t))};var ga=k;ga.prototype.premultiply=function(r){void 0===r&&(r=!1);var e=this._rgb,t=e[3];return r?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new ga([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};var va=k,ma=qe;va.prototype.saturate=function(r){void 0===r&&(r=1);var e=this,t=e.lch();return t[1]+=ma.Kn*r,t[1]<0&&(t[1]=0),new va(t,"lch").alpha(e.alpha(),!0)},va.prototype.desaturate=function(r){return void 0===r&&(r=1),this.saturate(-r)};var ya=k,ka=d.type;ya.prototype.set=function(r,e,t){void 0===t&&(t=!1);var n=r.split("."),a=n[0],f=n[1],o=this[a]();if(f){var u=a.indexOf(f)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==ka(e))switch(e.charAt(0)){case"+":case"-":o[u]+=+e;break;case"*":o[u]*=+e.substr(1);break;case"/":o[u]/=+e.substr(1);break;default:o[u]=+e}else{if("number"!==ka(e))throw new Error("unsupported value for Color.set");o[u]=e}var c=new ya(o,a);return t?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+f+" in mode "+a)}return o};var wa=k,Ma=function(r,e,t){var n=r._rgb,a=e._rgb;return new wa(n[0]+t*(a[0]-n[0]),n[1]+t*(a[1]-n[1]),n[2]+t*(a[2]-n[2]),"rgb")};ia.rgb=Ma;var Na=k,_a=Math.sqrt,xa=Math.pow,Aa=function(r,e,t){var n=r._rgb,a=n[0],f=n[1],o=n[2],u=e._rgb,c=u[0],i=u[1],l=u[2];return new Na(_a(xa(a,2)*(1-t)+xa(c,2)*t),_a(xa(f,2)*(1-t)+xa(i,2)*t),_a(xa(o,2)*(1-t)+xa(l,2)*t),"rgb")};ia.lrgb=Aa;var Ea=k,Fa=function(r,e,t){var n=r.lab(),a=e.lab();return new Ea(n[0]+t*(a[0]-n[0]),n[1]+t*(a[1]-n[1]),n[2]+t*(a[2]-n[2]),"lab")};ia.lab=Fa;var Pa=k,Ia=function(r,e,t,n){var a,f,o,u,c,i,l,h,s,d,b,p,g;return"hsl"===n?(o=r.hsl(),u=e.hsl()):"hsv"===n?(o=r.hsv(),u=e.hsv()):"hcg"===n?(o=r.hcg(),u=e.hcg()):"hsi"===n?(o=r.hsi(),u=e.hsi()):"lch"===n||"hcl"===n?(n="hcl",o=r.hcl(),u=e.hcl()):"oklch"===n&&(o=r.oklch().reverse(),u=e.oklch().reverse()),"h"!==n.substr(0,1)&&"oklch"!==n||(c=(a=o)[0],l=a[1],s=a[2],i=(f=u)[0],h=f[1],d=f[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?p=Number.NaN:(p=i,1!=s&&0!=s||"hsv"==n||(b=h)):(p=c,1!=d&&0!=d||"hsv"==n||(b=l)):p=c+t*(i>c&&i-c>180?i-(c+360):i<c&&c-i>180?i+360-c:i-c),void 0===b&&(b=l+t*(h-l)),g=s+t*(d-s),new Pa("oklch"===n?[g,b,p]:[p,b,g],n)},Oa=Ia,Ra=function(r,e,t){return Oa(r,e,t,"lch")};ia.lch=Ra,ia.hcl=Ra;var ja=k,Ga=function(r,e,t){var n=r.num(),a=e.num();return new ja(n+t*(a-n),"num")};ia.num=Ga;var qa=Ia,La=function(r,e,t){return qa(r,e,t,"hcg")};ia.hcg=La;var Ca=Ia,Ba=function(r,e,t){return Ca(r,e,t,"hsi")};ia.hsi=Ba;var $a=Ia,Da=function(r,e,t){return $a(r,e,t,"hsl")};ia.hsl=Da;var Ta=Ia,Sa=function(r,e,t){return Ta(r,e,t,"hsv")};ia.hsv=Sa;var Ya=k,za=function(r,e,t){var n=r.oklab(),a=e.oklab();return new Ya(n[0]+t*(a[0]-n[0]),n[1]+t*(a[1]-n[1]),n[2]+t*(a[2]-n[2]),"oklab")};ia.oklab=za;var Xa=Ia,Ua=function(r,e,t){return Xa(r,e,t,"oklch")};ia.oklch=Ua;var Va=k,Wa=d.clip_rgb,Ha=Math.pow,Ka=Math.sqrt,Za=Math.PI,Ja=Math.cos,Qa=Math.sin,rf=Math.atan2,ef=function(r,e,t){void 0===e&&(e="lrgb"),void 0===t&&(t=null);var n=r.length;t||(t=Array.from(new Array(n)).map((function(){return 1})));var a=n/t.reduce((function(r,e){return r+e}));if(t.forEach((function(r,e){t[e]*=a})),r=r.map((function(r){return new Va(r)})),"lrgb"===e)return tf(r,t);for(var f=r.shift(),o=f.get(e),u=[],c=0,i=0,l=0;l<o.length;l++)if(o[l]=(o[l]||0)*t[0],u.push(isNaN(o[l])?0:t[0]),"h"===e.charAt(l)&&!isNaN(o[l])){var h=o[l]/180*Za;c+=Ja(h)*t[0],i+=Qa(h)*t[0]}var s=f.alpha()*t[0];r.forEach((function(r,n){var a=r.get(e);s+=r.alpha()*t[n+1];for(var f=0;f<o.length;f++)if(!isNaN(a[f]))if(u[f]+=t[n+1],"h"===e.charAt(f)){var l=a[f]/180*Za;c+=Ja(l)*t[n+1],i+=Qa(l)*t[n+1]}else o[f]+=a[f]*t[n+1]}));for(var d=0;d<o.length;d++)if("h"===e.charAt(d)){for(var b=rf(i/u[d],c/u[d])/Za*180;b<0;)b+=360;for(;b>=360;)b-=360;o[d]=b}else o[d]=o[d]/u[d];return s/=n,new Va(o,e).alpha(s>.99999?1:s,!0)},tf=function(r,e){for(var t=r.length,n=[0,0,0,0],a=0;a<r.length;a++){var f=r[a],o=e[a]/t,u=f._rgb;n[0]+=Ha(u[0],2)*o,n[1]+=Ha(u[1],2)*o,n[2]+=Ha(u[2],2)*o,n[3]+=u[3]*o}return n[0]=Ka(n[0]),n[1]=Ka(n[1]),n[2]=Ka(n[2]),n[3]>.9999999&&(n[3]=1),new Va(Wa(n))},nf=M,af=d.type,ff=Math.pow,of=function(r){var e="rgb",t=nf("#ccc"),n=0,a=[0,1],f=[],o=[0,0],u=!1,c=[],i=!1,l=0,h=1,s=!1,d={},b=!0,p=1,g=function(r){if((r=r||["#fff","#000"])&&"string"===af(r)&&nf.brewer&&nf.brewer[r.toLowerCase()]&&(r=nf.brewer[r.toLowerCase()]),"array"===af(r)){1===r.length&&(r=[r[0],r[0]]),r=r.slice(0);for(var e=0;e<r.length;e++)r[e]=nf(r[e]);f.length=0;for(var t=0;t<r.length;t++)f.push(t/(r.length-1))}return w(),c=r},v=function(r){if(null!=u){for(var e=u.length-1,t=0;t<e&&r>=u[t];)t++;return t-1}return 0},m=function(r){return r},y=function(r){return r},k=function(r,n){var a,i;if(null==n&&(n=!1),isNaN(r)||null===r)return t;i=n?r:u&&u.length>2?v(r)/(u.length-2):h!==l?(r-l)/(h-l):1,i=y(i),n||(i=m(i)),1!==p&&(i=ff(i,p)),i=o[0]+i*(1-o[0]-o[1]),i=Math.min(1,Math.max(0,i));var s=Math.floor(1e4*i);if(b&&d[s])a=d[s];else{if("array"===af(c))for(var g=0;g<f.length;g++){var k=f[g];if(i<=k){a=c[g];break}if(i>=k&&g===f.length-1){a=c[g];break}if(i>k&&i<f[g+1]){i=(i-k)/(f[g+1]-k),a=nf.interpolate(c[g],c[g+1],i,e);break}}else"function"===af(c)&&(a=c(i));b&&(d[s]=a)}return a},w=function(){return d={}};g(r);var M=function(r){var e=nf(k(r));return i&&e[i]?e[i]():e};return M.classes=function(r){if(null!=r){if("array"===af(r))u=r,a=[r[0],r[r.length-1]];else{var e=nf.analyze(a);u=0===r?[e.min,e.max]:nf.limits(e,"e",r)}return M}return u},M.domain=function(r){if(!arguments.length)return a;l=r[0],h=r[r.length-1],f=[];var e=c.length;if(r.length===e&&l!==h)for(var t=0,n=Array.from(r);t<n.length;t+=1){var o=n[t];f.push((o-l)/(h-l))}else{for(var u=0;u<e;u++)f.push(u/(e-1));if(r.length>2){var i=r.map((function(e,t){return t/(r.length-1)})),s=r.map((function(r){return(r-l)/(h-l)}));s.every((function(r,e){return i[e]===r}))||(y=function(r){if(r<=0||r>=1)return r;for(var e=0;r>=s[e+1];)e++;var t=(r-s[e])/(s[e+1]-s[e]);return i[e]+t*(i[e+1]-i[e])})}}return a=[l,h],M},M.mode=function(r){return arguments.length?(e=r,w(),M):e},M.range=function(r,e){return g(r),M},M.out=function(r){return i=r,M},M.spread=function(r){return arguments.length?(n=r,M):n},M.correctLightness=function(r){return null==r&&(r=!0),s=r,w(),m=s?function(r){for(var e=k(0,!0).lab()[0],t=k(1,!0).lab()[0],n=e>t,a=k(r,!0).lab()[0],f=e+(t-e)*r,o=a-f,u=0,c=1,i=20;Math.abs(o)>.01&&i-- >0;)n&&(o*=-1),o<0?(u=r,r+=.5*(c-r)):(c=r,r+=.5*(u-r)),a=k(r,!0).lab()[0],o=a-f;return r}:function(r){return r},M},M.padding=function(r){return null!=r?("number"===af(r)&&(r=[r,r]),o=r,M):o},M.colors=function(e,t){arguments.length<2&&(t="hex");var n=[];if(0===arguments.length)n=c.slice(0);else if(1===e)n=[M(.5)];else if(e>1){var f=a[0],o=a[1]-f;n=uf(0,e,!1).map((function(r){return M(f+r/(e-1)*o)}))}else{r=[];var i=[];if(u&&u.length>2)for(var l=1,h=u.length,s=1<=h;s?l<h:l>h;s?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;n=i.map((function(r){return M(r)}))}return nf[t]&&(n=n.map((function(r){return r[t]()}))),n},M.cache=function(r){return null!=r?(b=r,M):b},M.gamma=function(r){return null!=r?(p=r,M):p},M.nodata=function(r){return null!=r?(t=nf(r),M):t},M};function uf(r,e,t){for(var n=[],a=r<e,f=t?a?e+1:e-1:e,o=r;a?o<f:o>f;a?o++:o--)n.push(o);return n}var cf=k,lf=of,hf=function(r){for(var e=[1,1],t=1;t<r;t++){for(var n=[1],a=1;a<=e.length;a++)n[a]=(e[a]||0)+e[a-1];e=n}return e},sf=function(r){var e,t,n,a,f,o,u;if(2===(r=r.map((function(r){return new cf(r)}))).length)e=r.map((function(r){return r.lab()})),f=e[0],o=e[1],a=function(r){var e=[0,1,2].map((function(e){return f[e]+r*(o[e]-f[e])}));return new cf(e,"lab")};else if(3===r.length)t=r.map((function(r){return r.lab()})),f=t[0],o=t[1],u=t[2],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*f[e]+2*(1-r)*r*o[e]+r*r*u[e]}));return new cf(e,"lab")};else if(4===r.length){var c;n=r.map((function(r){return r.lab()})),f=n[0],o=n[1],u=n[2],c=n[3],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*(1-r)*f[e]+3*(1-r)*(1-r)*r*o[e]+3*(1-r)*r*r*u[e]+r*r*r*c[e]}));return new cf(e,"lab")}}else{if(!(r.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,h;i=r.map((function(r){return r.lab()})),h=r.length-1,l=hf(h),a=function(r){var e=1-r,t=[0,1,2].map((function(t){return i.reduce((function(n,a,f){return n+l[f]*Math.pow(e,h-f)*Math.pow(r,f)*a[t]}),0)}));return new cf(t,"lab")}}return a},df=function(r){var e=sf(r);return e.scale=function(){return lf(e)},e},bf=M,pf=function(r,e,t){if(!pf[t])throw new Error("unknown blend mode "+t);return pf[t](r,e)},gf=function(r){return function(e,t){var n=bf(t).rgb(),a=bf(e).rgb();return bf.rgb(r(n,a))}},vf=function(r){return function(e,t){var n=[];return n[0]=r(e[0],t[0]),n[1]=r(e[1],t[1]),n[2]=r(e[2],t[2]),n}},mf=function(r){return r},yf=function(r,e){return r*e/255},kf=function(r,e){return r>e?e:r},wf=function(r,e){return r>e?r:e},Mf=function(r,e){return 255*(1-(1-r/255)*(1-e/255))},Nf=function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))},_f=function(r,e){return 255*(1-(1-e/255)/(r/255))},xf=function(r,e){return 255===r||(r=e/255*255/(1-r/255))>255?255:r};pf.normal=gf(vf(mf)),pf.multiply=gf(vf(yf)),pf.screen=gf(vf(Mf)),pf.overlay=gf(vf(Nf)),pf.darken=gf(vf(kf)),pf.lighten=gf(vf(wf)),pf.dodge=gf(vf(xf)),pf.burn=gf(vf(_f));for(var Af=pf,Ef=d.type,Ff=d.clip_rgb,Pf=d.TWOPI,If=Math.pow,Of=Math.sin,Rf=Math.cos,jf=M,Gf=function(r,e,t,n,a){void 0===r&&(r=300),void 0===e&&(e=-1.5),void 0===t&&(t=1),void 0===n&&(n=1),void 0===a&&(a=[0,1]);var f,o=0;"array"===Ef(a)?f=a[1]-a[0]:(f=0,a=[a,a]);var u=function(u){var c=Pf*((r+120)/360+e*u),i=If(a[0]+f*u,n),l=(0!==o?t[0]+u*o:t)*i*(1-i)/2,h=Rf(c),s=Of(c);return jf(Ff([255*(i+l*(-.14861*h+1.78277*s)),255*(i+l*(-.29227*h-.90649*s)),255*(i+l*(1.97294*h)),1]))};return u.start=function(e){return null==e?r:(r=e,u)},u.rotations=function(r){return null==r?e:(e=r,u)},u.gamma=function(r){return null==r?n:(n=r,u)},u.hue=function(r){return null==r?t:("array"===Ef(t=r)?0==(o=t[1]-t[0])&&(t=t[1]):o=0,u)},u.lightness=function(r){return null==r?a:("array"===Ef(r)?(a=r,f=r[1]-r[0]):(a=[r,r],f=0),u)},u.scale=function(){return jf.scale(u)},u.hue(t),u},qf=k,Lf="0123456789abcdef",Cf=Math.floor,Bf=Math.random,$f=function(){for(var r="#",e=0;e<6;e++)r+=Lf.charAt(Cf(16*Bf()));return new qf(r,"hex")},Df=u,Tf=Math.log,Sf=Math.pow,Yf=Math.floor,zf=Math.abs,Xf=function(r,e){void 0===e&&(e=null);var t={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Df(r)&&(r=Object.values(r)),r.forEach((function(r){e&&"object"===Df(r)&&(r=r[e]),null==r||isNaN(r)||(t.values.push(r),t.sum+=r,r<t.min&&(t.min=r),r>t.max&&(t.max=r),t.count+=1)})),t.domain=[t.min,t.max],t.limits=function(r,e){return Uf(t,r,e)},t},Uf=function(r,e,t){void 0===e&&(e="equal"),void 0===t&&(t=7),"array"==Df(r)&&(r=Xf(r));var n=r.min,a=r.max,f=r.values.sort((function(r,e){return r-e}));if(1===t)return[n,a];var o=[];if("c"===e.substr(0,1)&&(o.push(n),o.push(a)),"e"===e.substr(0,1)){o.push(n);for(var u=1;u<t;u++)o.push(n+u/t*(a-n));o.push(a)}else if("l"===e.substr(0,1)){if(n<=0)throw new Error("Logarithmic scales are only possible for values > 0");var c=Math.LOG10E*Tf(n),i=Math.LOG10E*Tf(a);o.push(n);for(var l=1;l<t;l++)o.push(Sf(10,c+l/t*(i-c)));o.push(a)}else if("q"===e.substr(0,1)){o.push(n);for(var h=1;h<t;h++){var s=(f.length-1)*h/t,d=Yf(s);if(d===s)o.push(f[d]);else{var b=s-d;o.push(f[d]*(1-b)+f[d+1]*b)}}o.push(a)}else if("k"===e.substr(0,1)){var p,g=f.length,v=new Array(g),m=new Array(t),y=!0,k=0,w=null;(w=[]).push(n);for(var M=1;M<t;M++)w.push(n+M/t*(a-n));for(w.push(a);y;){for(var N=0;N<t;N++)m[N]=0;for(var _=0;_<g;_++)for(var x=f[_],A=Number.MAX_VALUE,E=void 0,F=0;F<t;F++){var P=zf(w[F]-x);P<A&&(A=P,E=F),m[E]++,v[_]=E}for(var I=new Array(t),O=0;O<t;O++)I[O]=null;for(var R=0;R<g;R++)null===I[p=v[R]]?I[p]=f[R]:I[p]+=f[R];for(var j=0;j<t;j++)I[j]*=1/m[j];y=!1;for(var G=0;G<t;G++)if(I[G]!==w[G]){y=!0;break}w=I,++k>200&&(y=!1)}for(var q={},L=0;L<t;L++)q[L]=[];for(var C=0;C<g;C++)q[p=v[C]].push(f[C]);for(var B=[],$=0;$<t;$++)B.push(q[$][0]),B.push(q[$][q[$].length-1]);B=B.sort((function(r,e){return r-e})),o.push(B[0]);for(var D=1;D<B.length;D+=2){var T=B[D];isNaN(T)||-1!==o.indexOf(T)||o.push(T)}}return o},Vf={analyze:Xf,limits:Uf},Wf=k,Hf=function(r,e){r=new Wf(r),e=new Wf(e);var t=r.luminance(),n=e.luminance();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},Kf=k,Zf=Math.sqrt,Jf=Math.pow,Qf=Math.min,ro=Math.max,eo=Math.atan2,to=Math.abs,no=Math.cos,ao=Math.sin,fo=Math.exp,oo=Math.PI,uo=function(r,e,t,n,a){void 0===t&&(t=1),void 0===n&&(n=1),void 0===a&&(a=1);var f=function(r){return 360*r/(2*oo)},o=function(r){return 2*oo*r/360};r=new Kf(r),e=new Kf(e);var u=Array.from(r.lab()),c=u[0],i=u[1],l=u[2],h=Array.from(e.lab()),s=h[0],d=h[1],b=h[2],p=(c+s)/2,g=(Zf(Jf(i,2)+Jf(l,2))+Zf(Jf(d,2)+Jf(b,2)))/2,v=.5*(1-Zf(Jf(g,7)/(Jf(g,7)+Jf(25,7)))),m=i*(1+v),y=d*(1+v),k=Zf(Jf(m,2)+Jf(l,2)),w=Zf(Jf(y,2)+Jf(b,2)),M=(k+w)/2,N=f(eo(l,m)),_=f(eo(b,y)),x=N>=0?N:N+360,A=_>=0?_:_+360,E=to(x-A)>180?(x+A+360)/2:(x+A)/2,F=1-.17*no(o(E-30))+.24*no(o(2*E))+.32*no(o(3*E+6))-.2*no(o(4*E-63)),P=A-x;P=to(P)<=180?P:A<=x?P+360:P-360,P=2*Zf(k*w)*ao(o(P)/2);var I=s-c,O=w-k,R=1+.015*Jf(p-50,2)/Zf(20+Jf(p-50,2)),j=1+.045*M,G=1+.015*M*F,q=30*fo(-Jf((E-275)/25,2)),L=-2*Zf(Jf(M,7)/(Jf(M,7)+Jf(25,7)))*ao(2*o(q)),C=Zf(Jf(I/(t*R),2)+Jf(O/(n*j),2)+Jf(P/(a*G),2)+L*(O/(n*j))*(P/(a*G)));return ro(0,Qf(100,C))},co=k,io=function(r,e,t){void 0===t&&(t="lab"),r=new co(r),e=new co(e);var n=r.get(t),a=e.get(t),f=0;for(var o in n){var u=(n[o]||0)-(a[o]||0);f+=u*u}return Math.sqrt(f)},lo=k,ho=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];try{return new(Function.prototype.bind.apply(lo,[null].concat(r))),!0}catch(r){return!1}},so=M,bo=of,po={cool:function(){return bo([so.hsl(180,1,.9),so.hsl(250,.7,.4)])},hot:function(){return bo(["#000","#f00","#ff0","#fff"]).mode("rgb")}},go={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},vo=0,mo=Object.keys(go);vo<mo.length;vo+=1){var yo=mo[vo];go[yo.toLowerCase()]=go[yo]}var ko=go,wo=M;return wo.average=ef,wo.bezier=df,wo.blend=Af,wo.cubehelix=Gf,wo.mix=wo.interpolate=da,wo.random=$f,wo.scale=of,wo.analyze=Vf.analyze,wo.contrast=Hf,wo.deltaE=uo,wo.distance=io,wo.limits=Vf.limits,wo.valid=ho,wo.scales=po,wo.colors=Lt,wo.brewer=ko,wo}();const t=r=>{const e=[];for(let t=0;t<r;t++)e.push(t);return e},n=(r,e)=>{const n=360/r;return t(r).map((r=>Math.floor((e+r*n)%360)))},a=(r,t)=>{const[n,a,f]=e(t).hsl();return e.hsl(n,r,f).hex()},f=(r,n,a)=>{const f=t(n).reverse().map((r=>(r+.5)/n)),o=e(r);return f.map((r=>o.luminance(r*(2*a)).hex()))},o=r=>{const[t,n]=e(r).hsl();return n<.5?"gray":t},u=(r,e)=>(r[e.key]=e.value,r),c=r=>{r=r.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(r,e,t,n){return e+e+t+t+n+n}));const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return`rgb(${parseInt(e[1],16)}, ${parseInt(e[2],16)}, ${parseInt(e[3],16)})`},i=(r,e,t)=>Math.min(Math.max(r,e),t),l=r=>h(r).map(s),h=r=>r.match(/-?\d+(\.\d+)?%?/g),s=(r,e)=>e<3?-1!=r.indexOf("%")?Math.round(255*i(parseInt(r,10),0,100)/100):i(parseInt(r,10),0,255):i(parseFloat(r),0,1),d=r=>"#"===r.slice(0,1),b=(r,e,t)=>{const n=[r,e,t].map((function(r){return(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}));return.2126*n[0]+.7152*n[1]+.0722*n[2]},p=(r,e)=>{const t=b(r[0],r[1],r[2]),n=b(e[0],e[1],e[2]);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)},g=r=>{const e=l(r),t=4===e.length?v(255*r[3]):"";return"#"+v(e[0])+v(e[1])+v(e[2])+t},v=r=>{const e=Math.round(i(r,0,255)).toString(16);return 1==e.length?"0"+e:e};exports.getColorPalette=({accent:r="rgb(53, 89, 199)",hues:t=12,shades:c=1,gray:i=!1,lightness:l=.5}={})=>{const h=e(r),s=[],[d,b,p]=h.hsl(),g=Number(l),v=Number(c),m=n(Number(t),d);i&&s.push({key:"gray",value:f(a(.1,h.hex()),v,g)}),m.forEach((r=>{const t=e.hsl(r,b,p),n=o(t);s.push({key:n,value:f(t.hex(),v,g)})}));return s.reduce(u,{})},exports.getContrastRatio=(r,e)=>{d(e)&&(e=c(e)),d(r)&&(r=c(r));const[t,n,a]=l(e),[f,o,u]=l(r);return p([t,n,a],[f,o,u])},exports.getTextColor=r=>{let e=r;"#"!==e.slice(0,1)&&(e=g(e)),d(e)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map((r=>r+r)).join(""));return(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=120?"rgb(12, 26, 61)":"rgb(255, 255, 255)"},exports.hexToRgb=c,exports.rgbToHex=g;

@@ -1,1 +0,1 @@

var NordColor=function(r){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var e={exports:{}};e.exports=function(){for(var r=function(r,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),r<e?e:r>n?n:r},e=r,n=function(r){r._clipped=!1,r._unclipped=r.slice(0);for(var n=0;n<=3;n++)n<3?((r[n]<0||r[n]>255)&&(r._clipped=!0),r[n]=e(r[n],0,255)):3===n&&(r[n]=e(r[n],0,1));return r},t={},a=0,f=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a<f.length;a+=1){var o=f[a];t["[object "+o+"]"]=o.toLowerCase()}var u=function(r){return t[Object.prototype.toString.call(r)]||"object"},c=u,i=function(r,e){return void 0===e&&(e=null),r.length>=3?Array.prototype.slice.call(r):"object"==c(r[0])&&e?e.split("").filter((function(e){return void 0!==r[0][e]})).map((function(e){return r[0][e]})):r[0]},l=u,h=function(r){if(r.length<2)return null;var e=r.length-1;return"string"==l(r[e])?r[e].toLowerCase():null},s=Math.PI,d={clip_rgb:n,limit:r,type:u,unpack:i,last:h,PI:s,TWOPI:2*s,PITHIRD:s/3,DEG2RAD:s/180,RAD2DEG:180/s},b={format:{},autodetect:[]},p=d.last,g=d.clip_rgb,v=d.type,m=b,y=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=this;if("object"===v(r[0])&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];var t=p(r),a=!1;if(!t){a=!0,m.sorted||(m.autodetect=m.autodetect.sort((function(r,e){return e.p-r.p})),m.sorted=!0);for(var f=0,o=m.autodetect;f<o.length;f+=1){var u=o[f];if(t=u.test.apply(u,r))break}}if(!m.format[t])throw new Error("unknown format: "+r);var c=m.format[t].apply(null,a?r:r.slice(0,-1));n._rgb=g(c),3===n._rgb.length&&n._rgb.push(1)};y.prototype.toString=function(){return"function"==v(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var k=y,w=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(w.Color,[null].concat(r)))};w.Color=k,w.version="2.4.2";var M=w,N=d.unpack,_=Math.max,x=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=N(r,"rgb"),t=n[0],a=n[1],f=n[2],o=1-_(t/=255,_(a/=255,f/=255)),u=o<1?1/(1-o):0;return[(1-t-o)*u,(1-a-o)*u,(1-f-o)*u,o]},A=x,E=d.unpack,F=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=E(r,"cmyk"))[0],t=r[1],a=r[2],f=r[3],o=r.length>4?r[4]:1;return 1===f?[0,0,0,o]:[n>=1?0:255*(1-n)*(1-f),t>=1?0:255*(1-t)*(1-f),a>=1?0:255*(1-a)*(1-f),o]},P=F,I=M,O=k,R=b,j=d.unpack,G=d.type,q=A;O.prototype.cmyk=function(){return q(this._rgb)},I.cmyk=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(O,[null].concat(r,["cmyk"])))},R.format.cmyk=P,R.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=j(r,"cmyk"),"array"===G(r)&&4===r.length)return"cmyk"}});var C=d.unpack,L=d.last,B=function(r){return Math.round(100*r)/100},$=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=C(r,"hsla"),t=L(r)||"lsa";return n[0]=B(n[0]||0),n[1]=B(100*n[1])+"%",n[2]=B(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(",")+")"},D=$,T=d.unpack,S=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=T(r,"rgba"))[0],t=r[1],a=r[2];n/=255,t/=255,a/=255;var f,o,u=Math.min(n,t,a),c=Math.max(n,t,a),i=(c+u)/2;return c===u?(f=0,o=Number.NaN):f=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),n==c?o=(t-a)/(c-u):t==c?o=2+(a-n)/(c-u):a==c&&(o=4+(n-t)/(c-u)),(o*=60)<0&&(o+=360),r.length>3&&void 0!==r[3]?[o,f,i,r[3]]:[o,f,i]},Y=S,z=d.unpack,X=d.last,U=D,V=Y,W=Math.round,H=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=z(r,"rgba"),t=X(r)||"rgb";return"hsl"==t.substr(0,3)?U(V(n),t):(n[0]=W(n[0]),n[1]=W(n[1]),n[2]=W(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(",")+")")},K=H,Z=d.unpack,J=Math.round,Q=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];var t,a,f,o=(e=Z(e,"hsl"))[0],u=e[1],c=e[2];if(0===u)t=a=f=255*c;else{var i=[0,0,0],l=[0,0,0],h=c<.5?c*(1+u):c+u-c*u,s=2*c-h,d=o/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]=s+6*(h-s)*i[b]:2*i[b]<1?l[b]=h:3*i[b]<2?l[b]=s+(h-s)*(2/3-i[b])*6:l[b]=s;t=(r=[J(255*l[0]),J(255*l[1]),J(255*l[2])])[0],a=r[1],f=r[2]}return e.length>3?[t,a,f,e[3]]:[t,a,f,1]},rr=Q,er=rr,nr=b,tr=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ar=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,fr=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,or=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ur=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,cr=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ir=Math.round,lr=function(r){var e;if(r=r.toLowerCase().trim(),nr.format.named)try{return nr.format.named(r)}catch(r){}if(e=r.match(tr)){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(ar)){for(var a=e.slice(1,5),f=0;f<4;f++)a[f]=+a[f];return a}if(e=r.match(fr)){for(var o=e.slice(1,4),u=0;u<3;u++)o[u]=ir(2.55*o[u]);return o[3]=1,o}if(e=r.match(or)){for(var c=e.slice(1,5),i=0;i<3;i++)c[i]=ir(2.55*c[i]);return c[3]=+c[3],c}if(e=r.match(ur)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var h=er(l);return h[3]=1,h}if(e=r.match(cr)){var s=e.slice(1,4);s[1]*=.01,s[2]*=.01;var d=er(s);return d[3]=+e[4],d}};lr.test=function(r){return tr.test(r)||ar.test(r)||fr.test(r)||or.test(r)||ur.test(r)||cr.test(r)};var hr=lr,sr=M,dr=k,br=b,pr=d.type,gr=K,vr=hr;dr.prototype.css=function(r){return gr(this._rgb,r)},sr.css=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(dr,[null].concat(r,["css"])))},br.format.css=vr,br.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"===pr(r)&&vr.test(r))return"css"}});var mr=k,yr=M,kr=b,wr=d.unpack;kr.format.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=wr(r,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},yr.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(mr,[null].concat(r,["gl"])))},mr.prototype.gl=function(){var r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};var Mr=d.unpack,Nr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=Mr(r,"rgb"),a=t[0],f=t[1],o=t[2],u=Math.min(a,f,o),c=Math.max(a,f,o),i=c-u,l=100*i/255,h=u/(255-i)*100;return 0===i?n=Number.NaN:(a===c&&(n=(f-o)/i),f===c&&(n=2+(o-a)/i),o===c&&(n=4+(a-f)/i),(n*=60)<0&&(n+=360)),[n,l,h]},_r=Nr,xr=d.unpack,Ar=Math.floor,Er=function(){for(var r,e,n,t,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xr(o,"hcg"))[0],s=o[1],d=o[2];d*=255;var b=255*s;if(0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var p=Ar(h/=60),g=h-p,v=d*(1-s),m=v+b*(1-g),y=v+b*g,k=v+b;switch(p){case 0:c=(r=[k,y,v])[0],i=r[1],l=r[2];break;case 1:c=(e=[m,k,v])[0],i=e[1],l=e[2];break;case 2:c=(n=[v,k,y])[0],i=n[1],l=n[2];break;case 3:c=(t=[v,m,k])[0],i=t[1],l=t[2];break;case 4:c=(a=[y,v,k])[0],i=a[1],l=a[2];break;case 5:c=(f=[k,v,m])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Fr=Er,Pr=d.unpack,Ir=d.type,Or=M,Rr=k,jr=b,Gr=_r;Rr.prototype.hcg=function(){return Gr(this._rgb)},Or.hcg=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Rr,[null].concat(r,["hcg"])))},jr.format.hcg=Fr,jr.autodetect.push({p:1,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pr(r,"hcg"),"array"===Ir(r)&&3===r.length)return"hcg"}});var qr=d.unpack,Cr=d.last,Lr=Math.round,Br=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=qr(r,"rgba"),t=n[0],a=n[1],f=n[2],o=n[3],u=Cr(r)||"auto";void 0===o&&(o=1),"auto"===u&&(u=o<1?"rgba":"rgb");var c="000000"+((t=Lr(t))<<16|(a=Lr(a))<<8|(f=Lr(f))).toString(16);c=c.substr(c.length-6);var i="0"+Lr(255*o).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},$r=Br,Dr=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Tr=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Sr=function(r){if(r.match(Dr)){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(Tr)){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)},Yr=M,zr=k,Xr=d.type,Ur=b,Vr=$r;zr.prototype.hex=function(r){return Vr(this._rgb,r)},Yr.hex=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(zr,[null].concat(r,["hex"])))},Ur.format.hex=Sr,Ur.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"===Xr(r)&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var Wr=d.unpack,Hr=d.TWOPI,Kr=Math.min,Zr=Math.sqrt,Jr=Math.acos,Qr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=Wr(r,"rgb"),a=t[0],f=t[1],o=t[2],u=Kr(a/=255,f/=255,o/=255),c=(a+f+o)/3,i=c>0?1-u/c:0;return 0===i?n=NaN:(n=(a-f+(a-o))/2,n/=Zr((a-f)*(a-f)+(a-o)*(f-o)),n=Jr(n),o>f&&(n=Hr-n),n/=Hr),[360*n,i,c]},re=Qr,ee=d.unpack,ne=d.limit,te=d.TWOPI,ae=d.PITHIRD,fe=Math.cos,oe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=ee(r,"hsi"))[0],o=r[1],u=r[2];return isNaN(f)&&(f=0),isNaN(o)&&(o=0),f>360&&(f-=360),f<0&&(f+=360),(f/=360)<1/3?t=1-((a=(1-o)/3)+(n=(1+o*fe(te*f)/fe(ae-te*f))/3)):f<2/3?a=1-((n=(1-o)/3)+(t=(1+o*fe(te*(f-=1/3))/fe(ae-te*f))/3)):n=1-((t=(1-o)/3)+(a=(1+o*fe(te*(f-=2/3))/fe(ae-te*f))/3)),[255*(n=ne(u*n*3)),255*(t=ne(u*t*3)),255*(a=ne(u*a*3)),r.length>3?r[3]:1]},ue=oe,ce=d.unpack,ie=d.type,le=M,he=k,se=b,de=re;he.prototype.hsi=function(){return de(this._rgb)},le.hsi=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(he,[null].concat(r,["hsi"])))},se.format.hsi=ue,se.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ce(r,"hsi"),"array"===ie(r)&&3===r.length)return"hsi"}});var be=d.unpack,pe=d.type,ge=M,ve=k,me=b,ye=Y;ve.prototype.hsl=function(){return ye(this._rgb)},ge.hsl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(ve,[null].concat(r,["hsl"])))},me.format.hsl=rr,me.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=be(r,"hsl"),"array"===pe(r)&&3===r.length)return"hsl"}});var ke=d.unpack,we=Math.min,Me=Math.max,Ne=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=ke(r,"rgb"))[0],o=r[1],u=r[2],c=we(f,o,u),i=Me(f,o,u),l=i-c;return a=i/255,0===i?(n=Number.NaN,t=0):(t=l/i,f===i&&(n=(o-u)/l),o===i&&(n=2+(u-f)/l),u===i&&(n=4+(f-o)/l),(n*=60)<0&&(n+=360)),[n,t,a]},_e=Ne,xe=d.unpack,Ae=Math.floor,Ee=function(){for(var r,e,n,t,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xe(o,"hsv"))[0],s=o[1],d=o[2];if(d*=255,0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var b=Ae(h/=60),p=h-b,g=d*(1-s),v=d*(1-s*p),m=d*(1-s*(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=(f=[d,g,v])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Fe=Ee,Pe=d.unpack,Ie=d.type,Oe=M,Re=k,je=b,Ge=_e;Re.prototype.hsv=function(){return Ge(this._rgb)},Oe.hsv=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Re,[null].concat(r,["hsv"])))},je.format.hsv=Fe,je.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pe(r,"hsv"),"array"===Ie(r)&&3===r.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ce=qe,Le=d.unpack,Be=Math.pow,$e=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Le(r,"rgb"),t=n[0],a=n[1],f=n[2],o=Se(t,a,f),u=o[0],c=o[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-o[2])]},De=function(r){return(r/=255)<=.04045?r/12.92:Be((r+.055)/1.055,2.4)},Te=function(r){return r>Ce.t3?Be(r,1/3):r/Ce.t2+Ce.t0},Se=function(r,e,n){return r=De(r),e=De(e),n=De(n),[Te((.4124564*r+.3575761*e+.1804375*n)/Ce.Xn),Te((.2126729*r+.7151522*e+.072175*n)/Ce.Yn),Te((.0193339*r+.119192*e+.9503041*n)/Ce.Zn)]},Ye=$e,ze=qe,Xe=d.unpack,Ue=Math.pow,Ve=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=Xe(r,"lab"))[0],o=r[1],u=r[2];return t=(f+16)/116,n=isNaN(o)?t:t+o/500,a=isNaN(u)?t:t-u/200,t=ze.Yn*He(t),n=ze.Xn*He(n),a=ze.Zn*He(a),[We(3.2404542*n-1.5371385*t-.4985314*a),We(-.969266*n+1.8760108*t+.041556*a),We(.0556434*n-.2040259*t+1.0572252*a),r.length>3?r[3]:1]},We=function(r){return 255*(r<=.00304?12.92*r:1.055*Ue(r,1/2.4)-.055)},He=function(r){return r>ze.t1?r*r*r:ze.t2*(r-ze.t0)},Ke=Ve,Ze=d.unpack,Je=d.type,Qe=M,rn=k,en=b,nn=Ye;rn.prototype.lab=function(){return nn(this._rgb)},Qe.lab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(rn,[null].concat(r,["lab"])))},en.format.lab=Ke,en.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Ze(r,"lab"),"array"===Je(r)&&3===r.length)return"lab"}});var tn=d.unpack,an=d.RAD2DEG,fn=Math.sqrt,on=Math.atan2,un=Math.round,cn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=tn(r,"lab"),t=n[0],a=n[1],f=n[2],o=fn(a*a+f*f),u=(on(f,a)*an+360)%360;return 0===un(1e4*o)&&(u=Number.NaN),[t,o,u]},ln=cn,hn=d.unpack,sn=Ye,dn=ln,bn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=hn(r,"rgb"),t=n[0],a=n[1],f=n[2],o=sn(t,a,f),u=o[0],c=o[1],i=o[2];return dn(u,c,i)},pn=bn,gn=d.unpack,vn=d.DEG2RAD,mn=Math.sin,yn=Math.cos,kn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=gn(r,"lch"),t=n[0],a=n[1],f=n[2];return isNaN(f)&&(f=0),[t,yn(f*=vn)*a,mn(f)*a]},wn=kn,Mn=d.unpack,Nn=wn,_n=Ke,xn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Mn(r,"lch"))[0],t=r[1],a=r[2],f=Nn(n,t,a),o=f[0],u=f[1],c=f[2],i=_n(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},An=xn,En=d.unpack,Fn=An,Pn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=En(r,"hcl").reverse();return Fn.apply(void 0,n)},In=Pn,On=d.unpack,Rn=d.type,jn=M,Gn=k,qn=b,Cn=pn;Gn.prototype.lch=function(){return Cn(this._rgb)},Gn.prototype.hcl=function(){return Cn(this._rgb).reverse()},jn.lch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Gn,[null].concat(r,["lch"])))},jn.hcl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Gn,[null].concat(r,["hcl"])))},qn.format.lch=An,qn.format.hcl=In,["lch","hcl"].forEach((function(r){return qn.autodetect.push({p:2,test:function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];if(e=On(e,r),"array"===Rn(e)&&3===e.length)return r}})}));var Ln={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"},Bn=k,$n=b,Dn=d.type,Tn=Ln,Sn=Sr,Yn=$r;Bn.prototype.name=function(){for(var r=Yn(this._rgb,"rgb"),e=0,n=Object.keys(Tn);e<n.length;e+=1){var t=n[e];if(Tn[t]===r)return t.toLowerCase()}return r},$n.format.named=function(r){if(r=r.toLowerCase(),Tn[r])return Sn(Tn[r]);throw new Error("unknown color name: "+r)},$n.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"===Dn(r)&&Tn[r.toLowerCase()])return"named"}});var zn=d.unpack,Xn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=zn(r,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},Un=Xn,Vn=d.type,Wn=function(r){if("number"==Vn(r)&&r>=0&&r<=16777215)return[r>>16,r>>8&255,255&r,1];throw new Error("unknown num color: "+r)},Hn=M,Kn=k,Zn=b,Jn=d.type,Qn=Un;Kn.prototype.num=function(){return Qn(this._rgb)},Hn.num=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Kn,[null].concat(r,["num"])))},Zn.format.num=Wn,Zn.autodetect.push({p:5,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(1===r.length&&"number"===Jn(r[0])&&r[0]>=0&&r[0]<=16777215)return"num"}});var rt=M,et=k,nt=b,tt=d.unpack,at=d.type,ft=Math.round;et.prototype.rgb=function(r){return void 0===r&&(r=!0),!1===r?this._rgb.slice(0,3):this._rgb.slice(0,3).map(ft)},et.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:ft(e):e}))},rt.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(et,[null].concat(r,["rgb"])))},nt.format.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=tt(r,"rgba");return void 0===n[3]&&(n[3]=1),n},nt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=tt(r,"rgba"),"array"===at(r)&&(3===r.length||4===r.length&&"number"==at(r[3])&&r[3]>=0&&r[3]<=1))return"rgb"}});var ot=Math.log,ut=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*ot(n),t=a<20?0:.8274096064007395*(t=a-10)-254.76935184120902+115.67994401066147*ot(t)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*ot(e),n=325.4494125711974+.07943456536662342*(n=a-50)-28.0852963507957*ot(n),t=255),[e,n,t,1]},ct=ut,it=d.unpack,lt=Math.round,ht=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];for(var n,t=it(r,"rgb"),a=t[0],f=t[2],o=1e3,u=4e4,c=.4;u-o>c;){var i=ct(n=.5*(u+o));i[2]/i[0]>=f/a?u=n:o=n}return lt(n)},st=M,dt=k,bt=b,pt=ht;dt.prototype.temp=dt.prototype.kelvin=dt.prototype.temperature=function(){return pt(this._rgb)},st.temp=st.kelvin=st.temperature=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(dt,[null].concat(r,["temp"])))},bt.format.temp=bt.format.kelvin=bt.format.temperature=ut;var gt=d.unpack,vt=Math.cbrt,mt=Math.pow,yt=Math.sign,kt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=gt(r,"rgb"),t=n[0],a=n[1],f=n[2],o=[Mt(t/255),Mt(a/255),Mt(f/255)],u=o[0],c=o[1],i=o[2],l=vt(.4122214708*u+.5363325363*c+.0514459929*i),h=vt(.2119034982*u+.6806995451*c+.1073969566*i),s=vt(.0883024619*u+.2817188376*c+.6299787005*i);return[.2104542553*l+.793617785*h-.0040720468*s,1.9779984951*l-2.428592205*h+.4505937099*s,.0259040371*l+.7827717662*h-.808675766*s]},wt=kt;function Mt(r){var e=Math.abs(r);return e<.04045?r/12.92:(yt(r)||1)*mt((e+.055)/1.055,2.4)}var Nt=d.unpack,_t=Math.pow,xt=Math.sign,At=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Nt(r,"lab"))[0],t=r[1],a=r[2],f=_t(n+.3963377774*t+.2158037573*a,3),o=_t(n-.1055613458*t-.0638541728*a,3),u=_t(n-.0894841775*t-1.291485548*a,3);return[255*Ft(4.0767416621*f-3.3077115913*o+.2309699292*u),255*Ft(-1.2684380046*f+2.6097574011*o-.3413193965*u),255*Ft(-.0041960863*f-.7034186147*o+1.707614701*u),r.length>3?r[3]:1]},Et=At;function Ft(r){var e=Math.abs(r);return e>.0031308?(xt(r)||1)*(1.055*_t(e,1/2.4)-.055):12.92*r}var Pt=d.unpack,It=d.type,Ot=M,Rt=k,jt=b,Gt=wt;Rt.prototype.oklab=function(){return Gt(this._rgb)},Ot.oklab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Rt,[null].concat(r,["oklab"])))},jt.format.oklab=Et,jt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pt(r,"oklab"),"array"===It(r)&&3===r.length)return"oklab"}});var qt=d.unpack,Ct=wt,Lt=ln,Bt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=qt(r,"rgb"),t=n[0],a=n[1],f=n[2],o=Ct(t,a,f),u=o[0],c=o[1],i=o[2];return Lt(u,c,i)},$t=Bt,Dt=d.unpack,Tt=wn,St=Et,Yt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Dt(r,"lch"))[0],t=r[1],a=r[2],f=Tt(n,t,a),o=f[0],u=f[1],c=f[2],i=St(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},zt=Yt,Xt=d.unpack,Ut=d.type,Vt=M,Wt=k,Ht=b,Kt=$t;Wt.prototype.oklch=function(){return Kt(this._rgb)},Vt.oklch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Wt,[null].concat(r,["oklch"])))},Ht.format.oklch=zt,Ht.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Xt(r,"oklch"),"array"===Ut(r)&&3===r.length)return"oklch"}});var Zt=k,Jt=d.type;Zt.prototype.alpha=function(r,e){return void 0===e&&(e=!1),void 0!==r&&"number"===Jt(r)?e?(this._rgb[3]=r,this):new Zt([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]},k.prototype.clipped=function(){return this._rgb._clipped||!1};var Qt=k,ra=qe;Qt.prototype.darken=function(r){void 0===r&&(r=1);var e=this,n=e.lab();return n[0]-=ra.Kn*r,new Qt(n,"lab").alpha(e.alpha(),!0)},Qt.prototype.brighten=function(r){return void 0===r&&(r=1),this.darken(-r)},Qt.prototype.darker=Qt.prototype.darken,Qt.prototype.brighter=Qt.prototype.brighten,k.prototype.get=function(r){var e=r.split("."),n=e[0],t=e[1],a=this[n]();if(t){var f=n.indexOf(t)-("ok"===n.substr(0,2)?2:0);if(f>-1)return a[f];throw new Error("unknown channel "+t+" in mode "+n)}return a};var ea=k,na=d.type,ta=Math.pow,aa=1e-7,fa=20;ea.prototype.luminance=function(r){if(void 0!==r&&"number"===na(r)){if(0===r)return new ea([0,0,0,this._rgb[3]],"rgb");if(1===r)return new ea([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),n="rgb",t=fa,a=function(e,f){var o=e.interpolate(f,.5,n),u=o.luminance();return Math.abs(r-u)<aa||!t--?o:u>r?a(e,o):a(o,f)},f=(e>r?a(new ea([0,0,0]),this):a(this,new ea([255,255,255]))).rgb();return new ea(f.concat([this._rgb[3]]))}return oa.apply(void 0,this._rgb.slice(0,3))};var oa=function(r,e,n){return.2126*(r=ua(r))+.7152*(e=ua(e))+.0722*(n=ua(n))},ua=function(r){return(r/=255)<=.03928?r/12.92:ta((r+.055)/1.055,2.4)},ca={},ia=k,la=d.type,ha=ca,sa=function(r,e,n){void 0===n&&(n=.5);for(var t=[],a=arguments.length-3;a-- >0;)t[a]=arguments[a+3];var f=t[0]||"lrgb";if(ha[f]||t.length||(f=Object.keys(ha)[0]),!ha[f])throw new Error("interpolation mode "+f+" is not defined");return"object"!==la(r)&&(r=new ia(r)),"object"!==la(e)&&(e=new ia(e)),ha[f](r,e,n).alpha(r.alpha()+n*(e.alpha()-r.alpha()))},da=k,ba=sa;da.prototype.mix=da.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 ba.apply(void 0,[this,r,e].concat(n))};var pa=k;pa.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 pa([e[0]*n,e[1]*n,e[2]*n,n],"rgb")};var ga=k,va=qe;ga.prototype.saturate=function(r){void 0===r&&(r=1);var e=this,n=e.lch();return n[1]+=va.Kn*r,n[1]<0&&(n[1]=0),new ga(n,"lch").alpha(e.alpha(),!0)},ga.prototype.desaturate=function(r){return void 0===r&&(r=1),this.saturate(-r)};var ma=k,ya=d.type;ma.prototype.set=function(r,e,n){void 0===n&&(n=!1);var t=r.split("."),a=t[0],f=t[1],o=this[a]();if(f){var u=a.indexOf(f)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==ya(e))switch(e.charAt(0)){case"+":case"-":o[u]+=+e;break;case"*":o[u]*=+e.substr(1);break;case"/":o[u]/=+e.substr(1);break;default:o[u]=+e}else{if("number"!==ya(e))throw new Error("unsupported value for Color.set");o[u]=e}var c=new ma(o,a);return n?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+f+" in mode "+a)}return o};var ka=k,wa=function(r,e,n){var t=r._rgb,a=e._rgb;return new ka(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"rgb")};ca.rgb=wa;var Ma=k,Na=Math.sqrt,_a=Math.pow,xa=function(r,e,n){var t=r._rgb,a=t[0],f=t[1],o=t[2],u=e._rgb,c=u[0],i=u[1],l=u[2];return new Ma(Na(_a(a,2)*(1-n)+_a(c,2)*n),Na(_a(f,2)*(1-n)+_a(i,2)*n),Na(_a(o,2)*(1-n)+_a(l,2)*n),"rgb")};ca.lrgb=xa;var Aa=k,Ea=function(r,e,n){var t=r.lab(),a=e.lab();return new Aa(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"lab")};ca.lab=Ea;var Fa=k,Pa=function(r,e,n,t){var a,f,o,u,c,i,l,h,s,d,b,p,g;return"hsl"===t?(o=r.hsl(),u=e.hsl()):"hsv"===t?(o=r.hsv(),u=e.hsv()):"hcg"===t?(o=r.hcg(),u=e.hcg()):"hsi"===t?(o=r.hsi(),u=e.hsi()):"lch"===t||"hcl"===t?(t="hcl",o=r.hcl(),u=e.hcl()):"oklch"===t&&(o=r.oklch().reverse(),u=e.oklch().reverse()),"h"!==t.substr(0,1)&&"oklch"!==t||(c=(a=o)[0],l=a[1],s=a[2],i=(f=u)[0],h=f[1],d=f[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?p=Number.NaN:(p=i,1!=s&&0!=s||"hsv"==t||(b=h)):(p=c,1!=d&&0!=d||"hsv"==t||(b=l)):p=c+n*(i>c&&i-c>180?i-(c+360):i<c&&c-i>180?i+360-c:i-c),void 0===b&&(b=l+n*(h-l)),g=s+n*(d-s),new Fa("oklch"===t?[g,b,p]:[p,b,g],t)},Ia=Pa,Oa=function(r,e,n){return Ia(r,e,n,"lch")};ca.lch=Oa,ca.hcl=Oa;var Ra=k,ja=function(r,e,n){var t=r.num(),a=e.num();return new Ra(t+n*(a-t),"num")};ca.num=ja;var Ga=Pa,qa=function(r,e,n){return Ga(r,e,n,"hcg")};ca.hcg=qa;var Ca=Pa,La=function(r,e,n){return Ca(r,e,n,"hsi")};ca.hsi=La;var Ba=Pa,$a=function(r,e,n){return Ba(r,e,n,"hsl")};ca.hsl=$a;var Da=Pa,Ta=function(r,e,n){return Da(r,e,n,"hsv")};ca.hsv=Ta;var Sa=k,Ya=function(r,e,n){var t=r.oklab(),a=e.oklab();return new Sa(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"oklab")};ca.oklab=Ya;var za=Pa,Xa=function(r,e,n){return za(r,e,n,"oklch")};ca.oklch=Xa;var Ua=k,Va=d.clip_rgb,Wa=Math.pow,Ha=Math.sqrt,Ka=Math.PI,Za=Math.cos,Ja=Math.sin,Qa=Math.atan2,rf=function(r,e,n){void 0===e&&(e="lrgb"),void 0===n&&(n=null);var t=r.length;n||(n=Array.from(new Array(t)).map((function(){return 1})));var a=t/n.reduce((function(r,e){return r+e}));if(n.forEach((function(r,e){n[e]*=a})),r=r.map((function(r){return new Ua(r)})),"lrgb"===e)return ef(r,n);for(var f=r.shift(),o=f.get(e),u=[],c=0,i=0,l=0;l<o.length;l++)if(o[l]=(o[l]||0)*n[0],u.push(isNaN(o[l])?0:n[0]),"h"===e.charAt(l)&&!isNaN(o[l])){var h=o[l]/180*Ka;c+=Za(h)*n[0],i+=Ja(h)*n[0]}var s=f.alpha()*n[0];r.forEach((function(r,t){var a=r.get(e);s+=r.alpha()*n[t+1];for(var f=0;f<o.length;f++)if(!isNaN(a[f]))if(u[f]+=n[t+1],"h"===e.charAt(f)){var l=a[f]/180*Ka;c+=Za(l)*n[t+1],i+=Ja(l)*n[t+1]}else o[f]+=a[f]*n[t+1]}));for(var d=0;d<o.length;d++)if("h"===e.charAt(d)){for(var b=Qa(i/u[d],c/u[d])/Ka*180;b<0;)b+=360;for(;b>=360;)b-=360;o[d]=b}else o[d]=o[d]/u[d];return s/=t,new Ua(o,e).alpha(s>.99999?1:s,!0)},ef=function(r,e){for(var n=r.length,t=[0,0,0,0],a=0;a<r.length;a++){var f=r[a],o=e[a]/n,u=f._rgb;t[0]+=Wa(u[0],2)*o,t[1]+=Wa(u[1],2)*o,t[2]+=Wa(u[2],2)*o,t[3]+=u[3]*o}return t[0]=Ha(t[0]),t[1]=Ha(t[1]),t[2]=Ha(t[2]),t[3]>.9999999&&(t[3]=1),new Ua(Va(t))},nf=M,tf=d.type,af=Math.pow,ff=function(r){var e="rgb",n=nf("#ccc"),t=0,a=[0,1],f=[],o=[0,0],u=!1,c=[],i=!1,l=0,h=1,s=!1,d={},b=!0,p=1,g=function(r){if((r=r||["#fff","#000"])&&"string"===tf(r)&&nf.brewer&&nf.brewer[r.toLowerCase()]&&(r=nf.brewer[r.toLowerCase()]),"array"===tf(r)){1===r.length&&(r=[r[0],r[0]]),r=r.slice(0);for(var e=0;e<r.length;e++)r[e]=nf(r[e]);f.length=0;for(var n=0;n<r.length;n++)f.push(n/(r.length-1))}return w(),c=r},v=function(r){if(null!=u){for(var e=u.length-1,n=0;n<e&&r>=u[n];)n++;return n-1}return 0},m=function(r){return r},y=function(r){return r},k=function(r,t){var a,i;if(null==t&&(t=!1),isNaN(r)||null===r)return n;i=t?r:u&&u.length>2?v(r)/(u.length-2):h!==l?(r-l)/(h-l):1,i=y(i),t||(i=m(i)),1!==p&&(i=af(i,p)),i=o[0]+i*(1-o[0]-o[1]),i=Math.min(1,Math.max(0,i));var s=Math.floor(1e4*i);if(b&&d[s])a=d[s];else{if("array"===tf(c))for(var g=0;g<f.length;g++){var k=f[g];if(i<=k){a=c[g];break}if(i>=k&&g===f.length-1){a=c[g];break}if(i>k&&i<f[g+1]){i=(i-k)/(f[g+1]-k),a=nf.interpolate(c[g],c[g+1],i,e);break}}else"function"===tf(c)&&(a=c(i));b&&(d[s]=a)}return a},w=function(){return d={}};g(r);var M=function(r){var e=nf(k(r));return i&&e[i]?e[i]():e};return M.classes=function(r){if(null!=r){if("array"===tf(r))u=r,a=[r[0],r[r.length-1]];else{var e=nf.analyze(a);u=0===r?[e.min,e.max]:nf.limits(e,"e",r)}return M}return u},M.domain=function(r){if(!arguments.length)return a;l=r[0],h=r[r.length-1],f=[];var e=c.length;if(r.length===e&&l!==h)for(var n=0,t=Array.from(r);n<t.length;n+=1){var o=t[n];f.push((o-l)/(h-l))}else{for(var u=0;u<e;u++)f.push(u/(e-1));if(r.length>2){var i=r.map((function(e,n){return n/(r.length-1)})),s=r.map((function(r){return(r-l)/(h-l)}));s.every((function(r,e){return i[e]===r}))||(y=function(r){if(r<=0||r>=1)return r;for(var e=0;r>=s[e+1];)e++;var n=(r-s[e])/(s[e+1]-s[e]);return i[e]+n*(i[e+1]-i[e])})}}return a=[l,h],M},M.mode=function(r){return arguments.length?(e=r,w(),M):e},M.range=function(r,e){return g(r),M},M.out=function(r){return i=r,M},M.spread=function(r){return arguments.length?(t=r,M):t},M.correctLightness=function(r){return null==r&&(r=!0),s=r,w(),m=s?function(r){for(var e=k(0,!0).lab()[0],n=k(1,!0).lab()[0],t=e>n,a=k(r,!0).lab()[0],f=e+(n-e)*r,o=a-f,u=0,c=1,i=20;Math.abs(o)>.01&&i-- >0;)t&&(o*=-1),o<0?(u=r,r+=.5*(c-r)):(c=r,r+=.5*(u-r)),a=k(r,!0).lab()[0],o=a-f;return r}:function(r){return r},M},M.padding=function(r){return null!=r?("number"===tf(r)&&(r=[r,r]),o=r,M):o},M.colors=function(e,n){arguments.length<2&&(n="hex");var t=[];if(0===arguments.length)t=c.slice(0);else if(1===e)t=[M(.5)];else if(e>1){var f=a[0],o=a[1]-f;t=of(0,e,!1).map((function(r){return M(f+r/(e-1)*o)}))}else{r=[];var i=[];if(u&&u.length>2)for(var l=1,h=u.length,s=1<=h;s?l<h:l>h;s?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;t=i.map((function(r){return M(r)}))}return nf[n]&&(t=t.map((function(r){return r[n]()}))),t},M.cache=function(r){return null!=r?(b=r,M):b},M.gamma=function(r){return null!=r?(p=r,M):p},M.nodata=function(r){return null!=r?(n=nf(r),M):n},M};function of(r,e,n){for(var t=[],a=r<e,f=n?a?e+1:e-1:e,o=r;a?o<f:o>f;a?o++:o--)t.push(o);return t}var uf=k,cf=ff,lf=function(r){for(var e=[1,1],n=1;n<r;n++){for(var t=[1],a=1;a<=e.length;a++)t[a]=(e[a]||0)+e[a-1];e=t}return e},hf=function(r){var e,n,t,a,f,o,u;if(2===(r=r.map((function(r){return new uf(r)}))).length)e=r.map((function(r){return r.lab()})),f=e[0],o=e[1],a=function(r){var e=[0,1,2].map((function(e){return f[e]+r*(o[e]-f[e])}));return new uf(e,"lab")};else if(3===r.length)n=r.map((function(r){return r.lab()})),f=n[0],o=n[1],u=n[2],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*f[e]+2*(1-r)*r*o[e]+r*r*u[e]}));return new uf(e,"lab")};else if(4===r.length){var c;t=r.map((function(r){return r.lab()})),f=t[0],o=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)*f[e]+3*(1-r)*(1-r)*r*o[e]+3*(1-r)*r*r*u[e]+r*r*r*c[e]}));return new uf(e,"lab")}}else{if(!(r.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,h;i=r.map((function(r){return r.lab()})),h=r.length-1,l=lf(h),a=function(r){var e=1-r,n=[0,1,2].map((function(n){return i.reduce((function(t,a,f){return t+l[f]*Math.pow(e,h-f)*Math.pow(r,f)*a[n]}),0)}));return new uf(n,"lab")}}return a},sf=function(r){var e=hf(r);return e.scale=function(){return cf(e)},e},df=M,bf=function(r,e,n){if(!bf[n])throw new Error("unknown blend mode "+n);return bf[n](r,e)},pf=function(r){return function(e,n){var t=df(n).rgb(),a=df(e).rgb();return df.rgb(r(t,a))}},gf=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}},vf=function(r){return r},mf=function(r,e){return r*e/255},yf=function(r,e){return r>e?e:r},kf=function(r,e){return r>e?r:e},wf=function(r,e){return 255*(1-(1-r/255)*(1-e/255))},Mf=function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))},Nf=function(r,e){return 255*(1-(1-e/255)/(r/255))},_f=function(r,e){return 255===r||(r=e/255*255/(1-r/255))>255?255:r};bf.normal=pf(gf(vf)),bf.multiply=pf(gf(mf)),bf.screen=pf(gf(wf)),bf.overlay=pf(gf(Mf)),bf.darken=pf(gf(yf)),bf.lighten=pf(gf(kf)),bf.dodge=pf(gf(_f)),bf.burn=pf(gf(Nf));for(var xf=bf,Af=d.type,Ef=d.clip_rgb,Ff=d.TWOPI,Pf=Math.pow,If=Math.sin,Of=Math.cos,Rf=M,jf=function(r,e,n,t,a){void 0===r&&(r=300),void 0===e&&(e=-1.5),void 0===n&&(n=1),void 0===t&&(t=1),void 0===a&&(a=[0,1]);var f,o=0;"array"===Af(a)?f=a[1]-a[0]:(f=0,a=[a,a]);var u=function(u){var c=Ff*((r+120)/360+e*u),i=Pf(a[0]+f*u,t),l=(0!==o?n[0]+u*o:n)*i*(1-i)/2,h=Of(c),s=If(c);return Rf(Ef([255*(i+l*(-.14861*h+1.78277*s)),255*(i+l*(-.29227*h-.90649*s)),255*(i+l*(1.97294*h)),1]))};return u.start=function(e){return null==e?r:(r=e,u)},u.rotations=function(r){return null==r?e:(e=r,u)},u.gamma=function(r){return null==r?t:(t=r,u)},u.hue=function(r){return null==r?n:("array"===Af(n=r)?0==(o=n[1]-n[0])&&(n=n[1]):o=0,u)},u.lightness=function(r){return null==r?a:("array"===Af(r)?(a=r,f=r[1]-r[0]):(a=[r,r],f=0),u)},u.scale=function(){return Rf.scale(u)},u.hue(n),u},Gf=k,qf="0123456789abcdef",Cf=Math.floor,Lf=Math.random,Bf=function(){for(var r="#",e=0;e<6;e++)r+=qf.charAt(Cf(16*Lf()));return new Gf(r,"hex")},$f=u,Df=Math.log,Tf=Math.pow,Sf=Math.floor,Yf=Math.abs,zf=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"===$f(r)&&(r=Object.values(r)),r.forEach((function(r){e&&"object"===$f(r)&&(r=r[e]),null==r||isNaN(r)||(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(r,e){return Xf(n,r,e)},n},Xf=function(r,e,n){void 0===e&&(e="equal"),void 0===n&&(n=7),"array"==$f(r)&&(r=zf(r));var t=r.min,a=r.max,f=r.values.sort((function(r,e){return r-e}));if(1===n)return[t,a];var o=[];if("c"===e.substr(0,1)&&(o.push(t),o.push(a)),"e"===e.substr(0,1)){o.push(t);for(var u=1;u<n;u++)o.push(t+u/n*(a-t));o.push(a)}else if("l"===e.substr(0,1)){if(t<=0)throw new Error("Logarithmic scales are only possible for values > 0");var c=Math.LOG10E*Df(t),i=Math.LOG10E*Df(a);o.push(t);for(var l=1;l<n;l++)o.push(Tf(10,c+l/n*(i-c)));o.push(a)}else if("q"===e.substr(0,1)){o.push(t);for(var h=1;h<n;h++){var s=(f.length-1)*h/n,d=Sf(s);if(d===s)o.push(f[d]);else{var b=s-d;o.push(f[d]*(1-b)+f[d+1]*b)}}o.push(a)}else if("k"===e.substr(0,1)){var p,g=f.length,v=new Array(g),m=new Array(n),y=!0,k=0,w=null;(w=[]).push(t);for(var M=1;M<n;M++)w.push(t+M/n*(a-t));for(w.push(a);y;){for(var N=0;N<n;N++)m[N]=0;for(var _=0;_<g;_++)for(var x=f[_],A=Number.MAX_VALUE,E=void 0,F=0;F<n;F++){var P=Yf(w[F]-x);P<A&&(A=P,E=F),m[E]++,v[_]=E}for(var I=new Array(n),O=0;O<n;O++)I[O]=null;for(var R=0;R<g;R++)null===I[p=v[R]]?I[p]=f[R]:I[p]+=f[R];for(var j=0;j<n;j++)I[j]*=1/m[j];y=!1;for(var G=0;G<n;G++)if(I[G]!==w[G]){y=!0;break}w=I,++k>200&&(y=!1)}for(var q={},C=0;C<n;C++)q[C]=[];for(var L=0;L<g;L++)q[p=v[L]].push(f[L]);for(var B=[],$=0;$<n;$++)B.push(q[$][0]),B.push(q[$][q[$].length-1]);B=B.sort((function(r,e){return r-e})),o.push(B[0]);for(var D=1;D<B.length;D+=2){var T=B[D];isNaN(T)||-1!==o.indexOf(T)||o.push(T)}}return o},Uf={analyze:zf,limits:Xf},Vf=k,Wf=function(r,e){r=new Vf(r),e=new Vf(e);var n=r.luminance(),t=e.luminance();return n>t?(n+.05)/(t+.05):(t+.05)/(n+.05)},Hf=k,Kf=Math.sqrt,Zf=Math.pow,Jf=Math.min,Qf=Math.max,ro=Math.atan2,eo=Math.abs,no=Math.cos,to=Math.sin,ao=Math.exp,fo=Math.PI,oo=function(r,e,n,t,a){void 0===n&&(n=1),void 0===t&&(t=1),void 0===a&&(a=1);var f=function(r){return 360*r/(2*fo)},o=function(r){return 2*fo*r/360};r=new Hf(r),e=new Hf(e);var u=Array.from(r.lab()),c=u[0],i=u[1],l=u[2],h=Array.from(e.lab()),s=h[0],d=h[1],b=h[2],p=(c+s)/2,g=(Kf(Zf(i,2)+Zf(l,2))+Kf(Zf(d,2)+Zf(b,2)))/2,v=.5*(1-Kf(Zf(g,7)/(Zf(g,7)+Zf(25,7)))),m=i*(1+v),y=d*(1+v),k=Kf(Zf(m,2)+Zf(l,2)),w=Kf(Zf(y,2)+Zf(b,2)),M=(k+w)/2,N=f(ro(l,m)),_=f(ro(b,y)),x=N>=0?N:N+360,A=_>=0?_:_+360,E=eo(x-A)>180?(x+A+360)/2:(x+A)/2,F=1-.17*no(o(E-30))+.24*no(o(2*E))+.32*no(o(3*E+6))-.2*no(o(4*E-63)),P=A-x;P=eo(P)<=180?P:A<=x?P+360:P-360,P=2*Kf(k*w)*to(o(P)/2);var I=s-c,O=w-k,R=1+.015*Zf(p-50,2)/Kf(20+Zf(p-50,2)),j=1+.045*M,G=1+.015*M*F,q=30*ao(-Zf((E-275)/25,2)),C=-2*Kf(Zf(M,7)/(Zf(M,7)+Zf(25,7)))*to(2*o(q)),L=Kf(Zf(I/(n*R),2)+Zf(O/(t*j),2)+Zf(P/(a*G),2)+C*(O/(t*j))*(P/(a*G)));return Qf(0,Jf(100,L))},uo=k,co=function(r,e,n){void 0===n&&(n="lab"),r=new uo(r),e=new uo(e);var t=r.get(n),a=e.get(n),f=0;for(var o in t){var u=(t[o]||0)-(a[o]||0);f+=u*u}return Math.sqrt(f)},io=k,lo=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];try{return new(Function.prototype.bind.apply(io,[null].concat(r))),!0}catch(r){return!1}},ho=M,so=ff,bo={cool:function(){return so([ho.hsl(180,1,.9),ho.hsl(250,.7,.4)])},hot:function(){return so(["#000","#f00","#ff0","#fff"]).mode("rgb")}},po={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},go=0,vo=Object.keys(po);go<vo.length;go+=1){var mo=vo[go];po[mo.toLowerCase()]=po[mo]}var yo=po,ko=M;ko.average=rf,ko.bezier=sf,ko.blend=xf,ko.cubehelix=jf,ko.mix=ko.interpolate=sa,ko.random=Bf,ko.scale=ff,ko.analyze=Uf.analyze,ko.contrast=Wf,ko.deltaE=oo,ko.distance=co,ko.limits=Uf.limits,ko.valid=lo,ko.scales=bo,ko.colors=Ln,ko.brewer=yo;var wo=ko;return wo}();var n=e.exports;const t=r=>{const e=[];for(let n=0;n<r;n++)e.push(n);return e},a=(r,e)=>{const n=360/r;return t(r).map((r=>Math.floor((e+r*n)%360)))},f=(r,e)=>{const[t,a,f]=n(e).hsl();return n.hsl(t,r,f).hex()},o=(r,e,a)=>{const f=t(e).reverse().map((r=>(r+.5)/e)),o=n(r);return f.map((r=>o.luminance(r*(2*a)).hex()))},u=r=>{const[e,t]=n(r).hsl();return t<.5?"gray":e},c=(r,e)=>(r[e.key]=e.value,r),i=r=>{r=r.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(r,e,n,t){return e+e+n+n+t+t}));const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return`rgb(${parseInt(e[1],16)}, ${parseInt(e[2],16)}, ${parseInt(e[3],16)})`},l=(r,e,n)=>Math.min(Math.max(r,e),n),h=r=>s(r).map(d),s=r=>r.match(/-?\d+(\.\d+)?%?/g),d=(r,e)=>e<3?-1!=r.indexOf("%")?Math.round(255*l(parseInt(r,10),0,100)/100):l(parseInt(r,10),0,255):l(parseFloat(r),0,1),b=r=>"#"===r.slice(0,1),p=(r,e,n)=>{const t=[r,e,n].map((function(r){return(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}));return.2126*t[0]+.7152*t[1]+.0722*t[2]},g=(r,e)=>{const n=p(r[0],r[1],r[2]),t=p(e[0],e[1],e[2]);return(Math.max(n,t)+.05)/(Math.min(n,t)+.05)},v=r=>{const e=h(r),n=4===e.length?m(255*r[3]):"";return"#"+m(e[0])+m(e[1])+m(e[2])+n},m=r=>{const e=Math.round(l(r,0,255)).toString(16);return 1==e.length?"0"+e:e};return r.getColorPalette=({accent:r="rgb(53, 89, 199)",hues:e=12,shades:t=1,gray:i=!1,lightness:l=.5}={})=>{const h=n(r),s=[],[d,b,p]=h.hsl(),g=Number(l),v=Number(t),m=a(Number(e),d);i&&s.push({key:"gray",value:o(f(.1,h.hex()),v,g)}),m.forEach((r=>{const e=n.hsl(r,b,p),t=u(e);s.push({key:t,value:o(e.hex(),v,g)})}));return s.reduce(c,{})},r.getContrastRatio=(r,e)=>{b(e)&&(e=i(e)),b(r)&&(r=i(r));const[n,t,a]=h(e),[f,o,u]=h(r);return g([n,t,a],[f,o,u])},r.getTextColor=r=>{let e=r;"#"!==e.slice(0,1)&&(e=v(e)),b(e)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map((r=>r+r)).join(""));return(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=120?"rgb(12, 26, 61)":"rgb(255, 255, 255)"},r.hexToRgb=i,r.rgbToHex=v,Object.defineProperty(r,"__esModule",{value:!0}),r}({});
var NordColor=function(r){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var e={exports:{}};e.exports=function(){for(var r=function(r,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),r<e?e:r>n?n:r},e=r,n=function(r){r._clipped=!1,r._unclipped=r.slice(0);for(var n=0;n<=3;n++)n<3?((r[n]<0||r[n]>255)&&(r._clipped=!0),r[n]=e(r[n],0,255)):3===n&&(r[n]=e(r[n],0,1));return r},t={},a=0,f=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a<f.length;a+=1){var o=f[a];t["[object "+o+"]"]=o.toLowerCase()}var u=function(r){return t[Object.prototype.toString.call(r)]||"object"},c=u,i=function(r,e){return void 0===e&&(e=null),r.length>=3?Array.prototype.slice.call(r):"object"==c(r[0])&&e?e.split("").filter((function(e){return void 0!==r[0][e]})).map((function(e){return r[0][e]})):r[0]},l=u,h=function(r){if(r.length<2)return null;var e=r.length-1;return"string"==l(r[e])?r[e].toLowerCase():null},s=Math.PI,d={clip_rgb:n,limit:r,type:u,unpack:i,last:h,PI:s,TWOPI:2*s,PITHIRD:s/3,DEG2RAD:s/180,RAD2DEG:180/s},b={format:{},autodetect:[]},p=d.last,g=d.clip_rgb,v=d.type,m=b,y=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=this;if("object"===v(r[0])&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];var t=p(r),a=!1;if(!t){a=!0,m.sorted||(m.autodetect=m.autodetect.sort((function(r,e){return e.p-r.p})),m.sorted=!0);for(var f=0,o=m.autodetect;f<o.length;f+=1){var u=o[f];if(t=u.test.apply(u,r))break}}if(!m.format[t])throw new Error("unknown format: "+r);var c=m.format[t].apply(null,a?r:r.slice(0,-1));n._rgb=g(c),3===n._rgb.length&&n._rgb.push(1)};y.prototype.toString=function(){return"function"==v(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var k=y,w=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(w.Color,[null].concat(r)))};w.Color=k,w.version="2.4.2";var M=w,N=d.unpack,_=Math.max,x=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=N(r,"rgb"),t=n[0],a=n[1],f=n[2],o=1-_(t/=255,_(a/=255,f/=255)),u=o<1?1/(1-o):0;return[(1-t-o)*u,(1-a-o)*u,(1-f-o)*u,o]},A=x,E=d.unpack,F=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=E(r,"cmyk"))[0],t=r[1],a=r[2],f=r[3],o=r.length>4?r[4]:1;return 1===f?[0,0,0,o]:[n>=1?0:255*(1-n)*(1-f),t>=1?0:255*(1-t)*(1-f),a>=1?0:255*(1-a)*(1-f),o]},P=F,I=M,O=k,R=b,j=d.unpack,G=d.type,q=A;O.prototype.cmyk=function(){return q(this._rgb)},I.cmyk=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(O,[null].concat(r,["cmyk"])))},R.format.cmyk=P,R.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=j(r,"cmyk"),"array"===G(r)&&4===r.length)return"cmyk"}});var C=d.unpack,L=d.last,B=function(r){return Math.round(100*r)/100},$=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=C(r,"hsla"),t=L(r)||"lsa";return n[0]=B(n[0]||0),n[1]=B(100*n[1])+"%",n[2]=B(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(",")+")"},D=$,T=d.unpack,S=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=T(r,"rgba"))[0],t=r[1],a=r[2];n/=255,t/=255,a/=255;var f,o,u=Math.min(n,t,a),c=Math.max(n,t,a),i=(c+u)/2;return c===u?(f=0,o=Number.NaN):f=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),n==c?o=(t-a)/(c-u):t==c?o=2+(a-n)/(c-u):a==c&&(o=4+(n-t)/(c-u)),(o*=60)<0&&(o+=360),r.length>3&&void 0!==r[3]?[o,f,i,r[3]]:[o,f,i]},Y=S,z=d.unpack,X=d.last,U=D,V=Y,W=Math.round,H=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=z(r,"rgba"),t=X(r)||"rgb";return"hsl"==t.substr(0,3)?U(V(n),t):(n[0]=W(n[0]),n[1]=W(n[1]),n[2]=W(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(",")+")")},K=H,Z=d.unpack,J=Math.round,Q=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];var t,a,f,o=(e=Z(e,"hsl"))[0],u=e[1],c=e[2];if(0===u)t=a=f=255*c;else{var i=[0,0,0],l=[0,0,0],h=c<.5?c*(1+u):c+u-c*u,s=2*c-h,d=o/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]=s+6*(h-s)*i[b]:2*i[b]<1?l[b]=h:3*i[b]<2?l[b]=s+(h-s)*(2/3-i[b])*6:l[b]=s;t=(r=[J(255*l[0]),J(255*l[1]),J(255*l[2])])[0],a=r[1],f=r[2]}return e.length>3?[t,a,f,e[3]]:[t,a,f,1]},rr=Q,er=rr,nr=b,tr=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ar=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,fr=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,or=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ur=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,cr=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ir=Math.round,lr=function(r){var e;if(r=r.toLowerCase().trim(),nr.format.named)try{return nr.format.named(r)}catch(r){}if(e=r.match(tr)){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(ar)){for(var a=e.slice(1,5),f=0;f<4;f++)a[f]=+a[f];return a}if(e=r.match(fr)){for(var o=e.slice(1,4),u=0;u<3;u++)o[u]=ir(2.55*o[u]);return o[3]=1,o}if(e=r.match(or)){for(var c=e.slice(1,5),i=0;i<3;i++)c[i]=ir(2.55*c[i]);return c[3]=+c[3],c}if(e=r.match(ur)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var h=er(l);return h[3]=1,h}if(e=r.match(cr)){var s=e.slice(1,4);s[1]*=.01,s[2]*=.01;var d=er(s);return d[3]=+e[4],d}};lr.test=function(r){return tr.test(r)||ar.test(r)||fr.test(r)||or.test(r)||ur.test(r)||cr.test(r)};var hr=lr,sr=M,dr=k,br=b,pr=d.type,gr=K,vr=hr;dr.prototype.css=function(r){return gr(this._rgb,r)},sr.css=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(dr,[null].concat(r,["css"])))},br.format.css=vr,br.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"===pr(r)&&vr.test(r))return"css"}});var mr=k,yr=M,kr=b,wr=d.unpack;kr.format.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=wr(r,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},yr.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(mr,[null].concat(r,["gl"])))},mr.prototype.gl=function(){var r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};var Mr=d.unpack,Nr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=Mr(r,"rgb"),a=t[0],f=t[1],o=t[2],u=Math.min(a,f,o),c=Math.max(a,f,o),i=c-u,l=100*i/255,h=u/(255-i)*100;return 0===i?n=Number.NaN:(a===c&&(n=(f-o)/i),f===c&&(n=2+(o-a)/i),o===c&&(n=4+(a-f)/i),(n*=60)<0&&(n+=360)),[n,l,h]},_r=Nr,xr=d.unpack,Ar=Math.floor,Er=function(){for(var r,e,n,t,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xr(o,"hcg"))[0],s=o[1],d=o[2];d*=255;var b=255*s;if(0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var p=Ar(h/=60),g=h-p,v=d*(1-s),m=v+b*(1-g),y=v+b*g,k=v+b;switch(p){case 0:c=(r=[k,y,v])[0],i=r[1],l=r[2];break;case 1:c=(e=[m,k,v])[0],i=e[1],l=e[2];break;case 2:c=(n=[v,k,y])[0],i=n[1],l=n[2];break;case 3:c=(t=[v,m,k])[0],i=t[1],l=t[2];break;case 4:c=(a=[y,v,k])[0],i=a[1],l=a[2];break;case 5:c=(f=[k,v,m])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Fr=Er,Pr=d.unpack,Ir=d.type,Or=M,Rr=k,jr=b,Gr=_r;Rr.prototype.hcg=function(){return Gr(this._rgb)},Or.hcg=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Rr,[null].concat(r,["hcg"])))},jr.format.hcg=Fr,jr.autodetect.push({p:1,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pr(r,"hcg"),"array"===Ir(r)&&3===r.length)return"hcg"}});var qr=d.unpack,Cr=d.last,Lr=Math.round,Br=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=qr(r,"rgba"),t=n[0],a=n[1],f=n[2],o=n[3],u=Cr(r)||"auto";void 0===o&&(o=1),"auto"===u&&(u=o<1?"rgba":"rgb");var c="000000"+((t=Lr(t))<<16|(a=Lr(a))<<8|(f=Lr(f))).toString(16);c=c.substr(c.length-6);var i="0"+Lr(255*o).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},$r=Br,Dr=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Tr=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Sr=function(r){if(r.match(Dr)){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(Tr)){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)},Yr=M,zr=k,Xr=d.type,Ur=b,Vr=$r;zr.prototype.hex=function(r){return Vr(this._rgb,r)},Yr.hex=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(zr,[null].concat(r,["hex"])))},Ur.format.hex=Sr,Ur.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"===Xr(r)&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var Wr=d.unpack,Hr=d.TWOPI,Kr=Math.min,Zr=Math.sqrt,Jr=Math.acos,Qr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=Wr(r,"rgb"),a=t[0],f=t[1],o=t[2],u=Kr(a/=255,f/=255,o/=255),c=(a+f+o)/3,i=c>0?1-u/c:0;return 0===i?n=NaN:(n=(a-f+(a-o))/2,n/=Zr((a-f)*(a-f)+(a-o)*(f-o)),n=Jr(n),o>f&&(n=Hr-n),n/=Hr),[360*n,i,c]},re=Qr,ee=d.unpack,ne=d.limit,te=d.TWOPI,ae=d.PITHIRD,fe=Math.cos,oe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=ee(r,"hsi"))[0],o=r[1],u=r[2];return isNaN(f)&&(f=0),isNaN(o)&&(o=0),f>360&&(f-=360),f<0&&(f+=360),(f/=360)<1/3?t=1-((a=(1-o)/3)+(n=(1+o*fe(te*f)/fe(ae-te*f))/3)):f<2/3?a=1-((n=(1-o)/3)+(t=(1+o*fe(te*(f-=1/3))/fe(ae-te*f))/3)):n=1-((t=(1-o)/3)+(a=(1+o*fe(te*(f-=2/3))/fe(ae-te*f))/3)),[255*(n=ne(u*n*3)),255*(t=ne(u*t*3)),255*(a=ne(u*a*3)),r.length>3?r[3]:1]},ue=oe,ce=d.unpack,ie=d.type,le=M,he=k,se=b,de=re;he.prototype.hsi=function(){return de(this._rgb)},le.hsi=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(he,[null].concat(r,["hsi"])))},se.format.hsi=ue,se.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ce(r,"hsi"),"array"===ie(r)&&3===r.length)return"hsi"}});var be=d.unpack,pe=d.type,ge=M,ve=k,me=b,ye=Y;ve.prototype.hsl=function(){return ye(this._rgb)},ge.hsl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(ve,[null].concat(r,["hsl"])))},me.format.hsl=rr,me.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=be(r,"hsl"),"array"===pe(r)&&3===r.length)return"hsl"}});var ke=d.unpack,we=Math.min,Me=Math.max,Ne=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=ke(r,"rgb"))[0],o=r[1],u=r[2],c=we(f,o,u),i=Me(f,o,u),l=i-c;return a=i/255,0===i?(n=Number.NaN,t=0):(t=l/i,f===i&&(n=(o-u)/l),o===i&&(n=2+(u-f)/l),u===i&&(n=4+(f-o)/l),(n*=60)<0&&(n+=360)),[n,t,a]},_e=Ne,xe=d.unpack,Ae=Math.floor,Ee=function(){for(var r,e,n,t,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xe(o,"hsv"))[0],s=o[1],d=o[2];if(d*=255,0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var b=Ae(h/=60),p=h-b,g=d*(1-s),v=d*(1-s*p),m=d*(1-s*(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=(f=[d,g,v])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Fe=Ee,Pe=d.unpack,Ie=d.type,Oe=M,Re=k,je=b,Ge=_e;Re.prototype.hsv=function(){return Ge(this._rgb)},Oe.hsv=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Re,[null].concat(r,["hsv"])))},je.format.hsv=Fe,je.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pe(r,"hsv"),"array"===Ie(r)&&3===r.length)return"hsv"}});var qe={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ce=qe,Le=d.unpack,Be=Math.pow,$e=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Le(r,"rgb"),t=n[0],a=n[1],f=n[2],o=Se(t,a,f),u=o[0],c=o[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-o[2])]},De=function(r){return(r/=255)<=.04045?r/12.92:Be((r+.055)/1.055,2.4)},Te=function(r){return r>Ce.t3?Be(r,1/3):r/Ce.t2+Ce.t0},Se=function(r,e,n){return r=De(r),e=De(e),n=De(n),[Te((.4124564*r+.3575761*e+.1804375*n)/Ce.Xn),Te((.2126729*r+.7151522*e+.072175*n)/Ce.Yn),Te((.0193339*r+.119192*e+.9503041*n)/Ce.Zn)]},Ye=$e,ze=qe,Xe=d.unpack,Ue=Math.pow,Ve=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=Xe(r,"lab"))[0],o=r[1],u=r[2];return t=(f+16)/116,n=isNaN(o)?t:t+o/500,a=isNaN(u)?t:t-u/200,t=ze.Yn*He(t),n=ze.Xn*He(n),a=ze.Zn*He(a),[We(3.2404542*n-1.5371385*t-.4985314*a),We(-.969266*n+1.8760108*t+.041556*a),We(.0556434*n-.2040259*t+1.0572252*a),r.length>3?r[3]:1]},We=function(r){return 255*(r<=.00304?12.92*r:1.055*Ue(r,1/2.4)-.055)},He=function(r){return r>ze.t1?r*r*r:ze.t2*(r-ze.t0)},Ke=Ve,Ze=d.unpack,Je=d.type,Qe=M,rn=k,en=b,nn=Ye;rn.prototype.lab=function(){return nn(this._rgb)},Qe.lab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(rn,[null].concat(r,["lab"])))},en.format.lab=Ke,en.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Ze(r,"lab"),"array"===Je(r)&&3===r.length)return"lab"}});var tn=d.unpack,an=d.RAD2DEG,fn=Math.sqrt,on=Math.atan2,un=Math.round,cn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=tn(r,"lab"),t=n[0],a=n[1],f=n[2],o=fn(a*a+f*f),u=(on(f,a)*an+360)%360;return 0===un(1e4*o)&&(u=Number.NaN),[t,o,u]},ln=cn,hn=d.unpack,sn=Ye,dn=ln,bn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=hn(r,"rgb"),t=n[0],a=n[1],f=n[2],o=sn(t,a,f),u=o[0],c=o[1],i=o[2];return dn(u,c,i)},pn=bn,gn=d.unpack,vn=d.DEG2RAD,mn=Math.sin,yn=Math.cos,kn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=gn(r,"lch"),t=n[0],a=n[1],f=n[2];return isNaN(f)&&(f=0),[t,yn(f*=vn)*a,mn(f)*a]},wn=kn,Mn=d.unpack,Nn=wn,_n=Ke,xn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Mn(r,"lch"))[0],t=r[1],a=r[2],f=Nn(n,t,a),o=f[0],u=f[1],c=f[2],i=_n(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},An=xn,En=d.unpack,Fn=An,Pn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=En(r,"hcl").reverse();return Fn.apply(void 0,n)},In=Pn,On=d.unpack,Rn=d.type,jn=M,Gn=k,qn=b,Cn=pn;Gn.prototype.lch=function(){return Cn(this._rgb)},Gn.prototype.hcl=function(){return Cn(this._rgb).reverse()},jn.lch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Gn,[null].concat(r,["lch"])))},jn.hcl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Gn,[null].concat(r,["hcl"])))},qn.format.lch=An,qn.format.hcl=In,["lch","hcl"].forEach((function(r){return qn.autodetect.push({p:2,test:function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];if(e=On(e,r),"array"===Rn(e)&&3===e.length)return r}})}));var Ln={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"},Bn=k,$n=b,Dn=d.type,Tn=Ln,Sn=Sr,Yn=$r;Bn.prototype.name=function(){for(var r=Yn(this._rgb,"rgb"),e=0,n=Object.keys(Tn);e<n.length;e+=1){var t=n[e];if(Tn[t]===r)return t.toLowerCase()}return r},$n.format.named=function(r){if(r=r.toLowerCase(),Tn[r])return Sn(Tn[r]);throw new Error("unknown color name: "+r)},$n.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"===Dn(r)&&Tn[r.toLowerCase()])return"named"}});var zn=d.unpack,Xn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=zn(r,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},Un=Xn,Vn=d.type,Wn=function(r){if("number"==Vn(r)&&r>=0&&r<=16777215)return[r>>16,r>>8&255,255&r,1];throw new Error("unknown num color: "+r)},Hn=Wn,Kn=M,Zn=k,Jn=b,Qn=d.type,rt=Un;Zn.prototype.num=function(){return rt(this._rgb)},Kn.num=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Zn,[null].concat(r,["num"])))},Jn.format.num=Hn,Jn.autodetect.push({p:5,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(1===r.length&&"number"===Qn(r[0])&&r[0]>=0&&r[0]<=16777215)return"num"}});var et=M,nt=k,tt=b,at=d.unpack,ft=d.type,ot=Math.round;nt.prototype.rgb=function(r){return void 0===r&&(r=!0),!1===r?this._rgb.slice(0,3):this._rgb.slice(0,3).map(ot)},nt.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:ot(e):e}))},et.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(nt,[null].concat(r,["rgb"])))},tt.format.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=at(r,"rgba");return void 0===n[3]&&(n[3]=1),n},tt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=at(r,"rgba"),"array"===ft(r)&&(3===r.length||4===r.length&&"number"==ft(r[3])&&r[3]>=0&&r[3]<=1))return"rgb"}});var ut=Math.log,ct=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*ut(n),t=a<20?0:.8274096064007395*(t=a-10)-254.76935184120902+115.67994401066147*ut(t)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*ut(e),n=325.4494125711974+.07943456536662342*(n=a-50)-28.0852963507957*ut(n),t=255),[e,n,t,1]},it=ct,lt=d.unpack,ht=Math.round,st=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];for(var n,t=lt(r,"rgb"),a=t[0],f=t[2],o=1e3,u=4e4,c=.4;u-o>c;){var i=it(n=.5*(u+o));i[2]/i[0]>=f/a?u=n:o=n}return ht(n)},dt=M,bt=k,pt=b,gt=st;bt.prototype.temp=bt.prototype.kelvin=bt.prototype.temperature=function(){return gt(this._rgb)},dt.temp=dt.kelvin=dt.temperature=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(bt,[null].concat(r,["temp"])))},pt.format.temp=pt.format.kelvin=pt.format.temperature=ct;var vt=d.unpack,mt=Math.cbrt,yt=Math.pow,kt=Math.sign,wt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=vt(r,"rgb"),t=n[0],a=n[1],f=n[2],o=[Nt(t/255),Nt(a/255),Nt(f/255)],u=o[0],c=o[1],i=o[2],l=mt(.4122214708*u+.5363325363*c+.0514459929*i),h=mt(.2119034982*u+.6806995451*c+.1073969566*i),s=mt(.0883024619*u+.2817188376*c+.6299787005*i);return[.2104542553*l+.793617785*h-.0040720468*s,1.9779984951*l-2.428592205*h+.4505937099*s,.0259040371*l+.7827717662*h-.808675766*s]},Mt=wt;function Nt(r){var e=Math.abs(r);return e<.04045?r/12.92:(kt(r)||1)*yt((e+.055)/1.055,2.4)}var _t=d.unpack,xt=Math.pow,At=Math.sign,Et=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=_t(r,"lab"))[0],t=r[1],a=r[2],f=xt(n+.3963377774*t+.2158037573*a,3),o=xt(n-.1055613458*t-.0638541728*a,3),u=xt(n-.0894841775*t-1.291485548*a,3);return[255*Pt(4.0767416621*f-3.3077115913*o+.2309699292*u),255*Pt(-1.2684380046*f+2.6097574011*o-.3413193965*u),255*Pt(-.0041960863*f-.7034186147*o+1.707614701*u),r.length>3?r[3]:1]},Ft=Et;function Pt(r){var e=Math.abs(r);return e>.0031308?(At(r)||1)*(1.055*xt(e,1/2.4)-.055):12.92*r}var It=d.unpack,Ot=d.type,Rt=M,jt=k,Gt=b,qt=Mt;jt.prototype.oklab=function(){return qt(this._rgb)},Rt.oklab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(jt,[null].concat(r,["oklab"])))},Gt.format.oklab=Ft,Gt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=It(r,"oklab"),"array"===Ot(r)&&3===r.length)return"oklab"}});var Ct=d.unpack,Lt=Mt,Bt=ln,$t=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Ct(r,"rgb"),t=n[0],a=n[1],f=n[2],o=Lt(t,a,f),u=o[0],c=o[1],i=o[2];return Bt(u,c,i)},Dt=$t,Tt=d.unpack,St=wn,Yt=Ft,zt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Tt(r,"lch"))[0],t=r[1],a=r[2],f=St(n,t,a),o=f[0],u=f[1],c=f[2],i=Yt(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},Xt=zt,Ut=d.unpack,Vt=d.type,Wt=M,Ht=k,Kt=b,Zt=Dt;Ht.prototype.oklch=function(){return Zt(this._rgb)},Wt.oklch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Ht,[null].concat(r,["oklch"])))},Kt.format.oklch=Xt,Kt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Ut(r,"oklch"),"array"===Vt(r)&&3===r.length)return"oklch"}});var Jt=k,Qt=d.type;Jt.prototype.alpha=function(r,e){return void 0===e&&(e=!1),void 0!==r&&"number"===Qt(r)?e?(this._rgb[3]=r,this):new Jt([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]},k.prototype.clipped=function(){return this._rgb._clipped||!1};var ra=k,ea=qe;ra.prototype.darken=function(r){void 0===r&&(r=1);var e=this,n=e.lab();return n[0]-=ea.Kn*r,new ra(n,"lab").alpha(e.alpha(),!0)},ra.prototype.brighten=function(r){return void 0===r&&(r=1),this.darken(-r)},ra.prototype.darker=ra.prototype.darken,ra.prototype.brighter=ra.prototype.brighten,k.prototype.get=function(r){var e=r.split("."),n=e[0],t=e[1],a=this[n]();if(t){var f=n.indexOf(t)-("ok"===n.substr(0,2)?2:0);if(f>-1)return a[f];throw new Error("unknown channel "+t+" in mode "+n)}return a};var na=k,ta=d.type,aa=Math.pow,fa=1e-7,oa=20;na.prototype.luminance=function(r){if(void 0!==r&&"number"===ta(r)){if(0===r)return new na([0,0,0,this._rgb[3]],"rgb");if(1===r)return new na([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),n="rgb",t=oa,a=function(e,f){var o=e.interpolate(f,.5,n),u=o.luminance();return Math.abs(r-u)<fa||!t--?o:u>r?a(e,o):a(o,f)},f=(e>r?a(new na([0,0,0]),this):a(this,new na([255,255,255]))).rgb();return new na(f.concat([this._rgb[3]]))}return ua.apply(void 0,this._rgb.slice(0,3))};var ua=function(r,e,n){return.2126*(r=ca(r))+.7152*(e=ca(e))+.0722*(n=ca(n))},ca=function(r){return(r/=255)<=.03928?r/12.92:aa((r+.055)/1.055,2.4)},ia={},la=k,ha=d.type,sa=ia,da=function(r,e,n){void 0===n&&(n=.5);for(var t=[],a=arguments.length-3;a-- >0;)t[a]=arguments[a+3];var f=t[0]||"lrgb";if(sa[f]||t.length||(f=Object.keys(sa)[0]),!sa[f])throw new Error("interpolation mode "+f+" is not defined");return"object"!==ha(r)&&(r=new la(r)),"object"!==ha(e)&&(e=new la(e)),sa[f](r,e,n).alpha(r.alpha()+n*(e.alpha()-r.alpha()))},ba=k,pa=da;ba.prototype.mix=ba.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 pa.apply(void 0,[this,r,e].concat(n))};var ga=k;ga.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 ga([e[0]*n,e[1]*n,e[2]*n,n],"rgb")};var va=k,ma=qe;va.prototype.saturate=function(r){void 0===r&&(r=1);var e=this,n=e.lch();return n[1]+=ma.Kn*r,n[1]<0&&(n[1]=0),new va(n,"lch").alpha(e.alpha(),!0)},va.prototype.desaturate=function(r){return void 0===r&&(r=1),this.saturate(-r)};var ya=k,ka=d.type;ya.prototype.set=function(r,e,n){void 0===n&&(n=!1);var t=r.split("."),a=t[0],f=t[1],o=this[a]();if(f){var u=a.indexOf(f)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==ka(e))switch(e.charAt(0)){case"+":case"-":o[u]+=+e;break;case"*":o[u]*=+e.substr(1);break;case"/":o[u]/=+e.substr(1);break;default:o[u]=+e}else{if("number"!==ka(e))throw new Error("unsupported value for Color.set");o[u]=e}var c=new ya(o,a);return n?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+f+" in mode "+a)}return o};var wa=k,Ma=function(r,e,n){var t=r._rgb,a=e._rgb;return new wa(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"rgb")};ia.rgb=Ma;var Na=k,_a=Math.sqrt,xa=Math.pow,Aa=function(r,e,n){var t=r._rgb,a=t[0],f=t[1],o=t[2],u=e._rgb,c=u[0],i=u[1],l=u[2];return new Na(_a(xa(a,2)*(1-n)+xa(c,2)*n),_a(xa(f,2)*(1-n)+xa(i,2)*n),_a(xa(o,2)*(1-n)+xa(l,2)*n),"rgb")};ia.lrgb=Aa;var Ea=k,Fa=function(r,e,n){var t=r.lab(),a=e.lab();return new Ea(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"lab")};ia.lab=Fa;var Pa=k,Ia=function(r,e,n,t){var a,f,o,u,c,i,l,h,s,d,b,p,g;return"hsl"===t?(o=r.hsl(),u=e.hsl()):"hsv"===t?(o=r.hsv(),u=e.hsv()):"hcg"===t?(o=r.hcg(),u=e.hcg()):"hsi"===t?(o=r.hsi(),u=e.hsi()):"lch"===t||"hcl"===t?(t="hcl",o=r.hcl(),u=e.hcl()):"oklch"===t&&(o=r.oklch().reverse(),u=e.oklch().reverse()),"h"!==t.substr(0,1)&&"oklch"!==t||(c=(a=o)[0],l=a[1],s=a[2],i=(f=u)[0],h=f[1],d=f[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?p=Number.NaN:(p=i,1!=s&&0!=s||"hsv"==t||(b=h)):(p=c,1!=d&&0!=d||"hsv"==t||(b=l)):p=c+n*(i>c&&i-c>180?i-(c+360):i<c&&c-i>180?i+360-c:i-c),void 0===b&&(b=l+n*(h-l)),g=s+n*(d-s),new Pa("oklch"===t?[g,b,p]:[p,b,g],t)},Oa=Ia,Ra=function(r,e,n){return Oa(r,e,n,"lch")};ia.lch=Ra,ia.hcl=Ra;var ja=k,Ga=function(r,e,n){var t=r.num(),a=e.num();return new ja(t+n*(a-t),"num")};ia.num=Ga;var qa=Ia,Ca=function(r,e,n){return qa(r,e,n,"hcg")};ia.hcg=Ca;var La=Ia,Ba=function(r,e,n){return La(r,e,n,"hsi")};ia.hsi=Ba;var $a=Ia,Da=function(r,e,n){return $a(r,e,n,"hsl")};ia.hsl=Da;var Ta=Ia,Sa=function(r,e,n){return Ta(r,e,n,"hsv")};ia.hsv=Sa;var Ya=k,za=function(r,e,n){var t=r.oklab(),a=e.oklab();return new Ya(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"oklab")};ia.oklab=za;var Xa=Ia,Ua=function(r,e,n){return Xa(r,e,n,"oklch")};ia.oklch=Ua;var Va=k,Wa=d.clip_rgb,Ha=Math.pow,Ka=Math.sqrt,Za=Math.PI,Ja=Math.cos,Qa=Math.sin,rf=Math.atan2,ef=function(r,e,n){void 0===e&&(e="lrgb"),void 0===n&&(n=null);var t=r.length;n||(n=Array.from(new Array(t)).map((function(){return 1})));var a=t/n.reduce((function(r,e){return r+e}));if(n.forEach((function(r,e){n[e]*=a})),r=r.map((function(r){return new Va(r)})),"lrgb"===e)return nf(r,n);for(var f=r.shift(),o=f.get(e),u=[],c=0,i=0,l=0;l<o.length;l++)if(o[l]=(o[l]||0)*n[0],u.push(isNaN(o[l])?0:n[0]),"h"===e.charAt(l)&&!isNaN(o[l])){var h=o[l]/180*Za;c+=Ja(h)*n[0],i+=Qa(h)*n[0]}var s=f.alpha()*n[0];r.forEach((function(r,t){var a=r.get(e);s+=r.alpha()*n[t+1];for(var f=0;f<o.length;f++)if(!isNaN(a[f]))if(u[f]+=n[t+1],"h"===e.charAt(f)){var l=a[f]/180*Za;c+=Ja(l)*n[t+1],i+=Qa(l)*n[t+1]}else o[f]+=a[f]*n[t+1]}));for(var d=0;d<o.length;d++)if("h"===e.charAt(d)){for(var b=rf(i/u[d],c/u[d])/Za*180;b<0;)b+=360;for(;b>=360;)b-=360;o[d]=b}else o[d]=o[d]/u[d];return s/=t,new Va(o,e).alpha(s>.99999?1:s,!0)},nf=function(r,e){for(var n=r.length,t=[0,0,0,0],a=0;a<r.length;a++){var f=r[a],o=e[a]/n,u=f._rgb;t[0]+=Ha(u[0],2)*o,t[1]+=Ha(u[1],2)*o,t[2]+=Ha(u[2],2)*o,t[3]+=u[3]*o}return t[0]=Ka(t[0]),t[1]=Ka(t[1]),t[2]=Ka(t[2]),t[3]>.9999999&&(t[3]=1),new Va(Wa(t))},tf=M,af=d.type,ff=Math.pow,of=function(r){var e="rgb",n=tf("#ccc"),t=0,a=[0,1],f=[],o=[0,0],u=!1,c=[],i=!1,l=0,h=1,s=!1,d={},b=!0,p=1,g=function(r){if((r=r||["#fff","#000"])&&"string"===af(r)&&tf.brewer&&tf.brewer[r.toLowerCase()]&&(r=tf.brewer[r.toLowerCase()]),"array"===af(r)){1===r.length&&(r=[r[0],r[0]]),r=r.slice(0);for(var e=0;e<r.length;e++)r[e]=tf(r[e]);f.length=0;for(var n=0;n<r.length;n++)f.push(n/(r.length-1))}return w(),c=r},v=function(r){if(null!=u){for(var e=u.length-1,n=0;n<e&&r>=u[n];)n++;return n-1}return 0},m=function(r){return r},y=function(r){return r},k=function(r,t){var a,i;if(null==t&&(t=!1),isNaN(r)||null===r)return n;i=t?r:u&&u.length>2?v(r)/(u.length-2):h!==l?(r-l)/(h-l):1,i=y(i),t||(i=m(i)),1!==p&&(i=ff(i,p)),i=o[0]+i*(1-o[0]-o[1]),i=Math.min(1,Math.max(0,i));var s=Math.floor(1e4*i);if(b&&d[s])a=d[s];else{if("array"===af(c))for(var g=0;g<f.length;g++){var k=f[g];if(i<=k){a=c[g];break}if(i>=k&&g===f.length-1){a=c[g];break}if(i>k&&i<f[g+1]){i=(i-k)/(f[g+1]-k),a=tf.interpolate(c[g],c[g+1],i,e);break}}else"function"===af(c)&&(a=c(i));b&&(d[s]=a)}return a},w=function(){return d={}};g(r);var M=function(r){var e=tf(k(r));return i&&e[i]?e[i]():e};return M.classes=function(r){if(null!=r){if("array"===af(r))u=r,a=[r[0],r[r.length-1]];else{var e=tf.analyze(a);u=0===r?[e.min,e.max]:tf.limits(e,"e",r)}return M}return u},M.domain=function(r){if(!arguments.length)return a;l=r[0],h=r[r.length-1],f=[];var e=c.length;if(r.length===e&&l!==h)for(var n=0,t=Array.from(r);n<t.length;n+=1){var o=t[n];f.push((o-l)/(h-l))}else{for(var u=0;u<e;u++)f.push(u/(e-1));if(r.length>2){var i=r.map((function(e,n){return n/(r.length-1)})),s=r.map((function(r){return(r-l)/(h-l)}));s.every((function(r,e){return i[e]===r}))||(y=function(r){if(r<=0||r>=1)return r;for(var e=0;r>=s[e+1];)e++;var n=(r-s[e])/(s[e+1]-s[e]);return i[e]+n*(i[e+1]-i[e])})}}return a=[l,h],M},M.mode=function(r){return arguments.length?(e=r,w(),M):e},M.range=function(r,e){return g(r),M},M.out=function(r){return i=r,M},M.spread=function(r){return arguments.length?(t=r,M):t},M.correctLightness=function(r){return null==r&&(r=!0),s=r,w(),m=s?function(r){for(var e=k(0,!0).lab()[0],n=k(1,!0).lab()[0],t=e>n,a=k(r,!0).lab()[0],f=e+(n-e)*r,o=a-f,u=0,c=1,i=20;Math.abs(o)>.01&&i-- >0;)t&&(o*=-1),o<0?(u=r,r+=.5*(c-r)):(c=r,r+=.5*(u-r)),a=k(r,!0).lab()[0],o=a-f;return r}:function(r){return r},M},M.padding=function(r){return null!=r?("number"===af(r)&&(r=[r,r]),o=r,M):o},M.colors=function(e,n){arguments.length<2&&(n="hex");var t=[];if(0===arguments.length)t=c.slice(0);else if(1===e)t=[M(.5)];else if(e>1){var f=a[0],o=a[1]-f;t=uf(0,e,!1).map((function(r){return M(f+r/(e-1)*o)}))}else{r=[];var i=[];if(u&&u.length>2)for(var l=1,h=u.length,s=1<=h;s?l<h:l>h;s?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;t=i.map((function(r){return M(r)}))}return tf[n]&&(t=t.map((function(r){return r[n]()}))),t},M.cache=function(r){return null!=r?(b=r,M):b},M.gamma=function(r){return null!=r?(p=r,M):p},M.nodata=function(r){return null!=r?(n=tf(r),M):n},M};function uf(r,e,n){for(var t=[],a=r<e,f=n?a?e+1:e-1:e,o=r;a?o<f:o>f;a?o++:o--)t.push(o);return t}var cf=k,lf=of,hf=function(r){for(var e=[1,1],n=1;n<r;n++){for(var t=[1],a=1;a<=e.length;a++)t[a]=(e[a]||0)+e[a-1];e=t}return e},sf=function(r){var e,n,t,a,f,o,u;if(2===(r=r.map((function(r){return new cf(r)}))).length)e=r.map((function(r){return r.lab()})),f=e[0],o=e[1],a=function(r){var e=[0,1,2].map((function(e){return f[e]+r*(o[e]-f[e])}));return new cf(e,"lab")};else if(3===r.length)n=r.map((function(r){return r.lab()})),f=n[0],o=n[1],u=n[2],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*f[e]+2*(1-r)*r*o[e]+r*r*u[e]}));return new cf(e,"lab")};else if(4===r.length){var c;t=r.map((function(r){return r.lab()})),f=t[0],o=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)*f[e]+3*(1-r)*(1-r)*r*o[e]+3*(1-r)*r*r*u[e]+r*r*r*c[e]}));return new cf(e,"lab")}}else{if(!(r.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,h;i=r.map((function(r){return r.lab()})),h=r.length-1,l=hf(h),a=function(r){var e=1-r,n=[0,1,2].map((function(n){return i.reduce((function(t,a,f){return t+l[f]*Math.pow(e,h-f)*Math.pow(r,f)*a[n]}),0)}));return new cf(n,"lab")}}return a},df=function(r){var e=sf(r);return e.scale=function(){return lf(e)},e},bf=M,pf=function(r,e,n){if(!pf[n])throw new Error("unknown blend mode "+n);return pf[n](r,e)},gf=function(r){return function(e,n){var t=bf(n).rgb(),a=bf(e).rgb();return bf.rgb(r(t,a))}},vf=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}},mf=function(r){return r},yf=function(r,e){return r*e/255},kf=function(r,e){return r>e?e:r},wf=function(r,e){return r>e?r:e},Mf=function(r,e){return 255*(1-(1-r/255)*(1-e/255))},Nf=function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))},_f=function(r,e){return 255*(1-(1-e/255)/(r/255))},xf=function(r,e){return 255===r||(r=e/255*255/(1-r/255))>255?255:r};pf.normal=gf(vf(mf)),pf.multiply=gf(vf(yf)),pf.screen=gf(vf(Mf)),pf.overlay=gf(vf(Nf)),pf.darken=gf(vf(kf)),pf.lighten=gf(vf(wf)),pf.dodge=gf(vf(xf)),pf.burn=gf(vf(_f));for(var Af=pf,Ef=d.type,Ff=d.clip_rgb,Pf=d.TWOPI,If=Math.pow,Of=Math.sin,Rf=Math.cos,jf=M,Gf=function(r,e,n,t,a){void 0===r&&(r=300),void 0===e&&(e=-1.5),void 0===n&&(n=1),void 0===t&&(t=1),void 0===a&&(a=[0,1]);var f,o=0;"array"===Ef(a)?f=a[1]-a[0]:(f=0,a=[a,a]);var u=function(u){var c=Pf*((r+120)/360+e*u),i=If(a[0]+f*u,t),l=(0!==o?n[0]+u*o:n)*i*(1-i)/2,h=Rf(c),s=Of(c);return jf(Ff([255*(i+l*(-.14861*h+1.78277*s)),255*(i+l*(-.29227*h-.90649*s)),255*(i+l*(1.97294*h)),1]))};return u.start=function(e){return null==e?r:(r=e,u)},u.rotations=function(r){return null==r?e:(e=r,u)},u.gamma=function(r){return null==r?t:(t=r,u)},u.hue=function(r){return null==r?n:("array"===Ef(n=r)?0==(o=n[1]-n[0])&&(n=n[1]):o=0,u)},u.lightness=function(r){return null==r?a:("array"===Ef(r)?(a=r,f=r[1]-r[0]):(a=[r,r],f=0),u)},u.scale=function(){return jf.scale(u)},u.hue(n),u},qf=k,Cf="0123456789abcdef",Lf=Math.floor,Bf=Math.random,$f=function(){for(var r="#",e=0;e<6;e++)r+=Cf.charAt(Lf(16*Bf()));return new qf(r,"hex")},Df=u,Tf=Math.log,Sf=Math.pow,Yf=Math.floor,zf=Math.abs,Xf=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"===Df(r)&&(r=Object.values(r)),r.forEach((function(r){e&&"object"===Df(r)&&(r=r[e]),null==r||isNaN(r)||(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(r,e){return Uf(n,r,e)},n},Uf=function(r,e,n){void 0===e&&(e="equal"),void 0===n&&(n=7),"array"==Df(r)&&(r=Xf(r));var t=r.min,a=r.max,f=r.values.sort((function(r,e){return r-e}));if(1===n)return[t,a];var o=[];if("c"===e.substr(0,1)&&(o.push(t),o.push(a)),"e"===e.substr(0,1)){o.push(t);for(var u=1;u<n;u++)o.push(t+u/n*(a-t));o.push(a)}else if("l"===e.substr(0,1)){if(t<=0)throw new Error("Logarithmic scales are only possible for values > 0");var c=Math.LOG10E*Tf(t),i=Math.LOG10E*Tf(a);o.push(t);for(var l=1;l<n;l++)o.push(Sf(10,c+l/n*(i-c)));o.push(a)}else if("q"===e.substr(0,1)){o.push(t);for(var h=1;h<n;h++){var s=(f.length-1)*h/n,d=Yf(s);if(d===s)o.push(f[d]);else{var b=s-d;o.push(f[d]*(1-b)+f[d+1]*b)}}o.push(a)}else if("k"===e.substr(0,1)){var p,g=f.length,v=new Array(g),m=new Array(n),y=!0,k=0,w=null;(w=[]).push(t);for(var M=1;M<n;M++)w.push(t+M/n*(a-t));for(w.push(a);y;){for(var N=0;N<n;N++)m[N]=0;for(var _=0;_<g;_++)for(var x=f[_],A=Number.MAX_VALUE,E=void 0,F=0;F<n;F++){var P=zf(w[F]-x);P<A&&(A=P,E=F),m[E]++,v[_]=E}for(var I=new Array(n),O=0;O<n;O++)I[O]=null;for(var R=0;R<g;R++)null===I[p=v[R]]?I[p]=f[R]:I[p]+=f[R];for(var j=0;j<n;j++)I[j]*=1/m[j];y=!1;for(var G=0;G<n;G++)if(I[G]!==w[G]){y=!0;break}w=I,++k>200&&(y=!1)}for(var q={},C=0;C<n;C++)q[C]=[];for(var L=0;L<g;L++)q[p=v[L]].push(f[L]);for(var B=[],$=0;$<n;$++)B.push(q[$][0]),B.push(q[$][q[$].length-1]);B=B.sort((function(r,e){return r-e})),o.push(B[0]);for(var D=1;D<B.length;D+=2){var T=B[D];isNaN(T)||-1!==o.indexOf(T)||o.push(T)}}return o},Vf={analyze:Xf,limits:Uf},Wf=k,Hf=function(r,e){r=new Wf(r),e=new Wf(e);var n=r.luminance(),t=e.luminance();return n>t?(n+.05)/(t+.05):(t+.05)/(n+.05)},Kf=k,Zf=Math.sqrt,Jf=Math.pow,Qf=Math.min,ro=Math.max,eo=Math.atan2,no=Math.abs,to=Math.cos,ao=Math.sin,fo=Math.exp,oo=Math.PI,uo=function(r,e,n,t,a){void 0===n&&(n=1),void 0===t&&(t=1),void 0===a&&(a=1);var f=function(r){return 360*r/(2*oo)},o=function(r){return 2*oo*r/360};r=new Kf(r),e=new Kf(e);var u=Array.from(r.lab()),c=u[0],i=u[1],l=u[2],h=Array.from(e.lab()),s=h[0],d=h[1],b=h[2],p=(c+s)/2,g=(Zf(Jf(i,2)+Jf(l,2))+Zf(Jf(d,2)+Jf(b,2)))/2,v=.5*(1-Zf(Jf(g,7)/(Jf(g,7)+Jf(25,7)))),m=i*(1+v),y=d*(1+v),k=Zf(Jf(m,2)+Jf(l,2)),w=Zf(Jf(y,2)+Jf(b,2)),M=(k+w)/2,N=f(eo(l,m)),_=f(eo(b,y)),x=N>=0?N:N+360,A=_>=0?_:_+360,E=no(x-A)>180?(x+A+360)/2:(x+A)/2,F=1-.17*to(o(E-30))+.24*to(o(2*E))+.32*to(o(3*E+6))-.2*to(o(4*E-63)),P=A-x;P=no(P)<=180?P:A<=x?P+360:P-360,P=2*Zf(k*w)*ao(o(P)/2);var I=s-c,O=w-k,R=1+.015*Jf(p-50,2)/Zf(20+Jf(p-50,2)),j=1+.045*M,G=1+.015*M*F,q=30*fo(-Jf((E-275)/25,2)),C=-2*Zf(Jf(M,7)/(Jf(M,7)+Jf(25,7)))*ao(2*o(q)),L=Zf(Jf(I/(n*R),2)+Jf(O/(t*j),2)+Jf(P/(a*G),2)+C*(O/(t*j))*(P/(a*G)));return ro(0,Qf(100,L))},co=k,io=function(r,e,n){void 0===n&&(n="lab"),r=new co(r),e=new co(e);var t=r.get(n),a=e.get(n),f=0;for(var o in t){var u=(t[o]||0)-(a[o]||0);f+=u*u}return Math.sqrt(f)},lo=k,ho=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];try{return new(Function.prototype.bind.apply(lo,[null].concat(r))),!0}catch(r){return!1}},so=M,bo=of,po={cool:function(){return bo([so.hsl(180,1,.9),so.hsl(250,.7,.4)])},hot:function(){return bo(["#000","#f00","#ff0","#fff"]).mode("rgb")}},go={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},vo=0,mo=Object.keys(go);vo<mo.length;vo+=1){var yo=mo[vo];go[yo.toLowerCase()]=go[yo]}var ko=go,wo=M;return wo.average=ef,wo.bezier=df,wo.blend=Af,wo.cubehelix=Gf,wo.mix=wo.interpolate=da,wo.random=$f,wo.scale=of,wo.analyze=Vf.analyze,wo.contrast=Hf,wo.deltaE=uo,wo.distance=io,wo.limits=Vf.limits,wo.valid=ho,wo.scales=po,wo.colors=Ln,wo.brewer=ko,wo}();var n=e.exports;const t=r=>{const e=[];for(let n=0;n<r;n++)e.push(n);return e},a=(r,e)=>{const n=360/r;return t(r).map((r=>Math.floor((e+r*n)%360)))},f=(r,e)=>{const[t,a,f]=n(e).hsl();return n.hsl(t,r,f).hex()},o=(r,e,a)=>{const f=t(e).reverse().map((r=>(r+.5)/e)),o=n(r);return f.map((r=>o.luminance(r*(2*a)).hex()))},u=r=>{const[e,t]=n(r).hsl();return t<.5?"gray":e},c=(r,e)=>(r[e.key]=e.value,r),i=r=>{r=r.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(r,e,n,t){return e+e+n+n+t+t}));const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return`rgb(${parseInt(e[1],16)}, ${parseInt(e[2],16)}, ${parseInt(e[3],16)})`},l=(r,e,n)=>Math.min(Math.max(r,e),n),h=r=>s(r).map(d),s=r=>r.match(/-?\d+(\.\d+)?%?/g),d=(r,e)=>e<3?-1!=r.indexOf("%")?Math.round(255*l(parseInt(r,10),0,100)/100):l(parseInt(r,10),0,255):l(parseFloat(r),0,1),b=r=>"#"===r.slice(0,1),p=(r,e,n)=>{const t=[r,e,n].map((function(r){return(r/=255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}));return.2126*t[0]+.7152*t[1]+.0722*t[2]},g=(r,e)=>{const n=p(r[0],r[1],r[2]),t=p(e[0],e[1],e[2]);return(Math.max(n,t)+.05)/(Math.min(n,t)+.05)},v=r=>{const e=h(r),n=4===e.length?m(255*r[3]):"";return"#"+m(e[0])+m(e[1])+m(e[2])+n},m=r=>{const e=Math.round(l(r,0,255)).toString(16);return 1==e.length?"0"+e:e};return r.getColorPalette=({accent:r="rgb(53, 89, 199)",hues:e=12,shades:t=1,gray:i=!1,lightness:l=.5}={})=>{const h=n(r),s=[],[d,b,p]=h.hsl(),g=Number(l),v=Number(t),m=a(Number(e),d);i&&s.push({key:"gray",value:o(f(.1,h.hex()),v,g)}),m.forEach((r=>{const e=n.hsl(r,b,p),t=u(e);s.push({key:t,value:o(e.hex(),v,g)})}));return s.reduce(c,{})},r.getContrastRatio=(r,e)=>{b(e)&&(e=i(e)),b(r)&&(r=i(r));const[n,t,a]=h(e),[f,o,u]=h(r);return g([n,t,a],[f,o,u])},r.getTextColor=r=>{let e=r;"#"!==e.slice(0,1)&&(e=v(e)),b(e)&&(e=e.slice(1)),3===e.length&&(e=e.split("").map((r=>r+r)).join(""));return(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=120?"rgb(12, 26, 61)":"rgb(255, 255, 255)"},r.hexToRgb=i,r.rgbToHex=v,Object.defineProperty(r,"__esModule",{value:!0}),r}({});
{
"name": "@nordhealth/color",
"version": "1.0.12",
"version": "1.0.13",
"description": "This package includes Nord Design System color utilities",

@@ -31,4 +31,4 @@ "author": "Nordhealth <support@nordhealth.design>",

"devDependencies": {
"@nordhealth/components": "^2.16.1",
"@nordhealth/css": "^2.4.1",
"@nordhealth/components": "^2.17.0",
"@nordhealth/css": "^2.5.0",
"@rollup/plugin-commonjs": "^22.0.2",

@@ -45,6 +45,6 @@ "@rollup/plugin-node-resolve": "^14.1.0",

"dependencies": {
"@nordhealth/tokens": "^6.3.0",
"@nordhealth/tokens": "^6.4.0",
"chroma-js": "2.4.2"
},
"gitHead": "37b65c410c57913becd43585544cab0d6ba80777"
"gitHead": "1375eefd0a30ec9b40c47075e9f6f9ebc480eaff"
}

@@ -24,2 +24,2 @@ # Nord Color Utilities

Copyright © 2022 Nordhealth Ltd.
Copyright © 2023 Nordhealth Ltd.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc