!function(){"use strict";var t="http://www.w3.org/1999/xhtml",e={svg:"http://www.w3.org/2000/svg",xhtml:t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function n(t){var n=t+="",r=n.indexOf(":");return r>=0&&"xmlns"!==(n=t.slice(0,r))&&(t=t.slice(r+1)),e.hasOwnProperty(n)?{space:e[n],local:t}:t}function r(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===t&&n.documentElement.namespaceURI===t?n.createElement(e):n.createElementNS(r,e)}}function i(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function a(t){var e=n(t);return(e.local?i:r)(e)}function o(){}function u(t){return null==t?o:function(){return this.querySelector(t)}}function s(){return[]}function c(t){return null==t?s:function(){return this.querySelectorAll(t)}}function l(t){return function(){return this.matches(t)}}function f(t){return new Array(t.length)}function h(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}h.prototype={constructor:h,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function d(t,e,n,r,i,a){for(var o,u=0,s=e.length,c=a.length;ue?1:t>=e?0:NaN}function v(t){return function(){this.removeAttribute(t)}}function m(t){return function(){this.removeAttributeNS(t.space,t.local)}}function y(t,e){return function(){this.setAttribute(t,e)}}function b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function w(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function x(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function _(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function M(t){return function(){this.style.removeProperty(t)}}function k(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function A(t,e){return t.style.getPropertyValue(e)||_(t).getComputedStyle(t,null).getPropertyValue(e)}function L(t){return function(){delete this[t]}}function T(t,e){return function(){this[t]=e}}function S(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function D(t){return t.trim().split(/^|\s+/)}function C(t){return t.classList||new N(t)}function N(t){this._node=t,this._names=D(t.getAttribute("class")||"")}function E(t,e){for(var n=C(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Z={},K=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Z={mouseenter:"mouseover",mouseleave:"mouseout"}));function J(t,e,n){return t=Q(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Q(t,e,n){return function(r){var i=K;K=r;try{t.call(this,this.__data__,e,n)}finally{K=i}}}function tt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function et(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=M&&(M=_+1);!(x=b[M])&&++M=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=g);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?M:"function"==typeof e?$:k)(t,e,null==n?"":n)):A(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?L:"function"==typeof e?S:T)(t,e)):this.node()[t]},classed:function(t,e){var n=D(t+"");if(arguments.length<2){for(var r=C(this.node()),i=-1,a=n.length;++i-1)&&(t.push(this.parentNode),!0)})).select((function(){return this.parentNode}))},st.prototype.selectAppend=function(t){var e,n=u(t),r=ft(t);for(var i in t=a(r.tag),e=this.select((function(){return n.apply(this,arguments)||this.appendChild(t.apply(this,arguments))})),r.attr)e.attr(i,r.attr[i]);return e},st.prototype.tspans=function(t,e){return this.selectAll("tspan").data((function(e,n){return("function"==typeof t?t.call(this,e,n):t).map((function(t){return{line:t,parent:e}}))})).enter().append("tspan").text((function(t){return t.line})).attr("x",0).attr("dy",(function(t,n){return n?("function"==typeof e?e.call(this,t.parent,t.line,n):e)||15:0}))},st.prototype.appendMany=function(t,e){if("string"==typeof e){console.warn("DEPRECATED: jetpack's appendMany order of arguments has changed. It's appendMany('div', data) from now on");var n=e;e=t,t=n}return this.selectAll(null).data(e).enter().append(t)},st.prototype.at=function(t,e){if("object"==typeof t){for(var n in t)this.attr(dt.test(n)?n:n.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase(),t[n]);return this}return 1==arguments.length?this.attr(t):this.attr(t,e)},st.prototype.st=function(t,e){if("object"==typeof t){for(var n in t)r(this,n,t[n]);return this}return 1==arguments.length?this.style(t):r(this,t,e);function r(t,e,n){e=e.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase();return~"top left bottom right padding-top padding-left padding-bottom padding-right border-top b-width border-left-width border-botto-width m border-right-width margin-top margin-left margin-bottom margin-right font-size width stroke-width line-height margin padding border border-radius max-width min-width max-height min-height".indexOf(e)?t.style(e,"function"==typeof n?a(n):i(n)):t.style(e,n),t}function i(t){return t.match?t:t+"px"}function a(t){return function(){var e=t.apply(this,arguments);return i(e)}}},st.prototype.prop=st.prototype.property;var bt="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},wt=Array.prototype,xt=Object.prototype,_t=wt.slice,Mt=xt.toString,kt=xt.hasOwnProperty,$t=Array.isArray,At=Object.keys,Lt=isNaN,Tt=!{toString:null}.propertyIsEnumerable("toString"),St=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Dt=Math.pow(2,53)-1;function Ct(t){var e="[object "+t+"]";return function(t){return Mt.call(t)===e}}var Nt=$t||Ct("Array");function Et(t){return t instanceof Et?t:this instanceof Et?void(this._wrapped=t):new Et(t)}function Ot(t){return t}Et.VERSION="1.12.1",Et.prototype.value=function(){return this._wrapped},Et.prototype.valueOf=Et.prototype.toJSON=Et.prototype.value,Et.prototype.toString=function(){return String(this._wrapped)};var zt=Ct("Function"),Ft=bt.document&&bt.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof Ft&&(zt=function(t){return"function"==typeof t||!1});var jt=zt;function Pt(t){var e=typeof t;return"function"===e||"object"===e&&!!t}function Rt(t,e){return null!=t&&kt.call(t,e)}function Ht(t){if(!Pt(t))return[];if(At)return At(t);var e=[];for(var n in t)Rt(t,n)&&e.push(n);return Tt&&function(t,e){e=function(t){for(var e={},n=t.length,r=0;r=0&&e<=Dt});var Qt,te=(Qt=1,function(t,e,n){e=Xt(e,n);for(var r=Zt(t),i=Qt>0?0:r-1;i>=0&&i0?o=a>=0?a:Math.max(a+u,o):u=a>=0?Math.min(a+1,u):a+u+1;else if(n&&a&&u)return r[a=n(r,i)]===i?a:-1;if(i!=i)return(a=e(_t.call(r,o,u),ne))>=0?a+o:-1;for(a=t>0?o:u-1;a>=0&&a=0}function ae(t,e,n,r){var i;!0!==(i=e)&&!1!==i&&"[object Boolean]"!==Mt.call(i)&&(r=n,n=e,e=!1),null!=n&&(n=Xt(n,r));for(var a=[],o=[],u=0,s=Zt(t);un?n:t},e={},n=0,r=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];n255)&&(e._clipped=!0),e[n]=t(e[n],0,255)):3===n&&(e[n]=t(e[n],0,1));return e},limit:t,type:a,unpack:function(t,e){return void 0===e&&(e=null),t.length>=3?Array.prototype.slice.call(t):"object"==a(t[0])&&e?e.split("").filter((function(e){return void 0!==t[0][e]})).map((function(e){return t[0][e]})):t[0]},last:function(t){if(t.length<2)return null;var e=t.length-1;return"string"==a(t[e])?t[e].toLowerCase():null},PI:o,TWOPI:2*o,PITHIRD:o/3,DEG2RAD:o/180,RAD2DEG:180/o},s={format:{},autodetect:[]},c=u.last,l=u.clip_rgb,f=u.type,h=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=this;if("object"===f(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var i=c(e),a=!1;if(!i){a=!0,s.sorted||(s.autodetect=s.autodetect.sort((function(t,e){return e.p-t.p})),s.sorted=!0);for(var o=0,u=s.autodetect;o4?e[4]:1;return 1===o?[0,0,0,u]:[r>=1?0:255*(1-r)*(1-o),i>=1?0:255*(1-i)*(1-o),a>=1?0:255*(1-a)*(1-o),u]},x=u.unpack,_=u.type;d.prototype.cmyk=function(){return y(this._rgb)},g.cmyk=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["cmyk"])))},s.format.cmyk=w,s.autodetect.push({p:2,test:function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];if(e=x(e,"cmyk"),"array"===_(e)&&4===e.length)return"cmyk"}});var M=u.unpack,k=u.last,$=function(t){return Math.round(100*t)/100},A=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=M(e,"hsla"),i=k(e)||"lsa";return r[0]=$(r[0]||0),r[1]=$(100*r[1])+"%",r[2]=$(100*r[2])+"%","hsla"===i||r.length>3&&r[3]<1?(r[3]=r.length>3?r[3]:1,i="hsla"):r.length=3,i+"("+r.join(",")+")"},L=u.unpack,T=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=(e=L(e,"rgba"))[0],i=e[1],a=e[2];r/=255,i/=255,a/=255;var o,u,s=Math.min(r,i,a),c=Math.max(r,i,a),l=(c+s)/2;return c===s?(o=0,u=Number.NaN):o=l<.5?(c-s)/(c+s):(c-s)/(2-c-s),r==c?u=(i-a)/(c-s):i==c?u=2+(a-r)/(c-s):a==c&&(u=4+(r-i)/(c-s)),(u*=60)<0&&(u+=360),e.length>3&&void 0!==e[3]?[u,o,l,e[3]]:[u,o,l]},S=u.unpack,D=u.last,C=Math.round,N=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=S(e,"rgba"),i=D(e)||"rgb";return"hsl"==i.substr(0,3)?A(T(r),i):(r[0]=C(r[0]),r[1]=C(r[1]),r[2]=C(r[2]),("rgba"===i||r.length>3&&r[3]<1)&&(r[3]=r.length>3?r[3]:1,i="rgba"),i+"("+r.slice(0,"rgb"===i?3:4).join(",")+")")},E=u.unpack,O=Math.round,z=function(){for(var t,e=arguments,n=[],r=arguments.length;r--;)n[r]=e[r];var i,a,o,u=(n=E(n,"hsl"))[0],s=n[1],c=n[2];if(0===s)i=a=o=255*c;else{var l=[0,0,0],f=[0,0,0],h=c<.5?c*(1+s):c+s-c*s,d=2*c-h,p=u/360;l[0]=p+1/3,l[1]=p,l[2]=p-1/3;for(var g=0;g<3;g++)l[g]<0&&(l[g]+=1),l[g]>1&&(l[g]-=1),6*l[g]<1?f[g]=d+6*(h-d)*l[g]:2*l[g]<1?f[g]=h:3*l[g]<2?f[g]=d+(h-d)*(2/3-l[g])*6:f[g]=d;i=(t=[O(255*f[0]),O(255*f[1]),O(255*f[2])])[0],a=t[1],o=t[2]}return n.length>3?[i,a,o,n[3]]:[i,a,o,1]},F=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,j=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,P=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,R=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,H=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Y=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,B=Math.round,U=function(t){var e;if(t=t.toLowerCase().trim(),s.format.named)try{return s.format.named(t)}catch(t){}if(e=t.match(F)){for(var n=e.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(e=t.match(j)){for(var i=e.slice(1,5),a=0;a<4;a++)i[a]=+i[a];return i}if(e=t.match(P)){for(var o=e.slice(1,4),u=0;u<3;u++)o[u]=B(2.55*o[u]);return o[3]=1,o}if(e=t.match(R)){for(var c=e.slice(1,5),l=0;l<3;l++)c[l]=B(2.55*c[l]);return c[3]=+c[3],c}if(e=t.match(H)){var f=e.slice(1,4);f[1]*=.01,f[2]*=.01;var h=z(f);return h[3]=1,h}if(e=t.match(Y)){var d=e.slice(1,4);d[1]*=.01,d[2]*=.01;var p=z(d);return p[3]=+e[4],p}};U.test=function(t){return F.test(t)||j.test(t)||P.test(t)||R.test(t)||H.test(t)||Y.test(t)};var W=U,q=u.type;d.prototype.css=function(t){return N(this._rgb,t)},g.css=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["css"])))},s.format.css=W,s.autodetect.push({p:5,test:function(t){for(var e=arguments,n=[],r=arguments.length-1;r-- >0;)n[r]=e[r+1];if(!n.length&&"string"===q(t)&&W.test(t))return"css"}});var I=u.unpack;s.format.gl=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=I(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r},g.gl=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["gl"])))},d.prototype.gl=function(){var t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};var G=u.unpack,X=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r,i=G(e,"rgb"),a=i[0],o=i[1],u=i[2],s=Math.min(a,o,u),c=Math.max(a,o,u),l=c-s,f=100*l/255,h=s/(255-l)*100;return 0===l?r=Number.NaN:(a===c&&(r=(o-u)/l),o===c&&(r=2+(u-a)/l),u===c&&(r=4+(a-o)/l),(r*=60)<0&&(r+=360)),[r,f,h]},V=u.unpack,Z=Math.floor,K=function(){for(var t,e,n,r,i,a,o=arguments,u=[],s=arguments.length;s--;)u[s]=o[s];var c,l,f,h=(u=V(u,"hcg"))[0],d=u[1],p=u[2];p*=255;var g=255*d;if(0===d)c=l=f=p;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var v=Z(h/=60),m=h-v,y=p*(1-d),b=y+g*(1-m),w=y+g*m,x=y+g;switch(v){case 0:c=(t=[x,w,y])[0],l=t[1],f=t[2];break;case 1:c=(e=[b,x,y])[0],l=e[1],f=e[2];break;case 2:c=(n=[y,x,w])[0],l=n[1],f=n[2];break;case 3:c=(r=[y,b,x])[0],l=r[1],f=r[2];break;case 4:c=(i=[w,y,x])[0],l=i[1],f=i[2];break;case 5:c=(a=[x,y,b])[0],l=a[1],f=a[2]}}return[c,l,f,u.length>3?u[3]:1]},J=u.unpack,Q=u.type;d.prototype.hcg=function(){return X(this._rgb)},g.hcg=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["hcg"])))},s.format.hcg=K,s.autodetect.push({p:1,test:function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];if(e=J(e,"hcg"),"array"===Q(e)&&3===e.length)return"hcg"}});var tt=u.unpack,et=u.last,nt=Math.round,rt=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=tt(e,"rgba"),i=r[0],a=r[1],o=r[2],u=r[3],s=et(e)||"auto";void 0===u&&(u=1),"auto"===s&&(s=u<1?"rgba":"rgb");var c=(i=nt(i))<<16|(a=nt(a))<<8|(o=nt(o)),l="000000"+c.toString(16);l=l.substr(l.length-6);var f="0"+nt(255*u).toString(16);switch(f=f.substr(f.length-2),s.toLowerCase()){case"rgba":return"#"+l+f;case"argb":return"#"+f+l;default:return"#"+l}},it=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,at=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,ot=function(t){if(t.match(it)){4!==t.length&&7!==t.length||(t=t.substr(1)),3===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var e=parseInt(t,16);return[e>>16,e>>8&255,255&e,1]}if(t.match(at)){5!==t.length&&9!==t.length||(t=t.substr(1)),4===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);var n=parseInt(t,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+t)},ut=u.type;d.prototype.hex=function(t){return rt(this._rgb,t)},g.hex=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["hex"])))},s.format.hex=ot,s.autodetect.push({p:4,test:function(t){for(var e=arguments,n=[],r=arguments.length-1;r-- >0;)n[r]=e[r+1];if(!n.length&&"string"===ut(t)&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});var st=u.unpack,ct=u.TWOPI,lt=Math.min,ft=Math.sqrt,ht=Math.acos,dt=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r,i=st(e,"rgb"),a=i[0],o=i[1],u=i[2],s=lt(a/=255,o/=255,u/=255),c=(a+o+u)/3,l=c>0?1-s/c:0;return 0===l?r=NaN:(r=(a-o+(a-u))/2,r/=ft((a-o)*(a-o)+(a-u)*(o-u)),r=ht(r),u>o&&(r=ct-r),r/=ct),[360*r,l,c]},pt=u.unpack,gt=u.limit,vt=u.TWOPI,mt=u.PITHIRD,yt=Math.cos,bt=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r,i,a,o=(e=pt(e,"hsi"))[0],u=e[1],s=e[2];return isNaN(o)&&(o=0),isNaN(u)&&(u=0),o>360&&(o-=360),o<0&&(o+=360),(o/=360)<1/3?i=1-((a=(1-u)/3)+(r=(1+u*yt(vt*o)/yt(mt-vt*o))/3)):o<2/3?a=1-((r=(1-u)/3)+(i=(1+u*yt(vt*(o-=1/3))/yt(mt-vt*o))/3)):r=1-((i=(1-u)/3)+(a=(1+u*yt(vt*(o-=2/3))/yt(mt-vt*o))/3)),[255*(r=gt(s*r*3)),255*(i=gt(s*i*3)),255*(a=gt(s*a*3)),e.length>3?e[3]:1]},wt=u.unpack,xt=u.type;d.prototype.hsi=function(){return dt(this._rgb)},g.hsi=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["hsi"])))},s.format.hsi=bt,s.autodetect.push({p:2,test:function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];if(e=wt(e,"hsi"),"array"===xt(e)&&3===e.length)return"hsi"}});var _t=u.unpack,Mt=u.type;d.prototype.hsl=function(){return T(this._rgb)},g.hsl=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["hsl"])))},s.format.hsl=z,s.autodetect.push({p:2,test:function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];if(e=_t(e,"hsl"),"array"===Mt(e)&&3===e.length)return"hsl"}});var kt=u.unpack,$t=Math.min,At=Math.max,Lt=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r,i,a,o=(e=kt(e,"rgb"))[0],u=e[1],s=e[2],c=$t(o,u,s),l=At(o,u,s),f=l-c;return a=l/255,0===l?(r=Number.NaN,i=0):(i=f/l,o===l&&(r=(u-s)/f),u===l&&(r=2+(s-o)/f),s===l&&(r=4+(o-u)/f),(r*=60)<0&&(r+=360)),[r,i,a]},Tt=u.unpack,St=Math.floor,Dt=function(){for(var t,e,n,r,i,a,o=arguments,u=[],s=arguments.length;s--;)u[s]=o[s];var c,l,f,h=(u=Tt(u,"hsv"))[0],d=u[1],p=u[2];if(p*=255,0===d)c=l=f=p;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var g=St(h/=60),v=h-g,m=p*(1-d),y=p*(1-d*v),b=p*(1-d*(1-v));switch(g){case 0:c=(t=[p,b,m])[0],l=t[1],f=t[2];break;case 1:c=(e=[y,p,m])[0],l=e[1],f=e[2];break;case 2:c=(n=[m,p,b])[0],l=n[1],f=n[2];break;case 3:c=(r=[m,y,p])[0],l=r[1],f=r[2];break;case 4:c=(i=[b,m,p])[0],l=i[1],f=i[2];break;case 5:c=(a=[p,m,y])[0],l=a[1],f=a[2]}}return[c,l,f,u.length>3?u[3]:1]},Ct=u.unpack,Nt=u.type;d.prototype.hsv=function(){return Lt(this._rgb)},g.hsv=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["hsv"])))},s.format.hsv=Dt,s.autodetect.push({p:2,test:function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];if(e=Ct(e,"hsv"),"array"===Nt(e)&&3===e.length)return"hsv"}});var Et=18,Ot=.95047,zt=1,Ft=1.08883,jt=.137931034,Pt=.206896552,Rt=.12841855,Ht=.008856452,Yt=u.unpack,Bt=Math.pow,Ut=function(t){return(t/=255)<=.04045?t/12.92:Bt((t+.055)/1.055,2.4)},Wt=function(t){return t>Ht?Bt(t,1/3):t/Rt+jt},qt=function(t,e,n){return t=Ut(t),e=Ut(e),n=Ut(n),[Wt((.4124564*t+.3575761*e+.1804375*n)/Ot),Wt((.2126729*t+.7151522*e+.072175*n)/zt),Wt((.0193339*t+.119192*e+.9503041*n)/Ft)]},It=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=Yt(e,"rgb"),i=r[0],a=r[1],o=r[2],u=qt(i,a,o),s=u[0],c=u[1],l=u[2],f=116*c-16;return[f<0?0:f,500*(s-c),200*(c-l)]},Gt=u.unpack,Xt=Math.pow,Vt=function(t){return 255*(t<=.00304?12.92*t:1.055*Xt(t,1/2.4)-.055)},Zt=function(t){return t>Pt?t*t*t:Rt*(t-jt)},Kt=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r,i,a,o=(e=Gt(e,"lab"))[0],u=e[1],s=e[2];return i=(o+16)/116,r=isNaN(u)?i:i+u/500,a=isNaN(s)?i:i-s/200,i=zt*Zt(i),r=Ot*Zt(r),a=Ft*Zt(a),[Vt(3.2404542*r-1.5371385*i-.4985314*a),Vt(-.969266*r+1.8760108*i+.041556*a),Vt(.0556434*r-.2040259*i+1.0572252*a),e.length>3?e[3]:1]},Jt=u.unpack,Qt=u.type;d.prototype.lab=function(){return It(this._rgb)},g.lab=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["lab"])))},s.format.lab=Kt,s.autodetect.push({p:2,test:function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];if(e=Jt(e,"lab"),"array"===Qt(e)&&3===e.length)return"lab"}});var te=u.unpack,ee=u.RAD2DEG,ne=Math.sqrt,re=Math.atan2,ie=Math.round,ae=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=te(e,"lab"),i=r[0],a=r[1],o=r[2],u=ne(a*a+o*o),s=(re(o,a)*ee+360)%360;return 0===ie(1e4*u)&&(s=Number.NaN),[i,u,s]},oe=u.unpack,ue=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=oe(e,"rgb"),i=r[0],a=r[1],o=r[2],u=It(i,a,o),s=u[0],c=u[1],l=u[2];return ae(s,c,l)},se=u.unpack,ce=u.DEG2RAD,le=Math.sin,fe=Math.cos,he=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=se(e,"lch"),i=r[0],a=r[1],o=r[2];return isNaN(o)&&(o=0),[i,fe(o*=ce)*a,le(o)*a]},de=u.unpack,pe=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=(e=de(e,"lch"))[0],i=e[1],a=e[2],o=he(r,i,a),u=o[0],s=o[1],c=o[2],l=Kt(u,s,c),f=l[0],h=l[1],d=l[2];return[f,h,d,e.length>3?e[3]:1]},ge=u.unpack,ve=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=ge(e,"hcl").reverse();return pe.apply(void 0,r)},me=u.unpack,ye=u.type;d.prototype.lch=function(){return ue(this._rgb)},d.prototype.hcl=function(){return ue(this._rgb).reverse()},g.lch=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["lch"])))},g.hcl=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["hcl"])))},s.format.lch=pe,s.format.hcl=ve,["lch","hcl"].forEach((function(t){return s.autodetect.push({p:2,test:function(){for(var e=arguments,n=[],r=arguments.length;r--;)n[r]=e[r];if(n=me(n,t),"array"===ye(n)&&3===n.length)return t}})}));var be={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"},we=u.type;d.prototype.name=function(){for(var t=rt(this._rgb,"rgb"),e=0,n=Object.keys(be);e0;)n[r]=e[r+1];if(!n.length&&"string"===we(t)&&be[t.toLowerCase()])return"named"}});var xe=u.unpack,_e=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=xe(e,"rgb"),i=r[0],a=r[1],o=r[2];return(i<<16)+(a<<8)+o},Me=u.type,ke=function(t){if("number"==Me(t)&&t>=0&&t<=16777215)return[t>>16,t>>8&255,255&t,1];throw new Error("unknown num color: "+t)},$e=u.type;d.prototype.num=function(){return _e(this._rgb)},g.num=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["num"])))},s.format.num=ke,s.autodetect.push({p:5,test:function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];if(1===e.length&&"number"===$e(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var Ae=u.unpack,Le=u.type,Te=Math.round;d.prototype.rgb=function(t){return void 0===t&&(t=!0),!1===t?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Te)},d.prototype.rgba=function(t){return void 0===t&&(t=!0),this._rgb.slice(0,4).map((function(e,n){return n<3?!1===t?e:Te(e):e}))},g.rgb=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["rgb"])))},s.format.rgb=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];var r=Ae(e,"rgba");return void 0===r[3]&&(r[3]=1),r},s.autodetect.push({p:3,test:function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];if(e=Ae(e,"rgba"),"array"===Le(e)&&(3===e.length||4===e.length&&"number"==Le(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var Se=Math.log,De=function(t){var e,n,r,i=t/100;return i<66?(e=255,n=-155.25485562709179-.44596950469579133*(n=i-2)+104.49216199393888*Se(n),r=i<20?0:.8274096064007395*(r=i-10)-254.76935184120902+115.67994401066147*Se(r)):(e=351.97690566805693+.114206453784165*(e=i-55)-40.25366309332127*Se(e),n=325.4494125711974+.07943456536662342*(n=i-50)-28.0852963507957*Se(n),r=255),[e,n,r,1]},Ce=u.unpack,Ne=Math.round,Ee=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];for(var r,i=Ce(e,"rgb"),a=i[0],o=i[2],u=1e3,s=4e4,c=.4;s-u>c;){var l=De(r=.5*(s+u));l[2]/l[0]>=o/a?s=r:u=r}return Ne(r)};d.prototype.temp=d.prototype.kelvin=d.prototype.temperature=function(){return Ee(this._rgb)},g.temp=g.kelvin=g.temperature=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];return new(Function.prototype.bind.apply(d,[null].concat(e,["temp"])))},s.format.temp=s.format.kelvin=s.format.temperature=De;var Oe=u.type;d.prototype.alpha=function(t,e){return void 0===e&&(e=!1),void 0!==t&&"number"===Oe(t)?e?(this._rgb[3]=t,this):new d([this._rgb[0],this._rgb[1],this._rgb[2],t],"rgb"):this._rgb[3]},d.prototype.clipped=function(){return this._rgb._clipped||!1},d.prototype.darken=function(t){void 0===t&&(t=1);var e=this.lab();return e[0]-=Et*t,new d(e,"lab").alpha(this.alpha(),!0)},d.prototype.brighten=function(t){return void 0===t&&(t=1),this.darken(-t)},d.prototype.darker=d.prototype.darken,d.prototype.brighter=d.prototype.brighten,d.prototype.get=function(t){var e=t.split("."),n=e[0],r=e[1],i=this[n]();if(r){var a=n.indexOf(r);if(a>-1)return i[a];throw new Error("unknown channel "+r+" in mode "+n)}return i};var ze=u.type,Fe=Math.pow;d.prototype.luminance=function(t){if(void 0!==t&&"number"===ze(t)){if(0===t)return new d([0,0,0,this._rgb[3]],"rgb");if(1===t)return new d([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),n=20,r=function(e,i){var a=e.interpolate(i,.5,"rgb"),o=a.luminance();return Math.abs(t-o)<1e-7||!n--?a:o>t?r(e,a):r(a,i)},i=(e>t?r(new d([0,0,0]),this):r(this,new d([255,255,255]))).rgb();return new d(i.concat([this._rgb[3]]))}return je.apply(void 0,this._rgb.slice(0,3))};var je=function(t,e,n){return.2126*(t=Pe(t))+.7152*(e=Pe(e))+.0722*(n=Pe(n))},Pe=function(t){return(t/=255)<=.03928?t/12.92:Fe((t+.055)/1.055,2.4)},Re={},He=u.type,Ye=function(t,e,n){var r=arguments;void 0===n&&(n=.5);for(var i=[],a=arguments.length-3;a-- >0;)i[a]=r[a+3];var o=i[0]||"lrgb";if(Re[o]||i.length||(o=Object.keys(Re)[0]),!Re[o])throw new Error("interpolation mode "+o+" is not defined");return"object"!==He(t)&&(t=new d(t)),"object"!==He(e)&&(e=new d(e)),Re[o](t,e,n).alpha(t.alpha()+n*(e.alpha()-t.alpha()))};d.prototype.mix=d.prototype.interpolate=function(t,e){var n=arguments;void 0===e&&(e=.5);for(var r=[],i=arguments.length-2;i-- >0;)r[i]=n[i+2];return Ye.apply(void 0,[this,t,e].concat(r))},d.prototype.premultiply=function(t){void 0===t&&(t=!1);var e=this._rgb,n=e[3];return t?(this._rgb=[e[0]*n,e[1]*n,e[2]*n,n],this):new d([e[0]*n,e[1]*n,e[2]*n,n],"rgb")},d.prototype.saturate=function(t){void 0===t&&(t=1);var e=this.lch();return e[1]+=Et*t,e[1]<0&&(e[1]=0),new d(e,"lch").alpha(this.alpha(),!0)},d.prototype.desaturate=function(t){return void 0===t&&(t=1),this.saturate(-t)};var Be=u.type;d.prototype.set=function(t,e,n){void 0===n&&(n=!1);var r=t.split("."),i=r[0],a=r[1],o=this[i]();if(a){var u=i.indexOf(a);if(u>-1){if("string"==Be(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"!==Be(e))throw new Error("unsupported value for Color.set");o[u]=e}var s=new d(o,i);return n?(this._rgb=s._rgb,this):s}throw new Error("unknown channel "+a+" in mode "+i)}return o},Re.rgb=function(t,e,n){var r=t._rgb,i=e._rgb;return new d(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};var Ue=Math.sqrt,We=Math.pow;Re.lrgb=function(t,e,n){var r=t._rgb,i=r[0],a=r[1],o=r[2],u=e._rgb,s=u[0],c=u[1],l=u[2];return new d(Ue(We(i,2)*(1-n)+We(s,2)*n),Ue(We(a,2)*(1-n)+We(c,2)*n),Ue(We(o,2)*(1-n)+We(l,2)*n),"rgb")},Re.lab=function(t,e,n){var r=t.lab(),i=e.lab();return new d(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};var qe=function(t,e,n,r){var i,a,o,u,s,c,l,f,h,p,g,v;return"hsl"===r?(o=t.hsl(),u=e.hsl()):"hsv"===r?(o=t.hsv(),u=e.hsv()):"hcg"===r?(o=t.hcg(),u=e.hcg()):"hsi"===r?(o=t.hsi(),u=e.hsi()):"lch"!==r&&"hcl"!==r||(r="hcl",o=t.hcl(),u=e.hcl()),"h"===r.substr(0,1)&&(s=(i=o)[0],l=i[1],h=i[2],c=(a=u)[0],f=a[1],p=a[2]),isNaN(s)||isNaN(c)?isNaN(s)?isNaN(c)?v=Number.NaN:(v=c,1!=h&&0!=h||"hsv"==r||(g=f)):(v=s,1!=p&&0!=p||"hsv"==r||(g=l)):v=s+n*(c>s&&c-s>180?c-(s+360):c180?c+360-s:c-s),void 0===g&&(g=l+n*(f-l)),new d([v,g,h+n*(p-h)],r)},Ie=function(t,e,n){return qe(t,e,n,"lch")};Re.lch=Ie,Re.hcl=Ie,Re.num=function(t,e,n){var r=t.num(),i=e.num();return new d(r+n*(i-r),"num")},Re.hcg=function(t,e,n){return qe(t,e,n,"hcg")},Re.hsi=function(t,e,n){return qe(t,e,n,"hsi")},Re.hsl=function(t,e,n){return qe(t,e,n,"hsl")},Re.hsv=function(t,e,n){return qe(t,e,n,"hsv")};var Ge=u.clip_rgb,Xe=Math.pow,Ve=Math.sqrt,Ze=Math.PI,Ke=Math.cos,Je=Math.sin,Qe=Math.atan2,tn=function(t,e){for(var n=t.length,r=[0,0,0,0],i=0;i.9999999&&(r[3]=1),new d(Ge(r))},en=u.type,nn=Math.pow,rn=function(t){var e="rgb",n=g("#ccc"),r=0,i=[0,1],a=[],o=[0,0],u=!1,s=[],c=!1,l=0,f=1,h=!1,d={},p=!0,v=1,m=function(t){if((t=t||["#fff","#000"])&&"string"===en(t)&&g.brewer&&g.brewer[t.toLowerCase()]&&(t=g.brewer[t.toLowerCase()]),"array"===en(t)){1===t.length&&(t=[t[0],t[0]]),t=t.slice(0);for(var e=0;e2?function(t){if(null!=u){for(var e=u.length-1,n=0;n=u[n];)n++;return n-1}return 0}(t)/(u.length-2):f!==l?(t-l)/(f-l):1,c=b(c),r||(c=y(c)),1!==v&&(c=nn(c,v)),c=o[0]+c*(1-o[0]-o[1]),c=Math.min(1,Math.max(0,c));var h=Math.floor(1e4*c);if(p&&d[h])i=d[h];else{if("array"===en(s))for(var m=0;m=w&&m===a.length-1){i=s[m];break}if(c>w&&c2){var c=t.map((function(e,n){return n/(t.length-1)})),h=t.map((function(t){return(t-l)/(f-l)}));h.every((function(t,e){return c[e]===t}))||(b=function(t){if(t<=0||t>=1)return t;for(var e=0;t>=h[e+1];)e++;var n=(t-h[e])/(h[e+1]-h[e]);return c[e]+n*(c[e+1]-c[e])})}}return i=[l,f],_},_.mode=function(t){return arguments.length?(e=t,x(),_):e},_.range=function(t,e){return m(t),_},_.out=function(t){return c=t,_},_.spread=function(t){return arguments.length?(r=t,_):r},_.correctLightness=function(t){return null==t&&(t=!0),h=t,x(),y=h?function(t){for(var e=w(0,!0).lab()[0],n=w(1,!0).lab()[0],r=e>n,i=w(t,!0).lab()[0],a=e+(n-e)*t,o=i-a,u=0,s=1,c=20;Math.abs(o)>.01&&c-- >0;)r&&(o*=-1),o<0?(u=t,t+=.5*(s-t)):(s=t,t+=.5*(u-t)),i=w(t,!0).lab()[0],o=i-a;return t}:function(t){return t},_},_.padding=function(t){return null!=t?("number"===en(t)&&(t=[t,t]),o=t,_):o},_.colors=function(e,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=s.slice(0);else if(1===e)r=[_(.5)];else if(e>1){var a=i[0],o=i[1]-a;r=an(0,e,!1).map((function(t){return _(a+t/(e-1)*o)}))}else{t=[];var c=[];if(u&&u.length>2)for(var l=1,f=u.length,h=1<=f;h?lf;h?l++:l--)c.push(.5*(u[l-1]+u[l]));else c=i;r=c.map((function(t){return _(t)}))}return g[n]&&(r=r.map((function(t){return t[n]()}))),r},_.cache=function(t){return null!=t?(p=t,_):p},_.gamma=function(t){return null!=t?(v=t,_):v},_.nodata=function(t){return null!=t?(n=g(t),_):n},_};function an(t,e,n){for(var r=[],i=ta;i?o++:o--)r.push(o);return r}var on=function(t){var e,n,r,i,a,o,u;if(2===(t=t.map((function(t){return new d(t)}))).length)e=t.map((function(t){return t.lab()})),a=e[0],o=e[1],i=function(t){var e=[0,1,2].map((function(e){return a[e]+t*(o[e]-a[e])}));return new d(e,"lab")};else if(3===t.length)n=t.map((function(t){return t.lab()})),a=n[0],o=n[1],u=n[2],i=function(t){var e=[0,1,2].map((function(e){return(1-t)*(1-t)*a[e]+2*(1-t)*t*o[e]+t*t*u[e]}));return new d(e,"lab")};else if(4===t.length){var s;r=t.map((function(t){return t.lab()})),a=r[0],o=r[1],u=r[2],s=r[3],i=function(t){var e=[0,1,2].map((function(e){return(1-t)*(1-t)*(1-t)*a[e]+3*(1-t)*(1-t)*t*o[e]+3*(1-t)*t*t*u[e]+t*t*t*s[e]}));return new d(e,"lab")}}else if(5===t.length){var c=on(t.slice(0,3)),l=on(t.slice(2,5));i=function(t){return t<.5?c(2*t):l(2*(t-.5))}}return i},un=function(t,e,n){if(!un[n])throw new Error("unknown blend mode "+n);return un[n](t,e)},sn=function(t){return function(e,n){var r=g(n).rgb(),i=g(e).rgb();return g.rgb(t(r,i))}},cn=function(t){return function(e,n){var r=[];return r[0]=t(e[0],n[0]),r[1]=t(e[1],n[1]),r[2]=t(e[2],n[2]),r}};un.normal=sn(cn((function(t){return t}))),un.multiply=sn(cn((function(t,e){return t*e/255}))),un.screen=sn(cn((function(t,e){return 255*(1-(1-t/255)*(1-e/255))}))),un.overlay=sn(cn((function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))}))),un.darken=sn(cn((function(t,e){return t>e?e:t}))),un.lighten=sn(cn((function(t,e){return t>e?t:e}))),un.dodge=sn(cn((function(t,e){return 255===t||(t=e/255*255/(1-t/255))>255?255:t}))),un.burn=sn(cn((function(t,e){return 255*(1-(1-e/255)/(t/255))})));for(var ln=un,fn=u.type,hn=u.clip_rgb,dn=u.TWOPI,pn=Math.pow,gn=Math.sin,vn=Math.cos,mn=Math.floor,yn=Math.random,bn=Math.log,wn=Math.pow,xn=Math.floor,_n=Math.abs,Mn=function(t,e){void 0===e&&(e=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===a(t)&&(t=Object.values(t)),t.forEach((function(t){e&&"object"===a(t)&&(t=t[e]),null==t||isNaN(t)||(n.values.push(t),n.sum+=t,tn.max&&(n.max=t),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(t,e){return kn(n,t,e)},n},kn=function(t,e,n){void 0===e&&(e="equal"),void 0===n&&(n=7),"array"==a(t)&&(t=Mn(t));var r=t.min,i=t.max,o=t.values.sort((function(t,e){return t-e}));if(1===n)return[r,i];var u=[];if("c"===e.substr(0,1)&&(u.push(r),u.push(i)),"e"===e.substr(0,1)){u.push(r);for(var s=1;s 0");var c=Math.LOG10E*bn(r),l=Math.LOG10E*bn(i);u.push(r);for(var f=1;f200&&(w=!1)}for(var F={},j=0;j=360;)g-=360;o[p]=g}else o[p]=o[p]/u[p];return h/=r,new d(o,e).alpha(h>.99999?1:h,!0)},g.bezier=function(t){var e=on(t);return e.scale=function(){return rn(e)},e},g.blend=ln,g.cubehelix=function(t,e,n,r,i){void 0===t&&(t=300),void 0===e&&(e=-1.5),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=[0,1]);var a,o=0;"array"===fn(i)?a=i[1]-i[0]:(a=0,i=[i,i]);var u=function(u){var s=dn*((t+120)/360+e*u),c=pn(i[0]+a*u,r),l=(0!==o?n[0]+u*o:n)*c*(1-c)/2,f=vn(s),h=gn(s);return g(hn([255*(c+l*(-.14861*f+1.78277*h)),255*(c+l*(-.29227*f-.90649*h)),255*(c+l*(1.97294*f)),1]))};return u.start=function(e){return null==e?t:(t=e,u)},u.rotations=function(t){return null==t?e:(e=t,u)},u.gamma=function(t){return null==t?r:(r=t,u)},u.hue=function(t){return null==t?n:("array"===fn(n=t)?0==(o=n[1]-n[0])&&(n=n[1]):o=0,u)},u.lightness=function(t){return null==t?i:("array"===fn(t)?(i=t,a=t[1]-t[0]):(i=[t,t],a=0),u)},u.scale=function(){return g.scale(u)},u.hue(n),u},g.mix=g.interpolate=Ye,g.random=function(){for(var t="#",e=0;e<6;e++)t+="0123456789abcdef".charAt(mn(16*yn()));return new d(t,"hex")},g.scale=rn,g.analyze=$n.analyze,g.contrast=function(t,e){t=new d(t),e=new d(e);var n=t.luminance(),r=e.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},g.deltaE=function(t,e,n,r){void 0===n&&(n=1),void 0===r&&(r=1),t=new d(t),e=new d(e);for(var i=Array.from(t.lab()),a=i[0],o=i[1],u=i[2],s=Array.from(e.lab()),c=s[0],l=s[1],f=s[2],h=An(o*o+u*u),p=An(l*l+f*f),g=a<16?.511:.040975*a/(1+.01765*a),v=.0638*h/(1+.0131*h)+.638,m=h<1e-6?0:180*Ln(u,o)/Dn;m<0;)m+=360;for(;m>=360;)m-=360;var y=m>=164&&m<=345?.56+Tn(.2*Sn(Dn*(m+168)/180)):.36+Tn(.4*Sn(Dn*(m+35)/180)),b=h*h*h*h,w=An(b/(b+1900)),x=v*(w*y+1-w),_=h-p,M=o-l,k=u-f,$=(a-c)/(n*g),A=_/(r*v);return An($*$+A*A+(M*M+k*k-_*_)/(x*x))},g.distance=function(t,e,n){void 0===n&&(n="lab"),t=new d(t),e=new d(e);var r=t.get(n),i=e.get(n),a=0;for(var o in r){var u=(r[o]||0)-(i[o]||0);a+=u*u}return Math.sqrt(a)},g.limits=$n.limits,g.valid=function(){for(var t=arguments,e=[],n=arguments.length;n--;)e[n]=t[n];try{return new(Function.prototype.bind.apply(d,[null].concat(e))),!0}catch(t){return!1}},g.scales=Cn,g.colors=be,g.brewer=Fn,g}()}));function ye(t,e){if(!(e=Object.assign({},{tickPosition:"x"===t?"bottom":"left",gridLines:!0,tickLines:!1,tickLabels:!0,baseLine:["zero"],tickLabelsInside:!1,tickLabelFormat:"auto",tickLabelUnit:["",""],tickLabelMultiply:1,secondary:!1,className:!1,minusChar:"−",translate:function(t){return t}},e)).scale)throw new Error("you need to provide a D3 scale for the grid");if(!e.scaleType)throw new Error("you need to specify the scale type");if(!e.aboveChart||!e.belowChart)throw new Error("you need to provide container elements for the axis");if(!e.plotSize||!Nt(e.plotSize))throw new Error("you need to provide the plot size");if(!e.theme)throw new Error("you need to pass theme data");if(!Nt(e.tickLabelUnit)||2!==e.tickLabelUnit.length)throw new Error("tickLabelUnit must be an array of 2 strings (prepend/append)");e.baseLine&&"string"==typeof e.baseLine&&(e.baseLine=[e.baseLine]),e.baseLine&&"boolean"==typeof e.baseLine&&(e.baseLine=e.baseLine?["zero"]:[]),e.baseLine||(e.baseLine=[]);var n=new Set(["zero"].concat("x"===t?["left","right"]:["top","bottom"]));e.baseLine&&Nt(e.baseLine)&&(e.baseLine.forEach((function(t){if(!n.has(t))throw new Error("baseLine only accepts: "+Array.from(n).join(", "))})),e.baseLine=ae(e.baseLine)),e.aboveChart=we(e.aboveChart),e.belowChart=we(e.belowChart);var r=be("x"===t?"horizontal":"vertical",e);return yt(r,"tickLines.forceOn")&&e.gridLines&&!e.tickLines&&(e.tickLines=!0),{options:e,themeOpts:r}}function be(t,e){var n=e.theme,r=e.visId,i=e.secondary,a=yt(n,"style.chart.grid",{}),o=[yt(a,"general"),yt(a,t)];i?o.push(yt(a,"secondary")):o.push(yt(a,"primary"));var u=yt(n,"vis."+r+".grid",{});o.push(yt(u,"general")),o.push(yt(u,t)),i?o.push(yt(u,"secondary")):o.push(yt(u,"primary"));var s=o.reduce((function(t,e){return e?pe(t,e):t}),{});return function(t,e,n){var r=e.split("."),i=r.pop(),a=t;r.forEach((function(t){void 0!==a[t]&&null!==a[t]||(a[t]={}),a=a[t]})),JSON.stringify(a[i])!==JSON.stringify(n)&&(a[i]=n)}(s=pe(function(t,e,n){var r=n.secondary,i=(n.horizontal,yt(t,"colors.background","#ffffff")),a=function(t){var e=t.colors.chartContentBaseColor||(me.contrast(t.colors.background,"#000000")<5.5?"#f1f1f1":"#333333"),n={tickText:{secondary:yt(t,"colors.bgBlendRatios.tickText.secondary",me(t.colors.background).luminance()<.5?.6:.4),primary:yt(t,"colors.bgBlendRatios.tickText.primary",.2)},series:yt(t,"colors.bgBlendRatios.series",0),value:yt(t,"colors.bgBlendRatios.value",.2),axis:yt(t,"colors.bgBlendRatios.axis",0),gridline:yt(t,"colors.bgBlendRatios.gridline",.82)};return{tickText:{secondary:me.mix(e,t.colors.background,n.tickText.secondary).hex(),primary:me.mix(e,t.colors.background,n.tickText.primary).hex()},series:me.mix(e,t.colors.background,n.series).hex(),value:me.mix(e,t.colors.background,n.value).hex(),axis:me.mix(e,t.colors.background,n.axis).hex(),gridline:me.mix(e,t.colors.background,n.gridline).hex(),fallbackBaseColor:e}}(t),o=a.tickText,u=a.axis,s=a.gridline,c=yt(e,"gridLines.aboveChart");return{tickLines:{aboveChart:!0,color:r?s:u,width:1,length:5,lengthInside:20,distance:0},gridLines:{aboveChart:!1,major:{color:c?i:s,width:1},minor:{opacity:.5,width:1}},baseLine:{aboveChart:!0,color:u,width:1,strokeLinecap:"square"},tickLabels:{aboveChart:!0,color:o[r?"secondary":"primary"],distance:5}}}(n,s,{secondary:i,horizontal:"horizontal"===t}),s),"gridLines.minor",pe(yt(s,"gridLines.major",{}),yt(s,"gridLines.minor",{}))),s}function we(t){if((e=t)&&1===e.nodeType)return ct(t);if("function"==typeof t.node)return ct(t.node());var e;throw new Error("provided container element needs to be DOM element or D3 selection")}var xe=ve((function(t){ /*! @preserve * numeral.js * version : 2.0.6 * author : Adam Draper * license : MIT * http://adamwdraper.github.com/Numeral-js/ */ !function(e,n){t.exports?t.exports=n():e.numeral=n()}(ge,(function(){var t,e,n,r,i,a={},o={},u={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},s={currentLocale:u.currentLocale,zeroFormat:u.zeroFormat,nullFormat:u.nullFormat,defaultFormat:u.defaultFormat,scalePercentBy100:u.scalePercentBy100};function c(t,e){this._input=t,this._value=e}return(t=function(n){var r,i,o,u;if(t.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||e.isNaN(n))r=null;else if("string"==typeof n)if(s.zeroFormat&&n===s.zeroFormat)r=0;else if(s.nullFormat&&n===s.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(i in a)if((u="function"==typeof a[i].regexps.unformat?a[i].regexps.unformat():a[i].regexps.unformat)&&n.match(u)){o=a[i].unformat;break}r=(o=o||t._.stringToNumber)(n)}else r=Number(n)||null;return new c(n,r)}).version="2.0.6",t.isNumeral=function(t){return t instanceof c},t._=e={numberToFormat:function(e,n,r){var i,a,u,s,c,l,f,h,d=o[t.options.currentLocale],p=!1,g=!1,v="",m="",y=!1;if(e=e||0,u=Math.abs(e),t._.includes(n,"(")?(p=!0,n=n.replace(/[\(|\)]/g,"")):(t._.includes(n,"+")||t._.includes(n,"-"))&&(l=t._.includes(n,"+")?n.indexOf("+"):e<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),t._.includes(n,"a")&&(a=!!(a=n.match(/a(k|m|b|t)?/))&&a[1],t._.includes(n," a")&&(v=" "),n=n.replace(new RegExp(v+"a[kmbt]?"),""),u>=1e12&&!a||"t"===a?(v+=d.abbreviations.trillion,e/=1e12):u<1e12&&u>=1e9&&!a||"b"===a?(v+=d.abbreviations.billion,e/=1e9):u<1e9&&u>=1e6&&!a||"m"===a?(v+=d.abbreviations.million,e/=1e6):(u<1e6&&u>=1e3&&!a||"k"===a)&&(v+=d.abbreviations.thousand,e/=1e3)),t._.includes(n,"[.]")&&(g=!0,n=n.replace("[.]",".")),s=e.toString().split(".")[0],c=n.split(".")[1],f=n.indexOf(","),i=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,c?(t._.includes(c,"[")?(c=(c=c.replace("]","")).split("["),m=t._.toFixed(e,c[0].length+c[1].length,r,c[1].length)):m=t._.toFixed(e,c.length,r),s=m.split(".")[0],m=t._.includes(m,".")?d.delimiters.decimal+m.split(".")[1]:"",g&&0===Number(m.slice(1))&&(m="")):s=t._.toFixed(e,0,r),v&&!a&&Number(s)>=1e3&&v!==d.abbreviations.trillion)switch(s=String(Number(s)/1e3),v){case d.abbreviations.thousand:v=d.abbreviations.million;break;case d.abbreviations.million:v=d.abbreviations.billion;break;case d.abbreviations.billion:v=d.abbreviations.trillion}if(t._.includes(s,"-")&&(s=s.slice(1),y=!0),s.length0;b--)s="0"+s;return f>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),0===n.indexOf(".")&&(s=""),h=s+m+(v||""),p?h=(p&&y?"(":"")+h+(p&&y?")":""):l>=0?h=0===l?(y?"-":"+")+h:h+(y?"-":"+"):y&&(h="-"+h),h},stringToNumber:function(t){var e,n,r,i=o[s.currentLocale],a=t,u={thousand:3,million:6,billion:9,trillion:12};if(s.zeroFormat&&t===s.zeroFormat)n=0;else if(s.nullFormat&&t===s.nullFormat||!t.replace(/[^0-9]+/g,"").length)n=null;else{for(e in n=1,"."!==i.delimiters.decimal&&(t=t.replace(/\./g,"").replace(i.delimiters.decimal,".")),u)if(r=new RegExp("[^a-zA-Z]"+i.abbreviations[e]+"(?:\\)|(\\"+i.currency.symbol+")?(?:\\))?)?$"),a.match(r)){n*=Math.pow(10,u[e]);break}n*=(t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1,t=t.replace(/[^0-9\.]+/g,""),n*=Number(t)}return n},isNaN:function(t){return"number"==typeof t&&isNaN(t)},includes:function(t,e){return-1!==t.indexOf(e)},insert:function(t,e,n){return t.slice(0,n)+e+t.slice(n)},reduce:function(t,e){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var n,r=Object(t),i=r.length>>>0,a=0;if(3===arguments.length)n=arguments[2];else{for(;a=i)throw new TypeError("Reduce of empty array with no initial value");n=r[a++]}for(;ar?t:r}),1)},toFixed:function(t,e,n,r){var i,a,o,u,s=t.toString().split("."),c=e-(r||0);return i=2===s.length?Math.min(Math.max(s[1].length,c),e):c,o=Math.pow(10,i),u=(n(t+"e+"+i)/o).toFixed(i),r>e-i&&(a=new RegExp("\\.?0{1,"+(r-(e-i))+"}$"),u=u.replace(a,"")),u}},t.options=s,t.formats=a,t.locales=o,t.locale=function(t){return t&&(s.currentLocale=t.toLowerCase()),s.currentLocale},t.localeData=function(t){if(!t)return o[s.currentLocale];if(t=t.toLowerCase(),!o[t])throw new Error("Unknown locale : "+t);return o[t]},t.reset=function(){for(var t in u)s[t]=u[t]},t.zeroFormat=function(t){s.zeroFormat="string"==typeof t?t:null},t.nullFormat=function(t){s.nullFormat="string"==typeof t?t:null},t.defaultFormat=function(t){s.defaultFormat="string"==typeof t?t:"0.0"},t.register=function(t,e,n){if(e=e.toLowerCase(),this[t+"s"][e])throw new TypeError(e+" "+t+" already registered.");return this[t+"s"][e]=n,n},t.validate=function(e,n){var r,i,a,o,u,s,c,l;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",e)),(e=e.trim()).match(/^\d+$/))return!0;if(""===e)return!1;try{c=t.localeData(n)}catch(e){c=t.localeData(t.locale())}return a=c.currency.symbol,u=c.abbreviations,r=c.delimiters.decimal,i="."===c.delimiters.thousands?"\\.":c.delimiters.thousands,(null===(l=e.match(/^[^\d]+/))||(e=e.substr(1),l[0]===a))&&((null===(l=e.match(/[^\d]+$/))||(e=e.slice(0,-1),l[0]===u.thousand||l[0]===u.million||l[0]===u.billion||l[0]===u.trillion))&&(s=new RegExp(i+"{2}"),!e.match(/[^\d.,]/g)&&(!((o=e.split(r)).length>2)&&(o.length<2?!!o[0].match(/^\d+.*\d$/)&&!o[0].match(s):1===o[0].length?!!o[0].match(/^\d+$/)&&!o[0].match(s)&&!!o[1].match(/^\d+$/):!!o[0].match(/^\d+.*\d$/)&&!o[0].match(s)&&!!o[1].match(/^\d+$/)))))},t.fn=c.prototype={clone:function(){return t(this)},format:function(e,n){var r,i,o,u=this._value,c=e||s.defaultFormat;if(n=n||Math.round,0===u&&null!==s.zeroFormat)i=s.zeroFormat;else if(null===u&&null!==s.nullFormat)i=s.nullFormat;else{for(r in a)if(c.match(a[r].regexps.format)){o=a[r].format;break}i=(o=o||t._.numberToFormat)(u,c,n)}return i},value:function(){return this._value},input:function(){return this._input},set:function(t){return this._value=Number(t),this},add:function(t){var n=e.correctionFactor.call(null,this._value,t);return this._value=e.reduce([this._value,t],(function(t,e,r,i){return t+Math.round(n*e)}),0)/n,this},subtract:function(t){var n=e.correctionFactor.call(null,this._value,t);return this._value=e.reduce([t],(function(t,e,r,i){return t-Math.round(n*e)}),Math.round(this._value*n))/n,this},multiply:function(t){return this._value=e.reduce([this._value,t],(function(t,n,r,i){var a=e.correctionFactor(t,n);return Math.round(t*a)*Math.round(n*a)/Math.round(a*a)}),1),this},divide:function(t){return this._value=e.reduce([this._value,t],(function(t,n,r,i){var a=e.correctionFactor(t,n);return Math.round(t*a)/Math.round(n*a)})),this},difference:function(e){return Math.abs(t(this._value).subtract(e).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(t){var e=t%10;return 1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th"},currency:{symbol:"$"}}),t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(e,n,r){var i,a=t._.includes(n," BPS")?" ":"";return e*=1e4,n=n.replace(/\s?BPS/,""),i=t._.numberToFormat(e,n,r),t._.includes(i,")")?((i=i.split("")).splice(-1,0,a+"BPS"),i=i.join("")):i=i+a+"BPS",i},unformat:function(e){return+(1e-4*t._.stringToNumber(e)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},i="("+(i=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter((function(t){return n.suffixes.indexOf(t)<0}))).join("|")).replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(i)},format:function(e,i,a){var o,u,s,c=t._.includes(i,"ib")?r:n,l=t._.includes(i," b")||t._.includes(i," ib")?" ":"";for(i=i.replace(/\s?i?b/,""),o=0;o<=c.suffixes.length;o++)if(u=Math.pow(c.base,o),s=Math.pow(c.base,o+1),null===e||0===e||e>=u&&e0&&(e/=u);break}return t._.numberToFormat(e,i,a)+l},unformat:function(e){var i,a,o=t._.stringToNumber(e);if(o){for(i=n.suffixes.length-1;i>=0;i--){if(t._.includes(e,n.suffixes[i])){a=Math.pow(n.base,i);break}if(t._.includes(e,r.suffixes[i])){a=Math.pow(r.base,i);break}}o*=a||1}return o}}),t.register("format","currency",{regexps:{format:/(\$)/},format:function(e,n,r){var i,a,o=t.locales[t.options.currentLocale],u={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),i=t._.numberToFormat(e,n,r),e>=0?(u.before=u.before.replace(/[\-\(]/,""),u.after=u.after.replace(/[\-\)]/,"")):e<0&&!t._.includes(u.before,"-")&&!t._.includes(u.before,"(")&&(u.before="-"+u.before),a=0;a=0;a--)switch(u.after[a]){case"$":i=a===u.after.length-1?i+o.currency.symbol:t._.insert(i,o.currency.symbol,-(u.after.length-(1+a)));break;case" ":i=a===u.after.length-1?i+" ":t._.insert(i," ",-(u.after.length-(1+a)+o.currency.symbol.length-1))}return i}}),t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(e,n,r){var i=("number"!=typeof e||t._.isNaN(e)?"0e+0":e.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),t._.numberToFormat(Number(i[0]),n,r)+"e"+i[1]},unformat:function(e){var n=t._.includes(e,"e+")?e.split("e+"):e.split("e-"),r=Number(n[0]),i=Number(n[1]);return i=t._.includes(e,"e-")?i*=-1:i,t._.reduce([r,Math.pow(10,i)],(function(e,n,r,i){var a=t._.correctionFactor(e,n);return e*a*(n*a)/(a*a)}),1)}}),t.register("format","ordinal",{regexps:{format:/(o)/},format:function(e,n,r){var i=t.locales[t.options.currentLocale],a=t._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),a+=i.ordinal(e),t._.numberToFormat(e,n,r)+a}}),t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(e,n,r){var i,a=t._.includes(n," %")?" ":"";return t.options.scalePercentBy100&&(e*=100),n=n.replace(/\s?\%/,""),i=t._.numberToFormat(e,n,r),t._.includes(i,")")?((i=i.split("")).splice(-1,0,a+"%"),i=i.join("")):i=i+a+"%",i},unformat:function(e){var n=t._.stringToNumber(e);return t.options.scalePercentBy100?.01*n:n}}),t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(t,e,n){var r=Math.floor(t/60/60),i=Math.floor((t-60*r*60)/60),a=Math.round(t-60*r*60-60*i);return r+":"+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)},unformat:function(t){var e=t.split(":"),n=0;return 3===e.length?(n+=60*Number(e[0])*60,n+=60*Number(e[1]),n+=Number(e[2])):2===e.length&&(n+=60*Number(e[0]),n+=Number(e[1])),Number(n)}}),t}))}));var _e=new Set(["฿","₿","¢","$","€","eur","£","gbp","¥","yen","usd","cad","us$","ca$","can$"]),Me=Math.sqrt(50),ke=Math.sqrt(10),$e=Math.sqrt(2);function Ae(t,e,n){var r,i,a,o,u=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e=0?(a>=Me?10:a>=ke?5:a>=$e?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Me?10:a>=ke?5:a>=$e?2:1)}(t,e,n))||!isFinite(o))return[];if(o>0){var s=Math.round(t/o),c=Math.round(e/o);for(s*oe&&--c,a=new Array(i=c-s+1);++ue&&--f,a=new Array(i=f-l+1);++u=e?t:""+Array(e+1-r.length).join(n)+t},p={s:d,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+d(r,2,"0")+":"+d(i,2,"0")},m:function t(e,n){if(e.date()25){var a=i(this).startOf(e).add(1,e).date(r),o=i(this).endOf(t);if(a.isBefore(o))return 1}var u=i(this).startOf(e).date(r).startOf(t).subtract(1,"millisecond"),s=this.diff(u,t,!0);return s<0?i(this).startOf("week").week():Math.ceil(s)},a.weeks=function(t){return void 0===t&&(t=null),this.week(t)}}}()}));function Oe(t){var e=yt(t,"ticks.major",{}),n=yt(t,"ticks.minor",{}),r=e.values,i=t.scale.domain(),a=t.scale.range();r&&r.length||(r=function(t,e,n,r){var i=Math.round(r);switch(t){case"text":var a=e.domain(),o=Math.max(1,Math.round(a.length/r));return a.filter((function(t,e){return e%o==0}));case"log":var u=function(t,e){void 0===e&&(e=6);var n=t[0]<0&&t[1]<0;n&&(t=[-1*t[0],-1*t[1]]);var r=t[1]e)for(;a[0].num>e;)a=Fe(t,i*=10);else if(a[a.length-1].num=t[0]&&e<=t[1]}))})})).map((function(t){return Object.assign({},t,{diff:Math.abs(t.ticks.length-e)})})).sort((function(t,e){return t.diff-e.diff}))[0].ticks;r&&u.reverse();if(n)return u.map((function(t){return-1*t}));return u}(n,i);return u.length>1?u:e.ticks(i);default:return e.ticks(i)}}(t.scaleType,t.scale,i,Math.abs(a[1]-a[0])/(e.spacing||80)),"number"!==t.scaleType&&"log"!==t.scaleType||"0o"!==t.tickLabelFormat||(r=r.filter((function(t){return t%1==0})))),"text"!==t.scaleType&&(r=r.filter("date"===t.scaleType?function(t){return t.getTime()>=Math.min(i[0].getTime(),i[1].getTime())&&t.getTime()<=Math.max(i[0].getTime(),i[1].getTime())}:function(t){return t>=Math.min(i[0],i[1])&&t<=Math.max(i[0],i[1])}));var o=!!Nt(n.values)&&n.values;if(!o&&n.count){o=[];for(var u=function(t){var e=Math.min(r[t],r[t+1]),i=Math.max(r[t],r[t+1]),a=Ae(e,i,n.count).filter((function(t){return t>e&&t5&&t.line&&je.test(t.line)&&(this.innerHTML=t.line.substr(0,3)+"…")})),t=this.getBoundingClientRect(),e(r,t)?ct(this).style("display","none"):t.width>0&&t.height>0&&(r=t)):ct(this).style("display","none"):t.width>0&&t.height>0&&(r=t)}t.each((function(t,e){var n;n={measure:this.getBoundingClientRect.bind(this),update:i.bind(this)},Le.push(n),Te||(Te=!0,requestAnimationFrame(Se))}))}function Re(t,e,n,r){var i,a,o=t.scale,u=t.scaleType,s=t.tickLabelFormat,c=t.tickLabelUnit,l=t.tickLabelMultiply,f=t.minusChar;if(void 0===e&&(e=[]),void 0===r&&(r=!1),s&&"auto"!==s||("date"===u?s=Ye(o.domain(),e):"number"!==u&&"log"!==u||(i=o.domain(),a=Math.abs(i[1]-i[0]),s=a<1?"0,0.00[0]":a<3?"0,0.0[0]":a<1e4?"0,0.[0]":a>1e6||Math.abs(i[0])>1e5||Math.abs(i[1])>1e5?"0,0a":"0,0")),"number"===u||"log"===u){var h=yt(n,"tickLabels.units","all");return{multiFormat:!1,tickFormat:function(t,e,n){var i=r||"all"===h||"first"===h&&e||"last"===h&&n;return function(t,e){var n=(e=Object.assign({},{format:"0.[00]",prepend:"",append:"",minusChar:"−",multiply:1},e)).format,r=e.append,i=e.prepend,a=e.minusChar,o=e.multiply;n.includes("%")&&Number.isFinite(t)&&(t*=.01),t*=o;var u=n.indexOf("(")>-1,s=xe(u?t:Math.abs(t)).format(n);return i&&!u&&t<0&&_e.has(i.trim().toLowerCase())?""+a+i+s.replace("+","")+r:i&&t>=0&&_e.has(i.trim().toLowerCase())&&n.includes("+")?(0===t?"±":"+")+i+s.replace("+","")+r:0===t&&n.includes("+")?""+i+s.replace("+","±")+r:t<0&&!u?""+i+a+s.replace("+","")+r:""+i+s+r}(t,{multiply:l,format:i?s:s.replace(/[%$]/g,""),prepend:i?c[0]:"",append:i?c[1]:"",minusChar:f})}}}if("date"===u){var d;if(r&&(s=s.replace(/\w+/g,(function(t){return He[t]||t}))),s.indexOf("~~")>-1){var p=s.split("~~");d=function(t){return De(t).format(p[0])},s=p[1]}var g=s.split("|"),v=g.length>1,m=v?function(t,e){var n=new Array(t.length);return t=t.filter((function(t,n){return!n||ae(e.map(t)).length>1})),function(e){for(var r,i=[],a=0,o=t.length;a|)/i)}}}var He={YY:"YYYY",M:"MMMM",MM:"MMMM",MMM:"MMMM",DD:"D",dd:"dddd",ddd:"dddd"};function Ye(t,e){var n=Math.abs(t[1].getTime()-t[0].getTime()),r=e&&e.length>0,i=r,a=r,o=r,u=r,s=r,c=r;return r&&e.forEach((function(t){i=i&&0===t.getMonth()&&1===t.getDate()&&0===t.getHours()&&0===t.getMinutes(),a=a&&qe.has(t.getMonth())&&1===t.getDate()&&0===t.getHours()&&0===t.getMinutes(),o=o&&1===t.getDate()&&0===t.getHours()&&0===t.getMinutes(),u=u&&0===t.getDay()&&0===t.getHours()&&0===t.getMinutes(),s=s&&0===t.getHours()&&0===t.getMinutes(),c=c&&0===t.getMinutes()})),i?"YYYY":a||o?n>5*We?"YY|MMM":"YYYY|MMM":u?n>2*Ue?"MMM|D":"MMMM|D":s?n>We?"MMM YYYY|D":n>Ue?"MMM|D":"D.M.":c?ns[c]&&(s[c]=e.height),e&&e.left>s.left&&(s.left=e.left),e&&e.right>s.right&&(s.right=e.right)})),s}function tn(t){var e=t.options,n=t.themeOpts,r=t.ticksMajor,i=e.tickPosition,a=e.plotSize,o=e.scale,u=e.tickLines,s=e.aboveChart,c=e.belowChart,l=e.className,f=(yt(n,"tickLines.aboveChart")?s:c).selectAppend("g.x-tick-lines"+(l?"."+l:"")).html("").translate("bottom"===i?[0,a[1]]:[0,0]);if(!u)return f.remove();f.node().classList.add(Xe(n,e.emotion)),f.selectAll("line").remove();var h="bottom"===i?1:-1,d=yt(n,"tickLines.distance"),p=yt(n,"tickLines.length"),g=yt(n,"tickLines.strokeLinecap"),v=yt(n,"tickLines.width");return f.appendMany("line.x-tick-line",r).translate((function(t){return[o(t),d*h]})).classed("is-zero",(function(t){return 0===t})).attr("y1",(function(t){return p*h})),{left:.5*v,right:.5*v,height:d+p+("square"===g||"round"===g?.5*v:0)}}function en(t){var e=t.options,n=t.themeOpts,r=t.ticksMajor,i=e.tickPosition,a=e.plotSize,o=e.scale,u=e.tickLines,s=e.tickLabels,c=e.aboveChart,l=e.belowChart,f=e.className,h=e.theme,d=(yt(n,"tickLabels.aboveChart")?c:l).selectAppend("g.x-tick-labels"+(f?"."+f:"")).html("");if(!s)return d.remove();d.node().classList.add(function(t,e){var n=t.tickLabels;return(0,e.css)("\n text {\n text-anchor: middle;\n }\n "+(n.hideZero?"text.is-zero { display: none }":"")+"\n text tspan {\n "+Ke(n)+"\n }\n")}(n,e.emotion)),d.selectAll("text").remove();var p=(u?yt(n,"tickLines.distance")+yt(n,"tickLines.length"):0)+yt(n,"tickLabels.distance");d.translate("bottom"===i?[0,a[1]+p]:[0,-p-3]);var g=yt(n,"tickLabels.fontSize",yt(h,"typography.chart.fontSize",12)),v=Re(e,r=r.sort((function(t,e){return o(t)-o(e)})),n),m=v.tickFormat,y=v.multiFormat,b=v.keepOrder;Ie(d,"x",e,n,r),Pe(d.appendMany("text.x-tick-label."+i,r).translate((function(t){return[o(t),"bottom"===i?g:0]})).attr("y",0).attr("aria-hidden","true").classed("dw-bold","bold"===yt(n,"tickLabels.fontWeight")).classed("dw-italic","italic"===yt(n,"tickLabels.fontStyle")).classed("is-zero",(function(t){return 0===t})).tspans((function(t,e){var n=0===e,a=e===r.length-1,o=y?m(t,n,a):[m(t,n,a)];return b||"top"!==i||o.reverse(),o}),g+3).parent().attr("y",(function(t,e,n){var r=ct(n[0]).selectAll("tspan").size();return"top"===i?(r-1)*(g+3)*-1:0})),(function(t,e){return t.x+t.width+4>e.x}),!0);var w=d.node().getBBox(),x=Math.max(-1*w.x,0);return{left:x,right:w.width+(x>0?0:w.x)-e.plotSize[0]-x,height:d.node().getBoundingClientRect().height+p+yt(n,"tickLabels.extraSpace",1)}}function nn(t){var e=t.options,n=t.themeOpts,r=t.ticksMajor,i=t.ticksMinor,a=e.plotSize,o=e.scale,u=e.baseLine,s=e.gridLines,c=e.aboveChart,l=e.belowChart,f=e.className,h=(yt(n,"gridLines.aboveChart")?c:l).selectAppend("g.x-grid-lines"+(f?"."+f:"")).html("");if(!s)return h.remove();h.node().classList.add(Ge(n,e.emotion)),h.selectAll("line").remove(),i.length&&h.appendMany("line.x-grid-line.minor",i).translate((function(t){return[o(t),0]})).attr("y1",a[1]),r.length&&h.appendMany("line.x-grid-line.major",r.filter((function(t){return!u.includes("zero")||0!==t}))).translate((function(t){return[o(t),0]})).attr("y1",a[1])}function rn(t){var e=t.options,n=t.themeOpts,r=t.ticksMajor,i=e.plotSize,a=e.scale,o=e.scaleType,u=e.aboveChart,s=e.belowChart,c=e.baseLine,l=e.className,f=(yt(n,"baseLine.aboveChart")?u:s).selectAppend("g.x-base-lines"+(l?"."+l:"")).html("");f.node().classList.add(Ve(n,e.emotion)),f.selectAll("line").remove();var h=!1;if(["number","log"].includes(o)&&c.includes("zero")&&!r.includes(0)){var d=e.scale.domain(),p=d[0],g=d[1];Math.min(p,g)<=0&&Math.max(p,g)>=0&&(h=!0)}f.appendMany("line",c.filter((function(t){return"zero"!==t||r.includes(0)||h}))).translate((function(t){return["zero"===t?a(0):"left"===t?0:i[0],0]})).attr("y1",i[1]);var v=yt(n,"baseLine.width");return{left:c.includes("left")?v:0,right:c.includes("right")?v:0}}function an(t){var e=t.options,n=t.themeOpts,r=t.ticksMajor,i=e.tickPosition,a=e.plotSize,o=e.scale,u=e.tickLines,s=e.aboveChart,c=e.belowChart,l=e.className,f=e.tickLabelsInside,h=(yt(n,"tickLines.aboveChart")?s:c).selectAppend("g.y-tick-lines"+(l?"."+l:"")).html("").translate("right"===i?[a[0],0]:[0,0]);if(!u)return h.remove();h.node().classList.add(Xe(n,e.emotion)),h.selectAll("line").remove();var d="right"===i?1:-1,p=yt(n,"tickLines.length"+(f?"Inside":""),yt(n,"tickLines.length")),g=f?-p:yt(n,"tickLines.distance"),v=yt(n,"tickLines.strokeLinecap"),m=yt(n,"tickLines.width");return h.appendMany("line.y-tick-line",r).classed("is-zero",(function(t){return 0===t})).translate((function(t){return[g*d,o(t)]})).attr("x2",(function(t){return p*d})),{top:.5*m,bottom:.5*m,width:g+p+("square"===v||"round"===v?.5*m:0)}}function on(t){var e=t.options,n=t.themeOpts,r=t.ticksMajor,i=e.tickPosition,a=e.plotSize,o=e.scale,u=e.tickLines,s=e.tickLabels,c=e.aboveChart,l=e.belowChart,f=e.className,h=e.tickLabelsInside,d=e.theme,p=(yt(n,"tickLabels.aboveChart")?c:l).selectAppend("g.y-tick-labels"+(f?"."+f:"")).html("");if(p.selectAll("text").remove(),!s)return p.remove();p.node().classList.add(function(t,e){var n=t.tickLabels;return(0,e.css)("\n text {}\n "+(n.hideZero?"text.is-zero { display: none }":"")+"\n text tspan {\n "+Ke(n)+"\n }\n text.right {\n text-anchor: start;\n }\n text.right.inside {\n text-anchor: end;\n }\n text.left {\n text-anchor: end;\n }\n text.left.inside {\n text-anchor: start;\n }\n")}(n,e.emotion));var g=h?0:(u?yt(n,"tickLines.distance")+yt(n,"tickLines.length"):0)+yt(n,"tickLabels.distance");p.translate("right"===i?[a[0]+g,0]:[-g,0]);var v=yt(n,"tickLabels.fontSize",yt(d,"typography.chart.fontSize",12)),m=Re(e,r=r.sort((function(t,e){return o(e)-o(t)})),n),y=m.tickFormat,b=m.multiFormat,w=m.keepOrder,x=n.tickLabels.hideZero&&0===r[r.length-1],_=n.tickLabels.hideZero&&0===r[0];Ie(p,"y",e,n,r),Pe(p.appendMany("text.y-tick-label."+i,r).classed("inside",!!h).attr("aria-hidden",!0).translate((function(t){return[0,o(t)+Math.floor(v*(h?0:.4))-(h?5:0)]})).classed("dw-bold","bold"===yt(n,"tickLabels.fontWeight")).classed("dw-italic","italic"===yt(n,"tickLabels.fontStyle")).classed("is-zero",(function(t){return 0===t})).tspans((function(t,e){var n=e===(_?1:0),a=e===r.length-(x?2:1),o=b?y(t,a,n):[y(t,a,n)];return w||"top"!==i||o.reverse(),o}),v+3).attr("x","left"===i&&h?0:-1).parent().attr("y",(function(t,e,n){var r=ct(n[0]).selectAll("tspan").size();return h?(r-1)*(v+3)*-1:(r-1)*(v+3)*-.5})),(function(t,e){return t.y0?0:M.y)-e.plotSize[1]-k,A=p.node().getBoundingClientRect().width;return{top:k,bottom:$,width:h?0:A+g+yt(n,"tickLabels.extraSpace",1),labelWidth:h?A:0}}function un(t){var e=t.options,n=t.themeOpts,r=t.ticksMajor,i=t.ticksMinor,a=e.plotSize,o=e.scale,u=e.baseLine,s=e.gridLines,c=e.aboveChart,l=e.belowChart,f=e.className,h=(yt(n,"gridLines.aboveChart")?c:l).selectAppend("g.y-grid-lines"+(f?"."+f:"")).html("");if(!s)return h.remove();h.node().classList.add(Ge(n,e.emotion)),h.selectAll("line").remove(),i.length&&h.appendMany("line.y-grid-line.minor",i).translate((function(t){return[0,o(t)]})).attr("x2",a[0]),r.length&&h.appendMany("line.y-grid-line.major",r.filter((function(t){return!u.includes("zero")||0!==t}))).translate((function(t){return[0,o(t)]})).attr("x2",a[0])}function sn(t){var e=t.options,n=t.themeOpts,r=t.ticksMajor,i=e.plotSize,a=e.scale,o=e.scaleType,u=e.aboveChart,s=e.belowChart,c=e.baseLine,l=e.className,f=(yt(n,"baseLine.aboveChart")?u:s).selectAppend("g.y-base-lines"+(l?"."+l:"")).html("");f.node().classList.add(Ve(n,e.emotion)),f.selectAll("line").remove();var h=!1;if(["number","log"].includes(o)&&c.includes("zero")&&!r.includes(0)){var d=e.scale.domain(),p=d[0],g=d[1];Math.min(p,g)<=0&&Math.max(p,g)>=0&&(h=!0)}f.appendMany("line",c.filter((function(t){return"zero"!==t||r.includes(0)||h}))).translate((function(t){return[0,"zero"===t?a(0):"top"===t?0:i[1]]})).attr("x1",i[0]);var v=yt(n,"baseLine.width");return{top:c.includes("top")?v:0,bottom:c.includes("bottom")?v:0}}var cn=!1;function ln(t){t.numeral&&function(t){cn||(xe.register("locale","dw",t),xe.locale("dw"),cn=!0)}(t.numeral),t.dayjs&&"en"!==t.dayjs.name&&De.locale(t.dayjs)}function fn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function hn(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function dn(){}var pn="\\s*([+-]?\\d+)\\s*",gn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",vn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",mn=/^#([0-9a-f]{3,8})$/,yn=new RegExp("^rgb\\("+[pn,pn,pn]+"\\)$"),bn=new RegExp("^rgb\\("+[vn,vn,vn]+"\\)$"),wn=new RegExp("^rgba\\("+[pn,pn,pn,gn]+"\\)$"),xn=new RegExp("^rgba\\("+[vn,vn,vn,gn]+"\\)$"),_n=new RegExp("^hsl\\("+[gn,vn,vn]+"\\)$"),Mn=new RegExp("^hsla\\("+[gn,vn,vn,gn]+"\\)$"),kn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $n(){return this.rgb().formatHex()}function An(){return this.rgb().formatRgb()}function Ln(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=mn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Tn(e):3===n?new Nn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Sn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Sn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=yn.exec(t))?new Nn(e[1],e[2],e[3],1):(e=bn.exec(t))?new Nn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=wn.exec(t))?Sn(e[1],e[2],e[3],e[4]):(e=xn.exec(t))?Sn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=_n.exec(t))?Fn(e[1],e[2]/100,e[3]/100,1):(e=Mn.exec(t))?Fn(e[1],e[2]/100,e[3]/100,e[4]):kn.hasOwnProperty(t)?Tn(kn[t]):"transparent"===t?new Nn(NaN,NaN,NaN,0):null}function Tn(t){return new Nn(t>>16&255,t>>8&255,255&t,1)}function Sn(t,e,n,r){return r<=0&&(t=e=n=NaN),new Nn(t,e,n,r)}function Dn(t){return t instanceof dn||(t=Ln(t)),t?new Nn((t=t.rgb()).r,t.g,t.b,t.opacity):new Nn}function Cn(t,e,n,r){return 1===arguments.length?Dn(t):new Nn(t,e,n,null==r?1:r)}function Nn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function En(){return"#"+zn(this.r)+zn(this.g)+zn(this.b)}function On(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function zn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Fn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Pn(t,e,n,r)}function jn(t){if(t instanceof Pn)return new Pn(t.h,t.s,t.l,t.opacity);if(t instanceof dn||(t=Ln(t)),!t)return new Pn;if(t instanceof Pn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,u=a-i,s=(a+i)/2;return u?(o=e===a?(n-r)/u+6*(n0&&s<1?0:o,new Pn(o,u,s,t.opacity)}function Pn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Rn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}fn(dn,Ln,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:$n,formatHex:$n,formatHsl:function(){return jn(this).formatHsl()},formatRgb:An,toString:An}),fn(Nn,Cn,hn(dn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Nn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Nn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:En,formatHex:En,formatRgb:On,toString:On})),fn(Pn,(function(t,e,n,r){return 1===arguments.length?jn(t):new Pn(t,e,n,null==r?1:r)}),hn(dn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Pn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Pn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Nn(Rn(t>=240?t-240:t+120,i,r),Rn(t,i,r),Rn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Hn=Math.PI/180,Yn=180/Math.PI,Bn=6/29,Un=3*Bn*Bn;function Wn(t){if(t instanceof In)return new In(t.l,t.a,t.b,t.opacity);if(t instanceof Jn)return Qn(t);t instanceof Nn||(t=Dn(t));var e,n,r=Zn(t.r),i=Zn(t.g),a=Zn(t.b),o=Gn((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Gn((.4360747*r+.3850649*i+.1430804*a)/.96422),n=Gn((.0139322*r+.0971045*i+.7141733*a)/.82521)),new In(116*o-16,500*(e-o),200*(o-n),t.opacity)}function qn(t,e,n,r){return 1===arguments.length?Wn(t):new In(t,e,n,null==r?1:r)}function In(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Gn(t){return t>.008856451679035631?Math.pow(t,1/3):t/Un+4/29}function Xn(t){return t>Bn?t*t*t:Un*(t-4/29)}function Vn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Zn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Kn(t){if(t instanceof Jn)return new Jn(t.h,t.c,t.l,t.opacity);if(t instanceof In||(t=Wn(t)),0===t.a&&0===t.b)return new Jn(NaN,0a&&(i=e.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:mr(n,r)})),a=wr.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:mr(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,u,s),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:mr(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,u,s),function(t,e,n,r,a,o){if(t!==n||e!==r){var u=a.push(i(a)+"scale(",null,",",null,")");o.push({i:u-4,x:mr(t,n)},{i:u-2,x:mr(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,u,s),a=o=null,function(t){for(var e,n=-1,r=s.length;++nMath.abs(i.l-e)?i.l-e:t}),100);s=s.map((function(t){return t+c}))}return(s=s.map((function(t){return qn(t,i.a,i.b)}))).map((function(t){return t.hex()}))}function zr(t,e){void 0===t&&(t=new Error("cant create getColor function without theme")),void 0===e&&(e={});var n=e.selectedColor;void 0===n&&(n=0);var r=e.customColors;void 0===r&&(r={});var i=e.keys;void 0===i&&(i=[]);var a=e.permute,o=e.includeBaseColor;void 0===o&&(o=!0);var u=e.lightnessRange;void 0===u&&(u=[30,90]);var s=e.positiveColor;void 0===s&&(s=!1);var c=e.negativeColor;void 0===c&&(c=!1);var l=e.neutralColor;void 0===l&&(l=!1);var f=t.colors.palette;n=isNaN(n)?n:f[n%f.length];var h=i.length-Object.keys(r).filter((function(t){return""!==r[t].toString()&&i.includes(t)})).length,d=[];if(r&&Object.keys(r).length){var p={};Object.keys(r).forEach((function(t){String(r[t]).length&&(p[t]=isNaN(r[t])?r[t]:f[r[t]])})),Object.keys(p).length&&d.push(Fr(p))}(s||c||l)&&d.push(jr(s?t.colors.positive:n,c?t.colors.negative:n,l?t.colors.neutral:s?t.colors.positive:n));var g=t.colors.mode;if(g&&h>0&&(g.rotateLimit>=h?d.push(Pr(f,n)):g.shades&&g.shades[n]&&d.push(Rr(g.shades[n],h))),h>0){a=void 0===a?h>4:a;var v=Or(n,h,o,u=h<=3?[30,60]:u);a&&(v=function(t){t.reverse();var e=t.length;if(e<3)return t.slice(0);var n=0,r=-2,i=[],a={},o=Math.ceil(e/2.5);do{!a[n%=e]&&(e<5||Math.abs(r-n)>1)?(i.push(t[n]),a[n]=!0,r=n,n+=o):n+=1}while(i.length0?t:r.value<0?e:n}},Pr=function(t,e){return function(n){return t[(Math.max(0,t.indexOf(e))+n.i)%t.length]}},Rr=function(t,e){return function(n){if("string"!=typeof t[0]){t.sort((function(t,e){return t.length-e.length}));var r=t.length-1;return t.forEach((function(t,n){e>(t[n-1]||[]).length&&e<=t.length&&(r=n)})),t[r][n.i%t[r].length]}return t[n.i%t.length]}},Hr=function(t){var e=0,n=[];return function(r){return n[r.i]?n[r.i]:e!==t.length?n[r.i]=t[e++]:null}};function Yr(t,e){return te?1:t>=e?0:NaN}function Br(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Yr(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}var Ur=Br(Yr).right;function Wr(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o=n)for(r=i=n;++on&&(r=n),i=n)for(r=i=n;++on&&(r=n),i=0?(a>=Ir?10:a>=Gr?5:a>=Xr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Ir?10:a>=Gr?5:a>=Xr?2:1)}function Zr(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Ir?i*=10:a>=Gr?i*=5:a>=Xr&&(i*=2),er&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function ci(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i2?li:ci,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),u,s)))(t(c(e)))}return f.invert=function(n){return c(e((a||(a=r(u,o.map(t),mr)))(n)))},f.domain=function(t){return arguments.length?(o=Qr.call(t,ii),c===oi||(c=si(o)),l()):o.slice()},f.range=function(t){return arguments.length?(u=ti.call(t),l()):u.slice()},f.rangeRound=function(t){return u=ti.call(t),s=Mr,l()},f.clamp=function(t){return arguments.length?(c=t?si(o):oi,f):c!==oi},f.interpolate=function(t){return arguments.length?(s=t,l()):s},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,l()}}()(t,e)}function di(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function pi(t){return(t=di(Math.abs(t)))?t[1]:NaN}var gi,vi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mi(t){if(!(e=vi.exec(t)))throw new Error("invalid format: "+t);var e;return new yi({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function yi(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function bi(t,e){var n=di(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}mi.prototype=yi.prototype,yi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var wi={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return bi(100*t,e)},r:bi,s:function(t,e){var n=di(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(gi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+di(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function xi(t){return t}var _i,Mi,ki,$i=Array.prototype.map,Ai=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Li(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?xi:(e=$i.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),a.push(t.substring(i-=u,i+u)),!((s+=u+1)>r));)u=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?xi:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}($i.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=mi(t)).fill,n=t.align,f=t.sign,h=t.symbol,d=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):wi[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===h?a:/[%p]/.test(y)?s:"",x=wi[y],_=/[defgprs%]/.test(y);function M(t){var i,a,s,h=b,M=w;if("c"===y)M=x(t)+M,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:x(Math.abs(t),v),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==f&&(k=!1),h=(k?"("===f?f:c:"-"===f||"("===f?"":f)+h,M=("s"===y?Ai[8+gi/3]:"")+M+(k&&"("===f?")":""),_)for(i=-1,a=t.length;++i(s=t.charCodeAt(i))||s>57){M=(46===s?o+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var $=h.length+t.length+M.length,A=$>1)+h+t+M+A.slice($);break;default:t=A+h+t+M}return u(t)}return v=void 0===v?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),M.toString=function(){return t+""},M}return{format:f,formatPrefix:function(t,e){var n=f(((t=mi(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(pi(e)/3))),i=Math.pow(10,-r),a=Ai[8+r/3];return function(t){return n(i*t)+a}}}}function Ti(t,e,n,r){var i,a=Zr(t,e,n);switch((r=mi(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(pi(e)/3)))-pi(Math.abs(t)))}(a,o))||(r.precision=i),ki(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,pi(e)-pi(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-pi(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Mi(r)}function Si(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,a,o,u=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++u0?r=Vr(u=Math.floor(u/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=Vr(u=Math.ceil(u*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[a]=Math.floor(u/r)*r,i[o]=Math.ceil(s/r)*r,e(i)):r<0&&(i[a]=Math.ceil(u*r)/r,i[o]=Math.floor(s*r)/r,e(i)),t},t}function Di(){var t=hi(oi,oi);return t.copy=function(){return fi(t,Di())},Kr.apply(t,arguments),Si(t)}_i=Li({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Mi=_i.format,ki=_i.formatPrefix;var Ci=new Date,Ni=new Date;function Ei(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return u;do{u.push(o=new Date(+n)),e(n,a),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Ci.setTime(+e),Ni.setTime(+r),t(Ci),t(Ni),Math.floor(n(Ci,Ni))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Oi=Ei((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Oi.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ei((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Oi:null};var zi=Ei((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),Fi=Ei((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),ji=Ei((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),Pi=Ei((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}));function Ri(t){return Ei((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Hi=Ri(0),Yi=Ri(1),Bi=(Ri(2),Ri(3),Ri(4)),Ui=(Ri(5),Ri(6),Ei((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),Wi=Ei((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Wi.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ei((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};Ei((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),Ei((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}));var qi=Ei((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}));function Ii(t){return Ei((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var Gi=Ii(0),Xi=Ii(1),Vi=(Ii(2),Ii(3),Ii(4)),Zi=(Ii(5),Ii(6),Ei((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Ei((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));function Ki(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Ji(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Qi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Zi.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ei((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var ta,ea,na,ra,ia={"-":"",_:" ",0:"0"},aa=/^\s*\d+/,oa=/^%/,ua=/[\\^$*+?|[\]().{}]/g;function sa(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function ba(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function wa(t,e,n){var r=aa.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function xa(t,e,n){var r=aa.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function _a(t,e,n){var r=aa.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ma(t,e,n){var r=aa.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ka(t,e,n){var r=aa.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function $a(t,e,n){var r=aa.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Aa(t,e,n){var r=aa.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function La(t,e,n){var r=aa.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ta(t,e,n){var r=aa.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Sa(t,e,n){var r=oa.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Da(t,e,n){var r=aa.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ca(t,e,n){var r=aa.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Na(t,e){return sa(t.getDate(),e,2)}function Ea(t,e){return sa(t.getHours(),e,2)}function Oa(t,e){return sa(t.getHours()%12||12,e,2)}function za(t,e){return sa(1+Pi.count(Wi(t),t),e,3)}function Fa(t,e){return sa(t.getMilliseconds(),e,3)}function ja(t,e){return Fa(t,e)+"000"}function Pa(t,e){return sa(t.getMonth()+1,e,2)}function Ra(t,e){return sa(t.getMinutes(),e,2)}function Ha(t,e){return sa(t.getSeconds(),e,2)}function Ya(t){var e=t.getDay();return 0===e?7:e}function Ba(t,e){return sa(Hi.count(Wi(t)-1,t),e,2)}function Ua(t){var e=t.getDay();return e>=4||0===e?Bi(t):Bi.ceil(t)}function Wa(t,e){return t=Ua(t),sa(Bi.count(Wi(t),t)+(4===Wi(t).getDay()),e,2)}function qa(t){return t.getDay()}function Ia(t,e){return sa(Yi.count(Wi(t)-1,t),e,2)}function Ga(t,e){return sa(t.getFullYear()%100,e,2)}function Xa(t,e){return sa((t=Ua(t)).getFullYear()%100,e,2)}function Va(t,e){return sa(t.getFullYear()%1e4,e,4)}function Za(t,e){var n=t.getDay();return sa((t=n>=4||0===n?Bi(t):Bi.ceil(t)).getFullYear()%1e4,e,4)}function Ka(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+sa(e/60|0,"0",2)+sa(e%60,"0",2)}function Ja(t,e){return sa(t.getUTCDate(),e,2)}function Qa(t,e){return sa(t.getUTCHours(),e,2)}function to(t,e){return sa(t.getUTCHours()%12||12,e,2)}function eo(t,e){return sa(1+qi.count(Zi(t),t),e,3)}function no(t,e){return sa(t.getUTCMilliseconds(),e,3)}function ro(t,e){return no(t,e)+"000"}function io(t,e){return sa(t.getUTCMonth()+1,e,2)}function ao(t,e){return sa(t.getUTCMinutes(),e,2)}function oo(t,e){return sa(t.getUTCSeconds(),e,2)}function uo(t){var e=t.getUTCDay();return 0===e?7:e}function so(t,e){return sa(Gi.count(Zi(t)-1,t),e,2)}function co(t){var e=t.getUTCDay();return e>=4||0===e?Vi(t):Vi.ceil(t)}function lo(t,e){return t=co(t),sa(Vi.count(Zi(t),t)+(4===Zi(t).getUTCDay()),e,2)}function fo(t){return t.getUTCDay()}function ho(t,e){return sa(Xi.count(Zi(t)-1,t),e,2)}function po(t,e){return sa(t.getUTCFullYear()%100,e,2)}function go(t,e){return sa((t=co(t)).getUTCFullYear()%100,e,2)}function vo(t,e){return sa(t.getUTCFullYear()%1e4,e,4)}function mo(t,e){var n=t.getUTCDay();return sa((t=n>=4||0===n?Vi(t):Vi.ceil(t)).getUTCFullYear()%1e4,e,4)}function yo(){return"+0000"}function bo(){return"%"}function wo(t){return+t}function xo(t){return Math.floor(+t/1e3)}!function(t){ta=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,u=t.months,s=t.shortMonths,c=la(i),l=fa(i),f=la(a),h=fa(a),d=la(o),p=fa(o),g=la(u),v=fa(u),m=la(s),y=fa(s),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Na,e:Na,f:ja,g:Xa,G:Za,H:Ea,I:Oa,j:za,L:Fa,m:Pa,M:Ra,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:wo,s:xo,S:Ha,u:Ya,U:Ba,V:Wa,w:qa,W:Ia,x:null,X:null,y:Ga,Y:Va,Z:Ka,"%":bo},w={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:Ja,e:Ja,f:ro,g:go,G:mo,H:Qa,I:to,j:eo,L:no,m:io,M:ao,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:wo,s:xo,S:oo,u:uo,U:so,V:lo,w:fo,W:ho,x:null,X:null,y:po,Y:vo,Z:yo,"%":bo},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:_a,e:_a,f:Ta,g:ya,G:ma,H:ka,I:ka,j:Ma,L:La,m:xa,M:$a,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:wa,Q:Da,s:Ca,S:Aa,u:da,U:pa,V:ga,w:ha,W:va,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:ya,Y:ma,Z:ba,"%":Sa};function _(t,e){return function(n){var r,i,a,o=[],u=-1,s=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++u53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Ji(Qi(a.y,0,1))).getUTCDay(),r=i>4||0===i?Xi.ceil(r):Xi(r),r=qi.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Ki(Qi(a.y,0,1))).getDay(),r=i>4||0===i?Yi.ceil(r):Yi(r),r=Pi.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Ji(Qi(a.y,0,1)).getUTCDay():Ki(Qi(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Ji(a)):Ki(a)}}function k(t,e,n,r){for(var i,a,o=0,u=e.length,s=n.length;o=s)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in ia?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=_(n,b),b.X=_(r,b),b.c=_(e,b),w.x=_(n,w),w.X=_(r,w),w.c=_(e,w),{format:function(t){var e=_(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=M(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=_(t+="",w);return e.toString=function(){return t},e},utcParse:function(t){var e=M(t+="",!0);return e.toString=function(){return t},e}}}(t),ea=ta.format,ta.parse,na=ta.utcFormat,ra=ta.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||na("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||ra("%Y-%m-%dT%H:%M:%S.%LZ");function _o(t){return new Date(t)}function Mo(t){return t instanceof Date?+t:+new Date(+t)}function ko(t,e,n,r,i,a,o,u,s){var c=hi(oi,oi),l=c.invert,f=c.domain,h=s(".%L"),d=s(":%S"),p=s("%I:%M"),g=s("%I %p"),v=s("%a %d"),m=s("%b %d"),y=s("%B"),b=s("%Y"),w=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function x(u){return(o(u)=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Do(t,e){for(var n,r=0,i=t.length;r0)for(var r,i,a=new Array(r),o=0;o=0&&e._call.call(null,t),e=e._next;--Oo}()}finally{Oo=0,function(){var t,e,n=No,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:No=e);Eo=t,Xo(r)}(),Po=0}}function Go(){var t=Ho.now(),e=t-jo;e>1e3&&(Ro-=e,jo=t)}function Xo(t){Oo||(zo&&(zo=clearTimeout(zo)),t-Po>24?(t<1/0&&(zo=setTimeout(Io,t-Ho.now()-Ro)),Fo&&(Fo=clearInterval(Fo))):(Fo||(jo=Ho.now(),Fo=setInterval(Go,1e3)),Oo=1,Yo(Io)))}function Vo(t,e,n){var r=new Wo;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Wo.prototype=qo.prototype={constructor:Wo,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Bo():+n)+(null==e?0:+e),this._next||Eo===this||(Eo?Eo._next=this:No=this,Eo=this),this._call=t,this._time=n,Xo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xo())}};var Zo=Lo("start","end","cancel","interrupt"),Ko=[];function Jo(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(s){var c,l,f,h;if(1!==n.state)return u();for(c in i)if((h=i[c]).name===n.name){if(3===h.state)return Vo(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return n}function tu(t,e){var n=eu(t,e);if(n.state>3)throw new Error("too late; already running");return n}function eu(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function nu(t,e){var n,r;return function(){var i=tu(this,t),a=i.tween;if(a!==n)for(var o=0,u=(r=n=a).length;o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Qo:tu;return function(){var o=a(this,t),u=o.on;u!==r&&(i=(r=u).copy()).on(e,n),o.on=i}}var _u=st.prototype.constructor;function Mu(t){return function(){this.style.removeProperty(t)}}function ku(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function $u(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&ku(t,a,n)),r}return a._value=e,a}function Au(t){return function(e){this.textContent=t.call(this,e)}}function Lu(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Au(r)),e}return r._value=t,r}var Tu=0;function Su(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Du(t){return st().transition(t)}function Cu(){return++Tu}var Nu=st.prototype;Su.prototype=Du.prototype={constructor:Su,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},st.prototype.transition=function(t){var e,n;t instanceof Su?(e=t._id,t=t._name):(e=Cu(),(n=Ou).time=Bo(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a=c&&a<=s&&o<=i&&o>=u}));u.empty()?t.highlight.clear():t.highlight.set(u.datum())}}function qu(t){return t}var Iu=("function"!=typeof/./&&"object"!=typeof Int8Array&&"undefined"!=typeof document&&"function"!=typeof document.childNodes?function(t){return"function"==typeof t||!1}:null)||function(t){return"[object Function]"===Fu.call(t)};function Gu(t,e){if(t._isColumnChart()){var n=function(t){var e=t.column,n=t.active,r=t.type;void 0===r&&(r="auto");var i=t.format;void 0===i&&(i=qu);var a=[];"auto"===r&&(r="date"===e.type()?"timescale":e.length<6?"buttons":"select");function o(t){a.forEach((function(n){Iu(n)&&n(e.val(t),t)}))}return{ui:function t(r){if(e.length<2)return function(){return!1};var i;function a(t,e,n){K.preventDefault();var r=ct(n[e]);r.classed("active")||(n.forEach((function(t){return ct(t).classed("active",!1)})),r.classed("active",!0),o(e))}return"select"===r&&(i=function(t){var n=ct(document.createElement("select")).attr("class","filter-ui filter-select");return n.selectAll("option").data(e.values()).enter().append("option").attr("value",(function(t,e){return e})).html((function(t,n){return String(e.raw()[n]).trim()})),n.on("change",(function(t){return o(n.node().value)})),n}),"buttons"===r&&(i=function(r){var i=ct(".dw-chart").append("div.filter-ui filter-links");i.selectAll("a").data(e.values().filter((function(t,n){return e.raw()[n]}))).enter().append("a").attr("href",(function(t,e){return"#"+e})).classed("active",(function(t,e){return e===n})).html((function(t,n){return String(e.raw()[n]).trim()})).on("click",a);var o=i.select("a:first-child").node(),u=i.select("a:last-child").node(),s=o.offsetTop+o.clientHeight;return u.offsetTop+o.clientHeight-s>1?(i.remove(),t("select")(r)):i.remove()}),"timescale"===r&&(i=function(t){var n=Math.min(t.__w-35),r=Math.round((e.val(-1).getTime()-e.val(0).getTime())/864e5);function i(t,n){return t*(1-(e.val(-1).getTime()-n.getTime())/864e5/r)}var o=ct(document.createElement("div")).attr("class","filter-ui").style("position","relative").style("height","45px").style("margin-left","3px"),u=0;return o.selectAll("div").data(e.values()).enter().append("div").append("div.point").classed("active",(function(t,e){return 0===e})).style("left",(function(t,r){var a=i(n,t);return r===e.length-1&&(u=a),a+"px"})).on("click",a).parent().append("div.point-label").html((function(t,n){return e.raw()[n]})).style("left",(function(t,e){return i(n,t)+"px"})),o.append("div.line").style("width",u+"px"),o}),i}(r),change:function(t){a.push(t)}}}({column:dw.utils.columnNameColumn(t.axes(!0).columns),active:0}),r=n.ui(t),i=0,a=Uu(t.chart().get("id"));r&&function(){var o=ct(e.parentElement),u=o.selectAll(".dw-chart-header");0===u.nodes().length?(o.insert("div.dw-chart-header.fake",":first-child"),u=o.selectAll(".dw-chart-header")):u.nodes().length>1&&(o.selectAll(".dw-chart-header.fake").remove(),u=o.selectAll(".dw-chart-header"));var s=u.nodes()[0].clientHeight;u.append((function(){return r.node()})),i=u.nodes()[0].clientHeight-s,t.__filterH=i,n.change((function(e,n){t.__lastRow=n,t.update(),a("column:change",{value:e,index:n}),t.fire("column:change",{value:e,index:n})}))}(),t.__filterUI=r}}var Xu=ve((function(t,e){t.exports=function(){function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function i(t){return"function"==typeof t}function a(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function o(t,e){t.appendChild(e)}function u(t,e,n){t.insertBefore(e,n||null)}function s(t){t.parentNode.removeChild(t)}function c(t,e){for(var n=0;n0;)i[a]=r[a+2];var o=i.length?i[0]:n;return d.ctx&&u(d.ctx[t],d.ctx[t]=o)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](o),p&&K(e,t)),n})):[],d.update(),p=!0,r(d.before_update),d.fragment=!!o&&o(d.ctx),i.target){if(i.hydrate){var g=function(t){return Array.from(t.childNodes)}(i.target);d.fragment&&d.fragment.l(g),g.forEach(s)}else d.fragment&&d.fragment.c();i.intro&&W(e.$$.fragment),V(e,i.target,i.anchor),P()}_(f)}var Q=function(){};Q.prototype.$destroy=function(){Z(this,1),this.$destroy=t},Q.prototype.$on=function(t,e){var n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}},Q.prototype.$set=function(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)};var tt="http://www.w3.org/1999/xhtml",et={svg:"http://www.w3.org/2000/svg",xhtml:tt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nt(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),et.hasOwnProperty(e)?{space:et[e],local:t}:t}function rt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===tt&&e.documentElement.namespaceURI===tt?e.createElement(t):e.createElementNS(n,t)}}function it(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function at(t){var e=nt(t);return(e.local?it:rt)(e)}function ot(){}function ut(t){return null==t?ot:function(){return this.querySelector(t)}}function st(){return[]}function ct(t){return new Array(t.length)}function lt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function ft(t,e,n,r,i,a){for(var o,u=0,s=e.length,c=a.length;ue?1:t>=e?0:NaN}function pt(t){return function(){this.removeAttribute(t)}}function gt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vt(t,e){return function(){this.setAttribute(t,e)}}function mt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function yt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function bt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function wt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function xt(t){return function(){this.style.removeProperty(t)}}function _t(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Mt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function kt(t,e){return t.style.getPropertyValue(e)||wt(t).getComputedStyle(t,null).getPropertyValue(e)}function $t(t){return function(){delete this[t]}}function At(t,e){return function(){this[t]=e}}function Lt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Tt(t){return t.trim().split(/^|\s+/)}function St(t){return t.classList||new Dt(t)}function Dt(t){this._node=t,this._names=Tt(t.getAttribute("class")||"")}function Ct(t,e){for(var n=St(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Xt={};function Vt(t,e,n){return t=Zt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Zt(t,e,n){return function(r){try{t.call(this,this.__data__,e,n)}finally{}}}function Kt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Jt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=x&&(x=w+1);!(b=m[x])&&++x=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=dt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?xt:"function"==typeof e?Mt:_t)(t,e,null==n?"":n)):kt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?$t:"function"==typeof e?Lt:At)(t,e)):this.node()[t]},classed:function(t,e){var n=Tt(t+"");if(arguments.length<2){for(var r=St(this.node()),i=-1,a=n.length;++i-1||(t.push(this.parentNode),0))})).select((function(){return this.parentNode}))},ae.prototype.selectAppend=function(t){var e,n=ut(t),r=de(t);for(var i in t=at(r.tag),e=this.select((function(){return n.apply(this,arguments)||this.appendChild(t.apply(this,arguments))})),r.attr)e.attr(i,r.attr[i]);return e},ae.prototype.tspans=function(t,e){return this.selectAll("tspan").data((function(e,n){return("function"==typeof t?t.call(this,e,n):t).map((function(t){return{line:t,parent:e}}))})).enter().append("tspan").text((function(t){return t.line})).attr("x",0).attr("dy",(function(t,n){return n?("function"==typeof e?e.call(this,t.parent,t.line,n):e)||15:0}))},ae.prototype.appendMany=function(t,e){if("string"==typeof e){console.warn("DEPRECATED: jetpack's appendMany order of arguments has changed. It's appendMany('div', data) from now on");var n=e;e=t,t=n}return this.selectAll(null).data(e).enter().append(t)},ae.prototype.at=function(t,e){if("object"==typeof t){for(var n in t)this.attr(ve.test(n)?n:n.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase(),t[n]);return this}return 1==arguments.length?this.attr(t):this.attr(t,e)},ae.prototype.st=function(t,e){if("object"==typeof t){for(var n in t)r(this,n,t[n]);return this}return 1==arguments.length?this.style(t):r(this,t,e);function r(t,e,n){return e=e.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase(),~"top left bottom right padding-top padding-left padding-bottom padding-right border-top b-width border-left-width border-botto-width m border-right-width margin-top margin-left margin-bottom margin-right font-size width stroke-width line-height margin padding border border-radius max-width min-width max-height min-height".indexOf(e)?t.style(e,"function"==typeof n?a(n):i(n)):t.style(e,n),t}function i(t){return t.match?t:t+"px"}function a(t){return function(){var e=t.apply(this,arguments);return i(e)}}},ae.prototype.prop=ae.prototype.property;var xe=Math.cos(.25*Math.PI),_e=Math.sin(.25*Math.PI);function Me(t){var e=t[0],n=t[1];return[e*xe-n*_e,e*_e+n*xe]}function ke(t){var e=t[0],n=t[1];return[e*xe+n*_e,n*xe-e*_e]}function $e(t,e,n,r){void 0===r&&(r=!0);var i=r?1:0,a=(n-t[i])/(e[i]-t[i]);if(a<0||a>1)return null;var o=r?0:1;return t[o]+a*(e[o]-t[o])}function Ae(t){return void 0===t&&(t=!0),function(e){var n=e.source,r=e.sourcePadding,i=e.targetPadding,a=e.circle,o=e.circleRadius;return function(e){var u,s;a&&o&&(i+=o),r>0&&((n=Object.assign({},n)).x-=r,n.y-=r,n.width+=2*r,n.height+=2*r);var c=n.x+.5*n.width,l=n.y+.5*n.height,f=0,h=0,d=Le(c,l,f,h,.25,t),p=d[0],g=d[1],v=n.height/n.width,m=p-c,y=g-l;if(Math.abs(y/m)0?1:-1),l+=.5*n.width*y/m*(m>0?1:-1)):(c+=.5*n.height*m/y*(y>0?1:-1),l+=.5*n.height*(y>0?1:-1)),p=(u=Le(c,l,f,h,.25,t))[0],g=u[1],i>0){var b=Math.atan2(-g,-p);p=(s=Le(c,l,f=-Math.cos(b)*i,h=-Math.sin(b)*i,.25,t))[0],g=s[1]}e.attr("d","M "+c+","+l+" Q "+p+","+g+" "+f+","+h)}}}function Le(t,e,n,r,i,a){void 0===i&&(i=.25),void 0===a&&(a=!0);var o=n-t,u=r-e,s=u,c=-o,l=.5*(t+n),f=.5*(e+r),h=Math.sqrt(s*s+c*c),d=Math.sqrt(o*o+u*u)*i/h*(a?-1:1);return[l+s*d,f+c*d]}var Te=Ae(!0),Se=Ae(!1),De=Object.freeze({__proto__:null,straight:function(t){var e=t.source,n=t.sourcePadding,r=t.targetPadding,i=t.circle,a=t.circleRadius;return function(t){var o,u,s,c;i&&a&&(r+=a),n&&((e=Object.assign({},e)).x-=n,e.y-=n,e.width+=2*n,e.height+=2*n);var l=e.x+.5*e.width,f=e.y+.5*e.height,h=0,d=0,p=!0,g=-l,v=-f,m=e.height/e.width;if(2*Math.abs(l)0?1:-1),f+=.5*e.height*(f<0?1:-1),p=!1;else if(2*Math.abs(f)0?1:-1),l+=.5*e.width*(l<0?1:-1),p=!1;else{var y,b,w=Me([-.5*e.width,0]),x=w[0],_=w[1],M=Me([.5*e.width,0]),k=M[0],$=M[1],A=Me([0,-.5*e.height]),L=A[0],T=A[1],S=Me([0,.5*e.height]),D=S[0],C=S[1],N=Me([-l,-f]),E=N[0],O=N[1];if(l>0&&f>0&&E>=x&&E<=L){var z=Me([-.5*e.width,-.5*e.height]),F=z[0];y=(o=ke([E,$e(E=D&&E<=k){var j=Me([.5*e.width,.5*e.height]),P=j[0];y=(u=ke([E,$e(E0&&f<0&&O>=_&&O<=C){var R=Me([-.5*e.width,.5*e.height]),H=R[0],Y=R[1];y=(s=ke([$e(O0&&O>=T&&O<=$){var B=Me([.5*e.width,-.5*e.height]),U=B[0],W=B[1];y=(c=ke([$e(O0?1:-1),b=.5*e.width*v/g*(g>0?1:-1)):(y=.5*e.height*g/v*(v>0?1:-1),b=.5*e.height*(v>0?1:-1));l+=y,f+=b}if(r>0&&p){g=-l,v=-f;var q=Math.atan2(v,g);h=-Math.cos(q)*r,d=-Math.sin(q)*r}t.attr("d","M "+l+","+f+" L "+h+","+d),t.classed("crisp",l.toFixed(1)===h.toFixed(1)||f.toFixed(1)===d.toFixed(1))}},curveLeft:Te,curveRight:Se}),Ce={triangle:{viewBox:"-10 -10 20 20",markerWidth:20,markerHeight:20,minLen:20,path:"M-8.75,-3.75 L 1,0 L -8.75,3.75"},lines:{viewBox:"-10 -10 20 20",markerWidth:20,markerHeight:20,minLen:15,path:"M-4.75,-3.75 L 0,0 L -4.75,3.75",strokes:!0}},Ne=Math.ceil,Ee=Math.max,Oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==ge?ge:"undefined"!=typeof self?self:{},ze="object"==typeof Oe&&Oe&&Oe.Object===Object&&Oe,Fe="object"==typeof self&&self&&self.Object===Object&&self,je=(ze||Fe||Function("return this")()).Symbol,Pe=Object.prototype,Re=Pe.hasOwnProperty,He=Pe.toString,Ye=je?je.toStringTag:void 0,Be=Object.prototype.toString,Ue=je?je.toStringTag:void 0,We=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Ue&&Ue in Object(t)?function(t){var e=Re.call(t,Ye),n=t[Ye];try{t[Ye]=void 0;var r=!0}catch(t){}var i=He.call(t);return r&&(e?t[Ye]=n:delete t[Ye]),i}(t):function(t){return Be.call(t)}(t)},qe=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Ie=function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){if(!qe(t))return!1;var e=We(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)},Ge=/^(?:0|[1-9]\d*)$/,Xe=function(t,e,n){if(!qe(n))return!1;var r=typeof e;return!!("number"==r?Ie(n)&&function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ge.test(t))&&t>-1&&t%1==0&&t>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_n(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_n(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=fn.exec(t))?new $n(e[1],e[2],e[3],1):(e=hn.exec(t))?new $n(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=dn.exec(t))?_n(e[1],e[2],e[3],e[4]):(e=pn.exec(t))?_n(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=gn.exec(t))?Sn(e[1],e[2]/100,e[3]/100,1):(e=vn.exec(t))?Sn(e[1],e[2]/100,e[3]/100,e[4]):mn.hasOwnProperty(t)?xn(mn[t]):"transparent"===t?new $n(NaN,NaN,NaN,0):null}function xn(t){return new $n(t>>16&255,t>>8&255,255&t,1)}function _n(t,e,n,r){return r<=0&&(t=e=n=NaN),new $n(t,e,n,r)}function Mn(t){return t instanceof on||(t=wn(t)),t?new $n((t=t.rgb()).r,t.g,t.b,t.opacity):new $n}function kn(t,e,n,r){return 1===arguments.length?Mn(t):new $n(t,e,n,null==r?1:r)}function $n(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function An(){return"#"+Tn(this.r)+Tn(this.g)+Tn(this.b)}function Ln(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Tn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Sn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Cn(t,e,n,r)}function Dn(t){if(t instanceof Cn)return new Cn(t.h,t.s,t.l,t.opacity);if(t instanceof on||(t=wn(t)),!t)return new Cn;if(t instanceof Cn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,u=a-i,s=(a+i)/2;return u?(o=e===a?(n-r)/u+6*(n0&&s<1?0:o,new Cn(o,u,s,t.opacity)}function Cn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Nn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function En(t,e){return"translate("+Math.round(t)+"px, "+Math.round(e)+"px);"}function On(t){return!0===t||void 0===t}function zn(t){return!(!On(t.showDesktop)||!1!==t.showMobile)}function Fn(t){return!1===t.showDesktop&&!1===t.showMobile}function jn(t,e){return"function"==typeof e?e(t):t}rn(on,wn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:yn,formatHex:yn,formatHsl:function(){return Dn(this).formatHsl()},formatRgb:bn,toString:bn}),rn($n,kn,an(on,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new $n(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new $n(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:An,formatHex:An,formatRgb:Ln,toString:Ln})),rn(Cn,(function(t,e,n,r){return 1===arguments.length?Dn(t):new Cn(t,e,n,null==r?1:r)}),an(on,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Cn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Cn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new $n(Nn(t>=240?t-240:t+120,i,r),Nn(t,i,r),Nn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Pn=180/Math.PI;function Rn(t,e,n){if(void 0===e&&(e=null),void 0===n&&(n=null),!e)return t;for(var r=e.split("."),i=t,a=0;a]*>/gi,Yn=/|<\?(?:php)?[\s\S]*?\?>/gi;function Bn(t,e){if(null===t)return null;if(void 0!==t){if((t=String(t)).indexOf("<")<0||t.indexOf(">")<0)return t;if(t=function(t,e){e=(((void 0!==e?e||"":"

")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");for(var n=t,r=t;;)if(r=(n=r).replace(Yn,"").replace(Hn,(function(t,n){return e.indexOf("<"+n.toLowerCase()+">")>-1?t:""})),n===r)return r}(t,e),"undefined"==typeof document)return t;var n=document.createElement("div");n.innerHTML=t;for(var r=n.querySelectorAll("*"),i=0;i337.5||t<=22.5:return"bc";case t>22.5&&t<=67.5:return"bl";case t>67.5&&t<=112.5:return"ml";case t>112.5&&t<=157.5:return"tl";case t>157.5&&t<=202.5:return"tc";case t>202.5&&t<=247.5:return"tr";case t>247.5&&t<=292.5:return"mr";case t>292.5&&t<=337.5:return"br";default:return"mc"}}(t)}function x(t){var e=N(r),n=e[0],i=e[1];return v>n-t&&vi-t&&m',r=d(),X(i.$$.fragment),m(n,"class","dot-drag svelte-11oj9tu"),m(e,"style",f=t[6](t[0])),m(e,"class",h="range-annotation edit-mode range "+t[0].type+" svelte-11oj9tu"),b(e,"edit-mode",t[3]),b(e,"no-edit-mode",!t[3]),b(e,"selected",t[5])},m:function(a,s){u(a,e,s),o(e,n),o(e,r),V(i,e,null),p=!0,y||(w=g(n,"mousedown",v(t[9])),y=!0)},p:function(t,n){var r={};1&n&&(r.annotation=t[0]),16&n&&(r.index=t[4]),1&n&&(r.orientation=t[0].type),!a&&4&n&&(a=!0,r.activeResizer=t[2],z((function(){return a=!1}))),!c&&2&n&&(c=!0,r.resizing=t[1],z((function(){return c=!1}))),i.$set(r),(!p||65&n&&f!==(f=t[6](t[0])))&&m(e,"style",f),(!p||1&n&&h!==(h="range-annotation edit-mode range "+t[0].type+" svelte-11oj9tu"))&&m(e,"class",h),9&n&&b(e,"edit-mode",t[3]),9&n&&b(e,"no-edit-mode",!t[3]),33&n&&b(e,"selected",t[5])},i:function(t){p||(W(i.$$.fragment,t),p=!0)},o:function(t){q(i.$$.fragment,t),p=!1},d:function(t){t&&s(e),Z(i),y=!1,w()}}}function cr(t){var e,n,r,i;function a(e){t[22].call(null,e)}function o(e){t[23].call(null,e)}var u={annotation:t[0],index:t[4],orientation:t[0].type};return void 0!==t[2]&&(u.activeResizer=t[2]),void 0!==t[1]&&(u.resizing=t[1]),e=new he({props:u}),T.push((function(){return G(e,"activeResizer",a)})),T.push((function(){return G(e,"resizing",o)})),e.$on("selectAnnotation",t[24]),{c:function(){X(e.$$.fragment)},m:function(t,n){V(e,t,n),i=!0},p:function(t,i){var a={};1&i&&(a.annotation=t[0]),16&i&&(a.index=t[4]),1&i&&(a.orientation=t[0].type),!n&&4&i&&(n=!0,a.activeResizer=t[2],z((function(){return n=!1}))),!r&&2&i&&(r=!0,a.resizing=t[1],z((function(){return r=!1}))),e.$set(a)},i:function(t){i||(W(e.$$.fragment,t),i=!0)},o:function(t){q(e.$$.fragment,t),i=!1},d:function(t){Z(e,t)}}}function lr(t){var e,n,r,i,a,o,c=[ur,or],l=[];function f(t,e){return"line"===t[0].display?0:1}return e=f(t),n=l[e]=c[e](t),{c:function(){n.c(),r=p()},m:function(n,s){l[e].m(n,s),u(n,r,s),i=!0,a||(o=g(window,"keydown",t[8]),a=!0)},p:function(t,i){var a=i[0],o=e;(e=f(t))===o?l[e].p(t,a):(B(),q(l[o],1,1,(function(){l[o]=null})),U(),(n=l[e])?n.p(t,a):(n=l[e]=c[e](t)).c(),W(n,1),n.m(r.parentNode,r))},i:function(t){i||(W(n),i=!0)},o:function(t){q(n),i=!1},d:function(t){l[e].d(t),t&&s(r),a=!1,o()}}}function fr(t,e,n){var r,i,a,o,u,s,c,l=e.annotation,f=e.dataToPx,h=e.pxToData,d=e.editorState,p=e.editMode,g=e.index,v=e.moveX,m=e.moveY,y=e.resizing,b=e.dragging,w=e.activeResizer,x=e.forceAnchorDragTemp,_=$();return t.$$set=function(t){"annotation"in t&&n(0,l=t.annotation),"dataToPx"in t&&n(13,f=t.dataToPx),"pxToData"in t&&n(14,h=t.pxToData),"editorState"in t&&n(15,d=t.editorState),"editMode"in t&&n(3,p=t.editMode),"index"in t&&n(4,g=t.index),"moveX"in t&&n(10,v=t.moveX),"moveY"in t&&n(11,m=t.moveY),"resizing"in t&&n(1,y=t.resizing),"dragging"in t&&n(12,b=t.dragging),"activeResizer"in t&&n(2,w=t.activeResizer),"forceAnchorDragTemp"in t&&n(16,x=t.forceAnchorDragTemp)},t.$$.update=function(){if(32784&t.$$.dirty&&n(5,r=1===d.selectedRangeAnnotations.length&&d.selectedRangeAnnotations[0]===g),93223&t.$$.dirty&&r&&y&&(v||m))if(["l","r"].includes(w)){var e,p=f(l.x0,0)[0],_=f(l.x1,0)[0];"l"===w&&"line"===l.display?e="x0":"l"===w?e=p>_?"x1":"x0":"r"===w&&(e=p>_?"x0":"x1");var M=f(l[e],0)[0],k=f(l["x1"===e?"x0":"x1"],0)[0];M-k>0!=M+v-k>0&&n(2,w="l"===w?"r":"l");var $=h(M+=v,0)[0];if(n(0,l[e]=$,l),x){var A=h(k-=v,0)[0];n(0,l["x1"===e?"x0":"x1"]=A,l)}n(10,v=0)}else{var L,T=f(0,l.y0)[1],S=f(0,l.y1)[1];"t"===w&&"line"===l.display?L="y0":"t"===w?L=T0!=N+m-E>0&&n(2,w="t"===w?"b":"t");var O=h(C,N+=m),z=(O[0],O[1]);n(0,l[L]=z,l),n(11,m=0)}if(31777&t.$$.dirty&&r&&b&&(v||m))if("x"===l.type){var F=f(l.x0,0),j=F[0],P=(F[1],f(l.x1,0)),R=P[0];P[1],R+=v;var H=h(j+=v,0),Y=H[0],B=(H[1],h(R,0)),U=B[0];B[1],n(0,l.x0=Y,l),n(0,l.x1=U,l),n(10,v=0)}else{var W=f(0,l.y0),q=(W[0],W[1]),I=f(0,l.y1),G=(I[0],I[1]);G+=m;var X=h(0,q+=m),V=(X[0],X[1]),Z=h(0,G),K=(Z[0],Z[1]);n(0,l.y0=V,l),n(0,l.y1=K,l),n(11,m=0)}8193&t.$$.dirty&&n(17,i="x"===l.type?f(l.x0,0)[0]:f(0,l.y0)[1]),8193&t.$$.dirty&&n(18,a="x"===l.type?f(l.x1,0)[0]:f(0,l.y1)[1]),393216&t.$$.dirty&&n(19,o=Math.min(i,a)),393216&t.$$.dirty&&n(20,u=Math.max(i,a)),1572864&t.$$.dirty&&n(6,s=function(t){var e=[],n=wn(t.color),r=t.opacity/100;return e.push("background-color: rgba("+n.r+", "+n.g+", "+n.b+", "+r+")"),e.push(("x"===t.type?"left":"top")+": "+o+"px"),e.push(("x"===t.type?"width":"height")+": "+(u-o)+"px"),e.join("; ")}),131072&t.$$.dirty&&n(7,c=function(t){var e=[];e.push(("x"===t.type?"left":"top")+": "+i+"px");var n=wn(t.color),r=t.opacity/100;return e.push("border-color: rgba("+n.r+", "+n.g+", "+n.b+", "+r+")"),"x"===t.type?e.push("border-left-width: "+(t.strokeWidth||1)+"px"):e.push("border-top-width: "+(t.strokeWidth||1)+"px"),"dashed"===t.strokeType?e.push("border-style: dashed"):"dotted"===t.strokeType?e.push("border-style: dotted"):e.push("border-style: solid"),e.join("; ")})},[l,y,w,p,g,r,s,c,function(t){p&&"Escape"===t.key&&r&&_("selectAnnotation",null)},function(t){p&&(_("selectAnnotation",{type:"range",index:g}),n(12,b=!0))},v,m,b,f,h,d,x,i,a,o,u,function(e){A(t,e)},function(t){n(2,w=t),n(5,r),n(1,y),n(10,v),n(11,m),n(13,f),n(0,l),n(14,h),n(16,x),n(15,d),n(4,g),n(12,b)},function(t){n(1,y=t)},function(e){A(t,e)},function(t){n(2,w=t),n(5,r),n(1,y),n(10,v),n(11,m),n(13,f),n(0,l),n(14,h),n(16,x),n(15,d),n(4,g),n(12,b)},function(t){n(1,y=t)},function(e){A(t,e)}]}var hr=function(t){function e(e){t.call(this),J(this,e,fr,lr,a,{annotation:0,dataToPx:13,pxToData:14,editorState:15,editMode:3,index:4,moveX:10,moveY:11,resizing:1,dragging:12,activeResizer:2,forceAnchorDragTemp:16})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Q);function dr(t){if(!t||"object"!=typeof t)return t;try{return JSON.parse(JSON.stringify(t))}catch(e){return t}}var pr=I.document;function gr(t,e,n){var r=t.slice();return r[67]=e[n],r[69]=n,r}function vr(t,e,n){var r=t.slice();return r[67]=e[n],r[69]=n,r}function mr(t){var e,n,r,i,a,o,u,s,c,l,f;function h(e){t[43].call(null,e)}function d(e){t[44].call(null,e)}function p(e){t[45].call(null,e)}function g(e){t[46].call(null,e)}function v(e){t[47].call(null,e)}function m(e){t[48].call(null,e)}function y(e){t[49].call(null,e)}function b(e){t[50].call(null,e)}function w(e){t[51].call(null,e)}var x={annotation:t[67],dataToPx:t[1],pxToData:t[2],theme:t[3],cm:t[4],visWidth:t[5],isMobileWidth:t[15],index:t[25].length-1-t[69],editMode:t[7],editorState:t[0],forceAnchorDragTemp:t[22],key:t[16][t[25].length-1-t[69]]};return void 0!==t[19]&&(x.noOffsetAtEventStart=t[19]),void 0!==t[24]&&(x.isEditable=t[24]),void 0!==t[11]&&(x.dragging=t[11]),void 0!==t[21]&&(x.forceAnchorDrag=t[21]),void 0!==t[20]&&(x.forceOffsetDrag=t[20]),void 0!==t[9]&&(x.moveX=t[9]),void 0!==t[10]&&(x.moveY=t[10]),void 0!==t[12]&&(x.resizing=t[12]),void 0!==t[23]&&(x.activeResizer=t[23]),e=new ar({props:x}),T.push((function(){return G(e,"noOffsetAtEventStart",h)})),T.push((function(){return G(e,"isEditable",d)})),T.push((function(){return G(e,"dragging",p)})),T.push((function(){return G(e,"forceAnchorDrag",g)})),T.push((function(){return G(e,"forceOffsetDrag",v)})),T.push((function(){return G(e,"moveX",m)})),T.push((function(){return G(e,"moveY",y)})),T.push((function(){return G(e,"resizing",b)})),T.push((function(){return G(e,"activeResizer",w)})),e.$on("selectAnnotation",t[28]),e.$on("updateEditorState",t[29]),e.$on("update",t[52]),{c:function(){X(e.$$.fragment)},m:function(t,n){V(e,t,n),f=!0},p:function(t,f){var h={};33554432&f[0]&&(h.annotation=t[67]),2&f[0]&&(h.dataToPx=t[1]),4&f[0]&&(h.pxToData=t[2]),8&f[0]&&(h.theme=t[3]),16&f[0]&&(h.cm=t[4]),32&f[0]&&(h.visWidth=t[5]),32768&f[0]&&(h.isMobileWidth=t[15]),33554432&f[0]&&(h.index=t[25].length-1-t[69]),128&f[0]&&(h.editMode=t[7]),1&f[0]&&(h.editorState=t[0]),4194304&f[0]&&(h.forceAnchorDragTemp=t[22]),33619968&f[0]&&(h.key=t[16][t[25].length-1-t[69]]),!n&&524288&f[0]&&(n=!0,h.noOffsetAtEventStart=t[19],z((function(){return n=!1}))),!r&&16777216&f[0]&&(r=!0,h.isEditable=t[24],z((function(){return r=!1}))),!i&&2048&f[0]&&(i=!0,h.dragging=t[11],z((function(){return i=!1}))),!a&&2097152&f[0]&&(a=!0,h.forceAnchorDrag=t[21],z((function(){return a=!1}))),!o&&1048576&f[0]&&(o=!0,h.forceOffsetDrag=t[20],z((function(){return o=!1}))),!u&&512&f[0]&&(u=!0,h.moveX=t[9],z((function(){return u=!1}))),!s&&1024&f[0]&&(s=!0,h.moveY=t[10],z((function(){return s=!1}))),!c&&4096&f[0]&&(c=!0,h.resizing=t[12],z((function(){return c=!1}))),!l&&8388608&f[0]&&(l=!0,h.activeResizer=t[23],z((function(){return l=!1}))),e.$set(h)},i:function(t){f||(W(e.$$.fragment,t),f=!0)},o:function(t){q(e.$$.fragment,t),f=!1},d:function(t){Z(e,t)}}}function yr(t){var e,n,r,i,a,o,u;function s(e){t[54].call(null,e)}function c(e){t[55].call(null,e)}function l(e){t[56].call(null,e)}function f(e){t[57].call(null,e)}function h(e){t[58].call(null,e)}var d={annotation:t[67],dataToPx:t[1],pxToData:t[2],visWidth:t[5],editMode:t[7],editorState:t[0],forceAnchorDragTemp:t[22],index:t[26].length-1-t[69]};return void 0!==t[11]&&(d.dragging=t[11]),void 0!==t[9]&&(d.moveX=t[9]),void 0!==t[10]&&(d.moveY=t[10]),void 0!==t[12]&&(d.resizing=t[12]),void 0!==t[23]&&(d.activeResizer=t[23]),e=new hr({props:d}),T.push((function(){return G(e,"dragging",s)})),T.push((function(){return G(e,"moveX",c)})),T.push((function(){return G(e,"moveY",l)})),T.push((function(){return G(e,"resizing",f)})),T.push((function(){return G(e,"activeResizer",h)})),e.$on("selectAnnotation",t[28]),{c:function(){X(e.$$.fragment)},m:function(t,n){V(e,t,n),u=!0},p:function(t,u){var s={};67108864&u[0]&&(s.annotation=t[67]),2&u[0]&&(s.dataToPx=t[1]),4&u[0]&&(s.pxToData=t[2]),32&u[0]&&(s.visWidth=t[5]),128&u[0]&&(s.editMode=t[7]),1&u[0]&&(s.editorState=t[0]),4194304&u[0]&&(s.forceAnchorDragTemp=t[22]),67108864&u[0]&&(s.index=t[26].length-1-t[69]),!n&&2048&u[0]&&(n=!0,s.dragging=t[11],z((function(){return n=!1}))),!r&&512&u[0]&&(r=!0,s.moveX=t[9],z((function(){return r=!1}))),!i&&1024&u[0]&&(i=!0,s.moveY=t[10],z((function(){return i=!1}))),!a&&4096&u[0]&&(a=!0,s.resizing=t[12],z((function(){return a=!1}))),!o&&8388608&u[0]&&(o=!0,s.activeResizer=t[23],z((function(){return o=!1}))),e.$set(s)},i:function(t){u||(W(e.$$.fragment,t),u=!0)},o:function(t){q(e.$$.fragment,t),u=!1},d:function(t){Z(e,t)}}}function br(t){var e,n,r;return{c:function(){m(e=l("div"),"class",n="create-rect "+t[0].createMode+" svelte-1r6aetx"),m(e,"style",r=t[27]())},m:function(t,n){u(t,e,n)},p:function(t,i){1&i[0]&&n!==(n="create-rect "+t[0].createMode+" svelte-1r6aetx")&&m(e,"class",n),134217728&i[0]&&r!==(r=t[27]())&&m(e,"style",r)},d:function(t){t&&s(e)}}}function wr(t){var e,n,i,a,f,h,p,v,y;O(t[42]);for(var w=t[25],x=[],_=0;_'+r.num+''+Bn(t.text)+""))})),h.classed("hide",!e)}5&t.$$.dirty[0]&&v&&n(0,v.pxToData=s,v),3&t.$$.dirty[0]&&v&&n(0,v.dataToPx=u,v),1537&t.$$.dirty[0]|768&t.$$.dirty[1]&&n(27,q=function(){var t=[];if("text"===v.createMode){if(Math.abs(_)<1)return;return t.push("top: "+(L>0?E:E+L)+"px"),t.push("height: "+(L>0?L:-L)+"px"),t.push("left: "+(_>0?N:N+_)+"px"),t.push("width: "+(_>0?_:-_)+"px"),t.join("; ")}if("range"===v.createMode){if(Math.abs(_)<1&&Math.abs(L)<1)return;Math.abs(L)>Math.abs(_)?(t.push("top: "+(L<0?E+L:E)+"px"),t.push("left: 0px"),t.push("width: 100%"),t.push("height: "+Math.abs(L)+"px")):(t.push("top: 0px"),t.push("left: "+(_<0?N+_:N)+"px"),t.push("height: 100%"),t.push("width: "+Math.abs(_)+"px"))}return t.join("; ")}),30720&t.$$.dirty[0]&&(n(14,I=S||C||O),G&&(I?G.classList.add("editing-annotations"):G.classList.remove("editing-annotations")))},[v,u,s,c,l,f,d,p,a,_,L,S,C,O,I,B,W,o,g,m,y,b,w,x,z,H,Y,q,function(t){if(null===t.detail)return n(0,v.selectedTextAnnotations=[],v),n(0,v.selectedRangeAnnotations=[],v),void n(24,z=!1);if("text"===t.detail.type){var e=v.selectedTextAnnotations,r=e.length>1;(e[0]!==t.detail.index||r)&&(n(24,z=!1),n(0,v.selectedTextAnnotations=[t.detail.index],v),n(0,v.selectedRangeAnnotations=[],v))}else n(0,v.selectedRangeAnnotations=[t.detail.index],v),n(0,v.selectedTextAnnotations=[],v)},function(t){var e=Object.entries(t.detail)[0],r=e[0],i=e[1];n(0,v[r]=i,v)},function(t){p&&"Escape"===t.key&&O&&j()},function(t){p&&(n(0,v.selectedTextAnnotations=[],v),n(0,v.selectedRangeAnnotations=[],v))},function(t){p&&((S||O||C&&["l","r"].includes(x))&&(n(9,_+=t.movementX),t.movementX&&(n(24,z=!1),D=!0)),(S||O||C&&["t","b"].includes(x))&&(n(10,L+=t.movementY),t.movementY&&(n(24,z=!1),D=!0)),n(22,w=!1),t.ctrlKey&&!m&&n(22,w=!0))},function(t){p&&(D||n(24,z=t.target.classList.contains("text-edit")||t.target.parentNode.classList&&t.target.parentNode.classList.contains("text-edit")),F(),O&&(function(){if("text"===v.createMode){var t=s(N,E),e=t[0],a=t[1],o=function(t,e){var n=t<0,r=e<0;return n&&r?"br":n&&!r?"tr":!n&&r?"bl":"tl"}(_,L),u=Math.abs(_/f*100),c=Object.assign({},dr(v.defaults.text),{x:e,y:a,align:o,width:u});Math.abs(_)<10&&Math.abs(L)<10&&(c.width=25,c.align="mc",c.dy=E<100?50:-50,c.connectorLine.enabled=!0),B&&(c.mobileFallback=!1),r.unshift(c),n(36,r)}else if("range"===v.createMode){var l=s(N,E),h=l[0],d=l[1],p=s(N+_,E+L),g=p[0],m=p[1],y=Math.abs(_)>Math.abs(L)?"x":"y",b="range";("x"===y&&Math.abs(_)<10||"y"===y&&Math.abs(L)<10)&&(b="line");var w=Object.assign({},dr(v.defaults[b]),{type:y,display:b,x0:h,x1:g,y0:d,y1:m});i.unshift(w),n(37,i)}}(),function(){if("text"===v.createMode){if(n(0,v.selectedTextAnnotations=[0],v),n(0,v.selectedRangeAnnotations=[],v),U()[0].render)return;n(24,z=!0),setTimeout((function(){var t=r.length-1,e=o.querySelectorAll(".text-annotation")[t].querySelector(".text-edit");e.focus(),function(t){var e=document.createRange();e.selectNodeContents(t);var n=window.getSelection();n.removeAllRanges(),n.addRange(e)}(e)}))}"range"===v.createMode&&(n(0,v.selectedTextAnnotations=[],v),n(0,v.selectedRangeAnnotations=[0],v))}(),j()))},function(){p&&(S||C)&&F()},function(t){p&&v.createMode&&(n(13,O=!0),n(39,N=t.offsetX),n(40,E=t.offsetY))},r,i,h,N,E,U,function(){n(8,a=window.innerWidth)},function(t){n(19,m=t)},function(t){n(24,z=t)},function(t){n(11,S=t)},function(t){n(21,b=t)},function(t){n(20,y=t)},function(t){n(9,_=t)},function(t){n(10,L=t)},function(t){n(12,C=t)},function(t){n(23,x=t)},function(e){A(t,e)},function(t){T[t?"unshift":"push"]((function(){n(17,o=t)}))},function(t){n(11,S=t)},function(t){n(9,_=t)},function(t){n(10,L=t)},function(t){n(12,C=t)},function(t){n(23,x=t)},function(t){T[t?"unshift":"push"]((function(){n(18,g=t)}))}]}return function(t){function e(e){t.call(this),J(this,e,xr,wr,a,{textAnnotations:36,rangeAnnotations:37,dataToPx:1,pxToData:2,theme:3,cm:4,visWidth:5,annotationKeysSel:38,ariaLabel:6,editMode:7,editorState:0},[-1,-1,-1])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Q)}()}));function Vu(t){if(!t||"object"!=typeof t)return t;try{return JSON.parse(JSON.stringify(t))}catch(e){return t}}function Zu(t){return dw.column("x",[t],"date").val(0)}function Ku(t){return function(e,n){return e=Zu(e),[t.x(e),t.y(n)].map((function(t){return isNaN(+t)?t:+t.toFixed(1)}))}}function Ju(t){return function(e,n){return[e=ea("%Y/%m/%d %H:%M")(t.x.invert(e)),n=t.y.invert(n).toFixed(4)]}}function Qu(t){var e=t.__canvas,n=e.size,r=e.margin;t._$chart.select("div.annotations-outer").style("width",n.width+"px").style("height",n.height+"px").style("top",r.t+"px").style("left",r.l+"px")}De.extend(Ce),De.extend(Ee),De.extend(Ne),De.extend((function(t,e){var n=e.prototype,r=n.format;n.format=function(t){var e=this,n=t||"YYYY-MM-DDTHH:mm:ssZ",i=this.$locale().seasonSeparator||"-",a=n.replace(/(\[[^\]]+])|BB|B/g,(function(t,n){var r,a,o=e.$y,u=o+1,s="B"===t,c=s?[String(o).slice(-2),2]:[o,4],l=[String(u).slice(-2),2];return n||(s?"'":"")+(r=e.$utils()).s.apply(r,c.concat(["0"]))+i+(s?"'":"")+(a=e.$utils()).s.apply(a,l.concat(["0"]))}));return r.bind(this)(a)}})),dw.visualization.register("column-chart",(function(){var t=!0;return{checkDataset:function(t){var e=this,n=e.dataset;n.limitRows(e.isTimeScale()?400:100),n.limitColumns(500),e.initGetColor(),e.setRoot(t),e.axesDef=e.axes(),e.__lastRow=0},render:function(e){var n=this;if(n.size().filter((function(t){return!isFinite(t)||t<=0})).length)n.renderingComplete();else if(n.checkDataset(e),n.axesDef){t&&(n.initLocales(),t=!1),Gu(n,e);var r=n.initCanvas(e);n._marginChangeCount=0,n.__themeProps=Yu(n.theme()),n._minus=Pu(n.theme(),"typography.chart.minusCharacter","−"),function(t){var e=t.colorMap(),n=t.chart(),r=Uu(t.chart().get("id")),i=t.get("valueLabels.show","hover"),a=t.get("valueLabels.enabled",!0),o="column-chart"===t.meta.id,u=t._$chart,s=t.chartBbox();t.highlight={delay:"column-chart"===t.meta.id?0:200,timer:null,column:null,inactive:!0,set:function(c,l){t.highlight.column!==c&&(t.highlight.timer&&clearTimeout(t.highlight.timer),t.highlight.timer=setTimeout((function(){t.highlight.inactive=!1,u.select(".container").classed("has-hover",!0);var f=t.chart().hasHighlight(),h=u.selectAll("rect.column");h.classed("hover",(function(t){return c&&t.key===c.key})),o?h.style("fill",(function(t){if(c&&t.key===c.key){var n=f?t._columnFill:me(t._columnFill).darken(.9).hex();return e(n)}if(t.key!==c.key)return e(t[f&&!t._isHighlighted?"_hlColor":"_columnFill"])})):(h.classed("unfocus",(function(t){return c&&t.key!==c.key})),u.selectAll(".cc-swatch").classed("hover",(function(t){return c&&t.key===c.key})).classed("unfocus",(function(t){return c&&t.key!==c.key})));var d=a&&"hover"!==i?"unfocus":"dontshow";if(u.selectAll("div.label.series").classed("hover",(function(t){return t&&c&&t.key===c.key})),u.selectAll("div.label.value").each((function(t){var e=ct(this);c&&t?t.key===c.key?e.classed("hover",!0).classed("dontshow",!a).classed("unfocus",!1):(e.classed("hover",!1),e.classed(d,f&&!t._isHighlighted||!f),f&&t._isHighlighted&&(e.classed("unfocus",!0),e.classed("dontshow",!1))):e.classed("hover",!1)})),!l){var p=t.getXAxisPosition();u.selectAll(".label.series text").tspans((function(e){if(c){var n=o?e.key===c.key:e.x===c.x,r=t._xFormatter.map((function(t){return n?t(e.x):""}));return"top"===p&&r.reverse(),r}})).attr("dx",(function(t){var e=n.getElementBounds(this.parentElement),r=0;return r=Math.min(s.right-e.right,r),r=Math.max(s.left-e.left,r)}))}u.selectAll(".tick.primary").classed("unfocus",!0),r("highlight.set",{column:c.key})}),t.highlight.inactive?t.highlight.delay:1),t.highlight.column=c)},clear:function(){var n=t.get("valueLabels.enabled",!0),i=t.get("valueLabels.show","hover"),a=t.chart().hasHighlight(),s=u.selectAll("rect.column");if(u.select(".container").classed("has-hover",!1),t.highlight.column=null,t.highlight.inactive=!0,t.highlight.timer&&clearTimeout(t.highlight.timer),u.selectAll(".hover").classed("hover",!1),o&&s.style("fill",(function(t){return a&&!t._isHighlighted?e(t._hlColor):e(t._columnFill)})),a){var c=n&&"hover"!==i?"unfocus":"dontshow";u.selectAll("div.label.value:not(.highlighted)").classed(c,!0),u.selectAll("div.label.value.highlighted").classed("unfocus",!1).classed("dontshow",!1),u.selectAll("rect.highlighted").classed("unfocus",!1),u.selectAll("rect:not(.highlighted)").classed("unfocus",!0)}else u.selectAll(".unfocus").classed("unfocus",!1),"hover"===i&&u.selectAll("div.label.value").classed("dontshow",!0);u.selectAll(".cc-swatch").classed("unfocus",(function(e){return a&&!t.__highlightedSeries.length&&!e._isHighlighted})),u.selectAll(".series.label text").text(""),u.selectAll(".tick.primary").classed("unfocus",!1),r("highlight.clear")}}}(n),n.renderChart(e,r),n.renderingComplete()}else n.renderingComplete()},renderChart:function(){this.getBarColumn()&&this.renderSharedMarkup()},renderSharedMarkup:function(t){var e=this,n=e.__canvas.margin,r=e.__svgMarkup.svgRoot;e.renderAnnotations(),e.initScalesAndGrids(),e.initValueFormatter(),r.transition().duration(t?e.animation.duration:0).attr("transform","translate("+n.l+","+n.t+")"),e.renderAnnotations(),e.renderColumns(),e.addValueLabels(),e.addLabels("series"),e.addXGridHoverLabels()},marginsChanged:function(){if(!(this._marginChangeCount++>15)){var t=this.__canvas,e=t.size,n=t.margin;n.b=n.annotationKeys+n.legend.bottom,n.t=n.legend.top,n.l=Math.max(n.yGrid.left,n.xGrid.left),n.r=Math.max(n.yGrid.right,n.xGrid.right,n.directLabels),n.t+=Math.max(n.xGrid.top+n.labels.top,n.yGrid.top),n.b+=Math.max(n.xGrid.bottom+n.labels.bottom,n.yGrid.bottom),e.width=e.outerWidth-n.l-n.r,e.height=e.outerHeight-n.t-n.b,this.initScalesAndGrids()}},initScalesAndGrids:function(){var t=this;t.calculateScales(),t.renderYGrid(),t.renderXGrid(),t.seriesAndValueLabelPadding(),t.adjustXGrid()},calculateScales:function(){var t=this,e=t.__canvas,n=e.size,r=e.marginInner;t.__scales={y:Di().domain(t.getDomain()).range([n.height,0]),x:(t.isTimeScale()?$o:ri)().domain(t.getDomainX()).rangeRound([r.l,n.width-r.r])}},seriesAndValueLabelPadding:function(){var t=this,e=t.__canvas,n=e.size,r=e.margin;t.__rotateLabels=t.rotateLabels();var i=t.getDomain(),a=t.valueDistribution().diverging,o={tpad:0,bpad:0},u=[n.height,0],s=Di().domain(i).range(u),c=0;!function e(r,i){var o={tpad:0,bpad:0},u=t.checkSeriesLabelSpace(r,n.height,i),s=t.checkValueLabelSpace(r,n.height,i);if(t._isGrouped()&&a)return r.tpad+=s.tpad,void(r.bpad+=u.bpad+s.bpad);[u,s].forEach((function(t){Object.keys(t).forEach((function(e){o[e]=Math.max(t[e],o[e])}))})),(o.tpad>0||o.bpad>0)&&r.tpad+r.bpad0?n.y(0)-n.y(t.value):n.y(t.value)-n.y(0)})).style("fill",(function(t){return!i||i&&t._isHighlighted?a(t._columnFill):a(t._hlColor)}))}s.exit().remove(),t=s.enter().append("rect.column"),u&&c(!1,t),c(u)},addLabels:function(t){var e=this,n=e.chart(),r=e.get("valueLabels.enabled",!0),i=e.chart().hasHighlight();if(("value"!==t||r||i)&&("series"!==t||!e.isTimeScale())){var a,o=e.__update,u=e.__scales,s=e.__canvas.margin,c=e.valueDistribution(),l=c.diverging,f=c.neg,h="value"===t?e.valueDist():e.seriesDist(),d="series"===t&&e.__rotateLabels,p="series"===t?e.seriesLabelData():e.columnData(),g=e.labelHeight("X","value",100),v=o?e._$chart.select("div.labels."+t):e._$chart.append("div.labels."+t),m=v.selectAll("div.label."+t).data(p,(function(t){return t.x})).classed("rotate90",!1);m.exit().remove(),(a=m.enter().append("div.label."+t).classed("smaller","series"===t&&e.useSmallerLabels()).classed("highlighted",(function(t){return i&&t._isHighlighted}))).append("span").style("color",e.__themeProps[t]),v.selectAll("div.label").classed("outline","value"===t&&!e.isTimeScale()).each((function(n){ct(this).select("span").html("value"===t?e.formatValue(n):n.label)})),o&&y(!1,a),y(o),d&&v.selectAll("div.label.series").classed("rotate90",!0).classed("lbl-align-right",(function(t){return"top"===t.align})).classed("lbl-align-left",(function(t){return"bottom"===t.align})),"value"===t&&e.applyValueLabelClasses()}function y(r,i){var a=i||v.selectAll("div.label");o&&"value"===t&&v.selectAll("div.label").style("overflow","hidden");var c=!!i;a.transition(e.t(r)).style("width",(function(r){return r.lblW="value"===t?n.getElementBounds(ct(this).select("span").node()).width:d?r._rotatedLblW:e.labelSpace(),r.lblW+"px"})).style("left",(function(n){var r=u.x(n.x)-n.lblW/2+e.labelOffset();return"value"===t&&(r=e.fitLabel(r,n.lblW)),r+"px"})).style("top",(function(n){if("value"===t){var r=c?0:n.value,i=r>=0&&!f?-(g+h):h;return u.y(r)+s.t+i+"px"}var a=e._isGrouped()&&l?e.valueLabelSpace():0,o=e.labelHeight(n.label,e.sLblClass(n),n.lblW);if(d){var p=(n.lblW/2+h+2)*("bottom"===n.align?-1:1);return u.y(n.y)+s.t-o/2+p+a+"px"}var v="top"===n.align?h:-(h+o);return u.y(n.y)+s.t+v+a+"px"})).on("end",(function(){return v.selectAll("div.label").style("overflow",null)}))}},addValueLabels:function(){this.addLabels("value")},fitLabel:function(t,e){return Math.min(this.chartBbox().right-e,Math.max(0,t))},applyValueLabelClasses:function(){var t=this.chart().hasHighlight(),e=this.get("valueLabels.enabled",!0),n=this.get("valueLabels.show","hover"),r=this._$chart.selectAll(".label.value");if(t){var i=e&&"hover"!==n?"unfocus":"dontshow";r.classed("highlighted",(function(t){return t._isHighlighted})).classed(i,(function(t){return!t._isHighlighted}))}else r.classed("dontshow","hover"===n&&e)},addXGridHoverLabels:function(){var t=this;if(t.isTimeScale()){t.initDateFormatter();var e=t.__svgMarkup.gridAbove,n=t.__scales,r=e.select("g.x-tick-labels").append("g.labels.series"),i=t.columnData(),a="top"===t.getXAxisPosition(),o=t.__themeProps.xGridOpts.tickLabels,u=Pu(t.__themeProps.xGridOpts,"tickLabels.fontSize",Pu(t.theme(),"style.chart.fontSize",12)),s=r.selectAll("g.label.series").data(i).enter().append("g.label.series").classed("top",a).classed("bottom",!a).translate((function(t){return[n.x(t.x),0]}));["bg","fg"].forEach((function(e){var n=s.append("text.label.series."+e).attr("y",a?-1*(t._xFormatter.length-1)*(u+3):u).classed("dw-bold",!0).style("font-size",o.fontSize?o.fontSize+"px":null);"fg"===e&&n.style("fill",o.color)}))}},useSmallerLabels:function(){return this.segmentWidth()<30},rotateLabels:function(){var t=this,e=t.get("rotate-labels","auto");if("on"===e)return!0;if("off"===e)return!1;var n=!1;return t.seriesLabelData().forEach((function(e){n||t.labelWidth(e.label,t.sLblClass(e),0)>t.labelSpace()&&(n=!0)})),n},sLblClass:function(t){var e=this._isColumnChart()?"hover":"",n=t._isHighlighted;return"label series"+(this.useSmallerLabels()?" smaller":"")+" "+(n?"highlighted":e)},getBarColumn:function(t){var e=this.__lastRow;if(void 0===e)throw new Error("filter must not be undefined");return void 0===this.axesDef.columns[e]?null:this.dataset.column(this.axesDef.columns[e])},update:function(){var t=this;delete t.__columnWidth,delete t.__seriesLabelData,delete t.__domain,delete t.__dataDomain,t.__update=!0,t.renderSharedMarkup(!0)},getDomain:function(){var t=this;return t.__domain||(t.__domain=t.applyCustomRange(t.dataDomain())),t.__domain},dataDomain:function(){var t=this;if(t.__dataDomain)return t.__dataDomain;var e=t.columnData().filter((function(t){return!t.noData})).map((function(t){return t.value})),n=[Math.min.apply(Math,e.concat([0])),Math.max.apply(Math,e.concat([0]))];return t.get("absolute-scale",!1)&&(n=dw.utils.minMax(t.axes(!0).columns),n=[Math.min(0,n[0]),Math.max(0,n[1])]),t.__dataDomain=n,n},applyCustomRange:function(t){var e=[t[0],t[1]],n=this.useCustomRange(),r=this.get("custom-range",[]).map((function(t){return+t}));return n[0]&&(e[0]=Math.min(r[0],t[0])),n[1]&&(e[1]=Math.max(r[1],t[1])),e},useCustomRange:function(){var t=this.getBarColumn().range(),e=this.get("custom-range",["",""]);if(""===e[0]&&""===e[1])return[!1,!1];e=e.map((function(t){return+t}));var n=[];return n[0]=!isNaN(e[0])&&e[0]t[1],n},leftOffset:function(){var t=this.getColumnWidth();return Math.round((this.isTimeScale()?0:this.segmentWidth())/2-t/2)},chartBbox:function(){var t=this;return t.__chartBbox||(t.__chartBbox=t.chart().getElementBounds(t._$chart.node())),t.__chartBbox},labelOffset:function(){return this.__canvas.margin.l+(this.isTimeScale()?0:this.segmentWidth()/2)},nSeries:function(){return this.columnData().length},labelSpace:function(){return.9*this.segmentWidth()},columnWidth:function(){return this.getColumnWidth()},segmentWidth:function(){var t=this.__canvas,e=t.size,n=t.marginInner;return(e.width-n.l-n.r)/this.nSeries()},axisLabelsAlignment:function(){return this._isStacked()&&this.useDirectLabeling()?"left":this.get("yAxisLabels.alignment","left")},getColumnWidth:function(){var t=this;if(t.__columnWidth)return t.__columnWidth;var e=t.__canvas.size,n="grouped-column-chart"===t.meta.id?"series":"bar",r=1-.5*t.get(n+"-padding",30)/100;if(t.isTimeScale()){var i=t.getDates(),a=i.slice(1).map((function(t,e){return t-i[e]})),o=Math.min.apply(null,a.filter(Boolean)),u=a.reduce((function(t,e){return t+(e>o?e/o-1:0)}),0),s=i.length+u,c=e.width/(s+1)*r,l=t.getDomainX(!0),f=t.getDomainX(),h=Math.abs(l[1]-l[0])/Math.abs(f[1]-f[0]);return t.__columnWidth=Math.round(c*h),t.__columnWidth}var d=t.getDomainX().length;if(t.__columnWidth=e.width/d*r,t.groupSpacing()){var p=t.nSeries(),g=t.get("yAxisLabels.enabled",!0)?p:p-1;t.__columnWidth-=t.groupSpacing()*g/p}return t.__columnWidth},getCustomTicksY:function(){var t=this,e=t.get("custom-ticks","");return e?dw.column("x",e.split(","),"number").values().map((function(e){return e*(t.isNormalized()?.01:1)})):[]},getCustomTicksX:function(){var t=this.getDates();if(!this.get("custom-ticks-x"))return t.length<5?t:[];var e=dw.column("labels",this.get("custom-ticks-x").split(","),"date").values();return!(e=e.filter(ju).sort((function(t,e){return t.getTime()-e.getTime()}))).length&&t.length<5?t:e},renderYGrid:function(){var t=this,e=t.__canvas,n=e.size,r=e.margin,i=e.marginInner,a=t.getColumnFormat(),o=[a["number-prepend"]||"",a["number-append"]||""],u=Math.pow(10,-a["number-divisor"]||0),s=t.__svgMarkup,c=s.gridBelow,l=s.gridAbove,f=t.theme(),h=t.get("yAxisLabels.enabled",!0),d=t.get("grid-lines",!0),p=t.getCustomTicksY(),g=t.isNormalized(),v=!h&&!d,m=t.get("y-grid-format","auto"),y=t.axisLabelsAlignment(),b=t.chart();if(r.yGrid=function(t){var e=ye("y",t),n=e.options,r=e.themeOpts,i=Oe(n),a=i.ticksMinor,o=i.ticksMajor,u=[an,on,un,sn],s={top:0,left:0,right:0,bottom:0,labelWidth:0},c=n.tickPosition;return u.forEach((function(t){var e=t({options:n,themeOpts:r,ticksMajor:o,ticksMinor:a});e&&e.width>s[c]&&(s[c]=e.width),e&&e.top>s.top&&(s.top=e.top),e&&e.bottom>s.bottom&&(s.bottom=e.bottom),e&&e.labelWidth>s.labelWidth&&(s.labelWidth=e.labelWidth)})),s}({visId:"column-chart",className:"grid-y",belowChart:c,aboveChart:l,scale:t.__scales.y,scaleType:"number",plotSize:[n.width,n.height],tickPosition:y,tickLabels:h,gridLines:d,theme:f,tickLabelsInside:t.insideTicks(),secondary:!0,tickLabelFormat:g?m.replace("%",""):m,tickLabelMultiply:g?100:u,tickLabelUnit:g?["","%"]:o,minusChar:t._minus,baseLine:["zero"],ticks:{major:{values:p.length&&!v?p:void 0}},emotion:b.emotion,translate:b.translate}),t.insideTicks()){var w=[];l.selectAll("text.y-tick-label tspan").each((function(e){var n=ct(this);if(o[0]||o[1]){var a=n.text(),u=a.replace(o[0],"").replace(o[1],"");n.text(u),w.push(t.chart().getElementBounds(n.node()).width),n.text(a),i[y.slice(0,1)]=Math.max.apply(Math,w)+5}else i[y.slice(0,1)]=r.yGrid.labelWidth+5}))}for(var x=0,_=["top","left","bottom","right"];x<_.length;x+=1){var M=_[x];if(r.yGrid[M]>r[M.slice(0,1)]){t.marginsChanged();break}}},renderXGrid:function(){var t=this,e=t.__svgMarkup,n=e.gridBelow,r=e.gridAbove,i=t.__canvas,a=i.size,o=i.margin,u=t.__scales,s=t.theme(),c=Pu(s,"style.chart.gridFrame.vertical",[]),l=t.verticalBaseLine(),f=!t.isTimeScale()&&l;if(t.isTimeScale()||l){var h=t.axisLabelsAlignment(),d=[];l&&(c.includes("axisSide")&&d.push(h),c.includes("oppositeSide")&&d.push("left"===h?"right":"left"));var p=t.getXAxisPosition(),g=t.get("grid-lines-x.enabled",!1),v=t.getCustomTicksX(),m=t.get("x-grid-format","auto"),y=t.chart(),b=t.get("grid-lines-x.type","ticks"),w=Di().range([0,1]).domain([0,1]),x={visId:"column-chart",className:"grid-x",belowChart:n,aboveChart:r,scale:f?w:u.x,scaleType:"date",secondary:!1,plotSize:[a.width,a.height],tickPosition:p,gridLines:!f&&"lines"===b&&g,tickLines:!f&&"ticks"===b&&g,tickLabels:!f,theme:s,tickLabelFormat:m,minusChar:Pu(s,"typography.chart.minusCharacter","−"),baseLine:d,ticks:{major:{values:v.length&&!f?v:void 0}},translate:y.translate,emotion:y.emotion};t.__xFormat="auto"===m?Ye(u.x.domain(),Oe(x).ticksMajor):m;for(var _=Qe(x),M=0,k=["top","left","bottom","right"];M1){o.xGrid=Qe(x),t.marginsChanged();break}}}},adjustXGrid:function(){var t=this.__canvas.marginInner;t.b&&this._$chart.selectAll("g.x-tick-lines, g.x-tick-labels").each((function(e){var n=ct(this).attr("transform").match(/([\d.]+)[^\d+]([\d.]+)/);if(n){var r="translate("+n[1]+","+(parseFloat(n[2])+t.b)+")";ct(this).attr("transform",r)}}))},verticalBaseLine:function(){var t=this.get("yAxisLabels.enabled",!0),e=Pu(this.theme(),"style.chart.gridFrame.vertical",[]);return t&&e.length&&!this.insideTicks()},valueDistribution:function(){var t=!0,e=!0;return this.columnData().forEach((function(n){n.value<0&&(t=!1),n.value>0&&(e=!1)})),{pos:t,neg:e,mix:!e&&!t}},getXAxisPosition:function(){var t=this.__domain||this.getDomain();return this.valueDistribution().neg&&0===Math.max.apply(Math,t)?"top":"bottom"},tickDist:function(){return Pu(this.theme(),"vis.column-chart.axes.tickDist.vertical",8)},valueDist:function(){return Pu(this.theme(),"vis.column-chart.labels.values.dist",5)},seriesDist:function(){var t=this.__themeProps.xGridOpts.tickLabels.distance;return this.isTimeScale()?t:Pu(this.theme(),"vis.column-chart.labels.series.dist",t)},xTickLength:function(){var t=this.get("grid-lines-x.enabled",!1);return"ticks"===this.get("grid-lines-x.type","ticks")&&t?Pu(this.theme(),"style.chart.axes.ticks.horizontal.length",5):0},xTickFontSize:function(){return function(t,e,n,r){var i=null;return e.forEach((function(e){null===i&&(i=Pu(t,e+"."+n))})),i||r}(this.theme(),["vis.column-chart.labels.ticks.horizontal","style.chart.labels.ticks.horizontal","typography.chart"],"fontSize",12)},valueLabelH:function(){return this.__vLblHeight=this.__vLblHeight||this.labelHeight("10","value",100),this.__vLblHeight},valueLabelSpace:function(){return this.valueLabelsEnabled()?this.valueLabelH()+this.valueDist():0},valueLabelsEnabled:function(){return this.get("valueLabels.enabled",!0)||this.chart().hasHighlight()},groupSpacing:function(){return"grouped-column-chart"!==this.meta.id?0:Pu(this.theme(),"vis.grouped-column-chart.axes.gridlines.gapBetweenGroups",0)},renderGridGroups:function(){var t=this,e=t.__canvas,n=e.size,r=e.margin,i=t.groupSpacing();if(i){var a=t.__svgMarkup,o=a.gridBelow,u=a.gridAbove,s=t.insideTicks(),c=t.nSeries(),l=t.segmentWidth(),f=i/2,h=n.outerWidth-r.r,d=t.columnData().map((function(e,n){return{x1:0===n&&s?0:t.__scales.x(e.x)+f,x2:s&&n===c-1?h:t.__scales.x(e.x)+l-f}}));["grid","base"].forEach((function(t){var e="g.y-"+t+"-lines",n=o.select(e).node()?o:u,r=n.select(e).remove().node();n.selectAll(e).data(d).enter().append((function(){return r.cloneNode(!0)})).each((function(t){ct(this).selectAll("line").attr("x1",t.x1).attr("x2",t.x2)}))}))}},formattedLabel:function(t){return this.dataset.column(this.axes().labels).type(!0).formatter()(this.axes(!0).labels.val(t))+""||""},highlightKey:function(t){return this.formattedLabel(t)},label:function(t){return dw.utils.purifyHtml(this.axes(!0).labels.raw(t),"")||""},colorKey:function(t){var e=this.axes(!0).labels;return"text"!==this.axes(!0).labels.type()?dw.utils.purifyHtml(e.raw(t)):dw.utils.purifyHtml(e.val(t,!0)||e.val(t)||"")},colorKeys:function(){var t=this,e=[];return t.dataset.eachRow((function(n){e.push(t.colorKey(n))})),e},initGetColor:function(){var t=this,e=Pu(t.theme(),"style.chart.highlights.noFade",!1),n=t.get("base-color",0),r={customColors:Object.assign({},t.__customColors,t.get("custom-colors",{})),selectedColor:n};t.get("negative-color",!1)&&(r.negativeColor=t.theme().colors.negative);var i=zr(t.theme(),r),a=i;if(t.chart().hasHighlight()){var o=t.theme().colors.background;a=function(n,r,a,u){return t.chart().isHighlighted(t.formattedLabel(r))||u||e?i(n,r,a):me.interpolate(i(n,r,a),o,.65,"rgb").hex()}}t.getColor=a},fmtColumn:function(){return"column-chart"!==this.meta.id?this.dataset.column(this.axesDef.columns[0]):this.getBarColumn()},getColumnFormat:function(){return this.chart().get("metadata.data.column-format",{})[this.fmtColumn().name()]||{}},initValueFormatter:function(){var t,e,n=this,r=n.isNormalized(),i=n.shortPrependAppend()&&!r,a=n.getColumnFormat(),o=n.get("y-grid-format","auto");"auto"===o&&(t=n.__scales.y.domain(),e=Math.abs(t[1]-t[0]),o=e<1?"0,0.00[0]":e<3?"0,0.0[0]":e<1e4?"0,0.[0]":e>1e6||Math.abs(t[0])>1e5||Math.abs(t[1])>1e5?"0,0a":"0,0"),r&&!o.includes("%")&&(o+="%"),n.formatValue=function(t){return t.noData?"":function(t,e){var n=(e=Object.assign({},{format:"0.[00]",prepend:"",append:"",minusChar:"−",multiply:1},e)).format,r=e.append,i=e.prepend,a=e.minusChar,o=e.multiply;n.includes("%")&&Number.isFinite(t)&&(t*=.01),t*=o;var u=n.indexOf("(")>-1,s=xe(u?t:Math.abs(t)).format(n);return i&&!u&&t<0&&Ru.has(i.trim().toLowerCase())?""+a+i+s.replace("+","")+r:i&&t>=0&&Ru.has(i.trim().toLowerCase())&&n.includes("+")?(0===t?"±":"+")+i+s.replace("+","")+r:0===t&&n.includes("+")?""+i+s.replace("+","±")+r:t<0&&!u?""+i+a+s.replace("+","")+r:""+i+s+r}(t.value*(r?100:1),{format:o,append:i&&a["number-append"]||"",prepend:i&&a["number-prepend"]||"",multiply:Math.pow(10,-a["number-divisor"]||0),minusChar:n._minus})}},_isStacked:function(){return"stacked-column-chart"===this.meta.id},_isGrouped:function(){return"grouped-column-chart"===this.meta.id},_isColumnChart:function(){return"column-chart"===this.meta.id},isNormalized:function(){return!!this._isStacked()&&(!this.valueDistribution().diverging&&this.get("normalize",!1))},getDates:function(t){var e=this,n=e.dataset.list().map((function(t,n){return{date:t[e.axesDef.labels],_i:n}})).filter((function(t){return ju(t.date)}));return e.isMMMFormat()&&(n=e.fixMMMFormat(n)),n=n.sort((function(t,e){return t.date.getTime()-e.date.getTime()})),t?n:n.map((function(t){return t.date}))},isMMMFormat:function(){var t=this.axes(!0).labels,e=Array.from({length:t.length}).map((function(e,n){return t.raw(n)}));return"MMM"===dw.column.types.date(e).format()},fixMMMFormat:function(t){var e=!1,n=0;return t.forEach((function(r,i){e||0===i||(n=ju(t[i-1].date)?t[i-1].date.getTime():n,ju(r.date)&&r.date.getTime()=0?"top":"bottom",t.y=0,t}))),this.__seriesLabelData},getDomainX:function(t){var e=this;if(e.isTimeScale()){var n=e.getDates(),r=Wr(n),i=t?[]:e.get("custom-range-x",[]);return i.length&&(dw.column("",i,"date").values().forEach((function(t){ju(t)&&r.push(t)})),r=Wr(r)),function(t,e){var n=t[0].getTime(),r=t[1].getTime(),i=(r-n)*e;return[new Date(n-i),new Date(r+i)]}(r,.5/n.length)}return e._isStacked(),e.columnData().map((function(t){return t.x}))},setRoot:function(t){ct(t).classed(this.chart().get("type"),!0).style("position","relative")},renderAnnotations:function(t,e){var n=this,r=n.__canvas,i=r.size,a=r.margin;if(n.__scales||n.calculateScales(),n._annotationLayer){var o=Ku(n.__scales,i.height,n.__domain),u=Ju(n.__scales,i.height,n.__domain);Qu(n),n._annotationLayer.$set({dataToPx:o,pxToData:u})}else n._annotationLayer=function(t){var e=t.__canvas.size,n=t.chart(),r=t._$chart,i=t.__scales,a=t.chart().inEditor(),o=a?function(){var t=window.parent.dw.backend.hooks.call("get-annotation-controls").results;if(t&&t.length)return window.__registerAnnotationControls=void 0,t[t.length-1];window.__registerAnnotationControls=function(t){c.$set({editMode:!0}),t.syncAnnotationLayer(c)}}():null,u=Vu(t.get("text-annotations",[])),s=Vu(t.get("range-annotations",[]));if(u.length||s.length||a){u.forEach((function(e){e.x=Zu(e.x),e.y=+e.y,t.isNormalized()&&(e.y=e.y/100)})),s.forEach((function(e){e.x0=Zu(e.x0),e.x1=Zu(e.x1),e.y0=+e.y0,e.y1=+e.y1,t.isNormalized()&&(e.y0=e.y0/100,e.y1=e.y1/100)}));var c,l=r.append("div.annotation-keys"),f=r.append("div.annotations-outer").append("div.annotations"),h=Ku(i),d=Ju(i);if(Qu(t),t._annotationLayer)try{t._annotationLayer.$destroy()}catch(t){}t.isTimeScale()&&!t.__filterUI&&(c=new Xu({target:f.node(),props:{textAnnotations:u,rangeAnnotations:s,dataToPx:h,pxToData:d,theme:t.theme(),cm:t.colorMap(),visWidth:e.width,annotationKeysSel:l}}),o&&(c.$set({editMode:!0}),o.syncAnnotationLayer(c))),o&&function(t,e){if(t&&!e){var n=o.get().editorState;n.disableControls=!1,o.set({editorState:n})}else{var r=e?"Annotations can not be used because the chart is currently set to display tabs.":"Annotations can not be used because you are not using a date axis.",i=o.get().editorState;i.disableControls=!0,i.messages={disableControls:r},o.set({editorState:i})}}(t.isTimeScale(),!!t.__filterUI);var p=r.select(".annotation-keys:not(.hide)").node();return t.__annotationKeyHeight=p&&p.children.length?n.getElementBounds(p).height+20:0,c}}(n);a.annotationKeys=n.__annotationKeyHeight||0},shortPrependAppend:function(){var t=this.getColumnFormat();return((t["number-prepend"]||"").trim()+(t["number-append"]||"").trim()).length<4},initLocales:function(){ln(this.chart().locales);try{var t=this.chart().locales.dayjs;t&&De.locale(t)}catch(t){}try{var e=this.chart().locales.numeral;e&&function(t){Hu||(xe.register("locale","dw",t),xe.locale("dw"),Hu=!0)}(e)}catch(t){}},initDateFormatter:function(){var t=this.__xFormat,e=0;this._$chart.selectAll(".x-tick-labels text").each((function(t){e=Math.max(this.childElementCount,e)})),this._xFormatter=t.split("|").reduce((function(t,n){return t.length