forked from noahamac/mp-viz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsunburst.js
1 lines (1 loc) · 99.4 KB
/
sunburst.js
1
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sunburst=e():t.sunburst=e()}(window,(function(){return n={},t.m=e={18:function(t,e,n){var r={};!function(t){function e(t){for(var e="",n=t.length-1;0<=n;)e+=t.charAt(n--);return e}function n(t,e){for(var n="";n.length<e;)n+=t;return n}function r(t,e){var r=""+t;return e<=r.length?r:n("0",e-r.length)+r}function i(t,e){var r=""+t;return e<=r.length?r:n(" ",e-r.length)+r}function a(t,e){var r=""+t;return e<=r.length?r:r+n(" ",e-r.length)}t.version="0.11.0";var o=Math.pow(2,32);function u(t,e){return o<t||t<-o?(r=t,(i=e)<=(a=""+Math.round(r)).length?a:n("0",i-a.length)+a):(u=e)<=(s=""+Math.round(t)).length?s:n("0",u-s.length)+s;var r,i,a,u,s}function s(t,e){return e=e||0,t.length>=7+e&&103==(32|t.charCodeAt(e))&&101==(32|t.charCodeAt(e+1))&&110==(32|t.charCodeAt(e+2))&&101==(32|t.charCodeAt(e+3))&&114==(32|t.charCodeAt(e+4))&&97==(32|t.charCodeAt(e+5))&&108==(32|t.charCodeAt(e+6))}var c=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],l=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function h(t){t[0]="General",t[1]="0",t[2]="0.00",t[3]="#,##0",t[4]="#,##0.00",t[9]="0%",t[10]="0.00%",t[11]="0.00E+00",t[12]="# ?/?",t[13]="# ??/??",t[14]="m/d/yy",t[15]="d-mmm-yy",t[16]="d-mmm",t[17]="mmm-yy",t[18]="h:mm AM/PM",t[19]="h:mm:ss AM/PM",t[20]="h:mm",t[21]="h:mm:ss",t[22]="m/d/yy h:mm",t[37]="#,##0 ;(#,##0)",t[38]="#,##0 ;[Red](#,##0)",t[39]="#,##0.00;(#,##0.00)",t[40]="#,##0.00;[Red](#,##0.00)",t[45]="mm:ss",t[46]="[h]:mm:ss",t[47]="mmss.0",t[48]="##0.0E+0",t[49]="@",t[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',t[65535]="General"}var f={};function g(t,e,n){for(var r=t<0?-1:1,i=t*r,a=0,o=1,u=0,s=1,c=0,l=0,h=Math.floor(i);c<e&&(u=(h=Math.floor(i))*o+a,l=h*c+s,!(i-h<5e-8));)i=1/(i-h),a=o,o=u,s=c,c=l;if(e<l&&(u=e<c?(l=s,a):(l=c,o)),!n)return[0,r*u,l];var f=Math.floor(r*u/l);return[f,r*u-f*l,l]}function p(t,e,n){if(2958465<t||t<0)return null;var r,i=0|t,a=Math.floor(86400*(t-i)),o=0,u=[],s={D:i,T:a,u:86400*(t-i)-a,y:0,m:0,d:0,H:0,M:0,S:0,q:0};return Math.abs(s.u)<1e-6&&(s.u=0),e&&e.date1904&&(i+=1462),.9999<s.u&&(s.u=0,86400==++a&&(s.T=a=0,++i,++s.D)),60===i?(u=n?[1317,10,29]:[1900,2,29],o=3):0===i?(u=n?[1317,8,29]:[1900,1,0],o=6):(60<i&&--i,(r=new Date(1900,0,1)).setDate(r.getDate()+i-1),u=[r.getFullYear(),r.getMonth()+1,r.getDate()],o=r.getDay(),i<60&&(o=(o+6)%7),n&&(o=0)),s.y=u[0],s.m=u[1],s.d=u[2],s.S=a%60,a=Math.floor(a/60),s.M=a%60,a=Math.floor(a/60),s.H=a,s.q=o,s}h(f),t.parse_date_code=p;var d=new Date(1899,11,31,0,0,0),v=d.getTime(),m=new Date(1900,2,1,0,0,0);function y(t,e){var n=t.getTime();return e?n-=1262304e5:m<=t&&(n+=864e5),(n-(v+6e4*(t.getTimezoneOffset()-d.getTimezoneOffset())))/864e5}t._general_int=function(t){return t.toString(10)};var _,w,x,b,M,A=(_=/\.(\d*[1-9])0+$/,w=/\.0*$/,x=/\.(\d*[1-9])0+/,b=/\.0*[Ee]/,M=/(E[+-])(\d)$/,function(t){var e,n,r,i,a,o=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),u=-4<=o&&o<=-1?t.toPrecision(10+o):Math.abs(o)<=9?(i=(r=t)<0?12:11,(a=k(r.toFixed(12))).length<=i||(a=r.toPrecision(10)).length<=i?a:r.toExponential(5)):10===o?t.toFixed(10).substr(0,12):((n=(e=t).toFixed(11).replace(_,".$1")).length>(e<0?12:11)&&(n=e.toPrecision(6)),n);return k(function(t){for(var e=0;e!=t.length;++e)if(101==(32|t.charCodeAt(e)))return t.replace(x,".$1").replace(b,"E").replace("e","E").replace(M,"$10$2");return t}(u))});function k(t){return-1<t.indexOf(".")?t.replace(w,"").replace(_,".$1"):t}function C(t,e){switch(typeof t){case"string":return t;case"boolean":return t?"TRUE":"FALSE";case"number":return(0|t)===t?t.toString(10):A(t);case"undefined":return"";case"object":if(null==t)return"";if(t instanceof Date)return I(14,y(t,e&&e.date1904),e)}throw new Error("unsupported value in General format: "+t)}function T(t){if(t.length<=3)return t;for(var e=t.length%3,n=t.substr(0,e);e!=t.length;e+=3)n+=(0<n.length?",":"")+t.substr(e,3);return n}t._general_num=A,t._general=C;var E,S,N,D,O,$=(E=/%/g,S=/# (\?+)( ?)\/( ?)(\d+)/,N=/^#*0*\.([0#]+)/,D=/\).*[0#]/,O=/\(###\) ###\\?-####/,function(t,e,n){return((0|n)===n?Y:P)(t,e,n)});function U(t){for(var e,n="",r=0;r!=t.length;++r)switch(e=t.charCodeAt(r)){case 35:break;case 63:n+=" ";break;case 48:n+="0";break;default:n+=String.fromCharCode(e)}return n}function F(t,e){var n=Math.pow(10,e);return""+Math.round(t*n)/n}function H(t,e){return e<(""+Math.round((t-Math.floor(t))*Math.pow(10,e))).length?0:Math.round((t-Math.floor(t))*Math.pow(10,e))}function P(t,o,s){if(40===t.charCodeAt(0)&&!o.match(D)){var c=o.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return 0<=s?P("n",c,s):"("+P("n",c,-s)+")"}if(44===o.charCodeAt(o.length-1))return function(t,e,n){for(var r=e.length-1;44===e.charCodeAt(r-1);)--r;return $(t,e.substr(0,r),n/Math.pow(10,3*(e.length-r)))}(t,o,s);if(-1!==o.indexOf("%"))return l=t,f=s,p=(h=o).replace(E,""),d=h.length-p.length,$(l,p,f*Math.pow(10,2*d))+n("%",d);var l,h,f,p,d,v;if(-1!==o.indexOf("E"))return function t(e,n){var r,i=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==n)return"0.0E+0";if(n<0)return"-"+t(e,-n);var a=e.indexOf(".");-1===a&&(a=e.indexOf("E"));var o=Math.floor(Math.log(n)*Math.LOG10E)%a;if(o<0&&(o+=a),-1===(r=(n/Math.pow(10,o)).toPrecision(1+i+(a+o)%a)).indexOf("e")){var u=Math.floor(Math.log(n)*Math.LOG10E);for(-1===r.indexOf(".")?r=r.charAt(0)+"."+r.substr(1)+"E+"+(u-r.length+o):r+="E+"+(u-o);"0."===r.substr(0,2);)r=(r=r.charAt(0)+r.substr(2,a)+"."+r.substr(2+a)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,(function(t,e,n,r){return e+n+r.substr(0,(a+o)%a)+"."+r.substr(o)+"E"}))}else r=n.toExponential(i);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}(o,s);if(36===o.charCodeAt(0))return"$"+P(t,o.substr(" "==o.charAt(1)?2:1),s);var m,y,_,w,x,b,M,A,k,C,Y,q,L,j=Math.abs(s),R=s<0?"-":"";if(o.match(/^00+$/))return R+u(j,o.length);if(o.match(/^[#?]+$/))return"0"===(v=u(s,0))&&(v=""),v.length>o.length?v:U(o.substr(0,o.length-v.length))+v;if(m=o.match(S))return w=m,x=j,b=R,M=parseInt(w[4],10),A=Math.round(x*M),b+(0===(k=Math.floor(A/M))?"":""+k)+" "+(0==(C=A-k*(Y=M))?n(" ",w[1].length+1+w[4].length):i(C,w[1].length)+w[2]+"/"+w[3]+r(Y,w[4].length));if(o.match(/^#+0+$/))return R+u(j,o.length-o.indexOf("0"));if(m=o.match(N))return v=F(s,m[1].length).replace(/^([^\.]+)$/,"$1."+U(m[1])).replace(/\.$/,"."+U(m[1])).replace(/\.(\d*)$/,(function(t,e){return"."+e+n("0",U(m[1]).length-e.length)})),-1!==o.indexOf("0.")?v:v.replace(/^0\./,".");if(o=o.replace(/^#+([0.])/,"$1"),m=o.match(/^(0*)\.(#*)$/))return R+F(j,m[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,m[1].length?"0.":".");if(m=o.match(/^#{1,3},##0(\.?)$/))return R+T(u(j,0));if(m=o.match(/^#,##0\.([#0]*0)$/))return s<0?"-"+P(t,o,-s):T(""+(Math.floor(s)+(q=s,(L=m[1].length)<(""+Math.round((q-Math.floor(q))*Math.pow(10,L))).length?1:0)))+"."+r(H(s,m[1].length),m[1].length);if(m=o.match(/^#,#*,#0/))return P(t,o.replace(/^#,#*,/,""),s);if(m=o.match(/^([0#]+)(\\?-([0#]+))+$/))return v=e(P(t,o.replace(/[\\-]/g,""),s)),y=0,e(e(o.replace(/\\/g,"")).replace(/[0#]/g,(function(t){return y<v.length?v.charAt(y++):"0"===t?"0":""})));if(o.match(O))return"("+(v=P(t,"##########",s)).substr(0,3)+") "+v.substr(3,3)+"-"+v.substr(6);var z,X="";if(m=o.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return y=Math.min(m[4].length,7),_=g(j,Math.pow(10,y)-1,!1),v=R," "==(X=$("n",m[1],_[1])).charAt(X.length-1)&&(X=X.substr(0,X.length-1)+"0"),v+=X+m[2]+"/"+m[3],(X=a(_[2],y)).length<m[4].length&&(X=U(m[4].substr(m[4].length-X.length))+X),v+=X;if(m=o.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return y=Math.min(Math.max(m[1].length,m[4].length),7),R+((_=g(j,Math.pow(10,y)-1,!0))[0]||(_[1]?"":"0"))+" "+(_[1]?i(_[1],y)+m[2]+"/"+m[3]+a(_[2],y):n(" ",2*y+1+m[2].length+m[3].length));if(m=o.match(/^[#0?]+$/))return v=u(s,0),o.length<=v.length?v:U(o.substr(0,o.length-v.length))+v;if(m=o.match(/^([#0?]+)\.([#0]+)$/)){v=""+s.toFixed(Math.min(m[2].length,10)).replace(/([^0])0+$/,"$1"),y=v.indexOf(".");var B=o.indexOf(".")-y,I=o.length-v.length-B;return U(o.substr(0,B)+v+o.substr(o.length-I))}if(m=o.match(/^00,000\.([#0]*0)$/))return y=H(s,m[1].length),s<0?"-"+P(t,o,-s):T((z=s)<2147483647&&-2147483648<z?""+(0<=z?0|z:z-1|0):""+Math.floor(z)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,(function(t){return"00,"+(t.length<3?r(0,3-t.length):"")+t}))+"."+r(y,m[1].length);switch(o){case"###,##0.00":return P(t,"#,##0.00",s);case"###,###":case"##,###":case"#,###":var V=T(u(j,0));return"0"!==V?R+V:"";case"###,###.00":return P(t,"###,##0.00",s).replace(/^0\./,".");case"#,###.00":return P(t,"#,##0.00",s).replace(/^0\./,".")}throw new Error("unsupported format |"+o+"|")}function Y(t,o,u){if(40===t.charCodeAt(0)&&!o.match(D)){var s=o.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return 0<=u?Y("n",s,u):"("+Y("n",s,-u)+")"}if(44===o.charCodeAt(o.length-1))return function(t,e,n){for(var r=e.length-1;44===e.charCodeAt(r-1);)--r;return $(t,e.substr(0,r),n/Math.pow(10,3*(e.length-r)))}(t,o,u);if(-1!==o.indexOf("%"))return c=t,h=u,f=(l=o).replace(E,""),p=l.length-f.length,$(c,f,h*Math.pow(10,2*p))+n("%",p);var c,l,h,f,p,d;if(-1!==o.indexOf("E"))return function t(e,n){var r,i=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==n)return"0.0E+0";if(n<0)return"-"+t(e,-n);var a=e.indexOf(".");-1===a&&(a=e.indexOf("E"));var o,u=Math.floor(Math.log(n)*Math.LOG10E)%a;u<0&&(u+=a),(r=(n/Math.pow(10,u)).toPrecision(1+i+(a+u)%a)).match(/[Ee]/)||(o=Math.floor(Math.log(n)*Math.LOG10E),-1===r.indexOf(".")?r=r.charAt(0)+"."+r.substr(1)+"E+"+(o-r.length+u):r+="E+"+(o-u),r=r.replace(/\+-/,"-")),r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,(function(t,e,n,r){return e+n+r.substr(0,(a+u)%a)+"."+r.substr(u)+"E"}))}else r=n.toExponential(i);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}(o,u);if(36===o.charCodeAt(0))return"$"+Y(t,o.substr(" "==o.charAt(1)?2:1),u);var v,m,y,_,w,x=Math.abs(u),b=u<0?"-":"";if(o.match(/^00+$/))return b+r(x,o.length);if(o.match(/^[#?]+$/))return(d=0===u?"":""+u).length>o.length?d:U(o.substr(0,o.length-d.length))+d;if(v=o.match(S))return b+(0===(w=x)?"":""+w)+n(" ",(_=v)[1].length+2+_[4].length);if(o.match(/^#+0+$/))return b+r(x,o.length-o.indexOf("0"));if(v=o.match(N))return d=(d=(""+u).replace(/^([^\.]+)$/,"$1."+U(v[1])).replace(/\.$/,"."+U(v[1]))).replace(/\.(\d*)$/,(function(t,e){return"."+e+n("0",U(v[1]).length-e.length)})),-1!==o.indexOf("0.")?d:d.replace(/^0\./,".");if(o=o.replace(/^#+([0.])/,"$1"),v=o.match(/^(0*)\.(#*)$/))return b+(""+x).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,v[1].length?"0.":".");if(v=o.match(/^#{1,3},##0(\.?)$/))return b+T(""+x);if(v=o.match(/^#,##0\.([#0]*0)$/))return u<0?"-"+Y(t,o,-u):T(""+u)+"."+n("0",v[1].length);if(v=o.match(/^#,#*,#0/))return Y(t,o.replace(/^#,#*,/,""),u);if(v=o.match(/^([0#]+)(\\?-([0#]+))+$/))return d=e(Y(t,o.replace(/[\\-]/g,""),u)),m=0,e(e(o.replace(/\\/g,"")).replace(/[0#]/g,(function(t){return m<d.length?d.charAt(m++):"0"===t?"0":""})));if(o.match(O))return"("+(d=Y(t,"##########",u)).substr(0,3)+") "+d.substr(3,3)+"-"+d.substr(6);var M="";if(v=o.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return m=Math.min(v[4].length,7),y=g(x,Math.pow(10,m)-1,!1),d=b," "==(M=$("n",v[1],y[1])).charAt(M.length-1)&&(M=M.substr(0,M.length-1)+"0"),d+=M+v[2]+"/"+v[3],(M=a(y[2],m)).length<v[4].length&&(M=U(v[4].substr(v[4].length-M.length))+M),d+=M;if(v=o.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return m=Math.min(Math.max(v[1].length,v[4].length),7),b+((y=g(x,Math.pow(10,m)-1,!0))[0]||(y[1]?"":"0"))+" "+(y[1]?i(y[1],m)+v[2]+"/"+v[3]+a(y[2],m):n(" ",2*m+1+v[2].length+v[3].length));if(v=o.match(/^[#0?]+$/))return d=""+u,o.length<=d.length?d:U(o.substr(0,o.length-d.length))+d;if(v=o.match(/^([#0]+)\.([#0]+)$/)){d=""+u.toFixed(Math.min(v[2].length,10)).replace(/([^0])0+$/,"$1"),m=d.indexOf(".");var A=o.indexOf(".")-m,k=o.length-d.length-A;return U(o.substr(0,A)+d+o.substr(o.length-k))}if(v=o.match(/^00,000\.([#0]*0)$/))return u<0?"-"+Y(t,o,-u):T(""+u).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,(function(t){return"00,"+(t.length<3?r(0,3-t.length):"")+t}))+"."+r(0,v[1].length);switch(o){case"###,###":case"##,###":case"#,###":var C=T(""+x);return"0"!==C?b+C:"";default:if(o.match(/\.[0#?]*$/))return Y(t,o.slice(0,o.lastIndexOf(".")),u)+U(o.slice(o.lastIndexOf(".")))}throw new Error("unsupported format |"+o+"|")}function q(t){for(var e=[],n=!1,r=0,i=0;r<t.length;++r)switch(t.charCodeAt(r)){case 34:n=!n;break;case 95:case 42:case 92:++r;break;case 59:e[e.length]=t.substr(i,r-i),i=r+1}if(e[e.length]=t.substr(i),!0===n)throw new Error("Format |"+t+"| unterminated string ");return e}t._split=q;var L=/\[[HhMmSs]*\]/;function j(t){for(var e=0,n="",r="";e<t.length;)switch(n=t.charAt(e)){case"G":s(t,e)&&(e+=6),e++;break;case'"':for(;34!==t.charCodeAt(++e)&&e<t.length;);++e;break;case"\\":case"_":e+=2;break;case"@":++e;break;case"B":case"b":if("1"===t.charAt(e+1)||"2"===t.charAt(e+1))return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":if("A/P"===t.substr(e,3).toUpperCase())return!0;if("AM/PM"===t.substr(e,5).toUpperCase())return!0;++e;break;case"[":for(r=n;"]"!==t.charAt(e++)&&e<t.length;)r+=t.charAt(e);if(r.match(L))return!0;break;case".":case"0":case"#":for(;e<t.length&&(-1<"0#?.,E+-%".indexOf(n=t.charAt(++e))||"\\"==n&&"-"==t.charAt(e+1)&&-1<"0#".indexOf(t.charAt(e+2))););break;case"?":for(;t.charAt(++e)===n;);break;case"*":++e," "!=t.charAt(e)&&"*"!=t.charAt(e)||++e;break;case"(":case")":++e;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;e<t.length&&-1<"0123456789".indexOf(t.charAt(++e)););break;case" ":default:++e}return!1}function R(t,e,n,i){for(var a,o,u,h=[],f="",g=0,d="",v="t",m="H";g<t.length;)switch(d=t.charAt(g)){case"G":if(!s(t,g))throw new Error("unrecognized character "+d+" in "+t);h[h.length]={t:"G",v:"General"},g+=7;break;case'"':for(f="";34!==(u=t.charCodeAt(++g))&&g<t.length;)f+=String.fromCharCode(u);h[h.length]={t:"t",v:f},++g;break;case"\\":var y=t.charAt(++g),_="("===y||")"===y?y:"t";h[h.length]={t:_,v:y},++g;break;case"_":h[h.length]={t:"t",v:" "},g+=2;break;case"@":h[h.length]={t:"T",v:e},++g;break;case"B":case"b":if("1"===t.charAt(g+1)||"2"===t.charAt(g+1)){if(null==a&&null==(a=p(e,n,"2"===t.charAt(g+1))))return"";h[h.length]={t:"X",v:t.substr(g,2)},v=d,g+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":d=d.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(e<0)return"";if(null==a&&null==(a=p(e,n)))return"";for(f=d;++g<t.length&&t.charAt(g).toLowerCase()===d;)f+=d;"m"===d&&"h"===v.toLowerCase()&&(d="M"),"h"===d&&(d=m),h[h.length]={t:d,v:f},v=d;break;case"A":case"a":var w={t:d,v:d};if(null==a&&(a=p(e,n)),"A/P"===t.substr(g,3).toUpperCase()?(null!=a&&(w.v=12<=a.H?"P":"A"),w.t="T",m="h",g+=3):"AM/PM"===t.substr(g,5).toUpperCase()?(null!=a&&(w.v=12<=a.H?"PM":"AM"),w.t="T",g+=5,m="h"):(w.t="t",++g),null==a&&"T"===w.t)return"";h[h.length]=w,v=d;break;case"[":for(f=d;"]"!==t.charAt(g++)&&g<t.length;)f+=t.charAt(g);if("]"!==f.slice(-1))throw'unterminated "[" block: |'+f+"|";if(f.match(L)){if(null==a&&null==(a=p(e,n)))return"";h[h.length]={t:"Z",v:f.toLowerCase()},v=f.charAt(1)}else-1<f.indexOf("$")&&(f=(f.match(/\$([^-\[\]]*)/)||[])[1]||"$",j(t)||(h[h.length]={t:"t",v:f}));break;case".":if(null!=a){for(f=d;++g<t.length&&"0"===(d=t.charAt(g));)f+=d;h[h.length]={t:"s",v:f};break}case"0":case"#":for(f=d;++g<t.length&&-1<"0#?.,E+-%".indexOf(d=t.charAt(g));)f+=d;h[h.length]={t:"n",v:f};break;case"?":for(f=d;t.charAt(++g)===d;)f+=d;h[h.length]={t:d,v:f},v=d;break;case"*":++g," "!=t.charAt(g)&&"*"!=t.charAt(g)||++g;break;case"(":case")":h[h.length]={t:1===i?"t":d,v:d},++g;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(f=d;g<t.length&&-1<"0123456789".indexOf(t.charAt(++g));)f+=t.charAt(g);h[h.length]={t:"D",v:f};break;case" ":h[h.length]={t:d,v:d},++g;break;case"$":h[h.length]={t:"t",v:"$"},++g;break;default:if(-1===",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(d))throw new Error("unrecognized character "+d+" in "+t);h[h.length]={t:"t",v:d},++g}var x,b=0,M=0;for(g=h.length-1,v="t";0<=g;--g)switch(h[g].t){case"h":case"H":h[g].t=m,v="h",b<1&&(b=1);break;case"s":(x=h[g].v.match(/\.0+$/))&&(M=Math.max(M,x[0].length-1)),b<3&&(b=3);case"d":case"y":case"M":case"e":v=h[g].t;break;case"m":"s"===v&&(h[g].t="M",b<2&&(b=2));break;case"X":break;case"Z":b<1&&h[g].v.match(/[Hh]/)&&(b=1),b<2&&h[g].v.match(/[Mm]/)&&(b=2),b<3&&h[g].v.match(/[Ss]/)&&(b=3)}switch(b){case 0:break;case 1:.5<=a.u&&(a.u=0,++a.S),60<=a.S&&(a.S=0,++a.M),60<=a.M&&(a.M=0,++a.H);break;case 2:.5<=a.u&&(a.u=0,++a.S),60<=a.S&&(a.S=0,++a.M)}var A,k="";for(g=0;g<h.length;++g)switch(h[g].t){case"t":case"T":case" ":case"D":break;case"X":h[g].v="",h[g].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":h[g].v=function(t,e,n,i){var a,o="",u=0,s=0,h=n.y,f=0;switch(t){case 98:h=n.y+543;case 121:switch(e.length){case 1:case 2:a=h%100,f=2;break;default:a=h%1e4,f=4}break;case 109:switch(e.length){case 1:case 2:a=n.m,f=e.length;break;case 3:return l[n.m-1][1];case 5:return l[n.m-1][0];default:return l[n.m-1][2]}break;case 100:switch(e.length){case 1:case 2:a=n.d,f=e.length;break;case 3:return c[n.q][0];default:return c[n.q][1]}break;case 104:switch(e.length){case 1:case 2:a=1+(n.H+11)%12,f=e.length;break;default:throw"bad hour format: "+e}break;case 72:switch(e.length){case 1:case 2:a=n.H,f=e.length;break;default:throw"bad hour format: "+e}break;case 77:switch(e.length){case 1:case 2:a=n.M,f=e.length;break;default:throw"bad minute format: "+e}break;case 115:if("s"!=e&&"ss"!=e&&".0"!=e&&".00"!=e&&".000"!=e)throw"bad second format: "+e;return 0!==n.u||"s"!=e&&"ss"!=e?(60*(s=2<=i?3===i?1e3:100:1===i?10:1)<=(u=Math.round(s*(n.S+n.u)))&&(u=0),"s"===e?0===u?"0":""+u/s:(o=r(u,2+i),"ss"===e?o.substr(0,2):"."+o.substr(2,e.length-1))):r(n.S,e.length);case 90:switch(e){case"[h]":case"[hh]":a=24*n.D+n.H;break;case"[m]":case"[mm]":a=60*(24*n.D+n.H)+n.M;break;case"[s]":case"[ss]":a=60*(60*(24*n.D+n.H)+n.M)+Math.round(n.S+n.u);break;default:throw"bad abstime format: "+e}f=3===e.length?1:2;break;case 101:a=h,f=1}return 0<f?r(a,f):""}(h[g].t.charCodeAt(0),h[g].v,a,M),h[g].t="t";break;case"n":case"?":for(A=g+1;null!=h[A]&&("?"===(d=h[A].t)||"D"===d||(" "===d||"t"===d)&&null!=h[A+1]&&("?"===h[A+1].t||"t"===h[A+1].t&&"/"===h[A+1].v)||"("===h[g].t&&(" "===d||"n"===d||")"===d)||"t"===d&&("/"===h[A].v||" "===h[A].v&&null!=h[A+1]&&"?"==h[A+1].t));)h[g].v+=h[A].v,h[A]={v:"",t:";"},++A;k+=h[g].v,g=A-1;break;case"G":h[g].t="t",h[g].v=C(e,n)}var T,E,S="";if(0<k.length){40==k.charCodeAt(0)?(T=e<0&&45===k.charCodeAt(0)?-e:e,E=$("n",k,T)):(E=$("n",k,T=e<0&&1<i?-e:e),T<0&&h[0]&&"t"==h[0].t&&(E=E.substr(1),h[0].v="-"+h[0].v)),A=E.length-1;var N=h.length;for(g=0;g<h.length;++g)if(null!=h[g]&&"t"!=h[g].t&&-1<h[g].v.indexOf(".")){N=g;break}var D=h.length;if(N===h.length&&-1===E.indexOf("E")){for(g=h.length-1;0<=g;--g)null!=h[g]&&-1!=="n?".indexOf(h[g].t)&&(A>=h[g].v.length-1?(A-=h[g].v.length,h[g].v=E.substr(A+1,h[g].v.length)):A<0?h[g].v="":(h[g].v=E.substr(0,A+1),A=-1),h[g].t="t",D=g);0<=A&&D<h.length&&(h[D].v=E.substr(0,A+1)+h[D].v)}else if(N!==h.length&&-1===E.indexOf("E")){for(A=E.indexOf(".")-1,g=N;0<=g;--g)if(null!=h[g]&&-1!=="n?".indexOf(h[g].t)){for(o=-1<h[g].v.indexOf(".")&&g===N?h[g].v.indexOf(".")-1:h[g].v.length-1,S=h[g].v.substr(o+1);0<=o;--o)0<=A&&("0"===h[g].v.charAt(o)||"#"===h[g].v.charAt(o))&&(S=E.charAt(A--)+S);h[g].v=S,h[g].t="t",D=g}for(0<=A&&D<h.length&&(h[D].v=E.substr(0,A+1)+h[D].v),A=E.indexOf(".")+1,g=N;g<h.length;++g)if(null!=h[g]&&(-1!=="n?(".indexOf(h[g].t)||g===N)){for(o=-1<h[g].v.indexOf(".")&&g===N?h[g].v.indexOf(".")+1:0,S=h[g].v.substr(0,o);o<h[g].v.length;++o)A<E.length&&(S+=E.charAt(A++));h[g].v=S,h[g].t="t",D=g}}}for(g=0;g<h.length;++g)null!=h[g]&&-1<"n?".indexOf(h[g].t)&&(T=1<i&&e<0&&0<g&&"-"===h[g-1].v?-e:e,h[g].v=$(h[g].t,h[g].v,T),h[g].t="t");var O="";for(g=0;g!==h.length;++g)null!=h[g]&&(O+=h[g].v);return O}t.is_date=j,t._eval=R;var z=/\[[=<>]/,X=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function B(t,e){if(null!=e){var n=parseFloat(e[2]);switch(e[1]){case"=":if(t==n)return 1;break;case">":if(n<t)return 1;break;case"<":if(t<n)return 1;break;case"<>":if(t!=n)return 1;break;case">=":if(n<=t)return 1;break;case"<=":if(t<=n)return 1}}}function I(t,e,n){null==n&&(n={});var r="";switch(typeof t){case"string":r="m/d/yy"==t&&n.dateNF?n.dateNF:t;break;case"number":r=14==t&&n.dateNF?n.dateNF:(null!=n.table?n.table:f)[t]}if(s(r,0))return C(e,n);e instanceof Date&&(e=y(e,n.date1904));var i=function(t,e){var n=q(t),r=n.length,i=n[r-1].indexOf("@");if(r<4&&-1<i&&--r,4<n.length)throw new Error("cannot find right format for |"+n.join("|")+"|");if("number"!=typeof e)return[4,4===n.length||-1<i?n[n.length-1]:"@"];switch(n.length){case 1:n=-1<i?["General","General","General",n[0]]:[n[0],n[0],n[0],"@"];break;case 2:n=-1<i?[n[0],n[0],n[0],n[1]]:[n[0],n[1],n[0],"@"];break;case 3:n=-1<i?[n[0],n[1],n[0],n[2]]:[n[0],n[1],n[2],"@"]}var a=0<e?n[0]:e<0?n[1]:n[2];if(-1===n[0].indexOf("[")&&-1===n[1].indexOf("["))return[r,a];if(null==n[0].match(z)&&null==n[1].match(z))return[r,a];var o=n[0].match(X),u=n[1].match(X);return B(e,o)?[r,n[0]]:B(e,u)?[r,n[1]]:[r,n[null!=o&&null!=u?2:1]]}(r,e);if(s(i[1]))return C(e,n);if(!0===e)e="TRUE";else if(!1===e)e="FALSE";else if(""===e||null==e)return"";return R(i[1],e,n,i[0])}function V(t,e){if("number"!=typeof e){e=+e||-1;for(var n=0;n<392;++n)if(null!=f[n]){if(f[n]==t){e=n;break}}else e<0&&(e=n);e<0&&(e=391)}return f[e]=t,e}t.load=V,t._table=f,t.get_table=function(){return f},t.load_table=function(t){for(var e=0;392!=e;++e)void 0!==t[e]&&V(t[e],e)},t.init_table=h,t.format=I}(r),"undefined"==typeof DO_NOT_EXPORT_SSF&&(t.exports=r)},74:function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:e<t?1:e<=t?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=1+a:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;0<t(e[a],n)?i=a:r=1+a}return r}}}(r);i.right,i.left;var a=Array.prototype;a.slice,a.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2),Array.prototype.slice;var o={value:function(){}};function u(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new s(r)}function s(t){this._=t}function c(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=o,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}s.prototype=u.prototype={constructor:s,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),o=-1,u=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<u;)if(n=(t=a[o]).type)i[n]=c(i[n],t.name,e);else if(null==e)for(n in i)i[n]=c(i[n],t.name,null);return this}for(;++o<u;)if((n=(t=a[o]).type)&&(n=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new s(t)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var l=u;function h(){}function f(t){return null==t?h:function(){return this.querySelector(t)}}function g(){return[]}function p(t){return null==t?g:function(){return this.querySelectorAll(t)}}function d(t){return function(){return this.matches(t)}}function v(t){return new Array(t.length)}function m(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function y(t,e,n,r,i,a){for(var o,u=0,s=e.length,c=a.length;u<c;++u)(o=e[u])?(o.__data__=a[u],r[u]=o):n[u]=new m(t,a[u]);for(;u<s;++u)(o=e[u])&&(i[u]=o)}function _(t,e,n,r,i,a,o){for(var u,s,c={},l=e.length,h=a.length,f=new Array(l),g=0;g<l;++g)(u=e[g])&&(f[g]=s="$"+o.call(u,u.__data__,g,e),s in c?i[g]=u:c[s]=u);for(g=0;g<h;++g)(u=c[s="$"+o.call(t,a[g],g,a)])?((r[g]=u).__data__=a[g],c[s]=null):n[g]=new m(t,a[g]);for(g=0;g<l;++g)(u=e[g])&&c[f[g]]===u&&(i[g]=u)}function w(t,e){return t<e?-1:e<t?1:e<=t?0:NaN}function x(t){var e=t+="",n=e.indexOf(":");return 0<=n&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),M.hasOwnProperty(e)?{space:M[e],local:t}:t}m.prototype={constructor:m,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)}};var b="http://www.w3.org/1999/xhtml",M={svg:"http://www.w3.org/2000/svg",xhtml:b,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},A=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function k(t,e){return t.style.getPropertyValue(e)||A(t).getComputedStyle(t,null).getPropertyValue(e)}function C(t){return t.trim().split(/^|\s+/)}function T(t){return t.classList||new E(t)}function E(t){this._node=t,this._names=C(t.getAttribute("class")||"")}function S(t,e){for(var n=T(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function N(t,e){for(var n=T(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function D(){this.textContent=""}function O(){this.innerHTML=""}function $(){this.nextSibling&&this.parentNode.appendChild(this)}function U(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function F(t){var e=x(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===b&&e.documentElement.namespaceURI===b?e.createElement(t):e.createElementNS(n,t)}})(e)}function H(){return null}function P(){var t=this.parentNode;t&&t.removeChild(this)}function Y(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function q(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}E.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);0<=e&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return 0<=this._names.indexOf(t)}};var L={},j=null;function R(t,e,n){return t=z(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function z(t,e,n){return function(r){var i=j;j=r;try{t.call(this,this.__data__,e,n)}finally{j=i}}}function X(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function B(t,e,n){var r=L.hasOwnProperty(t.type)?R:z;return function(i,a,o){var u,s=this.__on,c=r(e,a,o);if(s)for(var l=0,h=s.length;l<h;++l)if((u=s[l]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=n),void(u.value=e);this.addEventListener(t.type,c,n),u={type:t.type,name:t.name,value:e,listener:c,capture:n},s?s.push(u):this.__on=[u]}}function I(t,e,n){var r=A(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(L={mouseenter:"mouseover",mouseleave:"mouseout"}));var V=[null];function Z(t,e){this._groups=t,this._parents=e}function J(){return new Z([[document.documentElement]],V)}Z.prototype=J.prototype={constructor:Z,select:function(t){"function"!=typeof t&&(t=f(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,u=e[i],s=u.length,c=r[i]=new Array(s),l=0;l<s;++l)(a=u[l])&&(o=t.call(a,a.__data__,l,u))&&("__data__"in a&&(o.__data__=a.__data__),c[l]=o);return new Z(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=p(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,u=e[a],s=u.length,c=0;c<s;++c)(o=u[c])&&(r.push(t.call(o,o.__data__,c,u)),i.push(o));return new Z(r,i)},filter:function(t){"function"!=typeof t&&(t=d(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],u=o.length,s=r[i]=[],c=0;c<u;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&s.push(a);return new Z(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n,r=e?_:y,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,u=new Array(o),s=new Array(o),c=new Array(o),l=0;l<o;++l){var h=i[l],f=a[l],g=f.length,p=t.call(h,h&&h.__data__,l,i),d=p.length,v=s[l]=new Array(d),m=u[l]=new Array(d);r(h,f,v,m,c[l]=new Array(g),p,e);for(var w,x,b=0,M=0;b<d;++b)if(w=v[b]){for(M<=b&&(M=b+1);!(x=m[M])&&++M<d;);w._next=x||null}}return(u=new Z(u,i))._enter=s,u._exit=c,u},enter:function(){return new Z(this._enter||this._groups.map(v),this._parents)},exit:function(){return new Z(this._exit||this._groups.map(v),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();r="function"==typeof t?t(r):r.append(t+"");return null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s,c=e[u],l=n[u],h=c.length,f=o[u]=new Array(h),g=0;g<h;++g)(s=c[g]||l[g])&&(f[g]=s);for(;u<r;++u)o[u]=e[u];return new Z(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];0<=--a;)(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||w;for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,u=n[a],s=u.length,c=i[a]=new Array(s),l=0;l<s;++l)(o=u[l])&&(c[l]=o);c.sort(e)}return new Z(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,u=a.length;o<u;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=x(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(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,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return 1<arguments.length?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?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(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):k(this.node(),t)},property:function(t,e){return 1<arguments.length?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=C(t+"");if(arguments.length<2){for(var r=T(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?S:N)(this,t)}}:e?function(t){return function(){S(this,t)}}:function(t){return function(){N(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?D:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?O:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each($)},lower:function(){return this.each(U)},append:function(t){var e="function"==typeof t?t:F(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:F(t),r=null==e?H:"function"==typeof e?e:f(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(P)},clone:function(t){return this.select(t?q:Y)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return 0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})),o=a.length;if(!(arguments.length<2)){for(u=e?B:X,null==n&&(n=!1),r=0;r<o;++r)this.each(u(a[r],e,n));return this}var u=this.node().__on;if(u)for(var s,c=0,l=u.length;c<l;++c)for(r=0,s=u[c];r<o;++r)if((i=a[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return I(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return I(this,t,e)}})(t,e))}};var G=J,W=function(t){return"string"==typeof t?new Z([[document.querySelector(t)]],[document.documentElement]):new Z([[t]],V)};function Q(t,e,n){(t.prototype=e.prototype=n).constructor=t}function K(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function tt(){}var et="\\s*([+-]?\\d+)\\s*",nt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",rt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",it=/^#([0-9a-f]{3,8})$/,at=new RegExp("^rgb\\("+[et,et,et]+"\\)$"),ot=new RegExp("^rgb\\("+[rt,rt,rt]+"\\)$"),ut=new RegExp("^rgba\\("+[et,et,et,nt]+"\\)$"),st=new RegExp("^rgba\\("+[rt,rt,rt,nt]+"\\)$"),ct=new RegExp("^hsl\\("+[nt,rt,rt]+"\\)$"),lt=new RegExp("^hsla\\("+[nt,rt,rt,nt]+"\\)$"),ht={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 ft(){return this.rgb().formatHex()}function gt(){return this.rgb().formatRgb()}function pt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=it.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?dt(e):3===n?new yt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?vt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?vt(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=at.exec(t))?new yt(e[1],e[2],e[3],1):(e=ot.exec(t))?new yt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ut.exec(t))?vt(e[1],e[2],e[3],e[4]):(e=st.exec(t))?vt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ct.exec(t))?bt(e[1],e[2]/100,e[3]/100,1):(e=lt.exec(t))?bt(e[1],e[2]/100,e[3]/100,e[4]):ht.hasOwnProperty(t)?dt(ht[t]):"transparent"===t?new yt(NaN,NaN,NaN,0):null}function dt(t){return new yt(t>>16&255,t>>8&255,255&t,1)}function vt(t,e,n,r){return r<=0&&(t=e=n=NaN),new yt(t,e,n,r)}function mt(t,e,n,r){return 1===arguments.length?((i=t)instanceof tt||(i=pt(i)),i?new yt((i=i.rgb()).r,i.g,i.b,i.opacity):new yt):new yt(t,e,n,null==r?1:r);var i}function yt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function _t(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)}function wt(){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 xt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function bt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new At(t,e,n,r)}function Mt(t){if(t instanceof At)return new At(t.h,t.s,t.l,t.opacity);if(t instanceof tt||(t=pt(t)),!t)return new At;if(t instanceof At)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*(n<r):n===a?(r-e)/u+2:(e-n)/u+4,u/=s<.5?a+i:2-a-i,o*=60):u=0<s&&s<1?0:o,new At(o,u,s,t.opacity)}function At(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function kt(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 Ct(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Q(tt,pt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ft,formatHex:ft,formatHsl:function(){return Mt(this).formatHsl()},formatRgb:gt,toString:gt}),Q(yt,mt,K(tt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new yt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new yt(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:_t,formatHex:_t,formatRgb:wt,toString:wt})),Q(At,(function(t,e,n,r){return 1===arguments.length?Mt(t):new At(t,e,n,null==r?1:r)}),K(tt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new At(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new At(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 yt(kt(240<=t?t-240:120+t,i,r),kt(t,i,r),kt(t<120?240+t: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 Tt=function(t){return function(){return t}};function Et(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Tt(isNaN(t)?e:t)}var St=function t(e){var n=function(t){return 1==(t=+t)?Et:function(e,n){return n-e?(r=e,i=n,a=t,r=Math.pow(r,a),i=Math.pow(i,a)-r,a=1/a,function(t){return Math.pow(r+t*i,a)}):Tt(isNaN(e)?n:e);var r,i,a}}(e);function r(t,e){var r=n((t=mt(t)).r,(e=mt(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Et(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Nt(t){return function(e){for(var n,r=e.length,i=new Array(r),a=new Array(r),o=new Array(r),u=0;u<r;++u)n=mt(e[u]),i[u]=n.r||0,a[u]=n.g||0,o[u]=n.b||0;return i=t(i),a=t(a),o=t(o),n.opacity=1,function(t){return n.r=i(t),n.g=a(t),n.b=o(t),n+""}}}Nt((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:1<=n?e-(n=1):Math.floor(n*e),i=t[r],a=t[r+1],o=0<r?t[r-1]:2*i-a,u=r<e-1?t[r+2]:2*a-i;return Ct((n-r/e)*e,o,i,a,u)}})),Nt((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],u=t[(r+2)%e];return Ct((n-r/e)*e,i,a,o,u)}}));var Dt=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},Ot=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$t=new RegExp(Ot.source,"g");function Ut(t,e){var n,r,i,a,o,u=Ot.lastIndex=$t.lastIndex=0,s=-1,c=[],l=[];for(t+="",e+="";(n=Ot.exec(t))&&(r=$t.exec(e));)(i=r.index)>u&&(i=e.slice(u,i),c[s]?c[s]+=i:c[++s]=i),(n=n[0])===(r=r[0])?c[s]?c[s]+=r:c[++s]=r:(c[++s]=null,l.push({i:s,x:Dt(n,r)})),u=$t.lastIndex;return u<e.length&&(i=e.slice(u),c[s]?c[s]+=i:c[++s]=i),c.length<2?l[0]?(o=l[0].x,function(t){return o(t)+""}):(a=e,function(){return a}):(e=l.length,function(t){for(var n,r=0;r<e;++r)c[(n=l[r]).i]=n.x(t);return c.join("")})}var Ft,Ht,Pt=0,Yt=0,qt=0,Lt=0,jt=0,Rt=0,zt="object"==typeof performance&&performance.now?performance:Date,Xt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bt(){return jt||(Xt(It),jt=zt.now()+Rt)}function It(){jt=0}function Vt(){this._call=this._time=this._next=null}function Zt(t,e,n){var r=new Vt;return r.restart(t,e,n),r}function Jt(){jt=(Lt=zt.now())+Rt,Pt=Yt=0;try{!function(){Bt(),++Pt;for(var t,e=Ft;e;)0<=(t=jt-e._time)&&e._call.call(null,t),e=e._next;--Pt}()}finally{Pt=0,function(){for(var t,e,n=Ft,r=1/0;n;)n=n._call?(r>n._time&&(r=n._time),(t=n)._next):(e=n._next,n._next=null,t?t._next=e:Ft=e);Ht=t,Wt(r)}(),jt=0}}function Gt(){var t=zt.now(),e=t-Lt;1e3<e&&(Rt-=e,Lt=t)}function Wt(t){Pt||(Yt=Yt&&clearTimeout(Yt),24<t-jt?(t<1/0&&(Yt=setTimeout(Jt,t-zt.now()-Rt)),qt=qt&&clearInterval(qt)):(qt||(Lt=zt.now(),qt=setInterval(Gt,1e3)),Pt=1,Xt(Jt)))}function Qt(t,e,n){var r=new Vt;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}function Kt(t,e,n,r,i,a){var o,u,s,c,l,h=t.__transition;if(h){if(n in h)return}else t.__transition={};function f(t){var e,n,r,i;if(1!==s.state)return p();for(e in l)if((i=l[e]).name===s.name){if(i.state===re)return Qt(f);4===i.state?(i.state=6,i.timer.stop(),i.on.call("interrupt",o,o.__data__,i.index,i.group),delete l[e]):+e<u&&(i.state=6,i.timer.stop(),i.on.call("cancel",o,o.__data__,i.index,i.group),delete l[e])}if(Qt((function(){s.state===re&&(s.state=4,s.timer.restart(g,s.delay,s.time),g(t))})),s.state=2,s.on.call("start",o,o.__data__,s.index,s.group),2===s.state){for(s.state=re,c=new Array(r=s.tween.length),e=0,n=-1;e<r;++e)(i=s.tween[e].value.call(o,o.__data__,s.index,s.group))&&(c[++n]=i);c.length=n+1}}function g(t){for(var e=t<s.duration?s.ease.call(null,t/s.duration):(s.timer.restart(p),s.state=5,1),n=-1,r=c.length;++n<r;)c[n].call(o,e);5===s.state&&(s.on.call("end",o,o.__data__,s.index,s.group),p())}function p(){for(var t in s.state=6,s.timer.stop(),delete l[u],l)return;delete o.__transition}o=t,u=n,s={name:e,index:r,group:i,on:te,tween:ee,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:ne},((l=o.__transition)[u]=s).timer=Zt((function(t){s.state=1,s.timer.restart(f,s.delay,s.time),s.delay<=t&&f(t-s.delay)}),0,s.time)}Vt.prototype=Zt.prototype={constructor:Vt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Bt():+n)+(null==e?0:+e),this._next||Ht===this||(Ht?Ht._next=this:Ft=this,Ht=this),this._call=t,this._time=n,Wt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wt())}};var te=l("start","end","cancel","interrupt"),ee=[],ne=0,re=3;function ie(t,e){var n=oe(t,e);if(n.state>ne)throw new Error("too late; already scheduled");return n}function ae(t,e){var n=oe(t,e);if(n.state>re)throw new Error("too late; already running");return n}function oe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ue(t,e,n,r,i,a){var o,u,s;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r<e*n&&(t=-t,e=-e,s=-s,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*fe,skewX:Math.atan(s)*fe,scaleX:o,scaleY:u}}var se,ce,le,he,fe=180/Math.PI,ge={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pe(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var u,s,c,l,h,f,g,p,d,v,m,y,_,w,x,b,M,A,k,C,T=[],E=[];return a=t(a),o=t(o),u=a.translateX,s=a.translateY,c=o.translateX,l=o.translateY,h=T,f=E,u!==c||s!==l?(g=h.push("translate(",null,e,null,n),f.push({i:g-4,x:Dt(u,c)},{i:g-2,x:Dt(s,l)})):(c||l)&&h.push("translate("+c+e+l+n),p=a.rotate,d=o.rotate,v=T,p!==d?(180<p-d?d+=360:180<d-p&&(p+=360),E.push({i:v.push(i(v)+"rotate(",null,r)-2,x:Dt(p,d)})):d&&v.push(i(v)+"rotate("+d+r),m=a.skewX,y=o.skewX,_=T,m!==y?E.push({i:_.push(i(_)+"skewX(",null,r)-2,x:Dt(m,y)}):y&&_.push(i(_)+"skewX("+y+r),w=a.scaleX,x=a.scaleY,b=o.scaleX,M=o.scaleY,A=T,k=E,w!==b||x!==M?(C=A.push(i(A)+"scale(",null,",",null,")"),k.push({i:C-4,x:Dt(w,b)},{i:C-2,x:Dt(x,M)})):1===b&&1===M||A.push(i(A)+"scale("+b+","+M+")"),a=o=null,function(t){for(var e,n=-1,r=E.length;++n<r;)T[(e=E[n]).i]=e.x(t);return T.join("")}}}var de=pe((function(t){return"none"===t?ge:(se||(se=document.createElement("DIV"),ce=document.documentElement,le=document.defaultView),se.style.transform=t,t=le.getComputedStyle(ce.appendChild(se),null).getPropertyValue("transform"),ce.removeChild(se),ue(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),ve=pe((function(t){return null==t?ge:((he=he||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),(t=he.transform.baseVal.consolidate())?ue((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ge)}),", ",")",")");function me(t,e,n){var r=t._id;return t.each((function(){var t=ae(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return oe(t,r).value[e]}}function ye(t,e){var n;return("number"==typeof e?Dt:e instanceof pt?St:(n=pt(e))?(e=n,St):Ut)(t,e)}function _e(t,e){var n,r;function i(){var i,a,o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&(i=t,a=o,function(t){this.setAttributeNS(i.space,i.local,a.call(this,t))})),n}return i._value=e,i}function we(t,e){var n,r;function i(){var i,a,o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&(i=t,a=o,function(t){this.setAttribute(i,a.call(this,t))})),n}return i._value=e,i}function xe(t,e,n){var r,i,a=(e+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return 0<=e&&(t=t.slice(0,e)),!t||"start"===t}))?ie:ae;return function(){var o=a(this,t),u=o.on;u!==r&&(i=(r=u).copy()).on(e,n),o.on=i}}var be=G.prototype.constructor;function Me(t){return function(){this.style.removeProperty(t)}}function Ae(t,e,n){var r,i;function a(){var a,o,u,s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&(a=t,o=s,u=n,function(t){this.style.setProperty(a,o.call(this,t),u)})),r}return a._value=e,a}function ke(t){var e,n;function r(){var r,i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&(r=i,function(t){this.textContent=r.call(this,t)})),e}return r._value=t,r}var Ce=0;function Te(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ee(){return++Ce}var Se=G.prototype;Te.prototype={constructor:Te,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=f(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var u,s,c=r[o],l=c.length,h=a[o]=new Array(l),g=0;g<l;++g)(u=c[g])&&(s=t.call(u,u.__data__,g,c))&&("__data__"in u&&(s.__data__=u.__data__),h[g]=s,Kt(h[g],e,n,g,h,oe(u,n)));return new Te(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=p(t));for(var r=this._groups,i=r.length,a=[],o=[],u=0;u<i;++u)for(var s,c=r[u],l=c.length,h=0;h<l;++h)if(s=c[h]){for(var f,g=t.call(s,s.__data__,h,c),d=oe(s,n),v=0,m=g.length;v<m;++v)(f=g[v])&&Kt(f,e,n,v,g,d);a.push(g),o.push(s)}return new Te(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=d(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],u=o.length,s=r[i]=[],c=0;c<u;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&s.push(a);return new Te(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s,c=e[u],l=n[u],h=c.length,f=o[u]=new Array(h),g=0;g<h;++g)(s=c[g]||l[g])&&(f[g]=s);for(;u<r;++u)o[u]=e[u];return new Te(o,this._parents,this._name,this._id)},selection:function(){return new be(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ee(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,u,s=r[a],c=s.length,l=0;l<c;++l)(o=s[l])&&Kt(o,t,n,l,s,{time:(u=oe(o,e)).time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease});return new Te(r,this._parents,t,n)},call:Se.call,nodes:Se.nodes,node:Se.node,size:Se.size,empty:Se.empty,each:Se.each,on:function(t,e){var n=this._id;return arguments.length<2?oe(this.node(),n).on.on(t):this.each(xe(n,t,e))},attr:function(t,e){var n=x(t),r="transform"===n?ve:ye;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var r,i,a;return function(){var o,u,s=n(this);if(null!=s)return(o=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:o===r&&u===i?a:(i=u,a=e(r=o,s));this.removeAttributeNS(t.space,t.local)}}:function(t,e,n){var r,i,a;return function(){var o,u,s=n(this);if(null!=s)return(o=this.getAttribute(t))===(u=s+"")?null:o===r&&u===i?a:(i=u,a=e(r=o,s));this.removeAttribute(t)}})(n,r,me(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}:function(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}})(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=x(t);return this.tween(n,(r.local?_e:we)(r,e))},style:function(t,e,n){var r,i,a,o,u,s,c,l,h,f,g,p,d,v,m,y,_,w,x,b,M,A,C,T,E,S="transform"==(t+="")?de:ye;return null==e?this.styleTween(t,(M=t,A=S,function(){var t=k(this,M),e=(this.style.removeProperty(M),k(this,M));return t===e?null:t===C&&e===T?E:E=A(C=t,T=e)})).on("end.style."+t,Me(t)):"function"==typeof e?this.styleTween(t,(y=S,_=me(this,"style."+(m=t),e),function(){var t=k(this,m),e=_(this),n=e+"";return null==e&&(this.style.removeProperty(m),n=e=k(this,m)),t===n?null:t===w&&n===x?b:(x=n,b=y(w=t,e))})).each((c=this._id,v="end."+(d="style."+(l=t)),function(){var t=ae(this,c),e=t.on,n=null==t.value[d]?p=p||Me(l):void 0;e===h&&g===n||(f=(h=e).copy()).on(v,g=n),t.on=f})):this.styleTween(t,(r=t,i=S,s=(a=e)+"",function(){var t=k(this,r);return t===s?null:t===o?u:u=i(o=t,a)}),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Ae(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?(n=me(this,"text",t),function(){var t=n(this);this.textContent=null==t?"":t}):(e=null==t?"":t+"",function(){this.textContent=e}));var e,n},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,ke(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=oe(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?function(t,e){var n,r;return function(){var i=ae(this,t),a=i.tween;if(a!==n)for(var o=0,u=(r=n=a).length;o<u;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}:function(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=ae(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var u={name:e,value:n},s=0,c=i.length;s<c;++s)if(i[s].name===e){i[s]=u;break}s===c&&i.push(u)}a.tween=i}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){ie(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){ie(this,t).delay=e}})(e,t)):oe(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){ae(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e=+e,function(){ae(this,t).duration=e}})(e,t)):oe(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){ae(this,t).ease=e}}(e,t)):oe(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var u={value:o},s={value:function(){0==--i&&a()}};n.each((function(){var n=ae(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),n.on=e}))}))}};var Ne={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function De(t){return{type:t}}G.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=2<n.state&&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)}))},G.prototype.transition=function(t){var e,n;t=t instanceof Te?(e=t._id,t._name):(e=Ee(),(n=Ne).time=Bt(),null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,u=r[a],s=u.length,c=0;c<s;++c)(o=u[c])&&Kt(o,t,e,c,u,n||function(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Ne.time=Bt(),Ne;return n}(o,e));return new Te(r,this._parents,t,e)},["w","e"].map(De),["n","s"].map(De),["n","w","e","s","nw","ne","sw","se"].map(De),Math.cos,Math.sin,Math.PI,Math.max,Array.prototype.slice;var Oe=Math.PI,$e=2*Oe,Ue=1e-6,Fe=$e-Ue;function He(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Pe(){return new He}He.prototype=Pe.prototype={constructor:He,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a,o,u,s,c,l,h,f,g,p=this._x1,d=this._y1,v=n-t,m=r-e,y=p-t,_=d-e,w=y*y+_*_;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):Ue<w&&(Math.abs(_*v-m*y)>Ue&&i?(u=v*v+m*m,s=(a=n-p)*a+(o=r-d)*o,c=Math.sqrt(u),l=Math.sqrt(w),f=(h=i*Math.tan((Oe-Math.acos((u+w-s)/(2*c*l)))/2))/l,g=h/c,Math.abs(f-1)>Ue&&(this._+="L"+(t+f*y)+","+(e+f*_)),this._+="A"+i+","+i+",0,0,"+ +(y*o<_*a)+","+(this._x1=t+g*v)+","+(this._y1=e+g*m)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),u=n*Math.sin(r),s=t+o,c=e+u,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+c:(Math.abs(this._x1-s)>Ue||Math.abs(this._y1-c)>Ue)&&(this._+="L"+s+","+c),n&&(h<0&&(h=h%$e+$e),Fe<h?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-u)+"A"+n+","+n+",0,1,"+l+","+(this._x1=s)+","+(this._y1=c):Ue<h&&(this._+="A"+n+","+n+",0,"+ +(Oe<=h)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Ye=Pe,qe="$";function Le(){}function je(t,e){var n=new Le;if(t instanceof Le)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Le.prototype=je.prototype={constructor:Le,has:function(t){return qe+t in this},get:function(t){return this[qe+t]},set:function(t,e){return this[qe+t]=e,this},remove:function(t){var e=qe+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===qe&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===qe&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===qe&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===qe&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===qe&&++t;return t},empty:function(){for(var t in this)if(t[0]===qe)return!1;return!0},each:function(t){for(var e in this)e[0]===qe&&t(this[e],e.slice(1),this)}};var Re=je;function ze(){}var Xe=Re.prototype;ze.prototype={constructor:ze,has:Xe.has,add:function(t){return this[qe+(t+="")]=t,this},remove:Xe.remove,clear:Xe.clear,values:Xe.keys,size:Xe.size,empty:Xe.empty,each:Xe.each},Array.prototype.slice;var Be={},Ie={};function Ve(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Ze(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function Je(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}var Ge=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,u=0,s=a<=0,c=!1;function l(){if(s)return Ie;if(c)return c=!1,Be;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?s=!0:10===(r=t.charCodeAt(o++))?c=!0:13===r&&(c=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))c=!0;else if(13===r)c=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return s=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=l())!==Ie;){for(var h=[];r!==Be&&r!==Ie;)h.push(r),r=l();e&&null==(h=e(h,u++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?function(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Je(-e,6):9999<e?"+"+Je(e,6):Je(e,4))+"-"+Je(t.getUTCMonth()+1,2)+"-"+Je(t.getUTCDate(),2)+(a?"T"+Je(n,2)+":"+Je(r,2)+":"+Je(i,2)+"."+Je(a,3)+"Z":i?"T"+Je(n,2)+":"+Je(r,2)+":"+Je(i,2)+"Z":r||n?"T"+Je(n,2)+":"+Je(r,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){return n?n(t,r-1):(i=t,void(n=e?(o=e,u=Ve(a=t),function(t,e){return o(u(t),e,a)}):Ve(t)));var a,o,u}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Ze(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Ze(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}},We=Ge(","),Qe=We.parse,Ke=(We.parseRows,We.format,We.formatBody,We.formatRows,We.formatRow,We.formatValue,Ge("\t")),tn=Ke.parse;function en(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}Ke.parseRows,Ke.format,Ke.formatBody,Ke.formatRows,Ke.formatRow,Ke.formatValue;var nn=function(t,e){return fetch(t,e).then(en)};function rn(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),nn(e,n).then((function(e){return t(e,r)}))}}function an(t){return function(e,n){return nn(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}function on(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,u,s,c,l,h,f,g=t._root,p={data:r},d=t._x0,v=t._y0,m=t._x1,y=t._y1;if(!g)return t._root=p,t;for(;g.length;)if((c=e>=(a=(d+m)/2))?d=a:m=a,(l=n>=(o=(v+y)/2))?v=o:y=o,!(g=(i=g)[h=l<<1|c]))return i[h]=p,t;if(u=+t._x.call(null,g.data),s=+t._y.call(null,g.data),e===u&&n===s)return p.next=g,i?i[h]=p:t._root=p,t;for(;i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(d+m)/2))?d=a:m=a,(l=n>=(o=(v+y)/2))?v=o:y=o,(h=l<<1|c)==(f=(o<=s)<<1|a<=u););return i[f]=g,i[h]=p,t}function un(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function sn(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function cn(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}rn(Qe),rn(tn),an("application/xml"),an("text/html"),an("image/svg+xml");var ln=sn.prototype;function hn(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function fn(t,e){var n,r,i,a,o,u=new vn(t),s=+t.value&&(u.value=t.value),c=[u];for(null==e&&(e=gn);n=c.pop();)if(s&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;0<=a;--a)c.push(r=n.children[a]=new vn(i[a])),r.parent=n,r.depth=n.depth+1;return u.eachBefore(dn)}function gn(t){return t.children}function pn(t){t.data=t.data.data}function dn(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function vn(t){this.data=t,this.depth=this.height=0,this.parent=null}function mn(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function yn(){return Math.random()}ln.copy=function(){var t,e,n=new sn(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=cn(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=cn(e));return n},ln.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return on(this.cover(e,n),e,n,t)},ln.addAll=function(t){for(var e,n,r,i=t.length,a=new Array(i),o=new Array(i),u=1/0,s=1/0,c=-1/0,l=-1/0,h=0;h<i;++h)isNaN(n=+this._x.call(null,e=t[h]))||isNaN(r=+this._y.call(null,e))||((a[h]=n)<u&&(u=n),c<n&&(c=n),(o[h]=r)<s&&(s=r),l<r&&(l=r));if(c<u||l<s)return this;for(this.cover(u,s).cover(c,l),h=0;h<i;++h)on(this,a[h],o[h],t[h]);return this},ln.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,u,s=i-n,c=this._root;t<n||i<=t||e<r||a<=e;)switch(u=(e<r)<<1|t<n,(o=new Array(4))[u]=c,c=o,s*=2,u){case 0:i=n+s,a=r+s;break;case 1:n=i-s,a=r+s;break;case 2:i=n+s,r=a-s;break;case 3:n=i-s,r=a-s}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},ln.data=function(){var t=[];return this.visit((function(e){if(!e.length)for(;t.push(e.data),e=e.next;);})),t},ln.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},ln.find=function(t,e,n){var r,i,a,o,u,s,c,l,h,f,g,p,d,v=this._x0,m=this._y0,y=this._x1,_=this._y1,w=[],x=this._root;for(x&&w.push(new un(x,v,m,y,_)),null==n?n=1/0:(v=t-n,m=e-n,y=t+n,_=e+n,n*=n);u=w.pop();)!(x=u.node)||(r=u.x0)>y||(i=u.y0)>_||(a=u.x1)<v||(o=u.y1)<m||(x.length?(c=(r+a)/2,l=(i+o)/2,w.push(new un(x[3],c,l,a,o),new un(x[2],r,l,c,o),new un(x[1],c,i,a,l),new un(x[0],r,i,c,l)),(s=(l<=e)<<1|c<=t)&&(u=w[w.length-1],w[w.length-1]=w[w.length-1-s],w[w.length-1-s]=u)):(g=(h=t-this._x.call(null,x.data))*h+(f=e-this._y.call(null,x.data))*f)<n&&(v=t-(p=Math.sqrt(n=g)),m=e-p,y=t+p,_=e+p,d=x.data));return d},ln.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,u,s,c,l,h,f,g=this._root,p=this._x0,d=this._y0,v=this._x1,m=this._y1;if(!g)return this;if(g.length)for(;;){if((c=a>=(u=(p+v)/2))?p=u:v=u,(l=o>=(s=(d+m)/2))?d=s:m=s,!(g=(e=g)[h=l<<1|c]))return this;if(!g.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;g.data!==t;)if(!(g=(r=g).next))return this;return(i=g.next)&&delete g.next,r?i?r.next=i:delete r.next:e?(i?e[h]=i:delete e[h],(g=e[0]||e[1]||e[2]||e[3])&&g===(e[3]||e[2]||e[1]||e[0])&&!g.length&&(n?n[f]=g:this._root=g)):this._root=i,this},ln.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},ln.root=function(){return this._root},ln.size=function(){var t=0;return this.visit((function(e){if(!e.length)for(;++t,e=e.next;);})),t},ln.visit=function(t){var e,n,r,i,a,o,u,s,c=[],l=this._root;for(l&&c.push(new un(l,this._x0,this._y0,this._x1,this._y1));e=c.pop();)!t(l=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&l.length&&(u=(r+a)/2,s=(i+o)/2,(n=l[3])&&c.push(new un(n,u,s,a,o)),(n=l[2])&&c.push(new un(n,r,s,u,o)),(n=l[1])&&c.push(new un(n,u,i,a,s)),(n=l[0])&&c.push(new un(n,r,i,u,s)));return this},ln.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new un(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,u,s,c,l,h=e.node;h.length&&(a=e.x0,o=e.y0,c=(a+(u=e.x1))/2,l=(o+(s=e.y1))/2,(i=h[0])&&n.push(new un(i,a,o,c,l)),(i=h[1])&&n.push(new un(i,c,o,u,l)),(i=h[2])&&n.push(new un(i,a,l,c,s)),(i=h[3])&&n.push(new un(i,c,l,u,s))),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},ln.x=function(t){return arguments.length?(this._x=t,this):this._x},ln.y=function(t){return arguments.length?(this._y=t,this):this._y},Math.PI,Math.sqrt(5),vn.prototype=fn.prototype={constructor:vn,count:function(){return this.eachAfter(hn)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;0<=n;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;0<=--i;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return fn(this).eachBefore(pn)}},function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(yn);var _n=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else for(;r=2*e()-1,a=2*e()-1,!(i=r*r+a*a)||1<i;);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(yn),wn=(function t(e){function n(){var t=_n.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(yn),function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(yn));function xn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}(function t(e){function n(t){var n=wn.source(e)(t);return function(){return n()/t}}return n.source=t,n})(yn),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(yn);var bn=Array.prototype,Mn=(bn.map,bn.slice),An={name:"implicit"};var kn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cn(t){if(!(e=kn.exec(t)))throw new Error("invalid format: "+t);var e;return new Tn({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 Tn(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 En(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[1<r.length?r[0]+r.slice(2):r,+t.slice(n+1)]}function Sn(t,e){var n=En(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")}function Nn(t){return t}Cn.prototype=Tn.prototype,Tn.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 Dn,On,$n={"%":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.round(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 Sn(100*t,e)},r:Sn,s:function(t,e){var n=En(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Dn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:o<a?r+new Array(a-o+1).join("0"):0<a?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+En(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)}},Un=Array.prototype.map,Fn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];(On=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?Nn:(n=Un.call(t.grouping,Number),r=t.thousands+"",function(t,e){for(var i=t.length,a=[],o=0,u=n[0],s=0;0<i&&0<u&&(e<s+u+1&&(u=Math.max(1,e-s)),a.push(t.substring(i-=u,i+u)),!((s+=u+1)>e));)u=n[o=(o+1)%n.length];return a.reverse().join(r)}),a=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Nn:(e=Un.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Cn(t)).fill,n=t.align,r=t.sign,f=t.symbol,g=t.zero,p=t.width,d=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(d=!0,y="g"):$n[y]||(void 0===v&&(v=12),m=!0,y="g"),(g||"0"===e&&"="===n)&&(g=!0,e="0",n="=");var _="$"===f?a:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===f?o:/[%p]/.test(y)?c:"",x=$n[y],b=/[defgprs%]/.test(y);function M(t){var a,o,c,f=_,M=w;if("c"===y)M=x(t)+M,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:x(Math.abs(t),v),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==r&&(A=!1),f=(A?"("===r?r:l:"-"===r||"("===r?"":r)+f,M=("s"===y?Fn[8+Dn/3]:"")+M+(A&&"("===r?")":""),b)for(a=-1,o=t.length;++a<o;)if((c=t.charCodeAt(a))<48||57<c){M=(46===c?u+t.slice(a+1):t.slice(a))+M,t=t.slice(0,a);break}}d&&!g&&(t=i(t,1/0));var k=f.length+t.length+M.length,C=k<p?new Array(p-k+1).join(e):"";switch(d&&g&&(t=i(C+t,C.length?p-M.length:1/0),C=""),n){case"<":t=f+t+M+C;break;case"=":t=f+C+t+M;break;case"^":t=C.slice(0,k=C.length>>1)+f+t+M+C.slice(k);break;default:t=C+f+t+M}return s(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=Cn(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(function(t){return(t=En(Math.abs(t)))?t[1]:NaN}(e)/3))),i=Math.pow(10,-r),a=Fn[8+r/3];return function(t){return n(i*t)+a}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"})).format,On.formatPrefix;var Hn=new Date,Pn=new Date;function Yn(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-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,u=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&0<a))return u;for(;u.push(o=new Date(+n)),e(n,a),t(n),o<n&&n<r;);return u},i.filter=function(n){return Yn((function(e){if(e<=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(;0<=--r;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Hn.setTime(+e),Pn.setTime(+r),t(Hn),t(Pn),Math.floor(n(Hn,Pn))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&0<t?1<t?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var qn=Yn((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()}));qn.every=function(t){return isFinite(t=Math.floor(t))&&0<t?Yn((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};var Ln=qn;function jn(t){return Yn((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}))}(qn.range,Yn((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()}))).range;var Rn=jn(0),zn=jn(1),Xn=jn(2),Bn=jn(3),In=jn(4),Vn=jn(5),Zn=jn(6),Jn=(Rn.range,zn.range,Xn.range,Bn.range,In.range,Vn.range,Zn.range,Yn((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}))),Gn=Jn,Wn=((((Jn.range,Yn((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()}))).range,Yn((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()}))).range,Yn((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()}))).range,Yn((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));function Qn(t){return Yn((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}))}Wn.every=function(t){return t=Math.floor(t),isFinite(t)&&0<t?1<t?Yn((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Wn:null},Wn.range;var Kn=Qn(0),tr=Qn(1),er=Qn(2),nr=Qn(3),rr=Qn(4),ir=Qn(5),ar=Qn(6),or=(Kn.range,tr.range,er.range,nr.range,rr.range,ir.range,ar.range,Yn((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}))),ur=or,sr=(or.range,Yn((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()})));sr.every=function(t){return isFinite(t=Math.floor(t))&&0<t?Yn((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 cr=sr;function lr(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 hr(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 fr(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}sr.range;var gr,pr={"-":"",_:" ",0:"0"},dr=/^\s*\d+/,vr=/^%/,mr=/[\\^$*+?|[\]().{}]/g;function yr(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function _r(t){return t.replace(mr,"\\$&")}function wr(t){return new RegExp("^(?:"+t.map(_r).join("|")+")","i")}function xr(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function br(t,e,n){var r=dr.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=dr.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=dr.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function kr(t,e,n){var r=dr.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=dr.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Tr(t,e,n){var r=dr.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=dr.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(68<+r[0]?1900:2e3),n+r[0].length):-1}function Sr(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 Nr(t,e,n){var r=dr.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Dr(t,e,n){var r=dr.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Or(t,e,n){var r=dr.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=dr.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=dr.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=dr.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=dr.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Pr(t,e,n){var r=dr.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=dr.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function qr(t,e,n){var r=vr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lr(t,e,n){var r=dr.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=dr.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Rr(t,e){return yr(t.getDate(),e,2)}function zr(t,e){return yr(t.getHours(),e,2)}function Xr(t,e){return yr(t.getHours()%12||12,e,2)}function Br(t,e){return yr(1+Gn.count(Ln(t),t),e,3)}function Ir(t,e){return yr(t.getMilliseconds(),e,3)}function Vr(t,e){return Ir(t,e)+"000"}function Zr(t,e){return yr(t.getMonth()+1,e,2)}function Jr(t,e){return yr(t.getMinutes(),e,2)}function Gr(t,e){return yr(t.getSeconds(),e,2)}function Wr(t){var e=t.getDay();return 0===e?7:e}function Qr(t,e){return yr(Rn.count(Ln(t)-1,t),e,2)}function Kr(t,e){var n=t.getDay();return t=4<=n||0===n?In(t):In.ceil(t),yr(In.count(Ln(t),t)+(4===Ln(t).getDay()),e,2)}function ti(t){return t.getDay()}function ei(t,e){return yr(zn.count(Ln(t)-1,t),e,2)}function ni(t,e){return yr(t.getFullYear()%100,e,2)}function ri(t,e){return yr(t.getFullYear()%1e4,e,4)}function ii(t){var e=t.getTimezoneOffset();return(0<e?"-":(e*=-1,"+"))+yr(e/60|0,"0",2)+yr(e%60,"0",2)}function ai(t,e){return yr(t.getUTCDate(),e,2)}function oi(t,e){return yr(t.getUTCHours(),e,2)}function ui(t,e){return yr(t.getUTCHours()%12||12,e,2)}function si(t,e){return yr(1+ur.count(cr(t),t),e,3)}function ci(t,e){return yr(t.getUTCMilliseconds(),e,3)}function li(t,e){return ci(t,e)+"000"}function hi(t,e){return yr(t.getUTCMonth()+1,e,2)}function fi(t,e){return yr(t.getUTCMinutes(),e,2)}function gi(t,e){return yr(t.getUTCSeconds(),e,2)}function pi(t){var e=t.getUTCDay();return 0===e?7:e}function di(t,e){return yr(Kn.count(cr(t)-1,t),e,2)}function vi(t,e){var n=t.getUTCDay();return t=4<=n||0===n?rr(t):rr.ceil(t),yr(rr.count(cr(t),t)+(4===cr(t).getUTCDay()),e,2)}function mi(t){return t.getUTCDay()}function yi(t,e){return yr(tr.count(cr(t)-1,t),e,2)}function _i(t,e){return yr(t.getUTCFullYear()%100,e,2)}function wi(t,e){return yr(t.getUTCFullYear()%1e4,e,4)}function xi(){return"+0000"}function bi(){return"%"}function Mi(t){return+t}function Ai(t){return Math.floor(t/1e3)}function ki(t){return function(){return t}}(gr=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=wr(i),l=xr(i),h=wr(a),f=xr(a),g=wr(o),p=xr(o),d=wr(u),v=xr(u),m=wr(s),y=xr(s),_={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:Rr,e:Rr,f:Vr,H:zr,I:Xr,j:Br,L:Ir,m:Zr,M:Jr,p:function(t){return i[+(12<=t.getHours())]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Mi,s:Ai,S:Gr,u:Wr,U:Qr,V:Kr,w:ti,W:ei,x:null,X:null,y:ni,Y:ri,Z:ii,"%":bi},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:ai,e:ai,f:li,H:oi,I:ui,j:si,L:ci,m:hi,M:fi,p:function(t){return i[+(12<=t.getUTCHours())]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Mi,s:Ai,S:gi,u:pi,U:di,V:vi,w:mi,W:yi,x:null,X:null,y:_i,Y:wi,Z:xi,"%":bi},x={a:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[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=d.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return A(t,e,n,r)},d:Or,e:Or,f:Yr,H:Ur,I:Ur,j:$r,L:Pr,m:Dr,M:Fr,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:Nr,Q:Lr,s:jr,S:Hr,u:Mr,U:Ar,V:kr,w:br,W:Cr,x:function(t,e,r){return A(t,n,e,r)},X:function(t,e,n){return A(t,r,e,n)},y:Er,Y:Tr,Z:Sr,"%":qr};function b(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));++u<c;)37===t.charCodeAt(u)&&(o.push(t.slice(s,u)),null!=(i=pr[r=t.charAt(++u)])?r=t.charAt(++u):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),s=u+1);return o.push(t.slice(s,u)),o.join("")}}function M(t,e){return function(n){var r,i,a=fr(1900,void 0,1);if(A(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||53<a.V)return null;"w"in a||(a.w=1),"Z"in a?(r=4<(i=(r=hr(fr(a.y,0,1))).getUTCDay())||0===i?tr.ceil(r):tr(r),r=ur.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(r=4<(i=(r=lr(fr(a.y,0,1))).getDay())||0===i?zn.ceil(r):zn(r),r=Gn.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?hr(fr(a.y,0,1)).getUTCDay():lr(fr(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,hr(a)):lr(a)}}function A(t,e,n,r){for(var i,a,o=0,u=e.length,s=n.length;o<u;){if(s<=r)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in pr?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=b(n,_),_.X=b(r,_),_.c=b(e,_),w.x=b(n,w),w.X=b(r,w),w.c=b(e,w),{format:function(t){var e=b(t+="",_);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=b(t+="",w);return e.toString=function(){return t},e},utcParse:function(t){var e=M(t+="",!0);return e.toString=function(){return t},e}}}({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"]})).format,gr.parse,gr.utcFormat,gr.utcParse,((Yn((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()})).range,Yn((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()}))).range,Yn((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()}))).range;var Ci=Math.abs,Ti=Math.atan2,Ei=Math.cos,Si=Math.max,Ni=Math.min,Di=Math.sin,Oi=Math.sqrt,$i=1e-12,Ui=Math.PI,Fi=Ui/2,Hi=2*Ui;function Pi(t){return 1<=t?Fi:t<=-1?-Fi:Math.asin(t)}function Yi(t){return t.innerRadius}function qi(t){return t.outerRadius}function Li(t){return t.startAngle}function ji(t){return t.endAngle}function Ri(t){return t&&t.padAngle}function zi(t,e,n,r,i,a,o){var u=t-n,s=e-r,c=(o?a:-a)/Oi(u*u+s*s),l=c*s,h=-c*u,f=t+l,g=e+h,p=n+l,d=r+h,v=(f+p)/2,m=(g+d)/2,y=p-f,_=d-g,w=y*y+_*_,x=i-a,b=f*d-p*g,M=(_<0?-1:1)*Oi(Si(0,x*x*w-b*b)),A=(b*_-y*M)/w,k=(-b*y-_*M)/w,C=(b*_+y*M)/w,T=(-b*y+_*M)/w,E=A-v,S=k-m,N=C-v,D=T-m;return N*N+D*D<E*E+S*S&&(A=C,k=T),{cx:A,cy:k,x01:-l,y01:-h,x11:A*(i/x-1),y11:k*(i/x-1)}}function Xi(t,e,n){this.k=t,this.x=e,this.y=n}Math.SQRT2,Xi.prototype={constructor:Xi,scale:function(t){return 1===t?this:new Xi(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Xi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new Xi(1,0,0);var Bi=n(18);var Ii={id:"sunburst",label:"Sunburst",options:{color_range:{type:"array",label:"Color Range",display:"colors",default:["#4285F4","#EA4335","#FBBC04","#34A852","#5F6368"]},color_by:{type:"string",label:"Color By",display:"select",values:[{"Color By Root":"root"},{"Color By Node":"node"}],default:"root"},show_null_points:{type:"boolean",label:"Plot Null Values",default:!0},value_format_override:{type:"string",label:"Value Format Override",default:""},show_percent:{type:"boolean",label:"Show Percent of Total",default:!0}},create:function(t,e){t.style.fontFamily='"Open Sans","Noto Sans JP","Noto Sans","Noto Sans CJK KR", "Helvetica" , "Arial" , "sans-serif"',W(t).append("div").attr("id","sunburst-breadcrumbs"),this.svg=W(t).append("svg").style("margin-top","-25px")},update:function(t,e,n,r){var i,a,o,u,s,c,l,h,f,g,p,d,v,m,y,_,w,x;(function(t,e,n){function r(e,n,r,i,a){return!(!t.addError||!t.clearErrors||(r<i?(t.addError({title:"Not Enough "+n+"s",message:"This visualization requires "+(i===a?"exactly":"at least")+" "+i+" "+n.toLowerCase()+(1===i?"":"s")+".",group:e}),1):a<r?(t.addError({title:"Too Many "+n+"s",message:"This visualization requires "+(i===a?"exactly":"no more than")+" "+a+" "+n.toLowerCase()+(1===i?"":"s")+".",group:e}),1):(t.clearErrors(e),0)))}var i=e.fields,a=i.pivots,o=i.dimensions,u=i.measure_like;return r("pivot-req","Pivot",a.length,n.min_pivots,n.max_pivots)&&r("dim-req","Dimension",o.length,n.min_dimensions,n.max_dimensions)&&r("mes-req","Measure",u.length,n.min_measures,n.max_measures)})(this,r,{min_pivots:0,max_pivots:0,min_dimensions:1,max_dimensions:void 0,min_measures:1,max_measures:1})&&(W("#trail").remove(),i=e.clientWidth,a=e.clientHeight,o=Math.min(i,a)/2-8,u=r.fields.dimension_like,s=r.fields.measure_like[0],c=s.value_format||"#,##0",l=function t(){var e=Re(),n=[],r=[],i=An;function a(t){var a=t+"",o=e.get(a);if(!o){if(i!==An)return i;e.set(a,o=n.push(t))}return r[(o-1)%r.length]}return a.domain=function(t){if(!arguments.length)return n.slice();n=[],e=Re();for(var r,i,o=-1,u=t.length;++o<u;)e.has(i=(r=t[o])+"")||e.set(i,n.push(r));return a},a.range=function(t){return arguments.length?(r=Mn.call(t),a):r.slice()},a.unknown=function(t){return arguments.length?(i=t,a):i},a.copy=function(){return t(n,r).unknown(i)},xn.apply(a,arguments),a}().range(n.color_range||[]),h={w:75,h:30,s:4,t:10},f=function(t){return Math.max(10*t.length,h.w)},g=0,t.forEach((function(t){var e;t.taxonomy={links:(e=t,Object.keys(e).reduce((function(t,n){if(e[n].links){var r=e[n].links;return t.concat(r)}return t}),[])),value:u.map((function(e){return t[e.name].value}))},g+=t[s.name].value})),p=function(){var t=1,e=1,n=0,r=!1;function i(i){var a,o,u=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/u,i.eachBefore((a=e,o=u,function(t){t.children&&function(t,e,n,r,i){for(var a,o=t.children,u=-1,s=o.length,c=t.value&&(r-e)/t.value;++u<s;)(a=o[u]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}(t,t.x0,a*(t.depth+1)/o,t.x1,a*(t.depth+2)/o);var e=t.x0,r=t.y0,i=t.x1-n,u=t.y1-n;i<e&&(e=i=(e+i)/2),u<r&&(r=u=(r+u)/2),t.x0=e,t.y0=r,t.x1=i,t.y1=u})),r&&i.eachBefore(mn),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i}().size([2*Math.PI,o*o]),d=function(){var t=Yi,e=qi,n=ki(0),r=null,i=Li,a=ji,o=Ri,u=null;function s(){var s,c,l,h,f,g,p,d,v,m,y,_,w,x,b,M,A,k,C,T,E,S,N,D,O,$,U,F,H,P,Y,q,L,j=+t.apply(this,arguments),R=+e.apply(this,arguments),z=i.apply(this,arguments)-Fi,X=a.apply(this,arguments)-Fi,B=Ci(X-z),I=z<X;if(u=u||(s=Ye()),R<j&&(c=R,R=j,j=c),$i<R?Hi-$i<B?(u.moveTo(R*Ei(z),R*Di(z)),u.arc(0,0,R,z,X,!I),$i<j&&(u.moveTo(j*Ei(X),j*Di(X)),u.arc(0,0,j,X,z,I))):(f=l=z,g=h=X,d=p=B,v=o.apply(this,arguments)/2,m=$i<v&&(r?+r.apply(this,arguments):Oi(j*j+R*R)),q=Y=y=Ni(Ci(R-j)/2,+n.apply(this,arguments)),$i<m&&(x=Pi(m/j*Di(v)),b=Pi(m/R*Di(v)),(p-=2*x)>$i?(f+=x*=I?1:-1,g-=x):(p=0,f=g=(z+X)/2),(d-=2*b)>$i?(l+=b*=I?1:-1,h-=b):(d=0,l=h=(z+X)/2)),M=R*Ei(l),A=R*Di(l),k=j*Ei(g),C=j*Di(g),$i<y&&(T=R*Ei(h),E=R*Di(h),S=j*Ei(f),N=j*Di(f),B<Ui&&(D=function(t,e,n,r,i,a,o,u){var s=n-t,c=r-e,l=o-i,h=u-a,f=h*s-l*c;if(!(f*f<$i))return[t+(f=(l*(e-a)-h*(t-i))/f)*s,e+f*c]}(M,A,S,N,T,E,k,C))&&(O=M-D[0],$=A-D[1],U=T-D[0],F=E-D[1],H=1/Di((1<(L=(O*U+$*F)/(Oi(O*O+$*$)*Oi(U*U+F*F)))?0:L<-1?Ui:Math.acos(L))/2),P=Oi(D[0]*D[0]+D[1]*D[1]),Y=Ni(y,(j-P)/(H-1)),q=Ni(y,(R-P)/(1+H)))),$i<d?$i<q?(_=zi(S,N,M,A,R,q,I),w=zi(T,E,k,C,R,q,I),u.moveTo(_.cx+_.x01,_.cy+_.y01),q<y?u.arc(_.cx,_.cy,q,Ti(_.y01,_.x01),Ti(w.y01,w.x01),!I):(u.arc(_.cx,_.cy,q,Ti(_.y01,_.x01),Ti(_.y11,_.x11),!I),u.arc(0,0,R,Ti(_.cy+_.y11,_.cx+_.x11),Ti(w.cy+w.y11,w.cx+w.x11),!I),u.arc(w.cx,w.cy,q,Ti(w.y11,w.x11),Ti(w.y01,w.x01),!I))):(u.moveTo(M,A),u.arc(0,0,R,l,h,!I)):u.moveTo(M,A),$i<j&&$i<p?$i<Y?(_=zi(k,C,T,E,j,-Y,I),w=zi(M,A,S,N,j,-Y,I),u.lineTo(_.cx+_.x01,_.cy+_.y01),Y<y?u.arc(_.cx,_.cy,Y,Ti(_.y01,_.x01),Ti(w.y01,w.x01),!I):(u.arc(_.cx,_.cy,Y,Ti(_.y01,_.x01),Ti(_.y11,_.x11),!I),u.arc(0,0,j,Ti(_.cy+_.y11,_.cx+_.x11),Ti(w.cy+w.y11,w.cx+w.x11),I),u.arc(w.cx,w.cy,Y,Ti(w.y11,w.x11),Ti(w.y01,w.x01),!I))):u.arc(0,0,j,g,f,I):u.lineTo(k,C)):u.moveTo(0,0),u.closePath(),s)return u=null,s+""||null}return s.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Ui/2;return[Ei(r)*n,Di(r)*n]},s.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:ki(+e),s):t},s.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:ki(+t),s):e},s.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:ki(+t),s):n},s.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:ki(+t),s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:ki(+t),s):i},s.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:ki(+t),s):a},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:ki(+t),s):o},s.context=function(t){return arguments.length?(u=null==t?null:t,s):u},s}().startAngle((function(t){return t.x0})).endAngle((function(t){return t.x1})).innerRadius((function(t){return Math.sqrt(t.y0)})).outerRadius((function(t){return Math.sqrt(t.y1)})),v=this.svg.html("").attr("width","100%").attr("height","100%").append("g").attr("transform","translate("+i/2+","+a/2+")"),m=v.append("text").style("text-anchor","middle").style("dominant-baseline","middle").attr("font-size",Math.min(parseInt(W("svg").style("width")),parseInt(W("svg").style("height")))/12),y=function(t){return 0===t.depth?"none":"node"===n.color_by?l(t.data.name):l(t.ancestors().map((function(t){return t.data.name})).slice(-2,-1))},W("#sunburst-breadcrumbs").append("svg:svg").attr("width",750).attr("height",50).attr("id","trail").append("svg:text").attr("id","endlabel").style("fill","#000"),_=function(t,e){var n=[],r=h,i=f(t.data.name);return n.push("0,0"),n.push(i+",0"),n.push(i+r.t+","+r.h/2),n.push(i+","+r.h),n.push("0,"+r.h),0<e&&n.push(r.t+","+r.h/2),n.join(" ")},w=function(t,e){var r=h,i=W("#trail").selectAll("g").data(t,(function(t){return t.data.name+t.data.depth})),a=i.enter().append("svg:g");a.append("svg:polygon").attr("points",_).style("fill",y),a.append("svg:text").attr("x",(function(t){return(f(t.data.name)+r.t)/2})).attr("y",r.h/2).attr("dy","0.35em").attr("text-anchor","middle").text((function(t){return t.data.name})),i.exit().remove();var o,s,l=0;W("#trail").selectAll("g").attr("transform",(function(t,e){return o=t,e>=u.length?"translate("+l+", 0)":"translate("+(l+="root"===t.parent.data.name?0:f(t.parent.data.name)+r.s)+", 0)"})),W("#sunburst-breadcrumbs").select("#trail").select("#endlabel").attr("x",l+f(o.data.name)+r.s+50+"px").attr("y",r.h/2).attr("dy","0.35em").attr("text-anchor","middle").html((s=e,Bi.format(""!==n.value_format_override?n.value_format_override:c,s))).style("font-weight","bold"),W("#sunburst-breadcrumbs").select("#trail").style("visibility","")},p(x=fn(function(t,e){var n={};return t.forEach((function(t){var r=n;t.taxonomy.value.forEach((function(t){null===t&&!e.show_null_points||(r[t]=t in r?r[t]:{},r=r[t])})),r.__data=t})),{name:"root",children:function t(e,n){void 0===n&&(n=0);var r,i=[];for(var a in e)"__data"!==a&&(r={name:a,depth:n,children:t(e[a],n+1)},"__data"in e[a]&&(r.data=e[a].__data,r.links=e[a].__data.taxonomy.links),i.push(r));return i}(n,1),depth:0}}(t,n)).sum((function(t){return"data"in t?t.data[s.name].value:0}))),v.selectAll("path").data(x.descendants()).enter().append("path").attr("d",d).style("fill",y).style("fill-opacity",(function(t){return 1-.15*t.depth})).style("transition",(function(t){return"fill-opacity 0.2s"})).style("stroke",(function(t){return"#fff"})).style("stroke-width",(function(t){return"0.5px"})).on("click",(function(t){var e={pageX:j.pageX,pageY:j.pageY};LookerCharts.Utils.openDrillMenu({links:t.data.links,event:e})})).on("mouseenter",(function(t){var e=function(t){for(var e=[],n=t;n.parent;)e.unshift(n),n=n.parent;return e}(t);w(e,t.value),n.show_percent&&m.text(" "+(t.value/g*100).toFixed(2).toString()+"%");var r=t.ancestors();v.selectAll("path").style("fill-opacity",(function(t){return-1<r.indexOf(t)?1:.15}))})).on("mouseleave",(function(t){W("#sunburst-breadcrumbs").select("#trail").style("visibility","hidden"),m.text(""),v.selectAll("path").style("fill-opacity",(function(t){return 1-.15*t.depth}))})))}};looker.plugins.visualizations.add(Ii)}},t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(t){return e[t]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=74);function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e,n}));