/**
 * @license
 * Copyright (c) 2018 amCharts (Antanas Marcelionis, Martynas Majeris)
 *
 * This sofware is provided under multiple licenses. Please see below for
 * links to appropriate usage.
 *
 * Free amCharts linkware license. Details and conditions:
 * https://github.com/amcharts/amcharts4/blob/master/LICENSE
 *
 * One of the amCharts commercial licenses. Details and pricing:
 * https://www.amcharts.com/online-store/
 * https://www.amcharts.com/online-store/licenses-explained/
 *
 * If in doubt, contact amCharts at contact@amcharts.com
 *
 * PLEASE DO NOT REMOVE THIS COPYRIGHT NOTICE.
 * @hidden
 */
am4internal_webpackJsonp(["7005"],{"1Zf7":function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("Gq40"),i=e("XqN8"),a=e("bS9u"),o=Object(i.a)("start","end","cancel","interrupt"),u=[],s=0,l=1,c=2,h=3,f=4,p=5,d=6,v=function(t,n,e,r,i,v){var g=t.__transition;if(g){if(e in g)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(p){var v,g,y,m;if(e.state!==l)return s();for(v in i)if((m=i[v]).name===e.name){if(m.state===h)return Object(a.b)(o);m.state===f?(m.state=d,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete i[v]):+v<n&&(m.state=d,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete i[v])}if(Object(a.b)(function(){e.state===h&&(e.state=f,e.timer.restart(u,e.delay,e.time),u(p))}),e.state=c,e.on.call("start",t,t.__data__,e.index,e.group),e.state===c){for(e.state=h,r=new Array(y=e.tween.length),v=0,g=-1;v<y;++v)(m=e.tween[v].value.call(t,t.__data__,e.index,e.group))&&(r[++g]=m);r.length=g+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(s),e.state=p,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);e.state===p&&(e.on.call("end",t,t.__data__,e.index,e.group),s())}function s(){for(var r in e.state=d,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Object(a.c)(function(t){e.state=l,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)},0,e.time)}(t,e,{name:n,index:r,group:i,on:o,tween:u,time:v.time,delay:v.delay,duration:v.duration,ease:v.ease,timer:null,state:s})};function g(t,n){var e=m(t,n);if(e.state>s)throw new Error("too late; already scheduled");return e}function y(t,n){var e=m(t,n);if(e.state>h)throw new Error("too late; already running");return e}function m(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var x=function(t,n){var e,r,i,a=t.__transition,o=!0;if(a){for(i in n=null==n?null:n+"",a)(e=a[i]).name===n?(r=e.state>c&&e.state<p,e.state=d,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete a[i]):o=!1;o&&delete t.__transition}},w=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function _(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function b(){}var M="\\s*([+-]?\\d+)\\s*",A="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",N="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",I=/^#([0-9a-f]{3,8})$/,k=new RegExp("^rgb\\("+[M,M,M]+"\\)$"),S=new RegExp("^rgb\\("+[N,N,N]+"\\)$"),P=new RegExp("^rgba\\("+[M,M,M,A]+"\\)$"),E=new RegExp("^rgba\\("+[N,N,N,A]+"\\)$"),z=new RegExp("^hsl\\("+[A,N,N]+"\\)$"),O=new RegExp("^hsla\\("+[A,N,N,A]+"\\)$"),D={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function R(){return this.rgb().formatHex()}function j(){return this.rgb().formatRgb()}function C(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=I.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?T(n):3===e?new H(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new H(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new H(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=k.exec(t))?new H(n[1],n[2],n[3],1):(n=S.exec(t))?new H(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=P.exec(t))?q(n[1],n[2],n[3],n[4]):(n=E.exec(t))?q(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=z.exec(t))?Y(n[1],n[2]/100,n[3]/100,1):(n=O.exec(t))?Y(n[1],n[2]/100,n[3]/100,n[4]):D.hasOwnProperty(t)?T(D[t]):"transparent"===t?new H(NaN,NaN,NaN,0):null}function T(t){return new H(t>>16&255,t>>8&255,255&t,1)}function q(t,n,e,r){return r<=0&&(t=n=e=NaN),new H(t,n,e,r)}function V(t){return t instanceof b||(t=C(t)),t?new H((t=t.rgb()).r,t.g,t.b,t.opacity):new H}function L(t,n,e,r){return 1===arguments.length?V(t):new H(t,n,e,null==r?1:r)}function H(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function X(){return"#"+B(this.r)+B(this.g)+B(this.b)}function F(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function B(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Y(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new U(t,n,e,r)}function G(t){if(t instanceof U)return new U(t.h,t.s,t.l,t.opacity);if(t instanceof b||(t=C(t)),!t)return new U;if(t instanceof U)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),o=NaN,u=a-i,s=(a+i)/2;return u?(o=n===a?(e-r)/u+6*(e<r):e===a?(r-n)/u+2:(n-e)/u+4,u/=s<.5?a+i:2-a-i,o*=60):u=s>0&&s<1?0:o,new U(o,u,s,t.opacity)}function $(t,n,e,r){return 1===arguments.length?G(t):new U(t,n,e,null==r?1:r)}function U(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Z(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}w(b,C,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:R,formatHex:R,formatHsl:function(){return G(this).formatHsl()},formatRgb:j,toString:j}),w(H,L,_(b,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:X,formatHex:X,formatRgb:F,toString:F})),w(U,$,_(b,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new U(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new U(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new H(Z(t>=240?t-240:t+120,i,r),Z(t,i,r),Z(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var W=Math.PI/180,J=180/Math.PI,Q=.96422,K=1,tt=.82521,nt=4/29,et=6/29,rt=3*et*et,it=et*et*et;function at(t){if(t instanceof ut)return new ut(t.l,t.a,t.b,t.opacity);if(t instanceof dt)return vt(t);t instanceof H||(t=V(t));var n,e,r=ht(t.r),i=ht(t.g),a=ht(t.b),o=st((.2225045*r+.7168786*i+.0606169*a)/K);return r===i&&i===a?n=e=o:(n=st((.4360747*r+.3850649*i+.1430804*a)/Q),e=st((.0139322*r+.0971045*i+.7141733*a)/tt)),new ut(116*o-16,500*(n-o),200*(o-e),t.opacity)}function ot(t,n,e,r){return 1===arguments.length?at(t):new ut(t,n,e,null==r?1:r)}function ut(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function st(t){return t>it?Math.pow(t,1/3):t/rt+nt}function lt(t){return t>et?t*t*t:rt*(t-nt)}function ct(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ht(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ft(t){if(t instanceof dt)return new dt(t.h,t.c,t.l,t.opacity);if(t instanceof ut||(t=at(t)),0===t.a&&0===t.b)return new dt(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*J;return new dt(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function pt(t,n,e,r){return 1===arguments.length?ft(t):new dt(t,n,e,null==r?1:r)}function dt(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function vt(t){if(isNaN(t.h))return new ut(t.l,0,0,t.opacity);var n=t.h*W;return new ut(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}w(ut,ot,_(b,{brighter:function(t){return new ut(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ut(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new H(ct(3.1338561*(n=Q*lt(n))-1.6168667*(t=K*lt(t))-.4906146*(e=tt*lt(e))),ct(-.9787684*n+1.9161415*t+.033454*e),ct(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),w(dt,pt,_(b,{brighter:function(t){return new dt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new dt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return vt(this).rgb()}}));var gt=-.14861,yt=1.78277,mt=-.29227,xt=-.90649,wt=1.97294,_t=wt*xt,bt=wt*yt,Mt=yt*mt-xt*gt;function At(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Nt)return new Nt(t.h,t.s,t.l,t.opacity);t instanceof H||(t=V(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Mt*r+_t*n-bt*e)/(Mt+_t-bt),a=r-i,o=(wt*(e-i)-mt*a)/xt,u=Math.sqrt(o*o+a*a)/(wt*i*(1-i)),s=u?Math.atan2(o,a)*J-120:NaN;return new Nt(s<0?s+360:s,u,i,t.opacity)}(t):new Nt(t,n,e,null==r?1:r)}function Nt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function It(t,n,e,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*n+(4-6*a+3*o)*e+(1+3*t+3*a-3*o)*r+o*i)/6}w(Nt,At,_(b,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Nt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Nt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*W,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new H(255*(n+e*(gt*r+yt*i)),255*(n+e*(mt*r+xt*i)),255*(n+e*(wt*r)),this.opacity)}}));var kt=function(t){return function(){return t}};function St(t,n){return function(e){return t+e*n}}function Pt(t,n){var e=n-t;return e?St(t,e>180||e<-180?e-360*Math.round(e/360):e):kt(isNaN(t)?n:t)}function Et(t){return 1==(t=+t)?zt:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):kt(isNaN(n)?e:n)}}function zt(t,n){var e=n-t;return e?St(t,e):kt(isNaN(t)?n:t)}var Ot=function t(n){var e=Et(n);function r(t,n){var r=e((t=L(t)).r,(n=L(n)).r),i=e(t.g,n.g),a=e(t.b,n.b),o=zt(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=a(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function Dt(t){return function(n){var e,r,i=n.length,a=new Array(i),o=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=L(n[e]),a[e]=r.r||0,o[e]=r.g||0,u[e]=r.b||0;return a=t(a),o=t(o),u=t(u),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=u(t),r+""}}}Dt(function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,u=r<n-1?t[r+2]:2*a-i;return It((e-r/n)*n,o,i,a,u)}}),Dt(function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],a=t[r%n],o=t[(r+1)%n],u=t[(r+2)%n];return It((e-r/n)*n,i,a,o,u)}});var Rt=function(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}},jt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ct=new RegExp(jt.source,"g");var Tt,qt,Vt,Lt,Ht=function(t,n){var e,r,i,a=jt.lastIndex=Ct.lastIndex=0,o=-1,u=[],s=[];for(t+="",n+="";(e=jt.exec(t))&&(r=Ct.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(e=e[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:Rt(e,r)})),a=Ct.lastIndex;return a<n.length&&(i=n.slice(a),u[o]?u[o]+=i:u[++o]=i),u.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)u[(e=s[r]).i]=e.x(t);return u.join("")})},Xt=180/Math.PI,Ft={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Bt=function(t,n,e,r,i,a){var o,u,s;return(o=Math.sqrt(t*t+n*n))&&(t/=o,n/=o),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,s/=u),t*r<n*e&&(t=-t,n=-n,s=-s,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(n,t)*Xt,skewX:Math.atan(s)*Xt,scaleX:o,scaleY:u}};function Yt(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var u=[],s=[];return a=t(a),o=t(o),function(t,r,i,a,o,u){if(t!==i||r!==a){var s=o.push("translate(",null,n,null,e);u.push({i:s-4,x:Rt(t,i)},{i:s-2,x:Rt(r,a)})}else(i||a)&&o.push("translate("+i+n+a+e)}(a.translateX,a.translateY,o.translateX,o.translateY,u,s),function(t,n,e,a){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),a.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Rt(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(a.rotate,o.rotate,u,s),function(t,n,e,a){t!==n?a.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Rt(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(a.skewX,o.skewX,u,s),function(t,n,e,r,a,o){if(t!==e||n!==r){var u=a.push(i(a)+"scale(",null,",",null,")");o.push({i:u-4,x:Rt(t,e)},{i:u-2,x:Rt(n,r)})}else 1===e&&1===r||a.push(i(a)+"scale("+e+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,u,s),a=o=null,function(t){for(var n,e=-1,r=s.length;++e<r;)u[(n=s[e]).i]=n.x(t);return u.join("")}}}var Gt=Yt(function(t){return"none"===t?Ft:(Tt||(Tt=document.createElement("DIV"),qt=document.documentElement,Vt=document.defaultView),Tt.style.transform=t,t=Vt.getComputedStyle(qt.appendChild(Tt),null).getPropertyValue("transform"),qt.removeChild(Tt),t=t.slice(7,-1).split(","),Bt(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),$t=Yt(function(t){return null==t?Ft:(Lt||(Lt=document.createElementNS("http://www.w3.org/2000/svg","g")),Lt.setAttribute("transform",t),(t=Lt.transform.baseVal.consolidate())?(t=t.matrix,Bt(t.a,t.b,t.c,t.d,t.e,t.f)):Ft)},", ",")",")");Math.SQRT2;function Ut(t){return function(n,e){var r=t((n=$(n)).h,(e=$(e)).h),i=zt(n.s,e.s),a=zt(n.l,e.l),o=zt(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=a(t),n.opacity=o(t),n+""}}}Ut(Pt),Ut(zt);function Zt(t){return function(n,e){var r=t((n=pt(n)).h,(e=pt(e)).h),i=zt(n.c,e.c),a=zt(n.l,e.l),o=zt(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=a(t),n.opacity=o(t),n+""}}}Zt(Pt),Zt(zt);function Wt(t){return function n(e){function r(n,r){var i=t((n=At(n)).h,(r=At(r)).h),a=zt(n.s,r.s),o=zt(n.l,r.l),u=zt(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=a(t),n.l=o(Math.pow(t,e)),n.opacity=u(t),n+""}}return e=+e,r.gamma=n,r}(1)}Wt(Pt),Wt(zt);function Jt(t,n,e){var r=t._id;return t.each(function(){var t=y(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return m(t,r).value[n]}}var Qt=function(t,n){var e;return("number"==typeof n?Rt:n instanceof C?Ot:(e=C(n))?(n=e,Ot):Ht)(t,n)};var Kt=r.selection.prototype.constructor;function tn(t){return function(){this.style.removeProperty(t)}}var nn=0;function en(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function rn(t){return Object(r.selection)().transition(t)}function an(){return++nn}var on=r.selection.prototype;en.prototype=rn.prototype={constructor:en,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(r.selector)(t));for(var i=this._groups,a=i.length,o=new Array(a),u=0;u<a;++u)for(var s,l,c=i[u],h=c.length,f=o[u]=new Array(h),p=0;p<h;++p)(s=c[p])&&(l=t.call(s,s.__data__,p,c))&&("__data__"in s&&(l.__data__=s.__data__),f[p]=l,v(f[p],n,e,p,f,m(s,e)));return new en(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(r.selectorAll)(t));for(var i=this._groups,a=i.length,o=[],u=[],s=0;s<a;++s)for(var l,c=i[s],h=c.length,f=0;f<h;++f)if(l=c[f]){for(var p,d=t.call(l,l.__data__,f,c),g=m(l,e),y=0,x=d.length;y<x;++y)(p=d[y])&&v(p,n,e,y,d,g);o.push(d),u.push(l)}return new en(o,u,n,e)},filter:function(t){"function"!=typeof t&&(t=Object(r.matcher)(t));for(var n=this._groups,e=n.length,i=new Array(e),a=0;a<e;++a)for(var o,u=n[a],s=u.length,l=i[a]=[],c=0;c<s;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&l.push(o);return new en(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s,l=n[u],c=e[u],h=l.length,f=o[u]=new Array(h),p=0;p<h;++p)(s=l[p]||c[p])&&(f[p]=s);for(;u<r;++u)o[u]=n[u];return new en(o,this._parents,this._name,this._id)},selection:function(){return new Kt(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=an(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,u=r[a],s=u.length,l=0;l<s;++l)if(o=u[l]){var c=m(o,n);v(o,t,e,l,u,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new en(r,this._parents,t,e)},call:on.call,nodes:on.nodes,node:on.node,size:on.size,empty:on.empty,each:on.each,on:function(t,n){var e=this._id;return arguments.length<2?m(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?g:y;return function(){var o=a(this,t),u=o.on;u!==r&&(i=(r=u).copy()).on(n,e),o.on=i}}(e,t,n))},attr:function(t,n){var e=Object(r.namespace)(t),i="transform"===e?$t:Qt;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,a;return function(){var o,u,s=e(this);if(null!=s)return(o=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:o===r&&u===i?a:(i=u,a=n(r=o,s));this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,a;return function(){var o,u,s=e(this);if(null!=s)return(o=this.getAttribute(t))===(u=s+"")?null:o===r&&u===i?a:(i=u,a=n(r=o,s));this.removeAttribute(t)}})(e,i,Jt(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i,a=e+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=n(r=o,e)}}:function(t,n,e){var r,i,a=e+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=n(r=o,e)}})(e,i,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=Object(r.namespace)(t);return this.tween(e,(i.local?function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}(t,i)),e}return i._value=n,i}:function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}(t,i)),e}return i._value=n,i})(i,n))},style:function(t,n,e){var i="transform"==(t+="")?Gt:Qt;return null==n?this.styleTween(t,function(t,n){var e,i,a;return function(){var o=Object(r.style)(this,t),u=(this.style.removeProperty(t),Object(r.style)(this,t));return o===u?null:o===e&&u===i?a:a=n(e=o,i=u)}}(t,i)).on("end.style."+t,tn(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var i,a,o;return function(){var u=Object(r.style)(this,t),s=e(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Object(r.style)(this,t)),u===l?null:u===i&&l===a?o:(a=l,o=n(i=u,s))}}(t,i,Jt(this,"style."+t,n))).each(function(t,n){var e,r,i,a,o="style."+n,u="end."+o;return function(){var s=y(this,t),l=s.on,c=null==s.value[o]?a||(a=tn(n)):void 0;l===e&&i===c||(r=(e=l).copy()).on(u,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var i,a,o=e+"";return function(){var u=Object(r.style)(this,t);return u===o?null:u===i?a:a=n(i=u,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(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;return this.tween(r,function(t,n,e){var r,i;function a(){var a=n.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}(t,a,e)),r}return a._value=n,a}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Jt(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=m(this.node(),e).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==n?function(t,n){var e,r;return function(){var i=y(this,t),a=i.tween;if(a!==e)for(var o=0,u=(r=e=a).length;o<u;++o)if(r[o].name===n){(r=r.slice()).splice(o,1);break}i.tween=r}}:function(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var a=y(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var u={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=u;break}s===l&&i.push(u)}a.tween=i}})(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){g(this,t).delay=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){g(this,t).delay=n}})(n,t)):m(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){y(this,t).duration=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){y(this,t).duration=n}})(n,t)):m(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){y(this,t).ease=n}}(n,t)):m(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(a,o){var u={value:o},s={value:function(){0==--i&&a()}};e.each(function(){var e=y(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(s)),e.on=n})})}};(function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e})(3),function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Math.PI;(function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e})(1.70158),function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158);var un=2*Math.PI,sn=(function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=un);function i(t){return n*Math.pow(2,10*--t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*un)},i.period=function(e){return t(n,e)},i}(1,.3),function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=un);function i(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*un)},i.period=function(e){return t(n,e)},i}(1,.3),function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=un);function i(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((r-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*un)},i.period=function(e){return t(n,e)},i}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});function ln(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return sn.time=Object(a.a)(),sn;return e}r.selection.prototype.interrupt=function(t){return this.each(function(){x(this,t)})},r.selection.prototype.transition=function(t){var n,e;t instanceof en?(n=t._id,t=t._name):(n=an(),(e=sn).time=Object(a.a)(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,s=r[o],l=s.length,c=0;c<l;++c)(u=s[c])&&v(u,t,n,c,s,e||ln(u,n));return new en(r,this._parents,t,n)};var cn=[null],hn=function(t,n){var e,r,i=t.__transition;if(i)for(r in n=null==n?null:n+"",i)if((e=i[r]).state>l&&e.name===n)return new en([[t]],cn,n,+r);return null};e.d(n,"transition",function(){return rn}),e.d(n,"active",function(){return hn}),e.d(n,"interrupt",function(){return x})},FiMB:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={};e.d(r,"VennDiagramDataItem",function(){return s}),e.d(r,"VennDiagram",function(){return l}),e.d(r,"VennSeriesDataItem",function(){return y}),e.d(r,"VennSeries",function(){return m});var i=e("m4/l"),a=e("DXFp"),o=e("aCit"),u=e("Mtpk"),s=function(t){function n(){var n=t.call(this)||this;return n.className="VennDiagramDataItem",n.applyTheme(),n}return Object(i.c)(n,t),n}(a.b),l=function(t){function n(){var n=t.call(this)||this;return n.className="VennDiagram",n.seriesContainer.layout="horizontal",n.padding(15,15,15,15),n.applyTheme(),n}return Object(i.c)(n,t),n.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),u.hasValue(this.readerTitle)||(this.readerTitle=this.language.translate("Venn Diagram"))},n.prototype.setLegend=function(n){t.prototype.setLegend.call(this,n),n&&(n.valueLabels.template.disabled=!0)},n}(a.a);o.c.registeredClasses.VennDiagram=l,o.c.registeredClasses.VennDiagramDataItem=s;var c=e("AC2I"),h=e("hGwe"),f=e("tjMS"),p=e("Vs7R"),d=e("8ZqG"),v=e("MIZb"),g=e("YT44"),y=function(t){function n(){var n=t.call(this)||this;return n.radius=0,n.className="VennSeriesDataItem",n.events.on("visibilitychanged",function(){n.component},n,!1),n.applyTheme(),n}return Object(i.c)(n,t),Object.defineProperty(n.prototype,"intersections",{get:function(){return this.properties.intersections},set:function(t){this.setProperty("intersections",t)},enumerable:!0,configurable:!0}),n.prototype.hide=function(n,e,r,i){var a=this;return this.intersections||this.component.dataItems.each(function(t){t!=a&&t.intersections&&-1!=t.intersections.indexOf(a.category)&&t.hide(n,e,r,i)}),t.prototype.hide.call(this,n,e,r,i)},n.prototype.show=function(n,e,r){var i=this;return this.intersections||this.component.dataItems.each(function(t){t!=i&&t.intersections&&-1!=t.intersections.indexOf(i.category)&&t.show(n,e,r)}),t.prototype.show.call(this,n,e,r)},n.prototype.animateRadius=function(t,n,e){var r=this,i=this.animate({property:"radius",to:t},n,e);this._disposers.push(i),this._disposers.push(i.events.on("animationprogress",function(t){var n=r.radius,e=h.moveTo({x:-n,y:0});e+=h.arcToPoint({x:n,y:0},n,n,!0),e+=h.arcToPoint({x:-n,y:0},n,n,!0),r.slice.path=e,r.slice.isHover&&r.component.updateHoverSprite(r.slice)}))},n}(c.b),m=function(t){function n(){var n=t.call(this)||this;n.className="VennSeries",n.width=Object(f.c)(100),n.height=Object(f.c)(100),n.layout="absolute",n.slicesContainer.width=Object(f.c)(100),n.slicesContainer.height=Object(f.c)(100),n.slicesContainer.layout="none";var e=n.slices.template;e.strokeWidth=0,e.stroke=Object(d.c)("#ffffff"),n._disposers.push(n.events.on("maxsizechanged",function(){n.vennData=void 0,n.invalidateDataItems()},n,!1)),n.labelsContainer.layout="none",n.itemReaderText="{category}";var r=n.slicesContainer.createChild(p.a);r.strokeOpacity=1,r.strokeWidth=2,r.stroke=(new v.a).getFor("background"),r.strokeDasharray="3,3",r.zIndex=Number.MAX_VALUE,r.interactionsEnabled=!1,r.fill=Object(d.c)(),r.strokeDashoffset=0;var i=r.states.create("hover");return i.properties.strokeDashoffset=1e3,i.transitionDuration=1e5,n.hoverSprite=r,e.events.on("over",function(t){r.hide(0),r.show(),r.isHover=!0,n.updateHoverSprite(t.target)}),e.events.on("out",function(t){r.isHover=!1}),e.events.on("visibilitychanged",function(t){0==t.visible&&n.hoverSprite.hide()}),e.events.on("out",function(t){n.hoverSprite.hide()}),n.applyTheme(),n}return Object(i.c)(n,t),n.prototype.createSlice=function(){return new p.a},n.prototype.applyInternalDefaults=function(){t.prototype.applyInternalDefaults.call(this),u.hasValue(this.readerTitle)||(this.readerTitle=this.language.translate("Venn Series"))},n.prototype.createDataItem=function(){return new y},n.prototype.initSlice=function(t){t.isMeasured=!1,t.tooltipText="{category}"},n.prototype.initLabel=function(t){t.verticalCenter="middle",t.horizontalCenter="middle",t.isMeasured=!1,t.text="{category}"},n.prototype.updateHoverSprite=function(t){this.hoverSprite.path=t.path,this.hoverSprite.x=t.x,this.hoverSprite.y=t.y},n.prototype.validateDataElements=function(){var n=this;t.prototype.validateDataElements.call(this);var e=this.slicesContainer,r=this.labelsContainer,i=this.labels.template;this.alignLabels?(i.interactionsEnabled=!0,e.isMeasured=!0,r.isMeasured=!0):(i.interactionsEnabled=!1,e.isMeasured=!1,r.isMeasured=!1);var a=[];this.dataItems.each(function(t){var e={};t.intersections?e.sets=t.intersections:e.sets=[t.category],e.size=t.getValue("value");var r=!1;if(t.intersections){for(var i=0;i<t.intersections.length;i++){var o=t.intersections[i],u=n.getDataItemByCategory(o);!u.isHiding&&u.visible||(r=!0)}r&&t.visible&&t.hide(0)}e.size>0&&!r&&!t.isHiding&&t.visible&&a.push(e)});var o=a.toString();if(o!=this.vennData&&(this.vennData=o,a.length>0)){var u=g.venn(a);u=g.normalizeSolution(u,null,null),u=g.scaleSolution(u,this.innerWidth,this.innerHeight,0);var s={};for(var l in u){var c=u[l],f=c.radius,p=this.getDataItemByCategory(l);if(this.interpolationDuration>0)p.animateRadius(f,this.interpolationDuration,this.interpolationEasing);else{var d=h.moveTo({x:-f,y:0});d+=h.arcToPoint({x:f,y:0},f,f,!0),d+=h.arcToPoint({x:-f,y:0},f,f,!0),p.slice.path=d,p.slice.isHover&&this.updateHoverSprite(p.slice)}var v=p.slice;void 0==v.x||void 0==v.y?(v.x=c.x,v.y=c.y):v.animate([{property:"x",to:c.x},{property:"y",to:c.y}],this.interpolationDuration,this.interpolationEasing),s[l]=c}var y=g.computeTextCentres(s,a),m=0;this.dataItems.each(function(t){var e=t.category,r=y[e];if(t.intersections&&(e=t.intersections.toString(),r=y[e])){for(var i=t.intersections,a=[],o=0;o<i.length;o++)a.push(s[i[o]]);var u=g.intersectionAreaPath(a),l=t.slice;l.path=u,l.tooltipX=r.x,l.tooltipY=r.y}if(r){var c=t.label;void 0==c.x||void 0==c.y?(c.x=r.x,c.y=r.y):c.animate([{property:"x",to:r.x},{property:"y",to:r.y}],n.interpolationDuration,n.interpolationEasing)}n.updateLegendValue(t),n.slices.template.propertyFields.zIndex||(t.slice.zIndex=m),m++})}},n.prototype.getDataItemByCategory=function(t){var n;return this.dataItems.each(function(e){e.category==t&&(n=e)}),n},n}(c.a);o.c.registeredClasses.VennSeries=m,o.c.registeredClasses.VennSeriesDataItem=y,window.am4plugins_venn=r},Gq40:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="http://www.w3.org/1999/xhtml",i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},a=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),i.hasOwnProperty(n)?{space:i[n],local:t}:t};var o=function(t){var n=a(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===r&&n.documentElement.namespaceURI===r?n.createElement(t):n.createElementNS(e,t)}})(n)};function u(){}var s=function(t){return null==t?u:function(){return this.querySelector(t)}};function l(){return[]}var c=function(t){return null==t?l:function(){return this.querySelectorAll(t)}},h=function(t){return function(){return this.matches(t)}},f=function(t){return new Array(t.length)};function p(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}p.prototype={constructor:p,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var d="$";function v(t,n,e,r,i,a){for(var o,u=0,s=n.length,l=a.length;u<l;++u)(o=n[u])?(o.__data__=a[u],r[u]=o):e[u]=new p(t,a[u]);for(;u<s;++u)(o=n[u])&&(i[u]=o)}function g(t,n,e,r,i,a,o){var u,s,l,c={},h=n.length,f=a.length,v=new Array(h);for(u=0;u<h;++u)(s=n[u])&&(v[u]=l=d+o.call(s,s.__data__,u,n),l in c?i[u]=s:c[l]=s);for(u=0;u<f;++u)(s=c[l=d+o.call(t,a[u],u,a)])?(r[u]=s,s.__data__=a[u],c[l]=null):e[u]=new p(t,a[u]);for(u=0;u<h;++u)(s=n[u])&&c[v[u]]===s&&(i[u]=s)}function y(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var m=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function x(t,n){return t.style.getPropertyValue(n)||m(t).getComputedStyle(t,null).getPropertyValue(n)}function w(t){return t.trim().split(/^|\s+/)}function _(t){return t.classList||new b(t)}function b(t){this._node=t,this._names=w(t.getAttribute("class")||"")}function M(t,n){for(var e=_(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function A(t,n){for(var e=_(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}b.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function N(){this.textContent=""}function I(){this.innerHTML=""}function k(){this.nextSibling&&this.parentNode.appendChild(this)}function S(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function P(){return null}function E(){var t=this.parentNode;t&&t.removeChild(this)}function z(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function O(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var D={},R=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(D={mouseenter:"mouseover",mouseleave:"mouseout"}));function j(t,n,e){return t=C(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function C(t,n,e){return function(r){var i=R;R=r;try{t.call(this,this.__data__,n,e)}finally{R=i}}}function T(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,a=n.length;r<a;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function q(t,n,e){var r=D.hasOwnProperty(t.type)?j:C;return function(i,a,o){var u,s=this.__on,l=r(n,a,o);if(s)for(var c=0,h=s.length;c<h;++c)if((u=s[c]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=l,u.capture=e),void(u.value=n);this.addEventListener(t.type,l,e),u={type:t.type,name:t.name,value:n,listener:l,capture:e},s?s.push(u):this.__on=[u]}}function V(t,n,e,r){var i=R;t.sourceEvent=R,R=t;try{return n.apply(e,r)}finally{R=i}}function L(t,n,e){var r=m(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}var H=[null];function X(t,n){this._groups=t,this._parents=n}function F(){return new X([[document.documentElement]],H)}X.prototype=F.prototype={constructor:X,select:function(t){"function"!=typeof t&&(t=s(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var a,o,u=n[i],l=u.length,c=r[i]=new Array(l),h=0;h<l;++h)(a=u[h])&&(o=t.call(a,a.__data__,h,u))&&("__data__"in a&&(o.__data__=a.__data__),c[h]=o);return new X(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=[],i=[],a=0;a<e;++a)for(var o,u=n[a],s=u.length,l=0;l<s;++l)(o=u[l])&&(r.push(t.call(o,o.__data__,l,u)),i.push(o));return new X(r,i)},filter:function(t){"function"!=typeof t&&(t=h(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var a,o=n[i],u=o.length,s=r[i]=[],l=0;l<u;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&s.push(a);return new X(r,this._parents)},data:function(t,n){if(!t)return p=new Array(this.size()),l=-1,this.each(function(t){p[++l]=t}),p;var e=n?g:v,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=i.length,o=new Array(a),u=new Array(a),s=new Array(a),l=0;l<a;++l){var c=r[l],h=i[l],f=h.length,p=t.call(c,c&&c.__data__,l,r),d=p.length,y=u[l]=new Array(d),m=o[l]=new Array(d);e(c,h,y,m,s[l]=new Array(f),p,n);for(var x,w,_=0,b=0;_<d;++_)if(x=y[_]){for(_>=b&&(b=_+1);!(w=m[b])&&++b<d;);x._next=w||null}}return(o=new X(o,r))._enter=u,o._exit=s,o},enter:function(){return new X(this._enter||this._groups.map(f),this._parents)},exit:function(){return new X(this._exit||this._groups.map(f),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?a.remove():e(a),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s,l=n[u],c=e[u],h=l.length,f=o[u]=new Array(h),p=0;p<h;++p)(s=l[p]||c[p])&&(f[p]=s);for(;u<r;++u)o[u]=n[u];return new X(o,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=y);for(var e=this._groups,r=e.length,i=new Array(r),a=0;a<r;++a){for(var o,u=e[a],s=u.length,l=i[a]=new Array(s),c=0;c<s;++c)(o=u[c])&&(l[c]=o);l.sort(n)}return new X(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,a=n[e],o=0,u=a.length;o<u;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,n){var e=a(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof n?e.local?function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}:function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):x(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=w(t+"");if(arguments.length<2){for(var r=_(this.node()),i=-1,a=e.length;++i<a;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?M:A)(this,t)}}:n?function(t){return function(){M(this,t)}}:function(t){return function(){A(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?N:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?I:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(k)},lower:function(){return this.each(S)},append:function(t){var n="function"==typeof t?t:o(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:o(t),r=null==n?P:"function"==typeof n?n:s(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(E)},clone:function(t){return this.select(t?O:z)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,a=function(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),o=a.length;if(!(arguments.length<2)){for(u=n?q:T,null==e&&(e=!1),r=0;r<o;++r)this.each(u(a[r],n,e));return this}var u=this.node().__on;if(u)for(var s,l=0,c=u.length;l<c;++l)for(r=0,s=u[l];r<o;++r)if((i=a[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return L(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return L(this,t,n)}})(t,n))}};var B=F,Y=function(t){return"string"==typeof t?new X([[document.querySelector(t)]],[document.documentElement]):new X([[t]],H)},G=function(t){return Y(o(t).call(document.documentElement))},$=0;function U(){return new Z}function Z(){this._="@"+(++$).toString(36)}Z.prototype=U.prototype={constructor:Z,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var W=function(){for(var t,n=R;t=n.sourceEvent;)n=t;return n},J=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]},Q=function(t){var n=W();return n.changedTouches&&(n=n.changedTouches[0]),J(t,n)},K=function(t){return"string"==typeof t?new X([document.querySelectorAll(t)],[document.documentElement]):new X([null==t?[]:t],H)},tt=function(t,n,e){arguments.length<3&&(e=n,n=W().changedTouches);for(var r,i=0,a=n?n.length:0;i<a;++i)if((r=n[i]).identifier===e)return J(t,r);return null},nt=function(t,n){null==n&&(n=W().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=J(t,n[e]);return i};e.d(n,"create",function(){return G}),e.d(n,"creator",function(){return o}),e.d(n,"local",function(){return U}),e.d(n,"matcher",function(){return h}),e.d(n,"mouse",function(){return Q}),e.d(n,"namespace",function(){return a}),e.d(n,"namespaces",function(){return i}),e.d(n,"clientPoint",function(){return J}),e.d(n,"select",function(){return Y}),e.d(n,"selectAll",function(){return K}),e.d(n,"selection",function(){return B}),e.d(n,"selector",function(){return s}),e.d(n,"selectorAll",function(){return c}),e.d(n,"style",function(){return x}),e.d(n,"touch",function(){return tt}),e.d(n,"touches",function(){return nt}),e.d(n,"window",function(){return m}),e.d(n,"event",function(){return R}),e.d(n,"customEvent",function(){return V})},YT44:function(t,n,e){!function(t,r){r(n,e("Gq40"),e("1Zf7"))}(0,function(t,n,e){"use strict";var r=1e-10;function i(t,n){var e,i=function(t){for(var n=[],e=0;e<t.length;++e)for(var r=e+1;r<t.length;++r)for(var i=s(t[e],t[r]),a=0;a<i.length;++a){var o=i[a];o.parentIndex=[e,r],n.push(o)}return n}(t),u=i.filter(function(n){return function(t,n){for(var e=0;e<n.length;++e)if(o(t,n[e])>n[e].radius+r)return!1;return!0}(n,t)}),c=0,h=0,f=[];if(u.length>1){var p=l(u);for(e=0;e<u.length;++e){var d=u[e];d.angle=Math.atan2(d.x-p.x,d.y-p.y)}u.sort(function(t,n){return n.angle-t.angle});var v=u[u.length-1];for(e=0;e<u.length;++e){var g=u[e];h+=(v.x+g.x)*(g.y-v.y);for(var y={x:(g.x+v.x)/2,y:(g.y+v.y)/2},m=null,x=0;x<g.parentIndex.length;++x)if(v.parentIndex.indexOf(g.parentIndex[x])>-1){var w=t[g.parentIndex[x]],_=Math.atan2(g.x-w.x,g.y-w.y),b=Math.atan2(v.x-w.x,v.y-w.y),M=b-_;M<0&&(M+=2*Math.PI);var A=b-M/2,N=o(y,{x:w.x+w.radius*Math.sin(A),y:w.y+w.radius*Math.cos(A)});N>2*w.radius&&(N=2*w.radius),(null===m||m.width>N)&&(m={circle:w,width:N,p1:g,p2:v})}null!==m&&(f.push(m),c+=a(m.circle.radius,m.width),v=g)}}else{var I=t[0];for(e=1;e<t.length;++e)t[e].radius<I.radius&&(I=t[e]);var k=!1;for(e=0;e<t.length;++e)if(o(t[e],I)>Math.abs(I.radius-t[e].radius)){k=!0;break}k?c=h=0:(c=I.radius*I.radius*Math.PI,f.push({circle:I,p1:{x:I.x,y:I.y+I.radius},p2:{x:I.x-r,y:I.y+I.radius},width:2*I.radius}))}return h/=2,n&&(n.area=c+h,n.arcArea=c,n.polygonArea=h,n.arcs=f,n.innerPoints=u,n.intersectionPoints=i),c+h}function a(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function o(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function u(t,n,e){if(e>=t+n)return 0;if(e<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);var r=n-(e*e-t*t+n*n)/(2*e);return a(t,t-(e*e-n*n+t*t)/(2*e))+a(n,r)}function s(t,n){var e=o(t,n),r=t.radius,i=n.radius;if(e>=r+i||e<=Math.abs(r-i))return[];var a=(r*r-i*i+e*e)/(2*e),u=Math.sqrt(r*r-a*a),s=t.x+a*(n.x-t.x)/e,l=t.y+a*(n.y-t.y)/e,c=-(n.y-t.y)*(u/e),h=-(n.x-t.x)*(u/e);return[{x:s+c,y:l-h},{x:s-c,y:l+h}]}function l(t){for(var n={x:0,y:0},e=0;e<t.length;++e)n.x+=t[e].x,n.y+=t[e].y;return n.x/=t.length,n.y/=t.length,n}function c(t){for(var n=new Array(t),e=0;e<t;++e)n[e]=0;return n}function h(t,n){return c(t).map(function(){return c(n)})}function f(t,n){for(var e=0,r=0;r<t.length;++r)e+=t[r]*n[r];return e}function p(t){return Math.sqrt(f(t,t))}function d(t,n,e){for(var r=0;r<n.length;++r)t[r]=n[r]*e}function v(t,n,e,r,i){for(var a=0;a<t.length;++a)t[a]=n*e[a]+r*i[a]}function g(t,n,e){var r,i=(e=e||{}).maxIterations||200*n.length,a=e.nonZeroDelta||1.05,o=e.zeroDelta||.001,u=e.minErrorDelta||1e-6,s=e.minErrorDelta||1e-5,l=void 0!==e.rho?e.rho:1,c=void 0!==e.chi?e.chi:2,h=void 0!==e.psi?e.psi:-.5,f=void 0!==e.sigma?e.sigma:.5,p=n.length,d=new Array(p+1);d[0]=n,d[0].fx=t(n),d[0].id=0;for(var g=0;g<p;++g){var y=n.slice();y[g]=y[g]?y[g]*a:o,d[g+1]=y,d[g+1].fx=t(y),d[g+1].id=g+1}function m(t){for(var n=0;n<t.length;n++)d[p][n]=t[n];d[p].fx=t.fx}for(var x=function(t,n){return t.fx-n.fx},w=n.slice(),_=n.slice(),b=n.slice(),M=n.slice(),A=0;A<i;++A){if(d.sort(x),e.history){var N=d.map(function(t){var n=t.slice();return n.fx=t.fx,n.id=t.id,n});N.sort(function(t,n){return t.id-n.id}),e.history.push({x:d[0].slice(),fx:d[0].fx,simplex:N})}for(r=0,g=0;g<p;++g)r=Math.max(r,Math.abs(d[0][g]-d[1][g]));if(Math.abs(d[0].fx-d[p].fx)<u&&r<s)break;for(g=0;g<p;++g){w[g]=0;for(var I=0;I<p;++I)w[g]+=d[I][g];w[g]/=p}var k=d[p];if(v(_,1+l,w,-l,k),_.fx=t(_),_.fx<d[0].fx)v(M,1+c,w,-c,k),M.fx=t(M),M.fx<_.fx?m(M):m(_);else if(_.fx>=d[p-1].fx){var S=!1;if(_.fx>k.fx?(v(b,1+h,w,-h,k),b.fx=t(b),b.fx<k.fx?m(b):S=!0):(v(b,1-h*l,w,h*l,k),b.fx=t(b),b.fx<_.fx?m(b):S=!0),S){if(f>=1)break;for(g=1;g<d.length;++g)v(d[g],1-f,d[0],f,d[g]),d[g].fx=t(d[g])}}else m(_)}return d.sort(x),{fx:d[0].fx,x:d[0]}}function y(t,n,e,r,i,a,o){var u=e.fx,s=f(e.fxprime,n),l=u,c=u,h=s,p=0;function d(c,p,d){for(var g=0;g<16;++g)if(i=(c+p)/2,v(r.x,1,e.x,i,n),l=r.fx=t(r.x,r.fxprime),h=f(r.fxprime,n),l>u+a*i*s||l>=d)p=i;else{if(Math.abs(h)<=-o*s)return i;h*(p-c)>=0&&(p=c),c=i,d=l}return 0}i=i||1,a=a||1e-6,o=o||.1;for(var g=0;g<10;++g){if(v(r.x,1,e.x,i,n),l=r.fx=t(r.x,r.fxprime),h=f(r.fxprime,n),l>u+a*i*s||g&&l>=c)return d(p,i,c);if(Math.abs(h)<=-o*s)return i;if(h>=0)return d(i,p,l);c=l,p=i,i*=2}return i}function m(t,n,e){var r,i,a,o={x:n.slice(),fx:0,fxprime:n.slice()},u={x:n.slice(),fx:0,fxprime:n.slice()},s=n.slice(),l=1;a=(e=e||{}).maxIterations||20*n.length,o.fx=t(o.x,o.fxprime),d(r=o.fxprime.slice(),o.fxprime,-1);for(var c=0;c<a;++c){if(l=y(t,r,o,u,l),e.history&&e.history.push({x:o.x.slice(),fx:o.fx,fxprime:o.fxprime.slice(),alpha:l}),l){v(s,1,u.fxprime,-1,o.fxprime);var h=f(o.fxprime,o.fxprime);v(r,Math.max(0,f(s,u.fxprime)/h),r,-1,u.fxprime),i=o,o=u,u=i}else d(r,o.fxprime,-1);if(p(o.fxprime)<=1e-5)break}return e.history&&e.history.push({x:o.x.slice(),fx:o.fx,fxprime:o.fxprime.slice(),alpha:l}),o}function x(t,n){(n=n||{}).maxIterations=n.maxIterations||500;var e,r=n.initialLayout||b,i=n.lossFunction||A,a=r(t=function(t){t=t.slice();var n,e,r,i,a=[],o={};for(n=0;n<t.length;++n){var u=t[n];1==u.sets.length?a.push(u.sets[0]):2==u.sets.length&&(r=u.sets[0],i=u.sets[1],o[[r,i]]=!0,o[[i,r]]=!0)}for(a.sort(function(t,n){return t>n}),n=0;n<a.length;++n)for(r=a[n],e=n+1;e<a.length;++e)i=a[e],[r,i]in o||t.push({sets:[r,i],size:0});return t}(t),n),o=[],u=[];for(e in a)a.hasOwnProperty(e)&&(o.push(a[e].x),o.push(a[e].y),u.push(e));for(var s=g(function(n){for(var e={},r=0;r<u.length;++r){var o=u[r];e[o]={x:n[2*r],y:n[2*r+1],radius:a[o].radius}}return i(e,t)},o,n).x,l=0;l<u.length;++l)e=u[l],a[e].x=s[2*l],a[e].y=s[2*l+1];return a}var w=1e-10;function _(t,n,e){return Math.min(t,n)*Math.min(t,n)*Math.PI<=e+w?Math.abs(t-n):function(t,n,e,r){var i=(r=r||{}).maxIterations||100,a=r.tolerance||1e-10,o=t(n),u=t(e),s=e-n;if(o*u>0)throw"Initial bisect points must have opposite signs";if(0===o)return n;if(0===u)return e;for(var l=0;l<i;++l){var c=n+(s/=2),h=t(c);if(h*o>=0&&(n=c),Math.abs(s)<a||0===h)return c}return n+s}(function(r){return u(t,n,r)-e},0,t+n)}function b(t,n){var e=M(t,n),r=n.lossFunction||A;if(t.length>=8){var i=function(t,n){var e,r=(n=n||{}).restarts||10,i=[],a={};for(e=0;e<t.length;++e){var o=t[e];1==o.sets.length&&(a[o.sets[0]]=i.length,i.push(o))}var u=function(t,n,e){var r=h(n.length,n.length),i=h(n.length,n.length);return t.filter(function(t){return 2==t.sets.length}).map(function(t){var a=e[t.sets[0]],o=e[t.sets[1]],u=_(Math.sqrt(n[a].size/Math.PI),Math.sqrt(n[o].size/Math.PI),t.size);r[a][o]=r[o][a]=u;var s=0;t.size+1e-10>=Math.min(n[a].size,n[o].size)?s=1:t.size<=1e-10&&(s=-1),i[a][o]=i[o][a]=s}),{distances:r,constraints:i}}(t,i,a),s=u.distances,l=u.constraints,f=p(s.map(p))/s.length;s=s.map(function(t){return t.map(function(t){return t/f})});var v,g,y=function(t,n){return function(t,n,e,r){var i,a=0;for(i=0;i<n.length;++i)n[i]=0;for(i=0;i<e.length;++i)for(var o=t[2*i],u=t[2*i+1],s=i+1;s<e.length;++s){var l=t[2*s],c=t[2*s+1],h=e[i][s],f=r[i][s],p=(l-o)*(l-o)+(c-u)*(c-u),d=Math.sqrt(p),v=p-h*h;f>0&&d<=h||f<0&&d>=h||(a+=2*v*v,n[2*i]+=4*v*(o-l),n[2*i+1]+=4*v*(u-c),n[2*s]+=4*v*(l-o),n[2*s+1]+=4*v*(c-u))}return a}(t,n,s,l)};for(e=0;e<r;++e){var x=c(2*s.length).map(Math.random);g=m(y,x,n),(!v||g.fx<v.fx)&&(v=g)}var w=v.x,b={};for(e=0;e<i.length;++e){var M=i[e];b[M.sets[0]]={x:w[2*e]*f,y:w[2*e+1]*f,radius:Math.sqrt(M.size/Math.PI)}}if(n.history)for(e=0;e<n.history.length;++e)d(n.history[e].x,f);return b}(t,n);r(i,t)+1e-8<r(e,t)&&(e=i)}return e}function M(t,n){for(var e,r=n&&n.lossFunction?n.lossFunction:A,i={},a={},o=0;o<t.length;++o){var u=t[o];1==u.sets.length&&(e=u.sets[0],i[e]={x:1e10,y:1e10,rowid:i.length,size:u.size,radius:Math.sqrt(u.size/Math.PI)},a[e]=[])}for(t=t.filter(function(t){return 2==t.sets.length}),o=0;o<t.length;++o){var l=t[o],c=l.hasOwnProperty("weight")?l.weight:1,h=l.sets[0],f=l.sets[1];l.size+w>=Math.min(i[h].size,i[f].size)&&(c=0),a[h].push({set:f,size:l.size,weight:c}),a[f].push({set:h,size:l.size,weight:c})}var p=[];for(e in a)if(a.hasOwnProperty(e)){var d=0;for(o=0;o<a[e].length;++o)d+=a[e][o].size*a[e][o].weight;p.push({set:e,size:d})}function v(t,n){return n.size-t.size}p.sort(v);var g={};function y(t){return t.set in g}function m(t,n){i[n].x=t.x,i[n].y=t.y,g[n]=!0}for(m({x:0,y:0},p[0].set),o=1;o<p.length;++o){var x=p[o].set,b=a[x].filter(y);if(e=i[x],b.sort(v),0===b.length)throw"ERROR: missing pairwise overlap information";for(var M=[],N=0;N<b.length;++N){var I=i[b[N].set],k=_(e.radius,I.radius,b[N].size);M.push({x:I.x+k,y:I.y}),M.push({x:I.x-k,y:I.y}),M.push({y:I.y+k,x:I.x}),M.push({y:I.y-k,x:I.x});for(var S=N+1;S<b.length;++S)for(var P=i[b[S].set],E=_(e.radius,P.radius,b[S].size),z=s({x:I.x,y:I.y,radius:k},{x:P.x,y:P.y,radius:E}),O=0;O<z.length;++O)M.push(z[O])}var D=1e50,R=M[0];for(N=0;N<M.length;++N){i[x].x=M[N].x,i[x].y=M[N].y;var j=r(i,t);j<D&&(D=j,R=M[N])}m(R,x)}return i}function A(t,n){var e=0;function r(n){return n.map(function(n){return t[n]})}for(var a=0;a<n.length;++a){var s,l=n[a];if(1!=l.sets.length){if(2==l.sets.length){var c=t[l.sets[0]],h=t[l.sets[1]];s=u(c.radius,h.radius,o(c,h))}else s=i(r(l.sets));e+=(l.hasOwnProperty("weight")?l.weight:1)*(s-l.size)*(s-l.size)}}return e}function N(t,n,e){var r;if(null===e?t.sort(function(t,n){return n.radius-t.radius}):t.sort(e),t.length>0){var i=t[0].x,a=t[0].y;for(r=0;r<t.length;++r)t[r].x-=i,t[r].y-=a}2==t.length&&(o(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y));if(t.length>1){var u,s,l=Math.atan2(t[1].x,t[1].y)-n,c=Math.cos(l),h=Math.sin(l);for(r=0;r<t.length;++r)u=t[r].x,s=t[r].y,t[r].x=c*u-h*s,t[r].y=h*u+c*s}if(t.length>2){for(var f=Math.atan2(t[2].x,t[2].y)-n;f<0;)f+=2*Math.PI;for(;f>2*Math.PI;)f-=2*Math.PI;if(f>Math.PI){var p=t[1].y/(1e-10+t[1].x);for(r=0;r<t.length;++r){var d=(t[r].x+p*t[r].y)/(1+p*p);t[r].x=2*d-t[r].x,t[r].y=2*d*p-t[r].y}}}}function I(t){function n(t){return t.parent!==t&&(t.parent=n(t.parent)),t.parent}function e(t,e){var r=n(t),i=n(e);r.parent=i}t.map(function(t){t.parent=t});for(var r=0;r<t.length;++r)for(var i=r+1;i<t.length;++i){var a=t[r].radius+t[i].radius;o(t[r],t[i])+1e-10<a&&e(t[i],t[r])}var u,s={};for(r=0;r<t.length;++r)(u=n(t[r]).parent.setid)in s||(s[u]=[]),s[u].push(t[r]);t.map(function(t){delete t.parent});var l=[];for(u in s)s.hasOwnProperty(u)&&l.push(s[u]);return l}function k(t){var n=function(n){return{max:Math.max.apply(null,t.map(function(t){return t[n]+t.radius})),min:Math.min.apply(null,t.map(function(t){return t[n]-t.radius}))}};return{xRange:n("x"),yRange:n("y")}}function S(t,n,e){null===n&&(n=Math.PI/2);var r,i,a=[];for(i in t)if(t.hasOwnProperty(i)){var o=t[i];a.push({x:o.x,y:o.y,radius:o.radius,setid:i})}var u=I(a);for(r=0;r<u.length;++r){N(u[r],n,e);var s=k(u[r]);u[r].size=(s.xRange.max-s.xRange.min)*(s.yRange.max-s.yRange.min),u[r].bounds=s}u.sort(function(t,n){return n.size-t.size});var l=(a=u[0]).bounds,c=(l.xRange.max-l.xRange.min)/50;function h(t,n,e){if(t){var r,i,o,u=t.bounds;n?r=l.xRange.max-u.xRange.min+c:(r=l.xRange.max-u.xRange.max,(o=(u.xRange.max-u.xRange.min)/2-(l.xRange.max-l.xRange.min)/2)<0&&(r+=o)),e?i=l.yRange.max-u.yRange.min+c:(i=l.yRange.max-u.yRange.max,(o=(u.yRange.max-u.yRange.min)/2-(l.yRange.max-l.yRange.min)/2)<0&&(i+=o));for(var s=0;s<t.length;++s)t[s].x+=r,t[s].y+=i,a.push(t[s])}}for(var f=1;f<u.length;)h(u[f],!0,!1),h(u[f+1],!1,!0),h(u[f+2],!0,!0),f+=3,l=k(a);var p={};for(r=0;r<a.length;++r)p[a[r].setid]=a[r];return p}function P(t,n,e,r){var i=[],a=[];for(var o in t)t.hasOwnProperty(o)&&(a.push(o),i.push(t[o]));n-=2*r,e-=2*r;var u=k(i),s=u.xRange,l=u.yRange;if(s.max==s.min||l.max==l.min)return console.log("not scaling solution: zero size detected"),t;for(var c=n/(s.max-s.min),h=e/(l.max-l.min),f=Math.min(h,c),p=(n-(s.max-s.min)*f)/2,d=(e-(l.max-l.min)*f)/2,v={},g=0;g<i.length;++g){var y=i[g];v[a[g]]={radius:f*y.radius,x:r+p+(y.x-s.min)*f,y:r+d+(y.y-l.min)*f}}return v}function E(t,e){return function(){for(var r,i=n.select(this),a=i.datum(),o=t[a.sets[0]].radius||50,u=e(a)||"",s=u.split(/\s+/).reverse(),l=(u.length+s.length)/3,c=s.pop(),h=[c],f=0,p=i.text(null).append("tspan").text(c);c=s.pop();)h.push(c),r=h.join(" "),p.text(r),r.length>l&&p.node().getComputedTextLength()>o&&(h.pop(),p.text(h.join(" ")),h=[c],p=i.append("tspan").text(c),f++);var d=.35-1.1*f/2,v=i.attr("x"),g=i.attr("y");i.selectAll("tspan").attr("x",v).attr("y",g).attr("dy",function(t,n){return d+1.1*n+"em"})}}function z(t,n,e){var r,i,a=n[0].radius-o(n[0],t);for(r=1;r<n.length;++r)(i=n[r].radius-o(n[r],t))<=a&&(a=i);for(r=0;r<e.length;++r)(i=o(e[r],t)-e[r].radius)<=a&&(a=i);return a}function O(t,n){var e,r=[];for(e=0;e<t.length;++e){var a=t[e];r.push({x:a.x,y:a.y}),r.push({x:a.x+a.radius/2,y:a.y}),r.push({x:a.x-a.radius/2,y:a.y}),r.push({x:a.x,y:a.y+a.radius/2}),r.push({x:a.x,y:a.y-a.radius/2})}var u=r[0],s=z(r[0],t,n);for(e=1;e<r.length;++e){var c=z(r[e],t,n);c>=s&&(u=r[e],s=c)}var h=g(function(e){return-1*z({x:e[0],y:e[1]},t,n)},[u.x,u.y],{maxIterations:500,minErrorDelta:1e-10}).x,f={x:h[0],y:h[1]},p=!0;for(e=0;e<t.length;++e)if(o(f,t[e])>t[e].radius){p=!1;break}for(e=0;e<n.length;++e)if(o(f,n[e])<n[e].radius){p=!1;break}if(!p)if(1==t.length)f={x:t[0].x,y:t[0].y};else{var d={};i(t,d),f=0===d.arcs.length?{x:0,y:-1e3,disjoint:!0}:1==d.arcs.length?{x:d.arcs[0].circle.x,y:d.arcs[0].circle.y}:n.length?O(t,[]):l(d.arcs.map(function(t){return t.p1}))}return f}function D(t){var n={},e=[];for(var r in t)e.push(r),n[r]=[];for(var i=0;i<e.length;i++)for(var a=t[e[i]],u=i+1;u<e.length;++u){var s=t[e[u]],l=o(a,s);l+s.radius<=a.radius+1e-10?n[e[u]].push(e[i]):l+a.radius<=s.radius+1e-10&&n[e[i]].push(e[u])}return n}function R(t,n){for(var e={},r=D(t),i=0;i<n.length;++i){for(var a=n[i].sets,o={},u={},s=0;s<a.length;++s){o[a[s]]=!0;for(var l=r[a[s]],c=0;c<l.length;++c)u[l[c]]=!0}var h=[],f=[];for(var p in t)p in o?h.push(t[p]):p in u||f.push(t[p]);var d=O(h,f);e[a]=d,d.disjoint&&n[i].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return e}function j(t,n,e){var r=[];return r.push("\nM",t,n),r.push("\nm",-e,0),r.push("\na",e,e,0,1,0,2*e,0),r.push("\na",e,e,0,1,0,2*-e,0),r.join(" ")}function C(t){var n=t.split(" ");return{x:parseFloat(n[1]),y:parseFloat(n[2]),radius:-parseFloat(n[4])}}function T(t){var n={};i(t,n);var e=n.arcs;if(0===e.length)return"M 0 0";if(1==e.length){var r=e[0].circle;return j(r.x,r.y,r.radius)}for(var a=["\nM",e[0].p2.x,e[0].p2.y],o=0;o<e.length;++o){var u=e[o],s=u.circle.radius,l=u.width>s;a.push("\nA",s,s,0,l?1:0,1,u.p1.x,u.p1.y)}return a.join(" ")}t.intersectionArea=i,t.circleCircleIntersection=s,t.circleOverlap=u,t.circleArea=a,t.distance=o,t.venn=x,t.greedyLayout=M,t.scaleSolution=P,t.normalizeSolution=S,t.bestInitialLayout=b,t.lossFunction=A,t.disjointCluster=I,t.distanceFromIntersectArea=_,t.VennDiagram=function(){var t=600,e=350,r=15,i=1e3,a=Math.PI/2,o=!0,u=!0,s=!0,l=null,c=null,h={},f=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],p=0,d=function(t){if(t in h)return h[t];var n=h[t]=f[p];return(p+=1)>=f.length&&(p=0),n},v=x,g=A;function y(h){var f=h.datum(),p={};f.forEach(function(t){0==t.size&&1==t.sets.length&&(p[t.sets[0]]=1)});var y={},m={};if((f=f.filter(function(t){return!t.sets.some(function(t){return t in p})})).length>0){var x=v(f,{lossFunction:g});o&&(x=S(x,a,c)),y=P(x,t,e,r),m=R(y,f)}var w={};function _(t){return t.sets in w?w[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}f.forEach(function(t){t.label&&(w[t.sets]=t.label)}),h.selectAll("svg").data([y]).enter().append("svg");var b=h.select("svg").attr("width",t).attr("height",e),M={},A=!1;b.selectAll(".venn-area path").each(function(t){var e=n.select(this).attr("d");1==t.sets.length&&e&&(A=!0,M[t.sets[0]]=C(e))});var N=function(n){return function(r){return T(n.sets.map(function(n){var i=M[n],a=y[n];return i||(i={x:t/2,y:e/2,radius:1}),a||(a={x:t/2,y:e/2,radius:1}),{x:i.x*(1-r)+a.x*r,y:i.y*(1-r)+a.y*r,radius:i.radius*(1-r)+a.radius*r}}))}},I=b.selectAll(".venn-area").data(f,function(t){return t.sets}),k=I.enter().append("g").attr("class",function(t){return"venn-area venn-"+(1==t.sets.length?"circle":"intersection")}).attr("data-venn-sets",function(t){return t.sets.join("_")}),z=k.append("path"),O=k.append("text").attr("class","label").text(function(t){return _(t)}).attr("text-anchor","middle").attr("dy",".35em").attr("x",t/2).attr("y",e/2);s&&(z.style("fill-opacity","0").filter(function(t){return 1==t.sets.length}).style("fill",function(t){return d(t.sets)}).style("fill-opacity",".25"),O.style("fill",function(t){return 1==t.sets.length?d(t.sets):"#444"}));var D=h;A?(D=h.transition("venn").duration(i)).selectAll("path").attrTween("d",N):D.selectAll("path").attr("d",function(t){return T(t.sets.map(function(t){return y[t]}))});var j=D.selectAll("text").filter(function(t){return t.sets in m}).text(function(t){return _(t)}).attr("x",function(t){return Math.floor(m[t.sets].x)}).attr("y",function(t){return Math.floor(m[t.sets].y)});u&&(A?"on"in j?j.on("end",E(y,_)):j.each("end",E(y,_)):j.each(E(y,_)));var q=I.exit().transition("venn").duration(i).remove();q.selectAll("path").attrTween("d",N);var V=q.selectAll("text").attr("x",t/2).attr("y",e/2);return null!==l&&(O.style("font-size","0px"),j.style("font-size",l),V.style("font-size","0px")),{circles:y,textCentres:m,nodes:I,enter:k,update:D,exit:q}}return y.wrap=function(t){return arguments.length?(u=t,y):u},y.width=function(n){return arguments.length?(t=n,y):t},y.height=function(t){return arguments.length?(e=t,y):e},y.padding=function(t){return arguments.length?(r=t,y):r},y.colours=function(t){return arguments.length?(d=t,y):d},y.fontSize=function(t){return arguments.length?(l=t,y):l},y.duration=function(t){return arguments.length?(i=t,y):i},y.layoutFunction=function(t){return arguments.length?(v=t,y):v},y.normalize=function(t){return arguments.length?(o=t,y):o},y.styled=function(t){return arguments.length?(s=t,y):s},y.orientation=function(t){return arguments.length?(a=t,y):a},y.orientationOrder=function(t){return arguments.length?(c=t,y):c},y.lossFunction=function(t){return arguments.length?(g=t,y):g},y},t.wrapText=E,t.computeTextCentres=R,t.computeTextCentre=O,t.sortAreas=function(t,n){for(var e=D(t.selectAll("svg").datum()),r={},i=0;i<n.sets.length;++i){var a=n.sets[i];for(var o in e)for(var u=e[o],s=0;s<u.length;++s)if(u[s]==a){r[o]=!0;break}}function l(t){for(var n=0;n<t.length;++n)if(!(t[n]in r))return!1;return!0}t.selectAll("g").sort(function(t,e){return t.sets.length!=e.sets.length?t.sets.length-e.sets.length:t==n?l(e.sets)?-1:1:e==n?l(t.sets)?1:-1:e.size-t.size})},t.circlePath=j,t.circleFromPath=C,t.intersectionAreaPath=T,Object.defineProperty(t,"__esModule",{value:!0})})}},["FiMB"]);
//# sourceMappingURL=venn.js.map