@hpcc-js/tree
Advanced tools
Comparing version 0.0.29 to 0.0.30
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api"],e):e(t["@hpcc-js/tree"]=t["@hpcc-js/tree"]||{},t["@hpcc-js/common"],t["@hpcc-js/api"])}(this,function(t,e,n){"use strict";function r(t,e){if("undefined"==typeof document)return e;t=t||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");return r.type="text/css",r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t)),n.appendChild(r),e}function i(t,e){return t.parent===e.parent?1:2}function o(t){return t.reduce(a,0)/t.length}function a(t,e){return t+e.x}function s(t){return 1+t.reduce(u,0)}function u(t,e){return Math.max(t,e.y)}function l(t){for(var e;e=t.children;)t=e[0];return t}function c(t){for(var e;e=t.children;)t=e[e.length-1];return t}function h(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function p(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}function f(t,e){var n,r,i,o,a,s=new m(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=y);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new m(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(g)}function d(){return f(this).eachBefore(_)}function y(t){return t.children}function _(t){t.data=t.data.data}function g(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function m(t){this.data=t,this.depth=this.height=0,this.parent=null}function v(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}function x(t,e){var n,r;if(M(e,t))return[e];for(n=0;n<t.length;++n)if(w(e,t[n])&&M(S(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(w(S(t[n],t[r]),e)&&w(S(t[n],e),t[r])&&w(S(t[r],e),t[n])&&M(A(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function w(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function b(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function M(t,e){for(var n=0;n<e.length;++n)if(!b(t,e[n]))return!1;return!0}function k(t){switch(t.length){case 1:return T(t[0]);case 2:return S(t[0],t[1]);case 3:return A(t[0],t[1],t[2])}}function T(t){return{x:t.x,y:t.y,r:t.r}}function S(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,l=a-r,c=s-i,h=Math.sqrt(u*u+l*l);return{x:(n+o+u/h*c)/2,y:(r+a+l/h*c)/2,r:(h+i+s)/2}}function A(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,h=n.r,p=r-a,f=r-l,d=i-s,y=i-c,_=u-o,g=h-o,m=r*r+i*i-o*o,v=m-a*a-s*s+u*u,x=m-l*l-c*c+h*h,w=f*d-p*y,b=(d*x-y*v)/(2*w)-r,M=(y*_-d*g)/w,k=(f*v-p*x)/(2*w)-i,T=(p*g-f*_)/w,S=M*M+T*T-1,A=2*(o+b*M+k*T),z=b*b+k*k-o*o,N=-(S?(A+Math.sqrt(A*A-4*S*z))/(2*S):z/A);return{x:r+b+M*N,y:i+k+T*N,r:N}}function z(t,e,n){var r=t.x,i=t.y,o=e.r+n.r,a=t.r+n.r,s=e.x-r,u=e.y-i,l=s*s+u*u;if(l){var c=.5+((a*=a)-(o*=o))/(2*l),h=Math.sqrt(Math.max(0,2*o*(a+l)-(a-=l)*a-o*o))/(2*l);n.x=r+c*s+h*u,n.y=i+c*u-h*s}else n.x=r+a,n.y=i}function N(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return i*i-1e-6>n*n+r*r}function I(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function C(t){this._=t,this.next=null,this.previous=null}function D(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,u,l,c,h;if(e=t[0],e.x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;z(n,e,r=t[2]),e=new C(e),n=new C(n),r=new C(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){z(e._,n._,r=t[s]),r=new C(r),u=n.next,l=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(N(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}c+=u._.r,u=u.next}else{if(N(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(u!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=I(e);(r=r.next)!==n;)(a=I(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Ke(e),s=0;s<i;++s)e=t[s],e.x-=r.x,e.y-=r.y;return r.r}function E(t){return null==t?null:P(t)}function P(t){if("function"!=typeof t)throw new Error;return t}function R(){return 0}function B(t){return Math.sqrt(t.value)}function q(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function L(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=D(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function j(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function O(t,e){return t.parent===e.parent?1:2}function V(t){var e=t.children;return e?e[0]:t.t}function F(t){var e=t.children;return e?e[e.length-1]:t.t}function H(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function W(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}function $(t,e,n){return t.a.parent===e.parent?t.a:n}function U(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function G(t){for(var e,n,r,i,o,a=new U(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new U(r[i],i)),n.parent=e;return(a.parent=new U(null,0)).children=[a],a}function Z(t,e,n,r,i,o){for(var a,s,u,l,c,h,p,f,d,y,_,g=[],m=e.children,v=0,x=0,w=m.length,b=e.value;v<w;){u=i-n,l=o-r;do{c=m[x++].value}while(!c&&x<w);for(h=p=c,_=c*c*(y=Math.max(l/u,u/l)/(b*t)),d=Math.max(p/_,_/h);x<w;++x){if(c+=s=m[x].value,s<h&&(h=s),s>p&&(p=s),_=c*c*y,(f=Math.max(p/_,_/h))>d){c-=s;break}d=f}g.push(a={value:c,dice:u<l,children:m.slice(v,x)}),a.dice?Ye(a,n,r,i,b?r+=l*c/b:o):nn(a,n,r,b?n+=u*c/b:i,o),b-=c,v=x}return g}function K(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new Q(r)}function Q(t){this._=t}function J(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function X(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Y(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=an,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}function tt(){return dn||(gn(et),dn=_n.now()+yn)}function et(){dn=0}function nt(){this._call=this._time=this._next=null}function rt(t,e,n){var r=new nt;return r.restart(t,e,n),r}function it(){tt(),++ln;for(var t,e=sn;e;)(t=dn-e._time)>=0&&e._call.call(null,t),e=e._next;--ln}function ot(){dn=(fn=_n.now())+yn,ln=cn=0;try{it()}finally{ln=0,st(),dn=0}}function at(){var t=_n.now(),e=t-fn;e>pn&&(yn-=e,fn=t)}function st(){for(var t,e,n=sn,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:sn=e);un=t,ut(r)}function ut(t){if(!ln){cn&&(cn=clearTimeout(cn));var e=t-dn;e>24?(t<1/0&&(cn=setTimeout(ot,e)),hn&&(hn=clearInterval(hn))):(hn||(fn=dn,hn=setInterval(at,pn)),ln=1,gn(ot))}}function lt(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>wn)throw new Error("too late");return n}function ct(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>Mn)throw new Error("too late");return n}function ht(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("too late");return n}function pt(t,e,n){function r(t){n.state=bn,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}function i(r){var l,c,h,p;if(n.state!==bn)return a();for(l in u)if((p=u[l]).name===n.name){if(p.state===kn)return mn(i);p.state===Tn?(p.state=An,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete u[l]):+l<e&&(p.state=An,p.timer.stop(),delete u[l])}if(mn(function(){n.state===kn&&(n.state=Tn,n.timer.restart(o,n.delay,n.time),o(r))}),n.state=Mn,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Mn){for(n.state=kn,s=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(p=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(s[++c]=p);s.length=c+1}}function o(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=Sn,1),i=-1,o=s.length;++i<o;)s[i].call(null,r);n.state===Sn&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){n.state=An,n.timer.stop(),delete u[e];for(var r in u)return;delete t.__transition}var s,u=t.__transition;u[e]=n,n.timer=rt(r,0,n.time)}function ft(t,e){var n,r;return function(){var i=ct(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function dt(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=ct(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function yt(t,e,n){var r=t._id;return t.each(function(){var t=ct(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return ht(t,r).value[e]}}function _t(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function gt(){}function mt(t){var e;return t=(t+"").trim().toLowerCase(),(e=Bn.exec(t))?(e=parseInt(e[1],16),new Mt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=qn.exec(t))?vt(parseInt(e[1],16)):(e=Ln.exec(t))?new Mt(e[1],e[2],e[3],1):(e=jn.exec(t))?new Mt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=On.exec(t))?xt(e[1],e[2],e[3],e[4]):(e=Vn.exec(t))?xt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Fn.exec(t))?kt(e[1],e[2]/100,e[3]/100,1):(e=Hn.exec(t))?kt(e[1],e[2]/100,e[3]/100,e[4]):Wn.hasOwnProperty(t)?vt(Wn[t]):"transparent"===t?new Mt(NaN,NaN,NaN,0):null}function vt(t){return new Mt(t>>16&255,t>>8&255,255&t,1)}function xt(t,e,n,r){return r<=0&&(t=e=n=NaN),new Mt(t,e,n,r)}function wt(t){return t instanceof gt||(t=mt(t)),t?(t=t.rgb(),new Mt(t.r,t.g,t.b,t.opacity)):new Mt}function bt(t,e,n,r){return 1===arguments.length?wt(t):new Mt(t,e,n,null==r?1:r)}function Mt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function kt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new At(t,e,n,r)}function Tt(t){if(t instanceof At)return new At(t.h,t.s,t.l,t.opacity);if(t instanceof gt||(t=mt(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),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new At(a,s,u,t.opacity)}function St(t,e,n,r){return 1===arguments.length?Tt(t):new At(t,e,n,null==r?1:r)}function At(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function zt(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 Nt(t){if(t instanceof Ct)return new Ct(t.l,t.a,t.b,t.opacity);if(t instanceof Lt){var e=t.h*$n;return new Ct(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof Mt||(t=wt(t));var n=Rt(t.r),r=Rt(t.g),i=Rt(t.b),o=Dt((.4124564*n+.3575761*r+.1804375*i)/Gn),a=Dt((.2126729*n+.7151522*r+.072175*i)/Zn);return new Ct(116*a-16,500*(o-a),200*(a-Dt((.0193339*n+.119192*r+.9503041*i)/Kn)),t.opacity)}function It(t,e,n,r){return 1===arguments.length?Nt(t):new Ct(t,e,n,null==r?1:r)}function Ct(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Dt(t){return t>Yn?Math.pow(t,1/3):t/Xn+Qn}function Et(t){return t>Jn?t*t*t:Xn*(t-Qn)}function Pt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Rt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Bt(t){if(t instanceof Lt)return new Lt(t.h,t.c,t.l,t.opacity);t instanceof Ct||(t=Nt(t));var e=Math.atan2(t.b,t.a)*Un;return new Lt(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function qt(t,e,n,r){return 1===arguments.length?Bt(t):new Lt(t,e,n,null==r?1:r)}function Lt(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function jt(t){if(t instanceof Vt)return new Vt(t.h,t.s,t.l,t.opacity);t instanceof Mt||(t=wt(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(sr*r+or*e-ar*n)/(sr+or-ar),o=r-i,a=(ir*(n-i)-nr*o)/rr,s=Math.sqrt(a*a+o*o)/(ir*i*(1-i)),u=s?Math.atan2(a,o)*Un-120:NaN;return new Vt(u<0?u+360:u,s,i,t.opacity)}function Ot(t,e,n,r){return 1===arguments.length?jt(t):new Vt(t,e,n,null==r?1:r)}function Vt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ft(t){return function(){this.removeAttribute(t)}}function Ht(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Wt(t,e,n){var r,i;return function(){var o=this.getAttribute(t);return o===n?null:o===r?i:i=e(r=o,n)}}function $t(t,e,n){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?i:i=e(r=o,n)}}function Ut(t,e,n){var r,i,o;return function(){var a,s=n(this);{if(null!=s)return a=this.getAttribute(t),a===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttribute(t)}}}function Gt(t,e,n){var r,i,o;return function(){var a,s=n(this);{if(null!=s)return a=this.getAttributeNS(t.space,t.local),a===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttributeNS(t.space,t.local)}}}function Zt(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}return n._value=e,n}function Kt(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}return n._value=e,n}function Qt(t,e){return function(){lt(this,t).delay=+e.apply(this,arguments)}}function Jt(t,e){return e=+e,function(){lt(this,t).delay=e}}function Xt(t,e){return function(){ct(this,t).duration=+e.apply(this,arguments)}}function Yt(t,e){return e=+e,function(){ct(this,t).duration=e}}function te(t,e){if("function"!=typeof e)throw new Error;return function(){ct(this,t).ease=e}}function ee(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}function ne(t,e,n){var r,i,o=ee(e)?lt:ct;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function re(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function ie(t,n){var r,i,o;return function(){var a=e.style(this,t),s=(this.style.removeProperty(t),e.style(this,t));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function oe(t){return function(){this.style.removeProperty(t)}}function ae(t,n,r){var i,o;return function(){var a=e.style(this,t);return a===r?null:a===i?o:o=n(i=a,r)}}function se(t,n,r){var i,o,a;return function(){var s=e.style(this,t),u=r(this);return null==u&&(this.style.removeProperty(t),u=e.style(this,t)),s===u?null:s===i&&u===o?a:a=n(i=s,o=u)}}function ue(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}return r._value=e,r}function le(t){return function(){this.textContent=t}}function ce(t){return function(){var e=t(this);this.textContent=null==e?"":e}}function he(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function pe(t){return e.selection().transition(t)}function fe(){return++Sr}function de(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function ye(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Nr.time=tt(),Nr;return n}function _e(t,e){void 0===e&&(e="");var n={id:e,label:"",attributes:{},children:[]};if(n.label=t.nodeName,1===t.nodeType){if(t.attributes.length>0)for(var r=0;r<t.attributes.length;r++){var i=t.attributes.item(r);n.attributes[i.nodeName]=i.nodeValue}}else 3===t.nodeType&&(n.label=t.nodeValue);if(t.hasChildNodes())for(var o=0;o<t.childNodes.length;o++){var a=_e(t.childNodes.item(o),e+"["+n.children.length+"]");n.children.push(a)}return n}function ge(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function me(){return new ge}function ve(t){return t>1?0:t<-1?Zr:Math.acos(t)}function xe(t){return t>=1?Kr:t<=-1?-Kr:Math.asin(t)}function we(t){return t.innerRadius}function be(t){return t.outerRadius}function Me(t){return t.startAngle}function ke(t){return t.endAngle}function Te(t){return t&&t.padAngle}function Se(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,p=(c*(e-o)-h*(t-i))/(h*u-c*l);return[t+p*u,e+p*l]}function Ae(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/Ur(s*s+u*u),c=l*u,h=-l*s,p=t+c,f=e+h,d=n+c,y=r+h,_=(p+d)/2,g=(f+y)/2,m=d-p,v=y-f,x=m*m+v*v,w=i-o,b=p*y-d*f,M=(v<0?-1:1)*Ur(Hr(0,w*w*x-b*b)),k=(b*v-m*M)/x,T=(-b*m-v*M)/x,S=(b*v+m*M)/x,A=(-b*m+v*M)/x,z=k-_,N=T-g,I=S-_,C=A-g;return z*z+N*N>I*I+C*C&&(k=S,T=A),{cx:k,cy:T,x01:-c,y01:-h,x11:k*(i/w-1),y11:T*(i/w-1)}}function ze(t){this._context=t}function Ne(t){return t<0?-1:1}function Ie(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Ne(o)+Ne(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ce(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function De(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Ee(t){this._context=t}function Pe(t){this._context=new Re(t)}function Re(t){this._context=t}var Be=function(){function t(t){var i,u=0;t.eachAfter(function(t){var n=t.children;n?(t.x=o(n),t.y=s(n)):(t.x=i?u+=e(t,i):0,t.y=0,i=t)});var h=l(t),p=c(t),f=h.x-e(h,p)/2,d=p.x+e(p,h)/2;return t.eachAfter(a?function(e){e.x=(e.x-t.x)*n,e.y=(t.y-e.y)*r}:function(e){e.x=(e.x-f)/(d-f)*n,e.y=(1-(t.y?e.y/t.y:1))*r})}var e=i,n=1,r=1,a=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(e){return arguments.length?(a=!1,n=+e[0],r=+e[1],t):a?null:[n,r]},t.nodeSize=function(e){return arguments.length?(a=!0,n=+e[0],r=+e[1],t):a?[n,r]:null},t},qe=function(){return this.eachAfter(h)},Le=function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},je=function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},Oe=function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},Ve=function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},Fe=function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},He=function(t){for(var e=this,n=p(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},We=function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},$e=function(){var t=[];return this.each(function(e){t.push(e)}),t},Ue=function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},Ge=function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e};m.prototype=f.prototype={constructor:m,count:qe,each:Le,eachAfter:Oe,eachBefore:je,sum:Ve,sort:Fe,path:He,ancestors:We,descendants:$e,leaves:Ue,links:Ge,copy:d};var Ze=Array.prototype.slice,Ke=function(t){for(var e,n,r=0,i=(t=v(Ze.call(t))).length,o=[];r<i;)e=t[r],n&&b(n,e)?++r:(n=k(o=x(o,e)),r=0);return n},Qe=function(t){return function(){return t}},Je=function(){function t(t){return t.x=n/2,t.y=r/2,e?t.eachBefore(q(e)).eachAfter(L(i,.5)).eachBefore(j(1)):t.eachBefore(q(B)).eachAfter(L(R,1)).eachAfter(L(i,t.r/Math.min(n,r))).eachBefore(j(Math.min(n,r)/(2*t.r))),t}var e=null,n=1,r=1,i=R;return t.radius=function(n){return arguments.length?(e=E(n),t):e},t.size=function(e){return arguments.length?(n=+e[0],r=+e[1],t):[n,r]},t.padding=function(e){return arguments.length?(i="function"==typeof e?e:Qe(+e),t):i},t},Xe=function(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)},Ye=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l},tn=function(){function t(t){var a=t.height+1;return t.x0=t.y0=i,t.x1=n,t.y1=r/a,t.eachBefore(e(r,a)),o&&t.eachBefore(Xe),t}function e(t,e){return function(n){n.children&&Ye(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var r=n.x0,o=n.y0,a=n.x1-i,s=n.y1-i;a<r&&(r=a=(r+a)/2),s<o&&(o=s=(o+s)/2),n.x0=r,n.y0=o,n.x1=a,n.y1=s}}var n=1,r=1,i=0,o=!1;return t.round=function(e){return arguments.length?(o=!!e,t):o},t.size=function(e){return arguments.length?(n=+e[0],r=+e[1],t):[n,r]},t.padding=function(e){return arguments.length?(i=+e,t):i},t};U.prototype=Object.create(m.prototype);var en=function(){function t(t){var r=G(t);if(r.eachAfter(e),r.parent.m=-r.z,r.eachBefore(n),u)t.eachBefore(i);else{var l=t,c=t,h=t;t.eachBefore(function(t){t.x<l.x&&(l=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)});var p=l===c?1:o(l,c)/2,f=p-l.x,d=a/(c.x+p+f),y=s/(h.depth||1);t.eachBefore(function(t){t.x=(t.x+f)*d,t.y=t.depth*y})}return t}function e(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e){W(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+o(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+o(t._,i._));t.parent.A=r(t,i,t.parent.A||n[0])}function n(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,e,n){if(e){for(var r,i=t,a=t,s=e,u=i.parent.children[0],l=i.m,c=a.m,h=s.m,p=u.m;s=F(s),i=V(i),s&&i;)u=V(u),(a=F(a)).a=t,(r=s.z+h-i.z-l+o(s._,i._))>0&&(H($(s,t,n),t,r),l+=r,c+=r),h+=s.m,l+=i.m,p+=u.m,c+=a.m;s&&!F(a)&&(a.t=s,a.m+=h-c),i&&!V(u)&&(u.t=i,u.m+=l-p,n=t)}return n}function i(t){t.x*=a,t.y=t.depth*s}var o=O,a=1,s=1,u=null;return t.separation=function(e){return arguments.length?(o=e,t):o},t.size=function(e){return arguments.length?(u=!1,a=+e[0],s=+e[1],t):u?null:[a,s]},t.nodeSize=function(e){return arguments.length?(u=!0,a=+e[0],s=+e[1],t):u?[a,s]:null},t},nn=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l},rn=function t(e){function n(t,n,r,i,o){Z(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2),on=function(){function t(t){return t.x0=t.y0=0,t.x1=i,t.y1=o,t.eachBefore(e),a=[0],r&&t.eachBefore(Xe),t}function e(t){var e=a[t.depth],r=t.x0+e,i=t.y0+e,o=t.x1-e,p=t.y1-e;o<r&&(r=o=(r+o)/2),p<i&&(i=p=(i+p)/2),t.x0=r,t.y0=i,t.x1=o,t.y1=p,t.children&&(e=a[t.depth+1]=s(t)/2,r+=h(t)-e,i+=u(t)-e,o-=l(t)-e,p-=c(t)-e,o<r&&(r=o=(r+o)/2),p<i&&(i=p=(i+p)/2),n(t,r,i,o,p))}var n=rn,r=!1,i=1,o=1,a=[0],s=R,u=R,l=R,c=R,h=R;return t.round=function(e){return arguments.length?(r=!!e,t):r},t.size=function(e){return arguments.length?(i=+e[0],o=+e[1],t):[i,o]},t.tile=function(e){return arguments.length?(n=P(e),t):n},t.padding=function(e){return arguments.length?t.paddingInner(e).paddingOuter(e):t.paddingInner()},t.paddingInner=function(e){return arguments.length?(s="function"==typeof e?e:Qe(+e),t):s},t.paddingOuter=function(e){return arguments.length?t.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):t.paddingTop()},t.paddingTop=function(e){return arguments.length?(u="function"==typeof e?e:Qe(+e),t):u},t.paddingRight=function(e){return arguments.length?(l="function"==typeof e?e:Qe(+e),t):l},t.paddingBottom=function(e){return arguments.length?(c="function"==typeof e?e:Qe(+e),t):c},t.paddingLeft=function(e){return arguments.length?(h="function"==typeof e?e:Qe(+e),t):h},t},an={value:function(){}};Q.prototype=K.prototype={constructor:Q,on:function(t,e){var n,r=this._,i=J(t+"",r),o=-1,a=i.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Y(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Y(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=X(r[n],t.name)))return n}},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Q(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].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,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var sn,un,ln=0,cn=0,hn=0,pn=1e3,fn=0,dn=0,yn=0,_n="object"==typeof performance&&performance.now?performance:Date,gn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};nt.prototype=rt.prototype={constructor:nt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?tt():+n)+(null==e?0:+e),this._next||un===this||(un?un._next=this:sn=this,un=this),this._call=t,this._time=n,ut()},stop:function(){this._call&&(this._call=null,this._time=1/0,ut())}};var mn=function(t,e,n){var r=new nt;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},vn=K("start","end","interrupt"),xn=[],wn=0,bn=1,Mn=2,kn=3,Tn=4,Sn=5,An=6,zn=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};pt(t,n,{name:e,index:r,group:i,on:vn,tween:xn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:wn})},Nn=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){e=null==e?null:e+"";for(i in o)(n=o[i]).name===e?(r=n.state>Mn&&n.state<Sn,n.state=An,n.timer.stop(),r&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}},In=function(t){return this.each(function(){Nn(this,t)})},Cn=function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ht(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?ft:dt)(n,t,e))},Dn=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t},En="\\s*([+-]?\\d+)\\s*",Pn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Bn=/^#([0-9a-f]{3})$/,qn=/^#([0-9a-f]{6})$/,Ln=new RegExp("^rgb\\("+[En,En,En]+"\\)$"),jn=new RegExp("^rgb\\("+[Rn,Rn,Rn]+"\\)$"),On=new RegExp("^rgba\\("+[En,En,En,Pn]+"\\)$"),Vn=new RegExp("^rgba\\("+[Rn,Rn,Rn,Pn]+"\\)$"),Fn=new RegExp("^hsl\\("+[Pn,Rn,Rn]+"\\)$"),Hn=new RegExp("^hsla\\("+[Pn,Rn,Rn,Pn]+"\\)$"),Wn={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};Dn(gt,mt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Dn(Mt,bt,_t(gt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Mt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Mt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(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+")")}})),Dn(At,St,_t(gt,{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 Mt(zt(t>=240?t-240:t+120,i,r),zt(t,i,r),zt(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var $n=Math.PI/180,Un=180/Math.PI,Gn=.95047,Zn=1,Kn=1.08883,Qn=4/29,Jn=6/29,Xn=3*Jn*Jn,Yn=Jn*Jn*Jn;Dn(Ct,It,_t(gt,{brighter:function(t){return new Ct(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ct(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=Zn*Et(t),e=Gn*Et(e),n=Kn*Et(n),new Mt(Pt(3.2404542*e-1.5371385*t-.4985314*n),Pt(-.969266*e+1.8760108*t+.041556*n),Pt(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),Dn(Lt,qt,_t(gt,{brighter:function(t){return new Lt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Lt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Nt(this).rgb()}}));var tr=-.14861,er=1.78277,nr=-.29227,rr=-.90649,ir=1.97294,or=ir*rr,ar=ir*er,sr=er*nr-rr*tr;Dn(Vt,Ot,_t(gt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Vt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Vt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*$n,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Mt(255*(e+n*(tr*r+er*i)),255*(e+n*(nr*r+rr*i)),255*(e+n*(ir*r)),this.opacity)}}));var ur=function(t,n){var r;return("number"==typeof n?e.interpolateNumber:n instanceof mt?e.interpolateRgb:(r=mt(n))?(n=r,e.interpolateRgb):e.interpolateString)(t,n)},lr=function(t,n){var r=e.namespace(t),i="transform"===r?e.interpolateTransformSvg:ur;return this.attrTween(t,"function"==typeof n?(r.local?Gt:Ut)(r,i,yt(this,"attr."+t,n)):null==n?(r.local?Ht:Ft)(r):(r.local?$t:Wt)(r,i,n+""))},cr=function(t,n){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;var i=e.namespace(t);return this.tween(r,(i.local?Zt:Kt)(i,n))},hr=function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Qt:Jt)(e,t)):ht(this.node(),e).delay},pr=function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Xt:Yt)(e,t)):ht(this.node(),e).duration},fr=function(t){var e=this._id;return arguments.length?this.each(te(e,t)):ht(this.node(),e).ease},dr=function(t){"function"!=typeof t&&(t=e.matcher(t));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a,s=n[o],u=s.length,l=i[o]=[],c=0;c<u;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new he(i,this._parents,this._name,this._id)},yr=function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,p=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(p[f]=u);for(;s<r;++s)a[s]=e[s];return new he(a,this._parents,this._name,this._id)},_r=function(t,e){var n=this._id;return arguments.length<2?ht(this.node(),n).on.on(t):this.each(ne(n,t,e))},gr=function(){return this.on("end.remove",re(this._id))},mr=function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selector(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u,l,c=i[s],h=c.length,p=a[s]=new Array(h),f=0;f<h;++f)(u=c[f])&&(l=t.call(u,u.__data__,f,c))&&("__data__"in u&&(l.__data__=u.__data__),p[f]=l,zn(p[f],n,r,f,p,ht(u,r)));return new he(a,this._parents,n,r)},vr=function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selectorAll(t));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var l,c=i[u],h=c.length,p=0;p<h;++p)if(l=c[p]){for(var f,d=t.call(l,l.__data__,p,c),y=ht(l,r),_=0,g=d.length;_<g;++_)(f=d[_])&&zn(f,n,r,_,d,y);a.push(d),s.push(l)}return new he(a,s,n,r)},xr=e.selection.prototype.constructor,wr=function(){return new xr(this._groups,this._parents)},br=function(t,n,r){var i="transform"==(t+="")?e.interpolateTransformCss:ur;return null==n?this.styleTween(t,ie(t,i)).on("end.style."+t,oe(t)):this.styleTween(t,"function"==typeof n?se(t,i,yt(this,"style."+t,n)):ae(t,i,n+""),r)},Mr=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,ue(t,e,null==n?"":n))},kr=function(t){return this.tween("text","function"==typeof t?ce(yt(this,"text",t)):le(null==t?"":t+""))},Tr=function(){for(var t=this._name,e=this._id,n=fe(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=ht(a,e);zn(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new he(r,this._parents,t,n)},Sr=0,Ar=e.selection.prototype;he.prototype=pe.prototype={constructor:he,select:mr,selectAll:vr,filter:dr,merge:yr,selection:wr,transition:Tr,call:Ar.call,nodes:Ar.nodes,node:Ar.node,size:Ar.size,empty:Ar.empty,each:Ar.each,on:_r,attr:lr,attrTween:cr,style:br,styleTween:Mr,text:kr,remove:gr,tween:Cn,delay:hr,duration:pr,ease:fr};(function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n})(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158);var zr=2*Math.PI,Nr=(function t(e,n){function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=zr);return r.amplitude=function(e){return t(e,n*zr)},r.period=function(n){return t(e,n)},r}(1,.3),function t(e,n){function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=zr);return r.amplitude=function(e){return t(e,n*zr)},r.period=function(n){return t(e,n)},r}(1,.3),function t(e,n){function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=zr);return r.amplitude=function(e){return t(e,n*zr)},r.period=function(n){return t(e,n)},r}(1,.3),{time:null,delay:0,duration:250,ease:de}),Ir=function(t){var e,n;t instanceof he?(e=t._id,t=t._name):(e=fe(),(n=Nr).time=tt(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&zn(a,t,e,l,s,n||ye(a,e));return new he(r,this._parents,t,e)};e.selection.prototype.interrupt=In,e.selection.prototype.transition=Ir,r(".tree_CirclePacking circle {\r\n fill: rgb(31, 119, 180);\r\n fill-opacity: .25;\r\n stroke: rgb(31, 119, 180);\r\n stroke-width: 1px;\r\n}\r\n\r\n.tree_CirclePacking .leaf circle {\r\n fill: #ff7f0e;\r\n fill-opacity: 1;\r\n}\r\n\r\n.tree_CirclePacking .label {\r\n fill:white;\r\n text-anchor: middle;\r\n}\r\n",void 0);var Cr=function(t){function r(){var e=t.call(this)||this;return n.ITree.call(e),e}return e.__extends(r,t),r.prototype.enter=function(t,e){this.diameter=Math.min(this.width(),this.height()),this.pack=Je().size([this.diameter-4,this.diameter-4]).padding(1.5),this.svg=e.append("g").attr("transform","rotate(30)")},r.prototype.update=function(t,n){var r=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this.svg.selectAll("circle").remove(),this.svg.selectAll("text").remove();var i=f(this.data()).sum(function(){return 1}).sort(function(t,e){return t[1]<e[1]?-1:t[1]>e[1]?1:0});this._focus=i,this.pack(i),this.circle=this.svg.selectAll("circle").data(i.descendants()).enter().append("circle").attr("class",function(t){return t.parent?t.children?"node":"node leaf":"node root"}).style("fill",function(t){return r._palette(t.data.label)}).on("click",function(t){r.click(t.data,null,null)}).on("dblclick",function(t){this._focus!==t&&r.zoom(t),e.event.stopPropagation()}),this.circle.append("title").text(function(t){return t.data.label}),this.svg.selectAll("text").data(i.descendants()).enter().append("text").attr("class","label").style("fill-opacity",function(t){return t.parent===i?1:0}).style("display",function(t){return t.parent===i?null:"none"}).text(function(t){return t.data.label}),this._node=this.svg.selectAll("circle,text"),this.zoomTo([i.x,i.y,2*i.r])},r.prototype.zoom=function(t){function n(t){return t===r._focus&&!t.children||t.parent===r._focus}this._focus=t;var r=this;this.svg.transition().duration(e.event.altKey?7500:750).tween("zoom",function(){var t=e.interpolateZoom(r.view,[r._focus.x,r._focus.y,2*r._focus.r]);return function(e){r.zoomTo(t(e))}}).selectAll("text").filter(function(t){return n(t)||"inline"===this.style.display}).style("fill-opacity",function(t){return n(t)?1:0}).on("start",function(t){n(t)&&(this.style.display="inline")}).on("end",function(t){n(t)||(this.style.display="none")})},r.prototype.zoomTo=function(t){var e=this.diameter/t[2];this.view=t,this._node.attr("transform",function(n){return"translate("+(n.x-t[0])*e+","+(n.y-t[1])*e+")"}),this.circle.attr("r",function(t){return t.r*e})},r}(e.SVGWidget);Cr.prototype._class+=" tree_CirclePacking",Cr.prototype.implements(n.ITree.prototype),Cr.prototype.publish("paletteID","default","set","Palette ID",Cr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Cr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),r(".tree_Dendrogram .node {\r\n}\r\n\r\n.tree_Dendrogram .node circle {\r\n fill: #dcf1ff;\r\n stroke: #1f77b4;\r\n stroke-width: 1.0px;\r\n}\r\n\r\n.tree_Dendrogram .node.selected circle {\r\n stroke: red;\r\n}\r\n\r\n.tree_Dendrogram .node.over circle {\r\n stroke: orange;\r\n}\r\n\r\n.tree_Dendrogram .node.selected.over circle {\r\n stroke: red;\r\n}\r\n\r\n.tree_Dendrogram .node.selected text {\r\n fill: red;\r\n}\r\n\r\n.tree_Dendrogram .node.over text {\r\n fill: orange;\r\n}\r\n\r\n.tree_Dendrogram .node.selected.over text {\r\n fill: red;\r\n}\r\n\r\n.tree_Dendrogram .node text {\r\n font-size: 14px;\r\n}\r\n\r\n.tree_Dendrogram .link {\r\n fill: none;\r\n stroke: #656565;\r\n stroke-width: 1.0px;\r\n}\r\n",void 0);var Dr=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);Dr.prototype._class+=" tree_Dendrogram.DendrogramColumn",Dr.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var Er=function(t){function r(){var r=t.call(this)||this;return n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r._d3LayoutCluster=Be(),r._d3LayoutTree=en(),r}return e.__extends(r,t),r.prototype.dendrogramData=function(){function t(e){return{label:e.key,children:e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),origRows:e.values}}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.rollupView(this.mappings().map(function(t){return t.column()})).entries()}):this.data()},r.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._renderElement.attr("opacity",0).transition().duration(500).attr("opacity",1),this._selection.widgetElement(this._renderElement)},r.prototype.update=function(n,r){function i(t){return"M"+t.parent.x+","+t.parent.y+"C"+t.parent.x+","+(t.parent.y+t.y)/2+" "+t.x+","+(t.parent.y+t.y)/2+" "+t.x+","+t.y}function o(t){return"M"+t.y+","+t.x+"C"+(t.y+t.parent.y)/2+","+t.x+" "+(t.y+t.parent.y)/2+","+t.parent.x+" "+t.parent.y+","+t.parent.x}function a(t){return h?i(t):o(t)}function s(t,e){var n=(t-90)/180*Math.PI,r=e;return[r*Math.cos(n),r*Math.sin(n)]}function u(t){return"M"+s(t.x,t.y)+"C"+s(t.x,(t.y+t.parent.y)/2)+" "+s(t.parent.x,(t.y+t.parent.y)/2)+" "+s(t.parent.x,t.parent.y)}function l(t){return c.radial()?"rotate("+(t.x-90)+")translate("+t.y+")":"horizontal"===c.orientation()?"translate("+t.y+","+t.x+")":"translate("+t.x+","+t.y+")"}t.prototype.update.call(this,n,r);var c=this,h="vertical"===this.orientation();this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._d3Layout=this.dendrogram()?this._d3LayoutCluster:this._d3LayoutTree,this.radial()?(this._d3Layout.size([360,2*this.separation()]),this._d3Layout.separation(function(t,e){return(t.parent===e.parent?1:2)/t.depth})):(this._d3Layout.nodeSize([14,this.separation()]),this._d3Layout.separation(function(t,e){return t.parent===e.parent?1:2}));var p=f(this.dendrogramData());this._d3Layout(p);var d=p.descendants(),y=p.descendants().slice(1),_=this._renderCount?500:0,g=this._renderElement.selectAll(".link").data(y);g.enter().append("path").attr("class","link").attr("d",this.radial()?u:a),g.transition().duration(_).attr("d",this.radial()?u:a),g.exit().remove();var m=this.circleRadius()+2,v=this._renderElement.selectAll(".node").data(d);v.transition().duration(_).attr("transform",l);var x=v.enter().append("g").attr("class","node").attr("transform",l).call(this._selection.enter.bind(this._selection)).on("click",function(t){for(var e=t;e.children;)e=e.children[0];t.depth>0&&c.click(c.rowToObj(e.origRows[0]),c.mappings()[t.depth-1].column(),!0)}).on("dblclick",function(t){for(var e=t;e.children;)e=e.children[0];t.depth>0&&c.dblclick(c.rowToObj(e.origRows[0]),c.mappings()[t.depth-1].column(),!0)}).each(function(){var t=e.select(this);t.append("circle"),t.append("text")});x.merge(v).select("circle").attr("r",this.circleRadius()).style("fill",function(t){return c._palette(t.data.label)}).append("title").text(function(t){return t.data.label}),x.merge(v).select("text").attr("dx",function(t){return c.radial()?t.children?t.x<180?-m:m:t.x<180?m:-m:h?t.children?m:-m:t.children?-m:m}).attr("dy","0.25em").style("text-anchor",function(t){return c.radial()?t.children?t.x<180?"end":"start":t.x<180?"start":"end":h?t.children?"start":"end":t.children?"end":"start"}).attr("transform",function(t){return c.radial()?t.x<180?null:"rotate(180)":h?"rotate(-66)":null}).text(function(t){return t.data.label}),v.exit().remove(),this._renderCount||c.zoomToFit()},r}(e.SVGZoomWidget);Er.prototype._class+=" tree_Dendrogram",Er.prototype.implements(n.ITree.prototype),Er.prototype.mixin(e.Utility.SimpleSelectionMixin),Er.prototype.Column=Dr,Er.prototype.publish("paletteID","default","set","Palette ID",Er.prototype._palette.switch(),{tags:["Basic","Shared"]}),Er.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Er.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:Dr}),Er.prototype.publish("circleRadius",4.5,"number","Text offset from circle"),Er.prototype.publish("separation",240,"number","Leaf Separation"),Er.prototype.publish("dendrogram",!0,"boolean","Dendrogram"),Er.prototype.publish("radial",!1,"boolean","Radial"),Er.prototype.publish("orientation","horizontal","set","Orientation",["horizontal","vertical"],{tags:["Private"],disable:function(t){return t.radial()}}),r(".tree_Indented .node rect {\r\n cursor: pointer;\r\n fill: #fff;\r\n stroke: #3182bd;\r\n stroke-width: 1px;\r\n}\r\n\r\n.tree_Indented .node text {\r\n font: 10px sans-serif;\r\n pointer-events: none;\r\n}\r\n\r\n.tree_Indented path.link {\r\n fill: none;\r\n stroke: #9ecae1;\r\n stroke-width: 1.5px;\r\n}",void 0);var Pr=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);Pr.prototype._class+=" tree_Dendrogram.IndentedColumn",Pr.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var Rr=function(t){function r(){var r=t.call(this)||this;return r._collapsed={},n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r._d3Tree=en(),r}return e.__extends(r,t),r.prototype.xmlToData=function(t,e){return void 0===e&&(e=""),DOMParser?_e((new DOMParser).parseFromString(t,"text/xml"),e).children[0]:[]},r.prototype.xml=function(t){return arguments.length?(this._xml=t,this.data(this.xmlToData(this._xml)),this):this._xml},r.prototype.IndentedData=function(){function t(e){if(e.values instanceof Array){var n=e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),r={label:e.key};return n.length?r.children=n:r.size=22,r}return{label:e.key,size:e.values.aggregate,origRows:e.values}}if(this.xmlColumn_exists()){var e=this.columns().indexOf(this.xmlColumn()),n={label:this.xmlColumn(),children:this.data().map(function(t,n){return this.xmlToData(t[e],"["+n+"]")},this)};return 1===n.children.length?n.children[0]:n}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.rollupView(this.mappings().map(function(t){return t.column()})).entries()}):this.data()},r.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._svgLinks=this._renderElement.append("g"),this._svgNodes=this._renderElement.append("g"),this._selection.widgetElement(this._svgNodes)},r.prototype.update=function(n,r){function i(t){return(t.parent?i(t.parent)+".":"")+t.data.label}function o(t){return"M"+t.parent.y+","+t.parent.x+"V"+t.x+", H"+t.y}function a(t){return u._collapsed[i(t)]?"#3182bd":t.children?"#c6dbef":"#fd8d3c"}var s=this;t.prototype.update.call(this,n,r);var u=this;this._d3Tree.nodeSize([0,this.barHeight()]);var l=this._db.dataChecksum();this._prevDataChecksum!==l&&(this._treeData=this.IndentedData(),this._prevDataChecksum=l);var c=f(this.data()).sum(function(t){return t.size||50}).each(function(t){s._collapsed[i(t)]&&delete t.children}),h=this._d3Tree(c).descendants(),p=this._d3Tree(c).descendants().slice(1),d=0;c.eachBefore(function(t){t.x=d*u.barHeight(),++d});var y=this.barHeight()-4,_=this._renderCount?500:0,g=this._svgLinks.selectAll(".link").data(p,function(t){return i(t)});g.enter().append("path").attr("class","link").attr("d",o),g.transition().duration(_).attr("d",o),g.exit().remove();var m=this._svgNodes.selectAll(".node").data(h,function(t){return i(t)});m.transition().duration(_).attr("transform",function(t){return"translate("+t.y+","+t.x+")"});var v=m.enter().append("g").attr("class","node").attr("transform",function(t){return"translate("+t.y+","+t.x+")"}).call(this._selection.enter.bind(this._selection)).each(function(){var t=e.select(this);t.append("rect").attr("height",y).attr("width",y).on("click",function(t){u._collapsed[i(t)]?delete u._collapsed[i(t)]:t.children&&(u._collapsed[i(t)]=!0),u.lazyRender()}),t.append("text")}).style("opacity",0);v.transition().style("opacity",1),v.merge(m).select("rect").attr("x",-y/2).attr("y",-y/2).style("fill",a),v.merge(m).select("text").attr("dx",y/2+4+"px").attr("dy","0.33em").text(function(t){return t.data.label}),m.exit().transition().style("opacity",0).remove(),this._renderCount||u.zoomToFit()},r}(e.SVGZoomWidget);Rr.prototype._class+=" tree_Indented",Rr.prototype.implements(n.ITree.prototype),Rr.prototype.mixin(e.Utility.SimpleSelectionMixin),Rr.prototype.Column=Pr,Rr.prototype.publish("xmlColumn",null,"set","Field",function(){return this.columns()},{optional:!0}),Rr.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:Pr,disable:function(t){return t.xmlColumn_exists()}}),Rr.prototype.publish("barHeight",16,"number","Bar height");var Br=Math.PI,qr=2*Br,Lr=qr-1e-6;ge.prototype=me.prototype={constructor:ge,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,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,l=o-t,c=a-e,h=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-u*l)>1e-6&&i){var p=n-o,f=r-a,d=s*s+u*u,y=p*p+f*f,_=Math.sqrt(d),g=Math.sqrt(h),m=i*Math.tan((Br-Math.acos((d+h-y)/(2*_*g)))/2),v=m/g,x=m/_;Math.abs(v-1)>1e-6&&(this._+="L"+(t+v*l)+","+(e+v*c)),this._+="A"+i+","+i+",0,0,"+ +(c*p>l*f)+","+(this._x1=t+x*s)+","+(this._y1=e+x*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%qr+qr),h>Lr?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Br)+","+c+","+(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 jr=function(t){return function(){return t}},Or=Math.abs,Vr=Math.atan2,Fr=Math.cos,Hr=Math.max,Wr=Math.min,$r=Math.sin,Ur=Math.sqrt,Gr=1e-12,Zr=Math.PI,Kr=Zr/2,Qr=2*Zr,Jr=function(){function t(){var t,l,c=+e.apply(this,arguments),h=+n.apply(this,arguments),p=o.apply(this,arguments)-Kr,f=a.apply(this,arguments)-Kr,d=Or(f-p),y=f>p;if(u||(u=t=me()),h<c&&(l=h,h=c,c=l),h>Gr)if(d>Qr-Gr)u.moveTo(h*Fr(p),h*$r(p)),u.arc(0,0,h,p,f,!y),c>Gr&&(u.moveTo(c*Fr(f),c*$r(f)),u.arc(0,0,c,f,p,y));else{var _,g,m=p,v=f,x=p,w=f,b=d,M=d,k=s.apply(this,arguments)/2,T=k>Gr&&(i?+i.apply(this,arguments):Ur(c*c+h*h)),S=Wr(Or(h-c)/2,+r.apply(this,arguments)),A=S,z=S;if(T>Gr){var N=xe(T/c*$r(k)),I=xe(T/h*$r(k));(b-=2*N)>Gr?(N*=y?1:-1,x+=N,w-=N):(b=0,x=w=(p+f)/2),(M-=2*I)>Gr?(I*=y?1:-1,m+=I,v-=I):(M=0,m=v=(p+f)/2)}var C=h*Fr(m),D=h*$r(m),E=c*Fr(w),P=c*$r(w);if(S>Gr){var R=h*Fr(v),B=h*$r(v),q=c*Fr(x),L=c*$r(x);if(d<Zr){var j=b>Gr?Se(C,D,q,L,R,B,E,P):[E,P],O=C-j[0],V=D-j[1],F=R-j[0],H=B-j[1],W=1/$r(ve((O*F+V*H)/(Ur(O*O+V*V)*Ur(F*F+H*H)))/2),$=Ur(j[0]*j[0]+j[1]*j[1]);A=Wr(S,(c-$)/(W-1)),z=Wr(S,(h-$)/(W+1))}}M>Gr?z>Gr?(_=Ae(q,L,C,D,h,z,y),g=Ae(R,B,E,P,h,z,y),u.moveTo(_.cx+_.x01,_.cy+_.y01),z<S?u.arc(_.cx,_.cy,z,Vr(_.y01,_.x01),Vr(g.y01,g.x01),!y):(u.arc(_.cx,_.cy,z,Vr(_.y01,_.x01),Vr(_.y11,_.x11),!y),u.arc(0,0,h,Vr(_.cy+_.y11,_.cx+_.x11),Vr(g.cy+g.y11,g.cx+g.x11),!y),u.arc(g.cx,g.cy,z,Vr(g.y11,g.x11),Vr(g.y01,g.x01),!y))):(u.moveTo(C,D),u.arc(0,0,h,m,v,!y)):u.moveTo(C,D),c>Gr&&b>Gr?A>Gr?(_=Ae(E,P,R,B,c,-A,y),g=Ae(C,D,q,L,c,-A,y),u.lineTo(_.cx+_.x01,_.cy+_.y01),A<S?u.arc(_.cx,_.cy,A,Vr(_.y01,_.x01),Vr(g.y01,g.x01),!y):(u.arc(_.cx,_.cy,A,Vr(_.y01,_.x01),Vr(_.y11,_.x11),!y),u.arc(0,0,c,Vr(_.cy+_.y11,_.cx+_.x11),Vr(g.cy+g.y11,g.cx+g.x11),y),u.arc(g.cx,g.cy,A,Vr(g.y11,g.x11),Vr(g.y01,g.x01),!y))):u.arc(0,0,c,w,x,y):u.lineTo(E,P)}else u.moveTo(0,0);if(u.closePath(),t)return u=null,t+""||null}var e=we,n=be,r=jr(0),i=null,o=Me,a=ke,s=Te,u=null;return t.centroid=function(){var t=(+e.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Zr/2;return[Fr(r)*t,$r(r)*t]},t.innerRadius=function(n){return arguments.length?(e="function"==typeof n?n:jr(+n),t):e},t.outerRadius=function(e){return arguments.length?(n="function"==typeof e?e:jr(+e),t):n},t.cornerRadius=function(e){return arguments.length?(r="function"==typeof e?e:jr(+e),t):r},t.padRadius=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:jr(+e),t):i},t.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:jr(+e),t):o},t.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:jr(+e),t):a},t.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:jr(+e),t):s},t.context=function(e){return arguments.length?(u=null==e?null:e,t):u},t};ze.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:De(this,this._t0,Ce(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,t!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,De(this,Ce(this,n=Ie(this,t,e)),n);break;default:De(this,this._t0,n=Ie(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Pe.prototype=Object.create(Ee.prototype)).point=function(t,e){Ee.prototype.point.call(this,e,t)},Re.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},r(".tree_Sunburst path {\r\n stroke: #fff;\r\n stroke-width:0.5px;\r\n fill-rule: evenodd;\r\n}\r\n",void 0);var Xr=function(t){function r(){var e=t.call(this)||this;return n.ITree.call(e),e}return e.__extends(r,t),r.prototype.data=function(t){var n=e.SVGWidget.prototype.data.apply(this,arguments);return arguments.length&&(this._resetRoot=!0),n},r.prototype.enter=function(t,n){var r=this;this.radius=Math.min(this.width(),this.height())/2,this._xScale=e.scaleLinear().range([0,2*Math.PI]),this._yScale=e.scaleSqrt().range([0,this.radius]),this.partition=tn(),this.arc=Jr().startAngle(function(t){return Math.max(0,Math.min(2*Math.PI,r._xScale(t.x0)))}).endAngle(function(t){return Math.max(0,Math.min(2*Math.PI,r._xScale(t.x1)))}).innerRadius(function(t){return Math.max(0,r._yScale(t.y0))}).outerRadius(function(t){return Math.max(0,r._yScale(t.y1))}),this.svg=n.append("g")},r.prototype.update=function(t,n){var r=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this.radius=Math.min(this.width(),this.height())/2,this._yScale.range([0,this.radius]);var i=f(this.data()).sum(function(t){return void 0!==t.size?t.size:1}),o=this.svg.selectAll("path").data(this.partition(i).descendants(),function(t,e){return void 0!==t.data.label?t.data.label:e});o.enter().append("path").on("click",function(t){r.click(t.data,null,null)}).on("dblclick",function(t){e.event&&e.event.stopPropagation(),r.zoomTo(t)}).each(function(){e.select(this).append("title")}).merge(o).attr("d",this.arc).style("fill",function(t){return t.data.__viz_fill?t.data.__viz_fill:r._palette(t.data.label)}).style("stroke",function(t){return t.value>16?"white":"none"}).select("title").text(function(t){return t.data.label}),o.exit().remove(),this._resetRoot&&(this._resetRoot=!1,this.zoomTo(i))},r.prototype.zoomTo=function(t){var n=this;this.svg.transition().duration(750).tween("scale",function(){var r=e.interpolate(n._xScale.domain(),[t.x0,t.x1]),i=e.interpolate(n._yScale.domain(),[t.y0,1]),o=e.interpolate(n._yScale.range(),[t.y0?20:0,n.radius]);return function(t){n._xScale.domain(r(t)),n._yScale.domain(i(t)).range(o(t))}}).selectAll("path").attrTween("d",function(t){return function(){return n.arc(t)}})},r}(e.SVGWidget);Xr.prototype._class+=" tree_SunburstPartition",Xr.prototype.implements(n.ITree.prototype),Xr.prototype.publish("paletteID","default","set","Palette ID",Xr.prototype._palette.switch(),{tags:["Basic","Shared"]}),Xr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),r(".tree_Treemap .node {\r\n border: solid 1px white;\r\n overflow: hidden;\r\n text-overflow:ellipsis;\r\n position: absolute;\r\n text-indent: 2px;\r\n}\r\n\r\n.tree_Treemap .node.selected {\r\n border-color: red;\r\n}\r\n\r\n.tree_Treemap .node.over {\r\n border-color: orange;\r\n}\r\n\r\n.tree_Treemap .node.selected.over {\r\n border-color: red;\r\n}\r\n",void 0);var Yr=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);Yr.prototype._class+=" tree_Dendrogram.TreemapColumn",Yr.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var ti=function(t){function r(){var r=t.call(this)||this;return n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r}return e.__extends(r,t),r.prototype.treemapData=function(){function t(e){if(e.values instanceof Array){var n=e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),r={label:e.key};return n.length?r.children=n:r.size=22,r}return{label:e.key,size:e.values.aggregate,origRows:e.values}}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.aggregateView(this.mappings().map(function(t){return t.column()}),this.aggrType(),this.aggrColumn()).entries()}):this.data()},r.prototype.enter=function(t,n){e.HTMLWidget.prototype.enter.apply(this,arguments),this._d3Treemap=on(),this._elementDIV=n.append("div"),this._selection.widgetElement(this._elementDIV)},r.prototype.update=function(t,n){function r(t){if(t.children)return null;for(var e=t.data.label+" ("+t.value+")";t.parent&&t.parent.parent;)e=t.parent.data.label+" -> "+e,t=t.parent;return e}e.HTMLWidget.prototype.update.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var i=f(this.treemapData()).sum(function(t){return t.size||50});this._d3Treemap.size([this.width(),this.height()]),this._d3Treemap(i),this._elementDIV.style("font-size",this.fontSize_exists()?this.fontSize()+"px":null).style("line-height",this.fontSize_exists()?this.fontSize()+2+"px":null);var o=this,a=this._elementDIV.selectAll(".node").data(i.descendants());a.enter().append("div").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",function(t){if(t&&t.origRows){var e="";o.mappings().forEach(function(t){t.column()&&(e=t.column())}),o.click(o.rowToObj(t.origRows[0]),e,o._selection.selected(this))}}).on("dblclick",function(t){if(t&&t.origRows){var e="";o.mappings().forEach(function(t){t.column()&&(e=t.column())}),o.dblclick(o.rowToObj(t.origRows[0]),e,o._selection.selected(this))}}).style("left",function(t){return t.x0+Math.max(0,t.x1-t.x0)/2+"px"}).style("top",function(t){return t.y0+Math.max(0,t.y1-t.y0)/2+"px"}).style("width",function(){return"0px"}).style("height",function(){return"0px"}).merge(a).attr("title",r).text(function(t){return t.children?null:t.data.label}).style("background",function(t){return t.children?o._palette(t.data.label):null}).transition().duration(this.transitionDuration()).style("opacity",function(t){return t.children?1:null}).style("left",function(t){return t.x0+"px"}).style("top",function(t){return t.y0+"px"}).style("width",function(t){return Math.max(0,t.x1-t.x0)+"px"}).style("height",function(t){return Math.max(0,t.y1-t.y0)+"px"}),a.exit().transition().duration(this.transitionDuration()).style("opacity",0).remove()},r.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},r}(e.HTMLWidget);ti.prototype._class+=" tree_Treemap",ti.prototype.implements(n.ITree.prototype),ti.prototype.mixin(e.Utility.SimpleSelectionMixin),ti.prototype.Column=Yr,ti.prototype.publish("paletteID","default","set","Palette ID",ti.prototype._palette.switch(),{tags:["Basic","Shared"]}),ti.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),ti.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:Yr}),ti.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0}),ti.prototype.publish("aggrColumn",null,"set","Aggregation Field",function(){return this.columns()},{optional:!0,disable:function(t){return!t.aggrType()}}),ti.prototype.publish("fontSize",null,"number","Font Size",null,{optional:!0}),ti.prototype.publish("transitionDuration",250,"number","Transition Duration"),t.CirclePacking=Cr,t.DendrogramColumn=Dr,t.Dendrogram=Er,t.IndentedColumn=Pr,t.Indented=Rr,t.SunburstPartition=Xr,t.TreemapColumn=Yr,t.Treemap=ti,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api"],e):e(t["@hpcc-js/tree"]=t["@hpcc-js/tree"]||{},t["@hpcc-js/common"],t["@hpcc-js/api"])}(this,function(t,e,n){"use strict";function r(t,e){if("undefined"==typeof document)return e;t=t||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");return r.type="text/css",r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t)),n.appendChild(r),e}function i(t,e){return t.parent===e.parent?1:2}function o(t){return t.reduce(a,0)/t.length}function a(t,e){return t+e.x}function s(t){return 1+t.reduce(u,0)}function u(t,e){return Math.max(t,e.y)}function l(t){for(var e;e=t.children;)t=e[0];return t}function c(t){for(var e;e=t.children;)t=e[e.length-1];return t}function h(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function p(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}function f(t,e){var n,r,i,o,a,s=new g(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=d);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new g(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(_)}function d(t){return t.children}function y(t){t.data=t.data.data}function _(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function g(t){this.data=t,this.depth=this.height=0,this.parent=null}function m(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}function v(t,e){var n,r;if(b(e,t))return[e];for(n=0;n<t.length;++n)if(x(e,t[n])&&b(T(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(x(T(t[n],t[r]),e)&&x(T(t[n],e),t[r])&&x(T(t[r],e),t[n])&&b(S(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function x(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function w(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function b(t,e){for(var n=0;n<e.length;++n)if(!w(t,e[n]))return!1;return!0}function M(t){switch(t.length){case 1:return k(t[0]);case 2:return T(t[0],t[1]);case 3:return S(t[0],t[1],t[2])}}function k(t){return{x:t.x,y:t.y,r:t.r}}function T(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,l=a-r,c=s-i,h=Math.sqrt(u*u+l*l);return{x:(n+o+u/h*c)/2,y:(r+a+l/h*c)/2,r:(h+i+s)/2}}function S(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,h=n.r,p=r-a,f=r-l,d=i-s,y=i-c,_=u-o,g=h-o,m=r*r+i*i-o*o,v=m-a*a-s*s+u*u,x=m-l*l-c*c+h*h,w=f*d-p*y,b=(d*x-y*v)/(2*w)-r,M=(y*_-d*g)/w,k=(f*v-p*x)/(2*w)-i,T=(p*g-f*_)/w,S=M*M+T*T-1,A=2*(o+b*M+k*T),z=b*b+k*k-o*o,N=-(S?(A+Math.sqrt(A*A-4*S*z))/(2*S):z/A);return{x:r+b+M*N,y:i+k+T*N,r:N}}function A(t,e,n){var r=t.x,i=t.y,o=e.r+n.r,a=t.r+n.r,s=e.x-r,u=e.y-i,l=s*s+u*u;if(l){var c=.5+((a*=a)-(o*=o))/(2*l),h=Math.sqrt(Math.max(0,2*o*(a+l)-(a-=l)*a-o*o))/(2*l);n.x=r+c*s+h*u,n.y=i+c*u-h*s}else n.x=r+a,n.y=i}function z(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return i*i-1e-6>n*n+r*r}function N(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function I(t){this._=t,this.next=null,this.previous=null}function C(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,u,l,c,h;if(e=t[0],e.x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;A(n,e,r=t[2]),e=new I(e),n=new I(n),r=new I(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){A(e._,n._,r=t[s]),r=new I(r),u=n.next,l=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(z(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}c+=u._.r,u=u.next}else{if(z(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(u!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=N(e);(r=r.next)!==n;)(a=N(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Ne(e),s=0;s<i;++s)e=t[s],e.x-=r.x,e.y-=r.y;return r.r}function D(t){return null==t?null:E(t)}function E(t){if("function"!=typeof t)throw new Error;return t}function P(){return 0}function R(t){return Math.sqrt(t.value)}function B(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function q(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=C(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function L(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function j(t,e){return t.parent===e.parent?1:2}function O(t){var e=t.children;return e?e[0]:t.t}function V(t){var e=t.children;return e?e[e.length-1]:t.t}function F(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function H(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}function W(t,e,n){return t.a.parent===e.parent?t.a:n}function $(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function U(t){for(var e,n,r,i,o,a=new $(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new $(r[i],i)),n.parent=e;return(a.parent=new $(null,0)).children=[a],a}function G(t,e,n,r,i,o){for(var a,s,u,l,c,h,p,f,d,y,_,g=[],m=e.children,v=0,x=0,w=m.length,b=e.value;v<w;){u=i-n,l=o-r;do{c=m[x++].value}while(!c&&x<w);for(h=p=c,_=c*c*(y=Math.max(l/u,u/l)/(b*t)),d=Math.max(p/_,_/h);x<w;++x){if(c+=s=m[x].value,s<h&&(h=s),s>p&&(p=s),_=c*c*y,(f=Math.max(p/_,_/h))>d){c-=s;break}d=f}g.push(a={value:c,dice:u<l,children:m.slice(v,x)}),a.dice?Ee(a,n,r,i,b?r+=l*c/b:o):Be(a,n,r,b?n+=u*c/b:i,o),b-=c,v=x}return g}function Z(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new K(r)}function K(t){this._=t}function Q(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function J(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function X(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=je,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}function Y(){return Ge||(Qe(tt),Ge=Ke.now()+Ze)}function tt(){Ge=0}function et(){this._call=this._time=this._next=null}function nt(t,e,n){var r=new et;return r.restart(t,e,n),r}function rt(){Y(),++Fe;for(var t,e=Oe;e;)(t=Ge-e._time)>=0&&e._call.call(null,t),e=e._next;--Fe}function it(){Ge=(Ue=Ke.now())+Ze,Fe=He=0;try{rt()}finally{Fe=0,at(),Ge=0}}function ot(){var t=Ke.now(),e=t-Ue;e>$e&&(Ze-=e,Ue=t)}function at(){for(var t,e,n=Oe,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Oe=e);Ve=t,st(r)}function st(t){if(!Fe){He&&(He=clearTimeout(He));var e=t-Ge;e>24?(t<1/0&&(He=setTimeout(it,e)),We&&(We=clearInterval(We))):(We||(Ue=Ge,We=setInterval(ot,$e)),Fe=1,Qe(it))}}function ut(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>tn)throw new Error("too late");return n}function lt(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>nn)throw new Error("too late");return n}function ct(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("too late");return n}function ht(t,e,n){function r(u){var l,c,h,p;if(n.state!==en)return o();for(l in s)if((p=s[l]).name===n.name){if(p.state===rn)return Je(r);p.state===on?(p.state=sn,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete s[l]):+l<e&&(p.state=sn,p.timer.stop(),delete s[l])}if(Je(function(){n.state===rn&&(n.state=on,n.timer.restart(i,n.delay,n.time),i(u))}),n.state=nn,n.on.call("start",t,t.__data__,n.index,n.group),n.state===nn){for(n.state=rn,a=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(p=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(a[++c]=p);a.length=c+1}}function i(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(o),n.state=an,1),i=-1,s=a.length;++i<s;)a[i].call(null,r);n.state===an&&(n.on.call("end",t,t.__data__,n.index,n.group),o())}function o(){n.state=sn,n.timer.stop(),delete s[e];for(var r in s)return;delete t.__transition}var a,s=t.__transition;s[e]=n,n.timer=nt(function(t){n.state=en,n.timer.restart(r,n.delay,n.time),n.delay<=t&&r(t-n.delay)},0,n.time)}function pt(t,e){var n,r;return function(){var i=lt(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function ft(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=lt(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function dt(t,e,n){var r=t._id;return t.each(function(){var t=lt(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return ct(t,r).value[e]}}function yt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function _t(){}function gt(t){var e;return t=(t+"").trim().toLowerCase(),(e=dn.exec(t))?(e=parseInt(e[1],16),new wt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=yn.exec(t))?mt(parseInt(e[1],16)):(e=_n.exec(t))?new wt(e[1],e[2],e[3],1):(e=gn.exec(t))?new wt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=mn.exec(t))?vt(e[1],e[2],e[3],e[4]):(e=vn.exec(t))?vt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=xn.exec(t))?bt(e[1],e[2]/100,e[3]/100,1):(e=wn.exec(t))?bt(e[1],e[2]/100,e[3]/100,e[4]):bn.hasOwnProperty(t)?mt(bn[t]):"transparent"===t?new wt(NaN,NaN,NaN,0):null}function mt(t){return new wt(t>>16&255,t>>8&255,255&t,1)}function vt(t,e,n,r){return r<=0&&(t=e=n=NaN),new wt(t,e,n,r)}function xt(t){return t instanceof _t||(t=gt(t)),t?(t=t.rgb(),new wt(t.r,t.g,t.b,t.opacity)):new wt}function wt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function bt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new kt(t,e,n,r)}function Mt(t){if(t instanceof kt)return new kt(t.h,t.s,t.l,t.opacity);if(t instanceof _t||(t=gt(t)),!t)return new kt;if(t instanceof kt)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new kt(a,s,u,t.opacity)}function kt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Tt(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 St(t){if(t instanceof At)return new At(t.l,t.a,t.b,t.opacity);if(t instanceof Et){var e=t.h*Mn;return new At(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof wt||(t=xt(t));var n=Ct(t.r),r=Ct(t.g),i=Ct(t.b),o=zt((.4124564*n+.3575761*r+.1804375*i)/Tn),a=zt((.2126729*n+.7151522*r+.072175*i)/Sn);return new At(116*a-16,500*(o-a),200*(a-zt((.0193339*n+.119192*r+.9503041*i)/An)),t.opacity)}function At(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function zt(t){return t>Cn?Math.pow(t,1/3):t/In+zn}function Nt(t){return t>Nn?t*t*t:In*(t-zn)}function It(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ct(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Dt(t){if(t instanceof Et)return new Et(t.h,t.c,t.l,t.opacity);t instanceof At||(t=St(t));var e=Math.atan2(t.b,t.a)*kn;return new Et(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Et(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Pt(t){if(t instanceof Rt)return new Rt(t.h,t.s,t.l,t.opacity);t instanceof wt||(t=xt(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(jn*r+qn*e-Ln*n)/(jn+qn-Ln),o=r-i,a=(Bn*(n-i)-Pn*o)/Rn,s=Math.sqrt(a*a+o*o)/(Bn*i*(1-i)),u=s?Math.atan2(a,o)*kn-120:NaN;return new Rt(u<0?u+360:u,s,i,t.opacity)}function Rt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Bt(t){return function(){this.removeAttribute(t)}}function qt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Lt(t,e,n){var r,i;return function(){var o=this.getAttribute(t);return o===n?null:o===r?i:i=e(r=o,n)}}function jt(t,e,n){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?i:i=e(r=o,n)}}function Ot(t,e,n){var r,i,o;return function(){var a,s=n(this);{if(null!=s)return a=this.getAttribute(t),a===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttribute(t)}}}function Vt(t,e,n){var r,i,o;return function(){var a,s=n(this);{if(null!=s)return a=this.getAttributeNS(t.space,t.local),a===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttributeNS(t.space,t.local)}}}function Ft(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}return n._value=e,n}function Ht(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}return n._value=e,n}function Wt(t,e){return function(){ut(this,t).delay=+e.apply(this,arguments)}}function $t(t,e){return e=+e,function(){ut(this,t).delay=e}}function Ut(t,e){return function(){lt(this,t).duration=+e.apply(this,arguments)}}function Gt(t,e){return e=+e,function(){lt(this,t).duration=e}}function Zt(t,e){if("function"!=typeof e)throw new Error;return function(){lt(this,t).ease=e}}function Kt(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}function Qt(t,e,n){var r,i,o=Kt(e)?ut:lt;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function Jt(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Xt(t,n){var r,i,o;return function(){var a=e.style(this,t),s=(this.style.removeProperty(t),e.style(this,t));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function Yt(t){return function(){this.style.removeProperty(t)}}function te(t,n,r){var i,o;return function(){var a=e.style(this,t);return a===r?null:a===i?o:o=n(i=a,r)}}function ee(t,n,r){var i,o,a;return function(){var s=e.style(this,t),u=r(this);return null==u&&(this.style.removeProperty(t),u=e.style(this,t)),s===u?null:s===i&&u===o?a:a=n(i=s,o=u)}}function ne(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}return r._value=e,r}function re(t){return function(){this.textContent=t}}function ie(t){return function(){var e=t(this);this.textContent=null==e?"":e}}function oe(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ae(){return++Fn}function se(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return $n.time=Y(),$n;return n}function ue(t,e){void 0===e&&(e="");var n={id:e,label:"",attributes:{},children:[]};if(n.label=t.nodeName,1===t.nodeType){if(t.attributes.length>0)for(var r=0;r<t.attributes.length;r++){var i=t.attributes.item(r);n.attributes[i.nodeName]=i.nodeValue}}else 3===t.nodeType&&(n.label=t.nodeValue);if(t.hasChildNodes())for(var o=0;o<t.childNodes.length;o++){var a=ue(t.childNodes.item(o),e+"["+n.children.length+"]");n.children.push(a)}return n}function le(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ce(){return new le}function he(t){return t>1?0:t<-1?lr:Math.acos(t)}function pe(t){return t>=1?cr:t<=-1?-cr:Math.asin(t)}function fe(t){return t.innerRadius}function de(t){return t.outerRadius}function ye(t){return t.startAngle}function _e(t){return t.endAngle}function ge(t){return t&&t.padAngle}function me(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,p=(c*(e-o)-h*(t-i))/(h*u-c*l);return[t+p*u,e+p*l]}function ve(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/sr(s*s+u*u),c=l*u,h=-l*s,p=t+c,f=e+h,d=n+c,y=r+h,_=(p+d)/2,g=(f+y)/2,m=d-p,v=y-f,x=m*m+v*v,w=i-o,b=p*y-d*f,M=(v<0?-1:1)*sr(ir(0,w*w*x-b*b)),k=(b*v-m*M)/x,T=(-b*m-v*M)/x,S=(b*v+m*M)/x,A=(-b*m+v*M)/x,z=k-_,N=T-g,I=S-_,C=A-g;return z*z+N*N>I*I+C*C&&(k=S,T=A),{cx:k,cy:T,x01:-c,y01:-h,x11:k*(i/w-1),y11:T*(i/w-1)}}function xe(t){this._context=t}function we(t){return t<0?-1:1}function be(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(we(o)+we(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Me(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ke(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Te(t){this._context=t}function Se(t){this._context=t}var Ae=function(){function t(t){var i,u=0;t.eachAfter(function(t){var n=t.children;n?(t.x=o(n),t.y=s(n)):(t.x=i?u+=e(t,i):0,t.y=0,i=t)});var h=l(t),p=c(t),f=h.x-e(h,p)/2,d=p.x+e(p,h)/2;return t.eachAfter(a?function(e){e.x=(e.x-t.x)*n,e.y=(t.y-e.y)*r}:function(e){e.x=(e.x-f)/(d-f)*n,e.y=(1-(t.y?e.y/t.y:1))*r})}var e=i,n=1,r=1,a=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(e){return arguments.length?(a=!1,n=+e[0],r=+e[1],t):a?null:[n,r]},t.nodeSize=function(e){return arguments.length?(a=!0,n=+e[0],r=+e[1],t):a?[n,r]:null},t};g.prototype=f.prototype={constructor:g,count:function(){return this.eachAfter(h)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.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;n>=0;--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;--i>=0;)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=p(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 f(this).eachBefore(y)}};var ze=Array.prototype.slice,Ne=function(t){for(var e,n,r=0,i=(t=m(ze.call(t))).length,o=[];r<i;)e=t[r],n&&w(n,e)?++r:(n=M(o=v(o,e)),r=0);return n},Ie=function(t){return function(){return t}},Ce=function(){function t(t){return t.x=n/2,t.y=r/2,e?t.eachBefore(B(e)).eachAfter(q(i,.5)).eachBefore(L(1)):t.eachBefore(B(R)).eachAfter(q(P,1)).eachAfter(q(i,t.r/Math.min(n,r))).eachBefore(L(Math.min(n,r)/(2*t.r))),t}var e=null,n=1,r=1,i=P;return t.radius=function(n){return arguments.length?(e=D(n),t):e},t.size=function(e){return arguments.length?(n=+e[0],r=+e[1],t):[n,r]},t.padding=function(e){return arguments.length?(i="function"==typeof e?e:Ie(+e),t):i},t},De=function(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)},Ee=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l},Pe=function(){function t(t){var a=t.height+1;return t.x0=t.y0=i,t.x1=n,t.y1=r/a,t.eachBefore(e(r,a)),o&&t.eachBefore(De),t}function e(t,e){return function(n){n.children&&Ee(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var r=n.x0,o=n.y0,a=n.x1-i,s=n.y1-i;a<r&&(r=a=(r+a)/2),s<o&&(o=s=(o+s)/2),n.x0=r,n.y0=o,n.x1=a,n.y1=s}}var n=1,r=1,i=0,o=!1;return t.round=function(e){return arguments.length?(o=!!e,t):o},t.size=function(e){return arguments.length?(n=+e[0],r=+e[1],t):[n,r]},t.padding=function(e){return arguments.length?(i=+e,t):i},t};$.prototype=Object.create(g.prototype);var Re=function(){function t(t){var r=U(t);if(r.eachAfter(e),r.parent.m=-r.z,r.eachBefore(n),u)t.eachBefore(i);else{var l=t,c=t,h=t;t.eachBefore(function(t){t.x<l.x&&(l=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)});var p=l===c?1:o(l,c)/2,f=p-l.x,d=a/(c.x+p+f),y=s/(h.depth||1);t.eachBefore(function(t){t.x=(t.x+f)*d,t.y=t.depth*y})}return t}function e(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e){H(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+o(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+o(t._,i._));t.parent.A=r(t,i,t.parent.A||n[0])}function n(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,e,n){if(e){for(var r,i=t,a=t,s=e,u=i.parent.children[0],l=i.m,c=a.m,h=s.m,p=u.m;s=V(s),i=O(i),s&&i;)u=O(u),(a=V(a)).a=t,(r=s.z+h-i.z-l+o(s._,i._))>0&&(F(W(s,t,n),t,r),l+=r,c+=r),h+=s.m,l+=i.m,p+=u.m,c+=a.m;s&&!V(a)&&(a.t=s,a.m+=h-c),i&&!O(u)&&(u.t=i,u.m+=l-p,n=t)}return n}function i(t){t.x*=a,t.y=t.depth*s}var o=j,a=1,s=1,u=null;return t.separation=function(e){return arguments.length?(o=e,t):o},t.size=function(e){return arguments.length?(u=!1,a=+e[0],s=+e[1],t):u?null:[a,s]},t.nodeSize=function(e){return arguments.length?(u=!0,a=+e[0],s=+e[1],t):u?[a,s]:null},t},Be=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l},qe=function t(e){function n(t,n,r,i,o){G(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2),Le=function(){function t(t){return t.x0=t.y0=0,t.x1=i,t.y1=o,t.eachBefore(e),a=[0],r&&t.eachBefore(De),t}function e(t){var e=a[t.depth],r=t.x0+e,i=t.y0+e,o=t.x1-e,p=t.y1-e;o<r&&(r=o=(r+o)/2),p<i&&(i=p=(i+p)/2),t.x0=r,t.y0=i,t.x1=o,t.y1=p,t.children&&(e=a[t.depth+1]=s(t)/2,r+=h(t)-e,i+=u(t)-e,o-=l(t)-e,p-=c(t)-e,o<r&&(r=o=(r+o)/2),p<i&&(i=p=(i+p)/2),n(t,r,i,o,p))}var n=qe,r=!1,i=1,o=1,a=[0],s=P,u=P,l=P,c=P,h=P;return t.round=function(e){return arguments.length?(r=!!e,t):r},t.size=function(e){return arguments.length?(i=+e[0],o=+e[1],t):[i,o]},t.tile=function(e){return arguments.length?(n=E(e),t):n},t.padding=function(e){return arguments.length?t.paddingInner(e).paddingOuter(e):t.paddingInner()},t.paddingInner=function(e){return arguments.length?(s="function"==typeof e?e:Ie(+e),t):s},t.paddingOuter=function(e){return arguments.length?t.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):t.paddingTop()},t.paddingTop=function(e){return arguments.length?(u="function"==typeof e?e:Ie(+e),t):u},t.paddingRight=function(e){return arguments.length?(l="function"==typeof e?e:Ie(+e),t):l},t.paddingBottom=function(e){return arguments.length?(c="function"==typeof e?e:Ie(+e),t):c},t.paddingLeft=function(e){return arguments.length?(h="function"==typeof e?e:Ie(+e),t):h},t},je={value:function(){}};K.prototype=Z.prototype={constructor:K,on:function(t,e){var n,r=this._,i=Q(t+"",r),o=-1,a=i.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=X(r[n],t.name,e);else if(null==e)for(n in r)r[n]=X(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=J(r[n],t.name)))return n}},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new K(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].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,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Oe,Ve,Fe=0,He=0,We=0,$e=1e3,Ue=0,Ge=0,Ze=0,Ke="object"==typeof performance&&performance.now?performance:Date,Qe="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};et.prototype=nt.prototype={constructor:et,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Y():+n)+(null==e?0:+e),this._next||Ve===this||(Ve?Ve._next=this:Oe=this,Ve=this),this._call=t,this._time=n,st()},stop:function(){this._call&&(this._call=null,this._time=1/0,st())}};var Je=function(t,e,n){var r=new et;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},Xe=Z("start","end","interrupt"),Ye=[],tn=0,en=1,nn=2,rn=3,on=4,an=5,sn=6,un=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};ht(t,n,{name:e,index:r,group:i,on:Xe,tween:Ye,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:tn})},ln=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){e=null==e?null:e+"";for(i in o)(n=o[i]).name===e?(r=n.state>nn&&n.state<an,n.state=sn,n.timer.stop(),r&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}},cn=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t},hn="\\s*([+-]?\\d+)\\s*",pn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",fn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dn=/^#([0-9a-f]{3})$/,yn=/^#([0-9a-f]{6})$/,_n=new RegExp("^rgb\\("+[hn,hn,hn]+"\\)$"),gn=new RegExp("^rgb\\("+[fn,fn,fn]+"\\)$"),mn=new RegExp("^rgba\\("+[hn,hn,hn,pn]+"\\)$"),vn=new RegExp("^rgba\\("+[fn,fn,fn,pn]+"\\)$"),xn=new RegExp("^hsl\\("+[pn,fn,fn]+"\\)$"),wn=new RegExp("^hsla\\("+[pn,fn,fn,pn]+"\\)$"),bn={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};cn(_t,gt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),cn(wt,function(t,e,n,r){return 1===arguments.length?xt(t):new wt(t,e,n,null==r?1:r)},yt(_t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new wt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(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+")")}})),cn(kt,function(t,e,n,r){return 1===arguments.length?Mt(t):new kt(t,e,n,null==r?1:r)},yt(_t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new kt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new kt(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 wt(Tt(t>=240?t-240:t+120,i,r),Tt(t,i,r),Tt(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Mn=Math.PI/180,kn=180/Math.PI,Tn=.95047,Sn=1,An=1.08883,zn=4/29,Nn=6/29,In=3*Nn*Nn,Cn=Nn*Nn*Nn;cn(At,function(t,e,n,r){return 1===arguments.length?St(t):new At(t,e,n,null==r?1:r)},yt(_t,{brighter:function(t){return new At(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new At(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=Sn*Nt(t),e=Tn*Nt(e),n=An*Nt(n),new wt(It(3.2404542*e-1.5371385*t-.4985314*n),It(-.969266*e+1.8760108*t+.041556*n),It(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),cn(Et,function(t,e,n,r){return 1===arguments.length?Dt(t):new Et(t,e,n,null==r?1:r)},yt(_t,{brighter:function(t){return new Et(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Et(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return St(this).rgb()}}));var Dn=-.14861,En=1.78277,Pn=-.29227,Rn=-.90649,Bn=1.97294,qn=Bn*Rn,Ln=Bn*En,jn=En*Pn-Rn*Dn;cn(Rt,function(t,e,n,r){return 1===arguments.length?Pt(t):new Rt(t,e,n,null==r?1:r)},yt(_t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Mn,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new wt(255*(e+n*(Dn*r+En*i)),255*(e+n*(Pn*r+Rn*i)),255*(e+n*(Bn*r)),this.opacity)}}));var On=function(t,n){var r;return("number"==typeof n?e.interpolateNumber:n instanceof gt?e.interpolateRgb:(r=gt(n))?(n=r,e.interpolateRgb):e.interpolateString)(t,n)},Vn=e.selection.prototype.constructor,Fn=0,Hn=e.selection.prototype;oe.prototype=function(t){return e.selection().transition(t)}.prototype={constructor:oe,select:function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selector(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u,l,c=i[s],h=c.length,p=a[s]=new Array(h),f=0;f<h;++f)(u=c[f])&&(l=t.call(u,u.__data__,f,c))&&("__data__"in u&&(l.__data__=u.__data__),p[f]=l,un(p[f],n,r,f,p,ct(u,r)));return new oe(a,this._parents,n,r)},selectAll:function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selectorAll(t));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var l,c=i[u],h=c.length,p=0;p<h;++p)if(l=c[p]){for(var f,d=t.call(l,l.__data__,p,c),y=ct(l,r),_=0,g=d.length;_<g;++_)(f=d[_])&&un(f,n,r,_,d,y);a.push(d),s.push(l)}return new oe(a,s,n,r)},filter:function(t){"function"!=typeof t&&(t=e.matcher(t));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a,s=n[o],u=s.length,l=i[o]=[],c=0;c<u;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new oe(i,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,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,p=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(p[f]=u);for(;s<r;++s)a[s]=e[s];return new oe(a,this._parents,this._name,this._id)},selection:function(){return new Vn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ae(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=ct(a,e);un(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new oe(r,this._parents,t,n)},call:Hn.call,nodes:Hn.nodes,node:Hn.node,size:Hn.size,empty:Hn.empty,each:Hn.each,on:function(t,e){var n=this._id;return arguments.length<2?ct(this.node(),n).on.on(t):this.each(Qt(n,t,e))},attr:function(t,n){var r=e.namespace(t),i="transform"===r?e.interpolateTransformSvg:On;return this.attrTween(t,"function"==typeof n?(r.local?Vt:Ot)(r,i,dt(this,"attr."+t,n)):null==n?(r.local?qt:Bt)(r):(r.local?jt:Lt)(r,i,n+""))},attrTween:function(t,n){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;var i=e.namespace(t);return this.tween(r,(i.local?Ft:Ht)(i,n))},style:function(t,n,r){var i="transform"==(t+="")?e.interpolateTransformCss:On;return null==n?this.styleTween(t,Xt(t,i)).on("end.style."+t,Yt(t)):this.styleTween(t,"function"==typeof n?ee(t,i,dt(this,"style."+t,n)):te(t,i,n+""),r)},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,ne(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?ie(dt(this,"text",t)):re(null==t?"":t+""))},remove:function(){return this.on("end.remove",Jt(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ct(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?pt:ft)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Wt:$t)(e,t)):ct(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ut:Gt)(e,t)):ct(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Zt(e,t)):ct(this.node(),e).ease}};(function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n})(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158);var Wn=2*Math.PI,$n=(function t(e,n){function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Wn);return r.amplitude=function(e){return t(e,n*Wn)},r.period=function(n){return t(e,n)},r}(1,.3),function t(e,n){function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Wn);return r.amplitude=function(e){return t(e,n*Wn)},r.period=function(n){return t(e,n)},r}(1,.3),function t(e,n){function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Wn);return r.amplitude=function(e){return t(e,n*Wn)},r.period=function(n){return t(e,n)},r}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});e.selection.prototype.interrupt=function(t){return this.each(function(){ln(this,t)})},e.selection.prototype.transition=function(t){var e,n;t instanceof oe?(e=t._id,t=t._name):(e=ae(),(n=$n).time=Y(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&un(a,t,e,l,s,n||se(a,e));return new oe(r,this._parents,t,e)},r(".tree_CirclePacking circle {\r\n fill: rgb(31, 119, 180);\r\n fill-opacity: .25;\r\n stroke: rgb(31, 119, 180);\r\n stroke-width: 1px;\r\n}\r\n\r\n.tree_CirclePacking .leaf circle {\r\n fill: #ff7f0e;\r\n fill-opacity: 1;\r\n}\r\n\r\n.tree_CirclePacking .label {\r\n fill:white;\r\n text-anchor: middle;\r\n}\r\n",void 0);var Un=function(t){function r(){var e=t.call(this)||this;return n.ITree.call(e),e}return e.__extends(r,t),r.prototype.enter=function(t,e){this.diameter=Math.min(this.width(),this.height()),this.pack=Ce().size([this.diameter-4,this.diameter-4]).padding(1.5),this.svg=e.append("g").attr("transform","rotate(30)")},r.prototype.update=function(t,n){var r=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this.svg.selectAll("circle").remove(),this.svg.selectAll("text").remove();var i=f(this.data()).sum(function(){return 1}).sort(function(t,e){return t[1]<e[1]?-1:t[1]>e[1]?1:0});this._focus=i,this.pack(i),this.circle=this.svg.selectAll("circle").data(i.descendants()).enter().append("circle").attr("class",function(t){return t.parent?t.children?"node":"node leaf":"node root"}).style("fill",function(t){return r._palette(t.data.label)}).on("click",function(t){r.click(t.data,null,null)}).on("dblclick",function(t){this._focus!==t&&r.zoom(t),e.event.stopPropagation()}),this.circle.append("title").text(function(t){return t.data.label}),this.svg.selectAll("text").data(i.descendants()).enter().append("text").attr("class","label").style("fill-opacity",function(t){return t.parent===i?1:0}).style("display",function(t){return t.parent===i?null:"none"}).text(function(t){return t.data.label}),this._node=this.svg.selectAll("circle,text"),this.zoomTo([i.x,i.y,2*i.r])},r.prototype.zoom=function(t){function n(t){return t===r._focus&&!t.children||t.parent===r._focus}this._focus=t;var r=this;this.svg.transition().duration(e.event.altKey?7500:750).tween("zoom",function(){var t=e.interpolateZoom(r.view,[r._focus.x,r._focus.y,2*r._focus.r]);return function(e){r.zoomTo(t(e))}}).selectAll("text").filter(function(t){return n(t)||"inline"===this.style.display}).style("fill-opacity",function(t){return n(t)?1:0}).on("start",function(t){n(t)&&(this.style.display="inline")}).on("end",function(t){n(t)||(this.style.display="none")})},r.prototype.zoomTo=function(t){var e=this.diameter/t[2];this.view=t,this._node.attr("transform",function(n){return"translate("+(n.x-t[0])*e+","+(n.y-t[1])*e+")"}),this.circle.attr("r",function(t){return t.r*e})},r}(e.SVGWidget);Un.prototype._class+=" tree_CirclePacking",Un.prototype.implements(n.ITree.prototype),Un.prototype.publish("paletteID","default","set","Palette ID",Un.prototype._palette.switch(),{tags:["Basic","Shared"]}),Un.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),r(".tree_Dendrogram .node {\r\n}\r\n\r\n.tree_Dendrogram .node circle {\r\n fill: #dcf1ff;\r\n stroke: #1f77b4;\r\n stroke-width: 1.0px;\r\n}\r\n\r\n.tree_Dendrogram .node.selected circle {\r\n stroke: red;\r\n}\r\n\r\n.tree_Dendrogram .node.over circle {\r\n stroke: orange;\r\n}\r\n\r\n.tree_Dendrogram .node.selected.over circle {\r\n stroke: red;\r\n}\r\n\r\n.tree_Dendrogram .node.selected text {\r\n fill: red;\r\n}\r\n\r\n.tree_Dendrogram .node.over text {\r\n fill: orange;\r\n}\r\n\r\n.tree_Dendrogram .node.selected.over text {\r\n fill: red;\r\n}\r\n\r\n.tree_Dendrogram .node text {\r\n font-size: 14px;\r\n}\r\n\r\n.tree_Dendrogram .link {\r\n fill: none;\r\n stroke: #656565;\r\n stroke-width: 1.0px;\r\n}\r\n",void 0);var Gn=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);Gn.prototype._class+=" tree_Dendrogram.DendrogramColumn",Gn.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var Zn=function(t){function r(){var r=t.call(this)||this;return n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r._d3LayoutCluster=Ae(),r._d3LayoutTree=Re(),r}return e.__extends(r,t),r.prototype.dendrogramData=function(){function t(e){return{label:e.key,children:e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),origRows:e.values}}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.rollupView(this.mappings().map(function(t){return t.column()})).entries()}):this.data()},r.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._renderElement.attr("opacity",0).transition().duration(500).attr("opacity",1),this._selection.widgetElement(this._renderElement)},r.prototype.update=function(n,r){function i(t){return"M"+t.parent.x+","+t.parent.y+"C"+t.parent.x+","+(t.parent.y+t.y)/2+" "+t.x+","+(t.parent.y+t.y)/2+" "+t.x+","+t.y}function o(t){return"M"+t.y+","+t.x+"C"+(t.y+t.parent.y)/2+","+t.x+" "+(t.y+t.parent.y)/2+","+t.parent.x+" "+t.parent.y+","+t.parent.x}function a(t){return h?i(t):o(t)}function s(t,e){var n=(t-90)/180*Math.PI,r=e;return[r*Math.cos(n),r*Math.sin(n)]}function u(t){return"M"+s(t.x,t.y)+"C"+s(t.x,(t.y+t.parent.y)/2)+" "+s(t.parent.x,(t.y+t.parent.y)/2)+" "+s(t.parent.x,t.parent.y)}function l(t){return c.radial()?"rotate("+(t.x-90)+")translate("+t.y+")":"horizontal"===c.orientation()?"translate("+t.y+","+t.x+")":"translate("+t.x+","+t.y+")"}t.prototype.update.call(this,n,r);var c=this,h="vertical"===this.orientation();this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._d3Layout=this.dendrogram()?this._d3LayoutCluster:this._d3LayoutTree,this.radial()?(this._d3Layout.size([360,2*this.separation()]),this._d3Layout.separation(function(t,e){return(t.parent===e.parent?1:2)/t.depth})):(this._d3Layout.nodeSize([14,this.separation()]),this._d3Layout.separation(function(t,e){return t.parent===e.parent?1:2}));var p=f(this.dendrogramData());this._d3Layout(p);var d=p.descendants(),y=p.descendants().slice(1),_=this._renderCount?500:0,g=this._renderElement.selectAll(".link").data(y);g.enter().append("path").attr("class","link").attr("d",this.radial()?u:a),g.transition().duration(_).attr("d",this.radial()?u:a),g.exit().remove();var m=this.circleRadius()+2,v=this._renderElement.selectAll(".node").data(d);v.transition().duration(_).attr("transform",l);var x=v.enter().append("g").attr("class","node").attr("transform",l).call(this._selection.enter.bind(this._selection)).on("click",function(t){for(var e=t;e.children;)e=e.children[0];t.depth>0&&c.click(c.rowToObj(e.origRows[0]),c.mappings()[t.depth-1].column(),!0)}).on("dblclick",function(t){for(var e=t;e.children;)e=e.children[0];t.depth>0&&c.dblclick(c.rowToObj(e.origRows[0]),c.mappings()[t.depth-1].column(),!0)}).each(function(){var t=e.select(this);t.append("circle"),t.append("text")});x.merge(v).select("circle").attr("r",this.circleRadius()).style("fill",function(t){return c._palette(t.data.label)}).append("title").text(function(t){return t.data.label}),x.merge(v).select("text").attr("dx",function(t){return c.radial()?t.children?t.x<180?-m:m:t.x<180?m:-m:h?t.children?m:-m:t.children?-m:m}).attr("dy","0.25em").style("text-anchor",function(t){return c.radial()?t.children?t.x<180?"end":"start":t.x<180?"start":"end":h?t.children?"start":"end":t.children?"end":"start"}).attr("transform",function(t){return c.radial()?t.x<180?null:"rotate(180)":h?"rotate(-66)":null}).text(function(t){return t.data.label}),v.exit().remove(),this._renderCount||c.zoomToFit()},r}(e.SVGZoomWidget);Zn.prototype._class+=" tree_Dendrogram",Zn.prototype.implements(n.ITree.prototype),Zn.prototype.mixin(e.Utility.SimpleSelectionMixin),Zn.prototype.Column=Gn,Zn.prototype.publish("paletteID","default","set","Palette ID",Zn.prototype._palette.switch(),{tags:["Basic","Shared"]}),Zn.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Zn.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:Gn}),Zn.prototype.publish("circleRadius",4.5,"number","Text offset from circle"),Zn.prototype.publish("separation",240,"number","Leaf Separation"),Zn.prototype.publish("dendrogram",!0,"boolean","Dendrogram"),Zn.prototype.publish("radial",!1,"boolean","Radial"),Zn.prototype.publish("orientation","horizontal","set","Orientation",["horizontal","vertical"],{tags:["Private"],disable:function(t){return t.radial()}}),r(".tree_Indented .node rect {\r\n cursor: pointer;\r\n fill: #fff;\r\n stroke: #3182bd;\r\n stroke-width: 1px;\r\n}\r\n\r\n.tree_Indented .node text {\r\n font: 10px sans-serif;\r\n pointer-events: none;\r\n}\r\n\r\n.tree_Indented path.link {\r\n fill: none;\r\n stroke: #9ecae1;\r\n stroke-width: 1.5px;\r\n}",void 0);var Kn=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);Kn.prototype._class+=" tree_Dendrogram.IndentedColumn",Kn.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var Qn=function(t){function r(){var r=t.call(this)||this;return r._collapsed={},n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r._d3Tree=Re(),r}return e.__extends(r,t),r.prototype.xmlToData=function(t,e){return void 0===e&&(e=""),DOMParser?ue((new DOMParser).parseFromString(t,"text/xml"),e).children[0]:[]},r.prototype.xml=function(t){return arguments.length?(this._xml=t,this.data(this.xmlToData(this._xml)),this):this._xml},r.prototype.IndentedData=function(){function t(e){if(e.values instanceof Array){var n=e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),r={label:e.key};return n.length?r.children=n:r.size=22,r}return{label:e.key,size:e.values.aggregate,origRows:e.values}}if(this.xmlColumn_exists()){var e=this.columns().indexOf(this.xmlColumn()),n={label:this.xmlColumn(),children:this.data().map(function(t,n){return this.xmlToData(t[e],"["+n+"]")},this)};return 1===n.children.length?n.children[0]:n}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.rollupView(this.mappings().map(function(t){return t.column()})).entries()}):this.data()},r.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._svgLinks=this._renderElement.append("g"),this._svgNodes=this._renderElement.append("g"),this._selection.widgetElement(this._svgNodes)},r.prototype.update=function(n,r){function i(t){return(t.parent?i(t.parent)+".":"")+t.data.label}function o(t){return"M"+t.parent.y+","+t.parent.x+"V"+t.x+", H"+t.y}var a=this;t.prototype.update.call(this,n,r);var s=this;this._d3Tree.nodeSize([0,this.barHeight()]);var u=this._db.dataChecksum();this._prevDataChecksum!==u&&(this._treeData=this.IndentedData(),this._prevDataChecksum=u);var l=f(this.data()).sum(function(t){return t.size||50}).each(function(t){a._collapsed[i(t)]&&delete t.children}),c=this._d3Tree(l).descendants(),h=this._d3Tree(l).descendants().slice(1),p=0;l.eachBefore(function(t){t.x=p*s.barHeight(),++p});var d=this.barHeight()-4,y=this._renderCount?500:0,_=this._svgLinks.selectAll(".link").data(h,function(t){return i(t)});_.enter().append("path").attr("class","link").attr("d",o),_.transition().duration(y).attr("d",o),_.exit().remove();var g=this._svgNodes.selectAll(".node").data(c,function(t){return i(t)});g.transition().duration(y).attr("transform",function(t){return"translate("+t.y+","+t.x+")"});var m=g.enter().append("g").attr("class","node").attr("transform",function(t){return"translate("+t.y+","+t.x+")"}).call(this._selection.enter.bind(this._selection)).each(function(){var t=e.select(this);t.append("rect").attr("height",d).attr("width",d).on("click",function(t){s._collapsed[i(t)]?delete s._collapsed[i(t)]:t.children&&(s._collapsed[i(t)]=!0),s.lazyRender()}),t.append("text")}).style("opacity",0);m.transition().style("opacity",1),m.merge(g).select("rect").attr("x",-d/2).attr("y",-d/2).style("fill",function(t){return s._collapsed[i(t)]?"#3182bd":t.children?"#c6dbef":"#fd8d3c"}),m.merge(g).select("text").attr("dx",d/2+4+"px").attr("dy","0.33em").text(function(t){return t.data.label}),g.exit().transition().style("opacity",0).remove(),this._renderCount||s.zoomToFit()},r}(e.SVGZoomWidget);Qn.prototype._class+=" tree_Indented",Qn.prototype.implements(n.ITree.prototype),Qn.prototype.mixin(e.Utility.SimpleSelectionMixin),Qn.prototype.Column=Kn,Qn.prototype.publish("xmlColumn",null,"set","Field",function(){return this.columns()},{optional:!0}),Qn.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:Kn,disable:function(t){return t.xmlColumn_exists()}}),Qn.prototype.publish("barHeight",16,"number","Bar height");var Jn=Math.PI,Xn=2*Jn,Yn=Xn-1e-6;le.prototype=ce.prototype={constructor:le,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,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,l=o-t,c=a-e,h=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-u*l)>1e-6&&i){var p=n-o,f=r-a,d=s*s+u*u,y=p*p+f*f,_=Math.sqrt(d),g=Math.sqrt(h),m=i*Math.tan((Jn-Math.acos((d+h-y)/(2*_*g)))/2),v=m/g,x=m/_;Math.abs(v-1)>1e-6&&(this._+="L"+(t+v*l)+","+(e+v*c)),this._+="A"+i+","+i+",0,0,"+ +(c*p>l*f)+","+(this._x1=t+x*s)+","+(this._y1=e+x*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%Xn+Xn),h>Yn?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Jn)+","+c+","+(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 tr=function(t){return function(){return t}},er=Math.abs,nr=Math.atan2,rr=Math.cos,ir=Math.max,or=Math.min,ar=Math.sin,sr=Math.sqrt,ur=1e-12,lr=Math.PI,cr=lr/2,hr=2*lr,pr=function(){function t(){var t,l,c=+e.apply(this,arguments),h=+n.apply(this,arguments),p=o.apply(this,arguments)-cr,f=a.apply(this,arguments)-cr,d=er(f-p),y=f>p;if(u||(u=t=ce()),h<c&&(l=h,h=c,c=l),h>ur)if(d>hr-ur)u.moveTo(h*rr(p),h*ar(p)),u.arc(0,0,h,p,f,!y),c>ur&&(u.moveTo(c*rr(f),c*ar(f)),u.arc(0,0,c,f,p,y));else{var _,g,m=p,v=f,x=p,w=f,b=d,M=d,k=s.apply(this,arguments)/2,T=k>ur&&(i?+i.apply(this,arguments):sr(c*c+h*h)),S=or(er(h-c)/2,+r.apply(this,arguments)),A=S,z=S;if(T>ur){var N=pe(T/c*ar(k)),I=pe(T/h*ar(k));(b-=2*N)>ur?(N*=y?1:-1,x+=N,w-=N):(b=0,x=w=(p+f)/2),(M-=2*I)>ur?(I*=y?1:-1,m+=I,v-=I):(M=0,m=v=(p+f)/2)}var C=h*rr(m),D=h*ar(m),E=c*rr(w),P=c*ar(w);if(S>ur){var R=h*rr(v),B=h*ar(v),q=c*rr(x),L=c*ar(x);if(d<lr){var j=b>ur?me(C,D,q,L,R,B,E,P):[E,P],O=C-j[0],V=D-j[1],F=R-j[0],H=B-j[1],W=1/ar(he((O*F+V*H)/(sr(O*O+V*V)*sr(F*F+H*H)))/2),$=sr(j[0]*j[0]+j[1]*j[1]);A=or(S,(c-$)/(W-1)),z=or(S,(h-$)/(W+1))}}M>ur?z>ur?(_=ve(q,L,C,D,h,z,y),g=ve(R,B,E,P,h,z,y),u.moveTo(_.cx+_.x01,_.cy+_.y01),z<S?u.arc(_.cx,_.cy,z,nr(_.y01,_.x01),nr(g.y01,g.x01),!y):(u.arc(_.cx,_.cy,z,nr(_.y01,_.x01),nr(_.y11,_.x11),!y),u.arc(0,0,h,nr(_.cy+_.y11,_.cx+_.x11),nr(g.cy+g.y11,g.cx+g.x11),!y),u.arc(g.cx,g.cy,z,nr(g.y11,g.x11),nr(g.y01,g.x01),!y))):(u.moveTo(C,D),u.arc(0,0,h,m,v,!y)):u.moveTo(C,D),c>ur&&b>ur?A>ur?(_=ve(E,P,R,B,c,-A,y),g=ve(C,D,q,L,c,-A,y),u.lineTo(_.cx+_.x01,_.cy+_.y01),A<S?u.arc(_.cx,_.cy,A,nr(_.y01,_.x01),nr(g.y01,g.x01),!y):(u.arc(_.cx,_.cy,A,nr(_.y01,_.x01),nr(_.y11,_.x11),!y),u.arc(0,0,c,nr(_.cy+_.y11,_.cx+_.x11),nr(g.cy+g.y11,g.cx+g.x11),y),u.arc(g.cx,g.cy,A,nr(g.y11,g.x11),nr(g.y01,g.x01),!y))):u.arc(0,0,c,w,x,y):u.lineTo(E,P)}else u.moveTo(0,0);if(u.closePath(),t)return u=null,t+""||null}var e=fe,n=de,r=tr(0),i=null,o=ye,a=_e,s=ge,u=null;return t.centroid=function(){var t=(+e.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-lr/2;return[rr(r)*t,ar(r)*t]},t.innerRadius=function(n){return arguments.length?(e="function"==typeof n?n:tr(+n),t):e},t.outerRadius=function(e){return arguments.length?(n="function"==typeof e?e:tr(+e),t):n},t.cornerRadius=function(e){return arguments.length?(r="function"==typeof e?e:tr(+e),t):r},t.padRadius=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:tr(+e),t):i},t.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:tr(+e),t):o},t.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:tr(+e),t):a},t.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:tr(+e),t):s},t.context=function(e){return arguments.length?(u=null==e?null:e,t):u},t};xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};Te.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ke(this,this._t0,Me(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,t!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ke(this,Me(this,n=be(this,t,e)),n);break;default:ke(this,this._t0,n=be(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(function(t){this._context=new Se(t)}.prototype=Object.create(Te.prototype)).point=function(t,e){Te.prototype.point.call(this,e,t)},Se.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},r(".tree_Sunburst path {\r\n stroke: #fff;\r\n stroke-width:0.5px;\r\n fill-rule: evenodd;\r\n}\r\n",void 0);var fr=function(t){function r(){var e=t.call(this)||this;return n.ITree.call(e),e}return e.__extends(r,t),r.prototype.data=function(t){var n=e.SVGWidget.prototype.data.apply(this,arguments);return arguments.length&&(this._resetRoot=!0),n},r.prototype.enter=function(t,n){var r=this;this.radius=Math.min(this.width(),this.height())/2,this._xScale=e.scaleLinear().range([0,2*Math.PI]),this._yScale=e.scaleSqrt().range([0,this.radius]),this.partition=Pe(),this.arc=pr().startAngle(function(t){return Math.max(0,Math.min(2*Math.PI,r._xScale(t.x0)))}).endAngle(function(t){return Math.max(0,Math.min(2*Math.PI,r._xScale(t.x1)))}).innerRadius(function(t){return Math.max(0,r._yScale(t.y0))}).outerRadius(function(t){return Math.max(0,r._yScale(t.y1))}),this.svg=n.append("g")},r.prototype.update=function(t,n){var r=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this.radius=Math.min(this.width(),this.height())/2,this._yScale.range([0,this.radius]);var i=f(this.data()).sum(function(t){return void 0!==t.size?t.size:1}),o=this.svg.selectAll("path").data(this.partition(i).descendants(),function(t,e){return void 0!==t.data.label?t.data.label:e});o.enter().append("path").on("click",function(t){r.click(t.data,null,null)}).on("dblclick",function(t){e.event&&e.event.stopPropagation(),r.zoomTo(t)}).each(function(){e.select(this).append("title")}).merge(o).attr("d",this.arc).style("fill",function(t){return t.data.__viz_fill?t.data.__viz_fill:r._palette(t.data.label)}).style("stroke",function(t){return t.value>16?"white":"none"}).select("title").text(function(t){return t.data.label}),o.exit().remove(),this._resetRoot&&(this._resetRoot=!1,this.zoomTo(i))},r.prototype.zoomTo=function(t){var n=this;this.svg.transition().duration(750).tween("scale",function(){var r=e.interpolate(n._xScale.domain(),[t.x0,t.x1]),i=e.interpolate(n._yScale.domain(),[t.y0,1]),o=e.interpolate(n._yScale.range(),[t.y0?20:0,n.radius]);return function(t){n._xScale.domain(r(t)),n._yScale.domain(i(t)).range(o(t))}}).selectAll("path").attrTween("d",function(t){return function(){return n.arc(t)}})},r}(e.SVGWidget);fr.prototype._class+=" tree_SunburstPartition",fr.prototype.implements(n.ITree.prototype),fr.prototype.publish("paletteID","default","set","Palette ID",fr.prototype._palette.switch(),{tags:["Basic","Shared"]}),fr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),r(".tree_Treemap .node {\r\n border: solid 1px white;\r\n overflow: hidden;\r\n text-overflow:ellipsis;\r\n position: absolute;\r\n text-indent: 2px;\r\n}\r\n\r\n.tree_Treemap .node.selected {\r\n border-color: red;\r\n}\r\n\r\n.tree_Treemap .node.over {\r\n border-color: orange;\r\n}\r\n\r\n.tree_Treemap .node.selected.over {\r\n border-color: red;\r\n}\r\n",void 0);var dr=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);dr.prototype._class+=" tree_Dendrogram.TreemapColumn",dr.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var yr=function(t){function r(){var r=t.call(this)||this;return n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r}return e.__extends(r,t),r.prototype.treemapData=function(){function t(e){if(e.values instanceof Array){var n=e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),r={label:e.key};return n.length?r.children=n:r.size=22,r}return{label:e.key,size:e.values.aggregate,origRows:e.values}}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.aggregateView(this.mappings().map(function(t){return t.column()}),this.aggrType(),this.aggrColumn()).entries()}):this.data()},r.prototype.enter=function(t,n){e.HTMLWidget.prototype.enter.apply(this,arguments),this._d3Treemap=Le(),this._elementDIV=n.append("div"),this._selection.widgetElement(this._elementDIV)},r.prototype.update=function(t,n){e.HTMLWidget.prototype.update.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var r=f(this.treemapData()).sum(function(t){return t.size||50});this._d3Treemap.size([this.width(),this.height()]),this._d3Treemap(r),this._elementDIV.style("font-size",this.fontSize_exists()?this.fontSize()+"px":null).style("line-height",this.fontSize_exists()?this.fontSize()+2+"px":null);var i=this,o=this._elementDIV.selectAll(".node").data(r.descendants());o.enter().append("div").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",function(t){if(t&&t.origRows){var e="";i.mappings().forEach(function(t){t.column()&&(e=t.column())}),i.click(i.rowToObj(t.origRows[0]),e,i._selection.selected(this))}}).on("dblclick",function(t){if(t&&t.origRows){var e="";i.mappings().forEach(function(t){t.column()&&(e=t.column())}),i.dblclick(i.rowToObj(t.origRows[0]),e,i._selection.selected(this))}}).style("left",function(t){return t.x0+Math.max(0,t.x1-t.x0)/2+"px"}).style("top",function(t){return t.y0+Math.max(0,t.y1-t.y0)/2+"px"}).style("width",function(){return"0px"}).style("height",function(){return"0px"}).merge(o).attr("title",function(t){if(t.children)return null;for(var e=t.data.label+" ("+t.value+")";t.parent&&t.parent.parent;)e=t.parent.data.label+" -> "+e,t=t.parent;return e}).text(function(t){return t.children?null:t.data.label}).style("background",function(t){return t.children?i._palette(t.data.label):null}).transition().duration(this.transitionDuration()).style("opacity",function(t){return t.children?1:null}).style("left",function(t){return t.x0+"px"}).style("top",function(t){return t.y0+"px"}).style("width",function(t){return Math.max(0,t.x1-t.x0)+"px"}).style("height",function(t){return Math.max(0,t.y1-t.y0)+"px"}),o.exit().transition().duration(this.transitionDuration()).style("opacity",0).remove()},r.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},r}(e.HTMLWidget);yr.prototype._class+=" tree_Treemap",yr.prototype.implements(n.ITree.prototype),yr.prototype.mixin(e.Utility.SimpleSelectionMixin),yr.prototype.Column=dr,yr.prototype.publish("paletteID","default","set","Palette ID",yr.prototype._palette.switch(),{tags:["Basic","Shared"]}),yr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),yr.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:dr}),yr.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0}),yr.prototype.publish("aggrColumn",null,"set","Aggregation Field",function(){return this.columns()},{optional:!0,disable:function(t){return!t.aggrType()}}),yr.prototype.publish("fontSize",null,"number","Font Size",null,{optional:!0}),yr.prototype.publish("transitionDuration",250,"number","Transition Duration"),t.CirclePacking=Un,t.DendrogramColumn=Gn,t.Dendrogram=Zn,t.IndentedColumn=Kn,t.Indented=Qn,t.SunburstPartition=fr,t.TreemapColumn=dr,t.Treemap=yr,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=tree.min.js.map |
{ | ||
"name": "@hpcc-js/tree", | ||
"version": "0.0.29", | ||
"version": "0.0.30", | ||
"description": "hpcc-js - Viz Tree", | ||
@@ -21,4 +21,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@hpcc-js/api": "^0.0.29", | ||
"@hpcc-js/common": "^0.0.29", | ||
"@hpcc-js/api": "^0.0.30", | ||
"@hpcc-js/common": "^0.0.30", | ||
"d3-hierarchy": "^1.1.4", | ||
@@ -32,3 +32,3 @@ "d3-interpolate": "^1.1.5", | ||
"devDependencies": { | ||
"@hpcc-js/bundle": "^0.0.3", | ||
"@hpcc-js/bundle": "^0.0.4", | ||
"rimraf": "^2.6.1", | ||
@@ -35,0 +35,0 @@ "typedoc": "^0.7.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
894650
+ Added@hpcc-js/api@0.0.30(transitive)
+ Added@hpcc-js/common@0.0.30(transitive)
+ Addedes6-promise@4.2.8(transitive)
- Removed@hpcc-js/api@0.0.29(transitive)
- Removed@hpcc-js/common@0.0.29(transitive)
Updated@hpcc-js/api@^0.0.30
Updated@hpcc-js/common@^0.0.30